/* ============================================================
   ReembolsaFácil — Identidade Visual: Preto & Branco
   ============================================================ */

/* ── Variáveis ────────────────────────────────────────────── */
:root {
  --black:        #000000;
  --white:        #FFFFFF;
  --gray-900:     #111111;
  --gray-800:     #1C1C1C;
  --gray-700:     #2E2E2E;
  --gray-600:     #444444;
  --gray-500:     #6B6B6B;
  --gray-400:     #9B9B9B;
  --gray-300:     #C8C8C8;
  --gray-200:     #E2E2E2;
  --gray-100:     #F4F4F4;
  --gray-50:      #FAFAFA;

  --accent:       #000000;
  --accent-hover: #2E2E2E;

  --sidebar-w:    260px;
  --topbar-h:     60px;
  --border-r:     8px;
  --border-r-sm:  4px;
  --shadow:       0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --shadow-md:    0 4px 12px rgba(0,0,0,.10);
  --transition:   .18s ease;
}

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-100);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Layout com sidebar ───────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 1000;
  transition: transform var(--transition);
  overflow-y: auto;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gray-700);
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--white);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-logo .logo-icon svg { width: 22px; height: 22px; }
.sidebar-logo .logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--white);
  line-height: 1.2;
}
.sidebar-logo .logo-sub {
  font-size: 10px;
  color: var(--gray-400);
  font-weight: 400;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.sidebar-section {
  padding: 16px 12px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-500);
}

.sidebar nav { flex: 1; padding: 8px 0; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--gray-300);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link:hover {
  background: var(--gray-800);
  color: var(--white);
}
.sidebar-link.active {
  background: var(--white);
  color: var(--black);
  font-weight: 600;
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--white);
}
.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--white);
  color: var(--black);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  border-top: 1px solid var(--gray-700);
  padding: 12px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--border-r-sm);
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--gray-800); }
.avatar {
  width: 34px; height: 34px;
  background: var(--gray-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-info .name {
  font-size: 13px; font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-info .role {
  font-size: 10px; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .5px;
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.btn-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--gray-700);
}

/* ── Page content ─────────────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
}
.page-header p {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}
.page-header-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Cards métricas ───────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-r);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.metric-card:hover { box-shadow: var(--shadow-md); }
.metric-card .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.metric-card .value {
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}
.metric-card .sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}
.metric-card.accent {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}
.metric-card.accent .label,
.metric-card.accent .value,
.metric-card.accent .sub { color: var(--white); }
.metric-card.accent .label { color: var(--gray-300); }
.metric-card.accent .sub   { color: var(--gray-400); }

/* ── Botões ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--border-r-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Botão de captura rápida (QR / OCR): ícone maior */
.btn-capture {
  flex-direction: column;
  justify-content: center;
  padding: 18px 12px;
  gap: 8px;
  white-space: normal;
  text-align: center;
}
.btn-capture svg { width: 28px; height: 28px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn-primary:hover { background: var(--gray-800); border-color: var(--gray-800); }

.btn-secondary {
  background: var(--white);
  color: var(--gray-900);
  border-color: var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-100); border-color: var(--gray-400); }

.btn-danger {
  background: #fff0f0;
  color: #c0392b;
  border-color: #f5c6c6;
}
.btn-danger:hover { background: #ffe0e0; }

.btn-success {
  background: #f0fff4;
  color: #1a7a40;
  border-color: #b2dfdb;
}
.btn-success:hover { background: #e0f5ea; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-icon { padding: 8px; }

/* ── Card / Caixa ─────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-r);
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.card-header h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 0 0 var(--border-r) var(--border-r);
}

/* ── Tabela ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }

/* ── Badges de status ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-secondary { background: var(--gray-200); color: var(--gray-700); }
.badge-info      { background: #e8f4fd; color: #1565c0; }
.badge-warning   { background: #fff8e1; color: #e65100; }
.badge-success   { background: #e8f5e9; color: #1b5e20; }
.badge-danger    { background: #fce4ec; color: #b71c1c; }
.badge-primary   { background: var(--black); color: var(--white); }
.badge-dark      { background: var(--gray-900); color: var(--white); }

/* ── Formulários ─────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-label .required { color: #c0392b; margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--border-r-sm);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.form-control::placeholder { color: var(--gray-400); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; }
textarea.form-control { min-height: 90px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.form-error { font-size: 12px; color: #c0392b; margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 640px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* ── Upload Drop Zone ─────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--border-r);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--black);
  background: var(--gray-100);
}
.upload-zone svg { width: 36px; height: 36px; color: var(--gray-400); margin-bottom: 8px; }
.upload-zone p { font-size: 13px; color: var(--gray-500); }
.upload-zone strong { color: var(--gray-900); }

/* ── Alertas ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--border-r-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: #fce4ec; color: #b71c1c; border: 1px solid #f8bbd0; }
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.alert-info    { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }
.alert-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }

/* ── Timeline (audit) ─────────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--gray-200);
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--black);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--gray-300);
}
.timeline-item.approved .timeline-dot   { background: #1b5e20; }
.timeline-item.rejected .timeline-dot   { background: #b71c1c; }
.timeline-item.submitted .timeline-dot  { background: #1565c0; }
.timeline-item.review .timeline-dot     { background: #e65100; }
.timeline-item.reimbursed .timeline-dot { background: var(--black); }
.timeline-date { font-size: 11px; color: var(--gray-400); margin-bottom: 2px; }
.timeline-action { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.timeline-note { font-size: 12.5px; color: var(--gray-600); margin-top: 3px; }
.timeline-actor { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ── Paginação ────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 16px 0 0;
}
.page-link {
  padding: 7px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--border-r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  transition: all var(--transition);
  background: var(--white);
}
.page-link:hover { border-color: var(--black); color: var(--black); }
.page-link.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.page-link.disabled { opacity: .4; pointer-events: none; }

/* ── Filtros ─────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-r);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }
.filter-bar .btn { flex-shrink: 0; align-self: flex-end; }

/* ── QR Reader ───────────────────────────────────────────── */
.qr-container {
  position: relative;
  background: var(--black);
  border-radius: var(--border-r);
  overflow: hidden;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto;
}
#qr-video { width: 100%; height: 100%; object-fit: cover; }
.qr-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.qr-frame {
  width: 200px; height: 200px;
  border: 3px solid var(--white);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white);
  border-radius: var(--border-r);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-backdrop.show .modal { transform: translateY(0); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--gray-500);
  border-radius: var(--border-r-sm);
}
.modal-close:hover { background: var(--gray-100); }
.modal-body { padding: 20px; }
.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid var(--gray-200);
}

/* ── Auth pages ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .icon {
  width: 48px; height: 48px;
  background: var(--black);
  border-radius: 10px;
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.auth-logo .icon svg { width: 28px; height: 28px; color: var(--white); }
.auth-logo h1 { font-size: 20px; font-weight: 800; color: var(--black); }
.auth-logo p  { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }

/* ── PWA Install page ────────────────────────────────────── */
.install-page {
  min-height: 100vh;
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
}
.install-page .app-icon {
  width: 90px; height: 90px;
  background: var(--white);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 32px rgba(255,255,255,.15);
}
.install-page h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.install-page .subtitle { font-size: 15px; color: var(--gray-400); margin-bottom: 32px; }
.install-steps {
  background: var(--gray-900);
  border-radius: 12px;
  padding: 24px;
  max-width: 380px;
  width: 100%;
  margin: 0 auto 24px;
  text-align: left;
}
.install-step {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-800);
}
.install-step:last-child { border-bottom: none; }
.step-num {
  width: 28px; height: 28px;
  background: var(--white);
  color: var(--black);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-text { font-size: 14px; color: var(--gray-200); line-height: 1.5; }
.step-text strong { color: var(--white); }

/* ── Responsivo Mobile ────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .btn-hamburger {
    display: flex;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .page-content { padding: 16px; }
  .page-header { flex-direction: column; }
  .filter-bar { padding: 12px; }
  .filter-bar .form-group { min-width: 100%; }
  .auth-card { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
}

/* ── Overlay de sidebar mobile ─────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ── Utilitários ─────────────────────────────────────────── */
.text-muted    { color: var(--gray-400); }
.text-sm       { font-size: 12px; }
.text-right    { text-align: right; }
.text-center   { text-align: center; }
.fw-600        { font-weight: 600; }
.fw-700        { font-weight: 700; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.p-0 { padding: 0; }

/* ── Loading spinner ─────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── File preview ────────────────────────────────────────── */
.file-preview {
  margin-top: 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-r-sm);
  overflow: hidden;
  max-width: 100%;
}
.file-preview img {
  max-height: 180px;
  width: 100%;
  object-fit: contain;
  background: var(--gray-100);
}
.file-preview-pdf {
  padding: 16px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state svg { width: 48px; height: 48px; color: var(--gray-300); margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--gray-400); }

/* ── Prevenir scroll horizontal global ────────────────────── */
html, body { overflow-x: hidden; max-width: 100%; }
.main-content { overflow-x: hidden; min-width: 0; }
.page-content { overflow-x: hidden; min-width: 0; }

/* ── Admin dashboard grid ─────────────────────────────────── */
.admin-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Show expense layout (sidebar + main) ─────────────────── */
.show-layout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

/* ── Tabela responsiva: desktop vs mobile ─────────────────── */
.table-desktop { display: block !important; }
.table-mobile  { display: none !important; }

/* ── Cards de despesa (mobile) ────────────────────────────── */
.expense-card-item {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}
.expense-card-item:last-child { border-bottom: none; }
.expense-card-item:hover { background: var(--gray-50); }

.expense-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.expense-card-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.expense-card-category {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
}
.expense-card-user {
  font-size: 11px;
  color: var(--gray-500);
}
.expense-card-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  white-space: nowrap;
}
.expense-card-desc {
  font-size: 12.5px;
  color: var(--gray-600);
  margin: 2px 0 6px;
  line-height: 1.4;
}
.expense-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Status chips scroll (dashboard) ─────────────────────── */
.status-chips-scroll {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.status-chip {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  white-space: nowrap;
  transition: all var(--transition);
}
.status-chip:hover {
  border-color: var(--black);
  color: var(--black);
}
.status-chip.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ── SVGs inline: tamanho fixo em UI elements ─────────────── */
/* Sidebar, topbar: ícone 18px */
.sidebar-nav a svg,
.topbar svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
/* Bottom nav: ícone 22px (já definido em .bottom-nav-item svg abaixo) */
/* Cards de despesa: sem ícones grandes */
.expense-card-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
/* Modais, card-header, alertas: ícone 18px */
.modal svg,
.card-header svg,
.alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
/* Empty-state: ícone grande intencional — já definido em .empty-state svg */

/* ── Bottom nav mobile ────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: var(--black);
  border-top: 1px solid var(--gray-700);
  z-index: 1100;
  safe-area-inset-bottom: env(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-inner {
  display: flex;
  height: 100%;
  width: 100%;
  justify-content: space-around;
  align-items: stretch;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: center;
  gap: 3px;
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  text-decoration: none;
  transition: color var(--transition);
  padding: 8px 0 4px;
  position: relative;
}
.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.bottom-nav-item span {
  font-size: 10px;
  line-height: 1.2;
  margin-top: 2px;
  text-align: center;
}
.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--white);
}
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--white);
  border-radius: 0 0 2px 2px;
}
.bottom-nav-item.new-btn {
  background: var(--white);
  color: var(--black);
  border-radius: 12px;
  margin: 6px 4px;
  padding: 4px 0;
  font-weight: 700;
  flex: 1;
}
.bottom-nav-item.new-btn:hover { background: var(--gray-200); }
.bottom-nav-item.new-btn::before { display: none; }

/* ── Media queries mobile ─────────────────────────────────── */
@media (max-width: 768px) {
  .table-desktop { display: none !important; }
  .table-mobile  { display: block !important; }

  .admin-dash-grid { grid-template-columns: 1fr; }
  .show-layout-grid { grid-template-columns: 1fr; }

  .bottom-nav { display: flex; }

  /* Adicionar espaço para o bottom nav */
  .page-content { padding-bottom: 78px; }

  /* Status chips: scroll horizontal no mobile */
  .status-chips-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .status-chips-scroll::-webkit-scrollbar { display: none; }

  /* Evitar zoom do iOS ao focar inputs (font-size < 16px causa zoom) */
  .form-control,
  select.form-control,
  textarea.form-control {
    font-size: 16px;
  }
}

/* ── Wizard de despesa ───────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
  padding: 0 16px;
}
.wizard-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.wizard-step-indicator span {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.wizard-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-400);
  background: var(--white);
  transition: all var(--transition);
}
.wizard-step-indicator.active .wizard-step-circle {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}
.wizard-step-indicator.active span {
  color: var(--black);
}
.wizard-step-indicator.completed .wizard-step-circle {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}
.wizard-step-indicator.completed span {
  color: var(--gray-500);
}
.wizard-step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 8px;
  margin-bottom: 22px;
}

/* Etapas do wizard */
.wizard-step {
  display: none;
}
.wizard-step.active {
  display: block;
}

/* Câmera */
.camera-viewport {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.camera-viewport video {
  width: 100%;
  display: block;
}
.camera-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.camera-guide {
  width: 80%;
  height: 70%;
  border: 2px dashed rgba(255,255,255,.6);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
}

/* Botão de captura (redondo) */
.btn-capture-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 3px solid var(--gray-300);
}
.btn-capture-photo:hover {
  border-color: var(--black);
}
.capture-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--black);
  transition: transform .15s;
}
.btn-capture-photo:active .capture-circle {
  transform: scale(.85);
}

/* Spinner da IA */
.ai-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 80px;
  height: 80px;
}
.ai-spinner-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: wizard-spin 1s linear infinite;
}
.ai-spinner-icon {
  position: relative;
  z-index: 1;
}
@keyframes wizard-spin {
  to { transform: rotate(360deg); }
}
