/* Desafogai Logística — design system
   Layout: sidebar de marca (azul) + área de trabalho clara; densidade de painel operacional.
   Tokens: todas as cores são variáveis; o White Label reescreve --brand*, --accent* e o nome. */
:root {
  /* marca */
  --brand: #0131CD;
  --brand-hover: #0128AB;
  --brand-press: #011F87;
  --brand-ink: #FFFFFF;
  --brand-soft: #EAF0FF;
  --brand-soft-2: #D6E1FF;
  --brand-text: #0131CD;
  --accent: #B9FC01;
  --accent-ink: #13200A;
  --accent-soft: #F1FFD0;
  --nav-bg: #0131CD;
  --nav-ink: rgba(255,255,255,.78);
  --nav-ink-strong: #FFFFFF;
  --nav-hover: rgba(255,255,255,.09);
  --nav-active: rgba(255,255,255,.15);
  --nav-label: rgba(255,255,255,.55);

  /* neutros com leve viés azul */
  --bg: #F3F5FA;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --surface-3: #EEF1F8;
  --line: #E1E6F0;
  --line-strong: #CBD3E3;
  --ink: #0C1430;
  --ink-2: #39435F;
  --ink-3: #626C8A;
  --ink-4: #8B94AE;

  /* semânticas */
  --ok: #0B7A43;      --ok-bg: #E4F5EC;   --ok-line: #A8DDBF;
  --warn: #A44C06;    --warn-bg: #FDF1E1; --warn-line: #F3C98F;
  --err: #BE1E2D;     --err-bg: #FCEBEC;  --err-line: #F2B3B8;
  --sos: #D9123F;
  --info: #0A5FA3;    --info-bg: #E5F1FB; --info-line: #A9CFEE;
  --neutral-bg: #EEF0F5;

  /* mapa */
  --map-land: #EDF1F8;
  --map-region: #E2E8F4;
  --map-region-line: #C9D3E6;
  --map-sea: #DCE7FA;
  --map-road: #FFFFFF;
  --map-label: #6A7593;

  /* tipografia */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-brand: "Plus Jakarta Sans", "Inter", "Helvetica Neue", Arial, sans-serif;
  --t-xs: 12px; --t-sm: 13px; --t-md: 14px; --t-lg: 16px; --t-xl: 19px; --t-2xl: 23px; --t-3xl: 28px;

  /* forma */
  --r-xs: 5px; --r-sm: 7px; --r: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(12,20,48,.06);
  --shadow-pop: 0 18px 40px -12px rgba(1,23,95,.28), 0 3px 8px rgba(1,23,95,.08);
  --shadow-drawer: -24px 0 48px -24px rgba(1,23,95,.32);
  --focus: 0 0 0 3px rgba(1,49,205,.28);

  /* movimento (Emil Kowalski / Apple) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --d-fast: 140ms; --d: 200ms; --d-slow: 320ms;

  --sidebar-w: 248px;
  --topbar-h: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #2F5BF0; --brand-hover: #4069F2; --brand-press: #2249D6; --brand-soft: #1A2140; --brand-soft-2: #223060; --brand-text: #93ADFF;
    --accent-soft: #23310A; --accent-ink: #13200A;
    --nav-bg: #0A2499; --nav-hover: rgba(255,255,255,.07); --nav-active: rgba(255,255,255,.12);
    --bg: #0F1114; --surface: #16181D; --surface-2: #1B1E24; --surface-3: #22262E; --line: #2A2F38; --line-strong: #3A404B;
    --ink: #ECEEF2; --ink-2: #C3C8D1; --ink-3: #959CA8; --ink-4: #6F7682;
    --ok: #4ADE95; --ok-bg: rgba(74,222,149,.12); --ok-line: rgba(74,222,149,.35);
    --warn: #FBB560; --warn-bg: rgba(251,181,96,.12); --warn-line: rgba(251,181,96,.35);
    --err: #FF8A94; --err-bg: rgba(255,138,148,.12); --err-line: rgba(255,138,148,.35);
    --sos: #FF4D6D; --info: #7CC0F5; --info-bg: rgba(124,192,245,.12); --info-line: rgba(124,192,245,.35); --neutral-bg: #22262E;
    --map-land: #17191E; --map-region: #1F2228; --map-region-line: #2E333C; --map-sea: #142538; --map-road: #262A32; --map-label: #A3A9B4;
    --shadow-pop: 0 18px 40px -12px rgba(0,0,0,.6), 0 3px 8px rgba(0,0,0,.3);
    --focus: 0 0 0 3px rgba(147,173,255,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #2F5BF0; --brand-hover: #4069F2; --brand-press: #2249D6; --brand-soft: #1A2140; --brand-soft-2: #223060; --brand-text: #93ADFF;
  --accent-soft: #23310A; --accent-ink: #13200A;
  --nav-bg: #0A2499; --nav-hover: rgba(255,255,255,.07); --nav-active: rgba(255,255,255,.12);
  --bg: #0F1114; --surface: #16181D; --surface-2: #1B1E24; --surface-3: #22262E; --line: #2A2F38; --line-strong: #3A404B;
  --ink: #ECEEF2; --ink-2: #C3C8D1; --ink-3: #959CA8; --ink-4: #6F7682;
  --ok: #4ADE95; --ok-bg: rgba(74,222,149,.12); --ok-line: rgba(74,222,149,.35);
  --warn: #FBB560; --warn-bg: rgba(251,181,96,.12); --warn-line: rgba(251,181,96,.35);
  --err: #FF8A94; --err-bg: rgba(255,138,148,.12); --err-line: rgba(255,138,148,.35);
  --sos: #FF4D6D; --info: #7CC0F5; --info-bg: rgba(124,192,245,.12); --info-line: rgba(124,192,245,.35); --neutral-bg: #22262E;
  --map-land: #17191E; --map-region: #1F2228; --map-region-line: #2E333C; --map-sea: #142538; --map-road: #262A32; --map-label: #A3A9B4;
  --shadow-pop: 0 18px 40px -12px rgba(0,0,0,.6), 0 3px 8px rgba(0,0,0,.3);
  --focus: 0 0 0 3px rgba(147,173,255,.4);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: var(--t-md); line-height: 1.45;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--brand-soft-2); color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font-brand); margin: 0; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--t-2xl); font-weight: 750; }
h2 { font-size: var(--t-xl); font-weight: 700; }
h3 { font-size: var(--t-lg); font-weight: 700; }
h4 { font-size: var(--t-md); font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-text); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: var(--r); box-shadow: var(--shadow-pop); }
.skip:focus { top: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--nav-bg); color: var(--nav-ink);
  display: flex; flex-direction: column; z-index: 30;
}
.sb-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; min-height: 64px; }
.sb-logo { height: 26px; width: auto; display: block; }
.sb-wordmark { font-family: var(--font-brand); font-weight: 800; font-size: 21px; color: #fff; letter-spacing: -0.03em; }
.sb-wordmark b { color: var(--accent); font-weight: 800; }
.sb-tenant {
  margin: 4px 12px 8px; padding: 10px 12px; border-radius: var(--r); background: rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px; color: #fff; border: 0; text-align: left; width: calc(100% - 24px);
}
.sb-tenant .av { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-family: var(--font-brand); font-size: 13px; }
.sb-tenant small { display: block; color: var(--nav-label); font-size: 11.5px; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; scrollbar-color: rgba(255,255,255,.2) transparent; }
.sb-group { margin-top: 10px; }
.sb-group-btn {
  display: flex; width: 100%; align-items: center; justify-content: space-between; background: none; border: 0;
  color: var(--nav-label); font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: var(--r-sm); letter-spacing: .01em;
}
.sb-group-btn svg { transition: transform var(--d) var(--ease-out); }
.sb-group[data-closed] .sb-group-btn svg { transform: rotate(-90deg); }
.sb-group[data-closed] .sb-items { display: none; }
.sb-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--nav-ink);
  text-decoration: none; font-size: 13.5px; font-weight: 500; position: relative; min-height: 36px;
  transition: background-color var(--d-fast) ease, color var(--d-fast) ease;
}
.sb-item:hover { background: var(--nav-hover); color: var(--nav-ink-strong); }
.sb-item[aria-current="page"] { background: var(--nav-active); color: #fff; font-weight: 600; }
.sb-item[aria-current="page"] svg { color: var(--accent); }
.sb-item .count { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-full); background: rgba(255,255,255,.14); color: #fff; font-variant-numeric: tabular-nums; }
.sb-item .count.hot { background: var(--accent); color: var(--accent-ink); }
.sb-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 6px; }
.sb-foot .sb-item { font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h); background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.tb-menu { display: none; }
.tb-search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); min-width: 0; width: min(380px, 40vw); text-align: left;
}
.tb-search span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-search kbd { font-family: var(--font-ui); font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.tb-spacer { flex: 1; }
.sim-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 10px; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); white-space: nowrap;
}
.sim-chip .clock { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; flex: none; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: ping 2.4s var(--ease-out) infinite; }
.pulse.off { background: var(--ink-4); }
.pulse.off::after { display: none; }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r); border: 1px solid transparent;
  background: transparent; color: var(--ink-2); position: relative; flex: none;
  transition: background-color var(--d-fast) ease, transform 120ms var(--ease-out);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--sos); box-shadow: 0 0 0 2px var(--surface); }
.sim-chip .icon-btn { width: 24px; height: 24px; border-radius: 50%; }
.sim-chip .icon-btn svg { width: 13px; height: 13px; }
.profile-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); }
.profile-btn .av { width: 28px; height: 28px; }

.content { padding: 22px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); max-width: 1480px; width: 100%; margin: 0 auto; }
.view-enter { animation: viewIn 220ms var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; font-size: var(--t-md); max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background-color var(--d-fast) ease, border-color var(--d-fast) ease, transform 120ms var(--ease-out), box-shadow var(--d-fast) ease;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.primary:active { background: var(--brand-press); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { filter: brightness(.96); }
.btn.danger { background: var(--sos); border-color: var(--sos); color: #fff; }
.btn.danger:hover { filter: brightness(.94); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-text); }
.btn.soft:hover { background: var(--brand-soft-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: var(--r-lg); }
.btn.xl { height: 56px; padding: 0 22px; font-size: 16.5px; border-radius: 16px; font-weight: 700; }
.btn.block { width: 100%; }
.btn .spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-text); font-weight: 600; font-size: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color var(--d-fast) ease; }
.link-btn:hover { text-decoration-color: currentColor; }

.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: var(--r); }
.g-inbox { grid-template-columns: 320px minmax(0, 1fr); }
.seg button { height: 30px; padding: 0 12px; border: 0; background: transparent; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; transition: background-color var(--d-fast) ease, color var(--d-fast) ease; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- superfícies ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 15px; }
.panel-head .hint { color: var(--ink-3); font-size: 12.5px; }
.panel-body { padding: 0 16px 16px; }
.panel-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 340px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* faixa de indicadores: uma régua, não cartões soltos */
.kpis { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi { padding: 14px 16px 15px; border-right: 1px solid var(--line); text-align: left; background: none; border-top: 0; border-bottom: 0; border-left: 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: background-color var(--d-fast) ease; }
.kpis .kpi:last-child { border-right: 0; }
button.kpi:hover, a.kpi:hover { background: var(--surface-2); }
.kpi .k-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-val { font-family: var(--font-brand); font-size: 25px; font-weight: 750; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--ink); white-space: nowrap; }
.kpi .k-val.sm { font-size: 20px; }
.kpi .k-foot { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.alert .k-val { color: var(--err); }
.kpi.warn .k-val { color: var(--warn); }
.kpi.good .k-val { color: var(--ok); }
.delta-up { color: var(--ok); font-weight: 600; }
.delta-down { color: var(--err); font-weight: 600; }

/* badges e chips */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--ink-2); line-height: 1; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-text); }
.badge.lime { background: var(--accent); color: var(--accent-ink); }
.badge.sim { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-3); }
.badge.sim::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: background-color var(--d-fast) ease, border-color var(--d-fast) ease, color var(--d-fast) ease; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip .n { font-variant-numeric: tabular-nums; opacity: .75; }

.sev { display: inline-flex; width: 8px; height: 8px; border-radius: 2px; flex: none; }
.sev.critica { background: var(--sos); }
.sev.alta { background: var(--err); opacity: .75; }
.sev.media { background: var(--warn); }
.sev.baixa { background: var(--ink-4); }

/* avatar */
.av { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; font-family: var(--font-brand); letter-spacing: .01em; }
.av.lg { width: 56px; height: 56px; font-size: 19px; }
.av.sm { width: 26px; height: 26px; font-size: 10.5px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .nm { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .meta { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.t tbody tr { transition: background-color var(--d-fast) ease; }
.t tbody tr[data-act]:hover { background: var(--surface-2); cursor: pointer; }
.t tbody tr.hl { background: color-mix(in srgb, var(--warn-bg) 55%, transparent); }
.t tfoot td { font-weight: 700; border-top: 1px solid var(--line-strong); padding: 10px 12px; }
.panel > .table-wrap .t th:first-child { padding-left: 16px; }
.panel > .table-wrap .t td:first-child { padding-left: 16px; }
.panel > .table-wrap .t th:last-child, .panel > .table-wrap .t td:last-child { padding-right: 16px; }
.panel > .table-wrap { border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* listas */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; color: inherit; text-decoration: none; transition: background-color var(--d-fast) ease; }
.li:first-child { border-top: 0; }
button.li:hover, a.li:hover { background: var(--surface-2); }
.li .li-main { flex: 1; min-width: 0; }
.li .li-title, .li .li-sub { display: block; }
.li .li-title { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.li .li-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.li .li-end { display: flex; align-items: center; gap: 8px; flex: none; color: var(--ink-3); font-size: 12.5px; }

/* alertas */
.alert-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%; color: inherit; transition: background-color var(--d-fast) ease; }
.alert-row:first-child { border-top: 0; }
.alert-row:hover { background: var(--surface-2); }
.alert-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.alert-ic.critica { background: var(--err-bg); color: var(--sos); }
.alert-ic.alta { background: var(--warn-bg); color: var(--warn); }
.alert-ic.media { background: var(--info-bg); color: var(--info); }
.alert-ic.baixa { background: var(--neutral-bg); color: var(--ink-3); }
.alert-row .at { font-weight: 600; }
.alert-row .as { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }

.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--info-bg); color: var(--ink); border: 1px solid var(--info-line); align-items: flex-start; }
.callout svg { color: var(--info); margin-top: 1px; }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.callout.warn svg { color: var(--warn); }
.callout.err { background: var(--err-bg); border-color: var(--err-line); }
.callout.err svg { color: var(--err); }
.callout.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.callout.ok svg { color: var(--ok); }
.callout.brand { background: var(--brand-soft); border-color: var(--brand-soft-2); }
.callout.brand svg { color: var(--brand-text); }
.callout .c-title { font-weight: 650; }
.callout .c-body { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--ink-3); }
.field .err-msg { font-size: 12px; color: var(--err); font-weight: 500; }
.input, select.input, textarea.input {
  height: 38px; padding: 0 11px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  width: 100%; min-width: 0; transition: border-color var(--d-fast) ease, box-shadow var(--d-fast) ease;
}
textarea.input { height: auto; min-height: 84px; padding: 10px 11px; resize: vertical; line-height: 1.45; }
.input:hover { border-color: var(--ink-4); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--err); }
.input::placeholder { color: var(--ink-4); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 1px; flex: none; }
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; transition: background-color var(--d) var(--ease-out); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--d) var(--ease-out); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }
input[type="range"] { accent-color: var(--brand); width: 100%; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgba(5,12,40,.36); z-index: 60; opacity: 0; transition: opacity 260ms var(--ease-out); }
.scrim.on { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); background: var(--surface); z-index: 61; box-shadow: var(--shadow-drawer);
  display: flex; flex-direction: column; transform: translateX(104%); transition: transform 340ms var(--ease-drawer);
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.drawer.wide { width: min(760px, 100vw); }
.drawer.on { transform: none; }
.drawer-head { padding: 16px 18px 12px; display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.drawer-head .dh-main { flex: 1; min-width: 0; }
.drawer-head .dh-sub { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
.drawer-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface); }
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.modal {
  width: min(520px, 100%); max-height: calc(100dvh - 32px); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; pointer-events: auto; opacity: 0; transform: scale(.96) translateY(6px);
  transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out); overflow: hidden;
}
.modal.wide { width: min(760px, 100%); }
.modal.on { opacity: 1; transform: none; }
.modal .m-head { padding: 18px 20px 6px; display: flex; gap: 12px; align-items: flex-start; }
.modal .m-head > div { flex: 1; }
.modal .m-body { padding: 8px 20px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal .m-foot { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); }
.palette { width: min(620px, 100%); align-self: start; margin-top: 10vh; transition: none; transform: none; opacity: 1; }
.palette .p-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette .p-input input { flex: 1; border: 0; background: transparent; font-size: 16px; outline: none; color: var(--ink); min-width: 0; }
.palette .p-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette .p-group { font-size: 11.5px; color: var(--ink-3); font-weight: 600; padding: 8px 10px 4px; }
.palette .p-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); width: 100%; border: 0; background: none; text-align: left; color: var(--ink); }
.palette .p-item[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-text); }
.palette .p-item .p-meta { margin-left: auto; font-size: 12px; color: var(--ink-3); }

.toasts { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100vw - 32px)); }
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: var(--r-lg); background: var(--ink); color: var(--surface);
  box-shadow: var(--shadow-pop); font-size: 13.5px; width: 100%; opacity: 0; transform: translateY(12px) scale(.98);
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out);
}
.toast.on { opacity: 1; transform: none; }
.toast .t-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }
.toast .t-ic svg { width: 14px; height: 14px; stroke-width: 2.4; }
.toast.err .t-ic { background: var(--sos); color: #fff; }
.toast .t-act { margin-left: auto; color: var(--accent); background: none; border: 0; font-weight: 700; padding: 4px; }

.menu { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 6px; min-width: 240px; opacity: 0; transform: scale(.97); transition: opacity 150ms var(--ease-out), transform 180ms var(--ease-out); }
.menu.on { opacity: 1; transform: none; }
.menu .m-label { font-size: 11.5px; color: var(--ink-3); padding: 8px 10px 4px; font-weight: 600; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; color: var(--ink); font-size: 13.5px; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-3); box-shadow: none; }
.menu button[aria-checked="true"] { color: var(--brand-text); font-weight: 650; }
.menu button .m-sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; padding: 10px 12px; border: 0; background: none; color: var(--ink-3); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: color var(--d-fast) ease; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.k-col { background: var(--surface-3); border-radius: var(--r-lg); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.k-col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 2px; font-weight: 650; font-size: 13px; }
.k-col-head .n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.k-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 11px; text-align: left; width: 100%; color: inherit; display: flex; flex-direction: column; gap: 6px; transition: border-color var(--d-fast) ease, transform 120ms var(--ease-out); }
.k-card:hover { border-color: var(--line-strong); }
.k-card:active { transform: scale(.985); }
.k-card .kc-title { font-weight: 600; font-size: 13.5px; }
.k-card .kc-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.k-empty { font-size: 12.5px; color: var(--ink-4); padding: 10px 6px; text-align: center; }

/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; position: relative; }
.tl-item { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 10px; padding-bottom: 14px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.tl-dot svg { width: 12px; height: 12px; stroke-width: 2.4; }
.tl-item.done .tl-dot { background: var(--brand); color: #fff; box-shadow: none; }
.tl-item.now .tl-dot { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-item.bad .tl-dot { background: var(--err); color: #fff; box-shadow: none; }
.tl-title { font-weight: 600; font-size: 13.5px; }
.tl-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.tl-time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* stepper horizontal (SOS) */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
.step { padding: 10px 12px; border-radius: var(--r); background: var(--surface-3); font-size: 12.5px; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 8px; transition: background-color var(--d) var(--ease-out), color var(--d) var(--ease-out); }
.step .sn { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 11.5px; flex: none; }
.step.done { background: var(--brand-soft); color: var(--brand-text); }
.step.done .sn { background: var(--brand); color: #fff; }
.step.now { background: var(--accent); color: var(--accent-ink); }
.step.now .sn { background: var(--accent-ink); color: var(--accent); }

/* barras simples */
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); transform-origin: left; transition: width 500ms var(--ease-out); }
.bar.ok > span { background: var(--ok); }
.bar.warn > span { background: var(--warn); }
.bar.err > span { background: var(--err); }

/* gráficos */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-strong); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* mapa */
.map-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--map-sea); border: 1px solid var(--line); }
.map-svg { width: 100%; height: 100%; display: block; }
.map-svg .land { fill: var(--map-land); }
.map-svg .region { fill: var(--map-region); stroke: var(--map-region-line); stroke-width: 1.5; transition: fill var(--d) ease; }
.map-svg .region.uncovered { fill: color-mix(in srgb, var(--err) 14%, var(--map-region)); stroke: color-mix(in srgb, var(--err) 45%, var(--map-region-line)); stroke-dasharray: 6 4; }
.map-svg .road { stroke: var(--map-road); stroke-width: 5; fill: none; stroke-linecap: round; }
.map-svg .road.main { stroke-width: 8; }
.map-svg .rlabel { fill: var(--map-label); font-size: 13px; font-weight: 650; font-family: var(--font-brand); letter-spacing: .02em; pointer-events: none; }
.map-svg .sea-label { fill: var(--map-label); font-size: 12px; font-style: italic; opacity: .8; }
.map-svg .mk { transition: transform 1s linear; cursor: pointer; }
.map-svg .mk.static { transition: none; }
.map-svg .route { fill: none; stroke: var(--brand); stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; opacity: .8; }
.map-legend { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 10px; flex-wrap: wrap; background: color-mix(in srgb, var(--surface) 92%, transparent); padding: 7px 10px; border-radius: var(--r); font-size: 11.5px; color: var(--ink-2); border: 1px solid var(--line); max-width: calc(100% - 20px); }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.map-badge { position: absolute; right: 10px; top: 10px; }
.map-badge .badge { background: color-mix(in srgb, var(--surface) 92%, transparent); }

/* empty / skeleton */
.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .e-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); }
.empty .e-title { font-weight: 650; color: var(--ink); }
.skel { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* key/value */
.kv { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0,1fr); gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.money-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.money-line:last-child { border-bottom: 0; }
.money-line .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.money-line.total { border-bottom: 0; border-top: 1px solid var(--line-strong); font-weight: 700; padding-top: 10px; font-size: 15px; }

/* calendário de escalas */
.cal { display: grid; grid-template-columns: 170px repeat(7, minmax(110px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); min-width: 960px; }
.cal > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; min-width: 0; }
.cal .ch { background: var(--surface-2); font-size: 12.5px; font-weight: 650; color: var(--ink-2); position: sticky; top: 0; }
.cal .ch.today { color: var(--brand-text); }
.cal .rh { font-size: 12.5px; font-weight: 600; background: var(--surface-2); }
.cal .rh small { display: block; font-weight: 500; color: var(--ink-3); }
.slot { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; border-radius: var(--r-sm); font-size: 12px; width: 100%; text-align: left; border: 1px solid transparent; margin-bottom: 4px; color: var(--ink); transition: transform 120ms var(--ease-out), border-color var(--d-fast) ease; }
.slot:active { transform: scale(.97); }
.slot.full { background: var(--ok-bg); }
.slot.partial { background: var(--warn-bg); }
.slot.open { background: var(--err-bg); border-color: var(--err-line); border-style: dashed; }
.slot.pend { background: var(--info-bg); }
.slot .s-t { font-weight: 650; font-variant-numeric: tabular-nums; }
.slot .s-n { font-size: 11.5px; color: var(--ink-2); }

/* app do motoboy */
.app-stage { min-height: 100%; display: flex; justify-content: center; gap: 28px; padding: 24px 16px 48px; background: var(--bg); }
.phone {
  width: 390px; max-width: 100%; height: min(844px, calc(100dvh - 104px)); min-height: 560px; background: var(--surface); border-radius: 44px; position: relative;
  box-shadow: 0 0 0 10px #0B1230, 0 0 0 11px #2A3358, 0 30px 60px -20px rgba(1,23,95,.45); overflow: hidden; display: flex; flex-direction: column;
}
.phone-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; background: #0B1230; border-radius: 20px; z-index: 5; }
.app { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--bg); font-size: 15px; }
.app-top { padding: 48px 18px 14px; background: var(--nav-bg); color: #fff; display: flex; align-items: center; gap: 12px; }
.app-top .who .nm { color: #fff; }
.app-top .who .meta { color: rgba(255,255,255,.7); }
.app-body { flex: 1; overflow-y: auto; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.app-tabs { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(10px + env(safe-area-inset-bottom, 0px)); }
.app-tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; color: var(--ink-3); font-size: 11px; font-weight: 600; min-height: 48px; border-radius: 12px; }
.app-tabs button[aria-current="page"] { color: var(--brand-text); }
.app-tabs button svg { width: 22px; height: 22px; }
.app-card { background: var(--surface); border-radius: 18px; padding: 14px; border: 1px solid var(--line); }
.avail { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.avail.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.avail .switch { width: 52px; height: 30px; }
.avail .switch span::after { width: 24px; height: 24px; }
.avail .switch input:checked + span { background: var(--accent-ink); }
.avail .switch input:checked + span::after { transform: translateX(22px); }
.offer { border-radius: 22px; background: var(--nav-bg); color: #fff; padding: 16px; display: flex; flex-direction: column; gap: 12px; animation: offerIn 320ms var(--ease-out) both; }
@keyframes offerIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.offer .o-pay { font-family: var(--font-brand); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.offer .o-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.offer .o-meta div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 8px 10px; font-size: 12.5px; }
.offer .o-meta b { display: block; font-size: 15px; }
.offer .o-timer { height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.offer .o-timer span { display: block; height: 100%; background: var(--accent); transform-origin: left; }
.ride-step { font-family: var(--font-brand); font-size: 20px; font-weight: 750; }
.big-actions { display: grid; gap: 10px; }
.app-list .li { padding: 12px 14px; }
.sos-btn { background: var(--sos); color: #fff; border: 0; border-radius: 12px; height: 38px; padding: 0 12px; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; letter-spacing: .02em; }
.app-side { width: 320px; display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.offline-bar { background: var(--warn-bg); color: var(--warn); font-size: 12.5px; font-weight: 600; padding: 8px 14px; display: flex; align-items: center; gap: 8px; }

/* portal estabelecimento e rastreio */
.portal-top { background: var(--nav-bg); color: #fff; }
.portal-top .inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); flex-wrap: wrap; }
.portal-nav { max-width: 1180px; margin: 0 auto; display: flex; gap: 4px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); overflow-x: auto; scrollbar-width: none; }
.portal-nav button { background: none; border: 0; color: rgba(255,255,255,.75); padding: 10px 12px 12px; font-weight: 600; font-size: 13.5px; white-space: nowrap; border-bottom: 2px solid transparent; }
.portal-nav button[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }
.portal-body { max-width: 1180px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 60px max(16px, env(safe-area-inset-left, 0px)); }
.track { max-width: 560px; margin: 0 auto; padding: 0 0 40px; }
.track-head { background: var(--nav-bg); color: #fff; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); }
.track-body { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
.eta { font-family: var(--font-brand); font-size: 40px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.code-box { display: flex; gap: 8px; }
.code-box span { width: 48px; height: 56px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; font-family: var(--font-brand); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* guia de cenários */
.guide {
  position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 55; width: min(380px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); overflow: hidden;
  transform-origin: bottom right; animation: guideIn 260ms var(--ease-out) both;
}
@keyframes guideIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.guide-head { background: var(--nav-bg); color: #fff; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.guide-head .g-k { font-size: 11.5px; color: var(--accent); font-weight: 700; }
.guide-head .g-t { font-family: var(--font-brand); font-weight: 700; font-size: 15px; }
.guide-head .icon-btn { color: #fff; width: 30px; height: 30px; }
.guide-head .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.guide-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; }
.guide-steps { display: flex; flex-direction: column; gap: 2px; }
.gs { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 6px 4px; font-size: 13px; color: var(--ink-3); }
.gs .gn { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--surface-3); }
.gs.done { color: var(--ink-2); }
.gs.done .gn { background: var(--brand); color: #fff; }
.gs.now { color: var(--ink); font-weight: 600; }
.gs.now .gn { background: var(--accent); color: var(--accent-ink); }
.gs .gd { font-weight: 400; font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.guide-foot { padding: 10px 14px 14px; display: flex; gap: 8px; }
.flash { animation: flash 1.6s var(--ease-out) 1; border-radius: var(--r); }
@keyframes flash { 0%, 40% { outline: 3px solid var(--accent-ink); outline-offset: 3px; } 100% { outline: 3px solid transparent; outline-offset: 3px; } }

.scen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.scen { text-align: left; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 6px; color: inherit; transition: border-color var(--d-fast) ease, transform 120ms var(--ease-out); }
.scen:hover { border-color: var(--brand); }
.scen:active { transform: scale(.985); }
.scen .sc-n { font-size: 12px; font-weight: 700; color: var(--brand-text); }
.scen .sc-t { font-weight: 700; font-family: var(--font-brand); }
.scen .sc-d { font-size: 12.5px; color: var(--ink-3); }
.scen.done .sc-n::after { content: " · concluído"; color: var(--ok); }

.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.note { align-self: center; background: var(--warn-bg); color: var(--warn); font-size: 12.5px; max-width: 100%; }
.msg .src { margin-top: 8px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 6px; }
.msg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); margin: 0 2px; animation: typing 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

.demo-banner { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.swatch { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.perm-grid td, .perm-grid th { text-align: center; }
.perm-grid td:first-child, .perm-grid th:first-child { text-align: left; }
.tick { color: var(--ok); } .cross { color: var(--ink-4); }

/* filhos de colunas flex roláveis não encolhem (mapas, gráficos) */
.drawer-body > *, .app-body > *, .guide-body > *, .modal .m-body > *, .stack > * { flex-shrink: 0; }
.drawer .kv { grid-template-columns: minmax(84px, 34%) minmax(0, 1fr); }

/* faixa de demonstração dos ambientes externos */
.demo-strip { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; height: 48px; background: var(--surface); border-bottom: 1px solid var(--line); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.demo-strip .sim-chip { height: 30px; }
@media (max-width: 560px) { .demo-strip { gap: 6px; } .demo-strip > .strong { display: none; } .demo-strip .btn .hide-xs { display: none; } .demo-strip .btn { padding: 0 9px; } }
#view:focus { outline: none; box-shadow: none; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { color: var(--brand-text); }
.chat ul { margin: 6px 0; padding-left: 18px; }
.chat p + p { margin-top: 8px; }
a.btn { text-decoration: none; }
label.btn { cursor: pointer; }

/* ---------- proporção da marca 60·30·10 ----------
   60% branco (superfícies e leitura) · 30% azul (moldura: menu lateral, barra superior, régua principal) · 10% verde-lima (seleção e destaques) */
.topbar { background: var(--nav-bg); border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.topbar .icon-btn { color: rgba(255,255,255,.88); }
.topbar .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar .tb-search { background: rgba(255,255,255,.12); border-color: transparent; color: rgba(255,255,255,.8); }
.topbar .tb-search:hover { background: rgba(255,255,255,.18); }
.topbar .tb-search kbd { background: rgba(255,255,255,.14); border-color: transparent; color: rgba(255,255,255,.85); }
.topbar .sim-chip { background: rgba(255,255,255,.12); border-color: transparent; color: rgba(255,255,255,.82); }
.topbar .sim-chip .clock { color: #fff; }
.topbar .pulse { background: var(--accent); }
.topbar .pulse::after { border-color: var(--accent); }
.topbar .btn { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.topbar .btn:hover { background: rgba(255,255,255,.2); border-color: transparent; }
.topbar .btn.accent { background: var(--accent); color: var(--accent-ink); }
.topbar .btn.accent:hover { background: var(--accent); filter: brightness(.95); }
.topbar .profile-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.topbar :focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.sidebar { border-right: 1px solid rgba(255,255,255,.08); }

.kpis.brand { background: color-mix(in srgb, var(--nav-bg) 90%, #000); border-color: transparent; }
.kpis.brand .kpi { border-color: rgba(255,255,255,.12); }
.kpis.brand button.kpi:hover { background: rgba(255,255,255,.07); }
.kpis.brand .k-label { color: rgba(255,255,255,.76); }
.kpis.brand .k-val { color: #fff; }
.kpis.brand .k-val .muted { color: rgba(255,255,255,.62); }
.kpis.brand .k-foot { color: rgba(255,255,255,.7); }
.kpis.brand .kpi.alert .k-val { color: #FFB0B0; }
.kpis.brand .kpi.warn .k-val { color: #FFD48A; }
.kpis.brand .kpi.good .k-val { color: var(--accent); }
.kpis.brand :focus-visible { box-shadow: inset 0 0 0 3px var(--accent); }
@media (max-width: 1280px) { .kpis.brand .kpi:nth-child(n+4) { border-top-color: rgba(255,255,255,.12); } }
@media (max-width: 760px) { .kpis.brand .kpi:nth-child(n+3) { border-top-color: rgba(255,255,255,.12); } }

.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tabs button[aria-selected="true"]::after { height: 3px; }
.ratio { display: flex; height: 44px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.ratio span { display: grid; place-items: center; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.ratio .r60 { flex: 60; background: #fff; color: #0C1430; }
.ratio .r30 { flex: 30; background: var(--nav-bg); color: #fff; }
.ratio .r10 { flex: 10; background: var(--accent); color: var(--accent-ink); }

/* ---------- apresentação guiada ---------- */
.tour { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 75; width: min(400px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column; max-height: min(62vh, 560px); transform-origin: bottom left; animation: guideIn 240ms var(--ease-out) both; }
.tour-head { background: var(--nav-bg); color: #fff; padding: 12px 12px 12px 16px; display: flex; gap: 10px; align-items: flex-start; }
.tour-head .t-ch { font-size: 12px; font-weight: 700; color: var(--accent); }
.tour-head .t-ti { font-family: var(--font-brand); font-weight: 750; font-size: 17px; line-height: 1.25; margin-top: 2px; }
.tour-head .icon-btn { color: #fff; width: 36px; height: 36px; }
.tour-head .icon-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.tour-prog { height: 3px; background: color-mix(in srgb, var(--nav-bg) 80%, #fff); }
.tour-prog span { display: block; height: 100%; background: var(--accent); transition: width 300ms var(--ease-out); }
.tour-body { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.tour-body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.tour-try { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; border-radius: var(--r); background: var(--accent-soft); font-size: 13px; color: var(--ink); }
.tour-try svg { flex: none; margin-top: 1px; }
.tour-foot { padding: 10px 12px 12px; display: flex; gap: 8px; border-top: 1px solid var(--line); }
.tour-foot .btn { height: 44px; }
.tour-foot .next { flex: 1; }
.tour-pill { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 75; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px 0 12px; border-radius: 999px; border: 0; background: var(--nav-bg); color: #fff; font-weight: 700; box-shadow: var(--shadow-pop); }
.tour-pill .n { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.tour-target { outline: 3px solid var(--brand) !important; outline-offset: 4px; border-radius: var(--r); }
.sidebar .tour-target, .topbar .tour-target, .tour-target.kpis.brand, .portal-top .tour-target, .app-top .tour-target, .offer.tour-target, .track-head .tour-target { outline-color: var(--accent) !important; }
.chapters { display: grid; gap: 2px; }
.chapters button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r-sm); border: 0; background: none; color: var(--ink); font-weight: 600; min-height: 44px; }
.chapters button:hover { background: var(--surface-3); }
.chapters button[aria-current="true"] { background: var(--brand-soft); color: var(--brand-text); }
.chapters .n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 500; }
@media (max-width: 760px) { .tour { left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); width: auto; max-height: 46vh; } }

/* ---------- mapa real (OpenStreetMap) ---------- */
:root { --m-land: #F3F2EE; --m-green: #DDEBD3; --m-water: #AFD0EE; --m-minor: #FFFFFF; --m-mid: #FFFFFF; --m-case: #D8D3C8; --m-major: #FFE3A1; --m-major-case: #E2C07A; --m-label: #4E5566; --m-hood: #858B99; --m-halo: #F3F2EE; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --m-land: #17191E; --m-green: #18261D; --m-water: #142538; --m-minor: #262A32; --m-mid: #30353F; --m-case: #101215; --m-major: #474D5A; --m-major-case: #101215; --m-label: #A3A9B4; --m-hood: #737A86; --m-halo: #17191E; } }
:root[data-theme="dark"] { --m-land: #17191E; --m-green: #18261D; --m-water: #142538; --m-minor: #262A32; --m-mid: #30353F; --m-case: #101215; --m-major: #474D5A; --m-major-case: #101215; --m-label: #A3A9B4; --m-hood: #737A86; --m-halo: #17191E; }
.map-wrap { background: var(--m-land); }
.map-svg[data-pan] { touch-action: none; cursor: grab; }
.map-svg[data-pan]:active { cursor: grabbing; }
.map-svg .m-land { fill: var(--m-land); }
.map-svg .m-green { fill: var(--m-green); }
.map-svg .m-water, .map-svg .m-sea { fill: var(--m-water); }
.map-svg .m-river { fill: none; stroke: var(--m-water); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.map-svg .m-road, .map-svg .m-road-case { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-svg .m-r2 { stroke: var(--m-minor); stroke-width: 1.2px; }
.map-svg .m-r1c { stroke: var(--m-case); stroke-width: 4.2px; }
.map-svg .m-r1 { stroke: var(--m-mid); stroke-width: 2.6px; }
.map-svg .m-r0c { stroke: var(--m-major-case); stroke-width: 6px; }
.map-svg .m-r0 { stroke: var(--m-major); stroke-width: 4px; }
.map-svg.near .m-r2 { stroke-width: 3px; }
.map-svg.near .m-r1c { stroke-width: 7px; } .map-svg.near .m-r1 { stroke-width: 5px; }
.map-svg.near .m-r0c { stroke-width: 9px; } .map-svg.near .m-r0 { stroke-width: 6.5px; }
.map-svg.far .m-r2 { stroke-width: .8px; }
.map-svg text.m-place, .map-svg text.m-hood { font-family: var(--font-ui); paint-order: stroke; stroke: var(--m-halo); stroke-linejoin: round; pointer-events: none; }
.map-svg text.m-place { fill: var(--m-label); font-weight: 650; font-size: calc(var(--k, 1) * 12px); stroke-width: calc(var(--k, 1) * 3.5px); letter-spacing: .01em; }
.map-svg text.m-hood { fill: var(--m-hood); font-weight: 550; font-size: calc(var(--k, 1) * 10.5px); stroke-width: calc(var(--k, 1) * 3px); display: none; }
.map-svg.near text.m-hood { display: inline; }
.map-svg .mk { cursor: pointer; }
.map-svg .mk-s { transform: scale(var(--k, 1)); }
.map-svg .m-cour { transition: transform 1s linear; }
.map-svg .m-dot { stroke: #fff; stroke-width: 2.5; }
.map-svg .m-me { fill: var(--accent); opacity: .55; }
.map-svg .m-ini { fill: #fff; font: 700 9px var(--font-ui); letter-spacing: .02em; }
.map-svg .m-lbl rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.map-svg .m-l1 { fill: var(--ink); font: 700 11.5px var(--font-ui); }
.map-svg .m-l2 { fill: var(--ink-3); font: 500 10.5px var(--font-ui); }
.map-svg .m-cour .m-lbl { display: none; }
.map-svg.lbl-on .m-cour .m-lbl, .map-svg .m-cour.sel .m-lbl { display: inline; }
.map-svg text.m-place2 { display: none; }
.map-svg.mid text.m-place2 { display: inline; }
.map-svg .m-sel { fill: var(--accent); opacity: .5; }
.map-svg .m-cour.sel .m-dot { stroke: var(--accent-ink); stroke-width: 3; }
.map-svg .m-cour:hover .m-lbl, .map-svg .m-cour:focus .m-lbl { display: inline; }
.map-svg .m-cour:hover { z-index: 2; }
.map-svg .m-est-b { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.map-svg .m-est-i { fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.map-svg .m-pin { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.map-svg .m-drop.late .m-pin { fill: var(--err); }
.map-svg .m-route-bg { fill: none; stroke: #fff; stroke-width: 8px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .9; }
.map-svg .m-route { fill: none; stroke: var(--brand); stroke-width: 4.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-svg .m-route.alt { stroke: var(--ink-3); stroke-dasharray: calc(var(--k, 1) * 2px) calc(var(--k, 1) * 8px); }
.map-svg .m-route.faint { stroke-width: 2.5px; opacity: .45; }
.map-svg .m-unc circle { fill: color-mix(in srgb, var(--err) 12%, transparent); stroke: var(--err); stroke-width: 2px; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.map-legend i.sq { border-radius: 3px; background: var(--surface); border: 2px solid var(--brand); }
.map-ctrl { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.map-ctrl button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; font-weight: 600; box-shadow: var(--shadow-1); display: grid; place-items: center; }
.map-ctrl button.fit { width: auto; padding: 0 10px; font-size: 12.5px; font-weight: 650; height: 34px; }
.map-ctrl button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.map-ctrl button:active { transform: scale(.95); }
.map-cred { position: absolute; right: 6px; bottom: 4px; font-size: 10px; color: var(--ink-3); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 1px 6px; border-radius: 4px; pointer-events: none; }
.map-wrap .map-legend { bottom: 22px; }

@media (max-width: 560px) {
  .topbar { gap: 6px; }
  .topbar [data-act="theme"], .sim-chip [data-act="sim-speed"], .profile-btn > svg { display: none; }
  .profile-btn { padding: 0 4px; }
  .demo-strip .sim-chip [data-act="sim-speed"] { display: none; }
}
/* busca de motoboy no mapa */
.map-toolbar { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.map-search { position: relative; flex: 1 1 320px; max-width: 460px; display: flex; align-items: center; }
.map-search > svg { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.map-search .input { padding-left: 36px; height: 42px; font-size: 15px; }
.map-search .icon-btn { position: absolute; right: 3px; }
.map-hits { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 15; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.map-hits .li { min-height: 52px; }
.map-focus { border-color: var(--accent); }
/* ---------- proposta comercial (mesmo modelo das páginas da Desafogai) ---------- */
.pp-wrap { max-width: 1140px; margin: 0 auto; padding-left: max(clamp(18px, 4vw, 52px), env(safe-area-inset-left, 0px)); padding-right: max(clamp(18px, 4vw, 52px), env(safe-area-inset-right, 0px)); }
.pp-topo { position: sticky; top: 0; z-index: 30; background: var(--nav-bg); color: #fff; padding-top: env(safe-area-inset-top, 0px); }
.pp-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.pp-barra .sb-logo { height: 24px; }
.pp-vistas { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(255,255,255,.14); }
.pp-vistas button { height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: #fff; font-weight: 700; font-size: 14px; }
.pp-vistas button[aria-current="page"] { background: #fff; color: var(--brand); }
.pp-btn-vidro { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.45); background: none; color: #fff; font-weight: 700; font-size: 13.5px; }
.pp-btn-vidro:hover { background: rgba(255,255,255,.1); }
.pp-palco { background: var(--nav-bg); color: #fff; padding: clamp(28px, 5vh, 56px) 0 calc(clamp(28px, 5vh, 56px) + 36px); }
.pp-rotulo { font-size: 13.5px; font-weight: 650; color: rgba(255,255,255,.8); }
.pp-cartaz { font-family: var(--font-brand); font-size: clamp(2.2rem, 5.2vw, 4rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.042em; color: #fff; margin-top: 8px; overflow-wrap: anywhere; }
.pp-cartaz span { display: block; }
.pp-cartaz span:last-child { color: var(--accent); }
.pp-sub { max-width: 60ch; margin-top: 14px; font-size: 1.0625rem; line-height: 1.5; color: rgba(255,255,255,.86); }
.pp-nome { display: inline-flex; flex-direction: column; gap: 6px; margin-top: 20px; width: min(420px, 100%); }
.pp-nome span { font-size: 12.5px; font-weight: 650; color: rgba(255,255,255,.75); }
.pp-nome input { height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; font-size: 15px; font-weight: 600; outline: none; }
.pp-nome input::placeholder { color: rgba(255,255,255,.55); font-weight: 500; }
.pp-nome input:focus { border-color: var(--accent); }
.pp-lencol { position: relative; margin-top: -36px; background: var(--surface); border-radius: 36px 36px 0 0; overflow: hidden; }
.pp-sec { padding: clamp(36px, 6vh, 64px) 0; }
.pp-nevoa { background: var(--surface-2); }
.pp-sec-topo { margin-bottom: 18px; }
.pp-sec-topo h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; }
.pp-sec-topo p { margin-top: 6px; color: var(--ink-3); font-size: 1rem; max-width: 60ch; }
.pp-grade { display: grid; gap: clamp(26px, 4vw, 48px); align-items: start; }
@media (min-width: 960px) { .pp-grade { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); } }
.pp-portes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pp-portes button { text-align: left; display: grid; gap: 3px; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); transition: border-color 180ms ease, background-color 180ms ease, transform 120ms var(--ease-out); }
.pp-portes button:active { transform: scale(.98); }
.pp-portes b { font-size: 1.0625rem; font-weight: 760; }
.pp-portes span { font-size: .875rem; color: var(--ink-3); line-height: 1.35; }
.pp-portes small { margin-top: 4px; font-weight: 700; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.pp-portes button[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); }
.pp-mods { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.pp-mod { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) 28px; gap: 14px; align-items: center; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 20px; cursor: pointer; transition: border-color 180ms ease, background-color 180ms ease, transform 120ms var(--ease-out); }
.pp-mod:active { transform: scale(.99); }
.pp-mod input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pp-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-3); color: var(--ink-3); transition: background-color 180ms ease, color 180ms ease; }
.pp-corpo { display: grid; gap: 2px; min-width: 0; }
.pp-corpo b { font-size: 1.0625rem; font-weight: 740; line-height: 1.25; }
.pp-corpo span { font-size: .9375rem; color: var(--ink-3); line-height: 1.38; }
.pp-corpo small { margin-top: 4px; font-size: .8125rem; font-weight: 600; color: var(--brand-text); line-height: 1.35; }
.pp-marca { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); color: transparent; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease; }
.pp-mod:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pp-mod:has(input:checked) .pp-ic { background: var(--brand); color: #fff; }
.pp-mod:has(input:checked) .pp-marca { background: var(--brand); border-color: var(--brand); color: #fff; }
.pp-mod:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 3px; }
.pp-base { cursor: default; }
.pp-subt { margin: 30px 0 12px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.012em; }
.pp-manual { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.pp-manual li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-3); line-height: 1.45; }
.pp-manual svg { color: var(--brand-text); margin-top: 3px; }
.pp-manual b { color: var(--ink); font-weight: 700; }
.pp-resumo { background: var(--nav-bg); color: #fff; border-radius: 30px; padding: clamp(22px, 3vw, 30px); }
@media (min-width: 960px) { .pp-resumo { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; } }
.pp-resumo h3 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.015em; color: #fff; }
.pp-conta { margin-top: 4px; color: rgba(255,255,255,.8); font-size: .9375rem; }
.pp-lista { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; }
.pp-lista li { display: flex; gap: 6px; align-items: flex-start; font-weight: 600; font-size: .8125rem; line-height: 1.3; }
.pp-lista svg { flex: none; margin-top: 1px; }
.pp-lista svg { color: var(--accent); stroke-width: 2.6; }
.pp-extra { display: grid; gap: 8px; margin-top: 14px; }
.pp-extra p { padding: 10px 12px; background: rgba(255,255,255,.12); border-radius: 14px; font-size: .9375rem; line-height: 1.35; }
.pp-extra b { color: var(--accent); }
.pp-resumo h4 { margin-top: 20px; font-size: 1rem; font-weight: 760; color: #fff; }
.pp-valores { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.pp-valores label { display: block; min-width: 0; }
.pp-valores label > span:first-child { display: block; font-size: .8125rem; font-weight: 620; color: rgba(255,255,255,.82); margin-bottom: 5px; }
.pp-valores label > span:first-child small { font-weight: 500; opacity: .75; }
.pp-dinheiro { display: flex; align-items: center; background: #fff; border-radius: 14px; overflow: hidden; }
.pp-dinheiro > span { padding: 0 10px; font-size: .875rem; font-weight: 700; color: #59607a; }
.pp-dinheiro input { flex: 1; min-width: 0; height: 48px; border: 0; padding: 0 10px 0 0; font-size: 1.0625rem; font-weight: 700; color: #0a1033; background: #fff; outline: none; font-variant-numeric: tabular-nums; }
.pp-dinheiro:focus-within { box-shadow: 0 0 0 3px var(--accent); }
.pp-tab { display: block; margin-top: 5px; min-height: 1.4em; font-size: .75rem; color: rgba(255,255,255,.82); }
.pp-tab s { opacity: .7; margin-right: 4px; }
.pp-ajuste { margin-top: 6px; }
.pp-ajuste summary { list-style: none; cursor: pointer; display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .9rem; letter-spacing: 2px; opacity: .35; user-select: none; }
.pp-ajuste summary::-webkit-details-marker { display: none; }
.pp-ajuste[open] summary { opacity: .7; }
.pp-desc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pp-desc button { min-height: 32px; padding: 0 11px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.4); background: none; color: #fff; font-size: .75rem; font-weight: 600; }
.pp-desc button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pp-nota { margin-top: 10px; font-size: .8125rem; color: rgba(255,255,255,.78); line-height: 1.4; }
.pp-btn-lima { display: flex; align-items: center; justify-content: center; min-height: 56px; margin-top: 18px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1rem; text-align: center; text-decoration: none; transition: transform 120ms var(--ease-out), filter 160ms ease; }
.pp-btn-lima:hover { filter: brightness(.96); }
.pp-btn-lima:active { transform: scale(.98); }
.pp-contato { margin-top: 12px; text-align: center; font-size: .9375rem; color: rgba(255,255,255,.86); }
.pp-contato a { color: #fff; font-weight: 700; }
.pp-passos { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: passo; }
@media (min-width: 800px) { .pp-passos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pp-passos li { counter-increment: passo; }
.pp-passos li::before { content: counter(passo); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 850; margin-bottom: 14px; }
.pp-passos h3 { font-size: 1.125rem; font-weight: 760; margin-bottom: 6px; }
.pp-passos p { color: var(--ink-3); }
.pp-rodape { padding: 22px 0 calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: .8125rem; color: var(--ink-3); }
.pp-rodape .pp-wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .pp-portes { grid-template-columns: minmax(0, 1fr); } .pp-vistas button { padding: 0 10px; font-size: 13px; } .pp-barra { gap: 8px; } .pp-barra .sb-logo { height: 19px; width: auto; } .pp-btn-vidro { padding: 0 10px; } .pp-valores { grid-template-columns: minmax(0, 1fr); } }

/* hover só em ponteiro fino */
@media (hover: none) { .btn:hover, .icon-btn:hover, .chip:hover { background: inherit; } .btn.primary:hover { background: var(--brand); } }

/* ---------- responsivo ---------- */
@media (max-width: 1280px) { :root { --sidebar-w: 228px; } .kpis { --cols: 3 !important; } .kpis .kpi:nth-child(3n) { border-right: 0; } .kpis .kpi:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 1100px) {
  .g-main, .g-side { grid-template-columns: minmax(0,1fr); }
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .app-side { display: none; }
}
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-102%); transition: transform 320ms var(--ease-drawer); padding-left: env(safe-area-inset-left, 0px); }
  .sidebar.open { transform: none; box-shadow: 24px 0 48px -24px rgba(1,23,95,.5); }
  .tb-menu { display: inline-grid; }
  .content { padding-top: 18px; }
}
@media (max-width: 760px) {
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0,1fr); }
  .kpis { --cols: 2 !important; }
  .kpis .kpi:nth-child(3n) { border-right: 1px solid var(--line); }
  .kpis .kpi:nth-child(2n) { border-right: 0; }
  .kpis .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpi .k-val { font-size: 21px; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .tb-search { width: 36px; padding: 0; justify-content: center; flex: none; }
  .tb-search span { display: none; }
  .g-inbox { grid-template-columns: minmax(0, 1fr); }
  .tb-search kbd, .hide-sm { display: none !important; }
  .content { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .steps { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .step .sl { display: none; }
  .step { justify-content: center; }
  .app-stage { padding: 0; }
  .phone { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  .phone-notch { display: none; }
  .app-top { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .kanban { grid-auto-columns: minmax(240px, 82vw); }
  .t.cards thead { display: none; }
  .t.cards, .t.cards tbody, .t.cards tr, .t.cards td { display: block; width: 100%; }
  .t.cards tr { padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .t.cards td { border: 0; padding: 2px 0 !important; text-align: left !important; }
  .t.cards td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-3); font-size: 12px; }
  .guide { left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: auto; }
  .sim-chip .lbl { display: none; }
  .msg { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .drawer, .sidebar, .modal, .toast, .menu, .scrim { transition: opacity 150ms ease !important; }
  .drawer:not(.on) { transform: translateX(104%); }
  .map-svg .mk { transition: none; }
  .pulse::after { display: none; }
}
