/* ============================================================================
   OKLAC — "PRISMA GLASS" skin (override layer, loads AFTER admin.css)
   ----------------------------------------------------------------------------
   Identidade: vidro fosco sobre um campo de luz (feixe azul + índigo + faísca
   âmbar). Paleta monocromática azul; amarelo #ffcb02 só como faísca. Tipografia
   Sora (display/números) + Geist (UI) + Geist Mono (relógio/valores).
   A base (admin.css) é toda orientada a tokens — este arquivo redefine os
   tokens e re-veste as superfícies-chave. Temas: claro (padrão), escuro via
   [data-theme="dark"] ou prefers-color-scheme.
   ========================================================================== */

:root {
  /* — campo & feixes — */
  --field: #e9ecf4;
  --beam-1: #2f6bff;
  --beam-2: #5e79ff;
  --beam-3: #ffcb02;
  --beam-strength: .78;
  --grain: .05;

  /* — vidro — */
  --glass:        rgba(255,255,255,.46);
  --glass-strong: rgba(255,255,255,.64);
  --glass-quiet:  rgba(255,255,255,.30);
  --glass-blur: 32px;
  --glass-saturate: 180%;
  --hairline: rgba(255,255,255,.92);
  --edge: inset 0 1px 0 var(--hairline), inset 0 -1px 0 rgba(255,255,255,.34), inset 0 0 0 1px rgba(255,255,255,.10);

  /* — redefinição dos tokens legados (cascateiam por todo o admin.css) — */
  --bg: transparent;
  --surface: var(--glass);
  --surface-2: rgba(255,255,255,.38);
  --ink: #0b1220;
  --ink-2: #313c52;
  --muted: #6a748a;
  --line: rgba(10,18,40,.09);
  --line-2: rgba(10,18,40,.16);
  --accent: #0c5cef;
  --accent-ink: #0a48c4;
  --accent-tint: rgba(12,92,239,.10);
  --accent-grad: linear-gradient(160deg, #4d86ff 0%, #0c5cef 46%, #0a48c4 100%);
  --accent-glow: 0 10px 26px rgba(12,92,239,.32);
  --sidebar: var(--glass);
  --sidebar-2: rgba(10,18,40,.06);
  --sidebar-ink: #313c52;
  --yellow: #ffcb02;
  --spark: #ffcb02;
  --green: #0e9d5c; --green-bg: rgba(14,157,92,.12);
  /* como TEXTO no vidro claro, #a8720d dava 3,8:1 — as estrelas das
     avaliações ficavam quase invisíveis. #8a5e0a dá 5,3:1. */
  --amber: #8a5e0a; --amber-bg: rgba(138,94,10,.14);
  /* #d93a32 dava 4,2:1 como TEXTO sobre o vidro claro (mín. 4,5). Escurecer
     serve aos dois usos: texto de banda crítica e branco sobre botão. */
  --red: #c62d26; --red-bg: rgba(198,45,38,.12);
  --radius: 18px;
  --shadow: 0 1px 3px rgba(9,16,32,.06), 0 10px 24px rgba(9,16,32,.08);
  --shadow-lg: 0 8px 18px rgba(9,16,32,.10), 0 44px 96px rgba(9,16,32,.20);
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Sora", "Geist", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
  --ease: cubic-bezier(.32,.72,0,1);
  --dur: .28s;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --field: #070a12;
    --beam-strength: .95; --grain: .06;
    --glass: rgba(16,21,36,.44); --glass-strong: rgba(24,31,50,.60); --glass-quiet: rgba(16,21,36,.26);
    --glass-saturate: 175%;
    --hairline: rgba(255,255,255,.14);
    --edge: inset 0 1px 0 var(--hairline), inset 0 -1px 0 rgba(0,0,0,.30), inset 0 0 0 1px rgba(255,255,255,.04);
    --surface: var(--glass); --surface-2: rgba(255,255,255,.06);
    --ink: #eef2fb; --ink-2: #c6cede; --muted: #94a0b8;
    --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.18);
    --accent: #4d86ff; --accent-ink: #a9c6ff; --accent-tint: rgba(77,134,255,.16);
    --accent-grad: linear-gradient(160deg, #7ea9ff 0%, #3d7bff 48%, #1d4fd8 100%);
    --accent-glow: 0 12px 30px rgba(29,92,255,.42);
    --sidebar: var(--glass); --sidebar-2: rgba(255,255,255,.07); --sidebar-ink: #c6cede;
    --green: #34d17f; --green-bg: rgba(52,209,127,.15);
    --amber: #e8b24a; --amber-bg: rgba(232,178,74,.16);
    --red: #ff6a63; --red-bg: rgba(255,106,99,.15);
    --shadow: 0 1px 3px rgba(0,0,0,.38), 0 10px 24px rgba(0,0,0,.30);
    --shadow-lg: 0 10px 24px rgba(0,0,0,.5), 0 50px 100px rgba(0,0,0,.62);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --field: #070a12;
  --beam-strength: .95; --grain: .06;
  --glass: rgba(16,21,36,.44); --glass-strong: rgba(24,31,50,.60); --glass-quiet: rgba(16,21,36,.26);
  --glass-saturate: 175%;
  --hairline: rgba(255,255,255,.14);
  --edge: inset 0 1px 0 var(--hairline), inset 0 -1px 0 rgba(0,0,0,.30), inset 0 0 0 1px rgba(255,255,255,.04);
  --surface: var(--glass); --surface-2: rgba(255,255,255,.06);
  --ink: #eef2fb; --ink-2: #c6cede; --muted: #94a0b8;
  --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.18);
  --accent: #4d86ff; --accent-ink: #a9c6ff; --accent-tint: rgba(77,134,255,.16);
  --accent-grad: linear-gradient(160deg, #7ea9ff 0%, #3d7bff 48%, #1d4fd8 100%);
  --accent-glow: 0 12px 30px rgba(29,92,255,.42);
  --sidebar: var(--glass); --sidebar-2: rgba(255,255,255,.07); --sidebar-ink: #c6cede;
  --green: #34d17f; --green-bg: rgba(52,209,127,.15);
  --amber: #e8b24a; --amber-bg: rgba(232,178,74,.16);
  --red: #ff6a63; --red-bg: rgba(255,106,99,.15);
  --shadow: 0 1px 3px rgba(0,0,0,.38), 0 10px 24px rgba(0,0,0,.30);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.5), 0 50px 100px rgba(0,0,0,.62);
  color-scheme: dark;
}

/* ============================================================================
   O CAMPO — luz atrás de todo o vidro
   ========================================================================== */
body { background: var(--field); font-family: var(--font); }
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--field); }
.aurora::before {
  content: ""; position: absolute; inset: -45%;
  background:
    radial-gradient(34% 38% at 24% 12%, color-mix(in oklab, var(--beam-1) 94%, transparent) 0%, transparent 66%),
    radial-gradient(30% 34% at 71% 30%, color-mix(in oklab, var(--beam-2) 74%, transparent) 0%, transparent 64%),
    radial-gradient(28% 32% at 46% 78%, color-mix(in oklab, var(--beam-1) 62%, transparent) 0%, transparent 62%),
    radial-gradient(26% 30% at 82% 82%, color-mix(in oklab, var(--beam-3) 66%, transparent) 0%, transparent 60%);
  opacity: var(--beam-strength);
  filter: blur(24px) saturate(128%);
  animation: gbeam 34s var(--ease) infinite alternate;
}
.aurora .grain {
  position: absolute; inset: 0; opacity: var(--grain); mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes gbeam { from { transform: translate3d(-2%,-1%,0) scale(1.04); } to { transform: translate3d(2%,2%,0) scale(1.12); } }

h1, h2, h3, h4, .page-title, .kpi .k-value { font-family: var(--font-display); letter-spacing: -.02em; }

/* ============================================================================
   LOGIN — cartão de vidro centrado (re-veste o markup original por CSS)
   ========================================================================== */
.login { position: fixed; inset: 0; z-index: 200; background: transparent; display: grid; place-items: center; }
.login::before { display: none; }              /* client.png fora           */
.login::after { display: none; }               /* fifty.png fora            */
.login-form {
  position: static; width: min(452px, calc(100vw - 48px)); max-width: 452px;
  background: var(--glass-strong);
  backdrop-filter: blur(40px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(40px) saturate(var(--glass-saturate));
  border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-lg), var(--edge);
  animation: grise .6s var(--ease) both;
}
@keyframes grise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.login-form form { padding: 40px; display: flex; flex-direction: column; gap: 8px; }
.login-badge {
  font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.03em;
  color: var(--ink); margin-bottom: 14px;
}
.login-badge::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--spark); box-shadow: 0 0 10px var(--spark); }
.login-form label { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.login-form input {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px;
  background: color-mix(in oklab, var(--glass-quiet) 80%, transparent); color: var(--ink);
  backdrop-filter: blur(6px); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.login-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.login-gap { height: 8px; }
.login-acessar {
  margin-top: 16px; padding: 13px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent-grad); color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.32);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.login-acessar:hover { filter: none; transform: translateY(-1px); }
.login .error { color: var(--red); margin-top: 8px; font-size: 13px; }
/* O crédito é `position: fixed`, então qualquer irmão dentro do divisor cai no
   canto superior. Os links legais viram uma faixa fixa própria, logo acima. */
.login-divisor label { position: fixed; bottom: 18px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 11px; color: color-mix(in oklab, var(--muted) 80%, transparent); }
.login-legal { position: fixed; bottom: 38px; left: 0; right: 0; text-align: center; font-size: 12.5px; }

/* ============================================================================
   SHELL — sidebar e topbar de vidro flutuantes
   ========================================================================== */
.app { display: grid; grid-template-columns: 260px 1fr; gap: 18px; padding: 18px; min-height: 100vh; }
.sidebar {
  position: sticky; top: 18px; height: calc(100vh - 36px);
  background: var(--glass); color: var(--ink-2);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow), var(--edge);
}
.sb-brand { padding: 22px 20px 12px; }
.sb-brand img { height: 28px; }
:root[data-theme="dark"] .sb-brand img { filter: brightness(1.6) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sb-brand img { filter: brightness(1.6) contrast(.9); } }
.sidenav .sb-group { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .13em; color: var(--muted); }
.sidenav button { color: var(--ink-2); font-weight: 500; border-radius: 12px; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.sidenav button:hover { background: color-mix(in oklab, var(--ink) 5%, transparent); color: var(--ink); }
.sidenav button.active { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 20%, transparent); }
.sidenav button.active::before { left: -10px; top: 50%; transform: translateY(-50%); height: 20px; bottom: auto; background: var(--spark); box-shadow: 0 0 12px color-mix(in oklab, var(--spark) 70%, transparent); }
.sb-foot { border-top: 1px solid var(--line); }
.sb-empresa { color: var(--muted); }
.sb-empresa b { color: var(--ink); }
.sb-logout { border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 999px; cursor: pointer; }
.sb-logout:hover { background: color-mix(in oklab, var(--ink) 6%, transparent); }

/* Instalar como aplicativo — mesmo peso visual do "Sair", um degrau acima em
   cor porque é oferta, não saída. */
.sb-instalar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--ink-2); padding: 7px; border-radius: 999px;
  font-size: 13px; font-family: inherit; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.sb-instalar svg {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.sb-instalar:hover {
  background: color-mix(in oklab, var(--brand) 12%, transparent);
  border-color: color-mix(in oklab, var(--brand) 42%, transparent);
  color: var(--ink);
}
/* Recolhida: o rótulo sai e sobra o ícone, igual ao Sair. `font-size:0` some
   com o texto sem tirar o <span> do fluxo — o gap continua valendo. */
:root.sb-recolhida .sb-instalar { width: 40px; padding: 8px 0; gap: 0; }
:root.sb-recolhida .sb-instalar span { display: none; }

.main { gap: 18px; }
.appbar {
  height: auto; padding: 13px 16px 13px 24px; margin-bottom: 0;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 20px;
  position: sticky; top: 18px; z-index: 30;
  box-shadow: 0 1px 2px rgba(9,16,32,.06), 0 8px 20px rgba(9,16,32,.07), var(--edge);
}
.page-title { font-size: 21px; font-weight: 700; }
.appbar-right { display: flex; align-items: center; gap: 12px; }
.clock { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.content { padding: 0 6px 40px 0; }

/* ── Alternador de tema ─────────────────────────────────────────────────── */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--ink-2); border: 1px solid var(--line); background: transparent; font-size: 16px;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.theme-toggle:hover { transform: rotate(-10deg); background: color-mix(in oklab, var(--ink) 5%, transparent); }
.theme-toggle .sun { display: none; } .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

/* ── Perfil (avatar + menu de vidro) ────────────────────────────────────── */
.profile { position: relative; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 1px solid var(--line);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 12.5px;
  color: var(--accent-ink); background: var(--accent-tint); box-shadow: var(--edge);
  transition: transform var(--dur) var(--ease);
}
.avatar:hover { transform: translateY(-1px); }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 8px; z-index: 120;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow), var(--edge);
  display: flex; flex-direction: column; gap: 2px; animation: grise .22s var(--ease) both;
}
.profile-menu[hidden] { display: none; }
.profile-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.profile-menu button:hover { background: color-mix(in oklab, var(--ink) 6%, transparent); color: var(--ink); }
.profile-menu .sep { height: 1px; margin: 6px 8px; background: var(--line); }
.profile-menu .who { padding: 10px 12px 6px; font-size: 12px; color: var(--muted); }
.profile-menu .who b { display: block; color: var(--ink); font-size: 13px; }

/* ============================================================================
   SUPERFÍCIES — vidro em cards, kpis, modais, dock
   ========================================================================== */
.card, .kpi, .mod-card {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), var(--edge);
  position: relative;
}
.card { border-radius: 20px; }
.kpi, .mod-card { border-radius: 18px; }
.card::before, .kpi::before, .mod-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.05) 26%, transparent 44%);
  mix-blend-mode: soft-light;
}
.kpi, .mod-card { box-shadow: 0 1px 2px rgba(9,16,32,.05), 0 5px 14px rgba(9,16,32,.06), var(--edge); }
:root[data-theme="dark"] .kpi, :root[data-theme="dark"] .mod-card { box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 5px 14px rgba(0,0,0,.24), var(--edge); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kpi, :root:not([data-theme="light"]) .mod-card { box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 5px 14px rgba(0,0,0,.24), var(--edge); }
}
.kpi { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.kpi:hover { transform: translateY(-3px); }
.kpi .k-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.kpi .k-label { font-family: var(--font-mono); font-weight: 500; letter-spacing: .1em; font-size: 10.5px; }
.mod-card.subscribed { border-color: color-mix(in oklab, var(--green) 40%, transparent); }
.card-h { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -.02em; }

.btn-primary, .primary {
  background: var(--accent-grad); border-radius: 999px; padding: 10px 18px; cursor: pointer;
  box-shadow: var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.32);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-primary:hover, .primary:hover { background: var(--accent-grad); transform: translateY(-1px); }
.btn-primary.sm { padding: 8px 14px; }
.btn-ghost, .btn {
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  box-shadow: var(--edge); transition: transform var(--dur) var(--ease);
}
.btn-ghost:hover, .btn:hover { transform: translateY(-1px); }

.inp, .field input, .field select, .inline-form input, .genial-inputbar input {
  border-radius: 12px; border: 1px solid var(--line);
  background: color-mix(in oklab, var(--glass-quiet) 80%, transparent);
  backdrop-filter: blur(6px);
}
.inp:focus, input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }

.subnav {
  display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: var(--glass-quiet); border: 1px solid var(--line); box-shadow: var(--edge);
}
.subnav button { border-radius: 999px; font-size: 13.5px; cursor: pointer; }
.subnav button.active { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 16px color-mix(in oklab, var(--accent) 38%, transparent); }
.subnav button.active:hover { background: var(--accent-grad); }

.badge-soon, .badge-active { padding: 3px 10px; font-weight: 600; }

/* ── Genial: FAB só com o cérebro + dock de vidro ───────────────────────── */
.genial-fab {
  width: 58px; height: 58px; font-size: 25px;
  background: var(--accent-grad);
  box-shadow: var(--shadow-lg), var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.32);
}
.genial-fab::after {
  content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--spark); box-shadow: 0 0 10px var(--spark);
}
.genial-fab { position: fixed; }
.genial-dock {
  background: var(--glass-strong);
  backdrop-filter: blur(40px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(40px) saturate(var(--glass-saturate));
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 80px rgba(9,16,32,.25);
}

.modal-host { background: rgba(7,10,18,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal {
  background: var(--glass-strong);
  backdrop-filter: blur(40px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(40px) saturate(var(--glass-saturate));
  border: 1px solid var(--line); border-radius: 22px; color: var(--ink);
  box-shadow: var(--shadow-lg), var(--edge);
}

/* ── Responsivo (shell flutuante) ───────────────────────────────────────── */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .sidebar { position: static; height: auto; border-radius: 20px; }
  .appbar { top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora::before { animation: none; }
}

/* ── Ícones de traço (SVG <use>) ────────────────────────────────────────── */
svg.i { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; stroke-width: 1.7; }
.sidenav button svg.i { width: 18px; height: 18px; opacity: .9; }
.sidenav button.active svg.i { opacity: 1; }
.genial-fab svg.i { width: 27px; height: 27px; stroke-width: 1.5; }
.theme-toggle svg.i { width: 17px; height: 17px; }
.profile-menu button svg.i { color: var(--muted); }
.profile-menu button:hover svg.i { color: var(--ink); }

/* ── Transição de entrada ao trocar de aba ──────────────────────────────── */
.view.entering > * { animation: viewrise .45s var(--ease) both; }
.view.entering > *:nth-child(2) { animation-delay: .05s; }
.view.entering > *:nth-child(3) { animation-delay: .1s; }
.view.entering > *:nth-child(4) { animation-delay: .15s; }
.view.entering > *:nth-child(5) { animation-delay: .2s; }
@keyframes viewrise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Carregando: spinner de vidro ───────────────────────────────────────── */
.empty.loading { gap: 12px; color: var(--muted); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 4px;
  border: 3px solid color-mix(in oklab, var(--accent) 18%, transparent);
  border-top-color: var(--accent);
  animation: gspin .8s linear infinite;
}
@keyframes gspin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .view.entering > * { animation: none; }
  .spinner { animation-duration: 1.6s; }
}

/* ── Signup (mesmo cartão de vidro do login) ────────────────────────────── */
.login-lede { color: var(--muted); font-size: 13.5px; margin: -6px 0 10px; }
.login-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.login-row > div { display: flex; flex-direction: column; gap: 7px; }
.login-alt { margin-top: 16px; text-align: center; font-size: 13.5px; color: var(--muted); }
.login-alt a { color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.login-alt a:hover { color: var(--accent); }
/* `.login-form form` é flex, o que vence o `.hidden` genérico. Listar os
   formulários um a um deixava qualquer form novo visível para sempre — foi o
   que aconteceu com o de recuperar senha. Regra por posição, não por id. */
.login-form form.hidden { display: none; }
@media (max-width: 560px) { .login-row { grid-template-columns: 1fr; } }
.login-form input { width: 100%; min-width: 0; }

/* ── Estoque ────────────────────────────────────────────────────────────── */
.est-tbl th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.est-tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.est-tbl tr:last-child td { border-bottom: 0; }
.est-tbl tr:hover td { background: color-mix(in oklab, var(--ink) 3%, transparent); }
.est-low { color: var(--red); font-weight: 700; }
.est-ok { color: var(--green); font-weight: 700; }
.badge-soon.est-out { color: var(--red); background: var(--red-bg); }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }

/* ── Respiro entre painéis de vidro (cards "quase encostando") ──────────── */
.view { gap: 24px; }
.kpi-row { gap: 18px; }
.dash-grid { gap: 24px; }
.module-grid { gap: 18px; }
.content { padding-top: 4px; }

/* Os hosts de conteúdo viram coluna flex com gap — a regra única está mais
   abaixo (busca "ÚNICO mecanismo"). Aqui fica só o esconde-vazio. */
#est-body:empty, #set-body:empty { display: none; }

/* ── Estúdio AI (prompt-first) ──────────────────────────────────────────── */
.st-ai-hero .card-b { display: flex; flex-direction: column; gap: 16px; }
.st-ai-head h2 { font-size: 21px; margin-bottom: 6px; }
.st-ai-head p { margin: 0; max-width: 680px; }
.st-prompt { font-size: 15.5px; line-height: 1.5; resize: vertical; min-height: 76px; padding: 16px 18px; border-radius: 16px; }
.st-ai-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.st-ai-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kit-chip { cursor: pointer; }
.kit-chip.active { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-ink); }
.kit-chip i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.fmt-seg.sm { display: inline-flex; grid-template-columns: none; margin: 0; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass-quiet); border: 1px solid var(--line); }
.fmt-seg.sm button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.fmt-seg.sm button.active { background: var(--accent-grad); color: #fff; }
.fmt-seg.sm button.active b { color: #fff; }
.inp.sm { width: auto; padding: 8px 12px; font-size: 13px; }
.studio-gen { align-self: flex-start; padding: 13px 26px; font-size: 15px; }

.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.gen-card { overflow: hidden; }
.gen-thumb { position: relative; width: 100%; background: color-mix(in oklab, var(--ink) 6%, transparent); display: grid; place-items: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.gen-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.skeleton { background: linear-gradient(100deg, color-mix(in oklab, var(--ink) 5%, transparent) 40%, color-mix(in oklab, var(--ink) 10%, transparent) 50%, color-mix(in oklab, var(--ink) 5%, transparent) 60%); background-size: 240% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -140% 0; } }

/* ── Estúdio v2: aceleradores, notas, ações ─────────────────────────────── */
.st-accel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.score-ring { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--sr-c, var(--accent)) calc(var(--v) * 1%), color-mix(in oklab, var(--ink) 12%, transparent) 0); }
.score-ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--glass-strong); backdrop-filter: blur(8px); }
.score-ring span { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.score-ring.sr-good { --sr-c: var(--green); } .score-ring.sr-ok { --sr-c: var(--amber); } .score-ring.sr-bad { --sr-c: var(--red); }
.score-pill { display: inline-block; min-width: 34px; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.score-pill.sr-good { color: var(--green); background: var(--green-bg); }
.score-pill.sr-ok { color: var(--amber); background: var(--amber-bg); }
.score-pill.sr-bad { color: var(--red); background: var(--red-bg); }
.rc-frame { position: relative; }
.rc-score { position: absolute; top: 10px; right: 10px; z-index: 2; }
.rc-fixes { margin: 8px 12px 0; padding-left: 16px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rc-pickwrap { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.rc-h { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-acts { display: flex; gap: 6px; flex: none; }
.advisor-head { display: flex; align-items: center; gap: 14px; }
/* neutraliza o círculo interno antigo (admin.css) — aqui quem faz é o ::after */
.score-ring span { width: auto; height: auto; background: transparent; }

/* ── Transmissões / OBS ─────────────────────────────────────────────────── */
.obs-steps { margin: 14px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.obs-steps b { color: var(--ink); }
#ob_url { font-family: var(--font-mono); font-size: 12px; }

/* ── Calendário editorial (Divulgador) ──────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-dow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal-day { min-height: 92px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-quiet); display: flex; flex-direction: column; gap: 4px; }
.cal-day.is-today { border-color: color-mix(in oklab, var(--accent) 45%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 25%, transparent); }
.cal-num { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: var(--muted); }
.cal-day.is-today .cal-num { color: var(--accent-ink); }
.cal-post { font-size: 11px; padding: 3px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.cal-post.ok { background: var(--green-bg); color: var(--green); }
.cal-post.sch { background: var(--accent-tint); color: var(--accent-ink); }
.cal-post.err { background: var(--red-bg); color: var(--red); }
.cal-more { font-size: 10.5px; color: var(--muted); }
@media (max-width: 720px) { .cal-day { min-height: 64px; } .cal-post { display: none; } }

/* ── Cartão de confirmação da Genial ────────────────────────────────────── */
.confirm-card { border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--line)); background: var(--glass-quiet); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cf-head { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }
.cf-line { font-size: 12.5px; color: var(--ink-2); }
.cf-body { font-size: 13px; background: color-mix(in oklab, var(--ink) 6%, transparent); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; max-height: 160px; overflow: auto; }
.cf-acts { display: flex; gap: 8px; justify-content: flex-end; }

/* Sobras de roxo do tema antigo: o hero do Divulgador e o botão flutuante ainda
   nasciam em #7b2ff7. A casca é azul — estes dois destoavam. */
.div-hero, .qual-hero, .an-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f2050 0%, #1a3c92 46%, #2f63cf 100%) !important;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 14px 44px rgba(18,44,120,.4), inset 0 1px 0 rgba(255,255,255,.14) !important;
}
.div-hero::before, .qual-hero::before, .an-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 120% at 88% -25%, rgba(255,255,255,.2), transparent 52%); }
.div-hero > *, .qual-hero > *, .an-hero > * { position: relative; z-index: 1; }
.div-hero p { color: rgba(255,255,255,.86); }
.genial-fab { background: var(--accent-grad); box-shadow: var(--accent-glow); }

/* ============ operação de frota + operação editorial ============ */

/* faixa do aviso de emergência: precisa gritar sem parecer um erro do sistema */
.alert-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px; border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(179,38,30,.92), rgba(179,38,30,.72));
  color: #fff; box-shadow: 0 10px 26px rgba(179,38,30,.3);
}
.alert-bar b { font-weight: 800; }

.fleet-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fleet-groups { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fleet-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.bulk-bar { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-tint); }
.screen-card.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tint); }
.sc-pick { display: grid; place-items: center; width: 26px; height: 26px; }
.sc-pick input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.sc-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0; }
.tag-chip {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent-ink); border: 1px solid var(--line);
}

/* seletor de dias: alvo grande, estado óbvio — é usado no celular também */
/* os 7 dias têm de caber numa linha: quebrar deixa "Dom" órfão embaixo */
.daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.daypick .day { position: relative; }
.daypick input { position: absolute; opacity: 0; pointer-events: none; }
.daypick span {
  display: grid; place-items: center; padding: 8px 2px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 13px; cursor: pointer;
  color: var(--ink-2); transition: all .12s;
}
.daypick input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.cmd-list { display: flex; flex-direction: column; gap: 8px; }
.cmd-opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.cmd-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.cmd-opt input { margin-top: 3px; accent-color: var(--accent); }

/* uma linha de revisão/reciclagem */
.appr-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.appr-row:last-child { border-bottom: 0; }
.ap-txt { min-width: 0; }
.ap-txt > div { overflow-wrap: anywhere; }
.ap-acts { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.tab-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  /* branco sobre var(--accent) dá 3,4:1 no tema escuro (o acento clareia) e
     este texto tem 11px — precisa de 4,5:1. Azul fixo, passa nos dois. */
  border-radius: 999px; background: #1d4fd8; color: #fff; font-size: 11px; font-weight: 700;
}
.post-card.waiting { border-color: rgba(180,130,0,.55); }
.post-when.warn { color: #b8860b; }
.post-when.bad { color: #c0392b; }
.pill.evergreen { background: rgba(34,150,94,.14); color: #1f8a5b; border-color: rgba(34,150,94,.3); }

.diag-ok, .diag-bad { padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-top: 10px; }
.diag-ok { background: rgba(34,150,94,.12); color: #1f8a5b; }
.diag-bad { background: rgba(192,57,43,.12); color: #c0392b; }
.diag-bad ul { margin: 6px 0 0 18px; }

/* interruptor da política de revisão */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; cursor: pointer; border-radius: 999px;
  background: var(--line); transition: background .16s;
}
.switch span::before {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .16s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

@media (max-width: 720px) {
  .fleet-bar, .appr-row { flex-direction: column; align-items: stretch; }
  .ap-acts { justify-content: flex-end; }
}

/* A regra genérica de input pinta caixas de seleção como campo de texto —
   viram quadradinhos cinza sem estado visível. Devolve o controle nativo. */
input[type="checkbox"], input[type="radio"] {
  appearance: auto; -webkit-appearance: auto;
  width: 17px; height: 17px; min-width: 17px; padding: 0;
  background: none; border: 0; border-radius: 0; backdrop-filter: none;
  accent-color: var(--accent); cursor: pointer; box-shadow: none;
}
.switch input[type="checkbox"] { width: 0; height: 0; min-width: 0; }
.daypick input[type="checkbox"] { width: 0; height: 0; min-width: 0; }

/* Quem repôs este post: eu ou o robô? Sem a marca, o usuário encontra na fila
   um post que jura não ter escrito. */
.pill.robot { background: rgba(12,92,239,.14); color: var(--accent-ink); border-color: var(--accent-tint); }

/* Cartão do piloto automático quando está ARMADO: precisa saltar aos olhos que
   a plataforma vai falar em nome da marca sem ninguém conferir. */
.card.armed { border-color: rgba(180,130,0,.6); box-shadow: 0 0 0 1px rgba(180,130,0,.22); }
.card.armed .card-h { color: #b8860b; }

/* ── entrar com Google ────────────────────────────────────────────────── */
.login-ou { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; }
.login-ou::before, .login-ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600;
  /* a marca do Google exige fundo claro e o wordmark dela — não estilizar “no tema” */
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-google:hover { box-shadow: 0 2px 10px rgba(0,0,0,.28); transform: translateY(-1px); }
.btn-google:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-apple {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600;
  /* a Apple também manda no próprio botão: preto sólido, logo branco, sem
     variação "no tema" da casa. Mesma altura do Google — a diretriz da Apple
     exige que o botão dela não seja menor que os outros. */
  background: #000; color: #fff; border: 1px solid #000;
  margin-top: 10px;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-apple:hover { box-shadow: 0 2px 10px rgba(0,0,0,.35); transform: translateY(-1px); }
.btn-apple:disabled { opacity: .6; cursor: progress; transform: none; }
.login-form .opt { color: var(--muted); font-weight: 400; }

/* ══ NAVEGAÇÃO NO CELULAR ═════════════════════════════════════════════════
   No desktop a coluna da esquerda é a navegação. Empilhada no celular, ela
   vira uma tela inteira de menu na frente do conteúdo: para ver o módulo, a
   pessoa rola um menu que ela não pediu. Aqui o menu vira gaveta. */

.nav-toggle { display: none; }
.nav-scrim { display: none; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 120;
    width: min(82vw, 300px); height: 100dvh;   /* dvh: a barra do navegador some e volta */
    transform: translateX(-101%);
    transition: transform .24s var(--ease);
    overflow-y: auto; overscroll-behavior: contain;
    box-shadow: 0 0 40px rgba(0,0,0,.45);
  }
  .app.nav-open .sidebar { transform: translateX(0); }
  @media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 110;
    background: rgba(8,12,22,.55); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .24s var(--ease);
  }
  .app.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

  /* o botão do menu tem de estar SEMPRE à mão, não no topo de uma rolagem */
  .appbar { position: sticky; top: 0; z-index: 90; gap: 10px; }
  .nav-toggle {
    display: grid; place-content: center; gap: 4px;
    width: 42px; height: 42px; flex-shrink: 0;      /* alvo de toque decente */
    border: 1px solid var(--line); border-radius: 12px;
    background: transparent; cursor: pointer;
  }
  .nav-toggle span {
    display: block; width: 18px; height: 2px; border-radius: 2px;
    background: var(--ink); transition: transform .2s var(--ease), opacity .2s var(--ease);
  }
  .app.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .app.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .app.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* o relógio come a largura do título; a data já está na tela toda */
  .clock { display: none; }
  .page-title { font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* itens de menu com alvo de dedo, não de mouse */
  .sidenav button { padding: 13px 14px; font-size: 15px; }
  .content { padding: 14px 12px 90px; }            /* respiro para o botão flutuante */
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .genial-fab { right: 14px; bottom: 14px; }
}

@media (max-width: 420px) {
  .kpi-row { grid-template-columns: 1fr; }
  /* A pílula de abas nasce inline-flex: como caixa inline ela se dimensiona pelo
     conteúdo e ESTOURA o pai, arrastando a página inteira para o lado — o
     overflow-x sozinho não segura. Precisa virar bloco e ter teto de largura
     para então rolar dentro de si mesma. Vale para todos os módulos com abas. */
  .subnav { display: flex; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav button { white-space: nowrap; flex-shrink: 0; }
}

/* recuperação de senha + aceite legal */
.login-esqueci { text-align: right; margin: 6px 0 2px; }
.login-esqueci a, .login-legal a { color: var(--ink-2); font-size: 12.5px; text-decoration: none; }
.login-esqueci a:hover, .login-legal a:hover { color: var(--accent-ink); text-decoration: underline; }
.login-aceite { display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 4px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.login-aceite input { margin-top: 2px; flex-shrink: 0; }
.login-aceite a { color: var(--accent-ink); }
.ok-msg { color: #1f8a5b; font-size: 13px; margin-top: 10px; line-height: 1.45; }

/* ── Ajustes finos de celular nas telas dos módulos ─────────────────────── */
@media (max-width: 560px) {
  /* dois campos lado a lado viram 170px cada: some com o rótulo e o valor */
  .studio-fields { grid-template-columns: 1fr; }

  /* o modal tem largura fixa de 380px — num aparelho de 360 ele vaza */
  .modal { width: calc(100vw - 24px); max-width: 420px; max-height: 88dvh; overflow-y: auto; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions button { flex: 1 1 auto; min-width: 120px; }

  /* tabela rola dentro do próprio quadro; a sombra avisa que há mais à direita */
  .tbl-wrap { -webkit-overflow-scrolling: touch; }
  .tbl-wrap::after {
    content: ""; position: sticky; right: 0; top: 0; float: right;
    width: 22px; height: 100%; pointer-events: none;
    background: linear-gradient(to right, transparent, var(--surface));
  }

  .row-between { flex-wrap: wrap; gap: 10px; }
  .card-h { flex-wrap: wrap; gap: 8px; }
}

/* ══ SENHAS ═══════════════════════════════════════════════════════════════
   A aba Atendimento é operada o dia inteiro por quem não escolheu usar
   software. Alvo grande, hierarquia óbvia, nada que exija leitura. */
.sn-topo { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.sn-atual { flex: 1; min-width: 200px; text-align: right; }
.sn-senha { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sn-meta { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.sn-prio { color: #b8860b; }

.sn-acoes { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Duas filas lado a lado: espera e atendimento em curso. Empilha no estreito —
   quem opera guichê às vezes está num tablet. */
.sn-duas-filas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* Fluxo por hora: barra cheia = exibido, parte escura = teve público.
   Duas informações na mesma barra porque a comparação ENTRE elas é a
   história — separar em dois gráficos obrigaria o olho a ir e voltar. */
.fx-graf { display: flex; gap: 3px; align-items: flex-end; height: 120px; margin-top: 10px; }
.fx-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.fx-col span { font-size: 10px; color: var(--muted); margin-top: 4px; height: 12px; }
.fx-bar { width: 100%; background: color-mix(in srgb, var(--accent) 26%, transparent);
          border-radius: 3px 3px 0 0; display: flex; flex-direction: column; justify-content: flex-end; min-height: 2px; }
.fx-in { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; }
@media (max-width: 900px) { .sn-duas-filas { grid-template-columns: 1fr; } }
/* o botão que é apertado centenas de vezes por dia não pode ter 32px */
.btn-chamar {
  flex: 1 1 260px; min-height: 64px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--accent-grad); color: #fff; font-size: 19px; font-weight: 700;
  box-shadow: var(--accent-glow); transition: transform .12s var(--ease);
}
.btn-chamar:hover { transform: translateY(-1px); }
.btn-chamar:active { transform: translateY(0) scale(.99); }
.btn-chamar:disabled { opacity: .6; cursor: progress; transform: none; }
.sn-acoes .btn { min-height: 48px; padding: 0 16px; }

.sn-fila { display: flex; flex-direction: column; }
.sn-item {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.sn-item:last-child { border-bottom: 0; }
.sn-item b { font-size: 19px; font-variant-numeric: tabular-nums; }
.sn-item span { color: var(--ink-2); font-size: 13.5px; }
.sn-item i { color: var(--muted); font-size: 12.5px; font-style: normal; white-space: nowrap; }
/* prioritária se distingue por COR E por rótulo — nunca só por cor */
.sn-item.prio b { color: #b8860b; }
.pill.off { background: rgba(120,130,150,.14); color: var(--muted); }

@media (max-width: 640px) {
  .sn-topo, .sn-atual { text-align: left; }
  .sn-acoes { flex-direction: column; align-items: stretch; }
  .btn-chamar { flex: 1 1 auto; }
}

/* O hero da Qualidade era verde→âmbar→vermelho. Num módulo cujo centro É um
   semáforo, gastar as três cores de significado como enfeite tira força do
   único lugar onde elas precisam gritar. Verde/âmbar/vermelho só nos
   indicadores; o cabeçalho fica na cor da casa. */
.qual-hero { background: linear-gradient(122deg, #1d4fd8 0%, var(--accent) 52%, #4d86ff 100%); box-shadow: var(--accent-glow); }
.qual-hero p { color: rgba(255,255,255,.86); }

/* Trecho de documento: a FONTE vem antes do texto. Quem lê precisa saber de
   onde a resposta saiu antes de acreditar nela. */
.doc-trecho { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--glass-quiet); }
.doc-fonte { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.doc-texto { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-texto mark { background: var(--accent-tint); color: var(--ink); padding: 0 2px; border-radius: 3px; }

/* Biblioteca do Estúdio: sem ver a peça, duas linhas de texto são iguais.
   A miniatura é o que transforma a lista numa biblioteca navegável. */
.lib-peca { display: flex; align-items: center; gap: 12px; }
.lib-thumb {
  width: 84px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--glass-quiet);
  display: grid; place-items: center; position: relative;
}
.lib-thumb iframe { width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: top left;
  position: absolute; inset: 0; pointer-events: none; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-sem { font-size: 10px; color: var(--muted); }

/* Moderação: a PEÇA vem antes do texto. Quem aprova está decidindo o que
   aparece na tela de um parceiro — precisa ver o anúncio, não o nome dele. */
.mod-card { display: flex; gap: 18px; padding: 16px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.mod-card:last-child { border-bottom: 0; }
.mod-pecas { display: flex; gap: 8px; flex-shrink: 0; }
.mod-thumb { width: 110px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  background: var(--glass-quiet); display: grid; place-items: center; position: relative; }
.mod-thumb iframe { width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: top left;
  position: absolute; inset: 0; pointer-events: none; }
.mod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-info { flex: 1; min-width: 0; }
.mod-info .name { font-weight: 700; font-size: 16px; }
.mod-quem { color: var(--ink-2); font-size: 13.5px; margin: 2px 0 4px; }
@media (max-width: 640px) { .mod-card { flex-direction: column; } }

/* Primeiro passo: um cartão só, com a ação do lado direito para não virar
   mais um painel de leitura. */
.proximo-passo {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 18px; margin-bottom: 14px;
  border-color: color-mix(in oklab, var(--accent) 34%, var(--line));
  background: linear-gradient(120deg, color-mix(in oklab, var(--accent) 12%, transparent), transparent 62%), var(--glass);
}
.proximo-passo .pp-b { min-width: 0; }
.proximo-passo .pp-tag {
  font-family: var(--font-mono, inherit); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 4px;
}
.proximo-passo h3 { margin: 0 0 4px; font-size: 17px; }
.proximo-passo p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.proximo-passo .btn-primary { flex-shrink: 0; }
@media (max-width: 640px) {
  .proximo-passo { flex-direction: column; align-items: stretch; gap: 12px; }
  .proximo-passo .btn-primary { width: 100%; padding: 12px; }
}

/* Senhas no celular: quem opera está de pé no balcão e só quer o botão de
   chamar. Os quatro KPIs empilhados jogavam a ação para 400px abaixo da dobra —
   no telefone eles vão para o fim; no desktop nada muda. */
@media (max-width: 860px) {
  #senhasPanel { display: flex; flex-direction: column; }
  #senhasPanel .subnav { order: 1; }
  #senhasPanel #sn-body { order: 2; }
  #senhasPanel .kpi-row { order: 3; }
}

/* ══ REPUTAÇÃO ══ nota baixa se distingue por cor E por rótulo. */
.rep-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rep-item:last-child { border-bottom: 0; }
.rep-item.feita { opacity: .62; }
.rep-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-nota { color: var(--amber); font-size: 16px; letter-spacing: 1px; }  /* dourado literal sumia no tema claro */
.rep-item.baixa .rep-nota { color: var(--red); }   /* literal não passava no escuro */
.rep-txt { margin-top: 6px; color: var(--ink-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.rep-resp { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--accent);
  color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.rep-orig { background: var(--glass-quiet); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.pill.on { background: rgba(34,150,94,.14); color: #1f8a5b; border-color: rgba(34,150,94,.3); }

.sn-imp { display: flex; align-items: center; gap: 9px; margin: 4px 0 8px; font-size: 14px; cursor: pointer; }
.sn-imp input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }

/* Caixa de entrada: mensagem não lida precisa saltar sem virar alarme */
.appr-row.cx-nova { border-left: 3px solid var(--accent); padding-left: 11px; }
.cx-corpo {
  white-space: pre-wrap; word-break: break-word; font-family: var(--font);
  font-size: 14px; line-height: 1.55; color: var(--ink-2);
  max-height: 380px; overflow-y: auto; margin: 12px 0 0;
}

.gd-histlist { max-height: 380px; overflow-y: auto; }

/* Avisos: pedem ação, então saltam — mas sem virar alarme de incêndio */
.avisos { margin-bottom: 14px; }
.aviso { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.aviso:last-child { border-bottom: 0; }
.aviso .av-txt { min-width: 0; }
.aviso-alta { border-left: 3px solid var(--red); padding-left: 12px; }
.aviso-media { border-left: 3px solid var(--amber); padding-left: 12px; }
@media (max-width: 640px) { .aviso { flex-direction: column; align-items: stretch; gap: 8px; } }

/* ============================================================================
   CONVERSAS — inbox de WhatsApp, tela cheia.
   ========================================================================== */
/* Conversas mantém a sidebar e a barra de topo, mas o inbox usa a ALTURA toda
   do que sobra (o conteúdo abaixo da barra). Sem hackear a grade da sidebar:
   só tira o padding e o teto de largura DESTE módulo, e fixa a altura. */
/* Em vez de CHUTAR a altura da barra de topo (que variava e empurrava o campo
   para fora da tela), o inbox preenche por FLEX: a área principal vira coluna,
   o conteúdo estica no que sobra, e o inbox ocupa 100% disso. Encaixe exato,
   sem rolagem fantasma. */
/* âncora: a área principal tem a altura da viewport; daí o conteúdo estica no
   que sobra abaixo da barra, e a cadeia de 100% resolve até o inbox. Faltava
   ancorar a .main E incluir o wrapper #chatRoot na cadeia. */
/* o grid do app cresce com a coluna mais alta (a sidebar). No inbox, capa em
   100dvh para não sobrar 36px de rolagem — a sidebar rola por dentro. */
body[data-inbox="1"] .app { height: 100dvh; overflow: hidden; }
body[data-inbox="1"] .main { height: 100dvh; display: flex; flex-direction: column; min-height: 0; }
body[data-inbox="1"] .content { flex: 1; min-height: 0; padding: 0; max-width: none; overflow: hidden; }
body[data-inbox="1"] #view-chat { height: 100%; max-width: none; }
body[data-inbox="1"] #chatRoot { height: 100%; }
.chat-wrap { display: grid; grid-template-columns: 320px 1fr; height: 100%; min-height: 0; background: #070b14; }
@media (max-width: 720px) { .chat-wrap { grid-template-columns: 1fr; } .chat-wrap.aberta .chat-lista { display: none; } }

.chat-col { min-height: 0; display: flex; flex-direction: column; }
.chat-lista { border-right: 1px solid var(--line); }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-top b { flex: 1; font-size: 17px; }
.chat-sair, .chat-cfg { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.chat-sair:hover, .chat-cfg:hover { background: var(--surface-2); color: var(--ink); }
.chat-tabs { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.chat-tabs button { flex: 1; background: none; border: 0; color: var(--muted); padding: 8px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.chat-tabs button.on { background: var(--surface-2); color: var(--ink); font-weight: 600; }

.chat-tickets { flex: 1; overflow-y: auto; }
.chat-item { width: 100%; display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.chat-av { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.chat-av.grande { width: 46px; height: 46px; }
.chat-item-txt { flex: 1; min-width: 0; }
.chat-item-topo { display: flex; justify-content: space-between; align-items: center; }
.chat-item-topo b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-prev { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.chat-tag { font-size: 14px; } .chat-tag.ok { color: #16a34a; } .chat-tag.fila { color: #d97706; }

.chat-conversa { background: #070b14; }
.chat-vazio { margin: auto; color: var(--muted); }
.chat-vazio.sm { margin: 40px auto; font-size: 13px; }
.chat-conv-top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.chat-conv-quem { flex: 1; display: flex; flex-direction: column; }
.chat-conv-acoes { display: flex; gap: 8px; align-items: center; }
.chat-fila { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 6px 8px; font: inherit; font-size: 13px; }

.chat-msgs { flex: 1; overflow-y: auto; padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; }
.chat-bolha { max-width: 68%; padding: 9px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.4; position: relative; }
.chat-bolha-txt { white-space: pre-wrap; word-break: break-word; }
.chat-bolha.dele { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.chat-bolha.minha { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-hora { font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }

.chat-compor { border-top: 1px solid var(--line); padding: 12px 16px; position: relative; display: flex; gap: 10px; align-items: flex-end; }
.chat-compor textarea { flex: 1; resize: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); padding: 11px 14px; font: inherit; font-size: 14.5px; max-height: 140px; }
.chat-enviar { background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 11px 22px; font: inherit; font-weight: 700; cursor: pointer; }
.chat-janela-fechada { flex: 1; background: color-mix(in srgb, #d97706 12%, transparent); border: 1px solid color-mix(in srgb, #d97706 40%, transparent); border-radius: 12px; padding: 12px 16px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.chat-respostas { position: absolute; bottom: 100%; left: 16px; right: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -8px 30px rgba(0,0,0,.18); overflow: hidden; margin-bottom: 6px; }
.chat-respostas button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); padding: 10px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.chat-respostas button:hover { background: var(--surface-2); }

/* Config de Conversas: era uma coluna estreita de 720px centralizada, deixando
   metade da tela vazia e um scroll enorme (feedback Glaysom pág. 28: "aproveitar
   o espaço, duas colunas, espaçamento entre os box"). Agora ocupa a largura e
   distribui os cards em 2–3 colunas. */
.chat-setup { max-width: 1500px; margin: 0 auto; padding: 24px 26px; height: 100vh; overflow-y: auto; }
.chat-setup-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.chat-setup-top b { font-size: 20px; }
.chat-setup-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 18px; align-items: start; }
.chat-setup-body .card { margin: 0; }
@media (max-width: 900px) { .chat-setup-body { grid-template-columns: 1fr; } }
.chat-tpl-prev { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.chat-genial { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: 16px; cursor: pointer; }
.chat-genial:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.chat-genial:disabled { opacity: .5; }

/* ---- Editor visual de fluxo ---- */
.fx-tela { position: fixed; inset: 0; z-index: 200; background: #070b14; display: flex; flex-direction: column; }
.fx-tela-topo { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.fx-tela-topo b { font-size: 18px; }
.fx-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fx-topo { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fx-liga { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.fx-add { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.fx-addbtn { background: var(--surface-2); border: 1px solid; border-radius: 8px; color: var(--ink); padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.fx-acoes { display: flex; gap: 8px; }
.fx-canvas { flex: 1; position: relative; overflow: hidden; cursor: grab; background-color: #0a0f1c; background-image:
  radial-gradient(circle, color-mix(in srgb, var(--muted) 20%, transparent) 1px, transparent 1px);
  background-size: 22px 22px; touch-action: none; }
.fx-canvas.panning { cursor: grabbing; }
.fx-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.fx-arestas { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
/* controles de zoom — fixos sobre o canvas, fora do transform */
.fx-zoomctl { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; box-shadow: 0 6px 20px rgba(0,0,0,.28); z-index: 4; }
.fx-zoomctl button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink);
  font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fx-zoomctl button:hover { background: var(--accent); color: #fff; }
.fx-zoompct { font-size: 12px; color: var(--muted); min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.fx-dica { position: absolute; left: 14px; bottom: 16px; font-size: 12px; color: var(--muted); opacity: .7; pointer-events: none; z-index: 3; }
.fx-no { position: absolute; width: 210px; background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--c) 55%, var(--line));
  border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.22); overflow: hidden; cursor: grab; transition: box-shadow .15s, transform .05s; }
.fx-no:hover { box-shadow: 0 10px 30px rgba(0,0,0,.32); }
.fx-no.dragging { cursor: grabbing; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.fx-no.sel { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent), 0 10px 30px rgba(0,0,0,.32); }
.fx-no-cab { color: #fff; font-weight: 700; font-size: 13px; padding: 8px 11px; display: flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 82%, #000)); }
.fx-no-cab svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.fx-no-cab span { flex: 1; }
.fx-del { cursor: pointer; opacity: .85; font-size: 16px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.fx-del:hover { opacity: 1; background: rgba(255,255,255,.2); }
.fx-no-corpo { padding: 11px 12px; font-size: 13px; color: var(--ink-2, var(--ink)); min-height: 22px; line-height: 1.4; }
.fx-addbtn { display: inline-flex; align-items: center; gap: 6px; }
.fx-addbtn svg { width: 14px; height: 14px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-eb { display: inline-flex; width: 22px; height: 22px; border-radius: 6px; align-items: center; justify-content: center; margin-right: 8px; vertical-align: middle; background: color-mix(in srgb, var(--c) 20%, transparent); }
.fx-eb svg { width: 14px; height: 14px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-editor h4 { display: flex; align-items: center; }
.fx-editor { border-top: 1px solid var(--line); padding: 14px 18px; max-height: 34vh; overflow-y: auto; }
.fx-editor h4 { margin: 0 0 10px; }
.fx-opc { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.fx-opc .inp { flex: 1; }

/* ---- Ícones de linha (substituem os emoji) ---- */
.kpi { position: relative; }
.kpi .k-icon { float: none; position: absolute; top: 14px; right: 14px; width: 38px; height: 38px;
  border-radius: 11px; display: flex; align-items: center; justify-content: center; opacity: 1;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.kpi .k-label { padding-right: 44px; }
.ok-i { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.k-icon .ok-i { width: 20px; height: 20px; }
/* ícone inline em cabeçalhos de seção/abas */
.sec-ic { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center;
  margin-right: 9px; vertical-align: -6px; background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.sec-ic .ok-i { width: 15px; height: 15px; }

/* ---- Genial dock: marca + ícones de linha ---- */
.gd-brand { display: flex; align-items: center; gap: 9px; }
.gd-mark { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #a855f7); box-shadow: 0 4px 14px color-mix(in srgb, #a855f7 45%, transparent); }
.gd-mark svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gd-i { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gd-iconbtn { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.gd-iconbtn:hover { color: var(--ink); }
.gd-iconbtn.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.gd-send { display: flex; align-items: center; justify-content: center; }
.gd-send .gd-i { stroke: #fff; fill: #fff; }
.gd-close { display: flex; align-items: center; justify-content: center; }

/* ---- Publicador: cartão-preview da tela (moldura do aparelho) ---- */
.screen-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.screen-card { position: relative; padding: 0; overflow: hidden; border-radius: 16px; gap: 0;
  background: var(--surface); border: 1px solid var(--line); transition: transform var(--dur, .18s) var(--ease, ease), box-shadow var(--dur, .18s) var(--ease, ease); }
.screen-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.28); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.sc-plan { position: absolute; top: 10px; right: 10px; z-index: 3; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--line); color: var(--muted); }
.sc-plan.b { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.sc-pick { position: absolute; top: 10px; left: 10px; z-index: 3; }
/* a moldura mantém a proporção da orientação */
.sc-frame { padding: 16px 16px 4px; display: flex; align-items: center; justify-content: center; }
.sc-frame.landscape .sc-screen { width: 100%; aspect-ratio: 16 / 9; }
.sc-frame.portrait .sc-screen { height: 168px; aspect-ratio: 9 / 16; }
.sc-screen { position: relative; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 30% 20%, #223, #0b1020 70%); border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.4), 0 8px 22px rgba(0,0,0,.35); }
.sc-screen.online { background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--accent) 55%, #12203f), #0a1530 72%); }
.sc-screen.offline, .sc-screen.inativa { filter: grayscale(.5) brightness(.7); }
.sc-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.03) 3px 4px); pointer-events: none; }
.sc-wm { position: absolute; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: rgba(255,255,255,.14);
  letter-spacing: .02em; text-align: center; padding: 0 10px; text-transform: uppercase; }
.sc-play { width: 42px; height: 42px; position: relative; z-index: 2; fill: none; stroke: rgba(255,255,255,.9); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sc-play path:last-child { fill: rgba(255,255,255,.9); stroke: none; }
.sc-play.dim { stroke: rgba(255,255,255,.4); }
.sc-play.dim path:last-child { fill: none; stroke: rgba(255,255,255,.4); }
.sc-badge { position: absolute; left: 10px; bottom: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(8px);
  background: rgba(10,14,24,.6); color: #fff; border: 1px solid rgba(255,255,255,.14); }
.sc-online { color: #34d399; } .sc-offline { color: #f87171; } .sc-semdisp, .sc-inativa { color: #cbd5e1; }
.sc-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: scPulse 1.6s infinite; }
@keyframes scPulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.sc-content { position: absolute; right: 10px; bottom: 10px; z-index: 3; font-size: 10.5px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 8px; border-radius: 999px; background: rgba(10,14,24,.55); color: rgba(255,255,255,.85); backdrop-filter: blur(8px); }
.sc-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.sc-body h3 { margin: 0; font-size: 16px; }
.sc-meta { display: flex; align-items: center; gap: 5px; }
.sc-pin { width: 14px; height: 14px; stroke: var(--muted); opacity: .8; }
.sc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.sc-foot { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .sc-dot { animation: none; } }

/* ---- Estúdio: exemplos + como funciona ---- */
.st-examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.st-ex { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2, var(--ink)); cursor: pointer; transition: all .15s; }
.st-ex:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.st-how { display: flex; align-items: stretch; gap: 12px; margin-top: 18px; }
.st-how-step { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 4px; position: relative; }
.st-how-step b { font-size: 14px; } .st-how-step span:last-child { font-size: 12.5px; color: var(--muted); }
.st-how-n { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.st-how-arrow { align-self: center; color: var(--muted); font-size: 18px; }
@media (max-width: 720px) { .st-how { flex-direction: column; } .st-how-arrow { transform: rotate(90deg); } }

/* ícone inline em abas de conteúdo */
.tab-ic { display: inline-flex; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.tab-ic .ok-i { width: 16px; height: 16px; }

/* ---- Genial dock: composer amplo (textarea em cima, ações embaixo) ---- */
.gd-composer { display: flex; flex-direction: column; gap: 0; padding: 10px 12px 12px; border-top: 1px solid var(--line);
  background: var(--surface); }
.gd-composer #gd-input {
  width: 100%; resize: none; border: 1px solid var(--line-2); border-radius: 16px 16px 4px 4px; border-bottom: 0;
  padding: 13px 14px; font: inherit; font-size: 14.5px; line-height: 1.5; min-height: 46px; max-height: 200px;
  background: var(--surface-2); color: var(--ink); box-shadow: none; transition: border-color .15s;
}
.gd-composer #gd-input:focus { outline: none; border-color: var(--accent); }
.gd-composer:focus-within #gd-input { border-color: var(--accent); }
.gd-comp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 16px 16px; padding: 6px 8px; background: var(--surface-2); }
.gd-composer:focus-within .gd-comp-row { border-color: var(--accent); }
.gd-comp-right { display: flex; align-items: center; gap: 4px; }
.gd-iconbtn { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; }
.gd-iconbtn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.gd-plus-wrap { position: relative; }
.gd-plusmenu { position: absolute; bottom: 42px; left: 0; z-index: 20; min-width: 178px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 34px rgba(0,0,0,.3); }
.gd-plusmenu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px;
  border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; border-radius: 8px; cursor: pointer; }
.gd-plusmenu button:hover { background: var(--surface-2); }
.gd-plusmenu .gd-i { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }
.gd-send { width: 38px; height: 38px; }

/* ============ Genial AI Studio ============ */
.ais-wrap { display: flex; gap: 16px; align-items: flex-start; }
.ais-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ais-sys { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); flex: 0 0 auto; }
.ais-sys-toggle { width: 100%; text-align: left; background: transparent; border: 0; color: var(--ink); font: inherit; font-weight: 600; font-size: 13px; padding: 12px 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ais-sys-toggle .ok-i { stroke: var(--accent); }
.ais-sys-chev { margin-left: auto; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; flex: 0 0 auto; }
.ais-sys-toggle.open .ais-sys-chev { transform: rotate(180deg); }
/* campo de instruções = mesmo estilo do composer de baixo (cartão limpo) */
.ais-sysinp { display: block; width: calc(100% - 24px); margin: 0 12px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2);
  color: var(--ink); font: inherit; font-size: 14px; line-height: 1.5; padding: 12px 14px; resize: none; min-height: 72px; max-height: 220px; outline: none; transition: border-color .15s, box-shadow .15s; }
.ais-sysinp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.ais-sysinp::placeholder { color: var(--muted); }
.ais-sysinp.hidden { display: none; }
.ais-output { min-height: 340px; max-height: 56vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.ais-msg { display: flex; flex-direction: column; max-width: 88%; }
.ais-msg.user { align-self: flex-end; align-items: flex-end; }
.ais-msg.bot { align-self: flex-start; }
.ais-bubble { padding: 12px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; }
.ais-msg.user .ais-bubble { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #7c3aed)); color: #fff; border-bottom-right-radius: 5px; }
.ais-msg.bot .ais-bubble { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.ais-msg.bot.err .ais-bubble { border-color: var(--red); color: var(--red); }
.ais-pre { background: #0d1220; color: #e6edf7; border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-family: var(--font-mono, monospace); font-size: 12.5px; margin: 8px 0; white-space: pre; }
.ais-code { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 5px; padding: 1px 5px; font-family: var(--font-mono, monospace); font-size: 12.5px; }
.ais-foot { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 5px; padding-left: 4px; }
.ais-copy { background: 0; border: 0; color: var(--muted); cursor: pointer; font-size: 11px; text-decoration: underline; }
.ais-copy:hover { color: var(--accent); }
.ais-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: aisBlink 1.2s infinite; }
.ais-typing span:nth-child(2) { animation-delay: .2s; } .ais-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aisBlink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }
.ais-empty { margin: auto; text-align: center; max-width: 380px; color: var(--muted); }
.ais-empty-mark { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #6366f1, #a855f7); box-shadow: 0 10px 30px color-mix(in srgb, #a855f7 40%, transparent); }
.ais-empty-mark svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ais-empty h3 { font-family: var(--font-display); font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.ais-empty p { font-size: 13.5px; line-height: 1.5; }
/* composer do estúdio = UMA superfície só (estilo ChatGPT/Claude): textarea sem
   caixa própria em cima, linha de ações embaixo, tudo no mesmo cartão. */
.ais-composer { flex: 0 0 auto; display: flex; flex-direction: column; padding: 0; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.ais-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.ais-composer #sc-input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 15px; line-height: 1.55; padding: 15px 18px 6px; min-height: 58px; max-height: 200px; resize: none; }
.ais-composer #sc-input::placeholder { color: var(--muted); }
.ais-composer .gd-comp-row { border: 0; background: transparent; border-radius: 0; padding: 4px 10px 9px; }
/* rail de parâmetros */
.ais-rail { flex: 0 0 288px; position: sticky; top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); overflow-y: auto; }
.ais-rail-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.ais-lbl { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2, var(--ink)); margin: 16px 0 7px; }
.ais-lbl:first-of-type { margin-top: 0; }
.ais-val { font-family: var(--font-mono); font-size: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 1px 7px; border-radius: 6px; }
.ais-modeldesc { margin-top: 6px; line-height: 1.4; }
.ais-range { width: 100%; accent-color: var(--accent); }
.ais-rangehint { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.ais-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 18px 0 0; cursor: pointer; }
.ais-note { margin-top: 16px; line-height: 1.45; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .ais-wrap { flex-direction: column; height: auto; } .ais-rail { flex-basis: auto; } .ais-output { min-height: 340px; } }

/* ============ Genial AI Studio — multimodal ============ */
.ais-modes { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ais-mode-tab { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-align: left; transition: all .15s; }
.ais-mode-tab:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }
.ais-mode-tab.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.ais-mode-ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ais-mode-ic svg { width: 21px; height: 21px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ais-mode-tab.on .ais-mode-ic { background: linear-gradient(135deg, var(--accent), #a855f7); }
.ais-mode-tab.on .ais-mode-ic svg { stroke: #fff; }
.ais-mode-txt { display: flex; flex-direction: column; min-width: 0; }
.ais-mode-txt b { font-size: 14.5px; } .ais-mode-txt span { font-size: 11.5px; color: var(--muted); }
.ais-outhead { display: flex; justify-content: space-between; align-items: center; }
.ais-hint { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
/* chips */
.ais-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ais-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 12.5px; cursor: pointer; }
.ais-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* galeria de imagem */
.ais-gallery { min-height: 340px; max-height: 56vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 20px; }
.ais-imgrow-p { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.ais-imgs { display: flex; flex-wrap: wrap; gap: 12px; }
.ais-tile { position: relative; width: 210px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.ais-tile img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.ais-tile-acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 5px; opacity: 0; transition: opacity .15s; }
.ais-tile:hover .ais-tile-acts { opacity: 1; }
.ais-tile-acts button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(10,14,24,.72); color: #fff; cursor: pointer; font-size: 14px; backdrop-filter: blur(6px); }
.ais-tile-acts button:hover { background: var(--accent); }
.shimmer { position: relative; overflow: hidden; background: var(--surface-2); }
.shimmer::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 22%, transparent), transparent); animation: aisShimmer 1.3s infinite; }
@keyframes aisShimmer { 100% { transform: translateX(100%); } }
/* palco vídeo/áudio */
.ais-stage { min-height: 340px; max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }
.ais-vidload { width: 100%; max-width: 560px; text-align: center; }
.ais-vidframe { width: 100%; aspect-ratio: 16/9; border-radius: 14px; }
.ais-loadbar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 16px 0 10px; }
.ais-loadbar i { display: block; height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #a855f7); animation: aisBar 1.6s ease-in-out infinite; }
@keyframes aisBar { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.ais-loadtxt { font-size: 13px; color: var(--muted); }
.ais-audload { text-align: center; }
.ais-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 70px; margin-bottom: 14px; }
.ais-wave span { width: 4px; height: 14px; border-radius: 4px; background: linear-gradient(180deg, var(--accent), #a855f7); animation: aisWave 1s ease-in-out infinite; }
@keyframes aisWave { 0%,100% { height: 12px; } 50% { height: 56px; } }
.ais-player { width: 100%; max-width: 640px; }
.ais-player video { width: 100%; border-radius: 14px; background: #000; display: block; }
.ais-player.audio audio { width: 100%; }
.ais-player-acts { display: flex; justify-content: flex-end; margin-top: 12px; }
.ais-provnote, .ais-empty { margin: auto; text-align: center; max-width: 400px; color: var(--muted); }
.ais-provmark, .ais-empty-mark { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #6366f1, #a855f7); box-shadow: 0 10px 30px color-mix(in srgb, #a855f7 40%, transparent); }
.ais-empty-mark.ais-imagem { background: linear-gradient(135deg, #ec4899, #f97316); }
.ais-empty-mark.ais-video { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.ais-empty-mark.ais-audio { background: linear-gradient(135deg, #10b981, #22d3ee); }
.ais-provmark svg, .ais-empty-mark svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ais-provnote h3, .ais-empty h3 { font-family: var(--font-display); font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.ais-provnote p, .ais-empty p { font-size: 13.5px; line-height: 1.5; }
.ais-subtabs { display: flex; gap: 6px; }
.ais-subtab { padding: 7px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.ais-subtab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ais-lightbox { display: flex; justify-content: center; }
.ais-lightbox img { max-width: 100%; max-height: 74vh; border-radius: 12px; }

/* imagem inicial (img2img/img2video) dentro do composer do estúdio */
.sc-initwrap { position: relative; align-self: flex-start; margin: 10px 12px 0; }
.sc-initwrap.hidden { display: none; }
.sc-initimg { height: 54px; border-radius: 8px; border: 1px solid var(--vidro-borda, var(--line)); display: block; }
.sc-initx { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #111827; color: #fff; cursor: pointer; font-size: 11px; line-height: 1; }
.ais-composer .gd-plusmenu { bottom: 46px; }

/* ============ OS — acompanhamento da produção (stepper) ============ */
.os-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 14px; margin-bottom: 12px; background: var(--surface-2); }
.os-card:last-child { margin-bottom: 0; }
.os-head { display: flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.os-prog { margin-left: auto; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.os-steps { display: flex; overflow-x: auto; padding-bottom: 4px; }
.os-step { flex: 1 0 100px; position: relative; text-align: center; padding-top: 30px; }
.os-step::before { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px; background: var(--line-2); }
.os-step:first-child::before { display: none; }
.os-step.linkdone::before { background: var(--green); }
.os-dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff; background: #94a3b8;
  border: 3px solid var(--surface-2); box-shadow: 0 0 0 1px #94a3b8; z-index: 1; }
.os-step.concluida .os-dot { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.os-step.atual .os-dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); animation: osPulse 1.7s infinite; }
@keyframes osPulse { 0%,100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 6%, transparent); } }
.os-lbl { font-size: 11.5px; font-weight: 700; color: var(--ink); line-height: 1.2; padding: 0 3px; }
.os-step.pendente .os-lbl { color: var(--muted); }
.os-dt { font-size: 10px; color: var(--muted); margin-top: 4px; }
.os-by { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.os-track { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
/* Analytics: filtro de período customizado (início/fim) ao lado dos presets 7/14/30d */
.an-period { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.an-range { display: flex; align-items: center; gap: 8px; }
.an-range input[type="date"] { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); border-radius: 9px; color: #fff; padding: 6px 10px; font: inherit; font-size: 13px; color-scheme: dark; }
.an-range .an-sep { opacity: .8; font-size: 13px; color: #fff; }
.an-range.active input[type="date"] { border-color: #fff; background: rgba(255, 255, 255, .2); }
.an-range #an-clear { padding: 4px 10px; }

/* Espaçamento vertical entre seções (feedback Glaysom, repetido no PDF: cards e
   blocos ficavam COLADOS, topo de um encostando na base do outro). A causa: os
   painéis de módulo empilhavam kpi-row/subnav/cards num <div> block sem gap. Um
   ÚNICO mecanismo resolve tudo de forma consistente: todo host de conteúdo vira
   uma coluna flex com gap. (Antes havia uma lista parcial + um margin-bottom nos
   cards que DOBRAVA o espaço nos painéis que já eram flex — 40px em vez de 18.) */
#estoquePanel, #divulgadorPanel, #recepcaoPanel, #qualidadePanel, #studioPanel, #settingsPanel,
#analyticsGrid, #senhasPanel, #assistentePanel, #atendentePanel, #cardPanel, #reputacaoPanel,
#tagsPanel, #gStudioPanel, #storeGrid, #consoleBody,
#pub-telas, #pub-streams, #pub-anuncios, #pub-links,
#est-body, #set-body, #sn-body, #qual-body, #rep-body, #st-body, #as-body, #tg-sec-body,
#div-feed, #div-channels, #div-coverage {
  display: flex; flex-direction: column; gap: 18px;
}
/* Com o gap cuidando do respiro, zeramos margens verticais que sobravam da época
   sem gap (ex.: .connect-hero tinha margin-bottom:16 que somava → 34px). */
.view .card, .view [class*="-hero"] { margin-top: 0; margin-bottom: 0; }
/* Um container de resultados VAZIO ainda é um item flex e consome dois gaps
   (18+18=36 entre os vizinhos). Vazio some; volta a aparecer quando recebe conteúdo. */
#st-body > div:empty, #sn-body > div:empty, #div-feed > div:empty { display: none; }

/* Genial AI aberto: o conteúdo reflui p/ a esquerda do dock, em vez de ficar
   coberto (feedback Glaysom pág. 4). Transição suave; desligado no mobile, onde
   o dock ocupa a tela toda. */
.main { transition: padding-right .28s var(--ease, ease); }
body.genial-open .main { padding-right: min(420px, 100vw); }
@media (max-width: 720px) { body.genial-open .main { padding-right: 0; } }

/* input[type=color] como swatch cheio (kit de marca) — antes virava um traço "—" */
input.swatch { height: 44px; width: 100%; padding: 4px; cursor: pointer; border-radius: 10px; }
input.swatch::-webkit-color-swatch-wrapper { padding: 0; }
input.swatch::-webkit-color-swatch { border: none; border-radius: 7px; }
input.swatch::-moz-color-swatch { border: none; border-radius: 7px; }
/* limites de acesso do colaborador (equipe) */
.lim-wrap { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2, rgba(127,127,127,.04)); }
.lim-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.lim-grid.hidden { display: none; }
.lim-chk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: 13px; user-select: none; }
.lim-chk:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.lim-chk input { accent-color: var(--accent); margin: 0; }
.lim-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.lim-row:empty { display: none; }
/* barra de progresso compacta na tabela de OS (console operador) */
.os-mini { height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.os-mini i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--green))); transition: width .4s ease; }
@media (prefers-reduced-motion: reduce) { .os-step.atual .os-dot { animation: none; } }

/* ============================================================================
   GENIAL STUDIO — oficina de produtos (criar → desenvolver → produtizar → distribuir)
   Vivo, não denso: hero de prompt, galeria pra remixar, e um canvas conversacional.
   ========================================================================== */
#gStudioPanel { display: flex; flex-direction: column; gap: 18px; }

/* — a espinha do ciclo, sempre visível — */
.stu-spine { display: flex; gap: 6px; align-items: stretch; }
.stu-step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--glass-quiet); position: relative; min-width: 0; transition: all .3s var(--ease); }
.stu-step .stu-dot { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 12px; background: var(--line-2); color: var(--muted); }
.stu-step .stu-lbl { min-width: 0; line-height: 1.15; }
.stu-step .stu-lbl b { display: block; font-size: 14px; }
.stu-step .stu-lbl span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stu-step.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: var(--edge); }
.stu-step.on .stu-dot { background: var(--accent); color: var(--accent-ink, #fff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.stu-step.done .stu-dot { background: var(--green); color: #fff; }
@media (max-width: 900px) { .stu-step .stu-lbl span { display: none; } }

/* — hero — */
.stu-hero { text-align: center; padding: 26px 20px 6px; }
.stu-hero h1 { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; margin: 0 0 10px;
  background: linear-gradient(180deg, var(--ink), color-mix(in srgb, var(--ink) 55%, var(--accent))); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stu-hero > p { max-width: 620px; margin: 0 auto 20px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.stu-heroinput { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow-lg), var(--edge);
  backdrop-filter: blur(30px) saturate(var(--glass-saturate)); }
.stu-heroinput textarea { width: 100%; resize: none; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5; outline: none; padding: 6px 6px 0; min-height: 52px; }
.stu-heroinput textarea::placeholder { color: var(--muted); }
.stu-go { align-self: flex-end; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--accent-grad, var(--accent)); color: var(--accent-ink, #fff); font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 12px; transition: transform .15s var(--ease), box-shadow .2s; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.stu-go:hover { transform: translateY(-1px); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 45%, transparent); }
.stu-go .gd-i { width: 17px; height: 17px; }

/* — section headers — */
.stu-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 2px -4px; }
.stu-sec-h > span:first-child { font-weight: 700; font-size: 15px; }

/* — galeria de modelos pra remixar — */
.stu-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.stu-tcard { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--glass); position: relative; overflow: hidden;
  transition: transform .18s var(--ease), border-color .18s, box-shadow .2s; }
.stu-tcard:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 16%, transparent); }
.stu-tcard .stu-tic { font-size: 26px; line-height: 1; margin-bottom: 6px; }
.stu-tcard b { font-size: 15px; }
.stu-remix { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: all .18s var(--ease); }
.stu-tcard:hover .stu-remix { opacity: 1; transform: translateX(0); }

.stu-empty { border: 1px dashed var(--line); border-radius: 16px; padding: 26px; text-align: center; color: var(--muted); }
.stu-empty .ico { font-size: 30px; margin-bottom: 6px; }

.stu-media-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stu-mbtn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass-quiet); font-weight: 600; font-size: 14px; transition: all .15s var(--ease); }
.stu-mbtn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.stu-mbtn span { font-size: 17px; }

/* — build view: topbar + 3 colunas — */
.stu-topbar { display: flex; align-items: center; gap: 12px; }
.stu-btitle { font-weight: 800; font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stu-build { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, .9fr); gap: 16px; align-items: stretch; min-height: 560px; }
@media (max-width: 1100px) { .stu-build { grid-template-columns: 1fr; } }
.stu-build > section, .stu-build > aside { border: 1px solid var(--line); border-radius: 18px; background: var(--glass); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }

/* conversa */
.stu-conv-col { }
.stu-conv { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 300px; max-height: 62vh; }
.stu-msg { max-width: 92%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.stu-msg.user { align-self: flex-end; background: var(--accent-grad, var(--accent)); color: var(--accent-ink, #fff); border-bottom-right-radius: 6px; }
.stu-msg.genial { align-self: flex-start; background: var(--glass-quiet); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.stu-msg.thinking { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.stu-msg.thinking span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: stuPulse 1.2s infinite; }
.stu-msg.thinking span:nth-child(2) { animation-delay: .2s; } .stu-msg.thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes stuPulse { 0%,60%,100% { opacity: .3; transform: scale(.8); } 30% { opacity: 1; transform: scale(1); } }
.stu-composer { padding: 12px; border-top: 1px solid var(--line); }

/* prévia */
.stu-pv-head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stu-pv-frame { flex: 1; margin: 14px; border-radius: 14px; border: 1px solid var(--line); background: repeating-linear-gradient(45deg, transparent, transparent 12px, color-mix(in srgb, var(--line) 40%, transparent) 12px, color-mix(in srgb, var(--line) 40%, transparent) 13px); display: grid; place-items: center; }
.stu-pv-empty { text-align: center; max-width: 300px; padding: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.stu-pv-empty .ico { font-size: 34px; } .stu-pv-empty b { color: var(--ink); font-size: 15px; }
.stu-soon { align-self: center; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--amber); background: var(--amber-bg, color-mix(in srgb, var(--amber) 15%, transparent)); padding: 3px 10px; border-radius: 99px; }

/* plano */
.stu-plan-col { }
.stu-plan-empty { padding: 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 6px; margin: auto; }
.stu-plan-empty .ico { font-size: 30px; } .stu-plan-empty b { color: var(--ink); }
.stu-plan-card { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.stu-plan-h { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.stu-plan-b { padding: 16px; overflow-y: auto; flex: 1; }
.stu-plan-tit { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.stu-plan-res { margin: 4px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.stu-plan-sec { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin: 14px 0 8px; }
.stu-plan-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.stu-plan-item b { display: block; font-size: 14px; } .stu-plan-item span { font-size: 13px; color: var(--muted); }
.stu-plan-telas { display: flex; flex-wrap: wrap; gap: 8px; }
.stu-tela-chip { display: inline-flex; flex-direction: column; padding: 7px 12px; border-radius: 10px; background: var(--glass-quiet); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.stu-tela-chip i { font-size: 11px; font-weight: 500; color: var(--muted); font-style: normal; }
.stu-plan-obs { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 13px; line-height: 1.45; }
.stu-plan-cta { padding: 12px 16px; border-top: 1px solid var(--line); }
.stu-plan-cta .btn-primary { width: 100%; }

/* — Studio prévia ao vivo (iframe sandbox + toggle de papel) — */
.stu-pv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stu-role { display: inline-flex; gap: 3px; padding: 3px; border-radius: 99px; background: var(--glass-quiet); border: 1px solid var(--line); }
.stu-role button { border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); padding: 5px 12px; border-radius: 99px; transition: all .15s var(--ease); }
.stu-role button.on { background: var(--accent); color: var(--accent-ink, #fff); }
.stu-pv-frame.live { margin: 0; border: 0; border-radius: 0; background: #fff; overflow: hidden; }
#stu-pv-iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; background: #fff; }
.stu-pv-building { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.stu-pv-building .spinner { width: 30px; height: 30px; }
.stu-build-btn { margin-top: 14px; border: 0; cursor: pointer; background: var(--accent-grad, var(--accent)); color: var(--accent-ink, #fff);
  font-weight: 800; font-size: 15px; padding: 13px 22px; border-radius: 13px; transition: transform .15s var(--ease), box-shadow .2s;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.stu-build-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 50%, transparent); }

/* — Studio Fase 2.1: moldura de celular, ferramentas, plano recolhível, expandir — */
.stu-pv-tools { display: flex; align-items: center; gap: 8px; }
.stu-pv-ic { border: 1px solid var(--line); background: var(--glass-quiet); cursor: pointer; width: 32px; height: 30px; border-radius: 9px; font-size: 14px; color: var(--ink); display: grid; place-items: center; transition: all .15s var(--ease); }
.stu-pv-ic:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }

/* prévia = celular centralizado (mobile-first, feel realista) */
.stu-pv-frame.live { margin: 0; border: 0; border-radius: 0; background: #e9edf6; padding: 16px; display: grid; place-items: center; overflow: auto; }
.stu-phone { width: min(100%, 380px); height: 100%; max-height: 720px; border: 8px solid #14161c; border-radius: 30px; background: #14161c; overflow: hidden; box-shadow: 0 22px 55px rgba(10,18,40,.28); }
.stu-phone iframe { width: 100%; height: 100%; border: 0; border-radius: 22px; background: #fff; display: block; }
.stu-phone.big { width: min(94vw, 420px); height: min(86vh, 880px); max-height: none; }

/* plano recolhível */
.stu-plan-col { position: relative; }
.stu-plan-x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 28px; height: 28px; border: 1px solid var(--line); background: var(--glass); cursor: pointer; border-radius: 8px; font-size: 12px; color: var(--muted); display: grid; place-items: center; }
.stu-plan-x:hover { color: var(--ink); border-color: var(--accent); }
.stu-build.plan-closed { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }

/* expandir = overlay com celular grande */
.stu-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(7,10,18,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 18px; animation: stuFade .18s var(--ease); }
@keyframes stuFade { from { opacity: 0 } to { opacity: 1 } }
.stu-ov-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; width: min(96vw, 900px); max-height: 95vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg), var(--edge); }
.stu-ov-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.stu-ov-bar b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stu-ov-stage { flex: 1; display: grid; place-items: center; padding: 22px; background: #e9edf6; min-height: 0; overflow: auto; }
@media (max-width: 640px) { .stu-ov-bar { flex-wrap: wrap; } }

/* — Studio Fase 3: Produtizar (sheet) + "Seus produtos" — */
.stu-prod-load { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 10px; color: var(--muted); text-align: center; }
.stu-prod-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 8px; }
.stu-prod-form .field { margin-bottom: 10px; }
.stu-prod-preview { display: flex; flex-direction: column; }
/* card como aparece na loja da rede */
.stu-store-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); box-shadow: var(--edge); }
.ssc-ic { font-size: 30px; line-height: 1; flex: none; width: 48px; height: 48px; display: grid; place-items: center; background: var(--glass-quiet); border-radius: 12px; }
.ssc-b { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ssc-b > b { font-size: 15px; }
.ssc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ssc-price { font-size: 14px; color: var(--accent); white-space: nowrap; }

.stu-prod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.stu-pcard { display: flex; gap: 12px; text-align: left; cursor: pointer; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); transition: transform .16s var(--ease), border-color .16s, box-shadow .2s; }
.stu-pcard:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 14%, transparent); }
.stu-pic { font-size: 26px; flex: none; width: 46px; height: 46px; display: grid; place-items: center; background: var(--glass-quiet); border-radius: 12px; }
.stu-pb { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stu-pb > b { font-size: 15px; }
.stu-pb .muted { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stu-pfoot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }

/* ═══════════ FASE 4 · DISTRIBUIR — rede OKLAC ═══════════ */
/* pill de status do produto */
.pill.ok   { background: rgba(34,150,94,.14);  color: #1f8a5b; border: 1px solid rgba(34,150,94,.3); }
.pill.warn { background: rgba(214,158,20,.16); color: #b7860b; border: 1px solid rgba(214,158,20,.34); }
.pill.err  { background: rgba(214,60,60,.14);  color: #c23a3a; border: 1px solid rgba(214,60,60,.3); }
.pill.idle { background: rgba(120,130,150,.14); color: var(--muted); border: 1px solid var(--line); }

/* topbar: botões produtizar + distribuir lado a lado */
.stu-topbtns { display: flex; gap: 8px; align-items: center; }
.stu-dist { border: 1px solid var(--accent); background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; border-radius: 10px; padding: 7px 12px; cursor: pointer; transition: all .15s var(--ease); }
.stu-dist:hover:not(:disabled) { background: var(--accent); color: #fff; }
.stu-dist:disabled { opacity: .45; cursor: not-allowed; }

/* sheet de distribuição */
.stu-dist-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 14px; border-radius: 14px; margin: 4px 0 12px; }
.stu-dist-state .ico { font-size: 30px; }
.stu-dist-state b { font-size: 16px; }
.stu-dist-state.ok   { background: rgba(34,150,94,.10);  border: 1px solid rgba(34,150,94,.25); }
.stu-dist-state.warn { background: rgba(214,158,20,.10); border: 1px solid rgba(214,158,20,.28); }
.stu-dist-state.err  { background: rgba(214,60,60,.10);  border: 1px solid rgba(214,60,60,.25); }
.stu-dist-list { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.stu-dist-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-quiet); font-size: 14px; }

/* varredura barrou: lista de problemas */
.stu-issues { margin-top: 12px; border: 1px solid rgba(214,60,60,.3); border-radius: 12px; overflow: hidden; }
.stu-issues.sm { margin: 8px 0; }
.stu-issues-h { padding: 9px 12px; background: rgba(214,60,60,.12); color: #c23a3a; font-weight: 700; font-size: 13px; }
.stu-issue { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.stu-issue.aviso { border: 0; border-top: 1px solid var(--line); }
.stu-issues.sm .stu-issue:first-child { border-top: 0; }
.ii-tag { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--glass-quiet); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }

/* home: entradas da rede */
.stu-net-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
@media (max-width: 640px) { .stu-net-row { grid-template-columns: 1fr; } }
.stu-netbtn { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); cursor: pointer; transition: all .15s var(--ease); box-shadow: var(--edge); }
.stu-netbtn:hover { border-color: var(--accent); transform: translateY(-1px); }
.stu-netbtn > span:first-child { font-size: 26px; }
.stu-netbtn .nb-t { display: flex; flex-direction: column; gap: 2px; }
.stu-netbtn.op { border-style: dashed; }

/* home: instalados */
.stu-inst-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.stu-ichip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass); cursor: pointer; font-size: 13px; transition: all .15s var(--ease); }
.stu-ichip:hover { border-color: var(--accent); }
.stu-ichip b { font-weight: 600; }

/* mercado: grade de cards da loja */
.stu-hero.sm { padding: 14px 20px 2px; }
.stu-hero.sm h1 { font-size: clamp(20px, 2.4vw, 28px); }
.stu-prod-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 8px; }
.stu-store-card.big { flex-direction: column; cursor: pointer; transition: all .15s var(--ease); }
.stu-store-card.big:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(10,18,40,.14); }
.stu-store-card.big .ssc-ic { width: 54px; height: 54px; font-size: 32px; }
.ssc-meta { margin-top: 4px; }
.ssc-actions { display: flex; gap: 8px; margin-top: 12px; }
.ssc-actions button { flex: 1; }

/* mercado/revisão: prévia dentro de modal */
.stu-mkt-prev { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stu-mkt-prev .stu-phone { height: min(64vh, 560px); }

/* revisão: fila de curadoria */
.stu-rev-list { display: flex; flex-direction: column; gap: 12px; }
.stu-rev-card { border: 1px solid var(--line); border-radius: 16px; background: var(--glass); padding: 14px; box-shadow: var(--edge); }
.rev-head { display: flex; gap: 12px; align-items: flex-start; }
.rev-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rev-b > b { font-size: 15px; }
.rev-clean { padding: 8px 0 2px; }
.rev-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ═══════════ FASE 5 · EXTERNO — sites e ferramentas ═══════════ */
/* seletor de tipo (Módulo | Site | Ferramenta) */
.stu-kindpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 720px; margin: 6px auto 0; }
@media (max-width: 560px) { .stu-kindpick { grid-template-columns: 1fr; } }
.stu-kind { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); cursor: pointer; transition: all .15s var(--ease); }
.stu-kind:hover { border-color: var(--accent); }
.stu-kind.on { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent) inset; }
.stu-kind .sk-ic { font-size: 24px; }
.stu-kind .sk-t { display: flex; flex-direction: column; gap: 1px; }

/* build de site: 2 painéis (conversa + prévia grande) */
.stu-build.site { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
@media (max-width: 1100px) { .stu-build.site { grid-template-columns: 1fr; } }
.stu-pv-frame.site { padding: 0; background: var(--glass-quiet); overflow: auto; }

/* moldura web: celular estreito ou "computador" largo */
.stu-webframe { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 14px 40px rgba(10,18,40,.20); transition: width .2s var(--ease); }
.stu-webframe.mobile { width: min(100%, 390px); height: min(100%, 720px); border: 8px solid #14161c; border-radius: 26px; }
.stu-webframe.desktop { width: 100%; height: 100%; min-height: 480px; border: 1px solid var(--line); }
.stu-webframe iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.stu-pv-frame.site .stu-webframe.mobile { margin: 14px auto; }

/* overlay de site: barra com fechar, corpo rolável, moldura grande */
.stu-ov-card.wide { width: min(96vw, 1200px); }
.stu-ov-x { border: 0; background: var(--glass-quiet); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 15px; }
.stu-ov-x:hover { color: var(--ink); }
.stu-ov-body { flex: 1; min-height: 0; overflow: auto; padding: 16px; display: grid; place-items: center; background: var(--glass-quiet); }
.stu-webframe.big.mobile { height: min(82vh, 800px); }
.stu-webframe.big.desktop { height: min(82vh, 800px); }

/* campo de endereço público (base + slug) */
.stu-slug { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--glass-quiet); }
.stu-slug .inp { border: 0; background: transparent; padding: 9px 2px; flex: 1; }
.stu-slug .muted { white-space: nowrap; }

/* respostas capturadas (leads dos sites) */
.stu-cap-list { display: flex; flex-direction: column; gap: 10px; max-height: 56vh; overflow: auto; }
.stu-cap { border: 1px solid var(--line); border-radius: 12px; background: var(--glass-quiet); padding: 10px 12px; }
.stu-cap-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.stu-cap-b { display: flex; flex-direction: column; gap: 4px; }
.stu-cap-f { display: flex; gap: 8px; font-size: 14px; }
.stu-cap-f > b { flex: none; min-width: 90px; color: var(--muted); font-weight: 600; text-transform: capitalize; }
.stu-cap-f > span { min-width: 0; word-break: break-word; }

/* ═══════════ Atendente · rosto ao vivo (Spatius) ═══════════ */
.at-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.at-face { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); cursor: pointer; transition: all .15s var(--ease); }
.at-face b { text-align: center; }
.at-face:hover { border-color: var(--accent); }
.at-face.on { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent) inset; }
.at-face-av { width: 100%; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7b5cff)); }
.at-face b { font-size: 13px; }
/* Cenários: mais largos que as fichas de gente, porque o que se julga aqui é o
   AMBIENTE — miniatura estreita de um salão não diz nada. */
.at-cenarios { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.at-cen-tit { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.at-cen-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.at-cen { display: flex; flex-direction: column; gap: 7px; padding: 7px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--glass); cursor: pointer; transition: all .15s var(--ease); }
.at-cen-img { display: block; width: 100%; aspect-ratio: 4/3; border-radius: 10px;
  background-size: cover; background-position: center; }
.at-cen b { font-size: 12.5px; text-align: center; }
.at-cen:hover { border-color: var(--accent); }
.at-cen.on { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent) inset; }

.at-cen-marca { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.at-gerar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 14px; }
.at-gerar-txt { flex: 1; min-width: 240px; font-size: 13px; }
.at-gerar-acao { display: flex; align-items: center; gap: 8px; }

/* --- Apresentador: a prévia manda na tela --- */
.ap-grade { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .ap-grade { grid-template-columns: 1fr; } }
.ap-palco-col { position: sticky; top: 12px; }
.ap-palco { width: 100%; aspect-ratio: 9/16; position: relative; overflow: hidden; border-radius: 16px;
  background: #0b1017 center/cover no-repeat; border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,.45); transition: aspect-ratio .25s var(--ease); }
/* O elenco não ocupa espaço: é só o berço dos vídeos, que se posicionam
   absolutos dentro do palco. `inset:0` sem fundo mantém a imagem do cenário
   do palco visível por trás. */
.ap-elenco { position: absolute; inset: 0; }
.ap-palco video { position: absolute; display: block; will-change: top, left, width; }
.ap-formatos { display: flex; gap: 8px; margin-top: 12px; }
.ap-fmt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--glass); cursor: pointer;
  transition: all .15s var(--ease); font-size: 12px; }
.ap-fmt-ico { width: 22px; border-radius: 3px; background: var(--muted); opacity: .55; }
.ap-fmt:hover { border-color: var(--accent); }
.ap-fmt.on { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent) inset; }
.ap-fmt.on .ap-fmt-ico { background: var(--accent); opacity: 1; }
.ap-controles { display: flex; flex-direction: column; gap: 14px; }
.ap-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.ap-face { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--glass); cursor: pointer; transition: all .15s var(--ease); font-size: 12px; }
.ap-face-img { display: block; width: 100%; aspect-ratio: 1/1; border-radius: 9px; background-size: cover; background-position: center top; }
.ap-face b { text-align: center; font-size: 12px; }
.ap-face:hover { border-color: var(--accent); transform: translateY(-1px); }
.ap-face.on { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent) inset; }
.ap-cens { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.ap-cen { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--glass); cursor: pointer; transition: all .15s var(--ease); }
.ap-cen-img { display: block; width: 100%; aspect-ratio: 4/3; border-radius: 9px; background-size: cover; background-position: center; }
.ap-cen b { text-align: center; font-size: 12px; }
.ap-cen:hover { border-color: var(--accent); }
.ap-cen.on { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent) inset; }
/* Seletor de criações — a mesma janela para qualquer módulo */
.esc-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.esc-topo b { flex: 1; font-size: 15px; }
.esc-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
  max-height: 62vh; overflow-y: auto; padding-right: 4px; }
.esc-item { display: flex; flex-direction: column; gap: 5px; padding: 7px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--glass); cursor: pointer; text-align: left; color: inherit;
  transition: all .15s var(--ease); font: inherit; }
.esc-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.esc-thumb { display: grid; place-items: center; aspect-ratio: 4/3; border-radius: 9px; overflow: hidden; background: #000; }
.esc-thumb img, .esc-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.esc-ico { font-size: 30px; }
.esc-item b { font-size: 12.5px; line-height: 1.3; }

/* O vídeo pronto abre por cima; o resto desfoca para não competir. */
.ap-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 24px;
  background: rgba(6,10,16,.62); backdrop-filter: blur(14px) saturate(.9); animation: ap-entra .18s var(--ease); }
.ap-modal-caixa { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.ap-modal-pe { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ap-modal-pe > div { flex: 1; min-width: 0; }
.ap-modal-pe b { font-size: 13.5px; }
@keyframes ap-entra { from { opacity: 0; } to { opacity: 1; } }
/* Identidade: as três imagens da marca, lado a lado */
.idv-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.idv-logo { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--glass); }
.idv-logo-vitrine { display: grid; place-items: center; height: 76px; border-radius: 8px; margin-bottom: 4px;
  background: repeating-conic-gradient(color-mix(in oklab, var(--ink) 6%, transparent) 0% 25%, transparent 0% 50%) 50%/14px 14px; }
.idv-logo-vitrine img { max-height: 64px; max-width: 100%; object-fit: contain; }
.idv-logo-acts { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.idv-logo-acts label { cursor: pointer; }

.ap-status { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--glass); font-size: 13.5px; }
.ap-status .btn { margin-left: auto; }
.ap-spin { width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-top-color: var(--accent);
  animation: ap-gira .8s linear infinite; }
@keyframes ap-gira { to { transform: rotate(360deg); } }
.ap-pos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.ap-pos .btn { margin-left: auto; }
.ap-check { display:flex; gap:8px; align-items:center; margin-top:10px; font-size:13.5px; cursor:pointer; }
.ap-check input { accent-color: var(--accent); }
.ap-slider { margin-bottom: 12px; }
.ap-slider label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.ap-slider input[type=range] { width: 100%; accent-color: var(--accent); }
.ap-recentes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.ap-rec { display: flex; flex-direction: column; gap: 5px; padding: 7px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--glass); text-decoration: none; color: inherit; transition: all .15s var(--ease); }
.ap-rec:hover { border-color: var(--accent); transform: translateY(-2px); }
/* todos os cartões no mesmo formato: mistura de 9:16 com 16:9 deixa a fileira
   desalinhada e suja. O vídeo preenche o quadro do cartão e o resto é corte. */
.ap-rec video { width: 100%; aspect-ratio: 3/4; border-radius: 9px; background: #000;
  object-fit: cover; display: block; }
.ap-rec b { font-size: 12.5px; line-height: 1.35; }
.ap-aviso { padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--glass);
  border-radius: 8px; font-size: 13.5px; }

.at-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.at-chip { padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .15s var(--ease); }
.at-chip:hover { border-color: var(--accent); color: var(--ink); }
.at-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.at-test-out:not(:empty) { margin-top: 10px; }
.at-test-ok { padding: 12px 14px; border: 1px solid rgba(34,150,94,.3); background: rgba(34,150,94,.10); border-radius: 12px; font-weight: 600; color: #1f8a5b; }
.at-test-ok .muted { color: var(--muted); font-weight: 400; }
.at-test-err { padding: 12px 14px; border: 1px solid rgba(214,60,60,.3); background: rgba(214,60,60,.10); border-radius: 12px; color: #c23a3a; font-size: 14px; }

/* rosto ao vivo (teste no config) */
.at-live { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-top: 10px; }
.at-live-frame { width: min(100%, 320px); aspect-ratio: 1/1; border-radius: 18px; overflow: hidden; background: #0c0e14; border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(10,18,40,.22); }
.at-live-frame video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0c0e14; }
.at-live-side { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 8px; }
.at-live-side .at-test-ok { display: inline-flex; align-items: center; gap: 6px; }

/* rosto econômico: palco com clipe de repouso (grátis) + camada ao vivo (crossfade) */
.at-face-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.at-facestage { position: relative; width: min(100%, 300px); aspect-ratio: 1/1; border-radius: 18px; overflow: hidden; background: #0c0e14; border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(10,18,40,.22); }
.at-facestage video, .at-facestage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.at-fs-clip { z-index: 1; }
.at-fs-photo { z-index: 1; }
.at-fs-live { z-index: 2; opacity: 0; transition: opacity .5s var(--ease); background: #0c0e14; }
.at-facestage.live .at-fs-live { opacity: 1; }
.at-fs-badge { position: absolute; left: 10px; bottom: 10px; z-index: 3; font-size: 12px; font-weight: 700; color: #fff; background: rgba(10,14,22,.66); backdrop-filter: blur(6px); padding: 5px 10px; border-radius: 99px; }
.at-facestage.live .at-fs-badge { color: #ffd7d7; background: rgba(120,20,20,.6); }

/* ═══ Atendente · ficha de quem atende (cara própria, mais humana) ═══ */
.at-ficha { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start;
  padding: 20px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--glass)), var(--glass));
  box-shadow: var(--edge); }
@media (max-width: 780px) { .at-ficha { grid-template-columns: 1fr; } }
.at-ficha-foto { width: 100%; aspect-ratio: 4/5; border-radius: 18px; overflow: hidden; background: #0c0e14;
  border: 1px solid var(--line); box-shadow: 0 16px 40px -18px rgba(10,18,40,.5); }
.at-ficha-b { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.at-ficha-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.at-ficha-top h2 { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); line-height: 1.05; }
.at-ficha-linha { display: flex; gap: 12px; flex-wrap: wrap; }
.at-ficha-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.at-tons { display: flex; flex-wrap: wrap; gap: 8px; }

/* liga/desliga como interruptor de gente, não checkbox */
.at-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.at-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.at-track { position: relative; width: 46px; height: 26px; border-radius: 99px; background: var(--glass-quiet);
  border: 1px solid var(--line); transition: .22s var(--ease); flex: none; }
.at-track::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; left: 3px; top: 3px;
  background: var(--muted); transition: .22s var(--ease); }
.at-switch input:checked + .at-track { background: rgba(34,150,94,.22); border-color: rgba(34,150,94,.55); }
.at-switch input:checked + .at-track::before { transform: translateX(20px); background: #34d399; }
.at-switch-txt { font-size: 13px; font-weight: 600; color: var(--muted); }

/* habilidades: o que ele SABE FAZER, com prontidão e o que falta */
.at-habs { display: flex; flex-direction: column; gap: 10px; }
.at-hab { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--glass-quiet); }
.at-hab.falta { border-color: rgba(214,158,20,.34); background: rgba(214,158,20,.07); }
.at-hab-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; background: rgba(34,150,94,.16); color: #1f8a5b; }
.at-hab.falta .at-hab-ic { background: rgba(214,158,20,.2); color: #b7860b; }
.at-hab-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.at-hab-b > b { font-size: 15px; }
.at-hab-det { font-size: 12.5px; color: var(--muted); }
.at-hab-det.warn { color: #b7860b; font-weight: 600; }
.at-hab > .btn { flex: none; align-self: center; }

/* ensaio: conversar com ele antes de botar no balcão */
.at-ensaio { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass-quiet); }
.at-ens-vazio { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.at-ens-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45;
  display: flex; flex-direction: column; gap: 5px; }
.at-ens-msg.eu { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.at-ens-msg.ele { align-self: flex-start; background: var(--glass); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.at-ens-tool { font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--accent);
  background: var(--accent-tint); border-radius: 99px; padding: 3px 9px; align-self: flex-start; }
.at-ens-form { display: flex; gap: 8px; margin-top: 10px; }
.at-ens-form .inp { flex: 1; }
.at-ens-sug { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ── BARRA RECOLHÍVEL ─────────────────────────────────────────────────────
 *
 * Com todos os módulos ligados a barra come 260px de uma tela que o Assistente
 * e o Publicador querem inteira. Recolhida ela vira uma trilha de ícones de
 * 76px e devolve quase 200px ao conteúdo.
 *
 * Três armadilhas deste recurso, todas tratadas aqui:
 *  1. PISCAR AO CARREGAR — o estado é aplicado em `<html>` antes da primeira
 *     pintura (script no <head>); esta folha só reage à classe.
 *  2. RÓTULO ESPREMIDO — o texto não encolhe junto: ele é `nowrap`, sai por
 *     opacidade e largura zero. Texto que reflui durante a animação é o que faz
 *     a transição parecer quebrada.
 *  3. NO CELULAR NÃO EXISTE — lá a barra já é gaveta; recolher por cima disso
 *     daria duas navegações concorrentes.
 */
.sb-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-recolher {
  flex: 0 0 auto; display: grid; place-content: center; width: 30px; height: 30px;
  border: 1px solid var(--line); border-radius: 9px; background: transparent;
  color: var(--muted); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.sb-recolher svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sb-recolher:hover { background: color-mix(in oklab, var(--ink) 6%, transparent); color: var(--ink); }

/* animar grid-template-columns dá a transição inteira num só lugar */
.app { transition: grid-template-columns .26s var(--ease); }
:root.sb-recolhida .app { grid-template-columns: 76px 1fr; }

:root.sb-recolhida .sb-recolher { transform: rotate(180deg); }
:root.sb-recolhida .sb-brand { justify-content: center; padding: 22px 10px 12px; }
:root.sb-recolhida .sb-brand img { display: none; }

.sidenav button span { white-space: nowrap; overflow: hidden; }
:root.sb-recolhida .sidenav { padding: 6px 8px; }
:root.sb-recolhida .sidenav button { justify-content: center; padding: 9px 0; gap: 0; }
:root.sb-recolhida .sidenav button span { width: 0; opacity: 0; }
:root.sb-recolhida .sidenav button .i { flex: 0 0 auto; }

/* o título do grupo vira um traço: some o texto, fica a divisão */
:root.sb-recolhida .sb-group { font-size: 0; letter-spacing: 0; padding: 12px 10px 6px; }
:root.sb-recolhida .sb-group::after {
  content: ""; display: block; height: 1px; background: var(--line-2); border-radius: 1px;
}

:root.sb-recolhida .sb-foot { padding: 12px 8px; align-items: center; }
:root.sb-recolhida .sb-empresa { display: none; }
:root.sb-recolhida .sb-logout { width: 40px; padding: 8px 0; font-size: 0; }
:root.sb-recolhida .sb-logout::after { content: "⏻"; font-size: 15px; line-height: 1; }

/* A DICA: recolhida, o ícone sozinho é enigma — o rótulo volta ao lado dele.
 *
 * ⚠️ NÃO é pseudo-elemento do botão. A lista rola, e um `::after` que sai da
 * caixa vira rolagem HORIZONTAL dentro dela — apareceu uma barrinha no rodapé
 * da barra lateral. A dica é um elemento só, preso ao corpo da página e
 * posicionado por JS: fora do contêiner que rola, nada a recortar, nada a
 * empurrar. */
.sb-dica {
  position: fixed; z-index: 200; pointer-events: none;
  padding: 6px 10px; border-radius: 9px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; transform: translateX(-4px);
  transition: opacity .14s var(--ease), transform .14s var(--ease);
}
.sb-dica.on { opacity: 1; transform: translateX(0); }

:root.sb-recolhida .sidenav button.active::before { left: -6px; }

@media (max-width: 980px) {
  /* no celular a barra é gaveta — recolher aqui criaria duas navegações */
  .sb-recolher { display: none; }
  :root.sb-recolhida .app { grid-template-columns: 1fr; }
  :root.sb-recolhida .sb-brand img { display: block; }
  :root.sb-recolhida .sidenav button { justify-content: flex-start; padding-left: 12px; gap: 11px; }
  :root.sb-recolhida .sidenav button span { width: auto; opacity: 1; }
  :root.sb-recolhida .sidenav button::after { display: none; }
  :root.sb-recolhida .sb-group { font-size: 10.5px; }
  :root.sb-recolhida .sb-group::after { display: none; }
  :root.sb-recolhida .sb-empresa { display: block; }
  :root.sb-recolhida .sb-logout { width: auto; font-size: 13px; }
  :root.sb-recolhida .sb-logout::after { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app, .sb-recolher, .sidenav button span { transition: none; }
}

/* ── BARRA DE ROLAGEM ─────────────────────────────────────────────────────
 *
 * A do sistema é grossa, cinza e não pertence a esta interface — e numa tela
 * de painel ela aparece em meia dúzia de caixas ao mesmo tempo, riscando o
 * desenho todo.
 *
 * Aqui ela é INVISÍVEL parada. Aparece em duas situações, que são exatamente as
 * duas em que alguém precisa dela: quando o ponteiro está sobre a área que rola
 * (vou usar) e enquanto a rolagem acontece (estou usando). Fora disso não há
 * barra nenhuma na tela.
 *
 * O espaço continua reservado (`width` fixo): fazer a barra aparecer e sumir
 * mexendo na largura empurraria o conteúdo alguns pixels para o lado a cada
 * passada do ponteiro.
 */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: color-mix(in oklab, var(--ink) 20%, transparent) transparent; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background: transparent; background-clip: content-box;
  border: 3px solid transparent;      /* afina o polegar sem estreitar o alvo */
  border-radius: 99px;
  transition: background .2s var(--ease);
}
*:hover::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--ink) 16%, transparent); background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in oklab, var(--ink) 32%, transparent); background-clip: content-box; }
::-webkit-scrollbar-thumb:active { background: color-mix(in oklab, var(--accent) 55%, transparent); background-clip: content-box; }

/* enquanto a rolagem acontece ela aparece sozinha, mesmo longe do ponteiro */
:root.rolando ::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--ink) 22%, transparent); background-clip: content-box; }

/* ── A lista de módulos ───────────────────────────────────────────────────
 *
 * Aqui a barra é quase invisível parada e aparece quando o ponteiro chega —
 * mas o que de fato resolve "tem mais coisa abaixo" é o ESMAECIDO nas pontas:
 * o conteúdo se dissolve na borda em vez de ser cortado por uma linha reta.
 * Diz a mesma coisa que a barra, ocupa zero, e mantém o acabamento arredondado
 * do painel, que é o que a barra do sistema estragava.
 */
.sidenav {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
}
.sidenav::-webkit-scrollbar { width: 7px; }
.sidenav::-webkit-scrollbar-thumb { border-width: 2px; }
/* na barra lateral basta o ponteiro estar no painel, não em cima da lista */
.sidebar:hover .sidenav::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--ink) 22%, transparent); background-clip: content-box; }
/* Recolhida, nenhuma barra: a trilha de ícones tem 76px e qualquer barra ali
 * pesa mais do que informa. O aviso de "tem mais abaixo" fica por conta do
 * esmaecido nas pontas (abaixo), que diz a mesma coisa sem ocupar espaço. */
:root.sb-recolhida .sidenav { scrollbar-width: none; scrollbar-gutter: auto; }
:root.sb-recolhida .sidenav::-webkit-scrollbar { width: 0; height: 0; }

/* ── AGENTE GENIAL AI · sala de comando ───────────────────────────────────
 *
 * Planta do bench de referência (ui/jane-bench.html):
 *
 *   ┌ trilha ┐ ┌──── PALCO ────┐ ┌ ATIVIDADE ┐
 *   │ medidor│ │  rosto + ondas │ │  cartões  │
 *   └────────┘ └────────────────┘ └───────────┘
 *   └──────────── CONSOLE: deck + entrada ─────────────┘
 *
 * O rosto no CENTRO porque é o interlocutor. A conversa à direita como LINHA DO
 * TEMPO de cartões, não bolhas: cada coisa que aconteceu é um evento com glifo,
 * hora e corpo. A entrada embaixo, atravessando, junto do deck.
 *
 * ★ Sobre o VIDRO da plataforma, não sobre fundo próprio. O caráter de
 * instrumento vem do vocabulário — mono espaçado, moldura de canto, onda, nó —
 * e ele funciona igual sobre vidro claro ou escuro. Fundo preto próprio faria
 * o módulo parecer colado de fora.
 */
.av-corpo3 { display: grid; grid-template-columns: minmax(180px,.62fr) 1.35fr minmax(250px,.95fr);
  gap: 14px; align-items: start; }
@media (max-width: 1280px) { .av-corpo3 { grid-template-columns: minmax(170px,.6fr) 1.3fr } .av-col3 { display: none } }
@media (max-width: 940px)  { .av-corpo3 { grid-template-columns: 1fr } }

/* ---- o palco no centro: o atendente tem CENÁRIO ---- */
.av-quadro { position: relative; aspect-ratio: 1/1; max-height: 44vh; margin: 0 auto; }
.av-quadro .av-halo { position: absolute; inset: -12px; border-radius: 20px; pointer-events: none;
  border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent);
  box-shadow: 0 0 34px -10px color-mix(in oklab, var(--accent) 50%, transparent);
  animation: avRespira 4.6s ease-in-out infinite; }
@keyframes avRespira { 0%,100% { opacity: .4 } 50% { opacity: .95 } }
/* ⚠️ `.av-quadro >` de propósito: o palco injeta a folha DELE quando monta, ou
 * seja, depois desta. Com a mesma especificidade a dele vence e o palco volta a
 * `position: relative` — o quadro colapsa para 2px de altura e o rosto some.
 * Um seletor de dois níveis resolve sem !important. */
.av-quadro > .av-palco { position: absolute; inset: 0; border-radius: 12px; overflow: hidden;
  background: #0b1017 center/cover no-repeat;
  border: 1px solid color-mix(in oklab, var(--accent) 26%, var(--line)); }
.av-canto { position: absolute; width: 18px; height: 18px; pointer-events: none; opacity: .9;
  filter: drop-shadow(0 0 5px color-mix(in oklab, var(--accent) 55%, transparent)); z-index: 4; }
.av-canto.tl { top: 8px; left: 8px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-top-left-radius: 4px; }
.av-canto.tr { top: 8px; right: 8px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); border-top-right-radius: 4px; }
.av-canto.bl { bottom: 8px; left: 8px; border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); border-bottom-left-radius: 4px; }
.av-canto.br { bottom: 8px; right: 8px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); border-bottom-right-radius: 4px; }
.av-estado { position: absolute; left: 10px; bottom: 10px; z-index: 5; display: flex; align-items: center; gap: 7px;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 9px; letter-spacing: 3px;
  color: #dfeaf5; background: rgba(6,10,16,.72); border: 1px solid rgba(255,255,255,.12);
  padding: 5px 9px; border-radius: 99px; backdrop-filter: blur(6px); }
.av-estado i { font-style: normal; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); }
.av-estado.ouvindo i, .av-estado.falando i { animation: avPisca 1s steps(1) infinite; }
.av-estado.pensando i { background: #ffcc44; box-shadow: 0 0 8px #ffcc44; }
.av-estado.falando i { background: #2bff9e; box-shadow: 0 0 8px #2bff9e; }
.av-legenda { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 30px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(4,8,13,.9));
  font-size: 14.5px; line-height: 1.35; color: #f2f7fc; text-align: center; }
.av-legenda .cur { display: inline-block; width: 7px; height: 12px; background: var(--accent);
  margin-left: 5px; vertical-align: -1px; animation: avPisca 1s steps(1) infinite; }

/* ---- as duas ondas ---- */
.av-ondas { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.av-onda { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: color-mix(in oklab, var(--ink) 4%, transparent); border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 9px; }
.av-onda b { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8.5px; letter-spacing: 2px;
  color: var(--muted); font-weight: 500; flex: 0 0 auto; transition: color .2s var(--ease); }
.av-onda.on b { color: var(--accent); }
.av-onda canvas { display: block; flex: 1; min-width: 0; width: 100%; height: 28px; }
.av-troca { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 9px; color: var(--muted); }

/* ---- AGORA ---- */
.av-agora { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.av-agora .p { width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px var(--accent); flex: 0 0 auto; }
.av-agora .t { font-size: 21px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink); font-family: 'Rajdhani', sans-serif; }

/* ---- ATIVIDADE: cartões numa linha ---- */
.av-linha-t { display: flex; flex-direction: column; max-height: 48vh; overflow: auto; padding-right: 3px; }
.av-ev { display: flex; gap: 9px; animation: avSobe .3s ease both; }
.av-ev .no { display: flex; flex-direction: column; align-items: center; width: 11px; flex: 0 0 auto; padding-top: 10px; }
.av-ev .no s { width: 7px; height: 7px; border-radius: 50%; text-decoration: none; background: var(--accent);
  box-shadow: 0 0 8px color-mix(in oklab, var(--accent) 60%, transparent); flex: 0 0 auto; }
.av-ev .no u { width: 1px; flex: 1; margin-top: 4px; text-decoration: none;
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 26%, transparent), transparent); }
.av-cartao { flex: 1; min-width: 0; margin-bottom: 9px; padding: 9px 11px; border-radius: 11px;
  background: color-mix(in oklab, var(--ink) 4%, transparent); border: 1px solid var(--line); }
.av-cartao .cab { display: flex; align-items: center; gap: 8px; }
.av-cartao .gl { font-size: 11px; color: var(--accent); flex: 0 0 auto; }
.av-cartao .tt { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 10.5px; font-weight: 600;
  letter-spacing: .5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-cartao .hr { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 9px; color: var(--muted); flex: 0 0 auto; }
.av-cartao .cp { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.45; }
.av-ev.ok .no s { background: #17a673; box-shadow: 0 0 8px color-mix(in oklab, #2bff9e 55%, transparent); }
.av-ev.ok .av-cartao .gl { color: #17a673; }
.av-ev.erro .no s { background: #c73b4e; }
.av-ev.erro .av-cartao { border-color: color-mix(in oklab, #ff4d6d 34%, var(--line)); }
.av-ev.erro .av-cartao .gl { color: #c73b4e; }
.av-ev.eu .av-cartao { border-color: color-mix(in oklab, var(--accent) 32%, var(--line)); }
.av-ev.aviso .av-cartao { border-color: color-mix(in oklab, #ffcc44 46%, var(--line)); }
.av-ev.aviso .av-cartao .gl { color: #b47b09; }
.av-ev.aviso .no s { background: #b47b09; }
.av-marco { display: flex; align-items: center; gap: 8px; margin: 10px 0 8px; }
.av-marco span { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8.5px; letter-spacing: 3px;
  color: var(--muted); white-space: nowrap; }
.av-marco i { height: 1px; flex: 1; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 30%, transparent), transparent); }

/* ---- CONSOLE (espelha o do bench: régua, deck, entrada) ---- */
.av-console { margin-top: 14px; padding: 12px 16px 14px; border-radius: var(--radius, 18px);
  background: var(--glass); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--line); box-shadow: var(--shadow), var(--edge);
  display: flex; flex-direction: column; gap: 10px; }
.av-regua { position: relative; height: 14px; }
.av-regua::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 6%, transparent),
    color-mix(in oklab, var(--accent) 34%, transparent) 30%,
    color-mix(in oklab, var(--accent) 34%, transparent) 70%,
    color-mix(in oklab, var(--accent) 6%, transparent)); }
.av-regua .marca { position: absolute; top: 3px; width: 2px; height: 9px; border-radius: 2px;
  background: color-mix(in oklab, var(--accent) 65%, transparent); }
.av-regua .fim { position: absolute; right: 0; top: -3px; font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 8px; letter-spacing: 2px; color: var(--muted); }
.av-deck { display: flex; gap: 7px; overflow-x: auto; align-items: center; padding-bottom: 2px; }
.av-deck > .rot { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8px; letter-spacing: 2px;
  color: var(--muted); white-space: nowrap; line-height: 1.2; flex: 0 0 auto; }
.av-ficha { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; cursor: pointer;
  background: color-mix(in oklab, var(--ink) 4%, transparent); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 11px; color: var(--ink-2); font-size: 12.5px; font-weight: 600;
  letter-spacing: .4px; white-space: nowrap;
  transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease); }
.av-ficha:hover { border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
  color: var(--ink); background: var(--accent-tint); }
.av-ficha b { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8px; letter-spacing: 1px;
  color: var(--muted); font-weight: 500; }
.av-ficha.confirma b { color: #b47b09; }
.av-entrada { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---- ferramentas por módulo ---- */
.av-ferr { display: flex; flex-direction: column; gap: 3px; max-height: 26vh; overflow: auto; }
.av-ferr .mod { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8.5px; letter-spacing: 2px;
  color: var(--accent); opacity: .8; margin: 8px 0 3px; }
.av-ferr .f { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); padding: 2px 0; }
.av-ferr .f:hover { color: var(--ink); }
.av-ferr .f i { font-style: normal; color: var(--muted); font-size: 10px; }
.av-ferr .f.confirma i { color: #b47b09; }

/* ---- O BOTÃO DE VOZ: um só, que abre e fecha a conversa ----------------
 *
 * Não é "segure para falar". É voz-para-voz: aperta uma vez, conversa à
 * vontade, aperta de novo para encerrar. Segurar botão é rádio — serve quando
 * o ambiente é hostil, mas cobra a mão da pessoa a cada frase e quebra
 * justamente a sensação de estar falando com alguém.
 *
 * O anel pulsando enquanto ouve é o que substitui o "estou segurando": diz que
 * o microfone está aberto sem pedir nada em troca.
 */
.av-voz { position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 2px;
  font-weight: 600; color: var(--accent-ink, #fff); background: var(--accent);
  border: 0; border-radius: 999px; padding: 12px 20px 12px 14px; cursor: pointer;
  box-shadow: 0 8px 22px -10px color-mix(in oklab, var(--accent) 70%, transparent);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease); }
.av-voz:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px color-mix(in oklab, var(--accent) 80%, transparent); }
.av-voz:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.av-voz .bola { position: relative; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.22); display: grid; place-content: center; flex: 0 0 auto; }
.av-voz .bola::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.av-voz.aberta { background: #c73b4e; }
.av-voz.aberta .bola::after { content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.55); animation: avPulso 1.5s ease-out infinite; }
@keyframes avPulso { 0% { transform: scale(.75); opacity: .9 } 100% { transform: scale(1.5); opacity: 0 } }

/* ---- A LINHA DE ENTRADA: console, não caixa de mensageiro --------------
 *
 * O campo raso de borda fina que eu tinha posto lê como formulário. Aqui ele é
 * um terminal: prompt à esquerda, dica da tecla à direita, e um botão de enviar
 * em mono ao lado — a mesma linha do bench. Quem prefere digitar não deve se
 * sentir num modo secundário.
 */
.av-campo-caixa { flex: 1 1 260px; min-width: 200px; display: flex; align-items: center; gap: 9px;
  background: color-mix(in oklab, var(--ink) 5%, transparent);
  border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 46px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.av-campo-caixa:focus-within { border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 12%, transparent); }
.av-campo-caixa .pr { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 15px;
  color: var(--accent); flex: 0 0 auto; line-height: 1; }
.av-campo-caixa input { flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--ink); font-family: 'Rajdhani', var(--font), sans-serif; font-size: 16px; font-weight: 500; }
.av-campo-caixa input::placeholder { color: var(--muted); font-weight: 500; }
.av-campo-caixa .dica { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8.5px;
  letter-spacing: 1.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px;
  padding: 3px 6px; flex: 0 0 auto; opacity: 0; transition: opacity .16s var(--ease); }
.av-campo-caixa:focus-within .dica { opacity: 1; }

.av-bt { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 2.5px;
  font-weight: 600; color: var(--accent-ink, #fff); background: var(--accent); border: 1px solid var(--accent);
  border-radius: 10px; padding: 13px 20px; cursor: pointer; white-space: nowrap;
  transition: filter .16s var(--ease), transform .16s var(--ease); }
.av-bt:hover { filter: brightness(1.06); transform: translateY(-1px); }
.av-bt:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.av-bt.fantasma { background: transparent; color: var(--ink-2); border-color: var(--line); }
.av-bt.fantasma:hover { background: color-mix(in oklab, var(--ink) 5%, transparent); }

.av-voz-ck { display: flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 9px; letter-spacing: 2px;
  color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px; }
.av-voz-ck:hover { color: var(--ink-2); }
.av-voz-ck input { accent-color: var(--accent); }

/* ---- PALETA DE COMANDOS (a barra "/") --------------------------------------
 *
 * Digitar "/" abre a lista do que ele alcança. Não é atalho de gente avançada:
 * é como se DESCOBRE o alcance sem manual. A coluna da direita lista as ações
 * para consulta; aqui elas ficam ao alcance da mão, no momento em que a pessoa
 * está formulando o pedido.
 *
 * Escolher NÃO executa — vira uma ficha presa na entrada, e o resto do texto
 * são os detalhes. Mesma ideia do cartão de confirmação: o comando fica visível
 * e editável antes de sair.
 */
.av-paleta { position: absolute; left: 0; right: 0; bottom: calc(100% + 9px); z-index: 40;
  max-height: 320px; overflow: auto; border-radius: 14px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); }
.av-paleta .grupo { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8.5px;
  letter-spacing: 2px; color: var(--muted); padding: 9px 10px 4px; }
.av-op { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  cursor: pointer; color: var(--ink-2); }
.av-op .cmd { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; color: var(--ink);
  font-weight: 600; white-space: nowrap; }
.av-op .desc { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-op .sel { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8px; letter-spacing: 1px;
  color: #b47b09; flex: 0 0 auto; }
.av-op.ativo { background: var(--accent-tint); color: var(--ink); }
.av-op.ativo .desc { color: var(--ink-2); }
.av-paleta .vazio { padding: 16px 12px; text-align: center; font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 1px; color: var(--muted); }

/* a ficha do comando escolhido, presa dentro da entrada */
.av-ficha-cmd { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  background: var(--accent-tint); border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--line));
  border-radius: 8px; padding: 5px 9px; font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.av-ficha-cmd button { background: none; border: 0; color: inherit; cursor: pointer; opacity: .65;
  font-size: 13px; line-height: 1; padding: 0; }
.av-ficha-cmd button:hover { opacity: 1; }

/* ── O AGENTE EM JANELA: ele sai do módulo e vai trabalhar ────────────────
 *
 * Quando o pedido cai em outro módulo (criar peça no Estúdio, gerar imagem no
 * Genial), o agente se destaca numa janela flutuante e a plataforma aparece
 * atrás dele — porque o que a pessoa quer ver é o TRABALHO acontecendo, não uma
 * barra de progresso.
 *
 * ⚠️ Enquanto trabalha, o rosto ao vivo fica DESLIGADO: a resposta ainda não
 * existe, e conexão parada é dinheiro parado queimando. O que roda é clipe —
 * pensando e digitando alternando — até haver áudio para falar. Isso não é
 * economia de canto: é o desenho inteiro do módulo (ver docs/MODULO_ASSISTENTE).
 */
.ag-janela { position: fixed; z-index: 130; width: 320px; border-radius: 18px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 70px -24px rgba(0,0,0,.55);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  animation: agEntra .26s var(--ease) both; }
@keyframes agEntra { from { opacity: 0; transform: translateY(14px) scale(.97) } to { opacity: 1; transform: none } }
.ag-pega { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: grab;
  border-bottom: 1px solid var(--line); user-select: none; }
.ag-pega:active { cursor: grabbing; }
.ag-pega .n { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 9px; letter-spacing: 2px;
  color: var(--muted); flex: 1; }
.ag-pega .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.ag-pega .x:hover { color: var(--ink); }
.ag-rosto { position: relative; aspect-ratio: 1/1; background: #0b1017 center/cover no-repeat; }
.ag-rosto > .av-stage { position: absolute; inset: 0; }
.ag-estado { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8.5px; letter-spacing: 2px;
  color: #dfeaf5; background: rgba(6,10,16,.72); border: 1px solid rgba(255,255,255,.12);
  padding: 4px 8px; border-radius: 99px; }
.ag-estado i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 7px var(--accent); animation: avPisca 1.1s steps(1) infinite; }
.ag-passo { padding: 10px 12px; font-size: 13px; color: var(--ink-2); line-height: 1.4;
  border-bottom: 1px solid var(--line); min-height: 42px; }
.ag-passo b { display: block; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8.5px;
  letter-spacing: 2px; color: var(--muted); margin-bottom: 3px; }
.ag-botoes { display: flex; gap: 7px; padding: 10px 12px; }
.ag-bt { flex: 1; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 9.5px; letter-spacing: 1.5px;
  font-weight: 600; padding: 9px 6px; border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.ag-bt:hover { background: color-mix(in oklab, var(--ink) 5%, transparent); color: var(--ink); }
.ag-bt.forte { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }

/* o destaque que mostra ONDE o trabalho caiu */
.ag-alvo { animation: agPulsa 1.6s ease-out 2; border-radius: 14px; }
@keyframes agPulsa {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 55%, transparent) }
  70%  { box-shadow: 0 0 0 14px transparent }
  100% { box-shadow: 0 0 0 0 transparent }
}

/* ---- INTERVIR NO MEIO: ajustes e informações durante o trabalho ---------
 *
 * Enquanto ele trabalha, a pessoa lembra de uma coisa: "na verdade são as três
 * telas", "o telefone dele é outro". Não pode ser preciso esperar terminar para
 * dizer — mas também não dá para injetar no passo que já saiu.
 *
 * Então o recado é ACEITO na hora e mostrado como anotação, e entra no próximo
 * passo. O que não pode acontecer de jeito nenhum é a pessoa falar e a tela não
 * reagir: aí ela repete mais alto, e depois repete de novo — é assim que
 * assistente de voz perde a confiança de quem usa.
 */
.ag-recados { display: flex; flex-direction: column; gap: 5px; padding: 0 12px 10px; }
.ag-recado { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--ink-2);
  background: var(--accent-tint); border: 1px solid color-mix(in oklab, var(--accent) 26%, var(--line));
  border-radius: 9px; padding: 7px 9px; animation: avSobe .2s ease both; }
.ag-recado b { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 8px; letter-spacing: 1.5px;
  color: var(--accent-ink); flex: 0 0 auto; padding-top: 1px; }
.ag-recado.usado { opacity: .5; background: transparent; }
.ag-fala { display: flex; gap: 8px; align-items: center; padding: 0 12px 12px; }
.ag-fala input { flex: 1; min-width: 0; background: color-mix(in oklab, var(--ink) 5%, transparent);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; color: var(--ink);
  font-family: 'Rajdhani', var(--font), sans-serif; font-size: 14px; outline: none; }
.ag-fala input:focus { border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
.ag-fala .mic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); cursor: pointer; font-size: 14px; }
.ag-fala .mic.on { background: #c73b4e; border-color: #c73b4e; color: #fff; }
.ag-bt.perigo { border-color: color-mix(in oklab, #ff4d6d 45%, var(--line)); color: #c73b4e; }
.ag-bt.perigo:hover { background: color-mix(in oklab, #ff4d6d 12%, transparent); color: #c73b4e; }

/* ── O CURSOR ─────────────────────────────────────────────────────────────
 *
 * A seta do sistema é a única coisa na tela que não passou por nós. Esta é a
 * mesma seta em espírito — ninguém reaprende a apontar — com o material do
 * resto: OCA, só o contorno grosso e arredondado, o fundo aparecendo por
 * dentro. O vidro aqui é a transparência do miolo, não um preenchimento.
 *
 * ★ É o CONTORNO que carrega a forma, e por isso ele é claro e opaco nos dois
 * temas: sobre foto, sobre o vídeo do atendente ou sobre painel claro, a
 * silhueta se segura. Miolo translúcido sozinho sumiria em metade das telas.
 *
 * 26px: a do sistema tem ~20 e some numa tela cheia de vidro; grande demais
 * atrapalha a mira. Ponto quente em (5,4), na ponta.
 *
 * Termina em `, auto`: se o arquivo falhar, volta a seta do sistema em vez de
 * sumir o ponteiro — que é a falha que trava o uso de vez.
 */
:root, :root[data-theme="light"] {
  --cur-seta: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2226%22%20height%3D%2226%22%20viewBox%3D%220%200%2026%2026%22%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22rgba%2815%2C19%2C27%2C.22%29%22%2F%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.96%29%22%20stroke-width%3D%222.2%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E") 5 4, auto;
  --cur-mao:  url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2226%22%20height%3D%2226%22%20viewBox%3D%220%200%2026%2026%22%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22rgba%2815%2C19%2C27%2C.22%29%22%2F%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.96%29%22%20stroke-width%3D%222.2%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Ccircle%20cx%3D%2221%22%20cy%3D%226%22%20r%3D%223.2%22%20fill%3D%22none%22%20stroke%3D%22%234d8cff%22%20stroke-width%3D%221.9%22%2F%3E%3C%2Fsvg%3E") 5 4, pointer;
}
:root[data-theme="dark"] {
  --cur-seta: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2226%22%20height%3D%2226%22%20viewBox%3D%220%200%2026%2026%22%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C.12%29%22%2F%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.94%29%22%20stroke-width%3D%222.2%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E") 5 4, auto;
  --cur-mao:  url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2226%22%20height%3D%2226%22%20viewBox%3D%220%200%2026%2026%22%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C.12%29%22%2F%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.94%29%22%20stroke-width%3D%222.2%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Ccircle%20cx%3D%2221%22%20cy%3D%226%22%20r%3D%223.2%22%20fill%3D%22none%22%20stroke%3D%22%238fb6ff%22%20stroke-width%3D%221.9%22%2F%3E%3C%2Fsvg%3E") 5 4, pointer;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cur-seta: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2226%22%20height%3D%2226%22%20viewBox%3D%220%200%2026%2026%22%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C.12%29%22%2F%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.94%29%22%20stroke-width%3D%222.2%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E") 5 4, auto;
    --cur-mao:  url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2226%22%20height%3D%2226%22%20viewBox%3D%220%200%2026%2026%22%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22rgba%28255%2C255%2C255%2C.12%29%22%2F%3E%3Cpath%20d%3D%22M6%204.4%20L6%2020.6%20L10.3%2016.6%20L13.2%2022.7%20L16.1%2021.4%20L13.3%2015.6%20L19.3%2015.2%20Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C.94%29%22%20stroke-width%3D%222.2%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Ccircle%20cx%3D%2221%22%20cy%3D%226%22%20r%3D%223.2%22%20fill%3D%22none%22%20stroke%3D%22%238fb6ff%22%20stroke-width%3D%221.9%22%2F%3E%3C%2Fsvg%3E") 5 4, pointer;
  }
}

body { cursor: var(--cur-seta); }
a, button, summary, label, select, [role="button"], [data-view], .av-ficha, .av-op,
.sidenav button, .av-bt, .av-voz, .ag-bt, .av-ficha-cmd button { cursor: var(--cur-mao); }
input, textarea, [contenteditable="true"] { cursor: text; }
button:disabled, .av-bt:disabled, .av-voz:disabled { cursor: not-allowed; }
.ag-pega { cursor: grab; }
.ag-pega:active { cursor: grabbing; }
@media (hover: none) { body, a, button { cursor: auto; } }

/* ═══════════ FINANCEIRO · custos, margem e crédito (lado OKLAC) ═══════════ */

/* sub-nav de segundo nível: menor que a do console, para a hierarquia ficar
   óbvia sem precisar de título */
.subnav.sub2 { margin: -4px 0 14px; }
.subnav.sub2 button { font-size: 13px; padding: 6px 12px; }

/* O aviso que sobe quando algo está queimando. Não é toast: toast some, e isto
   precisa continuar na tela enquanto o problema existir. */
.fin-alerta { border-width: 1px; margin-bottom: 14px; }
.fin-alerta.err {
  border-color: rgba(214,60,60,.34);
  background: color-mix(in oklab, rgba(214,60,60,.10) 60%, var(--glass));
}
.fin-alerta.warn {
  border-color: rgba(214,158,20,.36);
  background: color-mix(in oklab, rgba(214,158,20,.10) 60%, var(--glass));
}

/* ── as contas de fornecedor ─────────────────────────────────────────────── */
.fin-contas {
  display: grid; gap: 14px; margin-bottom: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.fin-conta {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow: var(--edge);
}
/* a cor vem do estado, não da decoração: a faixa é a única coisa que muda */
.fin-conta.esgotado { border-color: rgba(214,60,60,.40); }
.fin-conta.critico  { border-color: rgba(214,60,60,.28); }
.fin-conta.atencao  { border-color: rgba(214,158,20,.34); }

.fin-conta .fc-topo { display: flex; flex-direction: column; gap: 3px; }
.fin-conta .fc-topo b { margin-right: 6px; }
/* ★ a AUTONOMIA é o número que decide ação, então é ela que fica grande —
   saldo sozinho não diz nada sem o ritmo de queima ao lado */
.fin-conta .fc-num {
  font-family: var(--font-display); font-size: 34px; font-weight: 700;
  line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.fin-conta .fc-num small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.fin-conta .fc-linhas { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.fin-conta .fc-linhas > div { display: flex; justify-content: space-between; gap: 12px; }
.fin-conta .fc-linhas span { color: var(--muted); }
.fin-conta .fc-linhas b { font-variant-numeric: tabular-nums; }
.fin-conta .fc-recado { min-height: 32px; }
.fin-conta .fc-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── barras "em que está indo" ───────────────────────────────────────────── */
.fin-barras { display: flex; flex-direction: column; gap: 12px; }
.fb-linha { display: grid; grid-template-columns: minmax(120px, 1.1fr) 3fr auto; gap: 14px; align-items: center; }
.fb-rot { display: flex; flex-direction: column; line-height: 1.25; }
.fb-trilho { height: 10px; border-radius: 99px; background: color-mix(in oklab, var(--ink) 7%, transparent); overflow: hidden; }
.fb-barra { height: 100%; border-radius: 99px; background: var(--accent-grad); }
.fb-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fb-val span { display: block; font-weight: 400; }

/* ── tendência diária ────────────────────────────────────────────────────── */
/* Barras cruas de propósito: o que se procura aqui é o DIA EM QUE PULOU, e
   para isso um gráfico com eixo, legenda e biblioteca não acrescenta nada. */
.fin-tend { display: flex; align-items: flex-end; gap: 3px; height: 88px; }
.ft-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.ft-barra {
  width: 100%; border-radius: 4px 4px 2px 2px;
  background: color-mix(in oklab, var(--accent) 62%, transparent);
  transition: background var(--dur) var(--ease);
}
.ft-col:hover .ft-barra { background: var(--accent); }
.ft-eixo { display: flex; justify-content: space-between; margin-top: 6px; }

/* margem negativa: o único vermelho da tabela, para o olho cair nele */
.fin-neg { color: #c23a3a; font-weight: 600; }

@media (max-width: 720px) {
  .fb-linha { grid-template-columns: 1fr auto; }
  .fb-trilho { grid-column: 1 / -1; }
}
