@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@500;600;700&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  color-scheme: dark;
  --bg: #07070a;
  --bg-deep: #030304;
  --surface: #0c0d11;
  --surface-2: #101218;
  --surface-3: #15171f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f4f7;
  --muted: #9a9ea8;
  --muted-strong: #c2c5cd;
  --faint: #63666f;
  --cyan: #3d84ff;
  --gold: #dab568;
  --purple: #8d75df;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f8717a;
  --grad: linear-gradient(90deg, #3d84ff, #dab568, #8d75df);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --focus: #dab568;
  --sidebar-w: 252px;
  --topbar-h: 66px;
  --nav-h: 68px;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  /* Tokens de movimento (Fase 2 — design system): nomeadas para reuso, sem
     alterar nenhuma duração já usada nas animações existentes. */
  --motion-fast: 150ms;
  --motion-base: 220ms;
  --motion-slow: 420ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a, input, select, textarea { font: inherit; touch-action: manipulation; }
button, a, [tabindex="0"] { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
h1, h2, h3, h4, p { margin: 0; overflow-wrap: anywhere; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; }

.tabular { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.shell { position: relative; z-index: 1; width: min(calc(100% - 48px), 1640px); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-md); }

/* =========================================================
   ENTRY SCREEN — três contas, um só login
   Fundo: três órbitas de luz (uma por marca) convergindo ao centro atrás
   do cartão — Vynex (ciano), Lume (dourado), Astral (violeta).
   ========================================================= */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 40%, #070b0d 0%, #05070a 55%, #030405 100%);
}
.bg-fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg-fx .grain {
  position: absolute;
  inset: -60px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
/* If WebGL isn't available, .no-webgl is added to <body> and we fall back
   to a static layered gradient that echoes the same three-brand palette. */
body.no-webgl .bg-fx {
  background:
    radial-gradient(38% 42% at 30% 38%, rgba(61, 132, 255, 0.16), transparent 70%),
    radial-gradient(34% 38% at 68% 32%, rgba(218, 181, 104, 0.13), transparent 70%),
    radial-gradient(40% 44% at 50% 72%, rgba(141, 117, 223, 0.15), transparent 70%),
    #05070a;
}
body.no-webgl .bg-fx canvas { display: none; }

.entry-inner { position: relative; width: 100%; max-width: 420px; text-align: center; }

.entry-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.3rem, 6.6vw, 3.8rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin-bottom: 16px;
  text-wrap: balance;
}
.entry-title em {
  font-style: italic;
  background: linear-gradient(100deg, var(--cyan) 15%, var(--gold) 55%, var(--purple) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.entry-brandstrip { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
.entry-brandstrip img { width: 22px; height: 22px; border-radius: 7px; object-fit: cover; opacity: 0.8; transition: opacity 160ms ease, transform 160ms ease; }
.entry-brandstrip img:hover { opacity: 1; transform: translateY(-1px); }
.entry-brandstrip span { color: var(--faint); font-size: 0.68rem; letter-spacing: 0.03em; }

/* =========================================================
   ENTRY STAGE — single centered column over the animated dot
   grid (.bg-fx / #dots-canvas). Replaces the old two-column split.
   ========================================================= */
.entry-stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.entry-brand { display: inline-flex; align-items: center; gap: 10px; margin: 0 auto 28px; }
.entry-brand img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.entry-brand strong { font-size: 1.02rem; letter-spacing: -0.01em; }

.entry-lede { max-width: 38ch; margin: 0 auto 32px; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

.entry-fineprint { margin-top: 18px; color: var(--faint); font-size: 0.72rem; text-align: center; }

/* =========================================================
   AUTH CARD — glass, with a slow-turning tri-brand hairline border
   ========================================================= */
@property --card-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.auth-card {
  position: relative;
  max-width: 400px;
  width: 100%;
  margin-inline: auto;
  padding: 1px;
  border-radius: calc(var(--radius-lg) + 8px);
  background: conic-gradient(from var(--card-angle), rgba(61,132,255,0.65), rgba(218,181,104,0.55), rgba(141,117,223,0.6), rgba(61,132,255,0.65));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  text-align: left;
  animation: card-spin 14s linear infinite;
}
@keyframes card-spin { to { --card-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }
.auth-card-inner {
  border-radius: calc(var(--radius-lg) + 7px);
  background: rgba(9, 11, 14, 0.78);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px 30px 28px;
}
.auth-tabs { display: flex; gap: 4px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); padding: 4px; }
.auth-tab {
  flex: 1;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.auth-tab.is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 var(--line-strong) inset; }
.auth-panel { display: none; }
.auth-panel.is-active { display: block; }
.auth-head { margin-bottom: 18px; }
.auth-head h2 { font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.auth-head p { color: var(--faint); font-size: 0.82rem; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  padding: 9px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms var(--ease-out), filter 150ms ease, box-shadow 150ms ease;
  text-decoration: none;
}
.btn:hover { border-color: rgba(61, 132, 255, 0.5); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { border: none; background: linear-gradient(135deg, var(--cyan), var(--purple)); color: #05060a; font-weight: 800; }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 10px 26px rgba(61, 132, 255, 0.28); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { border-color: rgba(248, 113, 122, 0.4); color: #ffb3b8; background: rgba(248, 113, 122, 0.08); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 0.76rem; }

/* Liquid-glass pill button (entry screen) */
.btn-liquid {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: 100%;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 200ms ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 26px rgba(61, 132, 255, 0.12);
}
.btn-liquid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(61, 132, 255, 0.55), rgba(141, 117, 223, 0.5), rgba(218, 181, 104, 0.45));
  background-size: 220% 220%;
  opacity: 0.55;
  transition: opacity 200ms ease;
  animation: liquid-shift 7s ease-in-out infinite;
}
.btn-liquid::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -20%;
  width: 60%;
  height: 220%;
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(20deg);
  filter: blur(2px);
}
.btn-liquid span { position: relative; z-index: 1; }
.btn-liquid:hover { border-color: rgba(255, 255, 255, 0.32); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 14px 34px rgba(61, 132, 255, 0.22); }
.btn-liquid:hover::before { opacity: 0.75; }
.btn-liquid:active { transform: translateY(0); }
@keyframes liquid-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) { .btn-liquid::before { animation: none; } }

/* =========================================================
   FORMS
   ========================================================= */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.78rem; font-weight: 700; color: var(--muted-strong); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  padding: 11px 13px;
  font-size: 0.88rem;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 132, 255, 0.14); }
.field small { color: var(--faint); font-size: 0.72rem; }

/* Fase 5: barra de filtros (Comprovantes — atendente/empresa/status/período).
   Reaproveita o estilo de .field, só em linha e com rótulo compacto. */
.filter-bar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.filter-bar .field { min-width: 150px; }
.filter-bar .field label { font-size: 0.68rem; margin-bottom: 4px; }
.filter-bar .field select, .filter-bar .field input { padding: 8px 11px; font-size: 0.8rem; }
@media (max-width: 720px) { .filter-bar { gap: 10px; } .filter-bar .field { min-width: 45%; flex: 1 1 45%; } }

/* Fase 6: linha de campos lado a lado dentro de um modal/formulário (ex.:
   unidade + quantidade do período Elite), e a mesma linha de botões de ação
   ao lado do período no painel de Painéis e créditos. */
.field-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.field-row .field { flex: 1 1 140px; margin-bottom: 12px; }
@media (max-width: 720px) { .field-row { gap: 8px; } .field-row .field { flex: 1 1 100%; } }

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-strong);
  cursor: pointer;
}
.checkbox-inline input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--cyan); cursor: pointer; }
.inline-id-edit { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.inline-id-edit input {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 5px 8px;
  font-size: 0.74rem;
  width: 130px;
}
.field-icon { position: relative; }
.field-icon svg { position: absolute; top: 50%; left: 13px; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.field-icon input { padding-left: 38px; width: 100%; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } }
.field-file {
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  color: var(--muted-strong);
  font-size: 0.84rem;
}
.field-file.is-dragover { border-color: var(--cyan); background: rgba(61, 132, 255, 0.06); }
.field-file strong { color: var(--text); }
.field-file input[type="file"] { display: none; }

/* =========================================================
   ALERTS / BADGES
   ========================================================= */
.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.82rem; margin-bottom: 16px; }
.alert-error { border: 1px solid rgba(248, 113, 122, 0.3); background: rgba(248, 113, 122, 0.08); color: #ffc4c8; }
.alert-success { border: 1px solid rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.08); color: #b9f6cf; }
.alert-info { border: 1px solid rgba(61, 132, 255, 0.3); background: rgba(61, 132, 255, 0.08); color: #bdeeff; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 20%, transparent);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; box-shadow: 0 0 6px currentColor; }
.badge-pending { background: rgba(154, 158, 168, 0.12); color: var(--muted-strong); }
.badge-processing { background: rgba(61, 132, 255, 0.12); color: var(--cyan); }
.badge-flagged { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.badge-approved { background: rgba(74, 222, 128, 0.12); color: var(--green); }
.badge-rejected { background: rgba(248, 113, 122, 0.12); color: var(--red); }

.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 99px; background: var(--green); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12), 0 0 12px rgba(74, 222, 128, 0.55); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12), 0 0 12px rgba(251, 191, 36, 0.5); }
.status-dot.off { background: var(--faint); box-shadow: none; }

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.08);
  color: #86f0b3;
  padding: 3px 12px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-chip.attention { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.08); color: #ffd583; }

/* =========================================================
   APP SHELL (sidebar layout — admin & portal)
   ========================================================= */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
  /* "stretch" (padrão do grid) faz a coluna da barra lateral acompanhar a
     altura real do conteúdo principal — com "start" a barra dependia de
     100dvh sticky sozinha, e em zooms fracionários do navegador (110%,
     125%, 150%...) o arredondamento de subpixel entre a altura calculada
     e a altura real da página abria uma folga visível, dando a impressão
     de que a barra lateral "descolava" do conteúdo. */
}
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-deep);
}
.sidebar-inner {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100dvh;
  padding: 20px 16px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.sidebar-brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; }
.sidebar-brand strong { display: block; font-size: 0.88rem; letter-spacing: -0.01em; }
.sidebar-brand small { display: block; color: var(--faint); font-size: 0.66rem; letter-spacing: 0.04em; }

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px 12px;
  font-size: 0.72rem;
  color: var(--muted-strong);
}

#sidebar-nav { display: grid; gap: 18px; flex: 1 1 auto; overflow-y: auto; }
.nav-group { display: grid; gap: 2px; align-content: start; }
.nav-group-label { padding: 0 10px; margin-bottom: 4px; color: var(--faint); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--muted-strong);
  padding: 9px 10px;
  font-size: 0.83rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  overflow: hidden;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.nav-item::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -2px;
  width: 3px;
  border-radius: 3px;
  background: var(--grad);
  opacity: 0;
  transform: scaleY(0.3);
  transition: opacity 160ms ease, transform 160ms ease;
}
.nav-item .nav-icon { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px; color: var(--faint); background: transparent; transition: background 160ms ease, color 160ms ease; }
.nav-item .nav-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item .nav-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0 5px;
}
.nav-item:hover { background: var(--surface); color: var(--text); transform: translateX(1px); }
.nav-item:hover .nav-icon { color: var(--muted-strong); }
.nav-item.is-active { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.nav-item.is-active::before { opacity: 1; transform: scaleY(1); }
.nav-item.is-active .nav-icon { color: #05060a; background: var(--grad); box-shadow: 0 0 14px rgba(61, 132, 255, 0.35); }
@media (prefers-reduced-motion: reduce) { .nav-item, .nav-item::before, .nav-item .nav-icon { transition: none; } }

.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; color: var(--faint); font-size: 0.68rem; line-height: 1.5; }
.sidebar-foot strong { display: block; color: var(--muted-strong); font-size: 0.78rem; margin-bottom: 2px; }
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(61, 132, 255, 0.12);
  color: var(--cyan);
  margin-bottom: 8px;
}

.main-col { min-width: 0; }

/* =========================================================
   TOPNAV (portal do atendente — barra simples de página única,
   sem sidebar; usa a mesma linguagem visual do topbar do admin)
   ========================================================= */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-h);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(14px);
  padding: 12px 24px;
  flex-wrap: wrap;
}
.topnav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.topnav-brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; }
.topnav-brand strong { font-size: 0.9rem; letter-spacing: -0.01em; font-weight: 700; }
.topnav-links { display: flex; align-items: center; gap: 4px; }
.topnav-links a {
  border-radius: 999px;
  padding: 7px 13px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}
.topnav-links a:hover { color: var(--muted-strong); }
.topnav-links a.is-active { background: var(--surface-2); color: var(--text); }
.topnav-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

/* =========================================================
   PORTAL HERO — animated retro-grid strip above the atendente's
   real upload tool (adapted from a marketing hero reference into a
   functional header: badge + gradient headline + ambient grid,
   sized to its content, not a full-screen banner).
   ========================================================= */
.portal-hero { position: relative; overflow: hidden; padding-block: 40px 34px; border-bottom: 1px solid var(--line); }
.portal-hero-grid {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 220%;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 0),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 44px 44px;
  transform: perspective(340px) rotateX(58deg);
  transform-origin: top center;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 75%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 75%);
}
.portal-hero-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 7, 10, 0.2) 0%, rgba(7, 7, 10, 0.75) 85%, var(--bg) 100%); }
.portal-hero-inner { position: relative; z-index: 1; max-width: 62ch; }
.portal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  padding: 6px 14px 6px 10px;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.portal-hero-title { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 10px; text-wrap: balance; }
.portal-hero-title em {
  font-style: italic;
  background: linear-gradient(100deg, var(--cyan) 15%, var(--gold) 55%, var(--purple) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.portal-hero-lede { color: var(--muted); font-size: 0.9rem; line-height: 1.6; max-width: 56ch; }

/* Spinning conic-gradient border CTA (adapted from the reference's
   animated button) — same tri-brand palette as the auth card spinner. */
.btn-spin-border {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  padding: 1.5px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}
.btn-spin-border::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: -1;
  background: conic-gradient(from 0deg, var(--cyan), var(--purple), var(--gold), var(--cyan));
  animation: spin-border 2.6s linear infinite;
}
@keyframes spin-border { to { transform: rotate(360deg); } }
.btn-spin-border span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 43px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  transition: background 150ms ease;
}
.btn-spin-border:hover span { background: var(--surface-3); }
.btn-spin-border:disabled { cursor: not-allowed; opacity: 0.6; }
.btn-spin-border:disabled::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .btn-spin-border::before { animation: none; } }

/* =========================================================
   CONFIRMATION OVERLAY — success state after a comprovante is
   submitted (transaction id, payment method, amount, timestamp).
   ========================================================= */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(3, 3, 5, 0.7);
  backdrop-filter: blur(6px);
  padding: 24px;
}
.confirm-overlay[hidden] { display: none; }
.confirm-card {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 30px 26px 26px;
  text-align: center;
  animation: rise-in 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.confirm-check {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}
.confirm-check svg { width: 26px; height: 26px; }
.confirm-card h2 { font-size: 1.14rem; margin-bottom: 8px; }
.confirm-sub { color: var(--muted); font-size: 0.8rem; line-height: 1.5; margin-bottom: 22px; }
.confirm-rows { display: grid; gap: 10px; margin: 0 0 22px; text-align: left; }
.confirm-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.confirm-rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.confirm-rows dt { color: var(--muted); font-size: 0.78rem; }
.confirm-rows dd { margin: 0; font-family: var(--mono); font-size: 0.86rem; text-align: right; }
.confirm-rows > .is-total dd { color: var(--cyan); font-weight: 700; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-h);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(14px);
  padding: 12px 30px;
  flex-wrap: wrap;
}
.topbar-title h1 { font-size: 1.1rem; letter-spacing: -0.01em; }
.topbar-title p { margin-top: 2px; color: var(--faint); font-size: 0.74rem; }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.74rem; flex-wrap: wrap; }
.topbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted-strong);
  white-space: nowrap;
}
/* Round G (08/09/2026): sinaliza quando os itens manuais do painel (alertas,
   regras, vendas reais banco/TTR, campanha de vendas) estão há mais de 48h
   sem ninguém atualizar — os cards de Meta Ads continuam ao vivo mesmo
   assim, isso avisa só sobre a parte digitada à mão. */
.topbar-chip.is-stale { border-color: rgba(248, 113, 122, 0.4); background: rgba(248, 113, 122, 0.08); color: var(--red); }

.mobile-tabbar { display: none; }

.view { display: none; padding: 30px 36px 80px; max-width: 1800px; margin-inline: auto; }
.view.is-active { display: block; }

.section { padding-top: 42px; }
.section:first-child { padding-top: 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.section-heading h2 { font-size: 1.06rem; }
.section-note { max-width: 46ch; color: var(--muted); font-size: 0.78rem; text-align: right; }

.footer-note { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.72rem; }

/* =========================================================
   KPI CARDS (with delta pills)
   ========================================================= */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-card { position: relative; min-width: 0; padding: 18px; overflow: hidden; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.kpi-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--kpi-color, var(--cyan)), transparent);
  opacity: 0.85;
}
.kpi-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--kpi-color, var(--cyan)) 40%, var(--line-strong)); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.kpi-card .kpi-label { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi-card .kpi-label::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 99px; background: var(--kpi-color, var(--cyan)); box-shadow: 0 0 10px var(--kpi-color, var(--cyan)); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kpi-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: color-mix(in srgb, var(--kpi-color, var(--cyan)) 16%, transparent);
  color: var(--kpi-color, var(--cyan));
}
.kpi-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kpi-value { display: block; font-family: var(--mono); font-size: clamp(1.35rem, 2vw, 1.85rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-card small { display: block; min-height: 2.4em; margin-top: 10px; color: var(--faint); font-size: 0.72rem; line-height: 1.35; }

/* Round D (07/09/2026): "quanto vai receber" pisca/brilha quando uma nova
   comissão chega ao vivo (portal.js, refreshCommission com animate:true) —
   reforço visual para motivar, não só o número subindo. */
@keyframes kpi-pulse-glow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kpi-color, var(--cyan)) 55%, transparent); }
  60% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--kpi-color, var(--cyan)) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kpi-color, var(--cyan)) 0%, transparent); }
}
.kpi-pulse { animation: kpi-pulse-glow 1.4s ease-out; border-color: color-mix(in srgb, var(--kpi-color, var(--cyan)) 55%, var(--line-strong)); }

/* Entrance animation — cards fade/rise in as each view renders, staggered */
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.kpi-grid > *, .account-grid > *, .commission-card, .budget-row > *, .chart-card, .staff-day {
  animation: rise-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.kpi-grid > *:nth-child(1), .account-grid > *:nth-child(1), .commission-card:nth-child(1) { animation-delay: 0ms; }
.kpi-grid > *:nth-child(2), .account-grid > *:nth-child(2), .commission-card:nth-child(2) { animation-delay: 45ms; }
.kpi-grid > *:nth-child(3), .account-grid > *:nth-child(3), .commission-card:nth-child(3) { animation-delay: 90ms; }
.kpi-grid > *:nth-child(4), .account-grid > *:nth-child(4), .commission-card:nth-child(4) { animation-delay: 135ms; }
.kpi-grid > *:nth-child(5), .commission-card:nth-child(5) { animation-delay: 180ms; }
.commission-card:nth-child(6) { animation-delay: 225ms; }
.commission-card:nth-child(n+7) { animation-delay: 260ms; }
@media (prefers-reduced-motion: reduce) {
  .kpi-grid > *, .account-grid > *, .commission-card, .budget-row > *, .chart-card, .staff-day, .kpi-card, .chart-card:hover {
    animation: none !important;
    transition: none !important;
  }
}
.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}
.delta-pill.up { background: rgba(74, 222, 128, 0.12); color: var(--green); }
.delta-pill.down { background: rgba(248, 113, 122, 0.12); color: var(--red); }
.delta-pill.flat { background: rgba(154, 158, 168, 0.12); color: var(--muted-strong); }

/* =========================================================
   BUDGET / PROGRESS
   ========================================================= */
.budget-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.budget-card { padding: 18px 20px; }
.budget-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.budget-card-head h3 { font-size: 0.86rem; }
.budget-live { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.budget-figure { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; font-family: var(--mono); }
.budget-figure strong { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; }
.budget-figure span { color: var(--faint); font-size: 0.86rem; }
.budget-track { height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.06); }
.budget-fill { height: 100%; border-radius: inherit; background: var(--grad); }
.budget-caption { margin-top: 8px; color: var(--faint); font-size: 0.72rem; }

.goal-track { height: 10px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.06); margin: 14px 0 8px; }
.goal-fill { height: 100%; border-radius: inherit; background: var(--grad); }

/* =========================================================
   CHARTS
   ========================================================= */
.chart-card { padding: 20px 22px; transition: border-color 180ms ease, transform 180ms ease; }
.chart-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.chart-head p:not(.eyebrow) { margin-top: 4px; color: var(--muted); font-size: 0.78rem; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-strong); font-size: 0.72rem; font-weight: 600; }
.chart-legend i { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.chart-box { position: relative; height: 240px; }
.chart-box.short { height: 180px; }
.chart-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* =========================================================
   ALERT / INBOX LIST
   ========================================================= */
.alert-list { display: grid; gap: 1px; overflow: hidden; border-radius: var(--radius-md); background: var(--line); }
.alert-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: flex-start; gap: 12px; background: var(--surface); padding: 14px 16px; }
.alert-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; background: color-mix(in srgb, var(--tone, var(--amber)) 16%, transparent); color: var(--tone, var(--amber)); }
.alert-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alert-copy strong { display: block; font-size: 0.82rem; }
.alert-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.75rem; }
.alert-time { color: var(--faint); font-size: 0.68rem; white-space: nowrap; }

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline li { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 16px; padding-bottom: 22px; }
.timeline li::before { content: ""; position: absolute; top: 11px; bottom: -3px; left: 66px; width: 1px; background: var(--line-strong); }
.timeline li::after { content: ""; position: absolute; top: 6px; left: 61px; width: 9px; height: 9px; border: 2px solid var(--bg); border-radius: 99px; background: var(--cyan); box-shadow: 0 0 12px rgba(61, 132, 255, 0.55); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline time { color: var(--cyan); font-family: var(--mono); font-size: 0.72rem; font-weight: 700; }
.timeline div { display: grid; gap: 2px; }
.timeline strong { font-size: 0.84rem; }
.timeline span { color: var(--muted); font-size: 0.74rem; }

/* =========================================================
   ACCOUNT CARDS
   ========================================================= */
.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.account-card { --account: var(--cyan); position: relative; min-width: 0; overflow: hidden; padding: 20px; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.account-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--account) 45%, var(--line-strong)); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.account-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--account), transparent); opacity: 0.9; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.account-identity img { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--account) 44%, transparent); border-radius: 12px; background: #fff; object-fit: cover; }
.account-identity span { min-width: 0; display: grid; }
.account-identity strong { font-size: 0.94rem; }
.account-identity small { color: var(--faint); font-size: 0.68rem; }
.account-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.account-metric { min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.02); padding: 10px; }
.account-metric small, .detail-label { display: block; color: var(--faint); font-size: 0.63rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.account-metric strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 0.98rem; }
.account-recommendation { margin: 16px 0 0; color: var(--muted-strong); font-size: 0.8rem; }
.account-next { margin-top: 12px; border-left: 2px solid var(--account); padding-left: 10px; color: var(--text); font-size: 0.75rem; font-weight: 700; }

/* =========================================================
   HISTORY CALENDAR (Meta Ads → Histórico diário)
   Replaces a long day-by-day table with a month calendar: dots mark
   which accounts have data on a given day, clicking a day fills the
   detail panel — same account-card/account-metric vocabulary used
   elsewhere, just re-scoped to a single day.
   ========================================================= */
.history-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.cal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.cal-subnote { margin: 2px 0 0; color: var(--faint); font-size: 0.7rem; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted-strong);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.cal-nav-btn:hover { border-color: var(--cyan); color: var(--text); }
.cal-month-label { min-width: 108px; text-align: center; font-size: 0.78rem; font-weight: 700; color: var(--muted-strong); text-transform: capitalize; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 18px 0 6px; }
.cal-weekdays span { text-align: center; color: var(--faint); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--muted-strong);
  font: inherit;
  padding: 4px;
}
button.cal-day { cursor: pointer; transition: background 150ms ease, border-color 150ms ease; }
button.cal-day:hover { background: var(--surface-2); }
.cal-day.is-outside { color: var(--faint); opacity: 0.38; }
.cal-day-num { font-family: var(--mono); font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.cal-day-dots { display: flex; gap: 2px; height: 5px; }
.cal-day-dots i { width: 4px; height: 4px; border-radius: 99px; display: inline-block; }
.cal-day.is-today { border-color: rgba(61, 132, 255, 0.35); }
.cal-day.is-today .cal-day-num { color: var(--cyan); font-weight: 700; }
.cal-day.is-selected { background: var(--surface-3); border-color: var(--line-strong); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-strong); font-size: 0.72rem; font-weight: 600; }
.cal-legend i { width: 7px; height: 7px; border-radius: 99px; display: inline-block; }

.day-detail-date { margin-bottom: 4px; }
.day-account-row { padding: 16px 0; }
.day-account-row + .day-account-row { border-top: 1px solid var(--line); }
.account-metrics.day-metrics { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); margin-top: 14px; }

/* =========================================================
   PANELS / SPLIT GRIDS
   ========================================================= */
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { min-width: 0; padding: 22px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 0.78rem; }
.panel-stat { flex: 0 0 auto; text-align: right; }
.panel-stat strong { display: block; font-family: var(--mono); font-size: 1.3rem; line-height: 1; }
.panel-stat small { color: var(--faint); font-size: 0.63rem; }

.funnel { display: grid; gap: 12px; }
.funnel-row { display: grid; grid-template-columns: minmax(118px, 0.9fr) minmax(120px, 1.7fr) auto; align-items: center; gap: 12px; }
.funnel-row span:first-child { color: var(--muted-strong); font-size: 0.75rem; }
.funnel-bar { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.06); }
.funnel-bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.funnel-row strong { min-width: 36px; text-align: right; font-family: var(--mono); font-size: 0.86rem; }

.coverage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.coverage-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.02); padding: 13px; }
.coverage-card span { display: block; color: var(--faint); font-size: 0.66rem; }
.coverage-card strong { display: block; margin-top: 4px; font-family: var(--mono); font-size: 1.3rem; }

.note-box { margin-top: 16px; border: 1px solid rgba(218, 181, 104, 0.22); border-radius: var(--radius-sm); background: rgba(218, 181, 104, 0.06); padding: 12px 14px; color: #f2dcac; font-size: 0.75rem; }
.note-box.danger { border-color: rgba(248, 113, 122, 0.3); background: rgba(248, 113, 122, 0.08); color: #ffc4c8; }
.note-box.info { border-color: rgba(61, 132, 255, 0.25); background: rgba(61, 132, 255, 0.07); color: #bdeeff; }
.note-box.success { border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.08); color: #bdf5d3; }

.incident-list { display: grid; gap: 8px; margin-top: 10px; list-style: none; padding: 0; }
.incident-list li { display: flex; flex-direction: column; gap: 2px; border: 1px solid rgba(248, 113, 122, 0.22); border-radius: var(--radius-sm); background: rgba(248, 113, 122, 0.05); padding: 10px 14px; }
.incident-list li strong { font-size: 0.78rem; color: #ffc4c8; }
.incident-list li span { color: var(--muted); font-size: 0.76rem; }

.whatsapp-list, .compact-list, .rule-list { display: grid; gap: 9px; }
.whatsapp-item { --account: var(--cyan); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.02); padding: 11px; }
.whatsapp-item img { width: 36px; height: 36px; border: 1px solid color-mix(in srgb, var(--account) 45%, transparent); border-radius: 10px; background: #fff; object-fit: cover; }
.whatsapp-copy { min-width: 0; }
.whatsapp-copy strong, .whatsapp-copy span { display: block; }
.whatsapp-copy strong { font-size: 0.8rem; }
.whatsapp-copy span { color: var(--faint); font-size: 0.68rem; }
.sync-count { text-align: right; }
.sync-count strong, .sync-count small { display: block; font-family: var(--mono); }
.sync-count strong { color: var(--green); font-size: 0.98rem; }
.sync-count.warning strong { color: var(--amber); }
.sync-count small { color: var(--faint); font-size: 0.6rem; font-family: var(--sans); }

.compact-list li, .rule-list li { position: relative; border-bottom: 1px solid var(--line); color: var(--muted-strong); padding: 0 0 10px 17px; font-size: 0.76rem; }
.compact-list li:last-child, .rule-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.compact-list li::before, .rule-list li::before { content: ""; position: absolute; top: 0.5em; left: 0; width: 6px; height: 6px; border-radius: 99px; background: var(--cyan); box-shadow: 0 0 10px rgba(61, 132, 255, 0.5); }

/* =========================================================
   CAMPAIGN
   ========================================================= */
.campaign-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr); gap: 16px; }
.campaign-main, .campaign-side { padding: 22px; }
.campaign-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.campaign-number { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.02); padding: 13px; }
.campaign-number small, .campaign-number strong { display: block; }
.campaign-number small { min-height: 2.6em; color: var(--faint); font-size: 0.64rem; }
.campaign-number strong { margin-top: 6px; font-family: var(--mono); font-size: 1.1rem; }
.campaign-config { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mini-chip { display: inline-flex; align-items: center; min-height: 28px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(61, 132, 255, 0.05); color: var(--muted-strong); padding: 4px 10px; font-size: 0.7rem; font-weight: 700; }

/* =========================================================
   FINANCE / CASH
   ========================================================= */
.money-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 18px 0; border-bottom: 1px solid var(--line); padding-bottom: 18px; flex-wrap: wrap; }
.money-hero strong { display: block; font-family: var(--mono); font-size: clamp(2.1rem, 5vw, 3.2rem); letter-spacing: -0.03em; line-height: 0.9; }
.money-hero span { color: var(--faint); font-size: 0.7rem; text-align: right; }
.money-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.money-row div { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.02); padding: 12px; }
.money-row strong, .money-row span { display: block; }
.money-row strong { font-family: var(--mono); font-size: 1.08rem; }
.money-row span { margin-top: 3px; color: var(--faint); font-size: 0.64rem; }
.result-good { color: var(--green); }
.result-bad { color: var(--red); }
.cash-lines { display: grid; gap: 10px; margin-top: 18px; }
.cash-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.cash-line:last-child { border-bottom: 0; }
.cash-line span { color: var(--muted); font-size: 0.76rem; }
.cash-line strong { text-align: right; font-family: var(--mono); font-size: 0.86rem; }
.cash-result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.result-card { border: 1px solid rgba(74, 222, 128, 0.2); border-radius: var(--radius-sm); background: rgba(74, 222, 128, 0.05); padding: 13px; }
.result-card.stress { border-color: rgba(248, 113, 122, 0.24); background: rgba(248, 113, 122, 0.06); }
.result-card span, .result-card strong { display: block; }
.result-card span { min-height: 2.4em; color: var(--faint); font-size: 0.63rem; }
.result-card strong { margin-top: 5px; font-family: var(--mono); color: var(--green); font-size: 1.2rem; }
.result-card.stress strong { color: var(--red); }

/* =========================================================
   TABLES
   ========================================================= */
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.8rem; }
caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 15px; text-align: left; white-space: nowrap; }
th.num, td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
th { position: sticky; z-index: 2; top: 0; background: #121319; color: var(--faint); font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.brand-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.brand-cell::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--brand-color); }
.empty-value { color: var(--faint); }
.empty-state { padding: 40px 20px; text-align: center; color: var(--faint); }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.table-footnote { margin: 10px 4px 0; color: var(--faint); font-size: 0.7rem; }
.thumb-link { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); text-decoration: none; font-size: 0.8rem; font-weight: 700; }
.thumb-link:hover { text-decoration: underline; }

/* Round F (08/09/2026), pedido do proprietário: na Fila de revisão de
   comprovantes, mesmo dando zoom out no navegador, ele tinha que arrastar a
   barra de rolagem horizontal da tabela pra ver o arquivo ou pra
   aprovar/rejeitar — as duas colunas (Arquivo/Decisão) viraram UMA só
   ("Ações", ver admin.js) e essa coluna fica fixa (sticky) na borda direita
   da tabela, sempre visível, sem precisar arrastar nada. */
.table-wrap-queue { position: relative; }
.queue-actions-th, .queue-actions-td {
  position: sticky;
  right: 0;
  z-index: 3;
  background: var(--surface);
  box-shadow: -8px 0 12px -10px rgba(0, 0, 0, 0.55);
}
.queue-actions-th { z-index: 4; background: #121319; }
.queue-actions-col { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 108px; }

/* =========================================================
   STAFF / COMMISSIONS
   ========================================================= */
.staff-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.staff-day { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 14px; }
.staff-day.is-today { border-color: rgba(61, 132, 255, 0.4); background: rgba(61, 132, 255, 0.04); }
.staff-day-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.staff-day-head strong { font-size: 0.78rem; }
.staff-day-head span { color: var(--faint); font-family: var(--mono); font-size: 0.66rem; }
.staff-shift { display: grid; gap: 1px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 0.7rem; }
.staff-shift:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.staff-shift strong { color: var(--text); }
.staff-shift span { display: flex; justify-content: space-between; color: var(--faint); font-family: var(--mono); font-size: 0.66rem; }

.commission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.commission-card { position: relative; padding: 18px; overflow: hidden; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.commission-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  opacity: 0.75;
}
.commission-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.commission-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
/* Fase 5: ícone genérico de pessoa no lugar do avatar de iniciais com
   gradiente (o pacote pede pra tirar esse efeito "flashy" sem informação
   real por trás — o nome já identifica quem é). */
.commission-persona {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted-strong);
}
.commission-persona svg { width: 19px; height: 19px; }
.commission-card-head .commission-identity { min-width: 0; display: grid; }
.commission-card-head strong { font-size: 0.9rem; letter-spacing: -0.005em; }
.commission-card-head span { display: block; color: var(--faint); font-size: 0.66rem; }
.badge-manager { background: rgba(141, 117, 223, 0.14); color: var(--purple); }
.commission-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.commission-stat { border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); padding: 9px 11px; }
.commission-stat span { display: block; color: var(--faint); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 3px; }
.commission-stat strong { display: block; font-family: var(--mono); font-size: 0.9rem; }
.commission-figure { font-family: var(--mono); font-size: 1.5rem; font-weight: 650; }
.commission-figure small { display: block; margin-top: 2px; font-family: var(--sans); color: var(--faint); font-size: 0.66rem; font-weight: 500; }
/* Fase 5: comissão por venda e pagamento de turnos ficam em blocos
   separados e rotulados — o pacote pede pra não misturar as duas coisas
   num único "total a pagar". */
.commission-section-label { margin: 12px 0 8px; color: var(--faint); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.commission-payout { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.commission-payout-item span { display: block; color: var(--faint); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 2px; }
.commission-payout-item strong { font-family: var(--mono); font-size: 1rem; }
.commission-payout-item.is-total strong { color: var(--green); font-size: 1.2rem; }

/* =========================================================
   GOAL / PROJECTION
   ========================================================= */
.source-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.source-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.02); padding: 14px; }
.source-card .eyebrow { margin-bottom: 8px; }
.source-card strong { display: block; font-family: var(--mono); font-size: 1.4rem; }
.source-card span { display: block; margin-top: 4px; color: var(--faint); font-size: 0.7rem; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .kpi-grid, .kpi-grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-grid { grid-template-columns: 1fr; }
  .campaign-layout, .chart-grid-2, .split-grid, .history-layout { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-brandstrip { flex-wrap: wrap; }
}

@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-tabbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 7, 10, 0.92);
    backdrop-filter: blur(14px);
    padding: 10px 14px;
  }
  .mobile-tabbar button {
    flex: 0 0 auto;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted-strong);
    padding: 7px 13px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
  }
  .mobile-tabbar button.is-active { border-color: rgba(61, 132, 255, 0.5); background: rgba(61, 132, 255, 0.1); color: var(--text); }
  .topbar { position: static; padding: 14px 16px; }
  .view { padding: 20px 16px 56px; }
  .kpi-grid, .kpi-grid.cols-5, .budget-row, .money-row, .cash-result, .source-split, .coverage-grid, .commission-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-note { text-align: left; }
  .topnav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* =========================================================
   TOAST — feedback transitório (Fase 2 — design system).
   Empilha no canto inferior direito; cada toast se remove sozinho.
   Ver js/ui-kit.js → window.VLAUi.toast(mensagem, tipo).
   ========================================================= */
.toast-stack {
  position: fixed;
  z-index: 500;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  box-shadow: var(--shadow);
  padding: 13px 14px;
  font-size: 0.82rem;
  color: var(--text);
  animation: toast-in var(--motion-slow) var(--ease-out) both;
}
.toast::before { content: ""; width: 6px; height: 6px; margin-top: 6px; flex: 0 0 auto; border-radius: 99px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.toast.is-success::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
.toast.is-error::before { background: var(--red); box-shadow: 0 0 10px var(--red); }
.toast.is-leaving { animation: toast-out var(--motion-base) var(--ease-out) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .toast.is-leaving { animation: none; } }

/* =========================================================
   MODAL — diálogo genérico reutilizável (Fase 2 — design system).
   Ver js/ui-kit.js → window.VLAUi.openModal(...).
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(3, 3, 5, 0.7);
  backdrop-filter: blur(6px);
  padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 440px;
  max-height: min(80vh, 640px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 26px 24px 24px;
  animation: rise-in var(--motion-slow) var(--ease-out) both;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.modal-head h2 { font-size: 1.08rem; }
.modal-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted-strong);
  cursor: pointer;
}
.modal-body { color: var(--muted-strong); font-size: 0.86rem; line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (prefers-reduced-motion: reduce) { .modal-card { animation: none; } }
.modal-card.is-wide-modal { max-width: 720px; }
/* Round X.2 (10/09/2026), pedido do proprietário: "queria que o pop up
   fosse maior, tá pequeno" — variante mais larga que .is-wide-modal, só
   pros modais de Códigos e Sites de ativação (activation-codes.js). */
.modal-card.is-xwide-modal { max-width: 960px; max-height: min(88vh, 780px); }
@media (max-width: 1040px) { .modal-card.is-xwide-modal { max-width: 92vw; } }

/* =========================================================
   FECHAMENTO DO CAIXA — redesenho Round L (08/09/2026), pedido do
   proprietário: "deixe a aba de fechamento de caixa mais bonita com um
   design totalmente renomado". Prefixo ccx- exclusivo deste módulo
   (auditado via grep antes do redesenho — nenhuma outra tela usa estas
   classes; .badge-closed é a única classe antiga mantida, é global de
   badges). Substitui .kv-list/.cash-hero*/.uncertainty-*/
   .cash-breakdown-grid, que não são mais usadas em nenhum arquivo.
   Nenhuma fórmula de cash-closing.js foi tocada — só a apresentação.
   ========================================================= */
.badge-closed { background: rgba(141, 117, 223, 0.14); color: var(--purple); }

/* --- Hero: resultado do dia com glow tingido pelo sinal --- */
.ccx-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 28px 28px 24px;
}
.ccx-hero::before {
  content: "";
  position: absolute;
  inset: -42% -18% auto auto;
  z-index: -1;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--ccx-glow, rgba(154, 158, 168, 0.16)) 0%, transparent 70%);
}
.ccx-hero.is-profit { --ccx-glow: rgba(74, 222, 128, 0.32); }
.ccx-hero.is-loss { --ccx-glow: rgba(248, 113, 122, 0.32); }
.ccx-hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.ccx-hero-figure-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin: 6px 0 18px; }
.ccx-hero-figure { font-family: var(--display); font-size: clamp(2.1rem, 4vw, 3.1rem); line-height: 1; font-variant-numeric: tabular-nums; }
.ccx-hero-word { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ccx-stat-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ccx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); font-size: 0.8rem; color: var(--muted-strong); }
.ccx-chip strong { font-variant-numeric: tabular-nums; color: var(--text); }
.ccx-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ccx-dot.is-receita { background: var(--green); }
.ccx-dot.is-custo { background: var(--amber); }

/* --- Faixa de incerteza: dois extremos honestos, sem escala numérica fake --- */
.ccx-range { margin-top: 18px; border: 1px solid rgba(251, 191, 36, 0.25); border-radius: var(--radius-sm); background: rgba(251, 191, 36, 0.06); padding: 16px 18px; }
.ccx-range-note { font-size: 0.78rem; color: var(--muted-strong); margin: 0 0 14px; }
.ccx-range-track { position: relative; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 4px 10px; }
.ccx-range-track .ccx-range-fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: 2px; background: var(--amber); }
.ccx-range-ends { display: flex; justify-content: space-between; gap: 16px; }
.ccx-range-end { display: flex; flex-direction: column; gap: 3px; max-width: 48%; }
.ccx-range-end span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.ccx-range-end strong { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.ccx-range-end.is-end-right { text-align: right; align-items: flex-end; }
.ccx-range-foot { font-size: 0.74rem; color: var(--faint); margin: 12px 0 0; }

/* --- Ledger (extrato) de receitas e custos, em duas colunas --- */
.ccx-ledger-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.ccx-ledger-col { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 16px 18px; }
.ccx-ledger-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ccx-ledger-head strong { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.ccx-ledger-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ccx-ledger-row { display: grid; gap: 5px; }
.ccx-ledger-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.8rem; color: var(--muted-strong); }
.ccx-ledger-row-top span { display: inline-flex; align-items: center; gap: 8px; }
.ccx-ledger-row-top strong { font-variant-numeric: tabular-nums; color: var(--text); }
.ccx-ledger-bar-track { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.ccx-ledger-bar-fill { height: 100%; border-radius: 2px; }
.ccx-ledger-bar-fill.is-receita { background: var(--green); }
.ccx-ledger-bar-fill.is-custo { background: var(--amber); }

/* --- Navegador de dia: pílula unificada, substitui os botões soltos --- */
.ccx-daynav { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.ccx-daynav input[type="date"] { border: none; background: transparent; color: var(--text); font: inherit; padding: 6px 10px; border-radius: 999px; }
.ccx-daynav button { border: none; background: transparent; color: var(--muted-strong); padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.ccx-daynav button:hover { background: var(--surface-2); color: var(--text); }
.ccx-daynav button.is-today { color: var(--cyan); font-weight: 600; }

/* --- Listas de lançamentos (pendências/entradas manuais) --- */
.ccx-entry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ccx-entry-item { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 12px 14px; }
.ccx-entry-item strong { font-variant-numeric: tabular-nums; }
.ccx-entry-item span { font-size: 0.76rem; color: var(--muted); }
.ccx-entry-actions { margin-top: 4px; }

/* --- Histórico: barra de magnitude embutida na célula de resultado --- */
.ccx-history-cell-result { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ccx-history-row-bar { position: relative; height: 5px; width: 64px; border-radius: 3px; background: var(--surface-3); overflow: hidden; flex: none; }
.ccx-history-row-bar > span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; }
.ccx-history-row-bar > span.result-good { background: var(--green); }
.ccx-history-row-bar > span.result-bad { background: var(--red); }

@media (max-width: 720px) {
  .ccx-ledger-grid { grid-template-columns: 1fr; }
  .ccx-hero-figure { font-size: 1.7rem; }
  .ccx-daynav { flex-wrap: wrap; }
  .ccx-history-row-bar { width: 40px; }
}

/* =========================================================
   LOGINS COMPARTILHADOS (Round M, 08/09/2026) — acessos dos painéis
   externos que a equipe usa (Grupo VLA, Ativações IBO, TTR, Elite).
   ========================================================= */
.login-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.login-item { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 16px 18px; }
.login-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.login-head strong { font-size: 0.98rem; }
.login-link { display: block; margin-top: 2px; font-size: 0.78rem; color: var(--cyan); text-decoration: none; word-break: break-all; }
.login-link:hover { text-decoration: underline; }
.login-actions { display: flex; gap: 8px; flex: none; }
.login-fields { display: grid; gap: 10px; }
.login-field { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; }
.login-field span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.login-value { display: flex; align-items: center; gap: 8px; }
.login-value code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; font-family: var(--mono); font-size: 0.82rem; color: var(--text); }
.login-notes { margin: 12px 0 0; font-size: 0.78rem; color: var(--muted); }
@media (max-width: 560px) {
  .login-field { grid-template-columns: 1fr; }
  .login-value { flex-wrap: wrap; }
}

/* =========================================================
   TOOLTIP — dica curta ao passar o mouse/focar (Fase 2).
   Uso: <span class="tooltip" data-tip="Texto da dica">…</span>
   ========================================================= */
.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 60;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 220px;
  border-radius: 8px;
  background: #1a1c24;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.tooltip:hover::after, .tooltip:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .tooltip::after { transition: none; } }

/* =========================================================
   SKELETON — placeholder de carregamento (Fase 2).
   Uso: <div class="skeleton" style="width:120px;height:14px;"></div>
   ========================================================= */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-2);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: skeleton-sweep 1.4s ease-in-out infinite;
}
@keyframes skeleton-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; display: none; } }

/* =========================================================
   NOTIFICAÇÕES — sino + painel (Fase 3).
   Ver js/notifications.js → window.VLANotifications.init(...)
   ========================================================= */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted-strong);
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}
.notif-bell svg { width: 17px; height: 17px; }
.notif-bell:hover, .notif-bell[aria-expanded="true"] { border-color: var(--line-strong); color: var(--text); }
.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #2a0405;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0 4px;
  box-shadow: 0 0 0 2px var(--surface-2);
}
.notif-badge[hidden] { display: none; }
.notif-panel {
  /* position: fixed — o topo/esquerda reais são calculados em JS a partir
     da posição do sino (window.VLANotifications), para nunca vazar para
     fora da tela em telas estreitas. Os valores abaixo são só um retrocesso
     de segurança caso o JS não rode por algum motivo. */
  position: fixed;
  z-index: 200;
  top: 64px;
  right: 12px;
  width: min(360px, calc(100vw - 24px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise-in var(--motion-slow) var(--ease-out) both;
}
.notif-panel[hidden] { display: none; }
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  font-size: 0.86rem;
}
.notif-mark-all { border: 0; background: none; color: var(--cyan); font-size: 0.72rem; font-weight: 700; cursor: pointer; padding: 0; }
.notif-mark-all:hover { text-decoration: underline; }
.notif-list { overflow-y: auto; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: inherit;
  text-align: left;
  padding: 13px 16px;
  cursor: pointer;
  font: inherit;
  transition: background var(--motion-fast) ease;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: rgba(255, 255, 255, 0.03); }
.notif-item-dot { width: 7px; height: 7px; margin-top: 6px; flex: 0 0 auto; border-radius: 99px; background: transparent; }
.notif-item.is-unread .notif-item-dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.notif-item-body { display: grid; gap: 3px; min-width: 0; }
.notif-item-body strong { font-size: 0.82rem; }
.notif-item.is-unread .notif-item-body strong { color: var(--text); }
.notif-item-body span { color: var(--muted-strong); font-size: 0.78rem; line-height: 1.4; }
.notif-item-body small { color: var(--faint); font-size: 0.68rem; }
@media (prefers-reduced-motion: reduce) { .notif-panel { animation: none; } }

/* Destaque temporário de uma linha de tabela ao abrir uma notificação
   (ex.: comprovante aprovado/rejeitado) — ver VLANotifications.highlightRow. */
@keyframes notif-highlight-flash {
  0%, 100% { background: transparent; }
  15%, 60% { background: rgba(61, 132, 255, 0.14); }
}
.is-notif-highlight { animation: notif-highlight-flash 2.4s ease; }
@media (prefers-reduced-motion: reduce) { .is-notif-highlight { animation: none; background: rgba(61, 132, 255, 0.14); } }

/* =========================================================
   MINHA SEMANA — estado vazio (nenhuma escala publicada ainda, ou
   ainda carregando). Usado por window.VLASchedule.mountMyWeek.
   ========================================================= */
.my-week-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  padding: 18px;
  color: var(--muted-strong);
  font-size: 0.84rem;
}
.my-week-empty svg { flex: 0 0 auto; width: 26px; height: 26px; color: var(--faint); }

/* =========================================================
   ESCALAS · TURNOS · PAGAMENTO SEMANAL (Fase 4)
   ========================================================= */

/* -- Minha semana: lista de turnos do próprio atendente -- */
.myweek-week + .myweek-week { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.myweek-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.myweek-row:last-child { border-bottom: 0; }
.myweek-day { display: grid; gap: 2px; }
.myweek-day strong { font-size: 0.8rem; text-transform: capitalize; }
.myweek-day span { color: var(--faint); font-family: var(--mono); font-size: 0.7rem; }
.myweek-shift { display: grid; gap: 2px; min-width: 0; }
.myweek-shift strong { font-size: 0.86rem; }
.myweek-shift span { color: var(--muted-strong); font-size: 0.76rem; font-family: var(--mono); }
.myweek-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.myweek-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.myweek-pill.is-planned { background: rgba(154, 158, 168, 0.12); color: var(--muted-strong); }
.myweek-pill.is-confirmed { background: rgba(74, 222, 128, 0.12); color: var(--green); }
.myweek-pill.is-absent { background: rgba(248, 113, 122, 0.12); color: var(--red); }
.myweek-pill.is-substituted { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.myweek-buttons { display: flex; gap: 8px; }
@media (max-width: 720px) {
  .myweek-row { grid-template-columns: 1fr; gap: 8px; }
  .myweek-status { justify-content: flex-start; }
}

/* -- Editor de escala (admin/gerente): grade de atendentes × 7 dias -- */
.sched-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.sched-week-label { display: flex; align-items: center; gap: 10px; }
.sched-week-label strong { font-size: 0.94rem; font-family: var(--mono); }
.sched-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sched-paydate { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; color: var(--muted-strong); }
.sched-paydate input {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 6px 9px;
  font-size: 0.78rem;
  font-family: inherit;
}
.sched-table th { white-space: normal; text-align: center; }
.sched-table td { vertical-align: top; white-space: normal; }
.sched-attendant-name { font-weight: 700; white-space: nowrap; vertical-align: middle; }
.sched-select {
  width: 100%;
  min-width: 168px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 7px 9px;
  font-size: 0.74rem;
  font-family: inherit;
}
.sched-select:disabled { opacity: 0.5; }
.sched-cell-status {
  display: inline-block;
  margin-top: 5px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sched-cell-status.is-confirmed { background: rgba(74, 222, 128, 0.12); color: var(--green); }
.sched-cell-status.is-absent { background: rgba(248, 113, 122, 0.12); color: var(--red); }
.sched-cell-status.is-substituted { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.sched-cell-value { display: block; margin-top: 4px; color: var(--faint); font-family: var(--mono); font-size: 0.66rem; }

/* Round X.3 (17/09/2026), pedido do proprietário: bug em que um turno
   "sumia" quando a Lorrany lançava vários de uma vez na grade antiga (a
   grade tinha um <select> por célula + uma trava "busy" única — se ela
   mudasse uma segunda célula antes da primeira terminar de salvar, essa
   segunda mudança era descartada em silêncio, e ao recarregar a célula
   voltava a aparecer vazia). Correção: a grade virou só uma VISÃO DE
   LEITURA (.sched-grid abaixo); toda criação/edição passa pelo assistente
   em 3 passos (.sched-wizard), que só permite uma ação de cada vez e nunca
   fecha o modal enquanto a gravação está em andamento — não há mais como
   duas gravações concorrerem. Ver mountEditor() em schedule.js.
   Também usada aqui: um pequeno refino visual dos cartões/turnos
   repetidos, pedido junto (deixar a tela de escala mais bonita). */
.sched-grid-card { padding: 20px 22px 22px; }
.sched-grid-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.sched-grid-head h2 { font-size: 1.05rem; }
.sched-launch-btn { flex: 0 0 auto; }
.sched-grid-empty { padding: 34px 20px; text-align: center; color: var(--faint); }
.sched-grid-empty svg { width: 26px; height: 26px; margin: 0 auto 10px; display: block; color: var(--faint); }

.sched-chip {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--muted);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 150ms ease, transform 150ms var(--ease-out), background 150ms ease;
}
.sched-chip:hover { background: var(--surface-3); transform: translateY(-1px); }
.sched-chip strong { display: block; font-size: 0.76rem; line-height: 1.3; }
.sched-chip span { display: block; margin-top: 2px; color: var(--faint); font-family: var(--mono); font-size: 0.64rem; }
.sched-chip.is-confirmed { border-left-color: var(--green); }
.sched-chip.is-absent { border-left-color: var(--red); }
.sched-chip.is-substituted { border-left-color: var(--amber); }
.sched-chip.is-planned { border-left-color: var(--cyan); }
.sched-cell-empty { display: block; text-align: center; color: var(--faint); font-size: 0.8rem; padding: 8px 0; }

/* Assistente "Lançar turno" — 3 passos (dia -> horário -> atendente),
   sempre um turno de cada vez. */
.sched-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.sched-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
}
.sched-step-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-strong);
}
.sched-step.is-done .sched-step-dot { border-color: var(--green); background: rgba(74, 222, 128, 0.14); color: var(--green); }
.sched-step.is-current .sched-step-dot { border-color: var(--cyan); background: rgba(61, 132, 255, 0.14); color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 132, 255, 0.12); }
.sched-step.is-current { color: var(--text); }
.sched-step-line { flex: 1 1 auto; height: 1px; background: var(--line-strong); min-width: 16px; }

.sched-wizard-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.78rem;
  color: var(--muted-strong);
}
.sched-wizard-summary strong { color: var(--text); }

.sched-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.sched-pick-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 150ms ease, transform 150ms var(--ease-out), background 150ms ease, box-shadow 150ms ease;
}
.sched-pick-card:hover { border-color: rgba(61, 132, 255, 0.5); background: var(--surface-3); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.sched-pick-card strong { font-size: 0.86rem; }
.sched-pick-card span { color: var(--faint); font-size: 0.72rem; font-family: var(--mono); }
.sched-pick-card small { color: var(--muted); font-size: 0.7rem; }
.sched-pick-card.is-danger { border-color: rgba(248, 113, 122, 0.35); }
.sched-pick-card.is-danger:hover { border-color: rgba(248, 113, 122, 0.6); background: rgba(248, 113, 122, 0.08); }
.sched-pick-card.is-danger strong { color: #ffb3b8; }

.sched-attendant-filter { margin-bottom: 12px; }
.sched-attendant-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; padding-right: 2px; }
.sched-attendant-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 150ms ease, background 150ms ease;
}
.sched-attendant-pick:hover { border-color: rgba(61, 132, 255, 0.5); background: var(--surface-3); }
.sched-attendant-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #05060a;
  font-weight: 800;
  font-size: 0.76rem;
}
.sched-attendant-pick strong { font-size: 0.84rem; }
.sched-attendant-pick span { display: block; color: var(--faint); font-size: 0.68rem; text-transform: capitalize; }

.sched-wizard-back { margin-bottom: 14px; }
.sched-conflict-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  line-height: 1.5;
}
.sched-conflict-icon { flex: 0 0 auto; }
.sched-conflict-text { flex: 1 1 auto; min-width: 0; color: #f3d9a4; }
.my-week-empty svg { width: 26px; height: 26px; flex: 0 0 auto; color: var(--faint); }

/* Round X (10/09/2026): Códigos de ativação (NTDOWN/Downloader) e Sites de
   ativação de listas — lista compacta ícone + nome/link + ação, mesmo
   espírito visual de .login-list, com espaço pra logo do app/site. */
.act-groups { display: grid; gap: 22px; }
.act-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.act-group-head img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 2px; flex: 0 0 auto; }
.act-group-head strong { display: block; font-size: 0.92rem; }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.act-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 10px 12px; }
.act-item img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 3px; flex: 0 0 auto; }
.act-item-noicon { grid-template-columns: minmax(0, 1fr) auto; }
.act-item-body { min-width: 0; }
.act-item-body strong { display: block; font-size: 0.86rem; }
.act-item-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.act-code { font-family: var(--mono); font-size: 0.8rem; background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 5px 9px; white-space: nowrap; }
@media (max-width: 640px) {
  .act-item { grid-template-columns: auto 1fr; }
  .act-item-noicon { grid-template-columns: 1fr; }
  .act-item-actions { grid-column: 1 / -1; margin-top: 4px; padding-left: 48px; }
  .act-item-noicon .act-item-actions { padding-left: 0; }
}
