/* ================================================================
   Téssera SaaS — Design System
   Tema Whisper · branco institucional + navy
   (alinhado com Téssera Offline v2)
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Paleta Whisper — idêntica ao offline */
  --bg:           #fafbfd;
  --bg-card:      #ffffff;
  --bg-soft:      #f5f7fa;
  --bg-tint:      #f0f4f8;
  --border:       #e5e7eb;
  --border-2:     #d1d5db;
  --border-soft:  #f1f3f7;

  --text:         #1e293b;
  --text-2:       #334155;
  --muted:        #64748b;
  --muted-2:      #94a3b8;

  --navy:         #1e3a5f;
  --navy-h:       #15263f;
  --navy-2:       #1e3a8a;
  --primary:      #1e3a5f;
  --primary-h:    #15263f;
  --accent:       #3b82f6;
  --accent-soft:  #eff6ff;
  --accent-border:#bfdbfe;

  --success:      #10b981;
  --success-soft: #d1fae5;
  --warning:      #f59e0b;
  --warning-soft: #fef3c7;
  --danger:       #ef4444;
  --danger-soft:  #fee2e2;

  --shadow-sm:    0 1px 2px rgba(15,23,42,.04);
  --shadow-md:    0 1px 3px rgba(15,23,42,.05), 0 1px 2px rgba(15,23,42,.04);
  --shadow-lg:    0 4px 12px rgba(15,23,42,.06), 0 2px 4px -2px rgba(15,23,42,.05);
  --shadow-xl:    0 12px 32px rgba(15,23,42,.08);

  --sidebar-w:    60px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    6px;
  --transition:   .15s;
}

/* ── Modo Escuro ────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #0f172a;
  --bg-card:      #1e293b;
  --bg-soft:      #1e293b;
  --bg-tint:      #273449;
  --border:       #334155;
  --border-2:     #475569;
  --border-soft:  #1e293b;
  --text:         #f1f5f9;
  --text-2:       #cbd5e1;
  --muted:        #94a3b8;
  --muted-2:      #64748b;
  --navy:         #3b82f6;
  --navy-h:       #2563eb;
  --primary:      #3b82f6;
  --primary-h:    #2563eb;
  --accent-soft:  #1e3a5f;
  --accent-border:#1e40af;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.3);
  --shadow-md:    0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:    0 4px 12px rgba(0,0,0,.4);
  --shadow-xl:    0 12px 32px rgba(0,0,0,.5);
}
[data-theme="dark"] .topbar        { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .sidebar       { background: #1e293b; border-color: #334155; }
[data-theme="dark"] table          { border-color: #334155; }
[data-theme="dark"] thead tr       { background: #273449; }
[data-theme="dark"] tbody tr:hover { background: #273449; }
[data-theme="dark"] .modal         { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .form-control  { background: #0f172a; border-color: #334155; color: #f1f5f9; }
[data-theme="dark"] .btn-ghost     { color: #94a3b8; background: #1e293b; border-color: #334155; }
[data-theme="dark"] .btn-ghost:hover { background: #273449; }
[data-theme="dark"] .auth-card     { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .terms-box     { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .dropdown-list { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .dropdown-list-header { background: #273449; }
[data-theme="dark"] .search-hero   { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); }

/* ── Base ───────────────────────────────────────────────────── */
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ── Layout ─────────────────────────────────────────────────── */
/* Sidebar é position:fixed; main usa margin-left; page scrolls naturalmente */

/* ── Sidebar slim (60px — idêntica ao offline) ──────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding: 14px 0 12px;
  gap: 2px;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar__brand {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  cursor: default;
  box-shadow: 0 2px 8px rgba(30,58,95,.25);
  flex-shrink: 0;
  font-weight: 800; color: #fff; font-size: 13px; letter-spacing: -.5px;
}

.nav {
  display: flex; flex-direction: column;
  gap: 2px; width: 100%; align-items: center;
}

.nav-item {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  border: none; background: transparent;
  transition: all var(--transition);
  position: relative;
}
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { background: var(--bg-soft); color: var(--navy); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px; top: 50%;
  width: 3px; height: 22px;
  transform: translateY(-50%);
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

/* Tooltip ao passar — idêntico ao offline */
.nav-item[data-tip] { position: relative; }
.nav-item[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px); top: 50%;
  transform: translateY(-50%);
  background: var(--text); color: #fff;
  padding: 5px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 200;
  box-shadow: var(--shadow-md);
}

.nav-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 0 4px; border-radius: 8px;
  min-width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-card);
}

.sidebar__footer {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 4px;
  width: 100%; align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

/* Status API dot */
.api-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted);
  transition: background .3s;
  position: relative;
}
.api-dot.ok { background: var(--success); }
.api-dot.ok::after {
  content: '';
  position: absolute; inset: -3px;
  background: var(--success); border-radius: 50%; opacity: .4;
  animation: api-pulse 2s ease-in-out infinite;
}
@keyframes api-pulse {
  0%,100% { transform: scale(1); opacity: .4; }
  50% { transform: scale(1.8); opacity: 0; }
}

/* User avatar mini */
.user-avatar-sm {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  cursor: pointer;
  transition: transform .2s;
}
.user-avatar-sm:hover { transform: scale(1.1); }

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

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-card);
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 50;
}
.topbar__left { flex: 1; min-width: 0; }
.topbar__title {
  font-size: 16px; font-weight: 700;
  color: var(--navy); letter-spacing: -.4px;
  line-height: 1.2;
}
.topbar__sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

/* ── Content ────────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 22px 24px;
  background: var(--bg);
}

/* ── Saldo badge topbar ─────────────────────────────────────── */
.saldo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 99px;
  padding: 5px 12px 5px 9px;
  font-size: 12.5px; font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.saldo-badge:hover { background: #dbeafe; }
.saldo-badge .dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  position: relative;
}
.saldo-badge .dot::after {
  content: '';
  position: absolute; inset: -3px;
  background: var(--accent); border-radius: 50%; opacity: .35;
  animation: api-pulse 2s ease-in-out infinite;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ── Metric cards (dashboard) ───────────────────────────────── */
.metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-border);
}
.metric-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--navy), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.metric-card:hover::after { transform: scaleX(1); }
.metric-card__label {
  font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .7px;
  font-weight: 600; margin-bottom: 7px;
}
.metric-card__value {
  font-size: 28px; font-weight: 800;
  color: var(--navy); letter-spacing: -1px;
  line-height: 1.1;
}
.metric-card__value.blue   { color: var(--accent); }
.metric-card__value.green  { color: var(--success); }
.metric-card__value.yellow { color: var(--warning); }
.metric-card__sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.metric-card__icon {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  opacity: .05;
  color: var(--navy);
}
.metric-card__icon svg { width: 44px; height: 44px; }

/* ── Search hero ────────────────────────────────────────────── */
.search-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #15508a 100%);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.search-hero::before {
  content: '';
  position: absolute; top: -40%; right: -5%;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  pointer-events: none;
}
.search-hero h2 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.search-hero p  { font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 14px; }
.search-row {
  display: flex; gap: 9px; align-items: flex-end;
}
.search-row .form-group { flex: 1; margin-bottom: 0; }
.search-row .form-label { color: rgba(255,255,255,.65); }
.search-row .form-control {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
  color: #fff; font-size: 14px; padding: 9px 13px;
}
.search-row .form-control:focus {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.search-row .form-control::placeholder { color: rgba(255,255,255,.35); }
.search-btn {
  background: #fff; color: var(--navy);
  border: none; border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: all var(--transition);
  white-space: nowrap; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.search-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .5s;
}
.search-btn:hover::before { transform: translateX(100%); }
.search-btn:hover { background: #f0f4f8; transform: translateY(-1px); }
.search-btn:active { transform: scale(.98); }
.search-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.search-info {
  display: flex; align-items: center; gap: 6px;
  margin-top: 9px;
  font-size: 12px; color: rgba(255,255,255,.45);
}

/* Email check row */
.email-check {
  display: flex; align-items: center; gap: 7px;
  padding-bottom: 1px;
}
.email-check input[type=checkbox] {
  accent-color: #fff; width: 13px; height: 13px; cursor: pointer;
}
.email-check-label {
  font-size: 12px; color: rgba(255,255,255,.55);
}

/* ── Resultado ──────────────────────────────────────────────── */
.resultado-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 17px;
  border-bottom: 1px solid var(--border-soft);
}
.resultado-titulo { font-size: 14px; font-weight: 700; color: var(--text); }
.resultado-sub    { font-size: 12px; color: var(--muted); margin-top: 2px; }

.proc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 15px; margin-bottom: 7px;
  box-shadow: var(--shadow-sm);
  transition: all .15s;
}
.proc-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.proc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--accent); margin-bottom: 3px;
}
.proc-assunto { font-size: 13px; font-weight: 600; color: var(--text); }
.proc-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-top: 4px;
}

/* ── Dropdown list (stat panels) ────────────────────────────── */
.dropdown-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fadeUp .18s ease;
  margin-top: 8px;
}
.dropdown-list-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
}
.dropdown-list-title { font-size: 12px; font-weight: 700; color: var(--text); }
.dropdown-list-count { font-size: 11px; color: var(--muted); }
.dropdown-list-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition);
  cursor: default;
}
.dropdown-list-item:last-child { border-bottom: none; }
.dropdown-list-item:hover { background: var(--bg-soft); }

/* ── Botões ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn:active { transform: scale(.98); }

/* btn-primary: navy + shine (idêntico ao offline) */
.btn-primary {
  background: var(--navy); color: #fff;
  box-shadow: 0 2px 6px rgba(30,58,95,.2);
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.15) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .55s;
}
.btn-primary:hover { background: var(--navy-h); box-shadow: 0 4px 12px rgba(30,58,95,.3); transform: translateY(-1px); }
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; }

.btn-ghost {
  background: var(--bg-card); color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.12) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .5s;
}
.btn-ghost:not(:disabled):hover::before { transform: translateX(100%); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--border-2); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-ghost-danger {
  background: var(--bg-card); color: var(--danger);
  border: 1px solid var(--danger-soft);
}
.btn-ghost-danger:hover { background: var(--danger-soft); }

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-full { width: 100%; justify-content: center; }

/* ── Tabela ─────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-soft); }
th {
  padding: 9px 15px;
  text-align: left; font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle; font-size: 13px; color: var(--text-2);
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--bg-soft); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-blue    { background: var(--accent-soft); color: var(--accent); }
.badge-green   { background: var(--success-soft); color: #047857; }
.badge-yellow  { background: var(--warning-soft); color: #92400e; }
.badge-red     { background: var(--danger-soft); color: #b91c1c; }
.badge-gray    { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); }
.badge-navy    { background: #dbeafe; color: var(--navy); }

/* Tipo pill */
.type-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  padding: 2px 7px; border-radius: 5px; text-transform: uppercase;
}
.type-cpf  { background: #e0f2fe; color: #0284c7; }
.type-cnpj { background: var(--accent-soft); color: var(--accent); }

/* ── Inputs / Forms ─────────────────────────────────────────── */
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-label  { font-size: 12px; font-weight: 600; color: var(--text-2); }
.form-control {
  width: 100%; padding: 8px 12px;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 13.5px; font-family: inherit;
  outline: none; transition: all var(--transition);
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-control::placeholder { color: var(--muted-2); }
.form-hint { font-size: 11.5px; color: var(--muted); }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 7px;
  z-index: 9999; pointer-events: none;
}
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 15px; font-size: 13px;
  color: var(--text-2);
  box-shadow: var(--shadow-lg);
  animation: toast-in .22s ease;
  max-width: 340px; display: flex; align-items: center; gap: 8px;
  pointer-events: auto;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }
@keyframes toast-in { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: none; } }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.35);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  animation: fadeIn .2s ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%; max-width: 480px;
  padding: 24px;
  box-shadow: var(--shadow-xl);
  animation: fadeUp .22s ease;
}
.modal__title { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 16px; letter-spacing: -.3px; }
.modal__footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ── Extrato (créditos) ─────────────────────────────────────── */
.extrato-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.extrato-item:last-child { border-bottom: none; }
.extrato-icon {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.extrato-icon.credit { background: var(--success-soft); }
.extrato-icon.debit  { background: var(--danger-soft);  }
.extrato-info        { flex: 1; min-width: 0; }
.extrato-desc  { font-size: 13px; color: var(--text-2); }
.extrato-date  { font-size: 11px; color: var(--muted); margin-top: 1px; }
.extrato-valor { font-size: 13.5px; font-weight: 700; flex-shrink: 0; }
.extrato-valor.credit { color: var(--success); }
.extrato-valor.debit  { color: var(--danger);  }

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-bg {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg); padding: 24px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-xl);
  animation: fadeUp .28s ease;
}
.auth-logo {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  margin-bottom: 22px;
}
.auth-logo-icon {
  width: 46px; height: 46px;
  background: var(--navy);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(30,58,95,.28);
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -.5px;
}
.auth-title { font-size: 19px; font-weight: 800; letter-spacing: -.4px; color: var(--navy); }
.auth-sub   { font-size: 12.5px; color: var(--muted); }

/* Termos LGPD */
.terms-box {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px; margin: 12px 0;
}
.terms-text { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.terms-check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.terms-check input[type=checkbox] { margin-top: 2px; accent-color: var(--accent); width: 13px; height: 13px; flex-shrink: 0; }
.terms-check-label { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.terms-check-label a { color: var(--accent); text-decoration: none; font-weight: 600; }
.terms-check-label a:hover { text-decoration: underline; }

.divider-text {
  display: flex; align-items: center; gap: 10px;
  margin: 13px 0; font-size: 12px; color: var(--muted-2);
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Section header ─────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-title { font-size: 13.5px; font-weight: 700; color: var(--text); }

/* ── Aviso LGPD ─────────────────────────────────────────────── */
.aviso-lgpd {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 11.5px; color: var(--muted);
  display: flex; gap: 7px; align-items: flex-start;
  margin-top: 13px; line-height: 1.5;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty {
  text-align: center; padding: 52px 24px;
  color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.empty__icon  { font-size: 36px; opacity: .28; }
.empty__title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.empty__sub   { font-size: 12.5px; max-width: 270px; line-height: 1.6; }

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block; flex-shrink: 0;
}
.spinner-lg { width: 30px; height: 30px; border-width: 3px; }
.loading-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 11px; padding: 60px 24px;
  color: var(--muted); font-size: 13px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animações ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Dark mode toggle btn ───────────────────────────────────── */
.dark-toggle {
  background: none; border: none; cursor: pointer;
  padding: 5px 7px; border-radius: var(--radius-xs);
  color: var(--muted); font-size: 16px;
  transition: background var(--transition);
  flex-shrink: 0;
}
.dark-toggle:hover { background: var(--bg-soft); }

/* ── Admin KPI grid ─────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.kpi-card__label {
  font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  font-weight: 600; margin-bottom: 5px;
}
.kpi-card__value {
  font-size: 24px; font-weight: 800;
  letter-spacing: -.8px; line-height: 1.1;
}
.kpi-card__value.blue   { color: var(--accent); }
.kpi-card__value.green  { color: var(--success); }
.kpi-card__value.yellow { color: var(--warning); }
.kpi-card__value.red    { color: var(--danger); }

/* ── Saldo hero (créditos) ──────────────────────────────────── */
.saldo-card-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #15508a 100%);
  border-radius: var(--radius); padding: 20px 22px;
  color: #fff;
}
.saldo-card-hero__label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; opacity: .6; margin-bottom: 4px;
}
.saldo-card-hero__value {
  font-size: 42px; font-weight: 800; letter-spacing: -1.5px; line-height: 1;
}
.saldo-card-hero__sub  { font-size: 12px; opacity: .5; margin-top: 5px; }
.saldo-card-hero__divider {
  height: 1px; background: rgba(255,255,255,.15); margin: 14px 0;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab-btn {
  padding: 9px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); }

/* ── NProgress — override para tema Whisper ─────────────────── */
#nprogress .bar {
  background: var(--accent) !important;
  height: 2.5px !important;
}
#nprogress .peg {
  box-shadow: 0 0 10px var(--accent), 0 0 5px var(--accent) !important;
}
#nprogress .spinner-icon {
  border-top-color: var(--accent) !important;
  border-left-color: var(--accent) !important;
}

/* ── JetBrains Mono — usada em docs/números ─────────────────── */
.font-mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12.5px;
}
.proc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--accent); margin-bottom: 3px;
  letter-spacing: -.3px;
}

/* ── Utilitários ────────────────────────────────────────────── */
.gap-2   { display: flex; align-items: center; gap: 8px; }
.gap-3   { display: flex; align-items: center; gap: 12px; }
.mt-3    { margin-top: 12px; }
.mt-4    { margin-top: 16px; }
.text-muted   { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.font-mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12.5px;
}
