/*
 * As fontes vêm de /css/fonts.css, carregado por um <link> próprio em cada HTML
 * (não por @import daqui): o @import só é descoberto depois de baixar e parsear
 * este arquivo — uma cascata de requests — e ficaria de fora do ?v= do build.
 *
 * MovePass — design system "Kinetic Obsidian" (dark, mobile-first). Coluna única,
 * áreas de toque >=48px, glassmorphism, gradientes de marca e brilho (glow) no lugar
 * de sombras pesadas. Tudo dirigido por tokens em :root para evoluir o visual sem
 * refatorar o markup. Compartilhado por todas as páginas (index/admin/parceiro/
 * membro/…): as classes legadas herdam o tema automaticamente.
 *
 * Paleta e tipografia derivadas de Docs/Desing/DESIGN.md:
 *  - Plus Jakarta Sans (display/headline) · Inter (corpo) · JetBrains Mono (labels)
 *  - Obsidian Deep (#090A0C) como nível 0; verde elétrico (#2AF598) como ação.
 */
:root {
  /* Superfícies (elevação tonal: 0=deep, 1=surface, 2=elevated) */
  --bg: #090A0C;            /* obsidian-deep — fundo da página (nível 0) */
  --bg-2: #111317;          /* surface-dim — trilhos/skeletons */
  --card: #161B22;          /* obsidian-surface — cartões (nível 1) */
  --elevated: #21262D;      /* obsidian-elevated — modais/popovers (nível 2) */
  --fg: #e2e2e8;            /* on-surface */
  --muted: #bacbbc;         /* on-surface-variant */
  --muted-2: #849587;       /* outline */

  /* Marca / ações */
  --primary: #2AF598;       /* electric-green */
  --primary-600: #00e38a;
  --primary-700: #57ffa6;   /* verde claro p/ texto sobre superfícies escuras */
  --primary-050: rgba(42, 245, 152, 0.10); /* fundo de pill/estado de sucesso */
  --primary-fg: #002110;    /* on-primary — texto sobre o verde */
  --accent: #47d6ff;        /* tertiary — segundo tom do gradiente */
  --secondary: #ddb7ff;     /* premium (roxo) — texto */
  --secondary-bg: rgba(142, 45, 226, 0.16);

  /* Funcionais (calibrados p/ fundo escuro) */
  --danger: #ff5b52;
  --danger-bg: rgba(255, 59, 48, 0.12);
  --danger-fg: #2b0708;
  --warn: #ffce7a;
  --warn-bg: rgba(255, 180, 60, 0.12);
  --ok: var(--primary);
  --ok-bg: var(--primary-050);
  --info: var(--accent);
  --info-bg: rgba(71, 214, 255, 0.10);
  --border: rgba(255, 255, 255, 0.08);      /* glass-border */
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Gradientes e brilho */
  --grad-primary: linear-gradient(90deg, #2AF598 0%, #47d6ff 100%);
  --glow: 0 0 20px rgba(42, 245, 152, 0.35);
  --glow-strong: 0 0 28px rgba(42, 245, 152, 0.5);

  /* Forma */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Profundidade: borda de luz interna (nível 1) + drop escuro para flutuantes */
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-md: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* Espaçamento (escala 4px) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;

  --touch: 48px;
  --maxw: 560px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Tipografia */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Camada "parece app" no celular:
 *  - color-scheme: autofill, select, barras de rolagem e date pickers nativos no tema escuro;
 *  - sem o flash cinza/azul que o navegador pinta em todo toque (cada controle tem :active).
 * Sem overscroll-behavior no html de propósito: o pull-to-refresh nativo é a única
 * forma de recarregar a página. */
html { color-scheme: dark; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-body);
  background: var(--bg); color: var(--fg);
  font-size: 16px; line-height: 1.5;
  -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
}
/* Controles: toque dispara na hora (sem esperar o double-tap-zoom) e o long-press
 * não seleciona o rótulo nem abre o menu de copiar. Só controles — texto de
 * conteúdo continua selecionável. */
button, [role="button"], [role="tab"], .chip, summary {
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
/* Títulos equilibram as linhas; parágrafos evitam viúva na última linha. */
h1, h2, h3, .modal-title, .alert-title, .empty p strong { text-wrap: balance; }
p, .muted, .dc-meta, .hero-caption, .alert-msg { text-wrap: pretty; }
/* Números que mudam ou se comparam em coluna não "dançam". */
.stat, .metric, .dc-amount, .dc-when, .credit-pill, .plan-price, .kpi-value, #qr-hint,
.calc-v, .balance-bar { font-variant-numeric: tabular-nums; }
/* Só para leitor de tela (títulos de seção que o visual já comunica). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.app { max-width: var(--maxw); margin: 0 auto; padding: var(--sp-4); padding-bottom: 96px; }
/* O título focado ao trocar de aba não precisa de anel (foco programático). */
.tab [tabindex="-1"]:focus { outline: none; }

/* ---- Header ---- */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(9, 10, 12, 0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--fg);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--sp-4) 12px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
header.top .brand { display: flex; flex-direction: column; min-width: 0; }
header.top .title { font-family: var(--font-display); font-weight: 800; font-size: 20px;
  letter-spacing: -.02em; background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
header.top .sub { font-weight: 400; font-size: 12.5px; color: var(--muted-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
/* Logotipo no header do app (o .brand-logo das telas de acesso é bem maior). */
header.top .brand-logo { height: 22px; margin-bottom: 2px; align-self: flex-start; }

/* Badge de créditos: pílula clicável (verde-tint) em destaque no header. */
.credit-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--primary-050); color: var(--primary);
  border: 1px solid rgba(42, 245, 152, 0.30);
  border-radius: var(--radius-pill);
  padding: 8px 14px; min-height: 40px; cursor: pointer;
  width: auto; margin: 0; font-weight: 700;
  transition: transform .12s var(--ease), box-shadow .12s;
}
@media (hover: hover) and (pointer: fine) { .credit-badge:hover { box-shadow: var(--glow); } }
.credit-badge:active { transform: scale(0.96); }
.credit-badge .cb-icon { display: inline-flex; }
.credit-badge .cb-num { font-family: var(--font-display); font-size: 19px; line-height: 1; }
.credit-badge .cb-label { font-size: 11px; font-weight: 600; color: var(--muted); }

/* Botão de ícone no header (ex.: atalho ao histórico de check-ins). */
.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0; margin: 0; flex: 0 0 auto;
  background: var(--primary-050); color: var(--primary);
  border: 1px solid rgba(42, 245, 152, 0.30);
  border-radius: var(--radius-pill); cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .12s;
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { box-shadow: var(--glow); } }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .material-symbols-outlined { font-size: 22px; }
/* Alvo de toque efetivo de 48px sem aumentar o círculo visível. */
.icon-btn::after { content: ""; position: absolute; inset: -3px; }

h1 { font-family: var(--font-display); font-weight: 800; font-size: 28px;
  margin: 12px 0 4px; letter-spacing: -.02em; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 20px;
  margin: 0 0 var(--sp-3); letter-spacing: -.02em; }
h3 { font-family: var(--font-display); font-weight: 700; font-size: 15px;
  margin: var(--sp-3) 0 var(--sp-2); color: var(--fg); }
p { margin: var(--sp-2) 0; }
a { color: var(--primary); }
.section-title { font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2);
  margin: var(--sp-5) 0 var(--sp-2); }

/* ---- Cards ---- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-4); margin: var(--sp-3) 0; box-shadow: var(--shadow-sm); }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

/* ---- Inputs ---- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted);
  margin: var(--sp-3) 0 var(--sp-1); }
input, select, textarea {
  width: 100%; font-size: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--card); color: var(--fg);
  min-height: var(--touch);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(42, 245, 152, 0.2); background: var(--elevated);
}
/* Select nativo: seta clara sobre superfície escura. */
select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23849587' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
textarea { min-height: 88px; }

/* ---- Botões ---- */
button {
  width: 100%; font-size: 16px; padding: 12px 16px; border-radius: var(--radius-pill);
  border: none; background: var(--grad-primary); color: var(--primary-fg);
  font-family: var(--font-display); font-weight: 700;
  min-height: var(--touch); margin-top: var(--sp-3); cursor: pointer;
  transition: transform .1s var(--ease), box-shadow .2s, filter .12s, opacity .12s;
}
/* Hover discreto: o brilho (glow) fica reservado ao FAB de check-in e aos destaques
   — em todo botão ele competia com a ação principal da tela. */
@media (hover: hover) and (pointer: fine) { button:hover { filter: brightness(1.08); } }
button.secondary { background: var(--card); color: var(--primary);
  border: 1px solid var(--border); }
@media (hover: hover) and (pointer: fine) { button.secondary:hover { box-shadow: none; border-color: rgba(42, 245, 152, 0.4); } }
button.danger { background: var(--danger); color: var(--danger-fg); }
@media (hover: hover) and (pointer: fine) { button.danger:hover { box-shadow: 0 0 20px rgba(255, 91, 82, 0.35); } }
button.ghost { background: transparent; color: var(--primary); min-height: auto;
  width: auto; padding: 8px; margin: 0; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { button.ghost:hover { box-shadow: none; text-decoration: underline; } }
/* Ação destrutiva de baixa ênfase (.ghost vem depois de .danger na cascata). */
button.ghost.danger { background: transparent; color: var(--danger); }
@media (hover: hover) and (pointer: fine) { button.ghost.danger:hover { box-shadow: none; } }
button:active { transform: scale(0.98); opacity: .95; }
button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* ---- Mensagens / flash ---- */
.msg { padding: 11px 14px; border-radius: var(--radius-sm); margin: var(--sp-3) 0;
  font-size: 15px; box-shadow: var(--shadow-sm); animation: fade-in .2s var(--ease); }
.msg.err { background: var(--danger-bg); color: var(--danger); }
.msg.ok  { background: var(--ok-bg); color: var(--ok); }
.msg.info{ background: var(--info-bg); color: var(--muted); }

/* ---- Rows / listas ---- */
.row { display: flex; gap: var(--sp-2); }
.row > * { flex: 1; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.row-between:last-child { border-bottom: 0; }
.row-between button { flex: 0 0 auto; width: auto; margin-top: 0; }
/* Linha "sem moldura": cabeçalho de seção (título + ação), não item de lista. */
.row-between.flush { padding: 0; border-bottom: 0; }
.row-between.align-start { align-items: flex-start; }
.row-between .section-title { margin: 0; }
/* Gêmeo vertical do .row: empilha com gap real (dispensa <div class="spacer">). */
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.stack > button, .row > button { margin-top: 0; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.strong { font-weight: 700; }

/* ---- Pills / badges ---- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 600;
  background: var(--info-bg); color: var(--muted); }
.pill.ok   { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.err  { background: var(--danger-bg); color: var(--danger); }

/* Selo do plano no hero. Ancorado no ID porque renderHomeAlerts reescreve o
   className inteiro (`'pill ' + kind`) e apagaria qualquer classe extra do HTML.
   O pulso é em box-shadow, não opacity: prefers-reduced-motion o desliga sem
   deixar o ponto invisível. */
#hero-plano { padding: 6px 12px; font-size: 12.5px; }
#hero-plano::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: 0 0 auto; }
#hero-plano.ok::before { animation: dot-pulse 2.4s var(--ease) infinite; }
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 245, 152, 0.55); }
  50%      { box-shadow: 0 0 0 5px rgba(42, 245, 152, 0); }
}

/* Badge de custo em créditos (destaque forte p/ comparar aulas). */
.credit-pill { display: inline-flex; align-items: center; gap: 5px;
  background: var(--primary-050); color: var(--primary-700);
  border-radius: var(--radius-pill); padding: 5px 12px; font-weight: 800; font-size: 14px; }
.credit-pill.insufficient { background: var(--danger-bg); color: var(--danger); }
.price-old { text-decoration: line-through; color: var(--muted-2); font-weight: 600;
  font-size: 13px; margin-right: 6px; }
/* Selo de promoção/desconto (A08). */
.promo-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
  background: var(--secondary-bg); color: var(--secondary); border-radius: var(--radius-pill);
  padding: 3px 10px; font-size: 12px; font-weight: 800; }

/* ---- Avatar (sem foto: gradiente + iniciais) ---- */
.avatar { width: 52px; height: 52px; border-radius: var(--radius); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-weight: 800; font-size: 20px; box-shadow: var(--shadow-sm); }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; border-radius: var(--radius-lg); }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; border-radius: var(--radius-sm); }

/* Bloco de seção da home: 32px entre seções maiores (regra do DESIGN.md). */
.home-section { margin-top: var(--sp-8); }

/* ---- Carrossel horizontal (scroll-snap, sem lib) ---- */
.carousel { display: flex; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; padding: var(--sp-1) var(--sp-1) var(--sp-3);
  margin: 0 calc(-1 * var(--sp-1)); scrollbar-width: none;
  /* Chegar ao fim do carrossel não vira "voltar" do navegador (swipe lateral). */
  overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; flex: 0 0 auto; }

/* ---- Skeleton de carregamento ---- */
.skeleton { position: relative; overflow: hidden; background: var(--bg-2);
  border-radius: var(--radius-sm); }
.skeleton::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-100%); animation: shimmer 1.3s infinite; }
.skel-line { height: 12px; margin: 8px 0; }

/* ---- Estado vazio ---- */
.empty { text-align: center; color: var(--muted); padding: var(--sp-6) var(--sp-4); }
.empty .empty-icon { font-size: 34px; margin-bottom: var(--sp-3); opacity: .7; }
/* Ícone de fonte no estado vazio acompanha o tamanho do emoji equivalente. */
.empty .empty-icon .material-symbols-outlined { font-size: 40px; }
/* Ícone SVG: um traço fino sozinho fica apagado no meio do vazio — ganha um
   disco tonal para ter o mesmo peso visual que o emoji tinha. */
.empty .empty-icon:has(.ico) { display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; margin: 0 auto var(--sp-3); border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--border); opacity: 1; }
.empty .empty-icon .ico { width: 28px; height: 28px; color: var(--muted-2); }
.empty p { margin: 4px 0; }

/* ---- Card de academia (carrossel da home) ---- */
.ct-card { width: 80vw; max-width: 300px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-4); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: var(--sp-2); }
/* Variante "wide": card ocupa a linha toda (lista da aba Buscar). */
.ct-card.wide { width: 100%; max-width: none; margin-bottom: var(--sp-3); }
.ct-head { display: flex; align-items: center; gap: var(--sp-3); }
.ct-id { flex: 1 1 auto; min-width: 0; }
.ct-name { font-family: var(--font-display); font-weight: 700; font-size: 16px;
  line-height: 1.25; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-dist { display: flex; align-items: center; gap: 3px; margin-top: 2px;
  font-size: 13px; color: var(--muted-2); }
.ct-dist .material-symbols-outlined { font-size: 15px; }
.ct-addr { font-size: 13px; min-height: 18px; }
.ct-mods { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
/* Modalidades à esquerda, custo por check-in à direita. */
.ct-foot { display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2); min-height: 26px; }
.ct-foot .ct-mods { min-height: 0; flex: 1 1 auto; }
.ct-foot .credit-pill { flex: 0 0 auto; }
/* Carrossel: modalidades e custo sempre numa linha só. */
.ct-card:not(.wide) .ct-foot .ct-mods { flex-wrap: nowrap; overflow: hidden; }
.ct-card button { margin-top: auto; }
.ct-card:active { transform: scale(0.99); }

/* ---- Modal de aulas da academia ----
   Os cards usam o dialeto comum (.data-card.stack); aqui só o que é próprio
   deste modal. O antigo .class-card/.cc-* saiu junto com a unificação. */

/* Barra de saldo no topo: é o dado que decide se dá para treinar. */
.balance-bar { display: flex; align-items: center; justify-content: space-between;
  background: var(--primary-050); color: var(--primary-700); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: var(--sp-4); font-weight: 700; }
.balance-bar svg { vertical-align: -2px; }
/* Saldo não cobre nenhuma aula aberta: a barra deixa de ser "tudo certo". */
.balance-bar.low { background: var(--warn-bg); color: var(--warn); }

/* Aula sem reserva: quando o check-in abre. */
.aula-abre { margin: var(--sp-2) 0 0; font-size: 13px; color: var(--warn); font-weight: 600; }

/* O modal rola inteiro; os painéis não precisam de rolagem própria. */
.modal .seg-panel > .section-title:first-child { margin-top: 0; }
.modal .data-card.stack .dc-actions button { min-height: 46px; font-size: 15px; }

/* ---- Card de plano (carrossel de assinatura/upsell) ---- */
.plan-card { width: 78vw; max-width: 280px; background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-4); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: var(--sp-1); position: relative; }
.plan-card.reco { border-color: var(--primary); box-shadow: var(--shadow-md); }
.plan-card .reco-tag { position: absolute; top: -10px; left: var(--sp-4);
  background: var(--grad-primary); color: var(--primary-fg); font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: var(--radius-pill); box-shadow: var(--glow); }
.plan-card .plan-name { font-weight: 800; font-size: 17px; }
.plan-card .plan-price { font-size: 24px; font-weight: 800; color: var(--primary-700); letter-spacing: -.5px; }
.plan-card .plan-price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.plan-card .plan-credits { font-size: 14px; color: var(--fg); font-weight: 600; }
.plan-card .plan-desc { font-size: 13px; color: var(--muted); }

/* ---- Alerta (upsell de saldo baixo) ---- */
.alert { border-radius: var(--radius); padding: var(--sp-4); margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm); }
.alert.warn { background: var(--warn-bg); border: 1px solid rgba(255, 180, 60, 0.3); }
.alert.ok { background: var(--ok-bg); border: 1px solid rgba(42, 245, 152, 0.3); }
.alert.info { background: var(--info-bg); border: 1px solid rgba(71, 214, 255, 0.3); }
.alert .alert-title { font-family: var(--font-display); font-weight: 800; font-size: 16px;
  color: var(--warn); display: flex; align-items: center; gap: 8px; }
.alert.ok .alert-title { color: var(--primary-700); }
.alert.info .alert-title { color: var(--info); }
.alert.err { background: var(--danger-bg); border: 1px solid rgba(255, 92, 92, 0.35); }
.alert.err .alert-title { color: var(--danger); }
.alert .alert-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.alert .alert-actions button { flex: 1 1 auto; }

/* Erro por campo do formModal (ligado ao input via aria-describedby). */
.fm-ferr { color: var(--danger); font-size: 13px; margin-top: 4px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger); }
button[aria-busy="true"] { cursor: progress; }

/* Spinner discreto de "confirmando pagamento" dentro de um alerta. */
.pay-spinner { width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: pay-spin .8s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-spinner { animation-duration: 2.4s; } }
.alert .alert-msg { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

/* ---- Seleção de plano (passo 1 da troca) ---- */
button.plan-pick { display: block; width: 100%; text-align: left; margin-top: 0;
  background: var(--card); color: var(--fg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-4);
  font-family: var(--font-body); font-weight: 400; }
@media (hover: hover) and (pointer: fine) { button.plan-pick:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); } }
button.plan-pick .strong { font-family: var(--font-display); font-size: 16px; }
button.plan-pick .muted { margin-top: 4px; }

/* ---- Demonstrativo de troca de plano (upgrade/downgrade) ---- */
.calc-section { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em;
  font-size: 11px; font-weight: 700; color: var(--muted-2); margin: var(--sp-5) 0 var(--sp-2); }
.calc-section:first-of-type { margin-top: var(--sp-4); }
.calc-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--card); }
.calc-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  padding: 10px var(--sp-4); border-bottom: 1px solid var(--border); font-size: 14px; }
.calc-row:last-child { border-bottom: 0; }
.calc-row .calc-k { color: var(--muted); min-width: 0; }
.calc-row .calc-v { font-weight: 700; color: var(--fg); white-space: nowrap; text-align: right;
  font-variant-numeric: tabular-nums; }
.calc-row .calc-v.credit { color: var(--primary-700); }
.calc-row .calc-v.mute { color: var(--muted-2); font-weight: 600; }
.calc-row.op .calc-k::before { content: attr(data-op); display: inline-block; width: 1.1em;
  margin-left: -1.1em; color: var(--muted-2); font-weight: 700; }
.calc-row.total { background: var(--bg-2); }
.calc-row.total .calc-k { color: var(--fg); font-weight: 700; }
.calc-row.total .calc-v { font-size: 16px; }
.calc-row.total .calc-v.hot { color: var(--primary-700); }
.calc-highlight { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  margin: var(--sp-4) 0 0; padding: var(--sp-4); border-radius: var(--radius-lg);
  background: var(--primary-050); border: 1px solid rgba(42, 245, 152, 0.35);
  box-shadow: var(--glow); }
.calc-highlight .ch-label { font-size: 13px; color: var(--muted); }
.calc-highlight .ch-value { font-family: var(--font-display); font-weight: 800; letter-spacing: -.4px;
  font-size: 28px; color: var(--primary-700); font-variant-numeric: tabular-nums; }
.calc-highlight .ch-value small { font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---- Banner de localização ----
   É um pedido de permissão, não um erro de sistema: fica discreto (borda tonal,
   texto curto, ação secundária). A rede continua listada sem GPS — ele só ordena
   por distância e libera o Fluxo 2 de check-in. */
.geo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3); border-radius: var(--radius); margin: var(--sp-3) 0;
  font-size: 13.5px; line-height: 1.4; }
.geo-banner.warn { background: var(--warn-bg); color: var(--warn);
  border: 1px solid rgba(255, 180, 60, 0.28); }
.geo-banner.err  { background: var(--danger-bg); color: var(--danger);
  border: 1px solid rgba(255, 91, 82, 0.28); }
/* Ainda não pedida: pedido neutro, não alerta. */
.geo-banner.info { background: var(--card); color: var(--muted);
  border: 1px solid var(--border); }
.geo-banner.info > .material-symbols-outlined { color: var(--primary); }
.geo-banner.info .geo-btn { color: var(--primary); border-color: rgba(42, 245, 152, 0.4); }
.geo-banner > .material-symbols-outlined { font-size: 20px; flex: 0 0 auto; }
.geo-banner span { flex: 1 1 160px; }
.geo-banner .geo-btn { width: auto; margin: 0; min-height: 36px; padding: 6px 14px;
  font-size: 13px; flex: 0 0 auto; color: currentColor;
  background: transparent; border: 1px solid currentColor; }
@media (hover: hover) and (pointer: fine) { .geo-banner .geo-btn:hover { box-shadow: none; background: rgba(255, 255, 255, 0.06); } }

.codebox { font-family: ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all;
  background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: var(--radius-sm);
  font-size: 15px; text-align: center; }

/* ---- QR ---- */
.qr-img { width: 100%; max-width: 280px; margin: 0 auto; aspect-ratio: 1 / 1;
  background: #fff; padding: 10px; border-radius: var(--radius); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
#qr-box.expired .qr-img { background: var(--bg-2); }
#qr-box.expired .qr-img svg { opacity: .25; transition: opacity .4s; }
.qr-img svg { display: block; width: 100%; height: 100%; }
#btn-print-qr { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); }
/* Código público do CT: 6 chars, feitos para serem lidos de longe e ditados. */
.code-block { margin-top: var(--sp-4); text-align: center; }
.code-block .mono-label { display: block; margin-bottom: var(--sp-2); }
.codebox.code-hero { font-family: var(--font-display); font-weight: 800; font-size: 30px;
  letter-spacing: .22em; text-indent: .22em; word-break: normal; background: var(--bg-2);
  color: var(--primary); border: 1px solid var(--border); }
.qr-fallback { margin-top: 12px; }
.qr-fallback summary { cursor: pointer; list-style: none; }
.qr-fallback[open] summary { margin-bottom: 8px; }
.cam-video { width: 100%; max-width: 360px; margin: 12px auto 0; display: block;
  border-radius: var(--radius); background: #000; aspect-ratio: 1 / 1; object-fit: cover; }

/* Scanner em tela cheia. */
#cam-wrap { position: fixed; inset: 0; z-index: 100; background: #000; }
#cam-wrap .cam-video { position: absolute; inset: 0; width: 100%; height: 100%;
  max-width: none; margin: 0; border-radius: 0; aspect-ratio: auto; object-fit: cover; }
/* Mira em cantos (não moldura fechada): deixa o QR mais visível e é o padrão
   que as pessoas já conhecem de leitores de câmera. */
.cam-reticle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70vw; max-width: 300px; aspect-ratio: 1 / 1;
  border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55); }
.cam-reticle::before, .cam-reticle::after { content: ""; position: absolute;
  width: 44px; height: 44px; border: 3px solid var(--primary); pointer-events: none; }
.cam-reticle::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0;
  border-radius: 16px 0 0 0; }
.cam-reticle::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0;
  border-radius: 0 0 16px 0; }
/* Legível sobre qualquer imagem da câmera. */
.cam-hint { position: absolute; left: 50%; transform: translateX(-50%);
  width: min(420px, calc(100% - 32px)); margin: 0;
  top: calc(env(safe-area-inset-top, 0px) + 20px); text-align: center;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: rgba(9, 10, 12, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: #fff; font-size: 14px; font-weight: 600; }
/* Linha de varredura: sinaliza que o leitor está aguardando o QR. */
.cam-scanline { position: absolute; left: 8px; right: 8px; top: 8px; height: 3px;
  border-radius: 3px; background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 14px 2px var(--primary); animation: cam-scan 2.4s ease-in-out infinite; }
@keyframes cam-scan { 0% { top: 8px; } 50% { top: calc(100% - 11px); } 100% { top: 8px; } }
.cam-actions { position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); margin: 0;
  display: flex; flex-direction: column; gap: 10px; width: min(280px, 78vw); }
.cam-actions button { margin: 0; width: 100%; }
/* Identificação do membro no modal "Meu QR Code". */
.qr-member { display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 12px; }
.qr-member .avatar { width: 40px; height: 40px; font-size: 15px; }

/* ---- Tabbar ---- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  background: rgba(22, 27, 34, 0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex; justify-content: space-around; max-width: var(--maxw); margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar button { background: transparent; color: var(--muted-2); border: none; border-radius: 0;
  margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  padding: 10px 4px 6px; min-height: 58px; font-weight: 600; box-shadow: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: color .2s; }
@media (hover: hover) and (pointer: fine) { .tabbar button:hover { box-shadow: none; color: var(--primary-700); } }
.tabbar button .tab-ico { display: inline-flex; }
.tabbar button.active { color: var(--primary); }
/* Feedback no toque (não no soltar): o ícone afunda um pouco, a barra não se mexe. */
.tabbar button:active { transform: none; opacity: 1; color: var(--fg); }
.tabbar button .tab-ico { transition: transform .1s var(--ease); }
.tabbar button:not(.tab-cta):active .tab-ico { transform: scale(0.9); }
/* Slot central de destaque (Check-in): botão circular com gradiente e brilho. */
.tabbar button.tab-cta { color: var(--primary-fg); gap: 2px; }
.tabbar button.tab-cta .tab-ico { width: 52px; height: 52px; margin-top: -26px;
  border-radius: 50%; background: var(--grad-primary); color: var(--primary-fg);
  align-items: center; justify-content: center; border: 4px solid var(--bg);
  box-shadow: var(--glow); transition: transform .12s var(--ease); }
.tabbar button.tab-cta .tab-label { color: var(--muted); }
.tabbar button.tab-cta:active .tab-ico { transform: scale(0.94); }

/* ---- Modal (bottom-sheet no mobile) ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(8, 12, 20, 0.55);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
  animation: fade-in .2s var(--ease); }
.modal-overlay.closing { animation: fade-out .2s var(--ease) forwards; }
.modal { background: var(--elevated); border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: var(--maxw); padding: var(--sp-5);
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  /* dvh: o vh do celular conta a barra do navegador recolhida e o fim do sheet
     ficava escondido. contain: rolar até o fim do sheet não arrasta a página. */
  max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: var(--shadow-lg);
  animation: sheet-up .28s var(--ease); }
/* Sheet sendo arrastado pelo grabber: segue o dedo sem transição. */
.modal.dragging { animation: none; transition: none; }
.modal.settling { transition: transform .2s var(--ease); }
/* Fechado arrastando: termina de onde o dedo largou, sem a animação de saída. */
.modal-overlay.closing .modal.dragged { animation: none; }
.modal-overlay.closing .modal { animation: sheet-down .2s var(--ease) forwards; }
/* "Grabber" no topo do sheet. Pseudo-elemento por padrão (modais do ui.js); quando
   o JS injeta um .sheet-grabber real, ele vira a alça de arrastar para fechar e o
   pseudo some. touch-action: none só na alça — o resto do sheet rola normalmente. */
.modal::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 999px;
  background: var(--border-strong); margin: -6px auto var(--sp-4); }
.modal:has(> .sheet-grabber)::before { display: none; }
.sheet-grabber { display: flex; justify-content: center; align-items: center;
  height: 32px; margin: -18px calc(-1 * var(--sp-5)) var(--sp-2); cursor: grab; touch-action: none; }
.sheet-grabber::before { content: ""; width: 40px; height: 4px; border-radius: 999px;
  background: var(--border-strong); }
.modal-title { margin: 0 0 var(--sp-3); font-size: 19px; letter-spacing: -.2px; }
.modal-body { margin-bottom: var(--sp-5); }
.modal-body p { margin: 2px 0; }
.modal-actions { display: flex; gap: var(--sp-3); }
.modal-actions button { flex: 1; margin: 0; }
/* Tablet/desktop: volta a diálogo centralizado. */
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: var(--sp-6); }
  .modal { border-radius: var(--radius-xl); max-width: 420px; animation: pop-in .24s var(--ease); }
  .modal::before, .sheet-grabber { display: none; }
}

/* ---- Toast / Snackbar global ---- */
/* Host fixo sobre o conteúdo (não desloca o layout). Mobile: topo-centro;
   desktop: topo-direita. z-index acima de modais (200) e header (10). */
.toast-host { position: fixed; z-index: 300; pointer-events: none;
  top: calc(env(safe-area-inset-top, 0px) + 12px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 440px; padding: 0 12px; }
@media (min-width: 600px) { .toast-host { left: auto; right: 16px; transform: none; max-width: 380px; padding: 0; } }

.toast { pointer-events: auto; position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--elevated); color: var(--fg); border-radius: 14px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); border-left: 4px solid var(--toast-c, var(--muted));
  padding: 13px 12px 13px 14px; }
.toast-ico { flex: 0 0 auto; display: inline-flex; margin-top: 1px; color: var(--toast-c, var(--muted)); }
.toast-content { flex: 1 1 auto; min-width: 0; }
.toast-msg { font-size: 14.5px; line-height: 1.35; word-break: break-word; font-weight: 500; }
.toast-close { flex: 0 0 auto; width: 30px; height: 30px; min-height: 0; margin: -3px -2px 0 0; padding: 0;
  background: transparent; color: var(--muted-2); border: none; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) and (pointer: fine) { .toast-close:hover { background: var(--bg-2); color: var(--fg); } }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  transform-origin: left; opacity: .45; background: var(--toast-c, var(--muted)); }
.toast.toast-paused .toast-bar { animation-play-state: paused; }

.toast-success { --toast-c: var(--primary); }
.toast-error   { --toast-c: var(--danger); }
.toast-warning { --toast-c: var(--warn); }
.toast-info    { --toast-c: var(--accent); }
.toast-loading { --toast-c: var(--primary); }

.toast-spinner { display: inline-block; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--bg-2); border-top-color: var(--toast-c, var(--primary));
  animation: toast-spin .7s linear infinite; }

.toast-in { animation: toast-in .28s var(--ease); }
.toast-out { animation: toast-out .2s var(--ease) forwards; }

/* ---- Utilitários ---- */
.hidden { display: none !important; }
.spacer { height: var(--sp-2); }
.metric { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.rise-in { animation: rise-in .3s var(--ease); }

/* Rótulo técnico monoespaçado (JetBrains, caps). */
.mono-label { font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
/* Número-herói (saldo, KPI principal). */
.stat { font-family: var(--font-display); font-weight: 800; font-size: 40px;
  line-height: 1; letter-spacing: -.05em; }
.stat.green { color: var(--primary); }
/* Cartão-herói com brilho radial no canto (ex.: saldo de créditos). */
.hero-card { position: relative; overflow: hidden; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: var(--sp-4); box-shadow: var(--shadow-sm); }
.hero-card::before { content: ""; position: absolute; top: -96px; right: -96px;
  width: 192px; height: 192px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(42, 245, 152, 0.16) 0%, rgba(22, 27, 34, 0) 70%); }
.hero-card > * { position: relative; z-index: 1; }
.hero-card .hero-value { display: flex; align-items: baseline; gap: var(--sp-2); margin-top: 6px; }
/* Legenda que dá sentido ao número (validade próxima ou alcance na rede).
   min-height reserva o espaço: a legenda chega depois do saldo, sem pular. */
.hero-card .hero-caption { font-size: 12.5px; color: var(--muted); line-height: 1.4;
  margin: var(--sp-3) 0 0; min-height: 18px; }
.hero-card .hero-caption strong { color: var(--fg); font-weight: 700; }
.hero-card .hero-caption.warn { color: var(--warn); }
.hero-card .hero-caption.warn strong { color: var(--warn); }
.hero-card > button { margin-top: var(--sp-4); }

/* ---- Cabeçalho de identidade do Perfil ---- */
/* Fora de card: é o "quem sou eu" da tela, não mais um bloco de conteúdo. */
.profile-head { display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-5) 0 var(--sp-4); }
.profile-head .ph-main { flex: 1 1 auto; min-width: 0; }
.profile-head .ph-name { font-family: var(--font-display); font-weight: 800;
  font-size: 21px; letter-spacing: -.02em; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; }
.profile-head .ph-mail { font-size: 13px; color: var(--muted-2); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-head .pill { margin-top: 6px; }

/* Grupo de campos do perfil (Dados pessoais / Endereço de cobrança). */
.field-list { margin: 0 0 var(--sp-2); }
.field-list .fl-row { display: flex; align-items: baseline;
  justify-content: space-between; gap: var(--sp-3); padding: 7px 0; font-size: 14px; }
.field-list .fl-k { color: var(--muted); flex: 0 0 auto; }
.field-list .fl-v { color: var(--fg); font-weight: 600; text-align: right;
  min-width: 0; overflow-wrap: anywhere; }

/* Extrato de cobranças dentro do card do plano. */
.charges-details { margin-top: var(--sp-4); border-top: 1px solid var(--border);
  padding-top: var(--sp-3); }

/* Sair: fecha a tela, sem competir com as ações do plano. */
#btn-logout { display: block; margin: var(--sp-6) auto var(--sp-4); }

/* Ícone dentro de campo (login, busca de aulas etc.). */
.input-icon { position: relative; }
.input-icon > .material-symbols-outlined { position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--muted-2); font-size: 20px; pointer-events: none; }
.input-icon > input { padding-left: 42px; }

/* =====================================================================
 * Tela de acesso (login/cadastro/recuperação): card de vidro centralizado
 * com brilhos de fundo e abas ENTRAR / CRIAR CONTA.
 * ===================================================================== */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: var(--sp-5);
  position: relative; overflow: hidden; }
.auth-wrap::before, .auth-wrap::after { content: ""; position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0; }
.auth-wrap::before { width: 340px; height: 340px; top: -120px; left: -120px;
  background: radial-gradient(circle, rgba(42, 245, 152, 0.15) 0%, rgba(9, 10, 12, 0) 70%); }
.auth-wrap::after { width: 420px; height: 420px; bottom: -160px; right: -160px;
  background: radial-gradient(circle, rgba(71, 214, 255, 0.12) 0%, rgba(9, 10, 12, 0) 70%); }
.auth-inner { position: relative; z-index: 1; width: 100%; max-width: 440px; }
/* O <h1> só embrulha o logotipo (o texto virou imagem): sem font-size próprio. */
.auth-brand { text-align: center; margin: 0 0 var(--sp-3); line-height: 0; }
.brand-logo { height: 44px; width: auto; display: inline-block; vertical-align: middle; }
@media (max-width: 480px) { .brand-logo { height: 34px; } }
.auth-tagline { text-align: center; color: var(--muted-2); margin: 0 0 var(--sp-5);
  font-size: 14px; line-height: 1.4; }
/* ---- Landing pública do CT (destino do QR do cartaz) ---- */
/* O nome do CT é o herói: quem chega aqui está parado na frente dele. */
.ct-hero-name { font-family: var(--font-display); font-weight: 800; font-size: 26px;
  line-height: 1.15; margin: var(--sp-2) 0 var(--sp-3); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
/* Os chips daqui são rótulos, não botões — precisam do display que o <button> dava. */
.chip-row .chip { display: inline-flex; align-items: center; }
.ct-social { margin: var(--sp-4) 0 0; font-size: 13px; }
.ct-code-hint { margin-top: var(--sp-4); font-family: var(--font-mono); font-size: 12px; }
.ct-code-hint strong { color: var(--primary); letter-spacing: .12em; }

.auth-card { background: rgba(22, 27, 34, 0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: var(--sp-5); box-shadow: var(--shadow-lg); }
.auth-tabs { display: flex; gap: var(--sp-2); border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5); }
.auth-tab { flex: 1; background: transparent; border: none; box-shadow: none; margin: 0;
  border-radius: 0; padding: 0 0 12px; min-height: 0; cursor: pointer;
  color: var(--muted-2); font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s; }
@media (hover: hover) and (pointer: fine) { .auth-tab:hover { box-shadow: none; color: var(--fg); } }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-alt { text-align: center; margin-top: var(--sp-4); color: var(--muted-2); font-size: 13px; }
.auth-alt button { display: inline; width: auto; min-height: 0; margin: 0; padding: 0;
  background: none; color: var(--primary); font-family: var(--font-body); font-weight: 600;
  box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .auth-alt button:hover { box-shadow: none; text-decoration: underline; } }
/* Rótulo + ação na mesma linha (ex.: "Senha" / "Esqueci minha senha"). Mantém o
   atalho colado ao campo a que pertence, em vez de flutuar abaixo dele. */
.label-row { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-1); }
.label-row > label { margin: 0; }
.label-row > button { width: auto; min-height: 0; margin: 0; padding: 0; background: none;
  color: var(--primary); font-size: 12.5px; font-family: var(--font-body); font-weight: 500;
  box-shadow: none; flex: 0 0 auto; }
@media (hover: hover) and (pointer: fine) { .label-row > button:hover { box-shadow: none; text-decoration: underline; } }
.lbl-opt { color: var(--muted-2); font-weight: 400; }
/* CPF e telefone dividem a linha: com 14px de padding o telefone já formatado
   "(11) 98877-6655" estoura em telas de 375px. */
@media (max-width: 400px) {
  .auth-card .row input { padding-left: 10px; padding-right: 10px; }
}

/* Mostrar/ocultar senha: o olho vive dentro do campo, à direita. */
.input-icon.has-toggle > input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0; border: none;
  background: transparent; box-shadow: none; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted-2); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .pw-toggle:hover { background: rgba(255, 255, 255, 0.06); box-shadow: none; color: var(--fg); } }
.pw-toggle:active { transform: translateY(-50%) scale(0.94); }
.pw-toggle svg { display: block; width: 20px; height: 20px; }

/* Aviso de Caps Lock no campo de senha. */
.caps-hint { display: flex; align-items: center; gap: 6px; margin: var(--sp-2) 0 0;
  font-size: 12.5px; color: var(--warn); }
.caps-hint::before { content: "⇪"; font-size: 14px; }

/* Requisito real da senha (o backend só exige comprimento) + força orientativa. */
.pw-reqs { margin: var(--sp-3) 0 0; }
.pw-req { display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 12.5px; color: var(--muted-2); transition: color .2s; }
.pw-req::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto;
  border: 1.5px solid currentColor; transition: background .2s, border-color .2s; }
.pw-req[data-ok="true"] { color: var(--primary); }
.pw-req[data-ok="true"]::before { background: var(--primary); border-color: var(--primary); }
.pw-meter { height: 4px; border-radius: var(--radius-pill); background: var(--bg-2);
  overflow: hidden; margin: var(--sp-2) 0 6px; }
.pw-meter-fill { height: 100%; width: 0; border-radius: var(--radius-pill);
  background: var(--danger); transition: width .25s var(--ease), background .25s; }
.pw-meter-fill.media { background: var(--warn); }
.pw-meter-fill.forte { background: var(--primary); }
.pw-force { font-size: 12px; margin: 0; }

/* =====================================================================
 * Painéis (Admin / Parceiro) — componentes de gestão sobre o mesmo design
 * system do app do membro: KPIs, cartões de dados, sub-navegação segmentada,
 * barra de ferramentas/busca, botão flutuante e seções de formulário
 * recolhíveis. Mobile-first; adaptam-se a telas maiores.
 * ===================================================================== */

/* Acessível a leitores de tela, invisível na tela (portador de valor de form). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Passo numerado dentro de um fluxo (ex.: "1. Aula", "2. Código do aluno"). */
.step-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2);
  margin: var(--sp-5) 0 var(--sp-2); }
.step-label:first-of-type { margin-top: var(--sp-4); }

/* Escolha da aula na recepção: cards em vez de <select> nativo. */
.occ-pick { max-height: 232px; overflow-y: auto; margin-bottom: var(--sp-2); }
.occ-opt[aria-checked="true"] { border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary), var(--glow); }
.occ-opt[aria-checked="true"] .dc-name { color: var(--primary); }

/* Unidade ao lado do número de um KPI ("30 cr"). */
.kpi-unit { font-size: 14px; font-weight: 600; color: var(--muted); }

/* Estado operacional do CT, logo abaixo do header do painel do parceiro. */
.ct-status { display: flex; align-items: center; gap: 7px; margin: var(--sp-3) 0 0;
  font-size: 13.5px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: var(--muted-2); }
.status-dot.on { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-050); }
.status-dot.off { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }

/* Ícone SVG inline em texto/metadados (parceiro e admin). */
.ico { width: 15px; height: 15px; vertical-align: -2px; flex: 0 0 auto; }
.empty .empty-icon .ico { width: 34px; height: 34px; vertical-align: 0; }
.dc-meta .ico { margin-right: 3px; }

/* ---- Grade de KPIs (dashboard) ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); margin: var(--sp-3) 0; }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-4); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 3px;
  min-width: 0; transition: transform .12s var(--ease), box-shadow .12s; }
.kpi-card .kpi-head { display: flex; align-items: center; gap: 7px; color: var(--muted);
  font-size: 12.5px; font-weight: 600; }
.kpi-card .kpi-ico { display: inline-flex; color: var(--primary); flex: 0 0 auto; }
.kpi-card .kpi-value { font-size: 25px; font-weight: 800; letter-spacing: -.6px; color: var(--fg);
  line-height: 1.12; overflow-wrap: anywhere; }
.kpi-card .kpi-sub { font-size: 12px; color: var(--muted-2); }
.kpi-card.accent { border-color: var(--primary); }
.kpi-card.accent .kpi-value { color: var(--primary-700); }
.kpi-card.warn .kpi-ico { color: var(--warn); }
.kpi-card.warn .kpi-value { color: var(--warn); }
.kpi-card.tap { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .kpi-card.tap:hover { box-shadow: var(--shadow-md); } }
.kpi-card.tap:active { transform: scale(0.98); }
.kpi-card.span-2 { grid-column: 1 / -1; }
.kpi-card.span-2 .kpi-value { white-space: normal; }

/* Barra de progresso (utilização de créditos etc.) */
.progress { height: 10px; background: var(--bg-2); border-radius: var(--radius-pill); overflow: hidden;
  margin: var(--sp-2) 0; }
.progress > span { display: block; height: 100%; border-radius: var(--radius-pill);
  background: var(--grad-primary); box-shadow: 0 0 12px rgba(42, 245, 152, 0.4);
  transition: width .5s var(--ease); }
.progress.warn > span { background: linear-gradient(90deg, #e6a017, var(--warn)); box-shadow: none; }

/* Números de destaque (painéis) na fonte display. */
.kpi-card .kpi-value, .plan-card .plan-price, .data-card .dc-amount, .mix-share {
  font-family: var(--font-display); }

/* Card colapsável (<details>) — ex.: histórico do custo por aula (A10). */
.details-card > summary { cursor: pointer; font-weight: 700; list-style: none;
  display: flex; align-items: center; justify-content: space-between; }
.details-card > summary::-webkit-details-marker { display: none; }
.details-card > summary::after { content: "⌄"; color: var(--muted); font-size: 18px;
  transition: transform .2s var(--ease); }
.details-card[open] > summary::after { transform: rotate(180deg); }
.details-card[open] > summary { margin-bottom: var(--sp-3); }

/* Mix da rede (AN05): participação por parceiro com barra. */
.mix-row { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-2); }
.mix-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.mix-name { font-weight: 700; }
.mix-share { font-weight: 800; color: var(--primary-700); }
.mix-sub { font-size: 13px; }

/* ---- Cartão de dado (item de lista → card) ---- */
.data-card { display: flex; align-items: center; gap: var(--sp-3); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-sm); margin-bottom: var(--sp-3);
  transition: transform .12s var(--ease), box-shadow .12s; }
.data-card:last-child { margin-bottom: 0; }
.data-card.tap { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .data-card.tap:hover { box-shadow: var(--shadow-md); } }
.data-card.tap:active { transform: scale(0.995); }
.data-card .dc-main { flex: 1 1 auto; min-width: 0; }
.data-card .dc-title { font-weight: 700; font-size: 15.5px; line-height: 1.25;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.data-card .dc-title .dc-name { overflow: hidden; text-overflow: ellipsis; }
.data-card .dc-meta { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.data-card .dc-meta .sep { opacity: .5; margin: 0 2px; }
.data-card .dc-amount { font-weight: 800; font-size: 16px; color: var(--fg); white-space: nowrap; }
/* Carimbo de tempo acima do título (label-caps do DESIGN.md). */
.data-card .dc-when { font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.data-card .dc-when.now { color: var(--primary); }
/* Sinal do movimento de créditos/dinheiro. */
.data-card .dc-amount.pos { color: var(--primary-700); }
.data-card .dc-amount.neg { color: var(--muted); }
.data-card .dc-chev { flex: 0 0 auto; color: var(--muted-2); display: inline-flex; }
.data-card .dc-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: var(--sp-2); align-items: stretch; }
.data-card .dc-actions button { width: auto; margin: 0; min-height: 40px; padding: 8px 14px; font-size: 14px; }
.data-card.stack { flex-direction: column; align-items: stretch; }
.data-card.stack .dc-actions { flex-direction: row; }
.data-card.stack .dc-actions button { flex: 1; }

/* Cartão de dado com destaque de status na borda esquerda. */
.data-card.st-ok   { border-left: 4px solid var(--primary); }
.data-card.st-warn { border-left: 4px solid var(--warn); }
.data-card.st-err  { border-left: 4px solid var(--danger); }
.data-card.st-muted{ border-left: 4px solid var(--border-strong); }

/* ---- Sub-navegação segmentada (dentro de uma aba) ---- */
.segmented { display: flex; gap: 4px; background: var(--bg-2); border-radius: var(--radius-pill);
  padding: 4px; margin: 0 0 var(--sp-4); }
.segmented button { flex: 1; margin: 0; min-height: 42px; border-radius: var(--radius-pill);
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; padding: 8px 6px;
  min-width: 0; white-space: nowrap; }
/* 4 segmentos ("Finalizadas"/"Canceladas") não cabem em telas estreitas. */
@media (max-width: 400px) { .segmented button { font-size: 12.5px; padding: 8px 4px; } }
@media (hover: hover) and (pointer: fine) { .segmented button:hover { filter: none; } }
.segmented button.active { background: var(--elevated); color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(42, 245, 152, 0.3); }
.segmented button:active { transform: none; opacity: 1; }

/* ---- Barra de ferramentas: busca + filtros ---- */
.toolbar { display: flex; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-3); flex-wrap: wrap; }
.search { position: relative; flex: 1 1 180px; }
.search input { padding-left: 42px; padding-right: 44px; margin: 0; min-height: 46px; }
/* O ✕ nativo do type=search duplicaria o nosso .search-clear. */
.search input[type="search"]::-webkit-search-cancel-button { display: none; }
.search .search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); pointer-events: none; display: inline-flex; }
.search .search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0; background: transparent;
  color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) and (pointer: fine) { .search .search-clear:hover { background: var(--bg-2); border-radius: var(--radius-pill); } }

/* Chips de filtro (rolam horizontalmente no mobile). gap maior que o padrão:
   com 8px os alvos de toque de 40px ficariam praticamente encostados. */
.filter-chips { display: flex; gap: var(--sp-3); overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--sp-1)) var(--sp-4); padding: 0 var(--sp-1) 2px;
  overscroll-behavior-x: contain; }
.filter-chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; margin: 0; width: auto; min-height: 40px; padding: 7px 14px;
  border-radius: var(--radius-pill); background: var(--card); color: var(--muted);
  border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .chip:hover { filter: none; box-shadow: none; } }
.chip:active { transform: scale(0.96); }
.chip.active { background: var(--primary-050); color: var(--primary);
  border-color: rgba(42, 245, 152, 0.4); }

/* ---- Campo do modal de formulário (UI.formModal) ---- */
/* `half: true` agrupa dois campos por linha dentro de um .row. */
.fm-field { margin-bottom: var(--sp-3); min-width: 0; }
.fm-field > label:first-child { margin-top: 0; }
.row .fm-field { margin-bottom: 0; }

/* ---- Agenda semanal da recorrência (campo custom do formModal) ----
   Chips de dia + um bloco por dia escolhido com seus horários. O CT monta a
   semana inteira num modal só, por isso a lista de dias rola dentro do campo. */
.wk-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.wk-chips .chip { min-height: 38px; padding: 6px 12px; }
.wk-days { display: flex; flex-direction: column; gap: var(--sp-2);
  max-height: 40vh; overflow-y: auto; }
.wk-vazio { margin: 0; padding: var(--sp-3); text-align: center; border: 1px dashed var(--border);
  border-radius: var(--radius); }
.wk-day { background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-3); }
.wk-day-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.wk-day-name { font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wk-copy { width: auto; margin: 0; min-height: 0; padding: 2px 0; background: transparent;
  box-shadow: none; color: var(--accent); font-size: 12px; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .wk-copy:hover { background: transparent; box-shadow: none; text-decoration: underline; } }
.wk-times { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-2) 0; min-height: 26px;
  align-items: center; font-size: 13px; }
.wk-time { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px;
  border-radius: var(--radius-pill); background: var(--primary-050); color: var(--primary);
  border: 1px solid rgba(42, 245, 152, 0.30);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.wk-x { width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; border-radius: 50%;
  background: transparent; color: inherit; box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) and (pointer: fine) { .wk-x:hover { background: rgba(42, 245, 152, 0.16); box-shadow: none; } }
.wk-add { display: flex; gap: var(--sp-2); }
.wk-add input { margin: 0; min-height: 42px; flex: 1 1 auto; min-width: 0; }
.wk-add button { margin: 0; width: auto; flex: 0 0 auto; min-height: 42px; padding: 0 16px;
  font-size: 14px; }
.wk-resumo { margin-top: var(--sp-2); color: var(--primary); min-height: 14px; }

/* ---- Botão flutuante (ação primária da aba) ---- */
.fab-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; pointer-events: none;
  max-width: var(--maxw); margin: 0 auto; }
.fab { pointer-events: auto; position: absolute; right: var(--sp-4);
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  width: auto; min-height: 52px; margin: 0; padding: 0 20px 0 16px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg); display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; }
.fab:active { transform: scale(0.96); }
.fab .fab-ico { display: inline-flex; }

/* ---- KPI bento: badge de ícone, herói e brilho radial (Kinetic Obsidian) ---- */
.kpi-card { position: relative; }
/* Chip de ícone no canto superior direito do card. */
.kpi-badge { position: absolute; top: var(--sp-3); right: var(--sp-3);
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-050); color: var(--primary);
  border: 1px solid rgba(42, 245, 152, 0.20); }
.kpi-card.info .kpi-badge { background: var(--info-bg); color: var(--accent);
  border-color: rgba(71, 214, 255, 0.20); }
.kpi-card.warn .kpi-badge { background: var(--warn-bg); color: var(--warn);
  border-color: rgba(255, 180, 60, 0.22); }
/* Abre espaço no rótulo p/ não colidir com o badge. */
.kpi-card:has(.kpi-badge) .kpi-head { padding-right: 46px; }
/* Brilho radial no canto (aparência de vidro/bento). */
.kpi-card.glow { overflow: hidden; }
.kpi-card.glow::before { content: ""; position: absolute; top: -70px; right: -70px;
  width: 150px; height: 150px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(42, 245, 152, 0.14) 0%, rgba(22, 27, 34, 0) 70%); }
.kpi-card.glow.info::before {
  background: radial-gradient(circle, rgba(71, 214, 255, 0.14) 0%, rgba(22, 27, 34, 0) 70%); }
.kpi-card.glow.warn::before {
  background: radial-gradient(circle, rgba(255, 180, 60, 0.14) 0%, rgba(22, 27, 34, 0) 70%); }
/* Conteúdo acima do brilho — exceto o badge, que segue absoluto no canto. */
.kpi-card.glow > *:not(.kpi-badge) { position: relative; z-index: 1; }
/* KPI-herói: número maior (card em destaque, geralmente span-2). */
.kpi-card.hero .kpi-value { font-size: 40px; letter-spacing: -.05em; }
.kpi-card.hero .kpi-badge { width: 42px; height: 42px; }

/* ---- Ações rápidas (tiles de atalho) ---- */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3);
  margin: var(--sp-4) 0; }
.qa-tile { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); min-height: 92px; margin: 0; border-radius: var(--radius-lg);
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  background: var(--card); color: var(--fg); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); }
.qa-tile .qa-ico { display: inline-flex; }
.qa-tile:not(.primary) .qa-ico { color: var(--accent); }
.qa-tile.primary { background: var(--grad-primary); color: var(--primary-fg);
  border: none; box-shadow: var(--glow); }
@media (hover: hover) and (pointer: fine) { .qa-tile.primary:hover { box-shadow: var(--glow-strong); } }
.qa-tile:active { transform: scale(0.97); }

/* ---- Sub-navegação segmentada, variante "pills" (painel Admin) ---- */
.segmented.pills { background: transparent; padding: 0; gap: var(--sp-2); flex-wrap: wrap; }
.segmented.pills button { flex: 0 0 auto; width: auto; min-height: 40px; padding: 8px 18px;
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  box-shadow: none; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; }
.segmented.pills button.active { background: var(--primary-050); color: var(--primary);
  border-color: rgba(42, 245, 152, 0.40); box-shadow: none; }

/* Número de métrica com brilho (utilização de créditos etc.). */
.metric.glow { text-shadow: 0 0 20px rgba(42, 245, 152, 0.45); }

/* KPI / cartões: animação de entrada escalonada leve. */
.kpi-card, .data-card { animation: rise-in .3s var(--ease) both; }
/* Só na primeira visita da aba: voltar a uma aba já vista re-renderiza as listas e
   elas "piscavam" de novo a cada troca. UI.showTab marca data-seen ao sair dela. */
.tab[data-seen] .kpi-card, .tab[data-seen] .data-card,
.tab[data-seen] .rise-in { animation: none; }

/* ---- Animações ---- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(0.98); } }
@keyframes toast-bar-shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toast-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  /* Spinner de carregamento é indicador essencial: continua girando. */
  .toast-spinner { animation-duration: .7s !important; animation-iteration-count: infinite !important; }
}

/* ============================ Reserva de aulas ============================ */
/* Botão compacto (usado nos cards de aula/reserva). Área de toque >= 40px. */
button.small { min-height: 40px; padding: 8px 16px; font-size: 13.5px; width: auto; }

/* Badge de ocupação/status colorido (🟢🟡🔴🔵⚫). */
.occ-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--bg-2); color: var(--muted); border: 1px solid var(--border); }
.occ-badge.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(42, 245, 152, .35); }
.occ-badge.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(255, 180, 60, .35); }
.occ-badge.danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(255, 91, 82, .35); }
.occ-badge.info { background: var(--info-bg); color: var(--info); border-color: rgba(71, 214, 255, .35); }
.occ-badge.muted { background: var(--bg-2); color: var(--muted); }

/* Barra de ocupação. */
.occ-bar { height: 7px; border-radius: var(--radius-pill); background: var(--bg-2); overflow: hidden;
  margin: var(--sp-3) 0; }
.occ-fill { height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s ease; }

/* Controle de reserva no card de aula futura. */
.cc-reserve { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  margin-top: var(--sp-3); flex-wrap: wrap; }

/* Resumo do modal de reserva (chave/valor). */
.reserve-summary { margin-bottom: var(--sp-4); }
.kv { display: flex; flex-direction: column; gap: 6px; margin-top: var(--sp-2); }
.kv-row { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: 14px; }
.kv-k { color: var(--muted); }
.kv-v { color: var(--fg); font-weight: 600; text-align: right; }

/* Card da tela Minhas Reservas. */
/* O card de reserva usa a mesma estrutura .dc-* das demais listas. */
.reserva-card .dc-title { align-items: center; }
.seg-panel { display: block; }
/* Cabeçalho de dia dentro do painel: primeiro grupo colado no topo. */
.seg-panel .section-title:first-child { margin-top: 0; }
/* Idem quando o título abre a própria aba (não herda o respiro de uma seção acima). */
.tab > .section-title:first-child { margin-top: 0; }

/* Painel de reservas da aula (parceiro). */
.panel-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2);
  margin-bottom: var(--sp-3); }
.panel-kpi { background: var(--bg-2); border-radius: var(--radius); padding: 10px 6px; text-align: center; }
.panel-kpi .pk-value { display: block; font-size: 20px; font-weight: 800; color: var(--fg);
  font-family: var(--font-display); }
.panel-kpi .pk-label { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.panel-h { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  margin: var(--sp-4) 0 var(--sp-2); }
