/* GymFlow — app do cliente (admin/)
 * Estilo: Flat (PADROES.md §15.3) — zero profundidade: sem sombra, gradiente ou relevo.
 * Hierarquia só por blocos de cor sólida, linha de 1px e tipografia em negrito.
 * Acento padrão #ffcc2a (amarelo) com texto grafite; neutro escuro #2c2c2c (--flat-ink).
 * Mobile-first (PADROES.md §10): regras base são as do celular; o desktop entra em @media (min-width: 900px).
 * Todas as cores em variável CSS (PADROES.md §7) — nunca cor fixa em componente.
 * Seletor de data/hora (Flatpickr) e estilos de vídeos/telas entram nas fases que os usam.
 */

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; }
html, body { touch-action: manipulation; }
img { max-width: 100%; }

/* ── Tema claro (padrão) ──────────────────────────────────────────────────── */
:root, [data-theme="claro"] {
  --bg-page: #eef1f5;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: #f4f6f9;
  --bg-sidebar: #2c2c2c;
  --flat-ink: #2c2c2c;           /* neutro escuro: sidebar, rodapé, faixas de título */
  --flat-ink-text: #ffffff;

  /* gerarCssCorAcento() (§7.1) sobrescreve estes quatro quando a empresa troca a cor. */
  --accent: #ffcc2a;
  --accent-hover: #d1a722;
  --accent-light: #fff5d4;
  --accent-text: #2c2c2c;
  --accent-bloco: var(--accent);
  --accent-bloco-text: var(--accent-text);

  --text-primary: #2c2c2c;
  --text-secondary: #4d5663;
  --text-muted: #6f7a89;
  --text-placeholder: #a0a9b5;

  --border: #e0e4ea;
  --radius-sm: 3px; --radius-md: 4px; --radius-lg: 6px; /* quase reto — nunca > 6px */

  --success: #15803d; --success-bg: #e3f4e8;
  --warning: #a35a00; --warning-bg: #fdf0d6;
  --danger:  #c81e1e; --danger-bg:  #fbe4e4;
  --info:    #1d4ed8; --info-bg:    #e1e9fc;

  --footer-h: 32px;
}

/* ── Tema escuro — mesmo princípio: blocos sólidos, só troca a escala de neutros ─ */
[data-theme="escuro"] {
  --bg-page: #15181d;
  --bg-card: #1e2228;
  --bg-input: #252a31;
  --bg-hover: #262b33;
  --bg-sidebar: #232323;
  --flat-ink: #232323;           /* faixa escura fica MAIS escura que o card, não mais clara */
  --flat-ink-text: #e8ebf0;

  --accent: #ffcc2a;
  --accent-hover: #ffd95c;
  --accent-light: #3a3320;
  --accent-text: #2c2c2c;
  --accent-bloco: #ffcc2a;
  --accent-bloco-text: #2c2c2c;

  --text-primary: #e8ebf0;
  --text-secondary: #b3bac5;
  --text-muted: #8a94a3;
  --text-placeholder: #5f6874;

  --border: #2c323b;

  --success: #4ade80; --success-bg: #14301d;
  --warning: #fbbf24; --warning-bg: #372a0c;
  --danger:  #f87171; --danger-bg:  #3a1717;
  --info:    #60a5fa; --info-bg:    #142a4b;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4 { font-family: 'Sora', 'DM Sans', sans-serif; font-weight: 700; color: var(--text-primary); line-height: 1.2; text-wrap: balance; }
a { color: var(--text-primary); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text-primary); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── Card (bloco liso: faixa fina de acento no topo, sem sombra) ──────────── */
.card {
  background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border);
  border-top: 3px solid var(--accent); padding: 1.25rem; margin-bottom: 1.1rem; min-width: 0;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1rem; min-width: 0; }
.card-sub { font-size: .84rem; color: var(--text-muted); margin-top: -.6rem; margin-bottom: 1rem; }

/* ── Botões (retângulo cheio; feedback só por cor) ────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid var(--border); cursor: pointer; text-decoration: none;
  font-family: 'Sora', 'DM Sans', sans-serif; font-size: .88rem; font-weight: 700; line-height: 1.2;
  padding: .75rem 1.3rem; border-radius: var(--radius-sm); min-height: 46px;
  background: var(--bg-card); color: var(--text-primary);
  transition: background-color .12s ease, border-color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { background: var(--bg-hover); }
.btn:active { background: var(--border); }
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { filter: brightness(.92); }
.btn-ink { background: var(--flat-ink); color: var(--flat-ink-text); border-color: var(--flat-ink); }
.btn-secondary { color: var(--text-secondary); }
.btn-danger { color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: .5rem 1rem; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-back { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-muted); font-size: .84rem; font-weight: 700; text-decoration: none; margin-bottom: .9rem; min-height: 36px; }
.btn-back svg { width: 16px; height: 16px; }

/* ── Formulários ──────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; min-width: 0; }
.form-label { display: block; font-size: .82rem; font-weight: 700; color: var(--text-secondary); margin-bottom: .45rem; }
.form-control {
  width: 100%; outline: none; background: var(--bg-input); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 16px; /* 16px evita zoom automático no iOS */
  padding: .75rem 1rem; min-height: 48px;
  transition: border-color .12s ease;
}
.form-control:focus { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); } /* única "sombra" aceita: barra de foco */
.form-control::placeholder { color: var(--text-placeholder); }
.form-control:disabled, .form-control[readonly].is-locked { opacity: .7; }
.form-control.is-invalid { border-color: var(--danger); }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .35rem; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: .35rem; font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0; }
.form-row-3 { display: grid; grid-template-columns: 1fr; gap: 0; }
.form-section-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: .9rem; color: var(--text-secondary); margin: .4rem 0 .9rem; }
.form-erro-geral { margin-bottom: .9rem; }

/* Campo com botão/ícone à direita (status de consulta, olho da senha) */
.inp-wrap { position: relative; }
.inp-wrap .form-control { padding-right: 2.8rem; }
.inp-wrap-icon { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: flex; line-height: 0; pointer-events: none; }
.inp-wrap-icon svg { width: 18px; height: 18px; }
.btn-pwd-eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: .5rem; color: var(--text-muted); display: flex; line-height: 0; border-radius: var(--radius-sm); }
.btn-pwd-eye:hover { color: var(--text-primary); }
.btn-pwd-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.spin { animation: gym-spin .8s linear infinite; }
@keyframes gym-spin { to { transform: rotate(360deg); } }

/* ── Switch (PADROES.md §9.5) ─────────────────────────────────────────────── */
.x-switch { position: relative; display: inline-flex; flex-shrink: 0; width: 46px; height: 26px; }
.x-switch-input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.x-switch-track { width: 46px; height: 26px; border-radius: 999px; background: var(--border); transition: background-color .15s; position: relative; }
.x-switch-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.x-switch-input:checked + .x-switch-track { background: var(--accent); }
.x-switch-input:checked + .x-switch-track .x-switch-thumb { transform: translateX(20px); background: var(--accent-text); }
.x-switch-input:focus-visible + .x-switch-track { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── Caixa de aceite custom (termos) — nunca checkbox nativo visível (§9.10) ── */
.x-check { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; font-size: .86rem; color: var(--text-secondary); line-height: 1.45; position: relative; }
.x-check-input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; cursor: pointer; }
.x-check-box {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: var(--radius-sm); background: var(--bg-input);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: background-color .12s;
}
.x-check-box svg { width: 16px; height: 16px; color: var(--accent-text); opacity: 0; }
.x-check-input:checked + .x-check-box { background: var(--accent); border-color: var(--accent); }
.x-check-input:checked + .x-check-box svg { opacity: 1; }
.x-check-input:focus-visible + .x-check-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.x-check.is-invalid .x-check-box { border-color: var(--danger); }

/* ── Botão de ajuda "(?)" (PADROES.md §9.16) ──────────────────────────────── */
.btn-ajuda {
  background: none; border: 1.5px solid var(--border); border-radius: 50%;
  width: 24px; height: 24px; padding: 0; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); flex-shrink: 0;
}
.btn-ajuda:hover { background: var(--bg-hover); }

/* ── Utilitários ──────────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: .4rem; }
.gap-2 { gap: .6rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.min-w-0 { min-width: 0; }

/* ── Alertas (cores semânticas só onde há significado) ────────────────────── */
.alert { display: flex; align-items: flex-start; gap: .6rem; padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 600; margin-bottom: 1rem; border-left: 4px solid currentColor; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { color: var(--success); background: var(--success-bg); }
.alert-warning { color: var(--warning); background: var(--warning-bg); }
.alert-danger  { color: var(--danger);  background: var(--danger-bg); }
.alert-info    { color: var(--info);    background: var(--info-bg); }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .25rem .65rem; border-radius: var(--radius-sm); white-space: nowrap; }
.badge-success { color: var(--success); background: var(--success-bg); }
.badge-warning { color: var(--warning); background: var(--warning-bg); }
.badge-danger  { color: var(--danger);  background: var(--danger-bg); }
.badge-info    { color: var(--info);    background: var(--info-bg); }
.badge-muted   { color: var(--text-muted); background: var(--bg-hover); border: 1px solid var(--border); }
.badge-accent  { color: var(--accent-text); background: var(--accent); }

/* ── Rodapé fixo (PADROES.md §8.5) ────────────────────────────────────────── */
.footer-fixo {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 250;
  background: var(--flat-ink); color: var(--flat-ink-text);
  text-align: center; font-size: .68rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: .5rem 1rem calc(.5rem + env(safe-area-inset-bottom, 0px));
}
.footer-fixo a { color: var(--accent); text-decoration: underline; }

/* Faixa da marca da empresa acima do "Desenvolvido por" (telas logadas). O wrapper é que fica fixo. */
.rodape-fixo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 250; }
.rodape-fixo .footer-fixo { position: static; }
.rodape-marca {
  height: 56px; display: flex; align-items: center; justify-content: center; padding: 0 1rem;
  background: var(--accent); color: var(--accent-text);
  font-size: .95rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; text-align: center;
}
.rodape-marca img { max-height: 36px; max-width: 70%; object-fit: contain; }
.rodape-marca span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root:has(.rodape-marca) { --footer-h: 88px; }

/* ── Layout: app-shell + sidebar (hambúrguer no mobile) + topbar ──────────── */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; flex: 1; }

.sidebar {
  width: 272px; max-width: 86vw; background: var(--bg-sidebar); color: #cfd2d6; flex-shrink: 0;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) .9rem calc(var(--footer-h) + 1rem);
  display: flex; flex-direction: column; gap: .2rem;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;                       /* feedback_sidebar_scrollbar */
  transform: translateX(-105%); transition: transform .22s ease;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar.open { transform: translateX(0); }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: .4rem .5rem 1rem; min-width: 0; }
.sidebar-brand-logo {
  width: 40px; height: 40px; border-radius: var(--radius-md); flex-shrink: 0;
  background: var(--accent); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.15rem;
}
.sidebar-brand-text { min-width: 0; }
.sidebar-brand-nome { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.05rem; letter-spacing: .03em; color: #fff; display: block; }
.sidebar-brand-empresa { font-size: .74rem; color: #a3a8af; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-link {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: var(--radius-sm);
  color: #cfd2d6; font-weight: 700; font-size: .9rem; text-decoration: none; min-height: 46px;
  -webkit-tap-highlight-color: transparent;
}
.nav-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-link span { flex: 1; min-width: 0; }
.nav-link:hover { background: #3a3a3a; color: #fff; }
.nav-link.active { background: var(--accent); color: var(--accent-text); }
.nav-link.is-soon { opacity: .5; cursor: default; }
.nav-link.is-soon:hover { background: transparent; color: #cfd2d6; }
.nav-soon { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #a3a8af; background: #3a3a3a; padding: .15rem .45rem; border-radius: var(--radius-sm); }
.nav-count { font-size: .7rem; font-weight: 800; color: var(--accent-text); background: var(--accent); padding: .1rem .5rem; border-radius: 999px; }
.nav-link.active .nav-count { background: var(--accent-text); color: var(--accent); }

/* Grupo accordion (PADROES.md §8.1) */
.nav-group { margin-top: .35rem; }
.nav-group-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  background: none; border: none; cursor: pointer; font-family: inherit;
  padding: .55rem .85rem; min-height: 40px; border-radius: var(--radius-sm);
  font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8d939b;
}
.nav-group-toggle:hover { color: #fff; }
.nav-group-toggle svg { width: 16px; height: 16px; transition: transform .18s; }
.nav-group.open .nav-group-toggle svg { transform: rotate(180deg); }
.nav-group-items { display: none; flex-direction: column; gap: .15rem; }
.nav-group.open .nav-group-items { display: flex; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 25, 35, .5); z-index: 290; }
.sidebar-overlay.open { display: block; }

.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  min-height: 60px; background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .4rem;
  padding: env(safe-area-inset-top, 0px) .6rem 0 .6rem;
  position: sticky; top: 0; z-index: 200;
}
.topbar-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.05rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: .2rem; }
.topbar-trial { display: none; }
.icon-btn {
  background: none; border: none; cursor: pointer; color: var(--text-secondary);
  border-radius: var(--radius-sm); display: flex; line-height: 0; min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--bg-hover); }
.icon-btn svg { width: 22px; height: 22px; }
.menu-btn { display: flex; }

/* Avatar + menu do usuário (topbar) */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--accent); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: .85rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 112px; height: 112px; font-size: 2rem; }
.user-btn { background: none; border: none; cursor: pointer; padding: 3px; border-radius: 50%; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

.page-content {
  flex: 1; width: 100%; max-width: 640px; margin: 0 auto;
  padding: 1rem 1rem calc(1.5rem + var(--footer-h) + env(safe-area-inset-bottom, 0px));
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.35rem; min-width: 0; }

@media (min-width: 900px) {
  .sidebar { position: sticky; height: 100vh; transform: none; }
  .sidebar-overlay { display: none !important; }
  .menu-btn { display: none; }
  .topbar { padding: 0 1.5rem 0 2rem; min-height: 68px; }
  .topbar-trial { display: inline-flex; }
  .page-content { max-width: 1080px; padding: 1.4rem 2rem calc(2rem + var(--footer-h)); }
  .form-row { grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .form-row-3 { grid-template-columns: 2fr 1fr 1fr; gap: 0 1rem; }
}

/* ── Telas fora do layout (login, criar conta, recuperar senha, licença) ──── */
.auth-body { align-items: center; justify-content: center; padding: 1.5rem 1rem calc(1.5rem + var(--footer-h) + env(safe-area-inset-bottom, 0px)); }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-wrap-lg { max-width: 560px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-bottom: 1.4rem; text-align: center; }
.auth-logo-marca {
  width: 68px; height: 68px; border-radius: var(--radius-lg); background: var(--accent); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 2rem;
}
.auth-logo h1 { font-size: 1.5rem; letter-spacing: .04em; }
.auth-logo p { font-size: .88rem; color: var(--text-muted); }
.auth-card { padding: 1.6rem 1.35rem; }
.auth-link { text-align: center; margin-top: 1.1rem; font-size: .88rem; color: var(--text-muted); }
.auth-link a { font-weight: 700; }
.auth-row-lembrar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.auth-row-lembrar label { font-size: .88rem; font-weight: 600; color: var(--text-secondary); }
.auth-tema-btn { position: fixed; top: calc(.6rem + env(safe-area-inset-top, 0px)); right: .6rem; }
.reset-link-box { word-break: break-all; font-size: .78rem; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem; margin-top: .6rem; }

/* ── Cor de acento — swatches (PADROES.md §7.1) ───────────────────────────── */
.cor-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-bottom: 1.1rem; position: relative; }
.cor-swatch {
  width: 46px; height: 26px; border-radius: var(--radius-sm); border: 2px solid transparent; padding: 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cor-swatch svg { width: 16px; height: 16px; color: #fff; opacity: 0; }
.cor-swatch.selecionado { border-color: var(--text-primary); }
.cor-swatch.selecionado svg { opacity: 1; }
.cor-swatch-outra { background: conic-gradient(from 180deg, #ef4444, #eab308, #22c55e, #06b6d4, #6366f1, #ec4899, #ef4444); }
.cor-swatch-outra svg { opacity: 1; }
.cor-swatch-outra.selecionado svg { opacity: 0; }
.cor-swatch-input-real { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ── Upload de logo (gatilho custom — nunca input file nativo visível) ────── */
.upload-trigger {
  width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  padding: 1.4rem 1rem; border-radius: var(--radius-sm); border: 2px dashed var(--border);
  background: var(--bg-input); color: var(--text-secondary); cursor: pointer; font-family: inherit; font-size: .88rem; font-weight: 700;
}
.upload-trigger:hover { border-color: var(--accent); }
.upload-trigger small { font-weight: 500; color: var(--text-muted); }
.upload-trigger svg { width: 26px; height: 26px; }
.logo-preview { display: flex; align-items: center; justify-content: center; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: .8rem; min-height: 110px; }
.logo-preview img { max-height: 90px; max-width: 100%; object-fit: contain; }

/* ── Modal (PADROES.md §9.1) — bottom sheet no celular ────────────────────── */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15, 25, 35, .55);
  z-index: 500; align-items: flex-end; justify-content: center;
  overscroll-behavior: contain;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card); width: 100%; max-height: 92vh; max-height: 92dvh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-top: 3px solid var(--accent);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: gym-sheet .2s ease;
}
.modal.combo-aberto { padding-bottom: 60vh; padding-bottom: 60dvh; } /* celular com teclado aberto num combo: folga pra rolar */
@keyframes gym-sheet { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1.1rem 1.25rem .6rem; }
.modal-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.05rem; min-width: 0; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--bg-hover); }
.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: .4rem 1.25rem 1.1rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: .6rem; padding: .6rem 1.25rem 1.2rem; flex-wrap: wrap; }
@media (min-width: 900px) {
  .modal-backdrop { align-items: center; padding: 2rem 1rem; }
  .modal { max-width: 500px; border-radius: var(--radius-md); max-height: calc(100vh - 4rem); }
  .modal.modal-lg { max-width: 620px; }
}

/* ── Menu de contexto (kebab / menu do usuário) — §9.2 ────────────────────── */
.ctx-menu { position: fixed; z-index: 600; background: var(--bg-card); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius-sm); padding: .4rem; min-width: 200px; }
.ctx-item { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; min-height: 44px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; color: var(--text-primary); cursor: pointer; text-decoration: none; }
.ctx-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); }
.ctx-item:hover { background: var(--bg-hover); }
.ctx-item.danger, .ctx-item.danger svg { color: var(--danger); }
.ctx-head { padding: .6rem .8rem .5rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.ctx-head strong { display: block; font-size: .9rem; }
.ctx-head span { font-size: .78rem; color: var(--text-muted); word-break: break-all; }
.ctx-separator { height: 1px; background: var(--border); margin: .3rem 0; }
.row-kebab { background: none; border: none; cursor: pointer; color: var(--text-muted); width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.row-kebab:hover { background: var(--bg-hover); color: var(--text-primary); }
.row-kebab svg { width: 20px; height: 20px; }

/* Página com FAB: sobra espaço no fim da lista pro último item rolar pra cima do botão (kebab não fica coberto) */
@media (max-width: 899px) { .page-content:has(.fab-container) { padding-bottom: calc(var(--footer-h) + 6.5rem + env(safe-area-inset-bottom, 0px)); } }
/* ── FAB (PADROES.md §9.3) — só no celular; no desktop vira botão no page-head ── */
.fab-container { position: fixed; right: 1.1rem; bottom: calc(var(--footer-h) + 1.1rem + env(safe-area-inset-bottom, 0px)); z-index: 240; pointer-events: none; }
.fab {
  pointer-events: auto; width: 60px; height: 60px; border-radius: var(--radius-lg); border: none; cursor: pointer;
  background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.fab:active { background: var(--accent-hover); }
.fab svg { width: 26px; height: 26px; }
.so-desktop { display: none !important; }
@media (min-width: 900px) {
  .fab-container { display: none; }
  .so-desktop { display: inline-flex !important; }
  .so-mobile { display: none !important; }
}

/* ── Busca com lupa (PADROES.md §9.11) ────────────────────────────────────── */
.busca-form { display: flex; gap: .6rem; align-items: center; margin-bottom: .9rem; flex-wrap: wrap; }
.inp-search-wrap { position: relative; flex: 1; min-width: 0; }
.inp-clear-wrap { position: relative; }
.inp-clear-wrap .form-control { padding-right: 2.6rem; }
.inp-search-wrap .form-control { padding-right: 2.6rem; }
.inp-search-clear {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  background: none; border: none; cursor: pointer; color: var(--text-muted); border-radius: var(--radius-sm);
}
.inp-search-clear:hover { color: var(--text-primary); background: var(--bg-hover); }
.inp-search-clear[hidden] { display: none; }
.inp-search-clear svg { width: 16px; height: 16px; }
.btn-icon { width: 48px; min-width: 48px; padding: 0; flex-shrink: 0; }

/* ── Chips de filtro (rolam na horizontal no celular) ─────────────────────── */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem .1rem .7rem; margin-bottom: .3rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .4rem .9rem;
  border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
  font-size: .82rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.chip:hover { background: var(--bg-hover); }
.chip.active { background: var(--flat-ink); border-color: var(--flat-ink); color: var(--flat-ink-text); }
.chip-num { font-size: .7rem; font-weight: 800; padding: .05rem .45rem; border-radius: 999px; background: var(--bg-hover); color: var(--text-secondary); }
.chip.active .chip-num { background: var(--accent); color: var(--accent-text); }
.chip.chip-alerta .chip-num { background: var(--warning-bg); color: var(--warning); }

/* ── Lista em cards (celular) — PADROES.md §10: marcação própria do desktop é .tbl ── */
.lst { display: flex; flex-direction: column; gap: .7rem; }
.lst-card { display: flex; align-items: stretch; gap: .2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); min-width: 0; }
.lst-card.inativo { opacity: .62; }
.lst-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .8rem; padding: .75rem 0 .75rem .8rem;
  background: none; border: none; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: var(--radius-md);
  -webkit-tap-highlight-color: transparent;
}
div.lst-main { cursor: default; }
.lst-txt { flex: 1; min-width: 0; }
.lst-titulo { display: block; font-weight: 700; font-size: .93rem; line-height: 1.3; overflow-wrap: anywhere; }
.lst-sub { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .15rem; overflow-wrap: anywhere; }
.lst-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.lst-valor { font-family: 'Sora', sans-serif; font-weight: 800; font-size: .95rem; white-space: nowrap; font-variant-numeric: tabular-nums; align-self: center; padding-left: .3rem; }
.lst-valor small { font-family: 'DM Sans', sans-serif; font-size: .7rem; color: var(--text-muted); font-weight: 700; }
.lst-card .row-kebab { align-self: center; flex-shrink: 0; width: 44px; height: 44px; margin-right: .2rem; }
.lst-vazio { text-align: center; padding: 2.2rem 1rem; color: var(--text-muted); }
.lst-vazio svg { width: 40px; height: 40px; margin-bottom: .5rem; opacity: .6; }
.lst-vazio strong { display: block; color: var(--text-secondary); margin-bottom: .2rem; }

/* Miniatura (avatar/imagem na lista) */
.thumb {
  width: 54px; height: 54px; border-radius: var(--radius-md); flex-shrink: 0; overflow: hidden; background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center; color: var(--text-placeholder);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb svg { width: 24px; height: 24px; }
.thumb-sm { width: 42px; height: 42px; }

/* ── Tabela (só desktop) ──────────────────────────────────────────────────── */
.tbl-wrap { display: none; }
@media (min-width: 900px) {
  .lst.tem-tabela { display: none; }
  .tbl-wrap { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .5rem .8rem; overflow-x: auto; }
  .tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
  .tbl th { text-align: left; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: .7rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
  .tbl td { padding: .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
  .tbl tr:last-child td { border-bottom: none; }
  .tbl tbody tr { cursor: pointer; }
  .tbl tbody tr:hover td { background: var(--bg-hover); }
  .tbl tbody tr.inativo td { opacity: .62; }
  .tbl .col-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .tbl .col-acao { width: 52px; text-align: right; }
  .tbl .lst-badges { margin-top: .25rem; }
}

/* ── Paginação ────────────────────────────────────────────────────────────── */
.paginacao { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.1rem; font-size: .85rem; color: var(--text-muted); font-weight: 600; }

/* ── Combobox (PADROES.md §9.4) ───────────────────────────────────────────── */
.gym-combo { position: relative; }
.gym-combo .form-control { padding-right: 2.6rem; }
.gym-combo-seta { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; display: flex; }
.gym-combo-seta svg { width: 18px; height: 18px; }
.gym-combo-drop {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 520;
  background: var(--bg-card); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius-sm);
  max-height: 240px; overflow-y: auto; overscroll-behavior: contain; padding: .35rem; scrollbar-width: none;
}
.gym-combo-drop::-webkit-scrollbar { display: none; }
.gym-combo-opt { padding: .7rem .8rem; min-height: 44px; display: flex; align-items: center; border-radius: var(--radius-sm); cursor: pointer; font-size: .92rem; }
.gym-combo-opt:hover, .gym-combo-opt.ativo { background: var(--bg-hover); }
.gym-combo-opt strong { color: var(--text-primary); background: var(--accent-light); }
.gym-combo-empty { color: var(--text-muted); cursor: default; font-size: .85rem; }
.gym-combo-empty:hover { background: none; }
.gym-combo-add { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; min-height: 44px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-primary); font-weight: 700; font-size: .9rem; border-top: 1px solid var(--border); margin-top: .2rem; }
.gym-combo-add svg { width: 16px; height: 16px; flex-shrink: 0; }
.gym-combo-add:hover { background: var(--bg-hover); }
.gym-combo-add.is-loading { opacity: .5; pointer-events: none; }
.gym-combo-bloq { cursor: not-allowed; opacity: .75; }
.gym-combo-bloq:hover { background: none; }

/* ── Seletor segmentado (Admin/Colaborador etc.) — rádio nativo escondido ── */
.x-seg { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-input); }
.x-seg label { flex: 1; position: relative; }
.x-seg label + label { border-left: 1px solid var(--border); }
.x-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.x-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; font-weight: 700; font-size: .88rem; color: var(--text-secondary); cursor: pointer; padding: 0 .6rem; text-align: center; }
.x-seg input:checked + span { background: var(--accent); color: var(--accent-text); }
.x-seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.x-seg.is-invalid { outline: 2px solid var(--danger); }

/* Linha de opção com switch (label à esquerda, switch à direita) */
.opt-linha { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--border); }
.opt-linha:first-of-type { border-top: none; }
.opt-linha strong { display: block; font-size: .9rem; }
.opt-linha span { display: block; font-size: .78rem; color: var(--text-muted); }

/* Caixa de link para copiar (convite quando o e-mail falha) */
.link-copiar { display: flex; gap: .5rem; align-items: center; }
.link-copiar .form-control { font-size: .82rem; }

/* ── Início: primeiros passos + resumo ────────────────────────────────────── */
.saudacao { margin-bottom: 1.1rem; }
.saudacao h1 { font-size: 1.4rem; }
.saudacao p { color: var(--text-muted); font-size: .9rem; }

.passos-progresso { height: 8px; background: var(--bg-hover); border: 1px solid var(--border); overflow: hidden; margin-bottom: 1rem; }
.passos-progresso span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.passos-lista { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.passo { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: var(--radius-sm); background: var(--bg-hover); border: 1px solid var(--border); text-decoration: none; color: var(--text-primary); min-height: 58px; }
.passo-num {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: .85rem; background: var(--flat-ink); color: var(--flat-ink-text);
}
.passo-num svg { width: 18px; height: 18px; }
.passo-txt { flex: 1; min-width: 0; }
.passo-txt strong { display: block; font-size: .9rem; }
.passo-txt span { display: block; font-size: .78rem; color: var(--text-muted); }
.passo-seta { color: var(--text-muted); display: flex; }
.passo-seta svg { width: 18px; height: 18px; }
.passo.feito .passo-num { background: var(--success); color: #fff; }
.passo.feito .passo-txt strong { text-decoration: line-through; color: var(--text-muted); }
a.passo:hover { border-color: var(--accent); }
.passo.em-breve { opacity: .6; }

.resumo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: 1.1rem; }
.resumo-item { padding: 1rem; margin-bottom: 0; }
.resumo-item .resumo-num { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.6rem; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.resumo-item .resumo-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.resumo-item .resumo-num.resumo-alerta { color: var(--warning); }
@media (min-width: 900px) {
  .resumo-grid { grid-template-columns: repeat(4, 1fr); }
  .inicio-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.1rem; align-items: start; }
  /* Sem os primeiros passos: uma coluna só, com os cards lado a lado (2 por linha) */
  .inicio-grid.inicio-grid-cheio { grid-template-columns: 1fr; }
  .inicio-grid-cheio .inicio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; align-items: start; }
}

/* ── Perfil ───────────────────────────────────────────────────────────────── */
.perfil-foto { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.perfil-grid { display: grid; gap: 0 1.1rem; }
@media (min-width: 900px) { .perfil-grid { grid-template-columns: 320px 1fr; align-items: start; } }

/* ── Pull-to-refresh (PADROES.md §11) ─────────────────────────────────────── */
#ptr-indicator {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%) translateY(-64px); opacity: 0;
  width: 42px; height: 42px; background: var(--accent); color: var(--accent-text);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  z-index: 600; pointer-events: none; transition: transform .26s cubic-bezier(.34, 1.4, .64, 1), opacity .2s ease;
}
#ptr-indicator.ptr-pulling { transition: none; }
#ptr-indicator svg { width: 20px; height: 20px; display: block; }
#ptr-indicator.ptr-refreshing svg { animation: gym-spin .65s linear infinite; }

/* ── Página de termos/política ────────────────────────────────────────────── */
.doc-legal { max-width: 760px; margin: 0 auto; }
.doc-legal h1 { font-size: 1.5rem; margin-bottom: .3rem; }
.doc-legal h2 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
.doc-legal p, .doc-legal li { font-size: .93rem; color: var(--text-secondary); margin-bottom: .6rem; max-width: 70ch; }
.doc-legal ul { padding-left: 1.2rem; }

/* Faixa de licença perto de vencer (só Admin): X recolhe para uma linha fina até o dia seguinte */
.lic-aviso { display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem .5rem 1rem; background: var(--warning-bg); color: var(--warning); font-size: .85rem; font-weight: 600; }
.lic-aviso svg { width: 18px; height: 18px; flex-shrink: 0; }
.lic-aviso-txt { flex: 1; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.lic-aviso .btn { flex-shrink: 0; }
.lic-aviso-x { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: inherit; cursor: pointer; border-radius: var(--radius-sm); }
.lic-aviso-barra { height: 3px; background: var(--warning); }
.lic-aviso[hidden], .lic-aviso-barra[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .sidebar, .topbar, .footer-fixo, .sidebar-overlay { display: none !important; }
}

/* ── Vídeos (F2) ─────────────────────────────────────────────────────────── */
.plano-tv { margin-bottom: 1rem; }
.plano-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.plano-titulo { margin: 0; font-size: 1.15rem; }
.plano-sub { margin: .25rem 0 0; font-size: .84rem; color: var(--text-muted); max-width: 46ch; }
.plano-barra { height: 8px; border-radius: var(--radius-sm); background: var(--bg-hover); overflow: hidden; margin: 1rem 0 .9rem; }
.plano-barra span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.plano-barra.cheia span { background: var(--warning); }
.plano-itens { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin: 0; }
.plano-itens > div { background: var(--bg-hover); border-radius: var(--radius-sm); padding: .6rem .8rem; min-width: 0; }
.plano-itens dt { font-size: .74rem; color: var(--text-muted); margin: 0; }
.plano-itens dd { margin: .1rem 0 0; font-size: 1.2rem; font-weight: 800; }
.vid-envio { margin-bottom: 1rem; }
.vid-envio-topo { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; min-width: 0; }
.vid-envio-topo strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vid-secao { margin-bottom: 1.4rem; }
.vid-secao[hidden] { display: none; }
.vid-secao-titulo { font-size: 1rem; font-weight: 700; margin: 0 0 .7rem; }
.vid-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.vid-card { display: flex; flex-direction: column; gap: .6rem; padding: .6rem; border-radius: var(--radius-md); background: var(--bg-card); border: 1px solid var(--border); min-width: 0; }
.vid-card.inativo .vid-thumb { opacity: .45; }
.vid-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--radius-sm); background: #000; overflow: hidden; cursor: pointer; }
.vid-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.vid-secao[data-vid-secao="v"] .vid-thumb { display: flex; align-items: center; justify-content: center; background: transparent; overflow: visible; }
.vid-secao[data-vid-secao="v"] .vid-thumb video { width: auto; max-width: 100%; height: 100%; border-radius: var(--radius-sm); background: #000; }
.vid-secao[data-vid-secao="v"] .vid-play { top: 0; left: 0; width: 100%; height: 100%; background: transparent; }
.vid-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.18); color: #fff; }
.vid-play svg { width: 44px; height: 44px; }
.vid-player { width: 100%; max-height: 70vh; background: #000; border-radius: var(--radius-sm); display: block; }
.sel-info { display: flex; align-items: flex-start; gap: .4rem; }
.sel-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.sel-txt strong { font-size: .92rem; overflow-wrap: anywhere; }
.sel-txt small { font-size: .76rem; color: var(--text-muted); line-height: 1.35; overflow-wrap: anywhere; }
.vid-ia { display: flex; align-items: center; gap: 1rem; margin-top: 1.2rem; flex-wrap: wrap; background: var(--accent-light); }
.vid-ia-ico { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--accent); color: var(--accent-text); }
.vid-ia-ico svg { width: 26px; height: 26px; }
.vid-ia-txt { flex: 1 1 220px; min-width: 0; }
.vid-ia-txt h2 { font-size: 1.02rem; margin: 0 0 .2rem; }
.vid-ia-txt p { margin: 0; font-size: .86rem; color: var(--text-muted); overflow-wrap: anywhere; }
.vd-dias { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin-top: .4rem; }
.vd-dia { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; cursor: pointer; }
.vd-dia-todos { flex-basis: 100%; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }

/* ── Telas / TVs (F3) ────────────────────────────────────────────────────── */
.tl-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.tl-card { display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.tl-topo { display: flex; align-items: flex-start; gap: .4rem; }
.tl-nome { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.tl-nome strong { font-size: 1rem; overflow-wrap: anywhere; }
.tl-resumo { font-size: .8rem; overflow-wrap: anywhere; }
.tl-status { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.tl-status small { font-size: .78rem; line-height: 1.35; }
.tl-inativa { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tl-inativa:last-child { border-bottom: 0; }
.mix-lista { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.mix-linha { display: grid; grid-template-columns: minmax(0, 1.4fr) 92px minmax(0, 1fr); gap: .7rem; align-items: center; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-md); }
.mix-linha.desligado, .mix-breve { opacity: .6; }
.mix-sw { display: flex; align-items: center; gap: .6rem; cursor: pointer; min-width: 0; }
.mix-nome { display: flex; flex-direction: column; min-width: 0; }
.mix-nome strong { font-size: .88rem; }
.mix-nome small { font-size: .74rem; color: var(--text-muted); }
.mix-pct { display: flex; align-items: center; gap: .3rem; }
.mix-in { text-align: center; padding: .4rem .3rem; }
.mix-sufixo { font-size: .85rem; color: var(--text-muted); }
.mix-res { min-width: 0; }
.mix-barra { height: 8px; background: var(--bg-hover); border-radius: var(--radius-sm); overflow: hidden; }
.mix-barra span { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.mix-rot { font-size: .74rem; color: var(--text-muted); }
@media (max-width: 560px) { .mix-linha { grid-template-columns: 1fr 92px; } .mix-res { grid-column: 1 / -1; } }
.pr-url { text-align: center; font-size: .86rem; font-weight: 700; word-break: break-all; margin: .3rem 0 1rem; }
.pr-codigo { text-align: center; font-family: 'Sora', sans-serif; font-size: 2.6rem; font-weight: 800; letter-spacing: .3em; padding: 1rem .5rem 1rem 1.1rem; background: var(--accent-light); border: 2px solid var(--accent); border-radius: var(--radius-md); margin-bottom: .8rem; }
.previa-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.previa-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-previa { max-width: 860px; }

/* ── F4: opções da tela, highlights, avisos, exercícios e dicas ───────────── */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.chip-op { cursor: pointer; }
.chip-op input, .seg-op input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-op span, .seg-op span { display: inline-block; padding: .38rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .82rem; font-weight: 600; color: var(--text-secondary); background: var(--bg-card); }
.chip-op input:checked + span, .seg-op input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip-op input:focus-visible + span, .seg-op input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .7rem; }
.seg-op { cursor: pointer; }
.form-label.sub { font-size: .78rem; font-weight: 600; margin-top: .5rem; display: block; color: var(--text-muted); }
#clDetalhe { margin-top: .4rem; padding: .3rem .8rem .1rem; border: 1px solid var(--border); border-radius: var(--radius-md); }

.cont-lista { display: flex; flex-direction: column; }
.cont-item { display: flex; align-items: center; gap: .8rem; padding: .7rem .2rem; border-bottom: 1px solid var(--border); min-width: 0; }
.cont-item:last-child { border-bottom: 0; }
.cont-item.inativo .cont-txt { opacity: .55; }
.cont-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.cont-txt strong { font-size: .92rem; overflow-wrap: anywhere; line-height: 1.35; }
.cont-txt small { font-size: .78rem; color: var(--text-muted); }
.cont-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.cat-filtros { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.cat-filtros button { padding: .38rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.cat-filtros button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cat-grupo { margin: 1.1rem 0 .4rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.cont-item[hidden], .chip-op[hidden], [id="clDetalhe"][hidden] { display: none; }

.fonte-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.fonte-op { cursor: pointer; min-width: 0; }
.fonte-op input { position: absolute; opacity: 0; width: 0; height: 0; }
.fonte-cartao { display: flex; flex-direction: column; gap: .25rem; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); }
.fonte-cartao b { font-size: 1.1rem; line-height: 1.2; overflow-wrap: anywhere; }
.fonte-cartao small { font-size: .78rem; color: var(--text-muted); }
.fonte-op input:checked + .fonte-cartao { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fonte-op input:focus-visible + .fonte-cartao { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pré-visualização real do highlight (mesma lógica da TV, em escala) */
.hlp { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; margin-top: .6rem; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 4%; text-align: center; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-text); cursor: pointer; }
.hlp-caixa { max-width: 94%; opacity: 0; transition: opacity .7s, transform .7s; }
.hlp-caixa.entra { opacity: 1; }
.hlp-caixa.fx-zoom { transform: scale(.55); }
.hlp-caixa.fx-zoom.entra { transform: none; }
.hlp-caixa.fx-digitar { opacity: 1; transition: none; }
.hlp-texto { line-height: 1.18; overflow-wrap: break-word; }
.hlp-autor { margin-top: .8em; font-weight: 700; opacity: .85; }
.hlp-pal { display: inline-block; opacity: 0; transform: translateY(.3em); transition: opacity .5s, transform .5s; }
.hlp-pal.on { opacity: 1; transform: none; }
.hlp-marca { color: inherit; padding: 0 .25em; border-radius: 3px; background: linear-gradient(90deg, rgba(0,0,0,.2), rgba(0,0,0,.2)) no-repeat left center; background-size: 0% 100%; transition: background-size 1s .8s; }
.hlp-caixa.entra .hlp-marca { background-size: 100% 100%; }
.hlp-texto.pulsar { animation: hlp-pulsar 1.6s ease-in-out infinite; }
@keyframes hlp-pulsar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.sidebar-brand-logo img, .auth-logo-marca img { display: block; max-width: 100%; height: auto; }

/* ── Licença: pagamento e compra de vagas extras (F6b) ───────────────────────── */
.pagar-box { text-align: left; background: var(--bg-hover); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 1rem; }
.pagar-linha { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .9rem; }
.pagar-linha strong { display: block; font-family: 'Sora', sans-serif; font-size: .98rem; }
.pagar-linha span { font-size: .8rem; color: var(--text-muted); }
.pagar-preco { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.5rem; white-space: nowrap; }
.pagar-nota { font-size: .78rem; color: var(--text-muted); margin: .7rem 0 0; }
.pagar-box .btn-ghost { margin-top: .5rem; }
.pagar-hist { text-align: left; font-size: .84rem; margin-bottom: 1rem; }
.pagar-hist ul { list-style: none; margin: .4rem 0 0; padding: 0; }
.pagar-hist li { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .5rem 0; border-top: 1px solid var(--border); }
.extra-linha { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .6rem 0; border-top: 1px solid var(--border); }
.extra-linha > div:first-child { min-width: 0; flex: 1 1 8rem; }
.extra-linha strong { display: block; font-size: .92rem; }
.extra-linha span { font-size: .78rem; color: var(--text-muted); }
.extra-qtd { display: flex; align-items: center; gap: .6rem; }
.extra-qtd strong { min-width: 1.6rem; text-align: center; font-size: 1.1rem; }
@media (max-width: 480px) { .extra-linha > .btn { flex: 1 1 100%; } }
