  :root {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface2: #1e1e1e;
    --border: #2a2a2a;
    --text: #e8e8e8;
    --text2: #888;
    --green: #22c55e;
    --green-dim: #16a34a;
    --red: #ef4444;
    --amber: #f59e0b;
    --accent: #22c55e;
  }
  * { margin:0; padding:0; box-sizing:border-box; }
  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
  }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }

  .login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
  }
  .login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%; max-width: 360px;
  }
  .login-box h1 {
    font-size: 1.25rem; font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text);
  }
  .login-box input {
    width: 100%; padding: 0.65rem 0.8rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit; font-size: 0.9rem;
    margin-bottom: 0.75rem;
    outline: none;
  }
  .login-box input:focus { border-color: var(--accent); }
  .login-box button {
    width: 100%; padding: 0.65rem;
    background: var(--accent);
    color: #000; font-weight: 600;
    border: none; border-radius: 8px;
    cursor: pointer; font-family: inherit; font-size: 0.9rem;
    margin-top: 0.25rem;
  }
  .login-box button:hover { opacity: 0.9; }
  .error { color: var(--red); font-size: 0.85rem; margin-bottom: 0.75rem; }

  /* Layout */
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }
  .topbar h1 { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
  .topbar nav { display: flex; gap: 1.25rem; align-items: center; font-size: 0.85rem; }
  .topbar nav a { color: var(--text2); }
  .topbar nav a:hover, .topbar nav a.active { color: var(--text); text-decoration: none; }

  .container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

  /* Date nav */
  .date-nav {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.5rem;
  }
  .date-nav input[type="date"] {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.5rem 0.75rem;
    color: var(--text); font-family: inherit; font-size: 0.85rem;
  }
  .date-nav button {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.5rem 0.75rem;
    color: var(--text); cursor: pointer; font-family: inherit; font-size: 0.85rem;
  }
  .date-nav button:hover { border-color: var(--accent); }
  .date-nav .today { font-weight: 500; color: var(--text2); font-size: 0.85rem; }

  /* Cards */
  .stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem; margin-bottom: 1.5rem;
  }
  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
  }
  .stat-card .label { font-size: 0.75rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
  .stat-card .value { font-size: 1.5rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
  .stat-card .value.green { color: var(--green); }
  .stat-card .value.red { color: var(--red); }
  .stat-card .value.amber { color: var(--amber); }

  /* Table */
  .section-title {
    font-size: 0.85rem; font-weight: 600; color: var(--text2);
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
  }
  table {
    width: 100%; border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
  }
  th {
    text-align: left; padding: 0.65rem 1rem;
    font-size: 0.75rem; font-weight: 500;
    color: var(--text2); text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
  }
  td {
    padding: 0.65rem 1rem; font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
  }
  tr:last-child td { border-bottom: none; }
  .mono { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }
  .text-green { color: var(--green); }
  .text-red { color: var(--red); }
  .text-amber { color: var(--amber); }
  .text-muted { color: var(--text2); }
  .badge {
    display: inline-block; padding: 0.15rem 0.5rem;
    border-radius: 4px; font-size: 0.7rem; font-weight: 500;
  }
  .badge-green { background: #22c55e22; color: var(--green); }
  .badge-amber { background: #f59e0b22; color: var(--amber); }
  .badge-red { background: #ef444422; color: var(--red); }

  .actions { display: flex; gap: 0.5rem; }
  .actions a {
    font-size: 0.75rem; padding: 0.25rem 0.5rem;
    border: 1px solid var(--border); border-radius: 6px;
    color: var(--text2);
  }
  .actions a:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
  .actions a.delete { border-color: #ef444444; }
  .actions a.delete:hover { border-color: var(--red); color: var(--red); }

  .empty { text-align: center; padding: 2rem; color: var(--text-2); font-size: 0.85rem; }

  /* Edit form */
  .edit-form {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.5rem;
    max-width: 500px;
  }
  .edit-form label {
    display: block; font-size: 0.75rem; color: var(--text2);
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 0.25rem; margin-top: 0.75rem;
  }
  .edit-form label:first-child { margin-top: 0; }
  .edit-form input, .edit-form select {
    width: 100%; padding: 0.5rem 0.75rem;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text);
    font-family: inherit; font-size: 0.85rem;
  }
  .edit-form .btn { margin-top: 1rem; width: auto; padding: 0.5rem 1.5rem; }
  .edit-form .btn-cancel { background: var(--surface2); color: var(--text); border: 1px solid var(--border); margin-left: 0.5rem; }

  /* ════════════════════════════════════════════════════════════════════ */
  /* Verdi design tokens — handoff Claude Design 2026-05-18              */
  /* ════════════════════════════════════════════════════════════════════ */
  :root {
    --bg:        oklch(0.16 0.005 240);
    --surface:   oklch(0.20 0.006 240);
    --surface-2: oklch(0.235 0.007 240);
    --surface-3: oklch(0.27 0.008 240);
    --border:    oklch(0.30 0.008 240);
    --border-2:  oklch(0.36 0.010 240);
    --text:      oklch(0.96 0.003 240);
    --text-2:    oklch(0.72 0.008 240);
    --text-3:    oklch(0.55 0.010 240);
    --text-4:    oklch(0.42 0.008 240);
    --green:     oklch(0.72 0.18 145);
    --green-dim: oklch(0.58 0.15 145);
    --green-bg:  oklch(0.30 0.08 145);
    --amber:     oklch(0.78 0.16 75);
    --amber-dim: oklch(0.64 0.13 75);
    --amber-bg:  oklch(0.32 0.07 75);
    --red:       oklch(0.68 0.20 25);
    --red-dim:   oklch(0.56 0.16 25);
    --red-bg:    oklch(0.30 0.10 25);
    --blue:      oklch(0.72 0.14 240);
    --blue-dim:  oklch(0.58 0.12 240);
    --blue-bg:   oklch(0.30 0.07 240);
    --sans: 'DM Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --r-sm: 3px;
    --r:    5px;
    --r-lg: 8px;
    --surface2: var(--surface-2);
    --text2: var(--text-2);
    --accent: var(--green);

    /* ── Escalas (Carbon-inspired) — fim dos magic numbers ──────────────── */

    /* Spacing — padding/gap saem daqui */
    --sp-1: 2px;
    --sp-2: 4px;
    --sp-3: 8px;
    --sp-4: 12px;
    --sp-5: 16px;
    --sp-6: 24px;
    --sp-7: 32px;
    --sp-8: 40px;

    /* Type scale — snap nestes degraus (sem 11.5/12.5px) */
    --ts-3xs: 9px;  /* micro-label (eixo, lane, uppercase caption) */
    --ts-2xs: 10px; /* caption pequena */
    --ts-xs: 11px;  /* label pequena (a mais comum em telas densas) */
    --ts-1: 12px;   /* corpo de tabela */
    --ts-2: 14px;   /* corpo, título de seção */
    --ts-3: 16px;   /* valor-stat */
    --ts-4: 18px;   /* valor-KPI */
    --ts-5: 20px;   /* brand / subtítulo */
    --ts-6: 24px;   /* valor-herói pequeno */
    --ts-7: 32px;   /* valor-herói */
    --ts-8: 42px;   /* display */

    /* Motion — toda transition referencia estes, nunca 0.12s solto */
    --dur-fast:      70ms;   /* hover, micro-feedback */
    --dur-moderate: 150ms;   /* toggle, disclosure, chevron */
    --dur-slow:     400ms;   /* entrada de painel/overlay */
    --ease-standard: cubic-bezier(0.2, 0, 0.38, 0.9);  /* a→b na tela */
    --ease-entrance: cubic-bezier(0, 0, 0.38, 0.9);    /* entra na tela */
    --ease-exit:     cubic-bezier(0.2, 0, 1, 0.9);     /* sai da tela */

    /* Estados interativos — overlays neutros, não hardcodar hover por cor */
    --hover:  oklch(1 0 0 / 0.06);   /* overlay de hover sobre qualquer surface */
    --active: oklch(1 0 0 / 0.12);   /* press/clique */
    --disabled-opacity: 0.4;
    --focus-ring: var(--text);       /* anel de foco branco (padrão dark) */
  }
  body { font-family: var(--sans); font-feature-settings: 'ss01', 'cv11'; -webkit-font-smoothing: antialiased; }

  /* Primitives */
  .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
  .mono-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .tabular { font-variant-numeric: tabular-nums; }
  .k-up { color: var(--green); }
  .k-dn { color: var(--red); }
  .k-warn { color: var(--amber); }
  .k-info { color: var(--blue); }
  .muted { color: var(--text-2); }
  .dim { color: var(--text-3); }
  .faint { color: var(--text-4); }

  /* Chip */
  .chip { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px;
          font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
          background: var(--surface-3); color: var(--text-2); text-transform: uppercase; white-space: nowrap; }
  .chip.green { background: var(--green-bg); color: var(--green); }
  .chip.amber { background: var(--amber-bg); color: var(--amber); }
  .chip.red   { background: var(--red-bg);   color: var(--red); }
  .chip.blue  { background: var(--blue-bg);  color: var(--blue); }

  /* Top bar — vB-top
     padding-inline computa pra centralizar conteúdo até 1360px: piso de 24px,
     cresce em telas > 1408px pra trazer o conteúdo pro centro. Border-bottom
     fica full-width já que o padding é "fantasma" lateral. */
  .vB-top { display: flex; align-items: center;
            padding: 12px max(24px, calc((100% - 1360px) / 2));
            border-bottom: 1px solid var(--border); gap: 20px; background: var(--bg); }
  .vB-top .brand { display: flex; align-items: baseline; gap: 10px; }
  .vB-top .brand a { color: inherit; text-decoration: none; }
  .vB-top .brand a:hover { color: inherit; text-decoration: none; }
  .vB-top .brand .v { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
  .vB-top .brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; }
  .vB-top .brand .sub { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
  .vB-top .nav { display: flex; gap: 4px; margin-left: 12px; flex-wrap: wrap; }
  .vB-top .nav a { padding: 5px 10px; font-size: var(--ts-1); color: var(--text-2); border-radius: var(--r-sm);
                   text-decoration: none; }
  .vB-top .nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
  .vB-top .nav a.on { background: var(--surface-2); color: var(--text); }
  .vB-top .sp { flex: 1; }
  .vB-top .datepick { display: flex; align-items: center; gap: 8px; padding: 6px 10px;
                      border: 1px solid var(--border); border-radius: var(--r); background: var(--surface);
                      font-family: var(--mono); font-size: 12px; }
  .vB-top .datepick .arr { color: var(--text-3); padding: 0 4px; cursor: pointer; text-decoration: none;
                           transition: color var(--dur-fast) var(--ease-standard); }
  .vB-top .datepick .arr:hover { color: var(--text); text-decoration: none; }
  .vB-top .datepick .lbl { cursor: pointer; padding: 0 2px;
                           transition: color var(--dur-fast) var(--ease-standard); }
  .vB-top .datepick.has-cal .lbl:hover { color: var(--green); }

  /* DatePopover (calendário compacto) */
  .dp-pop { position: fixed; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r);
            box-shadow: 0 12px 32px oklch(0 0 0 / 0.45); padding: 10px; z-index: 300;
            font-family: var(--sans);
            animation: cbx-in var(--dur-moderate) var(--ease-entrance); }
  .dp-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 8px; }
  .dp-mo { font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: 0.02em;
           text-transform: capitalize; }
  .dp-nav { background: transparent; border: 0; color: var(--text-3); font-size: 16px;
            line-height: 1; padding: 4px 10px; border-radius: var(--r-sm); cursor: pointer;
            transition: background var(--dur-fast) var(--ease-standard); }
  .dp-nav:hover { background: var(--hover); color: var(--text); }
  .dp-wdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 0 4px;
              border-bottom: 1px solid var(--border); margin-bottom: 4px; }
  .dp-wdays span { text-align: center; font-family: var(--mono); font-size: 9px;
                   letter-spacing: 0.1em; color: var(--text-4); text-transform: uppercase; }
  .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .dp-c { background: transparent; border: 0; height: 28px; border-radius: var(--r-sm);
          font-family: var(--mono); font-size: 12px; color: var(--text-2); cursor: pointer; padding: 0;
          transition: background var(--dur-fast) var(--ease-standard),
                      color var(--dur-fast) var(--ease-standard); }
  .dp-c.empty { pointer-events: none; }
  .dp-c:not(.empty):hover { background: var(--hover); color: var(--text); }
  .dp-c.today { box-shadow: inset 0 0 0 1px var(--border-2); color: var(--text); }
  .dp-c.sel { background: var(--green); color: oklch(0.16 0.02 250); font-weight: 600; }
  .dp-c.sel:hover { background: var(--green); color: oklch(0.16 0.02 250); }
  .dp-foot { display: flex; gap: 6px; padding: 8px 0 0; margin-top: 6px;
             border-top: 1px solid var(--border); }
  .dp-shortcut { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text-2);
                 border-radius: var(--r-sm); padding: 5px 8px; font-family: var(--sans); font-size: 11px;
                 cursor: pointer; transition: border-color var(--dur-fast) var(--ease-standard),
                                              color var(--dur-fast) var(--ease-standard); }
  .dp-shortcut:hover { border-color: var(--green); color: var(--green); }
  .vB-top .user { font-family: var(--mono); font-size: 11px; color: var(--text-3); }

  /* Page body — mesma estratégia de centralização do topbar */
  .page-body { padding: 18px max(24px, calc((100% - 1360px) / 2));
               display: flex; flex-direction: column; gap: 16px; }
  .page-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 4px; }
  .page-hero-l .kicker { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
  .page-hero-l h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); }
  .page-hero-r { display: flex; gap: 24px; align-items: center; }
  .page-hero-r .stat { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
  .page-hero-r .stat .lbl { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
  .page-hero-r .stat .val { font-family: var(--mono); font-size: 16px; white-space: nowrap; color: var(--text); }

  /* Card / section head */
  .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
  .card-body { padding: 16px 20px; }
  .vB-section-h { padding: 10px 16px; border-bottom: 1px solid var(--border);
                  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
  .vB-section-h .left { display: flex; flex-direction: column; gap: 2px; }
  .vB-section-h .t { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
  .vB-section-h .b { font-size: 15px; font-weight: 600; color: var(--text); }
  .vB-section-h .meta { font-family: var(--mono); font-size: 11px; color: var(--text-3); }

  /* KPI strip */
  .vB-kpis { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface);
             border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
  .vB-kpis .k { padding: 12px 16px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
  .vB-kpis .k:last-child { border-right: none; }
  .vB-kpis .k .lbl { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
  .vB-kpis .k .val { font-family: var(--mono); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
  .vB-kpis .k .val.k-up { color: var(--green); }
  .vB-kpis .k .val.k-warn { color: var(--amber); }
  .vB-kpis .k .val.k-dn { color: var(--red); }
  .vB-kpis .k .delta { font-family: var(--mono); font-size: 10px; color: var(--text-3); }

  /* Dense table */
  .tbl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
  .tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
  .tbl th { text-align: left; font-weight: 500; font-size: 10px; letter-spacing: 0.10em;
            text-transform: uppercase; color: var(--text-3);
            padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
  .tbl td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--surface-2);
            vertical-align: middle; color: var(--text); }
  .tbl tr:last-child td { border-bottom: none; }
  .tbl tr:hover td { background: var(--surface-2); }
  .tbl .num, .tbl td.r, .tbl th.r { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
  .tbl td.c, .tbl th.c { text-align: center; }
  .tbl td.p { font-family: var(--sans); font-weight: 500; }

  /* Icons (Tabler sprite) + Brand marks — primitiva única; herda currentColor.
     fill/stroke ficam no <symbol> (CSS não cruza o <use>, shadow DOM). */
  .icon { display: inline-grid; place-items: center; width: 16px; height: 16px;
          flex: none; color: inherit; vertical-align: -3px; }
  .icon svg { width: 100%; height: 100%; display: block; }
  .icon.s14 { width: 14px; height: 14px; }
  .icon.s18 { width: 18px; height: 18px; }
  .icon.s20 { width: 20px; height: 20px; }
  .brand-mark { display: inline-grid; place-items: center; width: 16px; height: 16px;
                flex: none; vertical-align: -3px; }
  .brand-mark svg { width: 100%; height: 100%; display: block; }

  /* Buttons */
  .btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; width: auto; margin-top: 0;
         background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r);
         color: var(--text); font-family: var(--sans); font-size: var(--ts-1); font-weight: 500; cursor: pointer;
         text-decoration: none; transition: background var(--dur-fast), border-color var(--dur-fast); white-space: nowrap; }
  .btn:hover { background: var(--surface-3); border-color: var(--text-4); text-decoration: none; }
  .btn-primary { background: var(--green); border-color: var(--green); color: oklch(0.18 0.02 145); }
  .btn-primary:hover { background: var(--green); border-color: var(--green); opacity: 0.9; color: oklch(0.18 0.02 145); }
  .btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
  .btn-ghost:hover { color: var(--text); background: var(--surface-2); }
  .btn-sm { padding: 3px 8px; font-size: var(--ts-1); }

  /* Inputs */
  .input { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r);
           padding: 6px 10px; color: var(--text); font-family: var(--sans); font-size: var(--ts-1);
           font-variant-numeric: tabular-nums; outline: none; transition: border-color var(--dur-fast); }
  .input:focus { border-color: var(--green); }
  .input.mono { font-family: var(--mono); }
  label.fld { display: flex; flex-direction: column; gap: 6px; }
  label.fld .l { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }

  /* Empty state */
  .empty-v2 { text-align: center; padding: 32px; color: var(--text-3); font-size: 13px; }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

  /* Painel hero (variant-b) */
  .vB-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
  .vB-hero-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
                  padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
  .vB-hero-main .lbl { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
  .vB-hero-main .big { font-family: var(--mono); font-size: 56px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
  .vB-hero-main .big.up { color: var(--green); }
  .vB-hero-main .big.dn { color: var(--red); }
  .vB-hero-main .meta { display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
  .vB-hero-main .meta .b { color: var(--text); }
  .vB-hero-main .meta .div { color: var(--text-4); }
  .vB-hero-main .sparkrow { margin-top: 6px; }
  .vB-hero-main .sparkrow .axis { display: flex; justify-content: space-between;
                                  font-family: var(--mono); font-size: 10px; color: var(--text-4); margin-top: 4px; }
  .vB-month { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
              padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
  .vB-month .h { display: flex; justify-content: space-between; align-items: baseline; }
  .vB-month .h .t { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
  .vB-month .h .m { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
  .vB-month .row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--surface-2); }
  .vB-month .row:last-of-type { border-bottom: none; }
  .vB-month .row .k { font-size: 12px; color: var(--text-2); }
  .vB-month .row .v { font-family: var(--mono); font-size: 14px; color: var(--text); }
  .vB-month .bar { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; border-top: 1px solid var(--surface-2); }
  .vB-month .bar .lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }
  .vB-month .bar .lbl .v { font-family: var(--mono); color: var(--text); }
  .vB-month .bar-track { position: relative; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
  .vB-month .bar-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--green); border-radius: 3px; }
  .vB-month .bar-proj { position: absolute; top: 0; left: 0; height: 100%; background: var(--green-bg); border-radius: 3px; opacity: 0.7; }
  .vB-month .bar-marker { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text); }

  /* CEASA opportunity strip */
  .vB-ceasa { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
  .vB-ceasa-h { padding: 14px 20px; display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
  .vB-ceasa-h .t { display: flex; align-items: baseline; gap: 12px; }
  .vB-ceasa-h .t .lbl { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
  .vB-ceasa-h .t .b { font-size: 15px; font-weight: 600; color: var(--text); }
  .vB-ceasa-h .meta { font-family: var(--mono); font-size: 11px; color: var(--text-3); display: flex; gap: 14px; flex-wrap: wrap; }
  .vB-ceasa-h .meta .pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
                            background: var(--surface-2); border-radius: 99px; }
  .vB-ceasa-h .meta .pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
  .vB-ceasa-grid { display: grid; grid-template-columns: repeat(6, 1fr); }
  .vB-ceasa-grid .tile { padding: 14px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .vB-ceasa-grid .tile:nth-child(6n) { border-right: none; }
  .vB-ceasa-grid .tile:nth-last-child(-n+6) { border-bottom: none; }
  .vB-ceasa-grid .tile .p { font-size: 12px; font-weight: 500; color: var(--text); }
  .vB-ceasa-grid .tile .row { display: flex; justify-content: space-between; align-items: baseline;
                              font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 6px; }
  .vB-ceasa-grid .tile .row .v { color: var(--text); }
  .vB-ceasa-grid .tile .diff { margin-top: 8px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
  .vB-ceasa-grid .tile.warn .diff { color: var(--amber); }
  .vB-ceasa-grid .tile.good .diff { color: var(--green); }
  .vB-ceasa-grid .tile.neutral .diff { color: var(--text-2); }
  .vB-ceasa-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

  /* Painel two-col bottom */
  .vB-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
  .vB-margem { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
  .vB-mtbl { width: 100%; border-collapse: separate; border-spacing: 0; }
  .vB-mtbl th { text-align: left; font-size: 10px; font-weight: 500; letter-spacing: 0.10em;
                text-transform: uppercase; color: var(--text-3);
                padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
  .vB-mtbl td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--surface-2);
                font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
  .vB-mtbl td.p { font-family: var(--sans); font-weight: 500; }
  .vB-mtbl td.r, .vB-mtbl th.r { text-align: right; }
  .vB-mtbl td.c, .vB-mtbl th.c { text-align: center; }
  .vB-mtbl tr:hover td { background: var(--surface-2); }
  .vB-mtbl tr:last-child td { border-bottom: none; }

  .vB-side { display: flex; flex-direction: column; gap: 16px; }
  .vB-side .alerts { display: flex; flex-direction: column; }
  .vB-side .alert { padding: 12px 20px; display: flex; gap: 10px; border-bottom: 1px solid var(--surface-2); align-items: flex-start; }
  .vB-side .alert:last-child { border-bottom: none; }
  .vB-side .alert .ic { width: 4px; height: 28px; border-radius: 2px; flex-shrink: 0; margin-top: 2px; }
  .vB-side .alert.opp .ic { background: var(--amber); }
  .vB-side .alert.warn .ic { background: var(--red); }
  .vB-side .alert.info .ic { background: var(--blue); }
  .vB-side .alert .txt { font-size: 12px; color: var(--text-2); line-height: 1.5; }
  .vB-side .alert .txt strong { color: var(--text); font-weight: 500; }
  .vB-side .ps-big { font-family: var(--mono); font-size: 28px; color: var(--red); letter-spacing: -0.01em; }
  .vB-side .ps-meta { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 4px; }
  .vB-side .qline { display: flex; gap: 6px; align-items: center; margin-top: 14px; padding-top: 12px;
                    border-top: 1px solid var(--surface-2); }
  .vB-side .qline .seg { flex: 1; height: 26px; border-radius: 3px; background: var(--surface-2);
                         position: relative; overflow: hidden; }
  .vB-side .qline .seg.fill { background: var(--red-bg); }
  .vB-side .qline .seg.paid { background: var(--green-bg); }
  .vB-side .qline .seg .lbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
                              font-family: var(--mono); font-size: 10px; color: var(--text); }
  .vB-side .compras-mini { display: flex; flex-direction: column; }
  .vB-side .compras-mini .row { display: grid; grid-template-columns: 1fr auto; padding: 8px 20px;
                                border-bottom: 1px solid var(--surface-2); font-size: 12px; align-items: baseline; }
  .vB-side .compras-mini .row:last-child { border-bottom: none; }
  .vB-side .compras-mini .row .p { color: var(--text); }
  .vB-side .compras-mini .row .p .meta { color: var(--text-3); font-family: var(--mono); font-size: 10px; margin-left: 6px; }
  .vB-side .compras-mini .row .v { font-family: var(--mono); color: var(--text); }

  /* Painel de conciliação */
  .vB-concil { border-color: var(--amber) !important; }
  .concil-sub { padding: 8px 16px 4px; font-size: 10px; letter-spacing: 0.12em;
                text-transform: uppercase; color: var(--text-3); font-weight: 600; }
  .concil-acts { display: flex; gap: 6px; align-items: center; padding: 6px 14px 6px 0; flex-wrap: wrap; }
  .concil-acts .btn { display: inline-flex; }

  /* ALIASES page */
  .al-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; padding: 16px 20px; }
  .al-del { background: transparent; border: none; color: var(--text-4); font-family: var(--mono);
            font-size: 13px; cursor: pointer; padding: 2px 6px; border-radius: var(--r-sm); }
  .al-del:hover { color: var(--red); background: var(--red-bg); }
  .al-arrow { color: var(--text-3); font-family: var(--mono); font-size: 12px; }

  /* Conciliação — input fornecedor inline (estilo do protótipo) */
  .concil-forn { display: inline-flex; align-items: center; gap: 6px; }
  .concil-forn input { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r);
                       padding: 4px 8px; color: var(--text); font-family: var(--sans); font-size: 12px;
                       width: 140px; outline: none; transition: border-color var(--dur-fast); }
  .concil-forn input:focus { border-color: var(--green); }

  /* Pendências — input fornecedor inline editável (ghost) */
  .pd-forn-input { background: transparent; border: 1px solid transparent; border-radius: var(--r-sm);
                   padding: 4px 8px; color: var(--text); font-family: var(--sans); font-size: 12px;
                   outline: none; width: 140px; transition: background var(--dur-fast), border-color var(--dur-fast); }
  .pd-forn-input:hover { background: var(--surface-2); border-color: var(--border); }
  .pd-forn-input:focus { background: var(--surface-2); border-color: var(--green); }

  /* Nova Venda — badge .nv-src-badge .nv-src-xml/.nv-src-llm já existe scoped na NOVA_VENDA_PAGE
     (versão com border color-mix mais sofisticada que o protótipo simples). Mantida. */

  /* ── Mega-menu (handoff 24/05/2026) ──────────────────────────────────── */
  /* Dropdown via CSS :hover nos grupos Dia/Análise/Gestão. O + Novo usa JS toggle. */
  .vB-top .nav { gap: 4px; }
  .nav-group { position: relative; }
  .nav-cat { padding: 7px 12px; font-size: 13px; color: var(--text-2); border-radius: var(--r-sm);
             cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
             transition: color var(--dur-fast), background var(--dur-fast); user-select: none; }
  .nav-cat:hover { color: var(--text); background: var(--surface-2); }
  .nav-cat.on { color: var(--text); }
  .nav-caret { font-size: 8px; color: var(--text-4); }
  .nav-icon { font-size: 11px; opacity: 0.6; }

  .nav-mega { display: none; position: absolute; top: calc(100% + 8px); left: 50%;
              transform: translateX(-50%); z-index: 100;
              background: var(--surface); border: 1px solid var(--border-2);
              border-radius: var(--r-lg); box-shadow: 0 12px 40px oklch(0 0 0 / 0.5);
              gap: 1px; padding: 6px; min-width: 280px; }
  .nav-group:hover .nav-mega { display: flex; }
  /* Hover area cobre o gap entre trigger e dropdown */
  .nav-group::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
  .nav-mega-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px;
                   border-radius: var(--r); text-decoration: none; flex: 1; min-width: 130px;
                   transition: background var(--dur-fast); }
  .nav-mega-card:hover { background: var(--surface-2); text-decoration: none; }
  .nav-mega-card.active { background: var(--surface-2); }
  .nav-mega-title { font-size: 13px; font-weight: 600; color: var(--text); }
  .nav-mega-card.active .nav-mega-title { color: var(--green); }
  .nav-mega-desc { font-size: 11px; color: var(--text-3); line-height: 1.4; }

  /* + Novo dropdown (toggle JS) */
  .novo-wrap { position: relative; }
  .novo-dropdown { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 100;
                   background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r);
                   box-shadow: 0 8px 24px oklch(0 0 0 / 0.4); min-width: 160px; overflow: hidden; }
  .novo-dropdown.open { display: block; }
  .novo-dropdown a { display: block; padding: 8px 14px; font-size: var(--ts-1); color: var(--text-2);
                     text-decoration: none; transition: background var(--dur-fast); }
  .novo-dropdown a:hover { background: var(--surface-2); color: var(--text); }
  .novo-dropdown a.on { color: var(--green); }

  /* Foco de teclado (a11y) — só no foco por teclado, não no mouse.
     Inputs mantêm a borda própria que já têm. */
  :focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: var(--r-sm);
  }
  .input:focus-visible,
  input:focus-visible,
  textarea:focus-visible { outline: none; }

  /* ── Combobox / Select (NUNCA usar <select>/<datalist> nativo) ── */
  .cbx { position: relative; width: 100%; }
  .cbx .cbx-input { width: 100%; background: var(--surface-2); border: 1px solid var(--border-2);
                    border-radius: var(--r); padding: 6px 26px 6px 10px; color: var(--text);
                    font-family: var(--sans); font-size: 13px; outline: none; cursor: text;
                    transition: border-color var(--dur-moderate, 150ms) ease; }
  .cbx .cbx-input.mono { font-family: var(--mono); }
  .cbx .cbx-input[readonly] { cursor: pointer; }
  .cbx .cbx-input:focus { border-color: var(--green); }
  .cbx .cbx-input::placeholder { color: var(--text-4); }
  .cbx .cbx-caret { position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
                    pointer-events: none; color: var(--text-3); font-size: 9px;
                    transition: transform var(--dur-moderate, 150ms) ease; }
  .cbx.open .cbx-caret { transform: translateY(-50%) rotate(180deg); }

  .cbx-panel { position: fixed; z-index: 300; background: var(--surface);
               border: 1px solid var(--border-2); border-radius: var(--r);
               box-shadow: 0 12px 32px oklch(0 0 0 / 0.45); overflow-y: auto; padding: 4px; }
  .cbx-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px;
             padding: 7px 10px; border-radius: var(--r-sm); font-family: var(--sans);
             font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
  .cbx-opt.mono { font-family: var(--mono); }
  .cbx-opt:hover, .cbx-opt.active { background: var(--hover, oklch(1 0 0 / 0.06)); color: var(--text); }
  .cbx-opt.sel { color: var(--green); }
  .cbx-opt .tick { font-size: 11px; color: var(--green); opacity: 0; }
  .cbx-opt.sel .tick { opacity: 1; }
  .cbx-empty { padding: 12px 10px; font-size: 12px; color: var(--text-4); text-align: center; }

  /* ── Estados de dado: loading / erro / vazio (primitivas) ──────────────────
     Todo container que busca dado (KPI, tabela, card) declara os 4 estados:
     loading (skeleton) · erro · vazio · carregado. Ver DESIGN.md §4. */

  /* Skeleton — bloco surface-2 com brilho que varre. Sóbrio: só luminância, sem cor. */
  .skeleton { position: relative; overflow: hidden; background: var(--surface-2);
              border-radius: var(--r-sm); }
  .skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
                     background: linear-gradient(90deg, transparent, var(--hover) 45%,
                                 var(--hover) 55%, transparent);
                     animation: sk-sweep 1.4s var(--ease-standard, ease) infinite; }
  @keyframes sk-sweep { 100% { transform: translateX(100%); } }
  .sk-bar { height: 11px; border-radius: var(--r-sm); }  /* largura inline (uma por campo) */

  /* State message — erro/vazio. Bloco centrado, sóbrio, SEM ilustração/emoji.
     Erro = vermelho só no contorno + texto (nunca preenchido — DESIGN.md §2). */
  .state-msg { display: flex; flex-direction: column; align-items: center; gap: 10px;
               padding: 30px 20px; text-align: center; }
  .state-msg .ic { width: 24px; height: 24px; border-radius: 50%; display: grid;
                   place-items: center; font-family: var(--mono); font-size: 13px;
                   font-weight: 600; line-height: 1; flex: none;
                   padding: 0; box-sizing: border-box; }
  .state-msg .ic.err   { border: 1.5px solid var(--red-dim); color: var(--red); }
  .state-msg .ttl { font-size: 13px; font-weight: 600; color: var(--text-2); }
  .state-msg .sub { font-size: 12px; color: var(--text-4); max-width: 40ch; line-height: 1.5;
                    font-family: var(--mono); letter-spacing: 0.01em; }

  /* Botão loading — spinner no lugar do label; vira disabled durante a ação assíncrona. */
  .btn[data-loading] { color: transparent; pointer-events: none; position: relative; }
  .btn[data-loading]::after { content: ""; position: absolute; inset: 0; margin: auto;
                              width: 13px; height: 13px; border-radius: 50%;
                              border: 1.5px solid oklch(0.18 0.02 145 / 0.35);
                              border-top-color: oklch(0.18 0.02 145);
                              animation: spin 0.7s linear infinite; }
  .btn:not(.btn-primary)[data-loading]::after { border-color: var(--border-2);
                              border-top-color: var(--text); }
  @keyframes spin { 100% { transform: rotate(360deg); } }
  .btn:disabled, .btn.is-disabled { opacity: var(--disabled-opacity); pointer-events: none; }

  /* Input error — borda vermelha + helper. Vermelho de sinal, não preenchido. */
  .input.err { border-color: var(--red-dim); }
  .input.err:focus { border-color: var(--red); }
  .fld-err { font-size: 11px; color: var(--red); font-family: var(--mono); letter-spacing: 0.01em; }

  /* ── A11y: reduced-motion (global) ───────────────────────────────────────
     Respeita quem pediu menos animação. Decorativas (skeleton-sweep) saem;
     funcionais (spinner) ficam lentas. Toda animação NOVA passa por aqui. */
  @media (prefers-reduced-motion: reduce) {
    .skeleton::after { animation: none; }
    .skeleton { animation: sk-pulse 1.8s ease-in-out infinite; }
    .btn[data-loading]::after { animation-duration: 1.6s; }
  }
  @keyframes sk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

  /* ── A11y: alvos de toque ≥44px em telas de toque (pointer: coarse) ───────
     Só afeta touch — não incha o desktop denso. */
  @media (pointer: coarse) {
    .btn, .nav-cat, .novo-dropdown a, .cbx-opt, .dp-c, .dp-shortcut { min-height: 44px; }
    .btn, .cbx-opt, .dp-shortcut, .novo-dropdown a { display: inline-flex; align-items: center; }
  }

  /* ── Forms inline (ações destrutivas via POST, não GET) ───────────────────
     Antes: <a href=/delete onclick=confirm> — frágil (preload, copy-link).
     Agora: <form method=POST style=inline> + <button> que parece link/×.
     .btn-x = reset de botão com look de "×" pequeno.
     Sempre acompanhe de onsubmit="return confirm(...)". */
  form.inline { display: inline; margin: 0; padding: 0; }
  .btn-x { background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
           color: var(--red); font: inherit; font-size: var(--ts-xs);
           text-decoration: none; line-height: 1; }
  .btn-x:hover { opacity: 0.85; }
  .btn-x.dim { color: var(--text-3); }
  .btn-x.dim:hover { color: var(--red); opacity: 1; }
