/* ===========================================================
   NIVEO CAPTURE — Design System + App do Cliente
   base premium escura · laranja = energia/direção · Sora + Inter
   diagonal 35–45° como assinatura · geométrico e incisivo
   =========================================================== */
:root {
  /* Brand NIVEO */
  --niveo-orange: #ff4800;
  --niveo-orange-dark: #ee4b00;
  --niveo-orange-light: #ff6400;
  --niveo-ember: #480b07;
  --niveo-black: #000000;
  --niveo-graphite: #212121;
  --niveo-white: #ffffff;

  /* Aliases legados (mesmos nomes, valores NIVEO) */
  --pink: var(--niveo-orange);
  --pink-dark: var(--niveo-orange-dark);
  --pink-soft: rgba(255, 72, 0, 0.14);
  --accent-bright: var(--niveo-orange-light);

  --bg: #000000;
  --surface: #161616;
  --surface-2: #212121;
  --surface-3: #2c2b2a;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: #a8a29c;
  --muted-2: #726c67;
  --ok: #1e9e5a;
  --warn: #c98a00;
  --danger: #d93b30;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --slash: 40deg;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 44px -16px rgba(0, 0, 0, 0.7);

  --font-head: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --maxw: 560px;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overscroll-behavior-y: none;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.01em; margin: 0 0 0.4em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }

.brand-mark {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--pink);
  font-size: 0.85rem;
}

/* Layout */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 20px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.content { flex: 1; }
.spacer { flex: 1; }

/* Conteúdo expandido em telas médias e grandes */
@media (min-width: 768px) {
  .container { max-width: 720px; padding: 28px 32px; }
}
@media (min-width: 1024px) {
  .container { max-width: 900px; padding: 32px 40px; }
  /* Grade de 2 colunas para cards de ação na home */
  .home-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (min-width: 1280px) {
  .container { max-width: 1060px; }
}

/* Botões */
.btn {
  --bg-btn: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: var(--radius-sm);
  background: var(--bg-btn); color: var(--text);
  border: 1px solid var(--line-strong); cursor: pointer;
  font-size: 0.95rem; font-weight: 600; width: 100%;
  transition: transform 0.06s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { --bg-btn: var(--niveo-orange); border-color: var(--niveo-orange); color: #fff; position: relative; overflow: hidden; }
.btn-primary:hover { --bg-btn: var(--niveo-orange-dark); border-color: var(--niveo-orange-dark); }
/* assinatura NIVEO: brilho diagonal 40° atravessa a ação primária */
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(var(--slash), transparent 44%, rgba(255, 255, 255, 0.28) 50%, transparent 56%);
  transform: translateX(-140%); transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.btn-primary:hover::after { transform: translateX(140%); }
@media (prefers-reduced-motion: reduce) { .btn-primary::after { display: none; } }
.btn-ghost { --bg-btn: transparent; border-color: var(--line-strong); }
.btn-danger { --bg-btn: transparent; border-color: rgba(217, 59, 48, 0.5); color: #ff8f88; }
.btn-sm { padding: 9px 14px; font-size: 0.85rem; width: auto; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: 100%; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.card-tap { cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.card-tap:hover { border-color: var(--line-strong); background: var(--surface-2); }
.card h3 { font-size: 1.05rem; }

.eyebrow { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.75rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; }

/* Chips / badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.chip-pink { background: var(--pink-soft); border-color: transparent; color: var(--accent-bright); }
.chip-ok { color: #7ee2a8; border-color: rgba(34, 197, 94, 0.3); }
.chip-warn { color: #ffcf87; border-color: rgba(245, 166, 35, 0.3); }
.chip-danger { color: #ff8f88; border-color: rgba(217, 59, 48, 0.35); }
.chip-campaign { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); background: rgba(139, 92, 246, 0.08); gap: 4px; }
/* Código do ticket (ex.: MID-13) — referência que o cliente passa ao suporte */
.chip-code {
  flex: none; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.03em; color: var(--text);
  background: var(--surface-3); border-color: var(--line-strong);
}
.chip-board {
  background: color-mix(in srgb, var(--board, #8a8a90) 14%, transparent);
  border-color: color-mix(in srgb, var(--board, #8a8a90) 55%, transparent);
  color: var(--board, #8a8a90);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.chip-board .i svg { stroke: currentColor; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  font-size: 0.95rem; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--pink); }
.textarea { min-height: 90px; resize: vertical; }

/* Progress */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--pink); width: 0; transition: width 0.25s ease; }

/* Steps */
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps > i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.steps > i.done { background: var(--pink); }
.steps > i.active { background: var(--accent-bright); }

/* Login */
.auth-wrap { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 0 26px; margin-bottom: 2px; }
.niveo-logo { display: block; filter: drop-shadow(0 6px 20px rgba(255, 72, 0, 0.35)); }
.niveo-lockup { display: block; }
.sidebar .niveo-lockup { filter: none; }
.auth-card .brand-big {
  font-family: var(--font-head); font-weight: 800; letter-spacing: 0.18em;
  color: var(--pink); font-size: 1.05rem; text-align: center;
}
.gis-slot { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; opacity: .92; }
.gis-host { display: flex; justify-content: center; }
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 0.75rem; width: 100%; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ===========================================================
   LOGIN SPLIT-SCREEN — painel de formulário + showcase de produto
   =========================================================== */
.login-split {
  --mono: 'Space Mono', ui-monospace, monospace;
  min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr;
  background: var(--bg); position: relative;
}

/* ---------- painel esquerdo: formulário ---------- */
.ls-form-pane { display: flex; flex-direction: column; justify-content: center; padding: 32px clamp(28px, 5vw, 64px); position: relative; }
.ls-form-inner { width: 100%; max-width: 336px; margin: 0 auto; }
.ls-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.ls-brand img { height: 28px; width: auto; }
.ls-brand-word { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.02em; }

.ls-title { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.01em; margin: 0 0 4px; }
.ls-sub { color: var(--muted); font-size: 0.86rem; margin: 0 0 22px; line-height: 1.45; }

.ls-field { margin-bottom: 14px; }
.ls-field label {
  display: block; font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.ls-field .input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); font-size: 0.9rem; padding: 10px 13px; transition: border-color 0.15s, background 0.15s;
}
.ls-field .input:focus { outline: none; border-color: var(--niveo-orange); background: var(--surface-3); }
.ls-field .input::placeholder { color: var(--muted-2); }

.ls-pass-row { position: relative; }
.ls-pass-row .input { padding-right: 44px; }
.ls-pass-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 8px; display: flex; border-radius: 8px; transition: color 0.15s;
}
.ls-pass-toggle:hover { color: var(--text); }
.ls-pass-toggle svg { width: 18px; height: 18px; }

.ls-forgot-row { display: flex; justify-content: flex-end; margin: 8px 0 18px; }
.ls-forgot-row a { font-size: 0.78rem; color: var(--muted); transition: color 0.15s; }
.ls-forgot-row a:hover { color: var(--niveo-orange-light); }

.ls-btn-primary {
  width: 100%; padding: 11px; border-radius: var(--radius); border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 0.9rem; color: #fff;
  background: linear-gradient(135deg, var(--niveo-orange-light) 0%, var(--niveo-orange) 55%, var(--niveo-orange-dark) 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 32px -14px rgba(255, 72, 0, 0.55);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.ls-btn-primary:hover { filter: brightness(1.06); box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 38px -14px rgba(255, 72, 0, 0.68); }
.ls-btn-primary:active { transform: translateY(1px); }
.ls-btn-primary:disabled { opacity: 0.6; cursor: default; filter: none; transform: none; }

.ls-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 0.7rem; margin: 14px 0; }
.ls-divider::before, .ls-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.ls-btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px;
  border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--text); font-family: var(--font-body); font-weight: 600; font-size: 0.86rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ls-btn-google:hover { border-color: var(--line-strong); background: var(--surface-3); }
.ls-btn-google img { width: 17px; height: 17px; background: #fff; border-radius: 3px; padding: 1px; }

.ls-foot { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ls-foot-links .install-wrap { margin-top: 0; display: flex; align-items: center; }
.ls-foot-links .install-wrap:empty { display: none; }
.ls-foot-links .install-wrap::before { content: '·'; color: var(--muted-2); margin-right: 14px; }
.ls-foot-links .install-wrap .btn {
  background: none; border: none; padding: 0; font-weight: 400; box-shadow: none; border-radius: 0;
}
.ls-foot-links .install-wrap .btn:hover { background: none; transform: none; }
.ls-foot .install-hint { font-size: 0.72rem; }
.ls-foot-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.ls-foot-links a, .ls-foot-links button {
  font-size: 0.76rem; color: var(--muted); background: none; border: none; cursor: pointer; font-family: inherit;
  padding: 0; transition: color 0.15s;
}
.ls-foot-links a:hover, .ls-foot-links button:hover { color: var(--text); }
.ls-foot-sep { color: var(--muted-2); font-size: 0.76rem; }
.ls-foot-copy { font-size: 0.68rem; color: var(--muted-2); text-align: center; }

/* ---------- seletor de idioma ---------- */
.ls-lang { position: absolute; top: 20px; right: 20px; z-index: 30; }
.ls-lang-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px;
  background: rgba(22,22,22,0.7); backdrop-filter: blur(10px); border: 1px solid var(--line-strong);
  color: var(--text); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; cursor: pointer;
}
.ls-lang-btn:hover { border-color: rgba(255,255,255,0.3); }
.ls-lang-btn svg { width: 14px; height: 14px; opacity: 0.8; }
.ls-lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 6px; min-width: 210px; box-shadow: var(--shadow); display: none; flex-direction: column; gap: 2px;
}
.ls-lang-menu.open { display: flex; }
.ls-lang-opt {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; background: none; border: none;
  color: var(--text); font-size: 0.82rem; cursor: pointer; text-align: left; width: 100%; font-family: var(--font-body);
}
.ls-lang-opt:hover { background: var(--surface-3); }
.ls-lang-opt > span:nth-child(2) { flex: 1; white-space: nowrap; }
.ls-lang-opt .flag { font-size: 1rem; }
.ls-lang-opt .code { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); margin-left: auto; }

/* ---------- painel direito: showcase ---------- */
.ls-showcase { position: relative; overflow: hidden; background: var(--niveo-black); }
.ls-showcase-media-wrap { position: absolute; inset: 0; }
.ls-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease;
  pointer-events: none;
}
.ls-slide.active { opacity: 1; pointer-events: auto; }
.ls-slide video, .ls-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ls-scrim-top {
  position: absolute; top: 0; left: 0; right: 0; height: 32%; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 100%);
}
.ls-scrim-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; height: 46%; z-index: 2; pointer-events: none;
  background: linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.4) 55%, rgba(0,0,0,0) 100%);
}
.ls-noise {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.4; mix-blend-mode: overlay;
  background: radial-gradient(ellipse 60% 50% at 20% 0%, rgba(255,100,0,.1), transparent 70%);
}

.ls-showcase-head { position: absolute; top: 44px; left: 44px; right: 44px; z-index: 5; max-width: 520px; }
.ls-showcase-head h2 {
  font-family: var(--font-head); font-weight: 800; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.12;
  margin: 0; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.6);
}

.ls-showcase-foot { position: absolute; bottom: 36px; left: 44px; right: 44px; z-index: 5; }
.ls-cc-card {
  background: rgba(15,15,15,0.55); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg); padding: 20px 22px; max-width: 420px; display: flex; gap: 14px; align-items: flex-start;
}
.ls-cc-ico {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--niveo-orange-light), var(--niveo-orange-dark)); color: #fff;
}
.ls-cc-ico svg { width: 19px; height: 19px; }
.ls-cc-body strong { display: block; font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; color: #fff; margin-bottom: 4px; }
.ls-cc-body span { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.72); line-height: 1.45; }

.ls-showcase-nav { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.ls-arrow {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.3);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s, border-color 0.15s;
  flex: none;
}
.ls-arrow:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.45); }
.ls-arrow svg { width: 16px; height: 16px; }
.ls-dots { display: flex; gap: 7px; }
.ls-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.35); border: none; cursor: pointer; padding: 0; transition: background 0.2s, transform 0.2s; }
.ls-dot.active { background: var(--niveo-orange-light); transform: scale(1.3); }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .ls-showcase { height: auto; order: -1; display: flex; flex-direction: column; }
  .ls-showcase-media-wrap { position: relative; height: 200px; }
  .ls-showcase-head { position: static; padding: 16px 16px 0; margin-top: -1px; }
  .ls-showcase-head h2 { font-size: 1.1rem; }
  .ls-scrim-top, .ls-scrim-bottom, .ls-noise { display: none; }
  .ls-showcase-foot { position: static; padding: 12px 16px 16px; background: var(--surface); }
  .ls-cc-card { max-width: none; }
  .ls-form-pane { padding: 28px 24px 40px; }
  .ls-lang { top: 12px; right: 12px; }
}
@media (max-width: 420px) {
  .ls-cc-card { padding: 14px; gap: 10px; }
  .ls-cc-ico { width: 32px; height: 32px; }
  .ls-cc-body span { font-size: 0.78rem; }
}
.install-wrap { margin-top: 12px; }
.install-hint { text-align: center; line-height: 1.5; }
.install-wrap .btn { font-size: 0.85rem; }

/* Footer NIVEO */
.niveo-footer { text-align: center; padding: 8px 0 4px; color: var(--muted-2); }
.niveo-footer .sf-brand {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--muted); text-decoration: none;
}
.niveo-footer .sf-bolt { color: var(--pink); }
.niveo-footer .sf-links { margin: 4px 0 2px; }
.niveo-footer .sf-links a { color: var(--pink); font-size: 0.8rem; }
.niveo-footer .sf-copy { color: var(--muted-2); }
.content .niveo-footer { margin-top: 34px; padding-bottom: 24px; border-top: 1px solid var(--line); padding-top: 18px; }

/* Banner de notificacoes */
.notif-banner {
  background: var(--pink-soft); border: 1px solid rgba(255, 72, 0, 0.30);
  border-radius: var(--radius); padding: 14px; margin: 14px 0 4px;
}

/* Menu do usuario (legado — mantido para compatibilidade) */
.usermenu { position: relative; }
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 6px; box-shadow: var(--shadow); display: none; z-index: 40;
}
.usermenu.open .usermenu-pop { display: block; }
.usermenu-pop .um-name { padding: 8px 10px 6px; word-break: break-all; }
.usermenu-pop .um-item {
  display: block; width: 100%; text-align: left; padding: 10px; border: 0; background: transparent;
  color: var(--text); font-size: 0.9rem; border-radius: 8px; cursor: pointer;
}
.usermenu-pop .um-item:hover { background: var(--surface-3); }

/* ===== Sidebar ===== */
.app-shell { position: relative; min-height: 100dvh; }

.sb-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px); z-index: 29;
}
.sb-overlay.sb-overlay-visible { display: block; }

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--line-strong);
  display: flex; flex-direction: column; z-index: 30;
  transform: translateX(-100%); transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.sb-open .sidebar { transform: translateX(0); }

.sb-main {
  display: flex; flex-direction: column; min-height: 100dvh;
  transition: margin-left 0.25s cubic-bezier(.4,0,.2,1);
}

/* ── Desktop: sidebar sempre visível ── */
@media (min-width: 1024px) {
  .sidebar {
    transform: translateX(0);
    position: fixed;
  }
  .sb-main {
    margin-left: var(--sidebar-w);
  }
  /* overlay e hamburger não têm função no desktop */
  .sb-overlay { display: none !important; }
  .sb-hamburger { display: none !important; }
  /* topbar: título alinhado à esquerda, spacer some */
  .topbar { padding-left: 32px; gap: 0; }
  .topbar-title { text-align: left; flex: 1; }
  .topbar-spacer { display: none; }
}

.sb-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
}
.sb-header .niveo-lockup { height: 28px; width: auto; filter: none; display: block; }

.sb-user {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.sb-client {
  font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
  color: var(--text); letter-spacing: 0.04em; margin-bottom: 2px;
}
.sb-email { font-size: 0.75rem; color: var(--muted); word-break: break-all; }

.sb-nav {
  flex: 1; display: flex; flex-direction: column; padding: 10px 10px 6px; gap: 2px;
}

.sb-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 12px; border: 0; background: transparent; color: var(--muted);
  font-size: 0.88rem; border-radius: var(--radius-sm); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sb-item:hover { background: var(--surface-2); color: var(--text); }
.sb-item.active {
  background: var(--pink-soft); color: var(--accent-bright);
  font-weight: 600;
}
.sb-item.active .i svg { stroke: var(--accent-bright); }
.sb-item .i { flex-shrink: 0; }

.sb-divider { height: 1px; background: var(--line); margin: 8px 4px; }

/* Seletor de empresa ativa (multi-tenant) */
.sb-company-wrap {
  margin: 0 10px 4px;
  padding: 10px 8px;
  background: var(--surface-raised, rgba(0,0,0,.04));
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sb-company-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.sb-company-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: .85rem;
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.sb-company-select:focus { border-color: var(--accent-bright); }

.sb-footer {
  padding: 10px 10px 16px;
  border-top: 1px solid var(--line);
}
.sb-logout { color: var(--danger) !important; }
.sb-logout:hover { background: rgba(217,59,48,.12) !important; }

.sb-hamburger { font-size: 1.2rem; line-height: 1; padding: 6px 10px; }

/* Toast */
.toast-host { position: fixed; left: 0; right: 0; bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 9999; pointer-events: none; }
.toast {
  pointer-events: auto; background: var(--surface-3); border: 1px solid var(--line-strong);
  color: var(--text); padding: 12px 16px; border-radius: 10px; font-size: 0.88rem; max-width: 90vw;
  box-shadow: var(--shadow); animation: toastIn 0.2s ease;
}
.toast.err { border-color: rgba(217, 59, 48, 0.5); }
.toast.ok { border-color: rgba(34, 197, 94, 0.45); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* Loading */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--pink); animation: spin 0.8s linear infinite; }
.loading-full { min-height: 60dvh; display: grid; place-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty svg { opacity: 0.4; margin-bottom: 12px; }

/* ===================== CAPTURA ===================== */
.capture-stage { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; flex-direction: column; }
.capture-stage video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.capture-video-wrap { position: absolute; inset: 0; }
.capture-hud { position: absolute; inset: 0; display: flex; flex-direction: column; pointer-events: none; }
.capture-hud .pointer-on { pointer-events: auto; }
.hud-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), transparent);
}
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hud-timer { font-variant-numeric: tabular-nums; font-weight: 700; font-family: var(--font-head); }

.scene-panel {
  margin: auto 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  padding: 15px; border-radius: 16px;
  background: rgba(10, 10, 10, 0.74); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  flex: 0 1 auto; min-height: 0;
  max-height: 66dvh; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.scene-panel .scene-count { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--niveo-orange-light); text-transform: uppercase; }
.scene-panel .scene-text { font-size: 1.12rem; font-weight: 600; margin: 6px 0 10px; }
.scene-panel.speech .scene-text { font-size: 1.05rem; }

.scene-instruction {
  font-size: 1.05rem; font-weight: 600; line-height: 1.4; margin: 8px 0;
  display: flex; gap: 8px; align-items: flex-start;
}
.scene-tag, .tp-tag {
  flex: 0 0 auto; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em;
  padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,0.14); color: #fff;
  margin-top: 2px;
}
.tp-tag { display: inline-block; background: var(--pink); margin-bottom: 6px; }

.scene-panel.scene-paused { border-color: rgba(34,197,94,0.4); max-height: 80dvh; }
.scene-panel.scene-paused .next-preview {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  max-height: 24dvh; overflow-y: auto;
}
.scene-panel.scene-paused .btn-row {
  position: sticky; bottom: -15px; margin: 12px -15px -15px;
  padding: 12px 15px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: linear-gradient(180deg, rgba(10,10,10,0), rgba(10,10,10,0.92) 40%);
}
.rec-dot.paused { background: var(--warn); animation: none; }

/* Bottom sheet de configuracoes */
.sheet-back { position: absolute; inset: 0; background: rgba(0,0,0,0.55); z-index: 200; display: flex; align-items: flex-end; pointer-events: auto; }
.sheet .select { margin-bottom: 4px; }
.sheet {
  width: 100%; background: var(--surface); border-top-left-radius: 20px; border-top-right-radius: 20px;
  border-top: 1px solid var(--line-strong); padding: 20px 18px calc(env(safe-area-inset-bottom,0px) + 20px);
  animation: sheetUp 0.2s ease;
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: 0.6; } }
.sheet-h { font-family: var(--font-head); font-weight: 700; margin-bottom: 14px; }
.seg-group { display: flex; gap: 6px; background: var(--surface-3); padding: 4px; border-radius: 10px; }
.seg {
  flex: 1; padding: 9px 6px; border-radius: 8px; border: 0; background: transparent;
  color: var(--muted); font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.seg.on { background: var(--pink); color: #fff; }
.seg-group:has(.seg-block) { flex-direction: column; background: transparent; padding: 0; gap: 8px; }
.seg-block {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
}
.seg-block strong { font-size: 0.9rem; }
.seg-block .tiny { line-height: 1.35; }
.seg-block.on { background: var(--pink-soft); border-color: var(--pink); color: var(--text); }
.seg-block.on strong { color: var(--accent-bright); }

.teleprompter {
  max-height: 34dvh; overflow: hidden; position: relative;
  border-radius: 12px; background: rgba(0, 0, 0, 0.45); padding: 12px 14px;
}
.teleprompter .tp-scroll { transition: transform 0.1s linear; }
.teleprompter p { font-size: var(--tp-size, 1.35rem); line-height: 1.6; margin: 0; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.8); }
.teleprompter .tp-current { color: var(--niveo-orange-light); }

.hud-bottom {
  display: flex; align-items: center; justify-content: center; gap: 26px;
  padding: 16px 16px calc(env(safe-area-inset-bottom, 0px) + 22px);
  background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent);
}
.shutter {
  width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff;
  background: var(--pink); cursor: pointer; flex: 0 0 auto;
}
.shutter.recording { border-radius: 18px; background: var(--pink); }
.hud-btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12); border: 1px solid var(--line-strong); color: #fff; cursor: pointer;
}
.tp-controls { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 10px; }
.tp-controls button { width: 38px; height: 34px; border-radius: 8px; background: rgba(255,255,255,0.1); border: 1px solid var(--line-strong); color: #fff; cursor: pointer; }

.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-size: 6rem; font-weight: 800; color: #fff; background: rgba(0,0,0,0.4); }

/* Photo overlay guides */
.guide-face { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 55%; aspect-ratio: 3/4; border: 2px dashed rgba(255,255,255,0.7); border-radius: 50% / 42%; }
.guide-rule { position: absolute; background: rgba(255,255,255,0.25); }

/* Perm denied */
.perm-screen { position: fixed; inset: 0; background: var(--bg); z-index: 60; display: grid; place-items: center; padding: 24px; }

@media (min-width: 640px) {
  .capture-stage { max-width: 420px; margin: 0 auto; inset: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* ===== Solicitação de mídia (wizard) ===== */
.home-cta { display: flex; gap: 10px; margin: 14px 0 4px; flex-wrap: wrap; }
.home-cta .btn { flex: 1 1 auto; }
@media (min-width: 1024px) {
  .home-cta .btn { flex: 0 0 auto; }
}

.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.req-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 14px; border-radius: var(--radius-sm); text-align: left;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.req-card:hover { border-color: var(--pink); }
.req-card-ic { color: var(--pink); }
.req-card-label { font-weight: 600; font-size: 0.9rem; }
.req-card-tag { font-size: 0.65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }

.req-progress-bar { height: 4px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-bottom: 4px; }
.req-progress-bar > i { display: block; height: 100%; background: var(--pink); transition: width .25s ease; }
.req-fields { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.req-field { display: flex; flex-direction: column; }
.req-flabel { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.req-req { color: var(--pink); }
.req-checks { display: flex; flex-direction: column; gap: 8px; }
.req-check { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; }
.req-check input { width: 16px; height: 16px; accent-color: var(--pink); }
.req-rows, .req-uploads { display: flex; flex-direction: column; gap: 8px; }
.req-row { display: flex; gap: 8px; align-items: center; }
.req-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.req-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; cursor: pointer;
}
.req-chip.sel { background: var(--pink-soft); border-color: transparent; color: var(--accent-bright); }
.req-chip-x { background: none; border: 0; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; }
.req-upitem { display: flex; align-items: center; gap: 6px; color: var(--muted); }

/* Carrossel de paletas (passo Identidade visual) */
.req-pal-carousel-wrap { position: relative; }
.req-pal-carousel {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 26px 10px; scroll-padding-left: 26px; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.req-pal-carousel::-webkit-scrollbar { height: 6px; }
.req-pal-carousel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.req-pal {
  flex: 0 0 148px; scroll-snap-align: start; text-align: left; padding: 10px;
  border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.req-pal.sel { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink) inset; }
.req-pal-sw { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.req-pal-sw > span { flex: 1; }
.req-pal-name { font-weight: 600; font-size: 0.85rem; }
.req-pal-mood { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.req-pal-nav {
  position: absolute; top: 34%; z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-size: 1.1rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.req-pal-nav.prev { left: 0; }
.req-pal-nav.next { right: 0; }
.req-pal-detail { margin-top: 6px; }
.req-pal-detail-head { margin-bottom: 6px; }
.req-pal-usage { margin-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.req-pal-urow { display: flex; align-items: center; gap: 6px; }
.req-pal-dot { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }

/* Biblioteca de logomarcas (passo Identidade visual) */
.req-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 8px; }
.req-logo {
  position: relative; text-align: center; padding: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text);
}
.req-logo.sel { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink) inset; }
.req-logo-thumb {
  aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
  background: repeating-conic-gradient(#e9e9e9 0% 25%, #fafafa 0% 50%) 0 0 / 14px 14px; border-radius: 6px;
}
:root:not([data-theme="light"]) .req-logo-thumb { background: repeating-conic-gradient(#1c1c1c 0% 25%, #232323 0% 50%) 0 0 / 14px 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .req-logo-thumb { background: repeating-conic-gradient(#1c1c1c 0% 25%, #232323 0% 50%) 0 0 / 14px 14px; } }
.req-logo-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.req-logo-name { font-size: 0.78rem; font-weight: 600; margin-top: 6px; word-break: break-word; }
.req-logo-tag {
  position: absolute; top: 6px; right: 6px; font-size: 0.6rem; text-transform: uppercase; letter-spacing: .06em;
  background: var(--pink-soft); color: var(--accent-bright); border-radius: 4px; padding: 1px 5px;
}

/* ── Motion Graphics Picker ────────────────────────────────────── */
.req-mograph { display: flex; flex-direction: column; gap: 10px; }
.req-mograph-sel-count {
  font-size: 0.78rem; font-weight: 600; color: var(--accent-bright);
  min-height: 18px; transition: opacity .2s;
}
.req-mograph-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
}
.req-mograph-tabs::-webkit-scrollbar { display: none; }
.req-mograph-tab {
  flex-shrink: 0; padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--line);
  background: transparent; color: var(--muted-2); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.req-mograph-tab.active { background: var(--pink-soft); color: var(--accent-bright); border-color: var(--pink); }
.req-mograph-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px;
}
.req-mograph-card {
  position: relative; display: flex; flex-direction: column; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface); overflow: hidden;
  cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s;
  padding: 0;
}
.req-mograph-card:hover { border-color: var(--pink); }
.req-mograph-card.sel { border-color: var(--pink); box-shadow: 0 0 0 1.5px var(--pink) inset; }
.req-mograph-preview {
  width: 100%; aspect-ratio: 9/16; background: #111; overflow: hidden; position: relative;
}
.req-mograph-iframe {
  width: 200%; height: 200%; border: none; transform: scale(0.5); transform-origin: top left;
  pointer-events: none; display: block;
}
.req-mograph-info { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.req-mograph-label { font-size: 0.82rem; font-weight: 700; line-height: 1.2; }
.req-mograph-desc { font-size: 0.72rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.req-mograph-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.req-mograph-tag {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: .05em;
  background: var(--line); color: var(--muted-2); border-radius: 4px; padding: 1px 5px;
}
.req-mograph-check {
  position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--pink); color: #fff; font-size: 0.85rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* Assistente de IA (abre em todos os passos) */
.req-assist { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 4px; }
.btn-ai {
  align-self: flex-start;
  background: var(--pink-soft); color: var(--accent-bright);
  border: 1px solid var(--pink); border-radius: var(--radius-sm);
}
.btn-ai:disabled { opacity: 0.6; cursor: default; }
.req-assist-panel { margin: 12px 0 6px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--pink); }
.req-assist-panel textarea { min-height: 0; }
.req-assist-head { display: flex; align-items: center; justify-content: space-between; }
.req-assist-panel .req-flabel { margin-top: 4px; }
.req-assist-panel .req-uploads { gap: 6px; }
.req-assist-panel .req-upitem { justify-content: flex-start; }
.req-assist-panel .req-upitem .req-chip-x { margin-left: auto; }

.req-aicopy { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.req-review { display: flex; flex-direction: column; gap: 8px; }
.req-review-row { display: flex; justify-content: space-between; gap: 14px; font-size: 0.86rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.req-review-row > span:last-child { text-align: right; color: var(--text); }

/* ===== Cards de ticket em grid no desktop ===== */
@media (min-width: 1024px) {
  /* Listas de tickets (home) em 2 colunas */
  .task-list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .task-list-grid .card { margin-bottom: 0; }
  /* Botões de largura auto no desktop */
  .btn { width: auto; }
  .btn-full { width: 100%; }
  .btn-row .btn { width: auto; flex: 1; }
  /* Modal mais largo */
  .modal-box { max-width: 540px; }
}

/* ===== Dashboard admin ===== */
.dash-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 22px; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.dash-big { font-family: var(--font-head, inherit); font-size: 1.9rem; font-weight: 800; }
.kv { display: flex; justify-content: space-between; gap: 14px; font-size: 0.86rem; padding: 6px 0; border-bottom: 1px solid var(--line); }
.kv > span:last-child { text-align: right; }

.card-review { border-color: var(--pink); background: linear-gradient(180deg, var(--pink-soft), transparent); }

/* Legenda do post em destaque — o texto que o cliente vai copiar/publicar */
.card-caption { border-color: var(--niveo-orange); background: linear-gradient(180deg, rgba(255, 72, 0, 0.08), transparent 70%); }
.card-caption .eyebrow { color: var(--niveo-orange); }

/* Preview visual da entrega: imagens, carrosséis e vídeos em uma única revisão. */
.detail-overview { border-color: var(--line-strong); background: linear-gradient(135deg, var(--surface), rgba(255,72,0,.05)); }
.detail-overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.delivery-files-label { margin: 8px 2px 0; }
.delivery-preview { padding: 12px; overflow: hidden; }
.delivery-preview-head { padding: 2px 2px 10px; }
.delivery-preview-counter { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .78rem; }
.delivery-preview-viewer { position: relative; min-height: 220px; border-radius: 10px; overflow: hidden; background: #050505; border: 1px solid var(--line); display: grid; place-items: center; }
.delivery-preview-stage { width: 100%; height: min(62vh, 520px); display: grid; place-items: center; }
.delivery-preview-stage img, .delivery-preview-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #050505; }
.delivery-preview-nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(0,0,0,.65); color: var(--text); cursor: pointer; }
.delivery-preview-nav.prev { left: 10px; }
.delivery-preview-nav.next { right: 10px; }
.delivery-preview-nav:hover { background: var(--niveo-orange); }
.delivery-preview-file { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); text-align: center; padding: 32px; }
.delivery-preview-caption { display: flex; flex-direction: column; gap: 2px; padding: 10px 2px 6px; min-width: 0; }
.delivery-preview-caption strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-preview-dots { display: flex; justify-content: center; gap: 6px; padding: 6px 0 2px; }
.delivery-preview-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-3); cursor: pointer; }
.delivery-preview-dot.active { width: 20px; border-radius: 999px; background: var(--niveo-orange); }

/* Bloco de texto longo (briefing bruto) que abre recolhido, com degradê no fim
   sinalizando que há mais texto, e expande ao clicar em "Ver briefing completo". */
.collapsible-body { position: relative; overflow: hidden; transition: max-height 0.28s ease; }
.collapsible-body:not(.is-open)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background: linear-gradient(180deg, transparent, var(--surface));
  pointer-events: none;
}
.collapsible-toggle {
  display: block; width: 100%; margin-top: 10px; padding: 8px 0;
  background: none; border: none; border-top: 1px dashed var(--line-strong);
  color: var(--accent-bright); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; text-align: center;
}
.collapsible-toggle:hover { color: var(--text); }

/* Banner de aprovação pendente — destaque no topo da home */
.review-banner {
  border: 1px solid var(--niveo-orange);
  background: linear-gradient(180deg, rgba(255, 72, 0, 0.10), transparent 60%);
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0 6px;
}
.review-banner .card { margin-bottom: 10px; }
.review-banner .stack > .card:last-child { margin-bottom: 0; }

@media (max-width: 520px) {
  .detail-overview-grid { grid-template-columns: 1fr; gap: 10px; }
  .delivery-preview-stage { height: min(60vh, 430px); }
  .delivery-preview-nav { width: 32px; height: 32px; }
}

/* ===== Modal genérico ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 22px 20px; width: 100%; max-width: 420px; max-height: 90dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0;
}
.modal-box .field { margin-bottom: 12px; }
.modal-box .field:last-of-type { margin-bottom: 0; }

/* Cor de erro inline */
.danger { color: var(--danger); }

/* ===== Wizard de campanha ===== */
.cw-modal {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cw-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

/* Barra de progresso por segmentos */
.cw-progress {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}
.cw-progress i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  transition: background .25s;
}
.cw-progress i.done { background: var(--pink); }
.cw-progress i.active { background: var(--accent-bright); }

.cw-step-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .03em;
}

/* Área de conteúdo — rolável */
.cw-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 18px 8px;
}

.cw-step { display: flex; flex-direction: column; gap: 0; }

.cw-step-icon {
  width: 48px; height: 48px;
  background: var(--pink-soft);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-bright);
  margin-bottom: 14px;
}

.cw-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.3;
}

.cw-step-hint {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.cw-step .field { margin-bottom: 14px; }
.cw-step .field:last-child { margin-bottom: 0; }

/* Card de revisão */
.cw-review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cw-review-row {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.cw-review-row:last-child { border-bottom: none; }
.cw-review-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 90px;
  padding-top: 2px;
}
.cw-review-value {
  font-size: .85rem;
  color: var(--text);
  flex: 1;
  word-break: break-word;
}

/* Rodapé */
.cw-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cw-err { min-height: 0; }

/* ===========================================================
   DASHBOARD — motion, KPIs, tabela por cliente
   =========================================================== */

/* KPI card hover lift */
.dsh-stat {
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: default;
}
.dsh-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}

/* Pulse dot animado — indica atividade em tempo real */
.dsh-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: dsh-pulse-anim 1.8s ease-in-out infinite;
}
@keyframes dsh-pulse-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.65); }
}

/* Grid de KPIs — 2 colunas no desktop */
@media (min-width: 1024px) {
  .dsh-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }
}

/* Tabela por cliente — cabeçalho sticky */
.dsh-client-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
}

/* Fade-in suave na entrada do dashboard */
@keyframes dsh-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.dsh-stat, .card {
  animation: dsh-fadein .35s ease both;
}

/* ===========================================================
   SCROLLBARS — estilo fino NIVEO em todos os containers
   =========================================================== */

/* Firefox — thin scrollbar com cores NIVEO */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 72, 0, 0.35) transparent;
}

/* Webkit (Chrome, Edge, Safari) — scrollbar global */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 72, 0, 0.30);
  border-radius: 99px;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 72, 0, 0.65);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* Sidebar — scrollbar ainda mais fina e discreta */
.sidebar::-webkit-scrollbar {
  width: 3px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 72, 0, 0.20);
  border-radius: 99px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 72, 0, 0.50);
}

/* Modal — scrollbar levemente mais visível para indicar conteúdo longo */
.modal-box::-webkit-scrollbar {
  width: 4px;
}
.modal-box::-webkit-scrollbar-thumb {
  background: rgba(255, 72, 0, 0.40);
  border-radius: 99px;
}
.modal-box::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 72, 0, 0.70);
}

/* Wizard (cw-body) */
.cw-body::-webkit-scrollbar {
  width: 3px;
}
.cw-body::-webkit-scrollbar-thumb {
  background: rgba(255, 72, 0, 0.25);
  border-radius: 99px;
}

/* Carrossel horizontal (paleta de cores) */
.req-pal-carousel::-webkit-scrollbar {
  height: 3px;
}
.req-pal-carousel::-webkit-scrollbar-track {
  background: var(--surface-3);
  border-radius: 99px;
}
.req-pal-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 72, 0, 0.45);
  border-radius: 99px;
}

/* Scene panel e teleprompter */
.scene-panel::-webkit-scrollbar,
.next-preview::-webkit-scrollbar {
  width: 3px;
}
.scene-panel::-webkit-scrollbar-thumb,
.next-preview::-webkit-scrollbar-thumb {
  background: rgba(255, 72, 0, 0.25);
  border-radius: 99px;
}
