/* ============================================================
   Vero Norte — Design System
   Paleta oficial do Manual de Marca (2026): Azul Abissal (base),
   Azul Profundo/Atlântico/Marinho (superfícies), Azul Horizonte
   (acento/ação), Terracota Norte (alerta), Cinza Neblina (texto).
   Space Grotesk (display) / Inter (corpo) / JetBrains Mono (rótulos).
   ============================================================ */

:root {
  /* base — Azul Abissal #050F1E é o fundo oficial do manual; as superfícies sobem
     por Azul Profundo (#182752) até Atlântico (#26364D), mantendo tudo dentro da paleta. */
  --bg:        #050F1E;   /* Azul Abissal */
  --bg-1:      #0A1729;
  --surface:   #122140;   /* entre Abissal e Profundo */
  --surface-2: #182752;   /* Azul Profundo */
  --surface-3: #26364D;   /* Azul Atlântico */

  --line:        rgba(222, 229, 237, 0.10);   /* Cinza Neblina a 10% */
  --line-strong: rgba(222, 229, 237, 0.18);

  --text:       #FFFFFF;  /* Branco Polar */
  --text-muted: #DEE5ED;  /* Cinza Neblina */
  /* Cinza Costeiro do manual — passa de 4,5:1 sobre o Abissal em rótulos pequenos */
  --text-faint: #9CB2BF;  /* Cinza Costeiro */

  /* controles nativos (calendário do input de data, select, scrollbar) no tema escuro —
     sem isso o ícone do calendário sai preto sobre navy, quase invisível */
  color-scheme: dark;
  scrollbar-color: var(--surface-3) transparent;

  /* acento neutro do dia a dia (KPIs, chips, tabs): Branco Polar / Cinza Neblina */
  --accent:        #DEE5ED;   /* Cinza Neblina */
  --accent-bright: #FFFFFF;   /* Branco Polar */
  --accent-deep:   #9CB2BF;   /* Cinza Costeiro */
  --accent-dim:    rgba(222, 229, 237, 0.10);
  --accent-line:   rgba(222, 229, 237, 0.30);

  /* Azul Horizonte #5696FB é a cor de ação da marca; Azul Corrente #1B43BF sustenta
     estados sólidos (hover/gráficos). Azul Céu entra como realce claro. */
  --brand-blue:        #5696FB;  /* Azul Horizonte */
  --brand-blue-bright: #B0E9FD;  /* Azul Céu */
  --brand-blue-dim:    rgba(86, 150, 251, 0.16);
  --brand-blue-line:   rgba(86, 150, 251, 0.34);
  --highlight:         #B0E9FD;  /* Azul Céu */

  /* positivo/negativo: o manual não define semânticas, então o negativo usa a
     Terracota Norte oficial e o positivo um verde-mar calibrado pra mesma luz. */
  --positive:      #2E9E7B;
  --positive-dim:  rgba(46, 158, 123, 0.15);
  --negative:      #CC553D;   /* Terracota Norte */
  --negative-dim:  rgba(204, 85, 61, 0.15);
  --info:          #1B43BF;   /* Azul Corrente */
  --info-dim:      rgba(27, 67, 191, 0.18);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --font-script:  "Sacramento", "Snell Roundhand", cursive;

  /* cantos quase retos (referência real: btgpactual.com usa 4-8px, nunca pílula) —
     luxo é sóbrio, não arredondado/"fofo"; só círculos verdadeiros (avatares, dots)
     ficam a 50%. */
  --radius:    10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar-w: 244px;
  /* sombra: sempre com tom da própria base (--bg), nunca preto puro — mais quieta */
  --shadow-tint: 5, 15, 30;   /* Azul Abissal */

  /* gráfico: eram literais dentro do core.js, calibrados para fundo escuro —
     sobre branco sumiam e o gráfico renderizava "com sucesso" e invisível */
  --chart-grid:   rgba(222, 229, 237, 0.07);
  --chart-grid0:  rgba(222, 229, 237, 0.2);
  --chart-now:    rgba(222, 229, 237, 0.22);
  --chart-nowtx:  #DEE5ED;
  --chart-guide:  rgba(222, 229, 237, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation; /* sem zoom por toque-duplo / sem atraso de 300ms */
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand-blue); color: #ffffff; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.muted-2 { color: var(--text-faint); }
.small { font-size: 12.5px; }
.big { font-size: 1.35em; }
.pos { color: var(--positive); }
.neg { color: var(--negative); }
.accent { color: var(--accent); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), opacity 0.15s var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--info); color: #ffffff; box-shadow: 0 6px 16px -10px rgba(27, 67, 191, 0.5); }
.btn-primary:hover:not(:disabled) { background: var(--brand-blue); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(27, 67, 191, 0.6); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-dim); }
.btn-danger { background: var(--negative-dim); color: var(--negative); border-color: rgba(251, 113, 133, 0.3); }
.btn-danger:hover { background: rgba(251, 113, 133, 0.2); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-muted); cursor: pointer; transition: all 0.15s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--accent-line); background: var(--accent-dim); }
.icon-btn.danger:hover { color: var(--negative); border-color: rgba(251,113,133,0.35); background: var(--negative-dim); }

/* ---------- inputs / campos ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.field-hint { font-size: 11.5px; color: var(--text-faint); }
.input {
  font-family: var(--font-body); font-size: 14px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; width: 100%; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.input::placeholder { color: var(--text-faint); }
.input:disabled { color: var(--text-faint); background: var(--bg-1); cursor: not-allowed; }
.money-field:has(.input:disabled) .money-prefix { color: var(--text-faint); }
textarea.input { resize: vertical; min-height: 62px; line-height: 1.5; }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a8b3' stroke-width='2.4'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* pequeno rótulo de seção dentro de um modal com muitos campos (ex.: cliente, tarefa) —
   separa blocos logicamente diferentes (Contrato, Contato…) sem pesar visualmente */
.form-section-title {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-faint);
  padding-top: 14px; margin-top: 2px; border-top: 1px solid var(--line);
}
.form-section-title:first-child { padding-top: 0; margin-top: 0; border-top: 0; }

/* segmented control */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg button { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--text-muted); background: transparent; border: 0; padding: 7px 15px; border-radius: var(--radius-xs); cursor: pointer; transition: all 0.15s var(--ease); }
.seg button.active { background: var(--accent-dim); color: var(--accent); }
.seg-sm { padding: 2px; }
.seg-sm button { padding: 6px 10px; font-size: 12px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(120% 80% at 50% -10%, rgba(214, 224, 248, 0.10), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; }
.auth-card.center { text-align: center; }
.auth-card h1 { font-size: 24px; margin: 20px 0 8px; }
.auth-card .lead { color: var(--text-muted); font-size: 14.5px; margin-bottom: 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card .btn { margin-top: 4px; }
.auth-error { color: var(--negative); font-size: 13px; min-height: 16px; text-align: center; }

.brand-mark { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.brand-mark.big { font-size: 22px; }
.brand-mark .dot { color: var(--accent); }

/* ---------- marca (glyph placeholder + wordmark) ---------- */
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; }
.brand-lockup .bmk { width: 31px; height: auto; flex: none; color: var(--accent-bright); }
.brand-word { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 15px; color: var(--text); white-space: nowrap; }
.brand-lockup.big { gap: 14px; }
.brand-lockup.big .bmk { width: 46px; height: auto; }
.brand-lockup.big .brand-word { font-size: 21px; }
.brand-lockup.boot { gap: 18px; }
.brand-lockup.boot .bmk { width: 92px; height: auto; }
.brand-lockup.boot .brand-word { font-size: 30px; letter-spacing: 0.1em; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--bg-1); border-right: 1px solid var(--line); padding: 22px 16px;
  overflow: hidden;
}
.sidebar .brand { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 4px 8px 20px; }
.sidebar .brand-mark { font-size: 18px; }
.brand-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
/* só o menu rola; marca e usuário ficam fixos */
.sidebar .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 3px; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; overscroll-behavior: contain; }
/* itens não podem encolher: senão o menu comprime em vez de rolar (e some conteúdo) */
.sidebar .nav > * { flex-shrink: 0; }
.sidebar .nav::-webkit-scrollbar { width: 7px; }
.sidebar .nav::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.sidebar .nav::-webkit-scrollbar-track { background: transparent; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font-family: var(--font-body); font-weight: 500; font-size: 13.5px; color: var(--text-muted);
  background: transparent; border: 0; border-radius: var(--radius-sm); padding: 7px 10px; cursor: grab; text-align: left;
  transition: all 0.15s var(--ease);
}
.nav-item .ic { width: 16px; height: 16px; flex: none; }

/* tile quadrado de entidade (Spaces do ClickUp): inicial em quadradinho colorido */
.ent-sq { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; color: #fff; font-family: var(--font-display); font-size: 10px; font-weight: 700; flex: none; }
.ent-sq-sm { width: 15px; height: 15px; border-radius: 4px; font-size: 8.5px; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--brand-blue-dim); color: var(--brand-blue-bright); }
.nav-item.dragging { opacity: 0.4; cursor: grabbing; }

/* hierarquia na sidebar (estilo ClickUp): caret expande o quadro em áreas/subáreas */
.nav-exp { display: inline-flex; margin-left: auto; flex: none; color: var(--text-faint); border-radius: var(--radius-xs); padding: 2px; transform: rotate(0deg); transition: transform 0.15s var(--ease); }
.nav-exp svg { width: 12px; height: 12px; }
.nav-exp:hover { color: var(--text); background: var(--surface-2); }
.nav-exp.open { transform: rotate(90deg); }
.nav-children { display: flex; flex-direction: column; margin: 2px 0 6px; }
.nav-child { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; color: var(--text-muted); font: inherit; font-size: 12.5px; padding: 5px 10px 5px 38px; border-radius: var(--radius-xs); position: relative; }
.nav-child::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--text-faint); flex: none; }
.nav-child:hover { background: var(--surface); color: var(--text); }
.nav-child-sub { padding-left: 54px; font-size: 12px; }
.nav-child-sub::before { width: 4px; height: 4px; }
.nav-sec {
  display: flex; align-items: center; gap: 6px; width: 100%;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint); background: transparent; border: 0; border-top: 1px solid var(--line); cursor: grab;
  padding: 15px 8px 7px; margin-top: 8px; transition: color 0.15s var(--ease);
}
.nav-sec:hover { color: var(--text-muted); }
.nav-sec-caret { display: inline-flex; flex: none; transform: rotate(0deg); transition: transform 0.15s var(--ease); }
.nav-sec-caret svg { width: 11px; height: 11px; }
.nav-sec-caret.open { transform: rotate(90deg); }
.nav-sec-items { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.nav-sec-items.collapsed { display: none; }
.nav-sec-wrap.dragging-sec { opacity: 0.4; }
.nav-sec-wrap.dragging-sec .nav-sec { cursor: grabbing; }
.sidebar-spacer { flex: none; height: 12px; }
.sidebar-user { flex: none; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.su-name { font-size: 12.5px; color: var(--text); font-weight: 600; word-break: break-word; padding: 0 8px; }
.su-role { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); padding: 2px 8px 10px; }
.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.nav-scrim { display: none; }
.main { min-width: 0; padding: 30px 34px 60px; }

/* ---------- cabeçalho de página ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: 27px; }
.page-sub { color: var(--text-muted); font-size: 14.5px; margin-top: 5px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-muted); font-weight: 600; cursor: pointer; margin-bottom: 10px; }
.back-link:hover { color: var(--accent); }

/* ---------- cards / grid ---------- */
/* position:relative é necessário pro tooltip do gráfico (.chart-tip, absoluto) se ancorar
   no card certo — sem isso ele flutua relativo à página inteira e "sobrepõe" outros cards
   em posição errada ao passar o mouse num gráfico. */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 20px 22px; }
.card-title { font-size: 15px; font-family: var(--font-display); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
/* log de auditoria */
.audit-list { display: flex; flex-direction: column; }
.audit-row { display: flex; align-items: baseline; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.audit-row .avatar { align-self: center; }
.audit-row:last-child { border-bottom: 0; }
.audit-who { font-weight: 600; color: var(--text); }
.audit-what { color: var(--text-muted); flex: 1 1 auto; min-width: 120px; }
.audit-when { color: var(--text-faint); font-size: 11px; white-space: nowrap; }
.audit-row .icon-btn { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.audit-editbox { flex: 1 1 100%; }
.audit-editactions { display: flex; gap: 8px; margin-top: 6px; }
.chat-scroll { max-height: 65vh; overflow-y: auto; padding-right: 4px; }
.nav-item .chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--negative); margin-left: auto; flex: none; }
/* portal do cliente (link público) */
.portal-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.portal-link .input { flex: 1 1 220px; min-width: 0; font-family: var(--font-mono); font-size: 12px; }
.kpi { padding: 18px 20px; }
.k-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.k-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.k-value { font-family: var(--font-display); font-weight: 600; font-size: 27px; letter-spacing: -0.02em; margin-top: 9px; }
.k-sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

/* ---------- pills / tags ---------- */
.pill, .tag {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500;
  padding: 3px 9px; border-radius: var(--radius-xs); background: var(--surface-3); color: var(--text-muted); white-space: nowrap;
}
.pill-accent, .tag-accent { background: var(--accent-dim); color: var(--accent); }
.pill-pos, .tag-income { background: var(--positive-dim); color: var(--positive); }
.pill-neg, .tag-expense { background: var(--negative-dim); color: var(--negative); }
.pill-info { background: var(--info-dim); color: var(--info); }
.pill-mut { background: var(--surface-3); color: var(--text-faint); }
/* status semânticos */
.st-ativo, .st-aprovado, .st-feito { background: var(--positive-dim); color: var(--positive); }
.st-pausado, .st-analise, .st-enviado { background: var(--accent-dim); color: var(--accent); }
.st-prospecto, .st-ideia, .st-rascunho { background: var(--info-dim); color: var(--info); }
.st-encerrado { background: var(--negative-dim); color: var(--negative); }
.st-fazendo, .st-onboarding { background: rgba(214, 224, 248, 0.16); color: var(--accent-bright); }
.pri-alta { color: var(--negative); }
.pri-media { color: var(--accent); }
.pri-baixa { color: var(--text-faint); }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s var(--ease); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); }
.table .t-actions { text-align: right; white-space: nowrap; }
.table .t-actions .icon-btn { margin-left: 6px; }

/* ---------- lista ---------- */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.row-amount { font-family: var(--font-mono); font-weight: 600; text-align: right; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; flex: none; }

/* progresso */
.progress-mini { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 7px; }
.progress-mini > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.progress-mini.over > span { background: var(--negative); }
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }
.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row .bar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.bar-row .cat { color: var(--text); }
.bar-row .val { color: var(--text-muted); }

/* key-value (ficha) */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px 22px; }
.kv-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv-k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
/* min-width:0 na linha + overflow-wrap aqui: sem isso, um valor longo sem espaço (URL,
   e-mail) empurra a largura do item do grid e invade a coluna vizinha em vez de quebrar
   linha — achado testando a Prospecção da Vero Norte com uma URL de site longa */
.kv-v { font-size: 15px; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

/* ---------- filtros / chips ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.chip { font-size: 13px; font-weight: 600; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 6px 13px; cursor: pointer; transition: all 0.15s var(--ease); }
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-line); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .input { max-width: 260px; }
.spacer { flex: 1; }

/* ---------- period picker ---------- */
.period { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; }
.period button { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.period button:hover { color: var(--accent); background: var(--accent-dim); }
.period .plabel { font-family: var(--font-display); font-weight: 600; font-size: 14px; min-width: 108px; text-align: center; text-transform: capitalize; }

/* ---------- empty ---------- */
.empty { text-align: center; color: var(--text-muted); padding: 40px 20px; font-size: 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-1); }
.empty.small { padding: 22px; font-size: 13px; }
.empty-action { margin-top: 16px; }

/* ---------- gráfico ---------- */
.chart-wrap { position: relative; width: 100%; }
.chart-tip {
  position: absolute; transform: translateX(-50%); pointer-events: none; opacity: 0;
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 9px 11px; font-size: 12.5px; min-width: 132px; z-index: 5; transition: opacity 0.12s var(--ease);
  box-shadow: 0 10px 24px -12px rgba(var(--shadow-tint), 0.4);
}
.chart-tip .tt-m { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 6px; }
.chart-tip .tt-row { display: flex; align-items: center; gap: 7px; margin-top: 3px; color: var(--text-muted); }
.chart-tip .tt-row b { margin-left: auto; color: var(--text); font-family: var(--font-mono); }
.chart-tip .sw { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.hit { cursor: crosshair; }
.donut-seg { cursor: pointer; transition: filter 0.12s var(--ease); }
.donut-seg:hover { filter: brightness(1.12); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--text-muted); }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* números do caixa acumulado, mês a mês, pequenos e ao lado do gráfico (não competem com ele) */
.cash-nums { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cash-num-item { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 46px; padding: 3px 5px; border-radius: 6px; }
.cash-num-item.proj { opacity: 0.6; }
.cash-num-m { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-faint); }
.cash-num-v { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; }
.cash-num-v.pos { color: var(--positive); }
.cash-num-v.neg { color: var(--negative); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.kanban-col { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 2px 4px; }
.kanban-head .kh-title { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.kanban-head .kh-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); background: var(--surface-2); border-radius: var(--radius-xs); padding: 1px 8px; }
.kanban-cards { display: flex; flex-direction: column; gap: 10px; min-height: 24px; }
.kanban-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; cursor: pointer; transition: border-color 0.15s var(--ease), transform 0.15s var(--ease); }
.kanban-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.kanban-card .kc-title { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.kanban-card .kc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-faint); }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(5,5,7,0.72); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal { position: relative; width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 26px 26px 22px; margin: auto; box-shadow: 0 8px 24px -12px rgba(var(--shadow-tint), 0.35), 0 24px 60px -24px rgba(var(--shadow-tint), 0.55); }
.modal-x { position: absolute; top: 14px; right: 16px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--text-faint); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-x:hover { color: var(--text); background: var(--surface-2); }
.modal-title { font-size: 20px; padding-right: 30px; }
.modal-sub { color: var(--text-muted); font-size: 13.5px; margin-top: 6px; }
.modal-body { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- busca global (⌘K) ---------- */
.cmdk-trigger { flex: none; display: flex; align-items: center; gap: 8px; width: 100%; margin: 2px 0 12px; padding: 8px 11px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text-faint); cursor: pointer; font-family: var(--font-body); font-size: 13px; transition: border-color 0.15s var(--ease), color 0.15s var(--ease); }
.cmdk-trigger:hover { border-color: var(--accent-line); color: var(--text-muted); }
.cmdk-trigger svg { width: 15px; height: 15px; flex: none; }
.cmdk-trigger > span:first-of-type { flex: 1; text-align: left; }
.cmdk-kbd { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 5px; color: var(--text-faint); }
.cmdk-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(5, 7, 12, 0.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.cmdk { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 8px 24px -12px rgba(var(--shadow-tint), 0.4), 0 24px 64px -24px rgba(var(--shadow-tint), 0.6); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.cmdk-inputwrap { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text-faint); }
.cmdk-inputwrap svg { width: 18px; height: 18px; flex: none; }
.cmdk-input { flex: 1; background: transparent; border: 0; outline: none; color: var(--text); font-family: var(--font-body); font-size: 16px; min-width: 0; }
.cmdk-input::placeholder { color: var(--text-faint); }
.cmdk-results { overflow-y: auto; padding: 6px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent; border-radius: var(--radius-sm); cursor: pointer; text-align: left; color: var(--text); font-family: var(--font-body); font-size: 14px; }
.cmdk-item.sel { background: var(--accent-dim); }
.cmdk-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-type { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); flex: none; }
.cmdk-empty { padding: 24px; text-align: center; color: var(--text-faint); font-size: 13px; }
@media (max-width: 900px) { .cmdk-kbd { display: none; } .cmdk-backdrop { padding-top: 8vh; } }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 18px; font-size: 13.5px; color: var(--text); box-shadow: 0 12px 28px -14px rgba(var(--shadow-tint), 0.5); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.toast .toast-act { margin-left: 4px; border: 0; background: transparent; color: var(--accent-bright); font-weight: 600; font-size: 13px; cursor: pointer; padding: 2px 7px; border-radius: 6px; font-family: inherit; }
.toast .toast-act:hover { background: var(--accent-dim); }

/* ---------- entradas suaves (modal, toast, busca, troca de aba) ----------
   nada "pipoca" na tela: tudo entra com um fade curto e uma subida sutil */
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px) scale(0.99); } }
@keyframes view-in { from { opacity: 0; transform: translateY(3px); } }
.overlay { animation: fade-in 0.16s var(--ease); }
.modal { animation: rise-in 0.18s var(--ease); }
.cmdk-backdrop { animation: fade-in 0.16s var(--ease); }
.cmdk { animation: rise-in 0.18s var(--ease); }
.toast { animation: rise-in 0.2s var(--ease); }
.view-fade { animation: view-in 0.16s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .overlay, .modal, .cmdk-backdrop, .cmdk, .toast, .view-fade { animation: none; }
}

/* ---------- skeleton de carregamento ---------- */
.skel { animation: fade-in 0.2s var(--ease); }
.skel-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.skel-block {
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s linear infinite;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
@keyframes skel-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel-block { animation: none; } }

/* ---------- teclado: foco visível ao tabular (não aparece no clique de mouse) ---------- */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, .chip:focus-visible {
  outline: 2px solid var(--accent-line); outline-offset: 2px;
}

/* ---------- scrollbars escuras em todo lugar (não só no menu) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* ---------- save indicator ---------- */
.save-state { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--text-faint); }
.save-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.save-state.saved .dot { background: var(--positive); }
.save-state.saving .dot { background: var(--accent); }
.save-state.error .dot { background: var(--negative); }
.save-state.error { color: var(--negative); }

/* ---------- DRE / financeiro ---------- */
table.dre { width: 100%; border-collapse: collapse; font-size: 13px; }
table.dre th { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); font-weight: 500; text-align: right; padding: 9px 12px; border-bottom: 1px solid var(--line); }
table.dre th:first-child { text-align: left; }
table.dre td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; font-family: var(--font-mono); }
table.dre td:first-child { text-align: left; font-family: var(--font-body); }
table.dre tr.dre-sel { background: var(--accent-dim); }
table.dre tr:last-child td { border-bottom: 0; }
.dre-tag { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-faint); margin-left: 6px; text-transform: uppercase; }
table.table tr.venc-atrasado td { background: var(--negative-dim); }

/* ---------- responsivo (mobile: sidebar vira gaveta) ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 270px; height: auto; z-index: 90;
    transform: translateX(-102%); transition: transform 0.28s var(--ease);
    box-shadow: 0 0 40px rgba(var(--shadow-tint), 0.45); overflow-y: auto;
    padding-top: calc(22px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .shell.nav-open .sidebar { transform: none; }
  /* no mobile a gaveta inteira rola (não o menu isolado) */
  .sidebar { overflow-y: auto; }
  .sidebar .nav { flex: 0 1 auto; overflow: visible; min-height: auto; margin: 0; padding: 0; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(0, 0, 0, 0.55); opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease); }
  .shell.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40;
    height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 14px 0;
    background: var(--bg-1); border-bottom: 1px solid var(--line);
  }
  .topbar .brand-mark { font-size: 16px; }
  .hamb { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
  .tb-spacer { flex: 1; }
  .main { padding: 18px 15px 60px; }
  .page-head { gap: 12px; }
  .page-title { font-size: 22px; }
  .page-actions { gap: 8px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .card-pad { padding: 16px; }
  .modal { padding: 20px 18px 18px; }
  .kv { grid-template-columns: 1fr 1fr; }
  .nflx-card, .nflx-thumb { flex-basis: 200px; width: 200px; }
  .nflx-thumb { height: 113px; }
  /* no celular: título acima das ações, e barras de ferramenta empilhadas full-width */
  .page-head { flex-direction: column; align-items: flex-start; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .toolbar > div { min-width: 0 !important; width: 100%; }
  .toolbar .input, .toolbar select.input { max-width: none; }
  .toolbar .btn { width: 100%; }
  /* alvos de toque maiores no menu */
  .nav-item { padding: 12px 12px; font-size: 15px; }
  .tk-toolbar2 { flex-direction: column; align-items: stretch; }
  .tk-toolbar2 .input { max-width: none; }
  .ch-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; }
  .k-value { font-size: 23px; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
  /* KPIs sempre 2 a 2 no celular (escaneável e previsível) e diálogos mais folgados */
  .grid-kpi { grid-template-columns: 1fr 1fr; gap: 10px; }
  .overlay { padding: 12px; }
  .legend { gap: 8px 12px; font-size: 12px; }
  .page-title { font-size: 20px; }
  .main { padding: 16px 13px 56px; }
  .cal-day { min-height: 64px; padding: 4px; }
  .cal-dow { font-size: 9px; padding: 6px 2px; }
  .cal-task { font-size: 10px; }
}

/* ---------- sequência de inicialização: roda sempre que o app abre/dá refresh,
   mesmo com sessão já válida (não é só um "boas-vindas" do login) ---------- */
.boot {
  position: fixed; inset: 0; z-index: 200;
  background: radial-gradient(125% 125% at 50% 42%, #0d1526 0%, #070c18 55%, #03060f 100%);
  display: grid; place-items: center; overflow: hidden;
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.boot.boot-in { opacity: 1; }
.boot.boot-out { opacity: 0; transform: scale(1.03); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
/* modo rápido: aberturas seguintes no mesmo dia (ou pulo) — fades curtos, sem "toque para pular" */
.boot.boot-quick { transition: opacity 0.25s var(--ease); }
.boot.boot-quick .boot-skip { display: none; }
.boot.boot-fast.boot-out { transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.boot-grid {
  position: absolute; inset: 0; opacity: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(80% 60% at 50% 45%, #000 20%, transparent 75%);
  transition: opacity 1.4s var(--ease);
}
.boot.boot-in .boot-grid { opacity: 0.5; }
.boot-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.boot-stage { position: relative; text-align: center; padding: 20px; z-index: 2; }

/* marca montada de 6 peças reais do glifo, que voam em curva até encaixar */
.boot-mark-wrap {
  /* logotipo COMPLETO da marca (721x96 ≈ 7,5:1), como na página 1 do Manual */
  width: clamp(260px, 54vw, 560px); aspect-ratio: 721 / 96; margin: 0 auto 34px; position: relative;
  filter: drop-shadow(0 14px 40px rgba(86, 150, 251, 0));
  transition: filter 0.8s var(--ease);
}
.boot-mark-wrap.settled { filter: drop-shadow(0 14px 40px rgba(86, 150, 251, 0.4)); }
.boot-mark-wrap svg { width: 100%; height: 100%; overflow: visible; }
.boot-piece {
  fill: var(--brand-blue-bright); opacity: 0;
  transform-box: fill-box; transform-origin: center;
  will-change: transform, opacity;
}
.boot-piece.landed { fill: var(--accent-bright); }
/* o logotipo tem duas cores no Manual: texto branco e o 'nx' em Azul Horizonte */
.boot-piece.p-ink, .boot-piece.p-ink.landed { fill: var(--accent-bright); }
.boot-piece.p-accent, .boot-piece.p-accent.landed { fill: var(--brand-blue); }
.boot-trail {
  fill: none; stroke: var(--brand-blue); stroke-width: 2; stroke-linecap: round;
  opacity: 0; pointer-events: none;
}

/* lockup final: Vero Norte · Direção (mesmo tamanho/peso nos dois lados) */
/* (o lockup de texto saiu: o logotipo completo já traz o nome da marca) */
.boot-lockup {
  opacity: 0; transform: translateY(10px) scale(0.97); filter: blur(5px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 0.9s var(--ease);
  display: flex; align-items: baseline; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 0 20px;
}
.boot.lockup-in .boot-lockup { opacity: 1; transform: none; filter: blur(0); }
.boot-lockup .brand, .boot-lockup .co {
  font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  font-size: clamp(14px, 3.2vw, 22px); color: var(--text); white-space: nowrap;
}
.boot-lockup .rule { width: 1px; height: 16px; background: var(--line); align-self: center; }
.boot-tagline {
  margin-top: 9px; text-align: center;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0; transition: opacity 0.9s var(--ease) 0.2s;
}
.boot.lockup-in .boot-tagline { opacity: 1; }

.boot-skip {
  position: absolute; left: 0; right: 0; bottom: 26px; text-align: center;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22); opacity: 0; transition: opacity 0.6s var(--ease) 1.5s;
}
.boot.boot-in .boot-skip { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .boot-piece { transition: none !important; }
  .boot-canvas { display: none; }
}

/* ---------- kanban engine (arrastar e soltar) ---------- */
.kb { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-bottom: 10px; }
.kb-col { flex: 0 0 290px; max-width: 290px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.kb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 2px 2px 2px 4px; }
.kb-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kb-title { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; flex: 1; }
.kb-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); background: var(--surface-2); border-radius: var(--radius-xs); padding: 1px 8px; }
.kb-add { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 0; background: transparent; color: var(--text-faint); cursor: pointer; }
.kb-add:hover { color: var(--accent); background: var(--accent-dim); }
.kb-cards { display: flex; flex-direction: column; gap: 9px; min-height: 34px; border-radius: 10px; transition: background 0.15s var(--ease); }
.kb-cards.kb-over { background: var(--accent-dim); outline: 1px dashed var(--accent-line); outline-offset: 2px; }
.kb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; cursor: grab; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.kb-card:hover { border-color: var(--accent-line); box-shadow: 0 4px 14px -10px rgba(var(--shadow-tint), 0.5); }
.kb-card.dragging { opacity: 0.45; cursor: grabbing; }
.kb-drop-line { height: 3px; border-radius: 999px; background: var(--brand-blue); box-shadow: 0 0 8px rgba(86, 150, 251, 0.7); margin: -3px 2px; pointer-events: none; }
.kb-card.static { cursor: pointer; }
.kb-col.static-col { flex: 1 1 0; max-width: none; min-width: 150px; }
.kb-card .kc-title { font-weight: 600; font-size: 13.5px; margin-bottom: 7px; line-height: 1.35; }
.kb-card .kc-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11px; color: var(--text-faint); }
.kb-card .kc-val { font-family: var(--font-mono); color: var(--accent); font-weight: 600; }
.kb-card .kc-cover { width: 100%; height: 116px; border-radius: 8px; object-fit: cover; margin-bottom: 9px; border: 1px solid var(--line); }

/* lista arrastável de uma coluna só (ex.: ordem de categorias em Configurações) */
.cat-reorder { display: flex; flex-direction: column; gap: 7px; max-height: 280px; overflow-y: auto; padding-right: 2px; }
.cat-reorder-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; cursor: grab; font-size: 13px; transition: border-color 0.15s var(--ease); }
.cat-reorder-row:hover { border-color: var(--accent-line); }
.cat-reorder-row.dragging { opacity: 0.45; cursor: grabbing; }
.cat-drag-handle { color: var(--text-faint); flex: none; display: flex; }

/* ---------- anexos ---------- */
.att-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.att { width: 94px; position: relative; }
.att-open { display: grid; place-items: center; width: 94px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.att-open img { width: 100%; height: 100%; object-fit: cover; }
.att-ico { color: var(--text-muted); }
.att-ico svg { width: 26px; height: 26px; }
.att-name { display: block; font-size: 10.5px; color: var(--text-muted); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-x { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-3); color: var(--text); font-size: 15px; line-height: 1; cursor: pointer; }
.att-x:hover { color: var(--negative); border-color: var(--negative); }
.att-add { width: 94px; height: 72px; border-radius: 10px; border: 1px dashed var(--line-strong); display: grid; place-items: center; gap: 2px; color: var(--text-faint); cursor: pointer; }
.att-add:hover { border-color: var(--accent-line); color: var(--accent); }
.att-add span { font-size: 10.5px; }
.att-status { font-size: 12px; color: var(--accent); margin-top: 8px; }

/* @menção em comentários (Tarefas/Criação) */
.mention-pop { display: none; position: absolute; z-index: 40; left: 0; top: 100%; margin-top: 4px; min-width: 220px; max-height: 190px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,0.28); }
.mention-opt { padding: 8px 12px; font-size: 13.5px; cursor: pointer; }
.mention-opt:hover { background: var(--surface-2); }

/* sino de notificações in-app */
.nav-item[data-notif] { cursor: pointer; }
.notif-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--negative); color: #1a0c12; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.tb-bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
.tb-bell .ic { width: 18px; height: 18px; }
.tb-bell .notif-badge { position: absolute; top: -5px; right: -5px; margin: 0; }
.notif-list { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text); transition: background 0.15s var(--ease); }
.notif-item:hover { background: var(--surface-2); }
.notif-ic { flex: none; color: var(--text-faint); margin-top: 1px; }
.notif-ic .ic { width: 17px; height: 17px; }
.notif-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-label { font-size: 13.5px; font-weight: 600; }
.notif-detail { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }

/* ---------- input de moeda ---------- */
.money-field { position: relative; display: flex; align-items: center; }
.money-prefix { position: absolute; left: 12px; font-size: 13px; color: var(--text-faint); pointer-events: none; }
.money-input { padding-left: 34px; font-family: var(--font-mono); }

/* ---------- treinamento (visual Netflix) ---------- */
.nflx-hero { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 26px; min-height: 210px; display: flex; align-items: flex-end; background: linear-gradient(120deg, #0e1630, #0a1224); }
.nflx-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.42; }
.nflx-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 6, 7, 0.94) 0%, rgba(6, 6, 7, 0.5) 55%, transparent 100%); }
.nflx-hero-in { position: relative; z-index: 2; padding: 26px 30px; max-width: 560px; }
.nflx-hero-in .kicker { color: var(--accent); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.nflx-hero-in h2 { font-size: 26px; margin: 8px 0 6px; }
.nflx-hero-in p { color: var(--text-muted); font-size: 14px; }
.nflx-row { margin-bottom: 26px; }
.nflx-row-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-bottom: 12px; }
.nflx-track { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.nflx-card { flex: 0 0 232px; width: 232px; cursor: pointer; }
.nflx-thumb { position: relative; width: 100%; height: 131px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); transition: transform 0.18s var(--ease), border-color 0.18s var(--ease); }
.nflx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nflx-card:hover .nflx-thumb { transform: scale(1.04); border-color: var(--accent-line); }
.nflx-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.25); opacity: 0; transition: opacity 0.18s var(--ease); }
.nflx-card:hover .nflx-play { opacity: 1; }
.nflx-play span { width: 46px; height: 46px; border-radius: 50%; background: rgba(214, 224, 248, 0.94); display: grid; place-items: center; color: #0b1020; }
.nflx-meta { margin-top: 9px; }
.nflx-meta .t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nflx-meta .s { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.nflx-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.nflx-player iframe { width: 100%; height: 100%; border: 0; }

/* util */
.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.mod-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 14px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.mod-check-grid .chk svg { width: 15px; height: 15px; flex: none; }

/* ---------- tarefas: barra + visão em lista (estilo ClickUp) ---------- */
.tk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

/* anatomia ClickUp: breadcrumb, abas de visão, pill de grupo, bandeira de prioridade, colunas */
.tk-crumbs { font-size: 12px; color: var(--text-faint); margin-bottom: 6px; }
.tk-crumb-sep { margin: 0 4px; opacity: .6; }
.tk-crumb-cur { color: var(--text-muted); font-weight: 600; }
.tk-bar-vtabs { border-bottom: 1px solid var(--line); margin-bottom: 16px; padding-bottom: 0; align-items: flex-end; }
.tk-bar-vtabs .seg { margin-bottom: 8px; }
.tk-vtabs { display: flex; gap: 2px; }
.tk-vtabs button { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted); font: inherit; font-size: 13px; padding: 9px 14px; cursor: pointer; margin-bottom: -1px; }
.tk-vtabs button svg { width: 14px; height: 14px; }
.tk-vtabs button:hover { color: var(--text); }
.tk-vtabs button.active { color: var(--brand-blue-bright); border-bottom-color: var(--brand-blue); font-weight: 600; }
.tk-grp-pill { font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 5px; flex: none; }
.tk-flag { display: inline-flex; align-items: center; flex: none; }
.tk-flag svg { width: 13px; height: 13px; }
.tk-cols th { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); padding: 4px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.tk-group { margin-bottom: 14px; }
.tk-group-head { display: flex; align-items: center; gap: 9px; padding: 8px 6px; cursor: pointer; border-bottom: 1px solid var(--line); }
.tk-caret { display: inline-flex; color: var(--text-faint); transform: rotate(90deg); transition: transform 0.15s var(--ease); }
.tk-caret.col { transform: none; }
.tk-grp-label { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; }
.tk-list td { padding: 7px 10px; vertical-align: middle; font-size: 13px; }
.tk-check { width: 34px; }
.tk-check input { width: 17px; height: 17px; accent-color: var(--positive); cursor: pointer; }
.tk-title-cell { display: flex; align-items: center; gap: 8px; }
.tk-title-txt { font-weight: 600; font-size: 13.5px; }
.tk-title-txt.tk-done { text-decoration: line-through; color: var(--text-faint); }
.tk-badge { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); background: var(--surface-2); border-radius: 6px; padding: 1px 6px; display: inline-flex; align-items: center; gap: 3px; }
.tk-badge svg { width: 11px; height: 11px; }
.tk-col { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; }
.pri-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--text-faint); }
.pri-dot.pri-alta { background: var(--negative); }
.pri-dot.pri-media { background: var(--accent); }
.pri-dot.pri-baixa { background: var(--text-faint); }
.tk-col.neg { color: var(--negative); }
.tk-badge.neg { color: var(--negative); }

/* edição inline na linha (Lista estilo ClickUp): hover de linha + controles discretos que
   só "acendem" no hover/foco, pra a linha não parecer um formulário */
.tk-list tbody tr.clickable:hover { background: var(--surface-2); }
.tk-inline { padding-top: 4px; padding-bottom: 4px; }
.tk-inline-sel, .tk-inline-date {
  font: inherit; font-size: 12.5px; color: var(--text-muted);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-xs);
  padding: 3px 6px; max-width: 150px; cursor: pointer; transition: border-color 0.12s var(--ease), background 0.12s var(--ease);
}
.tk-inline-sel:hover, .tk-inline-date:hover { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }
.tk-inline-sel:focus, .tk-inline-date:focus { border-color: var(--brand-blue-line); background: var(--surface); color: var(--text); outline: none; }
.tk-inline-date { min-width: 118px; }
.tk-quickadd-row td { border-top: 1px dashed var(--line); }
.tk-list .tk-quickadd-row td { padding: 5px 12px; }
/* subtarefas expandíveis na Lista (caret estilo ClickUp) */
.tk-exp { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; background: none; border: 0; cursor: pointer; color: var(--text-faint); border-radius: var(--radius-xs); transform: rotate(0deg); transition: transform 0.15s var(--ease); padding: 0; }
.tk-exp svg { width: 12px; height: 12px; }
.tk-exp:hover { color: var(--text); background: var(--surface-3); }
.tk-exp.open { transform: rotate(90deg); }
.tk-exp-ph { visibility: hidden; cursor: default; }
.tk-subrow { background: var(--bg-1); }
.tk-subrow td { padding-top: 6px; padding-bottom: 6px; font-size: 12.5px; }
.tk-sub-indent { padding-left: 44px !important; }
.tk-subrow .tk-title-txt { font-weight: 400; }

.tk-dragging { opacity: 0.4; }
tr[draggable="true"] { cursor: grab; }
tr[draggable="true"]:active { cursor: grabbing; }
.tk-qd { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tk-qd .chip { font-size: 11px; padding: 3px 9px; }
.tk-quickadd { width: 100%; font: inherit; font-size: 13px; color: var(--text); background: transparent; border: 0; padding: 5px 2px; }
.tk-quickadd:focus { outline: none; }
.tk-quickadd::placeholder { color: var(--text-faint); }

/* avatar de pessoa (iniciais, estilo ClickUp) */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; flex: none; vertical-align: middle; }
.avatar-sm { width: 20px; height: 20px; font-size: 9.5px; }
.avatar-lg { width: 46px; height: 46px; font-size: 17px; }
.avatar-empty { background: var(--surface-3); color: var(--text-faint); font-weight: 400; }
.avatar { overflow: hidden; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-person { display: inline-flex; align-items: center; gap: 6px; }
.photo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* seleção múltipla / ações em massa (Lista) */
.tk-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; min-height: 34px; }
.tk-selbox { width: 16px; height: 16px; accent-color: var(--brand-blue); cursor: pointer; }

/* modal de tarefa em 2 colunas (estilo ClickUp): campos à esquerda, Atividade à direita */
.tk-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.tk-detail-main { min-width: 0; }
/* sem sticky: com o modal mais alto que a tela, o painel "grudava" no topo da janela ao
   rolar e deslizava por cima do cabeçalho/conteúdo (sobreposição) */
.tk-detail-side { border-left: 1px solid var(--line); padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.tk-side-title { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.tk-side-scroll { max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.tk-side-composer textarea { width: 100%; }
@media (max-width: 900px) {
  .tk-detail { grid-template-columns: 1fr; }
  .tk-detail-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; position: static; }
}

/* editor do fluxo de status (Gerenciar status) + editor de áreas */
.sb-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sb-color { width: 36px; height: 32px; flex: none; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: transparent; cursor: pointer; }
.sb-label { flex: 1; min-width: 0; }
.sb-area { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.sb-area:last-child { border-bottom: 0; }
.sb-sub { margin-left: 22px; }

/* toolbar 2: filtro de responsável + ordenar */
.tk-toolbar2 { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.tk-toolbar2 .input { max-width: 220px; }

/* subtarefas: linha com checkbox + texto + responsável + prazo + remover */
.sub-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.sub-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.sub-row input[data-chk-text] { flex: 1 1 160px; min-width: 120px; }
.sub-row select.sub-assignee { flex: 0 1 140px; min-width: 110px; font-size: 12.5px; padding: 8px 10px; }
.sub-row input.sub-due { flex: 0 0 132px; font-size: 12.5px; padding: 8px 10px; }
.sub-row input.sub-due.sub-overdue { border-color: var(--negative); color: var(--negative); }
.sub-drag { flex: none; color: var(--text-faint); cursor: grab; display: inline-flex; }
.sub-row.sub-dragging { opacity: 0.4; }

/* dependências entre tarefas: "Aguardando" (editável) e "Bloqueando" (computado, só leitura) */
.dep-list { display: flex; flex-direction: column; }
.dep-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.dep-row:last-child { border-bottom: 0; }
.dep-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--negative); flex: none; }
.dep-dot.dep-done { background: var(--positive); }
.dep-link { background: none; border: none; padding: 0; color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); flex: 1 1 auto; text-align: left; }
.dep-link:hover { color: var(--accent); }
.dep-add { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.dep-add select { flex: 1 1 200px; }

/* interno: editor de campo tipo 'list' (sub-registros repetíveis, ex.: férias/avaliações) */
.int-list-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.int-list-row .field { flex: 1 1 140px; min-width: 110px; margin-bottom: 0; }
.int-list-row .icon-btn { flex: none; }

/* calendário de tarefas */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-dow { background: var(--bg-1); padding: 8px 6px; text-align: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.cal-day { background: var(--surface); min-height: 92px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-day.cal-out { background: var(--bg-1); }
.cal-day.cal-today { background: var(--accent-dim); }
.cal-daynum { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-bottom: 2px; }
.cal-day.cal-today .cal-daynum { color: var(--accent); font-weight: 600; }
.cal-task { display: flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 4px; border-radius: 5px; background: var(--surface-2); cursor: pointer; overflow: hidden; }
.cal-task:hover { background: var(--surface-3); }
.cal-task-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { display: block; width: 100%; background: transparent; border: 0; color: var(--text-faint); font-size: 10.5px; text-align: left; cursor: pointer; padding: 1px 4px; }
.cal-more:hover { color: var(--accent); }
.cal-class-time { margin-left: auto; padding-left: 4px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9.5px; flex: none; }
.cal-task.cal-class-frequente { border-left: 2px solid var(--info); }
.cal-task.cal-class-pontual { border-left: 2px solid var(--accent); }

/* educação: editor de horários (dia/data + início + fim + remover) */
.ch-row { display: grid; grid-template-columns: 0.9fr 1.2fr 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }

/* ---------- alertas do painel ---------- */
.al-list { display: flex; flex-direction: column; gap: 8px; }
.al-row { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 11px 14px; cursor: pointer; transition: border-color 0.15s var(--ease), background 0.15s var(--ease); }
.al-row:hover { border-color: var(--accent-line); border-left-color: var(--accent); background: var(--surface-3); }
.al-label { font-weight: 600; font-size: 13.5px; color: var(--text); }
.al-items { font-size: 12px; color: var(--text-faint); }
.al-ok { color: var(--positive); font-size: 14px; }

/* ---------- Lembretes (Relatórios a emitir / Recarga) — estilo ClickUp, escopo próprio ---------- */
.lb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 18px; }
.lb-stat { background: var(--surface-2); border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: var(--radius-sm); padding: 13px 15px; display: flex; flex-direction: column; gap: 3px; }
.lb-stat-n { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1; color: var(--text); }
.lb-stat-l { font-size: 12px; color: var(--text-muted); }
.lb-stat.lb-crit { border-top-color: var(--negative); }
.lb-stat.lb-warn { border-top-color: var(--accent); }
.lb-stat.lb-info { border-top-color: var(--info); }
.lb-stat.lb-ok { border-top-color: var(--positive); }
.lb-group { margin-bottom: 18px; }
.lb-group-head { display: flex; align-items: center; gap: 9px; padding: 4px 2px 10px; }
.lb-grp-label { font-weight: 600; font-size: 13.5px; color: var(--text); }
.lb-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--text-faint); }
.lb-dot.lb-crit { background: var(--negative); }
.lb-dot.lb-warn { background: var(--accent); }
.lb-dot.lb-info { background: var(--info); }
.lb-dot.lb-ok { background: var(--positive); }
.lb-list td { padding: 11px 14px; vertical-align: middle; }
.lb-list tbody tr:hover, .lb-list tr:hover { background: var(--surface-3); }
.lb-name { font-weight: 600; color: var(--text); }
.lb-due, .lb-last { font-size: 13px; }
.lb-txt-warn { color: var(--accent-deep); font-weight: 600; }
@media (max-width: 560px) { .lb-stats { grid-template-columns: repeat(2, 1fr); } }


/* ============================================================
   SHELL DO CLIENTE — a mesma marca, a luz oposta
   Nenhuma cor nova: o Azul Abissal do Manual vira TINTA em vez de fundo.
   O seletor é body[data-shell], NÃO .shell-client — toast e modal do core
   montam em document.body, irmãos de #app; num seletor mais fundo todo
   modal do cliente sairia branco sobre branco.
   ============================================================ */
body[data-shell="cliente"] {
  --bg:        #FFFFFF;   /* Branco Polar */
  --bg-1:      #F5F8FB;
  --surface:   #FFFFFF;
  --surface-2: #F0F4F9;
  --surface-3: #DEE5ED;   /* Cinza Neblina */

  --text:       #050F1E;  /* Azul Abissal como tinta — 19,2:1 sobre branco */
  --text-muted: #26364D;  /* Azul Atlântico — 12,2:1 */
  --text-faint: #5A7284;  /* Costeiro escurecido — 5,0:1 (o #9CB2BF puro dá 2,2:1 e reprova) */

  --line:        rgba(5, 15, 30, 0.09);
  --line-strong: rgba(5, 15, 30, 0.16);

  --accent:        #26364D;
  --accent-bright: #050F1E;
  --accent-deep:   #5A7284;
  --accent-dim:    rgba(5, 15, 30, 0.06);
  --accent-line:   rgba(5, 15, 30, 0.20);

  --brand-blue:        #5696FB;   /* Azul Horizonte: só preenchimento e traço (2,9:1 reprova como texto) */
  --brand-blue-bright: #1B43BF;
  --brand-blue-dim:    rgba(86, 150, 251, 0.12);
  --brand-blue-line:   rgba(86, 150, 251, 0.40);
  --highlight:         #1B43BF;
  --info:              #1B43BF;   /* Azul Corrente: texto e links — 8,1:1 */
  --info-dim:          rgba(27, 67, 191, 0.10);

  /* escurecidos para passar em texto pequeno sobre branco: o verde original
     dá 3,3:1 e a Terracota 4,3:1 — os dois reprovam */
  --positive:     #1B7A5E;
  --positive-dim: rgba(27, 122, 94, 0.12);
  --negative:     #A63D28;
  --negative-dim: rgba(166, 61, 40, 0.12);

  --chart-grid:  rgba(5, 15, 30, 0.08);
  --chart-grid0: rgba(5, 15, 30, 0.18);
  --chart-now:   rgba(5, 15, 30, 0.22);
  --chart-nowtx: #26364D;
  --chart-guide: rgba(5, 15, 30, 0.35);

  --shadow-tint: 5, 15, 30;
  /* o :root global fixa color-scheme:dark — sem isto, calendário, select e
     barra de rolagem nativos sairiam escuros sobre o branco */
  color-scheme: light;
  scrollbar-color: var(--surface-3) transparent;
}

/* ---------- casca ---------- */
.shell-client { min-height: 100vh; background: var(--bg); }
.chead { background: #182752; border-bottom: 1px solid rgba(86, 150, 251, 0.4); position: sticky; top: 0; z-index: 30; }
.chead-in { max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 68px; display: flex; align-items: center; gap: 14px; }
.chead-brand { display: inline-flex; align-items: center; color: #fff; }
.chead-brand .bmk { color: #fff; }
.chead-brand .brand-word { color: #fff; }
.chead-div { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.18); }
/* mesma receita do .brand-tag da sidebar, um nível mais claro: reconhecivelmente a mesma casa */
.chead-acct { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #9CB2BF; }
.chead-spacer { flex: 1; }
.chead-user { display: inline-flex; align-items: center; gap: 9px; background: transparent; border: 0; cursor: pointer; color: #fff; font-family: var(--font-body); font-size: 13.5px; font-weight: 500; padding: 6px 8px; border-radius: var(--radius-xs); }
.chead-user:hover { background: rgba(255, 255, 255, 0.08); }
.cu-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chead-icon { background: transparent; border: 0; cursor: pointer; color: #9CB2BF; width: 34px; height: 34px; border-radius: var(--radius-xs); display: grid; place-items: center; }
.chead-icon:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.chead-icon svg { width: 18px; height: 18px; }

/* abas: SUBLINHADO, não bloco preenchido — é o sinal mais rápido de "outro produto" */
.ctabs { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ctabs-in { max-width: 1120px; margin: 0 auto; padding: 0 28px; display: flex; gap: 26px; overflow-x: auto; }
.ctab { background: transparent; border: 0; cursor: pointer; color: #9CB2BF; font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 13px 2px; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s var(--ease), border-color .15s var(--ease); }
.ctab:hover { color: #fff; }
.ctab.active { color: #fff; border-bottom-color: #5696FB; }

/* corpo: medida contida e respiro maior — é para ler, não para operar */
.main-client { max-width: 1120px; margin: 0 auto; padding: 40px 28px 80px; font-size: 16px; line-height: 1.65; }
body[data-shell="cliente"] .page-title { font-size: 32px; }
body[data-shell="cliente"] .card { box-shadow: 0 1px 2px rgba(5, 15, 30, 0.06); }
body[data-shell="cliente"] .grid-kpi { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
body[data-shell="cliente"] .k-value { font-size: 30px; }

@media (max-width: 720px) {
  .chead-in { padding: 0 16px; height: 60px; gap: 10px; }
  .cu-name { display: none; }
  .ctabs-in { padding: 0 16px; gap: 18px; }
  .main-client { padding: 26px 16px 70px; }
  body[data-shell="cliente"] .page-title { font-size: 26px; }
}

/* lista de contas vinculadas ao cliente (aba Usuários) */
.check-list { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; max-height: 190px; overflow-y: auto; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 6px 4px; border-radius: var(--radius-xs); cursor: pointer; }
.check-row:hover { background: var(--accent-dim); }
.check-row input { accent-color: var(--brand-blue); width: 15px; height: 15px; }

/* ---------- tela do cliente: herói, apoio e campanhas ---------- */
.hero-res { padding: 34px 32px 30px; }
.hero-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.hero-num { font-family: var(--font-display); font-size: 68px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; margin-top: 10px; font-variant-numeric: tabular-nums; }
.hero-lab { font-size: 17px; color: var(--text-muted); margin-top: 2px; }
.hero-sub { margin: 18px 0 0; font-size: 15px; line-height: 1.7; color: var(--text-muted); max-width: 62ch; }
.hero-sub strong { color: var(--text); font-weight: 600; }

.res-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.res-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.rt-k { font-size: 12.5px; color: var(--text-faint); font-weight: 600; }
.rt-v { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.camp-row { padding: 15px 0; border-bottom: 1px solid var(--line); }
.camp-row:last-child { border-bottom: 0; padding-bottom: 0; }
.camp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.camp-name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-num { font-size: 17px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.camp-num small { font-size: 12.5px; font-weight: 500; color: var(--text-faint); }
.camp-bar { height: 8px; background: var(--surface-2); border-radius: 5px; overflow: hidden; margin-top: 9px; }
.camp-bar i { display: block; height: 100%; background: var(--brand-blue); border-radius: 5px; }
.camp-foot { display: flex; gap: 18px; margin-top: 7px; font-size: 12.5px; color: var(--text-faint); }

@media (max-width: 720px) {
  .hero-res { padding: 26px 20px 24px; }
  .hero-num { font-size: 52px; }
  .hero-sub { font-size: 14.5px; }
}

/* ---------- shell da Gestão (sistema separado, gestao.veronorte.com.br) ---------- */
.shell-gestao { min-height: 100vh; background: var(--bg); }
.ghead { background: var(--bg-1); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.ghead-in { max-width: 1180px; margin: 0 auto; padding: 0 28px; height: 62px; display: flex; align-items: center; gap: 14px; }
.ghead-brand { display: inline-flex; align-items: center; }
.ghead-who { font-size: 13px; color: var(--text-muted); }
.main-gestao { max-width: 1180px; margin: 0 auto; padding: 30px 28px 70px; }
@media (max-width: 720px) {
  .ghead-in { padding: 0 16px; height: 56px; gap: 10px; }
  .ghead-who { display: none; }
  .main-gestao { padding: 22px 16px 60px; }
}
