/* ════════════════════════════════════════════════════════════════
   theme.css — Design system "Liquid Glass"
   Referências: iOS 18 / visionOS, Linear, Vercel, Stripe Dashboard.
   Carregado DEPOIS do <style> de cada página (sobrepõe o local).
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg: #06070b;

  /* Vidro */
  --glass: rgba(28, 30, 42, 0.52);
  --glass-soft: rgba(255, 255, 255, 0.05);
  --glass-softer: rgba(255, 255, 255, 0.028);

  /* Aliases usados pelas páginas */
  --surface: var(--glass);
  --surface-2: var(--glass-soft);
  --surface-3: var(--glass-softer);
  --card: var(--glass);
  --panel: var(--glass);
  --panel-2: var(--glass-soft);

  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.062);
  --hairline: rgba(255, 255, 255, 0.05);

  --text: #f2f4f9;
  --muted: rgba(211, 219, 237, 0.55);
  --faint: rgba(211, 219, 237, 0.32);

  /* Paleta system colors (dark mode iOS) — menos neon, mais profunda */
  --accent: #4da2ff;
  --accent-deep: #0a84ff;
  --accent-dim: rgba(77, 162, 255, 0.13);
  --glow: rgba(77, 162, 255, 0.3);
  --accent-2: #a78bfa;

  --success: #43d081;
  --success-dim: rgba(67, 208, 129, 0.12);
  --green: var(--success);
  --warning: #ffcf5c;
  --warning-dim: rgba(255, 207, 92, 0.12);
  --yellow: var(--warning);
  --danger: #ff6b6b;
  --danger-dim: rgba(255, 107, 107, 0.12);
  --red: var(--danger);
  --violet: #b8a6ff;
  --violet-dim: rgba(184, 166, 255, 0.12);

  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;

  /* Curvas: saída suave (padrão Apple). Sem overshoot elástico. */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --blur: 40px;
  --sat: 160%;
}

/* ── Fundo ── */
body {
  background:
    radial-gradient(circle at 12% 6%, rgba(80, 98, 186, 0.15), transparent 32%),
    radial-gradient(circle at 88% 90%, rgba(30, 126, 132, 0.12), transparent 34%),
    radial-gradient(circle at 60% 40%, rgba(140, 105, 210, 0.075), transparent 42%),
    linear-gradient(165deg, #090a11 0%, #06070b 58%, #07080e 100%) !important;
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.012em;
}

/* Grão fino: tira o aspecto "gradiente de template" */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
}

/* ── Superfícies de vidro ── */
.card, .panel, .kpi, .section, .glass, .auth-box, .login-box,
.table-wrap, .summary-card, .counter-card, .stat-card, .filters,
.event-row, .modal-box, .toast {
  background: linear-gradient(150deg, rgba(42, 45, 60, 0.56), rgba(14, 16, 23, 0.48)) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  box-shadow:
    0 28px 68px rgba(0, 0, 0, 0.46),
    0 1px 0 rgba(255, 255, 255, 0.09) inset,
    0 -1px 0 rgba(0, 0, 0, 0.26) inset;
  position: relative;
}

/* Brilho especular no topo */
.card::after, .panel::after, .kpi::after, .section::after,
.auth-box::after, .login-box::after, .summary-card::after, .counter-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.062), transparent 40%);
}

.card, .kpi, .panel {
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
              border-color 0.4s var(--ease);
}
.kpi:hover, .card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.145) !important;
  box-shadow:
    0 38px 84px rgba(0, 0, 0, 0.54),
    0 1px 0 rgba(255, 255, 255, 0.13) inset,
    0 -1px 0 rgba(0, 0, 0, 0.26) inset;
}

/* ── Ícones em pílula de vidro ── */
.header-icon, .topbar-icon, .auth-icon, .ico {
  background: linear-gradient(148deg, rgba(255, 255, 255, 0.155), rgba(255, 255, 255, 0.042)) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

/* SVG icons herdam a cor do texto e alinham com a baseline */
.i { width: 1em; height: 1em; flex: none; stroke-width: 1.9; vertical-align: -0.135em; }

h1, h2, h3 { letter-spacing: -0.033em; font-weight: 680; }

/* ── Segmented control (iOS) ── */
.seg, .tabs, .auth-tabs, .period-bar {
  background: rgba(0, 0, 0, 0.24) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-sm);
  padding: 4px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.seg-btn, .tab, .auth-tab, .period-btn {
  border: 1px solid transparent !important;
  border-radius: var(--radius-xs) !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-weight: 600;
  transition: color 0.3s var(--ease-soft), background 0.4s var(--ease),
              box-shadow 0.4s var(--ease);
}
.seg-btn:hover, .tab:hover, .auth-tab:hover, .period-btn:hover {
  color: var(--text) !important;
}
.seg-btn.active, .tab.active, .auth-tab.active, .period-btn.active {
  background: rgba(255, 255, 255, 0.115) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

/* ── Campos ── */
input[type="text"], input[type="password"], input[type="number"],
input[type="url"], input[type="email"], input:not([type]), textarea, select {
  background: rgba(0, 0, 0, 0.22) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xs) !important;
  color: var(--text) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: border-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft),
              background 0.3s var(--ease-soft);
}
input::placeholder, textarea::placeholder { color: var(--faint) !important; }
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: rgba(77, 162, 255, 0.5) !important;
  background: rgba(0, 0, 0, 0.28) !important;
  box-shadow:
    0 0 0 3.5px rgba(77, 162, 255, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

/* ════════ BOTÕES ════════
   Fill sólido e profundo (system blue), texto branco.
   Sem gradiente neon, sem glow exagerado, sem bounce elástico. */
.btn, .btn-add, .btn-primary, button.primary {
  border-radius: var(--radius-xs);
  font-weight: 600;
  letter-spacing: -0.011em;
  transition: background 0.28s var(--ease-soft), box-shadow 0.28s var(--ease-soft),
              transform 0.14s var(--ease-soft), opacity 0.2s;
}
.btn-primary, .btn-add, button.primary {
  background: var(--accent-deep) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  color: #fff !important;
  box-shadow:
    0 6px 18px rgba(10, 132, 255, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
}
.btn-primary:hover, .btn-add:hover, button.primary:hover {
  background: #2b93ff !important;
  box-shadow:
    0 8px 22px rgba(10, 132, 255, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
/* Feedback de clique: afunda de leve (sem pular) */
.btn-primary:active, .btn-add:active, button.primary:active,
.btn-out:active, .icon-btn:active {
  transform: scale(0.978);
  transition-duration: 0.06s;
}

/* Secundários / contorno */
.btn-out, .btn-secondary, .btn-refresh, .icon-btn, .btn-ghost {
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xs) !important;
  color: var(--muted) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.055) inset;
  transition: background 0.28s var(--ease-soft), color 0.28s var(--ease-soft),
              border-color 0.28s var(--ease-soft), transform 0.14s var(--ease-soft);
}
.btn-out:hover, .btn-secondary:hover, .btn-refresh:hover,
.icon-btn:hover, .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.095) !important;
  color: var(--text) !important;
}
.btn-danger, .icon-btn.del:hover {
  background: var(--danger-dim) !important;
  border-color: rgba(255, 107, 107, 0.36) !important;
  color: var(--danger) !important;
}
button:disabled, .btn:disabled {
  opacity: 0.42 !important;
  transform: none !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* ── Itens de lista ── */
.item, .item-row, .palette-item, .row {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-sm) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.item:hover, .item-row:hover, .palette-item:hover {
  background: rgba(255, 255, 255, 0.072) !important;
  border-color: var(--border) !important;
}

/* ── Tabelas ── */
table { border-collapse: separate; border-spacing: 0; }
th {
  color: var(--faint) !important;
  border-bottom: 1px solid var(--border) !important;
  font-weight: 620;
  letter-spacing: 0.055em;
  background: rgba(255, 255, 255, 0.018);
}
td { border-bottom: 1px solid var(--hairline) !important; }
tbody tr { transition: background 0.25s var(--ease-soft); }
tbody tr:hover { background: rgba(255, 255, 255, 0.026); }
tbody tr:last-child td { border-bottom: none !important; }
.num, .money, td.num, td.money { font-variant-numeric: tabular-nums; }

/* ── Pílulas ── */
.pill, .badge, .src-badge, .tag {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.068) !important;
  border: 1px solid var(--border-soft) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-weight: 620;
}
.pill.warn { background: var(--warning-dim) !important; border-color: rgba(255,207,92,0.3) !important; color: var(--warning) !important; }
.pill.ok { background: var(--success-dim) !important; border-color: rgba(67,208,129,0.3) !important; color: var(--success) !important; }

/* ── Vazios / alertas ── */
.empty, .empty-state {
  background: rgba(255, 255, 255, 0.018) !important;
  border: 1px dashed var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--muted) !important;
}
.alert {
  border-radius: var(--radius-sm) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border) !important;
}
.alert.success, .alert-success { background: var(--success-dim) !important; border-color: rgba(67,208,129,0.32) !important; color: var(--success) !important; }
.alert.error, .alert-error, .alert.danger { background: var(--danger-dim) !important; border-color: rgba(255,107,107,0.32) !important; color: var(--danger) !important; }
.alert.warning { background: var(--warning-dim) !important; border-color: rgba(255,207,92,0.32) !important; color: var(--warning) !important; }

.back-link { color: var(--muted); transition: color 0.28s var(--ease-soft); }
.back-link:hover { color: var(--accent); }

/* ════════ ANIMAÇÕES ════════ */

/* Entrada suave, com atraso escalonado (aplicado via .stagger) */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.965) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.stagger > * {
  animation: fadeUp 0.7s var(--ease) both;
}
.stagger > *:nth-child(1) { animation-delay: 0.02s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.14s; }
.stagger > *:nth-child(5) { animation-delay: 0.18s; }
.stagger > *:nth-child(6) { animation-delay: 0.22s; }
.stagger > *:nth-child(7) { animation-delay: 0.26s; }
.stagger > *:nth-child(8) { animation-delay: 0.3s; }

.anim-in { animation: scaleIn 0.6s var(--ease) both; }

/* Brilho que atravessa o card (sutil, só no hover) */
.kpi { overflow: hidden; }
.kpi::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.07), transparent);
  transform: skewX(-16deg);
  opacity: 0;
}
.kpi:hover::before { animation: sweep 0.95s var(--ease-soft); }
@keyframes sweep {
  from { left: -60%; opacity: 1; }
  to   { left: 130%; opacity: 0; }
}

/* Skeleton de carregamento */
@keyframes shimmer { to { background-position: 200% 0; } }
.skeleton {
  color: transparent !important;
  border-radius: 8px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.11) 37%,
    rgba(255,255,255,0.05) 63%) 0 0 / 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

/* Pulso do "ao vivo" */
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}
.live-dot::before { animation: livePulse 2.2s var(--ease-soft) infinite !important; }

/* Spinner */
@keyframes spinR { to { transform: rotate(360deg); } }
.spin, .spinner { animation: spinR 0.75s linear infinite; }

/* ── Scrollbar ── */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); background-clip: content-box; }

::selection { background: rgba(77, 162, 255, 0.26); color: #fff; }

/* ── Foco ──
   Só no teclado, e com anel suave (não o contorno duro de antes). */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3.5px rgba(77, 162, 255, 0.34) !important;
  border-radius: var(--radius-xs);
}
*:focus:not(:focus-visible) { outline: none !important; box-shadow: none; }
.seg-btn:focus:not(:focus-visible),
.tab:focus:not(:focus-visible),
.period-btn:focus:not(:focus-visible) { box-shadow: none !important; }
/* Mantém o realce do item ativo mesmo com foco de teclado */
.seg-btn.active:focus-visible, .tab.active:focus-visible, .period-btn.active:focus-visible {
  box-shadow:
    0 0 0 3.5px rgba(77, 162, 255, 0.34),
    0 6px 16px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.1) inset !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Fallback sem backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .panel, .kpi, .section, .auth-box, .login-box, .table-wrap,
  .summary-card, .counter-card, .stat-card, .filters, .event-row {
    background: rgba(13, 15, 23, 0.96) !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   Ajustes finos — ícones SVG e reconciliação com CSS local
   ════════════════════════════════════════════════════════════════ */

/* Labels e títulos com ícone: alinhamento óptico */
.kpi .lbl, .panel-title, .guide h3, .item-name, .section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kpi .lbl .i { width: 15px; height: 15px; opacity: 0.9; }
.panel-title .i, .guide h3 .i, .section h3 .i { width: 17px; height: 17px; }
.icon-btn .i { width: 16px; height: 16px; }
.btn .i, .btn-add .i, .btn-out .i { width: 16px; height: 16px; }

/* Ícones herdam a cor de destaque do card */
.kpi.blue .lbl .i { color: var(--accent); }
.kpi.green .lbl .i { color: var(--success); }
.kpi.yellow .lbl .i { color: var(--warning); }
.kpi.violet .lbl .i { color: var(--violet); }

/* O KPI usa ::after (glow de cor) no CSS local; garantimos que ele
   continue existindo e que o brilho especular vá para ::before,
   junto com o sweep do hover. */
.kpi::before {
  display: block !important;
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: skewX(-16deg);
  opacity: 0;
  border-radius: 0;
}
.kpi:hover::before { animation: sweep 1s var(--ease-soft); }
.kpi > * { position: relative; z-index: 2; }

/* Botões com ícone + texto */
.btn, .btn-add, .btn-out, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Números grandes: tabular para não "dançar" durante a contagem */
.kpi .val, .counter-value, .stat-number {
  font-variant-numeric: tabular-nums;
}

/* Linhas da tabela entram suave */
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
tbody tr { animation: rowIn 0.45s var(--ease) both; }
tbody tr:nth-child(1) { animation-delay: 0.01s; }
tbody tr:nth-child(2) { animation-delay: 0.03s; }
tbody tr:nth-child(3) { animation-delay: 0.05s; }
tbody tr:nth-child(4) { animation-delay: 0.07s; }
tbody tr:nth-child(5) { animation-delay: 0.09s; }
tbody tr:nth-child(n+6) { animation-delay: 0.11s; }

/* Itens de lista entram suave */
.item, .item-row { animation: rowIn 0.45s var(--ease) both; }

/* Guia: passos numerados entram em cascata */
.guide li { animation: rowIn 0.5s var(--ease) both; }
.guide li:nth-child(1) { animation-delay: 0.04s; }
.guide li:nth-child(2) { animation-delay: 0.09s; }
.guide li:nth-child(3) { animation-delay: 0.14s; }
.guide li:nth-child(4) { animation-delay: 0.19s; }
.guide li:nth-child(5) { animation-delay: 0.24s; }

/* Toast entra deslizando de baixo com leve escala */
.toast {
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease-soft);
}

/* Painéis entram ao carregar */
.panel, .guide { animation: fadeUp 0.65s var(--ease) both; }
.panel:nth-of-type(1) { animation-delay: 0.04s; }
.panel:nth-of-type(2) { animation-delay: 0.08s; }
.panel:nth-of-type(3) { animation-delay: 0.12s; }

/* Auth box: entrada mais presente */
.auth-box { animation: scaleIn 0.7s var(--ease) both !important; }

/* ════════════════════════════════════════════════════════════════
   Comissão do afiliado — é o número que ele mais olha, então
   ganha destaque (borda e brilho verdes) sem virar spam visual.
   ════════════════════════════════════════════════════════════════ */
.kpi.commission {
  color: var(--success);
  border-color: rgba(67, 208, 129, 0.28) !important;
  background: linear-gradient(150deg, rgba(38, 74, 58, 0.6), rgba(14, 22, 18, 0.5)) !important;
  box-shadow:
    0 28px 68px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(67, 208, 129, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -1px 0 rgba(0, 0, 0, 0.26) inset;
}
.kpi.commission:hover {
  border-color: rgba(67, 208, 129, 0.42) !important;
  box-shadow:
    0 38px 84px rgba(0, 0, 0, 0.54),
    0 0 0 1px rgba(67, 208, 129, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.13) inset,
    0 -1px 0 rgba(0, 0, 0, 0.26) inset;
}
.kpi.commission .val { color: var(--success); }
.kpi.commission .lbl .i { color: var(--success); }

/* Etiqueta do percentual ao lado do rótulo */
.kpi .lbl .rate {
  margin-left: auto;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--success-dim);
  border: 1px solid rgba(67, 208, 129, 0.3);
  color: var(--success);
  letter-spacing: 0;
}

/* Coluna de comissão na tabela */
td.commission-cell { color: var(--success) !important; font-weight: 700; }

/* ════════════════════════════════════════════════════════════════
   Painel do afiliado — layout repaginado, prioridade mobile
   ════════════════════════════════════════════════════════════════ */

/* Alterna conteúdo entre desktop e celular */
.only-narrow { display: none; }
.only-wide { display: block; }

/* ── Destaque da comissão ── */
.spot {
  padding: 26px 28px 24px;
  margin-bottom: 18px;
  border-color: rgba(67, 208, 129, 0.26) !important;
  background: linear-gradient(150deg, rgba(38, 74, 58, 0.58), rgba(14, 22, 18, 0.5)) !important;
}
.spot-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}
.spot-lbl {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.76rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted);
}
.spot-lbl .i { color: var(--success); width: 16px; height: 16px; }
.spot-lbl .rate {
  font-size: 0.66rem; padding: 2px 7px; border-radius: 999px;
  background: var(--success-dim); border: 1px solid rgba(67, 208, 129, 0.3);
  color: var(--success); letter-spacing: 0;
}
.spot-val {
  font-size: 2.8rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #7fe3ad, #43d081 55%, #2eb36a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.spot-sub { margin-top: 12px; font-size: 0.86rem; color: var(--muted); }
.spot-sub b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 650; }

/* Segmented control compacto dentro do card */
.seg-mini { padding: 3px; }
.seg-mini .seg-btn { padding: 7px 13px; font-size: 0.78rem; }

/* ── Navegação por abas ── */
.tabs-nav {
  display: flex; gap: 6px; padding: 5px; margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.tnav {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 10px; border: 1px solid transparent; border-radius: var(--radius-xs);
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: color 0.28s var(--ease-soft), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tnav .i { width: 16px; height: 16px; }
.tnav:hover { color: var(--text); }
.tnav.active {
  background: rgba(255, 255, 255, 0.115);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.view { animation: fadeUp 0.5s var(--ease) both; }

/* ── Cards do histórico (mobile) ── */
.dcard {
  padding: 15px 16px; margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.dcard-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
  padding-bottom: 11px; border-bottom: 1px solid var(--hairline);
}
.dcard-date { font-size: 0.88rem; font-weight: 700; letter-spacing: -0.015em; }
.dcard-com {
  font-size: 0.95rem; font-weight: 800; color: var(--success);
  font-variant-numeric: tabular-nums;
}
.dcard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dcell { text-align: center; }
.dcell .k {
  font-size: 0.63rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); margin-bottom: 4px;
}
.dcell .v { font-size: 0.95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dcard-rev {
  margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--hairline);
  font-size: 0.8rem; color: var(--muted); display: flex; justify-content: space-between;
}
.dcard-rev b { color: var(--text); font-variant-numeric: tabular-nums; }

.foot-links { display: flex; justify-content: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 0.88rem; }

/* ══════════ MOBILE ══════════ */
@media (max-width: 760px) {
  .only-narrow { display: block; }
  .only-wide { display: none; }

  .dash { padding: 16px 13px 44px; }

  /* Topo compacto e fixo no rolar */
  .topbar {
    margin-bottom: 18px; gap: 10px;
    position: sticky; top: 0; z-index: 20;
    padding: 10px 0;
    background: linear-gradient(180deg, rgba(6,7,11,0.96), rgba(6,7,11,0.72) 70%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .topbar-icon { width: 40px; height: 40px; border-radius: 13px; }
  .topbar-icon svg { width: 19px; height: 19px; }
  .topbar h1 { font-size: 1.06rem; }
  .topbar .greet { font-size: 0.78rem; }
  .btn-out { padding: 9px 14px; font-size: 0.78rem; }

  /* Comissão: número grande, ocupa a largura */
  .spot { padding: 20px 18px; border-radius: var(--radius-sm); }
  .spot-top { margin-bottom: 12px; }
  .spot-val { font-size: 2.35rem; }
  .spot-sub { font-size: 0.81rem; }
  .seg-mini { width: 100%; }
  .seg-mini .seg-btn { flex: 1; padding: 8px 6px; font-size: 0.76rem; }

  /* Métricas em 2 colunas, mais compactas */
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
  .kpi { padding: 15px 14px; min-height: 0 !important; border-radius: var(--radius-sm); }
  .kpi .lbl { font-size: 0.65rem; margin-bottom: 7px; letter-spacing: 0.05em; }
  .kpi .lbl .i { width: 13px; height: 13px; }
  .kpi .val { font-size: 1.32rem !important; }
  /* A 5ª métrica ocupa a linha inteira para não sobrar espaço vazio */
  .kpis > .kpi:nth-child(5) { grid-column: 1 / -1; }

  /* Abas: só ícone + rótulo curto */
  .tabs-nav { gap: 4px; padding: 4px; }
  .tnav { padding: 10px 6px; font-size: 0.78rem; gap: 6px; }

  .panel { padding: 17px 15px; border-radius: var(--radius-sm); }
  .panel-head { margin-bottom: 14px; }
  .panel-title { font-size: 0.88rem; }

  /* Formulários empilhados e com alvo de toque maior */
  .add-row { flex-direction: column; gap: 9px; }
  .add-row input { width: 100%; min-width: 0; padding: 14px 15px; font-size: 0.95rem; }
  .btn-add { width: 100%; padding: 14px; font-size: 0.9rem; }

  /* Itens de lista: texto acima, ações abaixo */
  .item { flex-wrap: wrap; padding: 13px 14px; gap: 10px; }
  .item-main { flex: 1 1 100%; }
  .item-sub { font-size: 0.74rem; word-break: break-all; }
  .item-actions { flex: 1 1 100%; justify-content: flex-end; }
  .icon-btn { width: 40px; height: 40px; }

  .guide { padding: 19px 17px; border-radius: var(--radius-sm); }
  .guide h3 { font-size: 0.93rem; margin-bottom: 13px; }
  .guide li { font-size: 0.85rem; padding-left: 34px; margin-bottom: 11px; }

  .auth-box { padding: 30px 22px; border-radius: 24px; }
}

@media (max-width: 380px) {
  .spot-val { font-size: 2rem; }
  .kpi .val { font-size: 1.18rem !important; }
  .dcard-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tnav span { display: none; }  /* só ícones em telas muito estreitas */
  .tnav { padding: 12px 6px; }
}
