/* ============================================================
   Octus CRM — Design System v2 (o mesmo do backoffice do cassino:
   resources/css/filament/admin/theme.css do fork Worldwide).
   Ferramenta de trabalho, não vitrine: 90% neutros, 8% superfícies, 2% acento.
   Violeta = ação e seleção; status só com cores semânticas. Sem gradiente, glow
   ou peso acima de 600. Tokens abaixo são a fonte da verdade (claro no :root,
   escuro em [data-theme="dark"]). Nenhuma regra de negócio depende deste arquivo.
   ============================================================ */

:root {
  /* surfaces */
  --bg-canvas: #FBFBFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F6F6F8;
  --bg-selected: #FAF9FF;
  --bg-inverse: #18181F;

  /* borders */
  --border-default: #E1E1E8;
  --border-subtle: #EEEEF2;
  --border-strong: #C9C9D3;

  /* text */
  --text-primary: #18181F;
  --text-secondary: #57576B;
  --text-tertiary: #404052;
  --text-disabled: #9D9DAB;
  --text-on-primary: #FFFFFF;
  --text-link: #5843D6;

  /* action */
  --action-primary: #5843D6;
  --action-primary-hover: #4733B3;
  --action-primary-border: #4733B3;
  --action-danger: #C42F45;
  --action-danger-border: #B0283D;
  --focus-ring: #D4CCFE;
  --focus-ring-input: #E9E5FF;

  /* soft accent (filter chips, counters) */
  --accent-subtle-bg: #F4F2FF;
  --accent-subtle-border: #E9E5FF;
  --accent-subtle-fg: #382A8C;
  --count-bg: #E9E5FF;
  --count-fg: #382A8C;

  /* semantic */
  --success-bg: #E7F5EE; --success-fg: #146142; --success-solid: #1F8A5B;
  --warning-bg: #FDF3E1; --warning-fg: #7A4A00; --warning-solid: #B26B00;
  --danger-bg:  #FCEBEE; --danger-fg:  #9E1F33; --danger-solid:  #D1344B;
  --info-bg:    #EAF1FD; --info-fg:    #1E4FA8; --info-solid:    #2F6FE0;

  /* typography */
  --font-display: "Inter Tight", Inter, system-ui, sans-serif;
  --font-sans: Inter, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;

  /* shadows — borda primeiro, sombra só no que flutua */
  --shadow-1: 0 0 0 1px rgba(14,14,19,.06), 0 1px 2px rgba(14,14,19,.06);
  --shadow-2: 0 0 0 1px rgba(14,14,19,.06), 0 4px 12px rgba(14,14,19,.08);
  --shadow-3: 0 0 0 1px rgba(14,14,19,.06), 0 16px 40px rgba(14,14,19,.12);
  --overlay: rgba(14,14,19,.40);

  /* nomes antigos do CRM (estilos inline das telas) → tokens do DS v2 */
  --volt: var(--action-primary);
  --volt-hover: var(--action-primary-hover);
  --volt-light: var(--accent-subtle-fg);
  --depth: var(--text-primary);
  --text-2: var(--text-secondary);
  --muted: var(--text-secondary);
  --border: var(--border-default);
  --bg: var(--bg-subtle);
  --row-hover: var(--bg-subtle);
  --canvas-bg: var(--bg-canvas);
  --surface: var(--bg-surface);
  --eye: var(--warning-solid);
  --eye-dark: var(--warning-fg);
  --green: var(--success-solid);
  --red: var(--danger-solid);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg-canvas: #0E0E13;
  --bg-surface: #16161D;
  --bg-subtle: #1E1E27;
  --bg-selected: #1C1A2E;
  --bg-inverse: #EDEDF2;

  --border-default: #2A2A36;
  --border-subtle: #23232E;
  --border-strong: #404052;

  --text-primary: #EDEDF2;
  --text-secondary: #A3A3B5;
  --text-tertiary: #C4C4D0;
  --text-disabled: #6E6E82;
  --text-on-primary: #0E0E13;
  --text-link: #B3A6FB;

  --action-primary: #8E7CF5;
  --action-primary-hover: #B3A6FB;
  --action-primary-border: #B3A6FB;
  --focus-ring: #4733B3;
  --focus-ring-input: #2A2166;

  --accent-subtle-bg: #241D4D;
  --accent-subtle-border: #382A8C;
  --accent-subtle-fg: #D4CCFE;
  --count-bg: #241D4D;
  --count-fg: #D4CCFE;

  --success-bg: #12301F; --success-fg: #5CC99A;
  --warning-bg: #33240A; --warning-fg: #F0B95C;
  --danger-bg:  #3A1219; --danger-fg:  #F2899A;
  --info-bg:    #132A52; --info-fg:    #8DB4F5;

  --shadow-1: 0 0 0 1px rgba(255,255,255,.06);
  --shadow-2: 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.4);
  --shadow-3: 0 0 0 1px rgba(255,255,255,.08), 0 24px 48px rgba(0,0,0,.5);
  --overlay: rgba(0,0,0,.6);

  color-scheme: dark;
}

/* ---------- base: Inter 14/20 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-canvas); }
body { font-family: var(--font-sans); color: var(--text-primary); font-size: 14px; line-height: 20px; font-weight: 400;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
b, strong, th { font-weight: 600; }
a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--action-primary-hover); text-decoration: underline; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: var(--radius-full); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }

.mono { font-family: var(--font-mono); }
.chakra { font-family: var(--font-display); letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* overline: rótulos curtos em caixa alta (grupos, cabeçalhos de tabela, campos) */
.overline, .label, .nav-group-label, .gtable-head, .field label, .field .field-label {
  font-family: var(--font-sans); font-size: 11px; line-height: 14px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary);
}

/* ---------- shell: sidebar 232 · topbar 56 ---------- */
.shell { display: flex; width: 100vw; height: 100vh; overflow: hidden; background: var(--bg-canvas); }

.sidebar { width: 232px; flex: none; background: var(--bg-surface); border-right: 1px solid var(--border-default);
  display: flex; flex-direction: column; color: var(--text-tertiary); }
.sidebar-logo { display: flex; align-items: center; gap: 8px; padding: 18px 24px 16px; }
.sidebar-logo img { width: 24px; height: 24px; flex: none; }
.logo-word { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: .04em; color: var(--text-primary); line-height: 1; }
.logo-word span { color: var(--action-primary); }
.logo-sub { margin-top: 3px; font-family: var(--font-display); font-weight: 500; font-size: 8px; letter-spacing: .4em; color: var(--text-secondary); }
.logo-tag { margin-left: auto; font-size: 11px; line-height: 16px; font-weight: 500; padding: 0 6px;
  border: 1px solid var(--border-default); border-radius: var(--radius-xs); color: var(--text-secondary); }
.sidebar-sep { height: 1px; background: var(--border-subtle); margin: 0 14px 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 14px; overflow-y: auto; }
.nav-group-label { padding: 18px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: 14px; line-height: 20px; font-weight: 400; color: var(--text-tertiary); text-decoration: none; }
.nav-item::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: var(--radius-full);
  background: var(--border-strong); transition: background-color .15s; }
.nav-item:hover { background: var(--bg-subtle); color: var(--text-primary); text-decoration: none; }
.nav-item:hover::before { background: var(--text-disabled); }
.nav-item.active { background: var(--bg-subtle); color: var(--text-primary); font-weight: 600; }
.nav-item.active::before { background: var(--action-primary); }
.nav-item.active:hover { color: var(--text-primary); }
.nav-item .num, .nav-count { margin-left: auto; min-height: 18px; padding: 0 7px; font-size: 11px; line-height: 18px; font-weight: 600;
  border-radius: var(--radius-full); background: var(--count-bg); color: var(--count-fg); }
.sidebar-footer { margin-top: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border-subtle); }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.tenant { font-family: var(--font-mono); font-size: 11px; color: var(--text-disabled); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-green { background: var(--success-solid); }
.dot-amber { background: var(--warning-solid); }
.dot-red { background: var(--danger-solid); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; flex: none; background: var(--bg-surface); border-bottom: 1px solid var(--border-default);
  display: flex; align-items: center; gap: 16px; padding: 0 28px; }
.topbar-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 24px; letter-spacing: -0.01em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sync-pill { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-default); border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 12px; font-weight: 500; color: var(--text-secondary); background: var(--bg-surface); }
.avatar { width: 30px; height: 30px; border-radius: var(--radius-full); background: var(--accent-subtle-bg); color: var(--accent-subtle-fg);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-sans); font-weight: 600; font-size: 12px;
  border: 1px solid var(--accent-subtle-border); cursor: pointer; }
.country-filter select { min-width: 168px; }

/* dropdown do avatar */
.user-menu-wrap { position: relative; }
.dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 232px; background: var(--bg-surface);
  border-radius: var(--radius-md); box-shadow: var(--shadow-2); padding: 4px; display: none; z-index: 40; }
.dropdown.open { display: block; }
.dropdown-header { padding: 10px 10px 8px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px; }
.dropdown-header .dd-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.dropdown-header .dd-email { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.dropdown form { margin: 0; }
.dropdown-item { display: block; width: 100%; text-align: left; padding: 6px 10px; min-height: 32px; background: none; border: none;
  border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-sans); font-weight: 400; font-size: 14px;
  color: var(--text-tertiary); text-decoration: none; }
.dropdown-item:hover { background: var(--bg-subtle); color: var(--text-primary); text-decoration: none; }

.content { flex: 1; overflow: auto; padding: 24px 28px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }

/* ---------- page header: descrição à esquerda, ações à direita ---------- */
.page-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; min-height: 36px; }
.page-head > .desc { flex: 1 1 360px; min-width: 0; }
.page-head > .actions { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.page-head.back { gap: 14px; }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 22px; }

/* abas segmentadas (Messaging, Bonuses, Logs) */
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-subtle); border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--border-subtle); flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--text-primary); text-decoration: none; }
.tab.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-1); }
.tab .tab-count { min-width: 20px; padding: 0 6px; border-radius: var(--radius-full); background: var(--count-bg); color: var(--count-fg);
  font-size: 11px; line-height: 18px; font-weight: 600; text-align: center; }

/* barra de filtros (GET): campos pequenos lado a lado */
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters .input.sm, .filters select.input.sm { width: auto; min-width: 140px; }
.filters .search-input { min-height: 32px; padding-top: 5px; padding-bottom: 5px; font-size: 13px; border-radius: var(--radius-sm); }
.filters .spacer { flex: 1; }

/* ---------- primitives ---------- */
.card { background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--border-default); overflow: hidden; }
.card-pad { padding: 20px; }
.card-pad-sm { padding: 16px; }
.card-header { min-height: 52px; padding: 12px 20px; border-bottom: 1px solid var(--border-default);
  font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 22px; display: flex; align-items: center; gap: 10px; }
.card-header .sub { font-family: var(--font-sans); font-weight: 400; font-size: 13px; color: var(--text-secondary); }
.card-header .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; font-family: var(--font-sans); }
.card-link { font-family: var(--font-sans); font-size: 13px; font-weight: 500; }
.section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-head .state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.section-sep { border-top: 1px solid var(--border-subtle); margin: 4px 0; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.code-inline { font-family: var(--font-mono); font-size: 12px; padding: 1px 5px; border-radius: var(--radius-xs); background: var(--bg-subtle);
  color: var(--text-tertiary); word-break: break-all; }

.h-card { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 22px; }
.label-dark { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-primary); }
.desc { font-size: 14px; color: var(--text-secondary); }
.muted-note { font-size: 13px; line-height: 18px; color: var(--text-secondary); }

/* ---------- buttons: md 36 · sm 32 · radius 8/6 · um primário por painel ---------- */
.btn-primary, .btn-outline, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: var(--radius-md); font-family: var(--font-sans); font-weight: 500;
  font-size: 14px; line-height: 20px; letter-spacing: 0; text-transform: none; cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-1); transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s; }
.btn-primary { background: var(--action-primary); border: 1px solid var(--action-primary-border); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--action-primary-hover); color: var(--text-on-primary); text-decoration: none; }
.btn-outline { background: var(--bg-surface); border: 1px solid var(--border-default); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-subtle); color: var(--text-primary); text-decoration: none; }
.btn-danger { background: var(--action-danger); border: 1px solid var(--action-danger-border); color: #FFFFFF; }
.btn-primary.sm, .btn-outline.sm, .btn-danger.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-primary:focus-visible, .btn-outline:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }
.btn-primary:disabled, .btn-outline:disabled { background: var(--bg-subtle); border-color: var(--border-subtle);
  color: var(--text-disabled); box-shadow: none; cursor: not-allowed; }

/* ---------- badges / chips: pill 12/500, cores semânticas ---------- */
.chip, .chip-fill, .chip-amber, .chip-dark, .badge {
  display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 2px 8px; border-radius: var(--radius-full);
  font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; letter-spacing: 0; }
.chip { background: var(--bg-subtle); color: var(--text-tertiary); border: 1px solid var(--border-default); }
.chip-lg { font-size: 13px; padding: 3px 10px; }
.chip-fill { background: var(--bg-subtle); color: var(--text-tertiary); border: none; }
.chip-amber { background: var(--warning-bg); color: var(--warning-fg); border: none; }
.chip-dark { background: var(--count-bg); color: var(--count-fg); border: none; }
.badge { background: none; border: 1px solid var(--border-default); color: var(--text-tertiary); cursor: pointer; text-decoration: none; }
.badge:hover { text-decoration: none; }
.badge-primary { background: var(--count-bg); color: var(--count-fg); border-color: transparent; }
.badge-neutral { background: var(--bg-subtle); color: var(--text-tertiary); }
.badge-outline { border-style: dashed; color: var(--text-secondary); }
.badge-success { background: var(--success-bg); color: var(--success-fg); border-color: transparent; }
.badge-warning { background: var(--warning-bg); color: var(--warning-fg); border-color: transparent; }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-fg);  border-color: transparent; }
.badge-info    { background: var(--info-bg);    color: var(--info-fg);    border-color: transparent; }
.badge-accent  { background: var(--accent-subtle-bg); color: var(--accent-subtle-fg); border-color: transparent; }
.badge.static { cursor: default; }
.badge .dot { width: 6px; height: 6px; background: currentColor; }
.lang-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- tables (grid) ----------
   Cabeçalho 40 em bg-subtle; linhas 56 (dense 44); gutter lateral 20 igual ao card-header;
   16 entre colunas. Números e ações à direita (.num / .end). Em telas estreitas a tabela
   rola na horizontal dentro do card (.table-scroll + --min) em vez de esmagar as colunas. */
.gtable-head { display: grid; grid-template-columns: var(--cols); column-gap: 16px; align-items: center; min-height: 40px; padding: 8px 20px;
  background: var(--bg-subtle); border-bottom: 1px solid var(--border-default); position: sticky; top: 0; z-index: 1; }
.gtable-row { display: grid; grid-template-columns: var(--cols); column-gap: 16px; min-height: 56px; padding: 10px 20px;
  border-bottom: 1px solid var(--border-subtle); align-items: center; color: inherit; text-decoration: none; transition: background-color .1s; }
.gtable-row.dense { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
.gtable-row:last-child { border-bottom: none; }
.gtable-row > *, .gtable-head > * { min-width: 0; }
.gtable-head > .num, .gtable-row > .num { text-align: right; }
.gtable-head > .end, .gtable-row > .end { justify-self: end; text-align: right; }
.gtable-row.clickable { cursor: pointer; }
.gtable-row.clickable:hover { background: var(--bg-subtle); text-decoration: none; color: inherit; }
.gtable-row.selected { background: var(--bg-selected); box-shadow: inset 3px 0 0 var(--action-primary); }
.gtable-row.inactive > * { opacity: .55; }
.table-scroll { overflow-x: auto; }
.table-scroll > .gtable-head, .table-scroll > .gtable-row, .table-scroll > details > summary { min-width: var(--min, 760px); }
.gtable-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 52px; padding: 10px 20px;
  border-top: 1px solid var(--border-default); font-size: 13px; color: var(--text-secondary); }
.cell-title { font-size: 14px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { font-size: 12px; line-height: 16px; color: var(--text-secondary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-mono { font-family: var(--font-sans); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-mono-sm { font-family: var(--font-sans); font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.cell-id { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.cell-code { font-family: var(--font-mono); font-size: 13px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-status { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.cell-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* estado vazio: título + dica + ação, centralizado no card */
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 24px; text-align: center; }
.empty-title { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.empty-hint { font-size: 13px; line-height: 18px; color: var(--text-secondary); max-width: 440px; }
.empty .btn-primary, .empty .btn-outline { margin-top: 10px; }
.empty.compact { padding: 24px 20px; }

/* paginação (rodapé das tabelas) */
.pager-info { font-variant-numeric: tabular-nums; }
.pager-info b { color: var(--text-primary); font-weight: 600; }
.pager-links { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.pager-links a, .pager-links span { min-width: 32px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-tertiary); background: var(--bg-surface);
  font-size: 13px; font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; }
.pager-links a:hover { background: var(--bg-subtle); color: var(--text-primary); text-decoration: none; }
.pager-links .current { background: var(--accent-subtle-bg); color: var(--accent-subtle-fg); border-color: var(--accent-subtle-border); font-weight: 600; }
.pager-links .disabled { color: var(--text-disabled); background: none; }
.pager-links .gap { border: none; background: none; min-width: 20px; padding: 0; color: var(--text-disabled); }

/* ---------- forms: 36px, radius 8, label acima, foco com anel ---------- */
.field label, .field .field-label { display: block; margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; min-height: 36px; border: 1px solid var(--border-default); background: var(--bg-surface);
  padding: 7px 12px; font-size: 14px; line-height: 20px; font-family: var(--font-sans); color: var(--text-primary);
  border-radius: var(--radius-md); appearance: none; -webkit-appearance: none; box-shadow: var(--shadow-1); }
textarea.input { min-height: 72px; }
.input.sm, select.input.sm { min-height: 32px; padding: 5px 10px; font-size: 13px; border-radius: var(--radius-sm); }
.input.mono { font-family: var(--font-mono); font-size: 13px; }
.input::placeholder { color: var(--text-disabled); }
.input:focus { outline: none; border-color: var(--action-primary); box-shadow: 0 0 0 3px var(--focus-ring-input); }
.input[readonly] { background: var(--bg-subtle); color: var(--text-secondary); }
select.input { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2357576B' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.field-error { color: var(--danger-fg); font-size: 12px; margin-top: 4px; }
.form-group { border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.split-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ---------- modals: radius 12, sombra 3 ---------- */
.modal-overlay { position: fixed; inset: 0; background: var(--overlay); display: none;
  align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { max-height: 90vh; max-width: 100%; overflow: auto; background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); }
.modal-header { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); }
.modal-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 24px; }
.modal-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.modal-close { margin-left: auto; cursor: pointer; color: var(--text-secondary); font-size: 14px; width: 32px; height: 32px;
  border-radius: var(--radius-sm); background: none; border: none; display: inline-flex; align-items: center; justify-content: center; }
.modal-close:hover { color: var(--text-primary); background: var(--bg-subtle); text-decoration: none; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border-subtle); justify-content: flex-end; background: var(--bg-subtle); }

/* seletor de cards (kind/channel) */
.pick-card { flex: 1; border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 12px; cursor: pointer;
  background: var(--bg-surface); text-align: left; font-family: var(--font-sans); }
.pick-card .pick-title { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.pick-card .pick-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.pick-card:hover { background: var(--bg-subtle); }
.pick-card.selected { border-color: var(--action-primary); background: var(--bg-selected); box-shadow: 0 0 0 3px var(--focus-ring-input); }
.pick-card.center { text-align: center; }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--border-default); padding: 16px; min-width: 0; }
.kpi .label { min-height: 14px; }
.kpi .kpi-value { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 30px; letter-spacing: -0.02em; margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .kpi-delta { font-size: 12px; margin-top: 4px; color: var(--success-fg); }
.kpi-sub { font-size: 12px; line-height: 16px; color: var(--text-secondary); margin-top: 2px; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; margin-top: 20px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; background: var(--action-primary); border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.bar.bar-crm { background: var(--warning-solid); }
.bar-day { font-size: 11px; color: var(--text-secondary); }
.legend { display: flex; gap: 16px; margin-top: 14px; }
.legend > div { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.legend .sq { width: 10px; height: 10px; display: inline-block; border-radius: 2px; }
.sq-primary { background: var(--action-primary); }
.sq-warning { background: var(--warning-solid); }
.split-chart { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
.meter-card { display: flex; flex-direction: column; gap: 14px; }
.meter-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-secondary); }
.meter-total { margin-top: auto; border-top: 1px solid var(--border-subtle); padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.meter-big { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
.progress-track { height: 6px; background: var(--bg-subtle); margin-top: 6px; border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 6px; border-radius: var(--radius-full); background: var(--action-primary); }
.progress-fill.tone-primary { background: var(--action-primary); }
.progress-fill.tone-warning { background: var(--warning-solid); }
.progress-fill.tone-success { background: var(--success-solid); }

/* ---------- players ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; }
.search-input { min-height: 36px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: 7px 12px 7px 34px; font-size: 14px; width: 320px; font-family: var(--font-sans); color: var(--text-primary); box-shadow: var(--shadow-1);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2357576B' stroke-width='1.5'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center; }
.search-input::placeholder { color: var(--text-secondary); }
.search-input:focus { outline: none; border-color: var(--action-primary); box-shadow: 0 0 0 3px var(--focus-ring-input); }
.filter-chip { display: inline-flex; align-items: center; min-height: 32px; border: 1px solid var(--border-default); background: var(--bg-surface);
  padding: 0 12px; border-radius: var(--radius-full); font-family: var(--font-sans); font-weight: 500; font-size: 13px;
  color: var(--text-tertiary); cursor: pointer; text-decoration: none; }
.filter-chip:hover { background: var(--bg-subtle); color: var(--text-primary); text-decoration: none; }
.filter-chip.active { background: var(--accent-subtle-bg); border-color: var(--accent-subtle-border); color: var(--accent-subtle-fg); }
.stat-cell { background: var(--bg-subtle); border-radius: var(--radius-md); padding: 10px 12px; min-width: 0; }
.stat-cell .sc-label { font-size: 12px; color: var(--text-secondary); }
.stat-cell .sc-value { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-cell .sc-text { font-size: 13px; font-weight: 600; margin-top: 4px; }
.attr-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.attr-key { font-size: 13px; color: var(--text-secondary); }
.attr-value { font-size: 13px; color: var(--text-primary); text-align: right; }
/* painel lateral do jogador */
.drawer { position: sticky; top: 0; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border-subtle); }
.drawer-section { padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 8px; }
.drawer-section:last-child { border-bottom: none; }
.drawer-section > .label { margin-bottom: 2px; }
.drawer-section .attr-row:last-child { border-bottom: none; }
.drawer-actions { background: var(--bg-subtle); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.avatar-lg { width: 44px; height: 44px; font-size: 15px; cursor: default; flex: none; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-row form { display: inline-flex; margin: 0; }
.chip-btn { cursor: pointer; background: none; }
.chip-btn:hover { background: var(--bg-subtle); }
.tag-add-chip { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 12px; border: 1px dashed var(--border-strong); color: var(--text-secondary); cursor: pointer; background: none; }
.tag-add-chip:hover { color: var(--text-link); border-color: var(--action-primary); }

/* ---------- segments ---------- */
.color-swatch { width: 40px; height: 36px; flex: none; border: 1px solid var(--border-default); border-radius: var(--radius-md);
  background: var(--bg-surface); padding: 3px; cursor: pointer; }
.logo-stage { display: inline-block; padding: 14px; border-radius: var(--radius-md); background: #18181F; }
.preview-frame { width: 100%; height: 540px; border: none; border-radius: var(--radius-md); background: #F4F4F6;
  box-shadow: 0 0 0 1px var(--border-default); }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-md); background: var(--bg-subtle);
  box-shadow: inset 0 0 0 1px var(--border-subtle); font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
/* cards com preview (pop-ups, push) */
.preview-card { display: flex; flex-direction: column; }
.preview-card.inactive .preview-stage { opacity: .5; }
.preview-stage { background: #0F0E15; padding: 22px; min-height: 150px; display: flex; align-items: center; justify-content: center; }
.preview-meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border-subtle); }
.preview-meta .lang-row { margin-top: 0; }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-subtle); }
.preview-stats > div { display: flex; flex-direction: column; gap: 2px; }
.preview-stats .sc-label { font-size: 12px; color: var(--text-secondary); }
.preview-stats b { font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; }
.cell-link { color: inherit; text-decoration: none; min-width: 0; }
.cell-link:hover { text-decoration: none; color: inherit; }
.cell-link:hover .cell-title { color: var(--text-link); }
.btn-danger-ghost { color: var(--danger-fg); }
.btn-danger-ghost:hover { background: var(--danger-bg); color: var(--danger-fg); border-color: transparent; }
.seg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.seg-card { background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--border-default); padding: 18px 20px; }
.seg-card:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-1); }
.seg-count { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 32px; letter-spacing: -0.02em; margin-top: 10px; }
.rule-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 0.6fr) 32px; gap: 8px; align-items: center; }
.rule-row.is-list { align-items: start; }
.rule-row.is-list .rule-value { grid-column: 3 / span 2; }
.rule-row.is-list .rule-extra { display: none; }
.rule-value, .rule-extra { min-width: 0; }
.rule-unit { font-size: 13px; color: var(--text-secondary); padding-left: 2px; }
.chip-toggle-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.chip-toggle { min-height: 32px; padding: 0 12px; border-radius: var(--radius-full); border: 1px solid var(--border-default); background: var(--bg-surface);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--text-tertiary); cursor: pointer; }
.chip-toggle:hover { background: var(--bg-subtle); color: var(--text-primary); }
.chip-toggle[aria-pressed="true"] { background: var(--accent-subtle-bg); border-color: var(--action-primary); color: var(--accent-subtle-fg); }
.rule-remove { color: var(--text-secondary); cursor: pointer; width: 32px; height: 32px; border-radius: var(--radius-sm); background: none; border: none; font-size: 13px; }
.rule-remove:hover { color: var(--danger-fg); background: var(--danger-bg); }
.add-rule { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); min-height: 36px; padding: 0 12px; font-family: var(--font-sans);
  font-weight: 500; font-size: 13px; color: var(--text-secondary); cursor: pointer; text-align: center; background: none; width: 100%; }
.add-rule:hover { color: var(--text-link); border-color: var(--action-primary); background: var(--bg-selected); }
.estimate-bar { background: var(--bg-subtle); border-radius: var(--radius-md); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.estimate-count { font-family: var(--font-display); font-weight: 600; font-size: 16px; }

/* ---------- journey builder ---------- */
.builder-wrap { display: flex; flex-direction: column; height: 100%; margin: -24px -28px; min-height: calc(100vh - 56px); }
.builder-header { background: var(--bg-surface); border-bottom: 1px solid var(--border-default); display: flex;
  align-items: center; gap: 14px; padding: 10px 28px; }
.builder-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.builder-meta { font-size: 12px; color: var(--text-secondary); }
.builder-body { flex: 1; display: flex; min-height: 0; }
.palette { width: 216px; flex: none; background: var(--bg-surface); border-right: 1px solid var(--border-default);
  padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.palette-item { border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 8px 10px; font-size: 13px; font-weight: 500;
  cursor: grab; background: var(--bg-surface); color: var(--text-primary); text-align: left; width: 100%; font-family: var(--font-sans);
  border-left-width: 3px; }
.palette-item:hover { background: var(--bg-subtle); }
.palette-item.t-trigger { border-left-color: var(--action-primary); }
.palette-item.t-logic { border-left-color: var(--text-tertiary); }
.palette-item.t-action { border-left-color: var(--warning-solid); }
.canvas { flex: 1; overflow: auto; position: relative;
  background-image: radial-gradient(var(--border-default) 1px, transparent 1px);
  background-size: 22px 22px; background-color: var(--bg-canvas); }
.canvas-inner { position: relative; width: 1500px; height: 900px; }
.canvas-inner svg { position: absolute; inset: 0; pointer-events: none; }
.node { position: absolute; width: 216px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  box-shadow: var(--shadow-1); cursor: pointer; user-select: none; border-top-width: 3px; }
.node.selected { border-color: var(--action-primary); box-shadow: 0 0 0 3px var(--focus-ring-input); }
.node .node-kind { padding: 10px 12px 2px; font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.node .node-title { padding: 0 12px 4px; font-weight: 600; font-size: 14px; }
.node .node-sub { padding: 0 12px 10px; font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.node .node-stat { border-top: 1px solid var(--border-subtle); padding: 6px 12px; font-size: 12px; color: var(--text-secondary); }
.node .node-badge { position: absolute; top: -10px; right: -8px; background: var(--count-bg); color: var(--count-fg);
  border-radius: var(--radius-full); font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; }
.node.t-trigger { border-top-color: var(--action-primary); }
.node.t-logic { border-top-color: var(--text-tertiary); }
.node.t-action { border-top-color: var(--warning-solid); }
.node.t-trigger.selected, .node.t-logic.selected, .node.t-action.selected { border-color: var(--action-primary); }
.inspector { width: 268px; flex: none; background: var(--bg-surface); border-left: 1px solid var(--border-default); padding: 18px; overflow: auto; }
.inspector .field { margin-top: 12px; }
.inspector .stat-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.inspector .stat-row .k { color: var(--text-secondary); }
.inspector .stat-row .v { font-variant-numeric: tabular-nums; }

/* ---------- integration ---------- */
.kv-box { background: var(--bg-subtle); border-radius: var(--radius-md); padding: 8px 12px; font-family: var(--font-mono); font-size: 13px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; word-break: break-all; }
.reveal-link { color: var(--text-link); cursor: pointer; background: none; border: none; font-family: var(--font-sans); font-size: 13px; font-weight: 500; flex: none; }
.toggle { width: 36px; height: 20px; position: relative; flex: none; cursor: pointer; border: none; padding: 0; border-radius: var(--radius-full); transition: background-color .15s; }
.toggle .knob { position: absolute; top: 2px; width: 16px; height: 16px; background: #FFFFFF; border-radius: var(--radius-full); box-shadow: 0 1px 2px rgba(14,14,19,.2); transition: left .15s; }
.toggle.on { background: var(--action-primary); }
.toggle.on .knob { left: 18px; }
.toggle.off { background: var(--border-strong); }
.toggle.off .knob { left: 2px; }
.wh-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.delivery-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); }

/* ---------- feed ---------- */
.feed-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 20px; border-bottom: 1px solid var(--border-subtle);
  color: inherit; text-decoration: none; }
a.feed-row:hover { background: var(--bg-subtle); text-decoration: none; color: inherit; }
.feed-row:last-child { border-bottom: none; }
.feed-time { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); width: 64px; flex: none; }
.feed-desc { flex: 1; min-width: 0; font-size: 13px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-end { margin-left: auto; flex: none; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* ---------- logs: linha expansível (details/summary, sem JS) ---------- */
.log-health { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.log-health .stat-cell { background: var(--bg-surface); box-shadow: 0 0 0 1px var(--border-default); border-radius: var(--radius-lg); padding: 12px 16px; }
.card-toolbar { padding: 12px 20px; border-bottom: 1px solid var(--border-default); }
.card-toolbar .search-input { width: 240px; }
.filters select.input.sm.per-page { min-width: 0; width: 136px; }
details.log-row { border-bottom: 1px solid var(--border-subtle); }
details.log-row:last-of-type { border-bottom: none; }
details.log-row > summary { display: grid; grid-template-columns: var(--cols); column-gap: 16px; align-items: center; min-height: 52px;
  padding: 8px 20px; cursor: pointer; list-style: none; }
details.log-row > summary::-webkit-details-marker { display: none; }
details.log-row > summary:hover { background: var(--bg-subtle); }
details.log-row > summary > * { min-width: 0; }
details.log-row > summary > .num { text-align: right; }
details.log-row > summary .caret { color: var(--text-disabled); transition: transform .15s; justify-self: end; font-size: 12px; }
details.log-row[open] > summary { background: var(--bg-selected); }
details.log-row[open] > summary .caret { transform: rotate(90deg); color: var(--text-secondary); }
.log-detail { padding: 14px 20px 18px; background: var(--bg-canvas); border-top: 1px solid var(--border-subtle);
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px 24px; }
.log-meta { display: flex; flex-direction: column; gap: 0; }
.log-meta .attr-row { padding: 6px 0; }
.log-error { grid-column: 1 / -1; padding: 10px 12px; border-radius: var(--radius-md); background: var(--danger-bg); color: var(--danger-fg);
  font-family: var(--font-mono); font-size: 12px; line-height: 18px; white-space: pre-wrap; word-break: break-word; }
.code-block { margin: 0; padding: 12px 14px; border-radius: var(--radius-md); background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--border-subtle);
  font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--text-tertiary); overflow: auto; max-height: 360px; white-space: pre; }

/* ---------- flash / alerts: fundo semântico ---------- */
.flash { padding: 10px 14px; font-size: 14px; border-radius: var(--radius-md); margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
  background: var(--bg-subtle); color: var(--text-primary); border: 1px solid var(--border-default); }
.flash-ok { background: var(--success-bg); color: var(--success-fg); border-color: transparent; }
.flash-error { background: var(--danger-bg); color: var(--danger-fg); border-color: transparent; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-canvas); padding: 16px; }
.login-card { width: 400px; max-width: 100%; background: var(--bg-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-2); padding: 32px; }

/* ---------- misc ---------- */
.text-green { color: var(--success-fg); }
.text-red { color: var(--danger-fg); }
.text-amber { color: var(--warning-fg); }
.text-muted { color: var(--text-secondary); }
.text-volt { color: var(--text-link); }

/* entre 900px e 1280px a sidebar fica e seis cartões não cabem o valor em USD */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-2, .split-wide, .split-chart, .split-side { grid-template-columns: minmax(0, 1fr); }
  .log-detail { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- telas estreitas: sidebar some, conteúdo com gutter de 16px ---------- */
.nav-toggle, .nav-scrim { display: none; }
.nav-toggle { width: 36px; height: 36px; margin-left: -8px; border: none; background: none; border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer; align-items: center; justify-content: center; flex: none; }
.nav-toggle:hover { background: var(--bg-subtle); color: var(--text-primary); }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .nav-toggle { display: inline-flex; }
  .shell.nav-open .sidebar { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 70; box-shadow: var(--shadow-3); }
  .shell.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: var(--overlay); }
  .sync-pill { display: none; }
  .topbar { gap: 10px; }
  .topbar-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .country-filter select { min-width: 0; width: 150px; }
  .filters .search-input, .card-toolbar .search-input { flex: 1 1 200px; width: auto; min-width: 0; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-grid, .grid-3 { grid-template-columns: 1fr; }
  .search-input { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
  .log-health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head > .actions { margin-left: 0; }
  .pager-links { margin-left: 0; }
}

/* arestas do canvas de jornada (yes / no / sem ramo) */
.edge-yes { stroke: var(--success-solid); }
.edge-no { stroke: var(--danger-solid); }
.edge-plain { stroke: var(--border-strong); }
