/* Kyrios 1.6.0 — sistema de design do protótipo aprovado (Torre de Controle laranja).
   Transcrito do código-fonte do protótipo; vem depois do app.css e prevalece sobre ele. */
@font-face { font-family: "Sora"; src: url("../fonts/sora-latin-wght-normal.woff2?v=1.7.0") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-wght-normal.woff2?v=1.7.0") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2?v=1.7.0") format("woff2"); font-weight: 100 800; font-display: swap; }
/* Layout: atmosfera em camadas sob vidro flutuante; telas compostas pelo fluxo logístico (recebimento → bipagem → planejamento → carregamento → entregas).
   Kyrios — protótipo 3 (Central de Operações), só aprovação estética. Dados fictícios. */
:root {
  --logo: url("../img/logo-kyrios.jpg?v=1.7.0");
  --bg0: #0a0706; --bg1: #1c120b;
  --aur-a: rgba(252, 97, 5, .40); --aur-b: rgba(255, 140, 50, .20); --aur-c: rgba(160, 52, 12, .34);
  --grid-dot: rgba(255, 180, 130, .10);
  --g1: rgba(255, 255, 255, .085); --g2: rgba(255, 255, 255, .025); --g-solid: rgba(18, 12, 9, .74); --g-inner: rgba(255, 255, 255, .045); --g-inner-hi: rgba(255, 255, 255, .08);
  --edge-a: rgba(255, 180, 130, .55); --edge-b: rgba(252, 120, 40, .30); --edge-mid: rgba(255, 255, 255, .06);
  --hair: rgba(255, 255, 255, .08);
  --ink: #fff6ef; --ink-2: #d9c6b8; --muted: #9a8676;
  --cyan: #ff9a4d; --blue: #fc6105; --violet: #d94a0a;
  --grad: linear-gradient(120deg, #ffa25c 0%, #fc6105 48%, #d94a0a 100%);
  --glow: rgba(252, 97, 5, .55); --glow-soft: rgba(252, 97, 5, .18);
  --ok: #34e3a0; --ok-soft: rgba(52, 227, 160, .14); --warn: #ffc04d; --warn-soft: rgba(255, 192, 77, .15); --danger: #ff6b81; --danger-soft: rgba(255, 107, 129, .15); --info: #6fd3ff; --info-soft: rgba(111, 211, 255, .14);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), 0 12px 24px -12px rgba(0, 0, 0, .55);
  --shadow-lift: 0 40px 80px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 180, 130, .08), 0 0 40px -10px rgba(252, 97, 5, .25);
  --map-bg: #0e0a08; --map-blk: rgba(255, 200, 170, .035); --map-st: rgba(255, 180, 130, .08); --map-mj: rgba(255, 180, 130, .2); --map-wt: rgba(120, 140, 155, .16); --map-lbl: rgba(255, 220, 195, .38);
  --rib-dark: #100b08; --rib-rim: #fc6105; --rib-spec: rgba(255, 255, 255, .22);
  --blur: 26px; --load: #b49cff;
  --f-disp: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --f-ui: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 26px; --r-md: 18px; --r-sm: 12px;
  --e-out: cubic-bezier(.16, 1, .3, 1); --e-std: cubic-bezier(.2, .8, .2, 1);
  --rail-w: 268px; --gap: 18px;
  /* Escala tipográfica: 11 · 12 · 13 · 14 · 16 · 20 · título */
  --fs-cap: 11px; --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px;
  --fs-h1: clamp(24px, 1.05rem + 1.25vw, 32px);
  --tap: 44px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg0: #f4eee8; --bg1: #fffaf5;
    --aur-a: rgba(252, 97, 5, .16); --aur-b: rgba(255, 170, 100, .24); --aur-c: rgba(255, 214, 180, .40); --grid-dot: rgba(110, 55, 20, .10);
    --g1: rgba(255, 255, 255, .72); --g2: rgba(255, 255, 255, .42); --g-solid: rgba(255, 255, 255, .86); --g-inner: rgba(255, 255, 255, .55); --g-inner-hi: rgba(255, 255, 255, .85);
    --edge-a: rgba(255, 255, 255, .95); --edge-b: rgba(230, 150, 100, .45); --edge-mid: rgba(255, 255, 255, .3); --hair: rgba(110, 55, 20, .09);
    --ink: #1d140e; --ink-2: #4a3a2f; --muted: #7a6656; --cyan: #c2410c; --blue: #fc6105; --violet: #b2410e;
    --grad: linear-gradient(120deg, #ff8a3d 0%, #fc6105 50%, #c2410c 100%);
    --glow: rgba(252, 97, 5, .35); --glow-soft: rgba(252, 97, 5, .12);
    --ok: #0f8a57; --ok-soft: rgba(15, 138, 87, .12); --warn: #b26a00; --warn-soft: rgba(178, 106, 0, .12); --danger: #d1344f; --danger-soft: rgba(209, 52, 79, .12); --info: #0778a8; --info-soft: rgba(7, 120, 168, .12);
    --shadow: 0 30px 60px -32px rgba(110, 55, 20, .35), 0 10px 22px -14px rgba(110, 55, 20, .22);
    --shadow-lift: 0 40px 80px -30px rgba(110, 55, 20, .45), 0 0 0 1px rgba(255, 255, 255, .7), 0 0 40px -12px rgba(252, 97, 5, .25);
    --map-bg: #efe6dd; --map-blk: rgba(255, 255, 255, .5); --map-st: rgba(255, 255, 255, .9); --map-mj: rgba(255, 255, 255, 1); --map-wt: rgba(150, 170, 185, .35); --map-lbl: rgba(110, 55, 20, .42);
    --rib-dark: #fbf6f1; --rib-rim: #ffb27a; --rib-spec: rgba(255, 255, 255, .9);
    --load: #6d4fd6;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg0: #f4eee8; --bg1: #fffaf5;
  --aur-a: rgba(252, 97, 5, .16); --aur-b: rgba(255, 170, 100, .24); --aur-c: rgba(255, 214, 180, .40); --grid-dot: rgba(110, 55, 20, .10);
  --g1: rgba(255, 255, 255, .72); --g2: rgba(255, 255, 255, .42); --g-solid: rgba(255, 255, 255, .86); --g-inner: rgba(255, 255, 255, .55); --g-inner-hi: rgba(255, 255, 255, .85);
  --edge-a: rgba(255, 255, 255, .95); --edge-b: rgba(230, 150, 100, .45); --edge-mid: rgba(255, 255, 255, .3); --hair: rgba(110, 55, 20, .09);
  --ink: #1d140e; --ink-2: #4a3a2f; --muted: #7a6656; --cyan: #c2410c; --blue: #fc6105; --violet: #b2410e;
  --grad: linear-gradient(120deg, #ff8a3d 0%, #fc6105 50%, #c2410c 100%);
  --glow: rgba(252, 97, 5, .35); --glow-soft: rgba(252, 97, 5, .12);
  --ok: #0f8a57; --ok-soft: rgba(15, 138, 87, .12); --warn: #b26a00; --warn-soft: rgba(178, 106, 0, .12); --danger: #d1344f; --danger-soft: rgba(209, 52, 79, .12); --info: #0778a8; --info-soft: rgba(7, 120, 168, .12);
  --shadow: 0 30px 60px -32px rgba(110, 55, 20, .35), 0 10px 22px -14px rgba(110, 55, 20, .22);
  --shadow-lift: 0 40px 80px -30px rgba(110, 55, 20, .45), 0 0 0 1px rgba(255, 255, 255, .7), 0 0 40px -12px rgba(252, 97, 5, .25);
  --map-bg: #efe6dd; --map-blk: rgba(255, 255, 255, .5); --map-st: rgba(255, 255, 255, .9); --map-mj: rgba(255, 255, 255, 1); --map-wt: rgba(150, 170, 185, .35); --map-lbl: rgba(110, 55, 20, .42);
  --rib-dark: #fbf6f1; --rib-rim: #ffb27a; --rib-spec: rgba(255, 255, 255, .9);
  --load: #6d4fd6;
  color-scheme: light;
}
/* Modo leve: celulares e aparelhos simples (menos blur, sem animações de fundo) */
:root[data-fx="lite"] { --blur: 14px; }
@media (prefers-reduced-transparency: reduce) { :root { --g1: var(--g-solid); --g2: var(--g-solid); } }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 500 14px/1.5 var(--f-ui); color: var(--ink); background: var(--bg0); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg0); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font: 700 var(--fs-h1)/1.12 var(--f-disp); letter-spacing: -.03em; text-wrap: balance; overflow-wrap: break-word; }
h2 { font: 650 15px/1.25 var(--f-disp); letter-spacing: -.01em; text-wrap: balance; }
h3 { font-size: 13.5px; font-weight: 700; }
p { margin: 0; }
a { color: var(--blue); }
.mono { font-family: var(--f-mono); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-xs); line-height: 1.45; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 15px; height: 15px; } .ico.lg { width: 22px; height: 22px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font: 700 var(--fs-cap)/1.35 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Atmosfera ---------- */
.atmo { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(1200px 800px at 50% -20%, var(--bg1), var(--bg0) 70%); }
.atmo .blob { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; }
.atmo .b1 { left: -20vmax; top: -30vmax; background: radial-gradient(closest-side, var(--aur-a), transparent); animation: drift1 26s var(--e-std) infinite alternate; }
.atmo .b2 { right: -25vmax; top: -10vmax; background: radial-gradient(closest-side, var(--aur-b), transparent); animation: drift2 32s var(--e-std) infinite alternate; }
.atmo .b3 { left: 20vmax; bottom: -45vmax; background: radial-gradient(closest-side, var(--aur-c), transparent); animation: drift3 38s var(--e-std) infinite alternate; }
@keyframes drift1 { to { transform: translate(12vmax, 8vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-10vmax, 12vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-8vmax, -10vmax) scale(1.1); } }
.atmo .dots { position: absolute; inset: 0; background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.2px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 70%); }
.atmo .noise { position: absolute; inset: -50%; opacity: .05; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
:root[data-fx="lite"] .atmo .blob { animation: none; }

/* ---------- Vidro ---------- */
.glass { position: relative; isolation: isolate; border-radius: var(--r); background: linear-gradient(150deg, var(--g1), var(--g2)); backdrop-filter: blur(var(--blur)) saturate(170%); -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .12); min-width: 0; }
.glass::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, var(--edge-a), var(--edge-mid) 32%, var(--edge-mid) 64%, var(--edge-b));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.glass::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s var(--e-std);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow-soft), transparent 45%); }
.glass.lit::after { opacity: 1; }
:root[data-fx="lite"] .glass::after { display: none; }
.inner { background: var(--g-inner); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--hair); }
.solid { background: var(--g-solid); }
.glass-hd { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.glass-hd .act { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.glass-bd { padding: 16px 20px 20px; }
.hico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--cyan); background: linear-gradient(150deg, rgba(255, 150, 70, .18), rgba(252, 97, 5, .06)); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .2); flex: none; }

/* ---------- Botões ---------- */
.btn { --h: 42px; position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 7px 18px; border-radius: 14px; border: 0; line-height: 1.2; text-align: center; text-wrap: balance;
  background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255, 255, 255, .08); color: var(--ink); font-weight: 700; font-size: 13.5px; text-decoration: none;
  transition: transform .18s var(--e-out), box-shadow .3s var(--e-std), background-color .2s; }
.btn:hover { box-shadow: inset 0 0 0 1px var(--edge-b), 0 8px 24px -12px var(--glow); }
.btn:active { transform: scale(.97); }
.btn.primary { color: #fff; background: linear-gradient(120deg, #ffa25c, #fc6105 55%, #d94a0a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 30px -10px var(--glow), 0 0 0 1px rgba(255, 180, 130, .35); }
.btn.primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 14px 38px -8px var(--glow), 0 0 0 1px rgba(255, 180, 130, .6); }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--e-out); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.ok { color: #032016; background: linear-gradient(120deg, #5cf0b6, #22c98a); box-shadow: 0 10px 26px -10px rgba(52, 227, 160, .6); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.sm { --h: 36px; padding: 6px 13px; font-size: 12.5px; border-radius: 11px; }
.btn.lg { --h: 52px; font-size: 15px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .42; cursor: not-allowed; transform: none; filter: saturate(.4); }
.btn .rip { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .35); transform: scale(0); pointer-events: none; animation: rip .6s var(--e-out) forwards; }
@keyframes rip { to { transform: scale(4); opacity: 0; } }
.ibtn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; border: 0; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink-2); position: relative; transition: transform .18s var(--e-out), color .2s, box-shadow .3s; }
.ibtn:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge-b), 0 0 20px -6px var(--glow); }
.ibtn:active { transform: scale(.94); }
.ibtn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 10px var(--danger); }

/* ---------- Selos, códigos ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 3px 10px; border-radius: 999px; font-size: var(--fs-cap); line-height: 1.2; font-weight: 750; white-space: nowrap; width: fit-content; max-width: 100%; background: var(--g-inner-hi); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); }
.pill::before { flex: none; content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent); }
.pill.warn { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); }
.pill.danger { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 30%, transparent); }
.pill.info { color: var(--info); background: var(--info-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--info) 30%, transparent); }
.pill.accent { color: var(--blue); background: var(--glow-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 35%, transparent); }
.pill.live::before { animation: beat 1.6s ease-out infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 currentColor; } 80%, 100% { box-shadow: 0 0 0 7px transparent; } }
.code { font: 600 11.5px var(--f-mono); padding: 3px 8px; border-radius: 8px; color: var(--ink); background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); }

/* ---------- Segmentado com luz deslizante ---------- */
.seg { position: relative; display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 4px; gap: 2px; border-radius: 999px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); isolation: isolate; }
.seg button { position: relative; z-index: 1; min-height: 32px; padding: 6px 15px; line-height: 1.2; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 750; font-size: 12.5px; white-space: nowrap; transition: color .3s var(--e-std); }
.seg button[aria-pressed="true"] { color: #fff; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.seg .ind { position: absolute; z-index: 0; top: 4px; left: 0; height: 32px; border-radius: 999px; background: linear-gradient(120deg, #ffa25c, #fc6105 60%, #d94a0a); box-shadow: 0 6px 20px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .5s var(--e-out), width .5s var(--e-out), height .5s var(--e-out); }
.seg.wrap { border-radius: 20px; } .seg.wrap button, .seg.wrap .ind { border-radius: 15px; }

/* ---------- Carregador (órbita) ---------- */
.orbit { position: relative; width: 56px; height: 56px; }
.orbit::before, .orbit::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.orbit::before { background: conic-gradient(from 0deg, transparent 0 55%, var(--cyan) 85%, transparent); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin 1.1s linear infinite; }
.orbit::after { inset: 10px; background: conic-gradient(from 180deg, transparent 0 60%, var(--violet) 90%, transparent); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); animation: spin 1.6s linear infinite reverse; }
.orbit b { position: absolute; inset: 17px; border-radius: 6px; font-size: 0; color: transparent; background: #fc6105 var(--logo) center / cover no-repeat; -webkit-background-clip: border-box; background-clip: border-box; }
.dots3 { display: inline-flex; gap: 4px; }
.dots3 i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: hop .9s var(--e-std) infinite; }
.dots3 i:nth-child(2) { animation-delay: .12s; } .dots3 i:nth-child(3) { animation-delay: .24s; }
@keyframes hop { 0%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.sk { border-radius: 12px; background: linear-gradient(100deg, var(--g-inner) 20%, var(--g-inner-hi) 40%, var(--g-inner) 60%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Marca ---------- */
.mark { position: relative; width: 40px; height: 40px; flex: none; border-radius: 11px; background: #fc6105 var(--logo) center / cover no-repeat; box-shadow: 0 8px 24px -8px var(--glow), 0 0 0 1px rgba(255, 255, 255, .12); }


/* =================== LOGIN =================== */
#login { position: fixed; inset: 0; overflow: auto; }
.ribbons { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ribbons g.rb { animation: ribDrift 18s var(--e-std) infinite alternate; transform-origin: 50% 50%; }
.ribbons g.rb:nth-child(2n) { animation-duration: 24s; animation-direction: alternate-reverse; }
.ribbons g.rb:nth-child(3n) { animation-duration: 30s; }
@keyframes ribDrift { from { transform: translate(-2%, 1%) rotate(-1deg); } to { transform: translate(2%, -2%) rotate(1.2deg); } }
.ribbons .rim { fill: none; stroke: url(#rimG); stroke-linecap: round; }
.ribbons .body { fill: none; stroke: var(--rib-dark); stroke-linecap: round; }
.ribbons .spec { fill: none; stroke: var(--rib-spec); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 80 900; animation: specRun 7s linear infinite; }
@keyframes specRun { to { stroke-dashoffset: -980; } }
.ribbons .sweep { mix-blend-mode: screen; animation: sweep 9s var(--e-std) infinite; }
@keyframes sweep { 0% { transform: translateX(-40%); opacity: 0; } 30% { opacity: .9; } 70% { opacity: .9; } 100% { transform: translateX(40%); opacity: 0; } }
:root[data-fx="lite"] .ribbons g.rb, :root[data-fx="lite"] .ribbons .sweep { animation: none; }
.login-wrap { position: relative; min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 120px max(16px, env(safe-area-inset-left, 0px)); }
.lcard { --c: 30px; position: relative; width: min(440px, 100%); padding: 38px 34px 30px; border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  background: linear-gradient(160deg, rgba(255, 180, 130, .16), rgba(40, 25, 15, .22) 40%, rgba(12, 8, 5, .38)); backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .22), inset 0 1px 0 rgba(255, 255, 255, .25); }
:root[data-theme="light"] .lcard { background: linear-gradient(160deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .45)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 40px 80px -30px rgba(110, 55, 20, .35); }
.lcard::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(125deg, rgba(255, 255, 255, .18), transparent 28%), radial-gradient(500px 200px at 50% 0%, rgba(255, 150, 70, .14), transparent 70%); }
.lcard .edge { position: absolute; pointer-events: none; }
.lcard .edge.tr { top: 0; right: 0; width: calc(var(--c) * 1.42); height: 1px; background: linear-gradient(90deg, transparent, var(--cyan)); transform-origin: right; transform: rotate(45deg) translateY(calc(var(--c) * .5)); }
.shard { position: absolute; width: 46px; height: 46px; pointer-events: none; z-index: 2; background: linear-gradient(135deg, rgba(255, 180, 130, .55), rgba(252, 97, 5, .12)); box-shadow: inset 0 0 0 1px rgba(255, 220, 195, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.shard.s1 { clip-path: polygon(0 0, 100% 0, 0 100%); }
.shard.s2 { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.lstage { position: relative; width: min(440px, 100%); }
.lstage .shard.s1 { left: -14px; top: -14px; }
.lstage .shard.s2 { right: -14px; bottom: -14px; }
.ltile { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 24px; z-index: 3; pointer-events: none; opacity: 0; background: #fc6105 var(--logo) center / cover no-repeat; box-shadow: 0 0 70px -6px var(--glow), 0 0 0 1px rgba(255, 255, 255, .2); }
.lbrand .mark { width: 52px; height: 52px; border-radius: 14px; }
.lbrand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.lbrand b { display: block; font: 700 14px var(--f-disp); letter-spacing: .14em; }
.lbrand span { display: block; font-size: 12px; color: var(--muted); }
.lcard h1 { font-size: 32px; margin-bottom: 8px; }
.lcard .lead { color: var(--muted); margin-bottom: 24px; }
.lf { display: grid; gap: 8px; margin-bottom: 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.lbox { position: relative; display: flex; align-items: center; height: 52px; border-radius: 15px; background: rgba(14, 9, 5, .42); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .16); transition: box-shadow .35s var(--e-std), background-color .35s; }
:root[data-theme="light"] .lbox { background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px rgba(110, 55, 20, .14); }
.lbox::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .5s var(--e-out); box-shadow: 0 0 12px var(--glow); }
.lbox:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .55), 0 0 0 5px rgba(252, 97, 5, .12), 0 0 30px -8px var(--glow); }
.lbox:focus-within::after { transform: scaleX(1); }
.lbox > .ico { margin: 0 4px 0 16px; color: var(--muted); transition: color .3s; }
.lbox:focus-within > .ico { color: var(--cyan); }
.lbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 12px 0 8px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.lbox input, .lbox input:focus { min-height: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0 12px 0 8px; }
.lbox input::placeholder { color: var(--muted); opacity: .7; font-weight: 500; }
.lbox .peek { border: 0; background: transparent; width: 46px; height: 46px; display: grid; place-items: center; color: var(--muted); border-radius: 12px; }
.lf.err .lbox { box-shadow: inset 0 0 0 1px rgba(255, 107, 129, .7), 0 0 0 5px rgba(255, 107, 129, .12), 0 0 30px -8px rgba(255, 107, 129, .5); }
.lerr { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--danger); margin: -6px 0 14px; }
.lfoot { margin-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.lfoot button { border: 0; background: none; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.hint { margin-top: 16px; padding: 11px 13px; border-radius: 13px; font-size: 12px; color: var(--ink-2); background: var(--glow-soft); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .18); }
.lbtn.done { background: linear-gradient(120deg, #5cf0b6, #22c98a) !important; color: #032016 !important; box-shadow: 0 14px 40px -10px rgba(52, 227, 160, .7) !important; }
.chk path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: chk .5s var(--e-out) forwards; }
@keyframes chk { to { stroke-dashoffset: 0; } }
.rules { display: grid; gap: 6px; margin: -6px 0 16px; font-size: 12.5px; }
.rules div { display: flex; gap: 8px; align-items: center; color: var(--muted); transition: color .3s; }
.rules div.met { color: var(--ok); }

/* =================== APLICAÇÃO =================== */
.rail { position: fixed; z-index: 40; top: calc(14px + env(safe-area-inset-top, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: calc(14px + env(safe-area-inset-left, 0px)); width: var(--rail-w);
  display: flex; flex-direction: column; transition: width .55s var(--e-out), box-shadow .4s; overflow: hidden; }
.rail-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 12px; white-space: nowrap; }
.rail-brand b { display: block; font: 700 14px var(--f-disp); letter-spacing: .16em; }
.rail-brand span { display: block; font-size: 11.5px; color: var(--muted); }
.rail-nav { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 12px; scrollbar-width: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-sec { font: 700 var(--fs-cap)/1.2 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 8px; white-space: nowrap; transition: opacity .3s; }
.rlink { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 5px 10px; border-radius: 14px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; line-height: 1.25; font-weight: 650; border: 0; background: none; width: 100%; text-align: left; transition: color .25s; }
.rlink .ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 11px; transition: color .3s, background-color .3s, box-shadow .3s; }
.rlink .lbl { min-width: 0; text-wrap: balance; transition: opacity .3s .05s; }
/* Menu recolhido: o rótulo fica numa linha (está invisível) e o menu abre largo o bastante para o nome inteiro */
body.rail-min .rail .rlink .lbl { white-space: nowrap; }
.rlink:hover { color: var(--ink); }
.rlink:hover .ic { background: var(--g-inner-hi); }
.rlink[aria-current="page"] { color: var(--ink); }
.rlink[aria-current="page"] .ic { color: #fff; background: linear-gradient(145deg, #ffa25c, #fc6105 60%, #d94a0a); box-shadow: 0 6px 18px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .4); }
.rail-ind { position: absolute; z-index: 0; left: 12px; right: 12px; top: 0; height: 42px; transition: transform .55s var(--e-out), height .4s var(--e-out), opacity .3s; border-radius: 14px; background: linear-gradient(90deg, var(--glow-soft), transparent 85%); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .16); transition: transform .55s var(--e-out), opacity .3s; pointer-events: none; }
.rail-ind::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px var(--cyan); }
.rail-foot { padding: 10px 12px 14px; display: grid; gap: 2px; border-top: 1px solid var(--hair); }
body.rail-min { --rail-w: 84px; }
body.rail-min .rail:not(:hover) .rail-brand .txt, body.rail-min .rail:not(:hover) .rlink .lbl { opacity: 0; }
body.rail-min .rail:not(:hover) .rail-sec { opacity: 0; }
body.rail-min .rail:hover { width: 312px; box-shadow: var(--shadow-lift); }

.main { position: relative; margin-left: calc(var(--rail-w) + 28px + env(safe-area-inset-left, 0px)); transition: margin-left .55s var(--e-out); min-height: 100vh; padding-right: max(18px, env(safe-area-inset-right, 0px)); }
body.rail-min .main { margin-left: calc(84px + 28px + env(safe-area-inset-left, 0px)); }
.topbar { position: sticky; top: calc(14px + env(safe-area-inset-top, 0px)); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; margin: 14px 0 0; border-radius: 22px; }
.topbar .ttl { min-width: 7.5em; flex: 0 1 auto; }
.topbar .ttl b { display: block; font: 700 var(--fs-lg)/1.2 var(--f-disp); letter-spacing: -.01em; text-wrap: balance; }
.cmd { margin-left: auto; display: flex; align-items: center; height: 42px; width: min(340px, 28vw); border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); color: var(--muted); transition: box-shadow .3s, width .5s var(--e-out); }
.cmd:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .5), 0 0 24px -8px var(--glow); width: min(420px, 34vw); }
.cmd .ico { margin: 0 8px 0 13px; }
.cmd input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink); }
.cmd kbd { margin-right: 9px; font: 600 11px var(--f-mono); padding: 3px 7px; border-radius: 7px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); }
.live-chip { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.live-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: beat 2s ease-out infinite; color: var(--ok); }
.datepill { display: inline-flex; flex: none; align-items: center; height: 42px; border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); }
.datepill button { height: 40px; width: 32px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 12px; }
.datepill button:hover { color: var(--ink); }
.datepill .d { display: flex; align-items: center; gap: 7px; padding: 0 6px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.avatar { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font: 800 13px var(--f-disp); color: #fff; background: linear-gradient(145deg, #d94a0a, #fc6105); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 18px -8px var(--glow); flex: none; }
.view { position: relative; padding: 22px 0 130px; max-width: 1800px; }
.phead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 20px; }
.phead .sub { color: var(--muted); margin-top: 8px; max-width: 72ch; }
.phead .act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.chart { position: relative; height: 270px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .gl { stroke: var(--hair); }
.chart .ax { fill: var(--muted); font: 650 11px var(--f-ui); }
.chart .bar { fill: url(#barG); opacity: .5; transition: opacity .25s; }
.chart .bar.hi { opacity: 1; filter: drop-shadow(0 0 12px var(--glow)); }
.chart .col:hover .bar { opacity: 1; }
.chart .ln { fill: none; stroke: url(#lineG); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px var(--glow)); }
.chart .ar { fill: url(#areaG); }
.chart .pt { fill: var(--bg0); stroke: var(--cyan); stroke-width: 2.5; }
.chart .cross { stroke: var(--edge-a); stroke-dasharray: 3 4; opacity: 0; transition: opacity .2s; }
.chart .col { cursor: crosshair; }
.tip { position: absolute; z-index: 3; pointer-events: none; padding: 9px 13px; border-radius: 13px; font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); transition: opacity .2s, left .25s var(--e-out), top .25s var(--e-out); }
.tip b { display: block; font: 750 15px var(--f-disp); }
.alerts { display: grid; gap: 10px; }
.al { display: flex; gap: 12px; align-items: flex-start; padding: 13px; border-radius: 16px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); text-decoration: none; color: inherit; transition: transform .3s var(--e-out), box-shadow .3s; }
.al:hover { transform: translateX(3px); box-shadow: inset 0 0 0 1px var(--edge-b); }
.al .sv { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.al.warn .sv { color: var(--warn); background: var(--warn-soft); box-shadow: 0 0 18px -6px var(--warn); }
.al.danger .sv { color: var(--danger); background: var(--danger-soft); box-shadow: 0 0 18px -6px var(--danger); animation: dpulse 2.4s ease-in-out infinite; }
@keyframes dpulse { 50% { box-shadow: 0 0 26px -2px var(--danger); } }
.al.info .sv { color: var(--info); background: var(--info-soft); }
.al b { display: block; font-size: 13.5px; }
.al span { font-size: 12.5px; color: var(--muted); }
.track { position: relative; height: 34px; display: flex; align-items: center; gap: 12px; }
.track .rail2 { position: relative; flex: 1; height: 8px; border-radius: 999px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); }
.track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--grad); box-shadow: 0 0 14px -2px var(--glow); }
.track .fill.ok { background: linear-gradient(90deg, #1fbf83, #5cf0b6); box-shadow: 0 0 14px -2px rgba(52, 227, 160, .7); }
.track .fill.warn { background: linear-gradient(90deg, #e6a020, #ffd27a); box-shadow: 0 0 14px -2px rgba(255, 192, 77, .6); }
.track .fill.danger { background: linear-gradient(90deg, #ff4d6d, #ff9aa8); box-shadow: 0 0 14px -2px rgba(255, 107, 129, .7); }
.track .truck { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #ffa25c, #fc6105); box-shadow: 0 0 16px -2px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .4); }
.track .truck .ico { width: 14px; height: 14px; }
.track small { width: 92px; text-align: right; font: 600 12px var(--f-mono); color: var(--ink-2); white-space: nowrap; }
.tag-prop { font: 800 10px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--warn); padding: 5px 9px; border-radius: 8px; background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.chk-list { display: grid; gap: 2px; margin-top: 12px; }
.chk-list a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; color: inherit; text-decoration: none; font-size: 13px; font-weight: 650; }
.chk-list a:hover { background: var(--g-inner); }
.chk-list .s { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.chk-list .s.ok { color: var(--ok); background: var(--ok-soft); } .chk-list .s.p { color: var(--warn); background: var(--warn-soft); }
.chk-list .g { flex: 1; min-width: 0; }
.progress-mini { height: 6px; border-radius: 999px; background: var(--g-inner-hi); overflow: hidden; margin-top: 10px; }
.progress-mini span { display: block; height: 100%; background: var(--grad); border-radius: 999px; box-shadow: 0 0 10px var(--glow); }
/* ---------- Mapa (estilizado) ---------- */
svg.map .blk { fill: var(--map-blk); }
svg.map .st { stroke: var(--map-st); stroke-width: 2; fill: none; }
svg.map .mj { stroke: var(--map-mj); stroke-width: 5; fill: none; stroke-linecap: round; }
svg.map .wt { fill: none; stroke: var(--map-wt); stroke-width: 18; stroke-linecap: round; }
svg.map .lbl { fill: var(--map-lbl); font: 700 13px var(--f-disp); letter-spacing: .2em; text-transform: uppercase; }
svg.map .hw { fill: var(--map-lbl); font: 600 11px var(--f-ui); }
svg.map text.dc { opacity: 0; }
svg.map .ghost { fill: none; stroke-width: 2; stroke-linecap: round; opacity: .25; stroke-dasharray: 2 7; }
svg.map .rglow { fill: none; stroke: var(--rc); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; opacity: .22; filter: blur(5px); }
svg.map .route { fill: none; stroke: var(--rc); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
svg.map .route.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.3s var(--e-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
svg.map .comet { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: .03 .97; filter: drop-shadow(0 0 6px var(--rc)); animation: comet 4.5s linear infinite; }
@keyframes comet { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
:root[data-fx="lite"] svg.map .comet { display: none; }
svg.map .route.faded { opacity: .3; }
svg.map .route.preview { stroke: var(--ok); stroke-dasharray: 9 8; animation: dash 1s linear infinite; filter: drop-shadow(0 0 6px var(--ok)); }
@keyframes dash { to { stroke-dashoffset: -17; } }
svg.map .pin { cursor: pointer; }
svg.map .pin .hl { fill: var(--rc); opacity: 0; transition: opacity .2s; }
svg.map .pin .b { fill: var(--map-bg); stroke: var(--rc); stroke-width: 2.5; }
svg.map .pin text { fill: var(--ink); font: 700 11px var(--f-mono); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
svg.map .pin.done .b { fill: var(--ok); stroke: var(--ok); } svg.map .pin.done text { fill: #032016; }
svg.map .pin.fail .b { fill: var(--danger); stroke: var(--danger); } svg.map .pin.fail text { fill: #fff; }
svg.map .pin.flag .b { stroke: var(--warn); stroke-dasharray: 3 3; }
svg.map .pin.next .hl { opacity: .3; animation: nextP 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nextP { from { transform: scale(.7); opacity: .5; } to { transform: scale(1.7); opacity: 0; } }
svg.map .pin.on .hl { opacity: .4; }
svg.map .depot rect { fill: url(#depG); }
svg.map .depot text { fill: #fff; font: 800 10px var(--f-disp); text-anchor: middle; dominant-baseline: central; letter-spacing: .1em; }

/* ---------- Rotas de Entrega (cockpit) ---------- */
.cockpit { position: relative; height: calc(100vh - 200px); min-height: 640px; border-radius: 30px; overflow: hidden; background: var(--map-bg); box-shadow: var(--shadow), inset 0 0 0 1px var(--hair); }
.cockpit > svg.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.cockpit::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .35)); }
:root[data-theme="light"] .cockpit::after { background: radial-gradient(ellipse at center, transparent 60%, rgba(110, 55, 20, .12)); }
.fl { position: absolute; z-index: 3; }
.fl-list { left: 16px; top: 16px; bottom: 16px; width: 286px; display: flex; flex-direction: column; border-radius: 24px; transition: transform .6s var(--e-out), opacity .4s; }
.fl-list.hidden-l { transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
.fl-list .hd { display: flex; align-items: center; gap: 8px; padding: 16px 16px 10px; }
.fl-list .hd h2 { flex: 1; }
.fl-list .ls { flex: 1; overflow-y: auto; padding: 4px 10px 12px; display: grid; gap: 8px; align-content: start; scrollbar-width: thin; }
.ri { position: relative; text-align: left; display: grid; gap: 8px; padding: 13px; border-radius: 17px; border: 0; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow .3s, transform .3s var(--e-out), background-color .3s; }
.ri:hover { transform: translateX(2px); }
.ri[aria-pressed="true"] { background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 70%, transparent), 0 0 26px -10px var(--rc); }
.ri .r1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ri .r1 b { flex: 1; min-width: 0; overflow-wrap: break-word; font-size: 13.5px; }
.ri .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 10px var(--rc); flex: none; }
.ri .mt { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); font-weight: 650; }
.ri .pg { height: 4px; border-radius: 999px; background: var(--g-inner-hi); overflow: hidden; }
.ri .pg span { display: block; height: 100%; background: linear-gradient(90deg, #1fbf83, #5cf0b6); }
.fl.hud { left: 50%; top: 16px; transform: translateX(-50%); display: flex; align-items: stretch; border-radius: 20px; padding: 6px; gap: 2px; max-width: calc(100% - 32px - 286px - 400px - 32px); }
.fl.hud .cell { padding: 7px 14px; border-radius: 14px; min-width: 0; }
.fl.hud .cell + .cell { box-shadow: -1px 0 0 var(--hair); }
.fl.hud .cell span { display: block; font-size: var(--fs-cap); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.fl.hud .cell b { display: block; font: 750 19px/1.2 var(--f-disp); letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fl.hud .cell.id b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.fl.hud .sim-tag { display: flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--ok); font-size: 12px; font-weight: 750; }
.fl.ctrl { left: 318px; bottom: 16px; display: grid; gap: 6px; padding: 6px; border-radius: 18px; transition: left .6s var(--e-out); }
.fl.ctrl.nolist { left: 16px; }
.fl.ctrl button { width: 40px; height: 40px; border: 0; border-radius: 13px; display: grid; place-items: center; background: transparent; color: var(--ink-2); transition: background-color .2s, color .2s; }
.fl.ctrl button:hover { background: var(--g-inner-hi); color: var(--ink); }
.fl.legend { left: 50%; transform: translateX(-50%); bottom: 16px; display: flex; gap: 14px; padding: 9px 14px; border-radius: 15px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.fl.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.fl-det { right: 16px; top: 16px; bottom: 16px; width: 392px; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; }
.fl-det .grab { display: none; }
.det-hd { padding: 18px 18px 12px; display: grid; gap: 6px; }
.det-hd .r1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.det-hd h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.det-sc { flex: 1; overflow-y: auto; padding: 0 16px 14px; scrollbar-width: thin; }
div.kv { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--hair); font-size: 13px; }
div.kv .k { color: var(--muted); display: flex; gap: 8px; align-items: center; font-weight: 650; }
div.kv .v { margin-left: auto; font-weight: 700; text-align: right; }
.sel { position: relative; }
.sel select { appearance: none; -webkit-appearance: none; height: 38px; padding: 0 34px 0 12px; border-radius: 12px; border: 0; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 700; font-size: 13px; max-width: 210px; color: var(--ink); }
.sel select option { color: #1d140e; }
.sel .ico { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.sel select:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .6), 0 0 18px -6px var(--glow); }
.seqbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 12px; }
.cmp { position: relative; overflow: hidden; border-radius: 18px; padding: 15px; margin-bottom: 12px; background: linear-gradient(150deg, rgba(52, 227, 160, .14), rgba(52, 227, 160, .03)); box-shadow: inset 0 0 0 1px rgba(52, 227, 160, .35), 0 0 30px -14px rgba(52, 227, 160, .7); }
.cmp .cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 12px 0; }
.cmp .cols span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.cmp .cols b { display: block; font: 750 22px var(--f-disp); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cmp .cols .after b { color: var(--ok); }
.cmp .bars { display: grid; gap: 6px; margin-bottom: 12px; }
.cmp .bars div { height: 6px; border-radius: 999px; transform-origin: left; }
.cmp .bars .o { background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); }
.cmp .bars .n { background: linear-gradient(90deg, #1fbf83, #5cf0b6); box-shadow: 0 0 12px rgba(52, 227, 160, .6); }
.cmp .delta { font-weight: 800; color: var(--ok); }
.cmp .acts { display: flex; gap: 8px; }
.stops { list-style: none; margin: 0; padding: 0; position: relative; }
.stops::before { content: ""; position: absolute; left: 16px; top: 22px; bottom: 22px; width: 2px; background: linear-gradient(180deg, var(--rc, var(--cyan)), transparent); opacity: .35; }
.stops .stop { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 8px 10px 0; border-radius: 14px; cursor: pointer; transition: background-color .2s; }
.stops .stop:hover, .stops .stop.on { background: var(--g-inner); }
.stops .stop .n { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font: 700 12px var(--f-mono); background: var(--g-solid); box-shadow: inset 0 0 0 2px var(--rc, var(--cyan)), 0 0 14px -6px var(--rc, var(--cyan)); }
.stops .stop.done .n { background: var(--ok); color: #032016; box-shadow: 0 0 14px -4px var(--ok); }
.stops .stop.fail .n { background: var(--danger); color: #fff; box-shadow: 0 0 14px -4px var(--danger); }
.stops .stop.flag .n { box-shadow: inset 0 0 0 2px var(--warn); }
.stops .stop.next .n { box-shadow: inset 0 0 0 2px var(--cyan), 0 0 20px -2px var(--cyan); }
.stops .stop .a { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.stops .stop .m { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; font-weight: 600; }
.stops .stop .s { padding-top: 5px; }
.det-ft { padding: 14px 16px 16px; display: grid; gap: 8px; border-top: 1px solid var(--hair); }
.det-ft .why { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; font-weight: 600; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px; border-radius: 16px; font-size: 13px; margin-bottom: 10px; }
.banner.warn { background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.banner.warn .ico { color: var(--warn); }
.banner.info { background: var(--info-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--info) 30%, transparent); }
.banner.info .ico { color: var(--info); }
.sumg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.sumg div { padding: 10px; border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.sumg b { display: block; font: 750 17px var(--f-disp); letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sumg span { font-size: 11px; color: var(--muted); font-weight: 700; }
.chips-top { display: none; }

/* ---------- Estado de espera ---------- */
.wait { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 70px 20px; }
.wait p { color: var(--muted); max-width: 54ch; }

/* ---------- Modais ---------- */
.scrim { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(10, 6, 3, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
:root[data-theme="light"] .scrim { background: rgba(110, 55, 20, .2); }
.modal { width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.modal .grab { display: none; width: 44px; height: 5px; border-radius: 999px; background: var(--edge-a); opacity: .5; margin: 10px auto 0; }
.m-hd { display: flex; align-items: center; gap: 12px; padding: 20px 22px 8px; }
.m-hd h2 { font-size: 18px; flex: 1; }
.m-bd { padding: 6px 22px 4px; color: var(--ink-2); }
.m-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 22px 22px; flex-wrap: wrap; }
.drop { display: grid; justify-items: center; gap: 8px; padding: 28px; border-radius: 20px; background: var(--g-inner); box-shadow: inset 0 0 0 1.5px var(--edge-b); text-align: center; cursor: pointer; transition: box-shadow .3s, background-color .3s; }
.drop:hover, .drop.over { box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 30px -10px var(--glow); background: var(--glow-soft); }
.drop .ico { color: var(--cyan); width: 30px; height: 30px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 90; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; font-size: 13.5px; font-weight: 600; overflow: hidden; }
.toast .ico { margin-top: 1px; }
.toast.ok .ico { color: var(--ok); } .toast.warn .ico { color: var(--warn); } .toast.info .ico { color: var(--cyan); } .toast.danger .ico { color: var(--danger); }
.toast .tb { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--grad); animation: tb linear forwards; }
@keyframes tb { from { width: 100%; } to { width: 0; } }

/* ---------- Navegação mobile ---------- */
.mnav { display: none; position: fixed; z-index: 45; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 24px; padding: 6px; }
.mnav .in { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mnav .bl { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 18px; background: linear-gradient(150deg, rgba(255, 150, 70, .2), rgba(252, 97, 5, .1)); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .3), 0 0 22px -8px var(--glow); transition: transform .5s var(--e-out), width .5s var(--e-out); }
.mnav button { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 3px; padding: 8px 2px 6px; min-height: 56px; border: 0; background: none; color: var(--muted); font-size: var(--fs-cap); font-weight: 750; transition: color .3s; }
.mnav button .ico { width: 21px; height: 21px; }
.mnav button[aria-current="page"] { color: var(--ink); }
.mnav button[aria-current="page"] .ico { color: var(--cyan); filter: drop-shadow(0 0 6px var(--glow)); }
.mnav button span { max-width: 100%; line-height: 1.15; text-align: center; }
.sh-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(10, 6, 3, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet { position: fixed; z-index: 75; left: 8px; right: 8px; bottom: 8px; max-height: 84vh; display: flex; flex-direction: column; border-radius: 28px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet .grab { width: 44px; height: 5px; border-radius: 999px; background: var(--edge-a); opacity: .5; margin: 10px auto 0; }
.sheet-hd { padding: 12px 16px 8px; display: grid; gap: 12px; }
.sheet-bd { overflow-y: auto; padding: 0 10px 16px; }
.sheet .rlink { height: 48px; }
.ssearch { display: flex; align-items: center; height: 46px; border-radius: 15px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); color: var(--muted); }
.ssearch .ico { margin: 0 8px 0 13px; }
.ssearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; font-size: 15px; color: var(--ink); font-weight: 600; }

/* =================== PORTAL DO MOTORISTA =================== */
.dstage { display: grid; grid-template-columns: minmax(0, 360px) auto; gap: 56px; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 24px 120px; }
.dstage .copy h1 { font-size: 38px; margin: 12px 0 14px; }
.dstage .copy p { color: var(--ink-2); margin-bottom: 10px; }
.dstage .copy ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.dstage .copy li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 13.5px; }
.dstage .copy li .ico { color: var(--cyan); margin-top: 2px; }
.phone { position: relative; width: 392px; height: min(820px, calc(100vh - 120px)); min-height: 600px; border-radius: 52px; padding: 11px; background: linear-gradient(145deg, #2a211b, #0a0705); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 60px 100px -40px rgba(0, 0, 0, .85), 0 0 80px -30px var(--glow); }
.pscreen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; display: flex; flex-direction: column; background: var(--bg0); isolation: isolate; }
.pscreen .atmo { position: absolute; }
.notch { position: absolute; z-index: 9; top: 10px; left: 50%; width: 112px; height: 32px; border-radius: 999px; background: #000; transform: translateX(-50%); }
.dtop { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 54px 16px 10px; }
.dtop .t { flex: 1; min-width: 0; }
.dtop .t span { display: block; font-size: 12px; color: var(--muted); font-weight: 650; }
.dtop .t b { display: block; font: 700 18px var(--f-disp); letter-spacing: -.02em; }
.sync { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 999px; font-size: 11.5px; font-weight: 800; border: 0; }
.sync.on { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
.sync.off { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.sync.busy { color: var(--cyan); background: var(--glow-soft); }
.dbody { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 4px 14px 110px; display: grid; gap: 12px; align-content: start; grid-auto-rows: max-content; scrollbar-width: none; }
.dbody::-webkit-scrollbar { display: none; }
.droute { padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border-radius: 24px; }
.droute .rt b { font: 700 16px var(--f-disp); }
.droute .rt span { display: block; font-size: 12px; color: var(--muted); font-weight: 650; margin-top: 4px; }
.dring { position: relative; width: 66px; height: 66px; }
.dring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dring .tr { fill: none; stroke: var(--g-inner-hi); stroke-width: 6; }
.dring .v { fill: none; stroke: url(#okG); stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(52, 227, 160, .6)); transition: stroke-dashoffset 1s var(--e-out); }
.dring .ctr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.dring .ctr b { font: 800 16px var(--f-disp); }
.dring .ctr span { font-size: 9px; color: var(--muted); font-weight: 800; letter-spacing: .08em; }
.mmap { grid-column: 1 / -1; height: 128px; border-radius: 16px; overflow: hidden; position: relative; background: var(--map-bg); box-shadow: inset 0 0 0 1px var(--hair); }
.mmap svg { width: 100%; height: 100%; display: block; }
.next { position: relative; overflow: hidden; padding: 20px 18px 18px; border-radius: 28px;
  background: radial-gradient(320px 200px at 100% 0%, rgba(255, 150, 70, .35), transparent 60%), radial-gradient(260px 200px at 0% 100%, rgba(217, 74, 10, .3), transparent 65%), linear-gradient(150deg, rgba(252, 97, 5, .5), rgba(110, 55, 20, .55));
  box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .35), inset 0 1px 0 rgba(255, 255, 255, .3), 0 24px 50px -24px var(--glow); color: #fff; backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); }
.next .lb { font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, .75); display: flex; gap: 8px; align-items: center; letter-spacing: .02em; }
.next .ad { font: 700 22px/1.2 var(--f-disp); letter-spacing: -.02em; margin: 12px 0 4px; }
.next .ct { font-size: 13px; color: rgba(255, 255, 255, .78); font-weight: 600; }
.next .chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 16px; }
.next .chips span { font-size: 12px; font-weight: 800; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.next .acts { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; }
.next .btn { --h: 54px; font-size: 15px; border-radius: 17px; }
.next .btn.nv { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.next .btn.rg { background: #fff; color: #3a1600; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .5); }
.dstops { padding: 8px 12px 6px; border-radius: 24px; }
.dstops h3 { padding: 10px 4px 6px; display: flex; justify-content: space-between; font: 700 14px var(--f-disp); }
.dnav { position: absolute; z-index: 5; left: 14px; right: 14px; bottom: 18px; border-radius: 26px; padding: 6px; }
.dnav .in { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.dnav .bl { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; border-radius: 20px; background: linear-gradient(150deg, rgba(255, 150, 70, .22), rgba(252, 97, 5, .1)); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .3); transition: transform .5s var(--e-out); }
.dnav button { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; gap: 8px; height: 52px; border: 0; background: none; color: var(--muted); font-weight: 800; font-size: 13px; transition: color .3s; }
.dnav button[aria-current="page"] { color: var(--ink); }
.dnav button[aria-current="page"] .ico { color: var(--cyan); }
.ext-btn { width: 36px; height: 36px; border-radius: 12px; border: 0; display: grid; place-items: center; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink-2); }
.ext-btn[aria-pressed="true"] { color: #111; background: #ffd75e; box-shadow: 0 0 18px -4px #ffd75e; }
/* Modo externo: superfícies sólidas e alto contraste para sol forte */
.pscreen.outdoor { --g1: rgba(24, 17, 12, .96); --g2: rgba(24, 17, 12, .96); --g-inner: rgba(255, 255, 255, .07); --muted: #e6d6ca; --ink-2: #fff6ef; }
.pscreen.outdoor .atmo { opacity: .3; }
:root[data-theme="light"] .pscreen.outdoor { --g1: #ffffff; --g2: #ffffff; --g-inner: #f6efe8; --muted: #4a3a2f; --ink-2: #1d140e; }
.pscreen.outdoor .next { background: #b4430a; }
.dsh-scrim { position: absolute; inset: 0; z-index: 20; background: rgba(10, 6, 3, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dsh { position: absolute; z-index: 21; left: 8px; right: 8px; bottom: 8px; max-height: 90%; overflow-y: auto; border-radius: 30px; padding: 0 16px 22px; }
.dsh .grab { width: 44px; height: 5px; border-radius: 999px; background: var(--edge-a); opacity: .5; margin: 10px auto 12px; }
.outs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; border: 0; padding: 0; }
.out { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border-radius: 16px; border: 0; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 750; font-size: 13px; text-align: left; transition: box-shadow .3s, background-color .3s, transform .15s; }
.out:active { transform: scale(.97); }
.out .ico { color: var(--oc); }
.out[aria-pressed="true"] { background: color-mix(in srgb, var(--oc) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--oc), 0 0 22px -8px var(--oc); }
.out.full { grid-column: 1 / -1; }
.dfield { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 700; }
.dfield textarea { min-height: 70px; border-radius: 14px; border: 0; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); padding: 11px 13px; resize: vertical; font-size: 15px; color: var(--ink); }
.dfield textarea:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .6), 0 0 18px -6px var(--glow); }
.req { color: var(--warn); font-size: 12px; font-weight: 700; }
.proof { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.proof label, .proof .sig { position: relative; overflow: hidden; display: grid; place-items: center; gap: 6px; min-height: 100px; border-radius: 16px; background: var(--g-inner); box-shadow: inset 0 0 0 1.5px var(--edge-b); font-size: 12px; font-weight: 750; color: var(--muted); cursor: pointer; text-align: center; }
.proof img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sig canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sig .h { pointer-events: none; transition: opacity .3s; }
.succ { display: grid; justify-items: center; gap: 10px; padding: 28px 0 12px; text-align: center; }
.burst { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #032016; background: linear-gradient(145deg, #5cf0b6, #22c98a); box-shadow: 0 0 40px -6px rgba(52, 227, 160, .8); }
.burst .ico { width: 40px; height: 40px; stroke-width: 3; }
.burst::before, .burst::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px rgba(52, 227, 160, .6); animation: ringOut 1.2s var(--e-out) forwards; }
.burst::after { animation-delay: .25s; }
.burst.w { background: linear-gradient(145deg, #ffd27a, #e6a020); box-shadow: 0 0 40px -6px rgba(255, 192, 77, .8); }

/* =================== NAVEGAÇÃO POR ETAPA =================== */
.rail-home { margin: 2px 0 6px; }
.stage { position: relative; }
.stage-hd { display: flex; align-items: center; gap: 12px; height: 34px; padding: 12px 10px 4px; white-space: nowrap; }
.stage-hd .sn { position: relative; z-index: 1; width: 32px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 999px; font: 700 10.5px var(--f-mono); color: var(--muted); background: var(--g-solid); box-shadow: inset 0 0 0 1px var(--hair); transition: color .3s, box-shadow .3s; }
.stage-hd .st { font: 750 10.5px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); transition: opacity .3s, color .3s; }
.stage.on .stage-hd .sn { color: #fff; background: linear-gradient(145deg, #ffa25c, #fc6105); box-shadow: 0 0 14px -2px var(--glow); }
.stage.on .stage-hd .st { color: var(--ink); }
.stage.spine::before { content: ""; position: absolute; left: 25px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, transparent, var(--hair) 10%, var(--hair) 90%, transparent); }
.stage.spine:first-of-type::before { top: 18px; }
.stage.spine.last::before { bottom: calc(100% - 22px); }
body.rail-min .rail:not(:hover) .stage-hd .st { opacity: 0; }
.rail-plain .rail-sec { padding-top: 18px; }

/* Ações rápidas */
.qa-btn { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px 0 12px; border-radius: 14px; border: 0; color: #fff; font-weight: 800; font-size: 13px; white-space: nowrap;
  background: linear-gradient(120deg, #ffa25c, #fc6105 60%, #d94a0a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 26px -10px var(--glow); }
.qa-btn kbd { font: 600 10.5px var(--f-mono); padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); }
.qa { position: fixed; z-index: 85; top: calc(80px + env(safe-area-inset-top, 0px)); right: max(18px, env(safe-area-inset-right, 0px)); width: min(440px, calc(100vw - 24px)); padding: 10px; border-radius: 24px; }
.qa .ssearch { margin-bottom: 8px; }
.qa h3 { font: 750 10.5px var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 6px; }
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qa-it { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border-radius: 16px; border: 0; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); text-align: left; color: var(--ink); font-weight: 750; font-size: 13px; transition: box-shadow .25s, transform .2s var(--e-out); }
.qa-it:hover, .qa-it:focus-visible { box-shadow: inset 0 0 0 1px var(--edge-b), 0 8px 22px -12px var(--glow); transform: translateY(-1px); }
.qa-it .i { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; color: var(--cyan); background: var(--glow-soft); }
.qa-it small { display: block; font-size: 11px; color: var(--muted); font-weight: 650; }

/* =================== CENTRAL DE OPERAÇÕES (Dashboard) =================== */
.ops-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 18px; }
.ops-head .sub { color: var(--muted); margin-top: 8px; }
.ops-head .act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.c8 { grid-column: span 8; } .c4 { grid-column: span 4; } .c12 { grid-column: span 12; } .c7 { grid-column: span 7; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }

/* Esteira do fluxo: Recebimento → Bipagem → Planejamento → Carregamento → Entregas */
.flow { grid-column: span 12; padding: 18px 20px 20px; overflow: hidden;
  background: radial-gradient(900px 220px at 50% 0%, rgba(252, 97, 5, .14), transparent 70%), linear-gradient(150deg, var(--g1), var(--g2)); }
.flow-hd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.flow-hd .bn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.stages { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.belt { position: absolute; left: 10%; right: 10%; top: 25px; height: 4px; border-radius: 4px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); }
.belt .done { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--grad); box-shadow: 0 0 14px var(--glow); }
.belt .pk { position: absolute; top: -4px; width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(145deg, #ffe1c7, #ff9a4d); box-shadow: 0 0 10px #ff9a4d; animation: belt 7s linear infinite; }
.belt .pk.w { background: linear-gradient(145deg, #ffe7b0, #ffc04d); box-shadow: 0 0 10px #ffc04d; }
@keyframes belt { from { left: 0; opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } to { left: calc(100% - 12px); opacity: 0; } }
:root[data-fx="lite"] .belt .pk { animation-duration: 14s; }
.stg { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 0 6px 4px; text-decoration: none; color: inherit; border-radius: 20px; }
.stg .node { position: relative; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: var(--cyan); margin-bottom: 8px;
  background: var(--g-solid); box-shadow: inset 0 0 0 1px var(--edge-b), 0 10px 26px -12px var(--glow); transition: transform .35s var(--e-out), box-shadow .3s; }
.stg .node .k { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font: 700 10.5px var(--f-mono); color: var(--ink); background: var(--g-solid); box-shadow: inset 0 0 0 1px var(--hair); }
.stg:hover .node { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--cyan), 0 14px 30px -10px var(--glow); }
.stg.ok .node { color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 50%, transparent), 0 10px 26px -12px rgba(52, 227, 160, .6); }
.stg.hot .node { color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--warn), 0 0 34px -6px rgba(255, 192, 77, .75); }
.stg.hot .node::after { content: ""; position: absolute; inset: -6px; border-radius: 22px; box-shadow: 0 0 0 2px rgba(255, 192, 77, .45); animation: ringOut 2.4s var(--e-std) infinite; }
.stg .nm { font: 750 11px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stg .v { font: 800 clamp(26px, 2.6vw, 36px)/1.05 var(--f-disp); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stg .v small { font: 700 13px var(--f-disp); color: var(--muted); letter-spacing: -.01em; margin-left: 4px; }
.stg .s { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.stg .t { margin-top: 6px; }

/* Mapa da operação */
.opmap { position: relative; min-height: 470px; padding: 0; overflow: hidden; }
.opmap .mhost { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: var(--map-bg); }
.opmap .mhost svg { width: 100%; height: 100%; display: block; }
.opmap .ohd { position: absolute; z-index: 2; left: 14px; top: 14px; right: 14px; display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; pointer-events: none; }
.opmap .ohd > * { pointer-events: auto; }
.opmap .ttl { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 16px; }
.opmap .hudc { margin-left: auto; display: flex; padding: 5px; border-radius: 16px; }
.opmap .hudc div { padding: 4px 12px; }
.opmap .hudc div + div { box-shadow: -1px 0 0 var(--hair); }
.opmap .hudc span { display: block; font-size: var(--fs-cap); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.opmap .hudc b { font: 750 16px var(--f-disp); font-variant-numeric: tabular-nums; }
.opmap .oleg { position: absolute; z-index: 2; left: 14px; bottom: 14px; display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 14px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); max-width: calc(100% - 28px); }
.opmap .oleg i { display: inline-block; width: 14px; height: 3px; border-radius: 3px; margin-right: 6px; vertical-align: 3px; }
svg.rmap .city circle.c { fill: var(--map-bg); stroke: var(--cyan); stroke-width: 2; transition: r .3s; }
svg.rmap .city circle.h { fill: var(--cyan); opacity: .14; }
svg.rmap .city text { fill: var(--ink); font: 700 11px var(--f-ui); paint-order: stroke; stroke: var(--map-bg); stroke-width: 3px; }
svg.rmap .city text.v { fill: var(--muted); font: 600 10px var(--f-mono); }
svg.rmap .city.pool circle.c { stroke: var(--warn); stroke-dasharray: 3 3; }
svg.rmap .city.pool circle.h { fill: var(--warn); opacity: .2; animation: poolP 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes poolP { 50% { transform: scale(1.35); opacity: .05; } }
svg.rmap .rl { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s, stroke-width .3s; }
svg.rmap .rl.g-fin { stroke: var(--ok); opacity: .35; }
svg.rmap .rl.g-rua { stroke: var(--info); filter: drop-shadow(0 0 4px var(--info)); }
svg.rmap .rl.g-car { stroke: var(--load); }
svg.rmap .rl.g-esp { stroke: var(--warn); stroke-dasharray: 6 6; }
svg.rmap.focus .rl { opacity: .12; }
svg.rmap.focus .rl.on { opacity: 1; stroke-width: 4.5; }
svg.rmap .truckdot { fill: #fff; filter: drop-shadow(0 0 6px var(--info)); }
svg.rmap .base rect { fill: url(#depG); }
svg.rmap .base text { fill: #fff; font: 800 10px var(--f-disp); text-anchor: middle; dominant-baseline: central; letter-spacing: .1em; }
svg.rmap .base .ring1 { fill: none; stroke: rgba(255, 150, 70, .45); animation: ringOut 3.2s var(--e-std) infinite; transform-box: fill-box; transform-origin: center; }
:root[data-fx="lite"] svg.rmap .base .ring1, :root[data-fx="lite"] svg.rmap .city.pool circle.h { animation: none; }

/* Pendências */
.pend { display: grid; gap: 8px; }
.pd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 16px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); text-decoration: none; color: inherit; transition: transform .3s var(--e-out), box-shadow .3s; }
.pd:hover { transform: translateX(3px); box-shadow: inset 0 0 0 1px var(--edge-b); }
.pd .sb { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font: 700 11px var(--f-mono); color: var(--ink-2); background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); }
.pd.warn .sb { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.pd.danger .sb { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent), 0 0 18px -6px var(--danger); }
.pd.ok .sb { color: var(--ok); background: var(--ok-soft); }
.pd b { display: block; font-size: 13.5px; }
.pd span.x { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.pd > .ico { color: var(--muted); }
.pd.ok b { color: var(--ink-2); font-weight: 650; }
.pend-ok { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* Rotas do dia no pátio */
.yard { display: grid; gap: 6px; }
.yl { display: grid; grid-template-columns: 76px minmax(0, 1.3fr) minmax(0, 1fr) 150px minmax(0, 1.6fr); gap: 16px; align-items: center; padding: 10px 12px; border-radius: 16px; transition: background-color .25s; cursor: default; }
.yl:hover, .yl.on { background: var(--g-inner); }
.yl .cd { display: flex; align-items: center; gap: 8px; }
.yl .cd i { width: 9px; height: 9px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px var(--rc); flex: none; }
.yl .nm b { display: block; font-size: 13.5px; overflow-wrap: break-word; }
.yl .nm span { display: block; font-size: 11.5px; color: var(--muted); overflow-wrap: break-word; font-weight: 600; }
.yl .dv { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.yl .dv .av { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font: 800 10px var(--f-disp); background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); flex: none; }
.yl .dv span { overflow-wrap: break-word; }
.cap { display: grid; gap: 5px; }
.cap .bar { height: 7px; border-radius: 999px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.cap .bar span { display: block; height: 100%; border-radius: 999px; background: var(--grad); box-shadow: 0 0 10px var(--glow); transform-origin: left; }
.cap .bar span.over { background: linear-gradient(90deg, #ff4d6d, #ff9aa8); }
.cap small { font: 600 11.5px var(--f-mono); color: var(--ink-2); display: flex; justify-content: space-between; }
.lsteps { display: grid; gap: 6px; }
.lsteps .dots { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
.lsteps .dots i { height: 6px; border-radius: 3px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); }
.lsteps .dots i.d { background: var(--blue); box-shadow: none; opacity: .65; }
.lsteps .dots i.c { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: cur 1.6s ease-in-out infinite; }
.lsteps .dots.fin i.d, .lsteps .dots.fin i.c { background: var(--ok); box-shadow: none; animation: none; opacity: .8; }
.lsteps .dots.pen i.c { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
@keyframes cur { 50% { opacity: .45; } }
.lsteps .lb { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.lsteps .lb span:last-child { color: var(--muted); font-weight: 600; }

/* Entregas em campo */
.field-r { display: grid; gap: 10px; }
.fr { display: grid; gap: 7px; padding: 12px; border-radius: 16px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); }
.fr .r1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fr .r1 b { flex: 1; min-width: 0; overflow-wrap: break-word; font-size: 13.5px; }
.fr .prog { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--g-inner-hi); gap: 2px; }
.fr .prog .e { background: linear-gradient(90deg, #1fbf83, #5cf0b6); box-shadow: 0 0 10px rgba(52, 227, 160, .5); }
.fr .prog .o { background: var(--danger); }
.fr .mt { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); font-weight: 650; }
.fr .mt b { color: var(--ink); }

/* =================== PLANEJAMENTO =================== */
.console { padding: 16px 18px; display: grid; gap: 14px; margin-bottom: var(--gap); }
.console .row1 { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.fld { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.fld input[type="number"] { width: 136px; max-width: 100%; height: 42px; border-radius: 12px; border: 0; padding: 0 12px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font: 700 14px var(--f-mono); color: var(--ink); }
.fld input:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .6), 0 0 18px -6px var(--glow); }
.tg { display: inline-flex; align-items: center; gap: 9px; height: 40px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tg .sw2 { position: relative; width: 36px; height: 21px; border-radius: 999px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); transition: background-color .3s; flex: none; }
.tg .sw2::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--ink-2); transition: transform .35s var(--e-out), background-color .3s; }
.tg input:checked + .sw2 { background: linear-gradient(120deg, #ffa25c, #fc6105); }
.tg input:checked + .sw2::after { transform: translateX(15px); background: #fff; }
.tg input:focus-visible + .sw2 { outline: 2px solid var(--cyan); outline-offset: 2px; }
.console .note { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.console .note .ico { margin-top: 1px; flex: none; }
.console .gen { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: var(--gap); }
.bal > div { padding: 14px 18px; position: relative; }
.bal > div + div::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: linear-gradient(180deg, transparent, var(--edge-a), transparent); opacity: .4; }
.bal span { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.bal b { display: block; font: 800 26px/1.15 var(--f-disp); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bal small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.bal .w b { color: var(--warn); }
.pool { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-c { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 6px 4px 14px; line-height: 1.2; text-align: left; border-radius: 999px; border: 0; font-weight: 750; font-size: 13px; color: var(--ink);
  background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent), 0 0 20px -10px var(--warn); transition: transform .25s var(--e-out); }
.chip-c:hover { transform: translateY(-2px); }
.chip-c b { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font: 700 12px var(--f-mono); background: var(--g-solid); }
.chip-c.ret { background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink-2); }
.chip-c.ret .ico { color: var(--warn); }
.ptool { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 18px; margin: var(--gap) 0 12px; }
.ptool .grow { flex: 1 0 auto; }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
.plan-side { position: sticky; top: 100px; display: grid; gap: var(--gap); }
.pmap { height: 360px; padding: 0; overflow: hidden; }
.pmap .mhost { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: var(--map-bg); }
.pmap .mhost svg { width: 100%; height: 100%; display: block; }
.pmap .ttl { position: absolute; z-index: 2; left: 12px; top: 12px; display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border-radius: 15px; }
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rc { --rc: var(--blue); position: relative; display: grid; gap: 12px; padding: 14px; border-radius: 22px; transition: transform .35s var(--e-out), box-shadow .3s; }
.rc:hover, .rc.on { box-shadow: var(--shadow-lift), inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent); }
.rc.sel { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--cyan), 0 0 30px -12px var(--glow); }
.rc.new { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--ok), 0 0 34px -10px rgba(52, 227, 160, .6); }
.rc .hd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.rc .hd .ttl b { display: block; font: 700 14.5px var(--f-disp); letter-spacing: -.01em; overflow-wrap: break-word; }
.rc .hd .ttl > span { display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); font-weight: 650; flex-wrap: wrap; margin-top: 3px; }
.ck { position: relative; width: 22px; height: 22px; margin-top: 2px; }
.ck input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ck span { position: absolute; inset: 0; border-radius: 7px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1.5px var(--edge-b); display: grid; place-items: center; color: transparent; pointer-events: none; transition: background-color .2s; }
.ck input:checked + span { background: linear-gradient(145deg, #ffa25c, #fc6105); color: #fff; box-shadow: 0 0 12px -2px var(--glow); }
.ck input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.truckcap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 3px; height: 34px; }
.truckcap .box { position: relative; border-radius: 8px 4px 4px 8px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.truckcap .box .f { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 55%, transparent), var(--rc)); box-shadow: 0 0 18px -4px var(--rc); transform-origin: left; }
.truckcap .box .f::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 17px, rgba(0, 0, 0, .22) 17px 19px); }
.truckcap .box .lab { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font: 700 12px var(--f-mono); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
:root[data-theme="light"] .truckcap .box .lab { color: var(--ink); text-shadow: 0 0 6px rgba(255, 255, 255, .9); }
.truckcap .cab { border-radius: 4px 12px 6px 4px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); display: grid; place-items: center; color: var(--muted); }
.truckcap.over .box { box-shadow: inset 0 0 0 1.5px var(--danger); }
.rstops { display: grid; gap: 2px; }
.rstops div { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 10px; font-size: 13px; font-weight: 650; }
.rstops div:hover { background: var(--g-inner); }
.rstops i { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font: 700 10.5px var(--f-mono); font-style: normal; color: var(--ink-2); background: var(--g-inner-hi); }
.rstops b { font: 700 12px var(--f-mono); color: var(--ink-2); }
.rc .ft { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rc .ft .grow { flex: 1; }
.rc .ft .ibtn { width: 34px; height: 34px; border-radius: 11px; }
.rc .sel select { max-width: 100%; height: 36px; font-size: 13px; }
.alt3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.alt { padding: 14px; border-radius: 18px; display: grid; gap: 10px; align-content: start; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); }
.alt.best { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 60%, transparent), 0 0 26px -12px var(--ok); }
.alt h3 { display: flex; justify-content: space-between; gap: 6px; align-items: center; font: 700 14px var(--f-disp); }
.alt .nums { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.alt .nums div { padding: 8px 10px; border-radius: 12px; background: var(--g-inner-hi); }
.alt .nums b { display: block; font: 750 18px var(--f-disp); }
.alt .nums span { font-size: 11px; color: var(--muted); font-weight: 700; }
.alt ol { margin: 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); display: grid; gap: 4px; }
.fly { position: fixed; z-index: 70; pointer-events: none; }

/* =================== CENTRAL DE BIPAGEM =================== */
.scan-wrap { max-width: none; }
.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
.cbtn { display: grid; gap: 4px; text-align: left; padding: 14px; border-radius: 18px; border: 0; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); transition: transform .25s var(--e-out), box-shadow .3s; }
.cbtn:hover, .cbtn:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--cyan), 0 12px 26px -14px var(--glow); }
.cbtn strong { font: 700 15px var(--f-disp); }
.cbtn span { font-size: 12px; color: var(--muted); font-weight: 600; }
.cbtn .v { color: var(--ink-2); }
.scan-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: var(--gap); }
.scan-top .city { font: 800 clamp(30px, 4vw, 46px)/1 var(--f-disp); letter-spacing: -.04em; margin: 6px 0 6px; }
.scan-top .who { font-size: 12.5px; color: var(--muted); font-weight: 650; display: flex; gap: 6px; align-items: center; }
.scan-top .r { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.syncb { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 14px; font-size: 12.5px; font-weight: 800; }
.syncb.ok { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
.syncb.warn { color: var(--cyan); background: var(--glow-soft); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .3); }
.syncb.danger { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.scan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.reader { position: relative; padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.reader label { font-size: 12.5px; font-weight: 750; color: var(--ink-2); }
.sbox { position: relative; display: flex; align-items: center; height: 76px; border-radius: 22px; background: rgba(14, 9, 5, .45); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .2); overflow: hidden; transition: box-shadow .3s; }
:root[data-theme="light"] .sbox { background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px rgba(110, 55, 20, .16); }
.sbox:focus-within { box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 0 6px rgba(252, 97, 5, .12), 0 0 40px -10px var(--glow); }
.sbox > .ico { width: 30px; height: 30px; margin: 0 6px 0 22px; color: var(--cyan); }
.sbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 16px 0 10px; font: 600 clamp(18px, 2.4vw, 26px) var(--f-mono); letter-spacing: .04em; color: var(--ink); }
.sbox input::placeholder { font: 600 15px var(--f-ui); letter-spacing: 0; color: var(--muted); opacity: .8; }
.sbox .laser { position: absolute; left: 0; right: 0; height: 2px; top: 50%; background: linear-gradient(90deg, transparent, rgba(255, 70, 90, .9), transparent); box-shadow: 0 0 12px rgba(255, 70, 90, .8); opacity: 0; pointer-events: none; }
.sbox:focus-within .laser { animation: laser 2.2s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 18%; opacity: .0; } 10% { opacity: .9; } 50% { top: 82%; opacity: .9; } 90% { opacity: .9; } }
:root[data-fx="lite"] .sbox:focus-within .laser { animation: none; }
.fb { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; min-height: 112px; padding: 18px 20px; border-radius: 22px; font-size: 15px; font-weight: 650; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); transition: background-color .25s, box-shadow .25s; }
.fb .fi { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--g-inner-hi); color: var(--muted); }
.fb .fi .ico { width: 30px; height: 30px; }
.fb b.cd { font-family: var(--f-mono); }
.fb .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.fb.ok { background: linear-gradient(150deg, rgba(52, 227, 160, .2), rgba(52, 227, 160, .05)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 55%, transparent), 0 0 40px -16px var(--ok); }
.fb.ok .fi { color: #032016; background: linear-gradient(145deg, #5cf0b6, #22c98a); box-shadow: 0 0 26px -6px var(--ok); }
.fb.warn { background: linear-gradient(150deg, rgba(255, 192, 77, .2), rgba(255, 192, 77, .05)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 60%, transparent), 0 0 40px -16px var(--warn); }
.fb.warn .fi { color: #2a1a00; background: linear-gradient(145deg, #ffd27a, #e6a020); }
.fb.danger { background: linear-gradient(150deg, rgba(255, 107, 129, .2), rgba(255, 107, 129, .05)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 60%, transparent), 0 0 40px -16px var(--danger); }
.fb.danger .fi { color: #fff; background: linear-gradient(145deg, #ff8a9b, #e23a57); }
.btn.dng { color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); }
.sacts { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; }
.tots { display: grid; gap: 10px; }
.tot { padding: 16px 18px; border-radius: 20px; }
.tot span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.tot b { display: block; font: 800 30px/1.1 var(--f-disp); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tot.big b { font-size: clamp(54px, 6vw, 76px); line-height: 1.05; margin-top: 10px; }
.tot.big { padding: 20px; background: radial-gradient(400px 200px at 100% 0%, rgba(255, 150, 70, .22), transparent 70%), linear-gradient(150deg, var(--g1), var(--g2)); }
.tot-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.tot-row .tot { padding: 12px 14px; }
.tot-row .tot b { font-size: 22px; }
.recent { margin-top: var(--gap); }
.rd { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 12px; font-size: 13px; }
.rd:nth-child(odd) { background: var(--g-inner); }
.rd .tm { font: 600 12px var(--f-mono); color: var(--muted); }
.rd .cd { font: 650 13.5px var(--f-mono); overflow-wrap: anywhere; }
.rd.cancel .cd { text-decoration: line-through; color: var(--muted); }
.scan-note { font-size: 12px; color: var(--muted); margin-top: 12px; font-weight: 600; }

/* =================== CARREGAMENTO =================== */
.lpipe { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 8px; padding: 4px 0 10px; margin-bottom: 6px; }
.lp { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 10px 14px; border-radius: 16px; border: 0; text-align: left; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); transition: box-shadow .3s, transform .25s var(--e-out); }
.lp:hover { transform: translateY(-2px); }
.lp span { font-size: var(--fs-cap); line-height: 1.25; font-weight: 700; color: var(--muted); }
.lp b { font: 800 22px var(--f-disp); font-variant-numeric: tabular-nums; }
.lp[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 24px -10px var(--glow); background: var(--g-inner-hi); }
.lp.pen b { color: var(--danger); }
.lp.zero b { color: var(--muted); }
.lcards { display: grid; gap: 10px; }
.lc { --rc: var(--blue); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) minmax(0, 1.2fr); gap: 18px; align-items: center; padding: 14px 16px; border-radius: 22px; }
.lc .id { display: grid; gap: 4px; min-width: 0; }
.lc .id .r1 { display: flex; gap: 8px; align-items: center; min-width: 0; }
.lc .id .r1 b { font: 700 15px var(--f-disp); overflow-wrap: break-word; }
.lc .id small { font-size: 12px; color: var(--muted); font-weight: 600; overflow-wrap: break-word; }
.lc .id .dv { display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.cnt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cnt > div { padding: 9px 12px; border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.cnt span { display: block; font-size: 11px; font-weight: 750; color: var(--muted); }
.cnt b { font: 800 20px var(--f-disp); font-variant-numeric: tabular-nums; }
.cnt .conf input { width: 100%; height: 36px; border: 0; border-radius: 9px; padding: 0 8px; background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--hair); font: 700 17px var(--f-mono); color: var(--ink); }
.cnt .conf input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--cyan), 0 0 14px -4px var(--glow); }
.cnt .conf.diff input { box-shadow: inset 0 0 0 1.5px var(--danger); }
.cnt .conf em { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--danger); margin-top: 3px; }
.lfill { grid-column: 1 / -1; height: 5px; border-radius: 999px; margin-top: 8px; background: var(--g-inner-hi); overflow: hidden; }
.lfill span { display: block; height: 100%; background: var(--grad); box-shadow: 0 0 10px var(--glow); transition: width .8s var(--e-out); }
.lc .ctl { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.lc .ctl .sel select { max-width: 200px; }
.lc .upd { flex-basis: 100%; text-align: right; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.lc.saved { animation: savedG 1.4s var(--e-out); }
@keyframes savedG { 0% { box-shadow: var(--shadow), inset 0 0 0 2px var(--ok), 0 0 40px -6px var(--ok); } 100% { box-shadow: var(--shadow); } }

/* Barra inferior: Bipar em destaque no centro */
.mnav button.scan .ico { width: 46px; height: 46px; padding: 12px; margin-top: -20px; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #ffa25c, #fc6105 60%, #d94a0a); box-shadow: 0 10px 24px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .4); }
.mnav button.scan[aria-current="page"] .ico { color: #fff; filter: none; box-shadow: 0 0 0 3px var(--glow-soft), 0 10px 24px -8px var(--glow); }
svg.rmap .rl.pl { stroke: var(--rc); opacity: .9; }
svg.rmap .rl.pl:hover { stroke-width: 4; }

/* View Transitions: troca de tema com revelação circular */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* =================== Responsividade =================== */
@media (max-width: 1399px) {
  .yl { grid-template-columns: 70px minmax(0, 1.2fr) minmax(0, 1fr) 130px minmax(0, 1.4fr); gap: 12px; }
  .fl.hud .cell.tol { display: none; }
  .plan-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1279px) {
  .c8, .c4, .c7, .c5 { grid-column: span 12; }
  .c6 { grid-column: span 6; }
  .opmap { min-height: 420px; }
  .fl-list { width: 250px; }
  .fl.ctrl { left: 282px; }
  .fl-det { width: 350px; }
  .fl.hud { max-width: calc(100% - 32px - 250px - 350px - 32px); }
  .fl.hud .cell.dur { display: none; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-side { position: relative; top: 0; grid-template-columns: minmax(0, 1fr); }
  .scan-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .lc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .lc .ctl { grid-column: 1 / -1; justify-content: flex-start; }
  .lc .upd { flex-basis: auto; margin-left: auto; }
}
@media (max-width: 1099px) {
  body { --rail-w: 84px; }
  .rail:not(:hover) .rail-brand .txt, .rail:not(:hover) .rlink .lbl, .rail:not(:hover) .rail-sec, .rail:not(:hover) .stage-hd .st { opacity: 0; }
  .rail:hover { width: 280px; box-shadow: var(--shadow-lift); }
  .cmd { width: 42px; flex: none; justify-content: center; } .cmd input, .cmd kbd { display: none; } .cmd .ico { margin: 0; }
  .cmd:focus-within { width: 42px; }
  .live-chip span { display: none; } .live-chip { padding: 0 14px; }
  .qa-btn kbd { display: none; }
  .yl { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px 12px; }
  .yl .dv { grid-column: 2; grid-row: 2; }
  .yl .cap { grid-column: 3; grid-row: 1 / 3; width: 120px; }
  .yl .lsteps { grid-column: 1 / -1; grid-row: 3; }
  .stages { gap: 8px; }
  .stg .s { font-size: 12px; }
  .scan-grid { grid-template-columns: minmax(0, 1fr); }
  .tots { grid-template-columns: 1.3fr 1fr; }
  .tots .tot-row { grid-template-columns: 1fr; }
  /* Cockpit: mapa em cima, detalhes como folha */
  .cockpit { height: calc(100vh - 170px); min-height: 620px; }
  .fl-list { display: none; }
  .chips-top { display: flex; position: absolute; z-index: 4; left: 12px; right: 12px; top: 12px; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
  .chips-top::-webkit-scrollbar { display: none; }
  .chips-top button { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 14px; border: 0; font-weight: 750; font-size: 12.5px; color: var(--ink); }
  .chips-top button .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px var(--rc); }
  .chips-top button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--rc), 0 0 20px -8px var(--rc), var(--shadow); }
  .fl.hud { top: 62px; left: 12px; transform: none; max-width: calc(100% - 24px - 60px); }
  .fl.ctrl { left: auto; right: 12px; top: 62px; bottom: auto; }
  .fl.ctrl.nolist { left: auto; }
  .fl.legend { display: none; }
  .fl-det { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 78%; border-radius: 28px 28px 0 0; transform: translateY(calc(100% - var(--peek, 168px))); transition: transform .6s var(--e-out); }
  .fl-det.open { transform: none; }
  .fl-det .grab { display: block; width: 100%; height: 26px; border: 0; background: none; padding: 0; }
  .fl-det .grab::before { content: ""; display: block; width: 46px; height: 5px; border-radius: 999px; background: var(--edge-a); opacity: .6; margin: 10px auto 0; }
  .det-hd { padding-top: 6px; }
}
@media (max-width: 899px) {
  .c6 { grid-column: span 12; }
  .bal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bal > div:nth-child(4)::before { display: none; }
  .alt3 { grid-template-columns: minmax(0, 1fr); }
  .dstage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 28px; }
  .dstage .copy { max-width: 480px; }
  /* Esteira vira linha do tempo vertical */
  .stages { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .belt { left: 26px; right: auto; top: 26px; bottom: 26px; width: 4px; height: auto; }
  .belt .done { right: 0; bottom: auto; width: 100%; }
  .belt .pk { left: -4px !important; animation-name: beltV; }
  @keyframes beltV { from { top: 0; opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } to { top: calc(100% - 12px); opacity: 0; } }
  .stg { grid-template-columns: 54px minmax(0, 1fr) max-content; grid-template-rows: auto auto; justify-items: start; text-align: left; gap: 0 14px; padding: 8px 0; align-items: center; }
  .stg .node { grid-row: 1 / 3; margin: 0; }
  .stg .nm { grid-column: 2; }
  .stg .v { grid-column: 3; grid-row: 1 / 3; font-size: 28px; text-align: right; }
  .stg .s { grid-column: 2; }
  .stg .t { display: none; }
  .lc { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 599px) {
  .rail { display: none; }
  .main, body.rail-min .main { margin-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .topbar { top: calc(8px + env(safe-area-inset-top, 0px)); margin-top: 8px; padding: 8px; gap: 8px; border-radius: 20px; }
  .topbar .mmark { display: grid !important; width: 38px; height: 38px; }
  .topbar .ttl .eyebrow { display: none; }
  .topbar .ttl b { font-size: 15px; }
  .datepill, .live-chip, #themeTop, .cmd { display: none; }
  .qa-btn { height: 38px; padding: 0 12px; } .qa-btn .t { display: none; }
  .avatar { width: 38px; height: 38px; border-radius: 13px; }
  .qa { top: auto; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); right: 12px; left: 12px; width: auto; max-height: 70vh; overflow-y: auto; }
  .qa-grid { grid-template-columns: minmax(0, 1fr); }
  .view { padding: 16px 4px 170px; }
  h1 { font-size: 25px; }
  .phead, .ops-head { margin-bottom: 14px; } .phead .act, .ops-head .act { margin-left: 0; width: 100%; } .phead .act .btn, .ops-head .act .btn { flex: 1; }
  :root { --gap: 12px; --r: 22px; }
  .glass-hd { padding: 16px 16px 0; } .glass-bd { padding: 14px 16px 16px; }
  .flow { padding: 16px 14px; }
  .flow-hd .bn { margin-left: 0; }
  .opmap { min-height: 380px; }
  .opmap .hudc { margin-left: 0; }
  .opmap .hudc div { padding: 3px 9px; }
  .opmap .oleg { display: none; }
  .yl { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 8px; }
  .yl .cd { grid-column: 1; grid-row: 1; }
  .yl .nm { grid-column: 1 / -1; grid-row: 2; }
  .yl .dv { grid-column: 1 / -1; grid-row: 3; }
  .yl .cap { grid-column: 2; grid-row: 1; width: 110px; }
  .yl .lsteps { grid-row: 4; }
  .chart { height: 220px; }
  .mnav { display: block; }
  .toasts { left: 12px; right: 12px; width: auto; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .btn { --h: 46px; } .btn.sm { --h: 40px; }
  .console { padding: 14px; } .console .gen { margin-left: 0; width: 100%; } .console .gen .btn { flex: 1; }
  .console .fld { max-width: 100%; min-width: 0; }
  .ops-head .act { display: grid; grid-template-columns: 1fr 1fr; } .ops-head .act .btn { padding: 0 10px; } .ops-head .act .btn.primary { grid-column: 1 / -1; }
  .console .seg, .glass-hd .act .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .console .seg::-webkit-scrollbar, .glass-hd .act .seg::-webkit-scrollbar { display: none; }
  .glass-hd .act { margin-left: 0; width: 100%; min-width: 0; }
  .seg button { padding: 0 12px; }
  .bal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bal > div { padding: 12px 14px; } .bal > div::before { display: none; }
  .bal b { font-size: 22px; }
  .rcards { grid-template-columns: minmax(0, 1fr); }
  .ptool .grow { display: none; }
  .pmap { height: 280px; }
  .reader { padding: 14px; }
  .sbox { height: 64px; border-radius: 18px; } .sbox > .ico { margin-left: 14px; width: 24px; height: 24px; }
  .fb { min-height: 96px; padding: 14px; gap: 12px; font-size: 14px; } .fb .fi { width: 46px; height: 46px; border-radius: 14px; }
  .sacts { grid-template-columns: 1fr 1fr; } .sacts .btn.primary { grid-column: 1 / -1; }
  .tots { grid-template-columns: minmax(0, 1fr); }
  .tots .tot-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tot-row .tot b { font-size: 18px; } .tot-row .tot span { font-size: 11px; }
  .rd { grid-template-columns: 64px minmax(0, 1fr) auto; } .rd .xtra { display: none; }
  .cnt b { font-size: 18px; }
  .cockpit { height: calc(100vh - 110px); height: calc(100dvh - 110px); min-height: 560px; margin: 0 -4px; border-radius: 24px; }
  .fl.hud .cell { padding: 6px 10px; } .fl.hud .cell b { font-size: 15px; } .fl.hud .cell.vol { display: none; }
  .sumg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lcard { padding: 32px 22px 24px; --c: 24px; }
  .lcard h1 { font-size: 27px; }
  .shard { width: 34px; height: 34px; }
  .dstage { padding: 0; display: block; min-height: 0; }
  .dstage .copy { display: none; }
  .phone { width: 100%; height: 100vh; height: 100dvh; min-height: 0; border-radius: 0; padding: 0; background: none; box-shadow: none; }
  .pscreen { border-radius: 0; }
  .notch { display: none; }
  .dtop { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
  .dnav { position: fixed; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dbody { padding-bottom: 170px; }
  .cmp-t { grid-template-columns: minmax(0, 1fr); }
  .cmp-t .h { display: none; }
  .cmp-t .k { padding: 18px 4px 0; }
  .cmp-t .o::before { content: "Antes"; display: block; font: 700 10.5px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
  .cmp-t .n::before { content: "Agora"; display: block; font: 700 10.5px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 6px; }
}
@media (max-width: 380px) {
  .seg button { padding: 0 11px; }
  .next .ad { font-size: 19px; }
  .outs { grid-template-columns: minmax(0, 1fr); } .out.full { grid-column: auto; }
  .fl.hud .cell.km { display: none; }
  .stg .v { font-size: 24px; }
  .bal b { font-size: 20px; }
  .tots .tot-row .tot { padding: 10px; }
}
/* =================== Revisão de tipografia e dimensionamento (v3) =================== */
/* Regra geral: nada de altura fixa em componente com texto, nada de reticências escondendo nome;
   quando falta espaço a composição muda (empilha, quebra em 2 linhas) em vez de encolher a letra. */
.topbar .ttl .eyebrow { white-space: nowrap; }
.phead > div:first-child { min-width: 0; flex: 1 1 22rem; }
.phead .sub, .glass-hd .sub { text-wrap: pretty; }
.glass-hd h2 { min-width: 0; }
.rc .hd .ttl b { line-height: 1.25; text-wrap: balance; }
.yl .nm b, .ri .r1 b, .fr .r1 b, .lc .id .r1 b { line-height: 1.3; }
.lc .id small, .yl .nm span { line-height: 1.35; }
.fl.hud .cell { flex: none; }
.fl.legend { left: 334px; right: 424px; transform: none; justify-content: center; flex-wrap: wrap; row-gap: 6px; white-space: normal; }
@media (max-width: 1699px) { .fl.legend { display: none; } }
.ibtn.sm { width: 36px; height: 36px; border-radius: 12px; }
.ibtn { flex: none; }
.rcode { color: var(--rc); }
/* Tema claro: código da rota escurecido para manter contraste sobre o vidro claro */
:root[data-theme="light"] .rcode { color: color-mix(in oklab, var(--rc) 58%, #1d140e); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .rcode { color: color-mix(in oklab, var(--rc) 58%, #1d140e); } }

@media (min-width: 600px) and (max-width: 1439px) {
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 420px) {
  /* Esteira do fluxo: o número desce para baixo do nome da etapa em vez de espremer o texto ao lado */
  .stg { grid-template-columns: 54px minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .stg .node { grid-row: 1 / 4; align-self: start; }
  .stg .v { grid-column: 2; grid-row: 2; text-align: left; font-size: 26px; margin: 2px 0; }
  .stg .s { grid-row: 3; }
  .dtop { flex-wrap: wrap; row-gap: 8px; }
  .dtop .t { flex-basis: calc(100% - 60px); }
  .dtop .sync { order: 3; }
}
@media (max-width: 1099px) { .fl.hud { flex-wrap: wrap; } }
.toasts { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.lfoot button { min-height: 32px; }
/* Telas largas, mas sem espaço para o painel de números no centro do mapa: os mesmos números estão no painel de detalhe */
@media (min-width: 1100px) and (max-width: 1599px) { .fl.hud { display: none; } }
@media (max-width: 1439px) {
  .cmd { width: min(260px, 22vw); }
  .cmd:focus-within { width: min(340px, 30vw); }
}
@media (max-width: 1365px) {
  .live-chip { width: 42px; padding: 0; justify-content: center; } .live-chip span { display: none; }
}
@media (max-width: 1279px) {
  .cmd { width: 42px; flex: none; justify-content: center; } .cmd input, .cmd kbd { display: none; } .cmd .ico { margin: 0; }
  .cmd:focus-within { width: 42px; }
  .qa-btn kbd { display: none; }
}
@media (max-width: 1099px) {
  .rail .rlink .lbl { white-space: nowrap; }
  .rail:hover { width: 312px; }
}
@media (max-width: 899px) {
  .topbar .ttl .eyebrow { display: none; }
  .qa-btn .t { display: none; } .qa-btn { padding: 0 12px; }
  .datepill .d { padding: 0 2px; }
}
/* Alvos de toque: 44 px no celular e no tablet */
@media (max-width: 899px), (pointer: coarse) {
  .btn, .btn.sm { --h: var(--tap); }
  .ibtn, .rc .ft .ibtn, .ext-btn, .fl.ctrl button { width: var(--tap); height: var(--tap); }
  .qa-btn, .live-chip, .datepill, .avatar { min-height: var(--tap); height: var(--tap); }
  .avatar { width: var(--tap); }
  .datepill button { height: var(--tap); width: var(--tap); }
  .rlink { min-height: var(--tap); }
  .qa-btn { min-width: var(--tap); justify-content: center; }
  .ibtn.sm { width: var(--tap); height: var(--tap); }
  .seg button { min-height: var(--tap); }
  .chip-c, .sync, .syncb, .chips-top button { min-height: var(--tap); }
  .sel select, .rc .sel select, .cnt .conf input, .fld input[type="number"] { height: var(--tap); }
  .fl-det .grab { height: var(--tap); }
  .fl-det .grab::before { margin-top: 12px; }
  .lfoot button { min-height: var(--tap); padding: 0 6px; }
  .mnav button { min-height: 58px; }
}
@media (max-width: 599px) {
  .topbar .mmark { width: 40px; height: 40px; }
  .ibtn { width: var(--tap); height: var(--tap); }
  .qa-btn { height: var(--tap); }
  .avatar { width: var(--tap); height: var(--tap); }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1 1 auto; padding: 6px 12px; }
  .console .seg, .glass-hd .act .seg { overflow: visible; }
  .rc .ft { gap: 8px; }
  .rc .sel { flex: 1 1 100%; }
  .rc .sel select { width: 100%; }
  .opmap .hudc { flex-wrap: wrap; margin-left: 0; }
  .lpipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp b { font-size: 20px; }
  .toasts { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}
@media (hover: none) { .glass::after { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .belt .pk { display: none; }
}

/* =================== Integração com o sistema real (1.6.0) =================== */
/* Os nomes antigos de tokens passam a apontar para os do protótipo: os módulos que ainda
   não foram redesenhados herdam as mesmas cores, vidro e tipografia. */
:root, :root[data-theme="light"], :root[data-theme="dark"] {
  --bg: var(--bg0); --bg-1: var(--bg1);
  --glass-1: var(--g1); --glass-2: var(--g2);
  --surface-2: var(--g-inner); --surface-3: var(--g-inner-hi); --surface-solid: var(--g-solid);
  --text: var(--ink); --text-2: var(--ink-2); --line: var(--hair);
  --accent-text: var(--cyan); --accent: var(--blue);
  --font: var(--f-ui); --font-disp: var(--f-disp); --mono: var(--f-mono);
  --shadow-lg: var(--shadow-lift);
  --radius: var(--r); --radius-md: var(--r-md); --radius-sm: var(--r-sm);
}
/* A atmosfera agora é a camada .atmo do protótipo; a antiga (body::before/::after) sai. */
body::before { animation: none; }
body::after { content: none; }
html { background: var(--bg0); }
#app { position: relative; z-index: 1; }
.atmo { z-index: 0; }
/* Rótulo do menu lateral e item do topo no padrão do protótipo */
.rlink { cursor: pointer; }
.topbar .mmark { display: none; }
.avatar { border: 0; cursor: pointer; }
.datepill input[type="date"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.datepill .d { cursor: pointer; border: 0; background: none; color: inherit; height: 40px; }
.datepill .d .ico { color: var(--cyan); }
/* Menu do usuário (avatar) */
.umenu { position: fixed; z-index: 86; top: calc(80px + env(safe-area-inset-top, 0px)); right: max(18px, env(safe-area-inset-right, 0px)); width: min(280px, calc(100vw - 24px)); padding: 10px; border-radius: 22px; display: grid; gap: 2px; }
.umenu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; }
.umenu .who b { display: block; font: 700 14px var(--f-disp); }
.umenu .who span { font-size: 12px; color: var(--muted); font-weight: 600; }
.umenu .rlink { min-height: 44px; }
.notif-pop { position: fixed; z-index: 86; top: calc(80px + env(safe-area-inset-top, 0px)); right: max(18px, env(safe-area-inset-right, 0px)); width: min(400px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; padding: 10px; border-radius: 22px; }
@media (max-width: 599px) {
  .umenu, .notif-pop { top: auto; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; width: auto; }
}
/* Janelas: no celular a janela vira folha que sobe da borda inferior */
.scrim.as-sheet { place-items: end stretch; padding: 8px; }
.scrim.as-sheet .modal { width: 100%; border-radius: 28px; max-height: calc(100dvh - 16px); }
.scrim.as-sheet .modal .grab { display: block; }
.modal .m-bd > :first-child { margin-top: 0; }
.modal.wide { width: min(900px, 100%); }
.toast { position: relative; cursor: pointer; }
.toast .grow { flex: 1; min-width: 0; }
/* A data das telas sobe para o topo (tablet e computador); no celular continua na página */
@media (min-width: 600px) { body.datepill-on .page-date { display: none !important; } }
/* Campos dos componentes do protótipo: sem a caixa genérica dos formulários (app.css) */
.cmd input, .ssearch input, .sbox input { min-height: 0; padding-top: 0; padding-bottom: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; width: auto; }
.sbox input { padding: 0 16px 0 10px; }
.fld input[type="number"], .cnt .conf input { min-height: 0; }
.sel select { min-height: 0; width: auto; }
.view:focus, .view:focus-visible { outline: none; }
.datepill .d { width: auto; border-radius: 12px; }
.cmd-res { position: absolute; z-index: 5; top: calc(100% + 8px); max-height: 420px; overflow: auto; padding: 6px; border-radius: 18px; }
.cmd-res a { display: flex; gap: 10px; padding: 10px 12px; min-height: 44px; color: var(--ink); border-radius: 12px; align-items: center; font-weight: 650; font-size: 13px; text-decoration: none; }
.cmd-res a:hover, .cmd-res a.sel { background: var(--glow-soft); }
.cmd-res .type { font-size: var(--fs-cap); font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); min-width: 84px; }
.live-chip.off i { background: var(--danger); box-shadow: 0 0 10px var(--danger); color: var(--danger); }
.qa a.qa-it { text-decoration: none; }
.qa .rlink { text-decoration: none; }
.qa .rlink .fav-k { margin-left: auto; }
.qa-it small { margin-top: 2px; }
.notif-pop .al { text-decoration: none; }
.notif-pop .al.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); vertical-align: 2px; }
a.rlink:hover { text-decoration: none; }
#mig-banner { margin: 18px 0 0 !important; }
a.yl, a.fr, a.bn { text-decoration: none; color: inherit; }
a.yl:hover, a.fr:hover, a.bn:hover { text-decoration: none; }
.page-date-wrap:empty { display: none; }
@media (max-width: 599px) { .page-date-wrap .page-date { margin: 0 0 14px; } }

/* Celular: o protótipo esconde a data da barra superior; aqui ela continua acessível como uma pílula compacta no topo da tela. */
@media (max-width: 599px) {
  body.datepill-on .page-date { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap; margin: 0 0 14px; }
  body.datepill-on .page-date .quick-dates { display: none; }
  body.datepill-on .page-date .date-nav { display: inline-flex; align-items: center; height: var(--tap, 44px); border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); padding: 0; gap: 0; }
  body.datepill-on .page-date .date-nav .btn { background: none; box-shadow: none; border: 0; width: var(--tap, 44px); height: var(--tap, 44px); color: var(--muted); }
  body.datepill-on .page-date .date-nav input { background: none; border: 0; box-shadow: none; font-weight: 800; font-size: 13px; color: var(--ink); width: auto; min-width: 0; padding: 0 2px; height: var(--tap, 44px); }
  body.datepill-on .page-date > .small { font-weight: 700; text-transform: capitalize; }
}
#user-btn { position: relative; }
.umenu .rlink .cnt { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--g-inner); }

/* Planejamento: ações por cidade da rota (subir, editar volumes, mover), que o sistema real tem e o protótipo não mostrava. */
.rstops div.ed { grid-template-columns: 22px minmax(0, 1fr) auto auto; }
.rstops .sa { display: inline-flex; gap: 2px; }
.rstops .sa .ibtn { width: 28px; height: 28px; border-radius: 9px; }
.rstops .sa .ibtn:disabled { opacity: .35; }
@media (hover: hover) and (pointer: fine) {
  .rstops .sa { opacity: 0; transition: opacity .2s; }
  .rstops div:hover .sa, .rstops div:focus-within .sa { opacity: 1; }
}
.rc.rejected { opacity: .62; }
.rc.rejected:hover { opacity: 1; }
details.rej > summary { cursor: pointer; font-weight: 650; }
.banner.danger { background: var(--danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.banner.danger .ico { color: var(--danger); }
.banner a { color: var(--cyan); font-weight: 700; }
.rc .sel select:disabled { opacity: .6; }
/* O sino de notificações ocupa um espaço a mais na barra: o título não quebra, a busca cede espaço. */
@media (min-width: 1400px) { .topbar .ttl b, .topbar .ttl #page-title { white-space: nowrap; } .topbar .ttl { flex: 0 0 auto; } }
/* Até 1399 px o protótipo não tem espaço para o sino: as notificações ficam no menu do usuário (o avatar ganha o ponto de aviso). */
@media (max-width: 1399px) {
  #notif-btn { display: none; }
  #user-btn.has-unread::after { content: ""; position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg0); }
}
/* Toque: alvos de 44 px também nos controles acrescentados (ações por cidade no Planejamento, data). */
@media (max-width: 899px), (pointer: coarse) {
  .rstops .sa .ibtn { width: var(--tap, 44px); height: var(--tap, 44px); }
  .rstops div.ed { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .rstops div.ed .sa { grid-column: 1 / -1; justify-content: flex-end; }
  .datepill .d { min-height: var(--tap, 44px); }
}

/* =================== MÓDULOS SEM TELA NO PROTÓTIPO: mesmas peças, mesma linguagem =================== */
.kv { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--hair); font-size: 13px; }
.kv .k { color: var(--muted); display: flex; gap: 8px; align-items: center; font-weight: 650; }
.kv .v { margin-left: auto; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.kvl .kv { align-items: flex-start; }
.kvl .kv .k { min-width: 9.5em; }
.pnl { margin-bottom: var(--gap); }
.pnl .ttl-b { display: grid; gap: 2px; min-width: 0; }
.pnl .ttl-b .small { font-weight: 600; }
.glass-bd.flush { padding: 12px 0 0; }
.glass-bd.flush > .table-wrap, .glass-bd.flush > .dt-host { border-radius: 0 0 var(--r) var(--r); }
.bal { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
.bal .ok b { color: var(--ok); } .bal .bad b { color: var(--danger); } .bal .acc b { color: var(--blue); }
.empty-ds { padding: 46px 20px; }
.empty-ds h3 { font: 700 18px var(--f-disp); }
.lg-hico { width: 56px; height: 56px; border-radius: 18px; }
.lg-hico .ico { width: 24px; height: 24px; }
.tabseg { margin-bottom: 16px; max-width: 100%; }
@media (max-width: 1099px) { .bal { grid-template-columns: repeat(min(var(--n, 5), 3), minmax(0, 1fr)); } .bal > div:nth-child(3n + 1)::before { display: none; } }
@media (max-width: 599px) { .bal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bal > div::before { display: none; } .bal > div:nth-child(2n)::before { display: block; } }

/* ---------- Rotas de Entrega: mapa real (Leaflet) com os pinos e traços do protótipo ---------- */
.cockpit .mapHost { position: absolute; inset: 0; z-index: 0; }
.cockpit .leaflet-container { background: var(--map-bg) !important; }
.cockpit .leaflet-control-attribution { background: rgba(14, 10, 8, .55) !important; color: var(--muted) !important; border-radius: 8px 0 0 0; font-size: 10px; }
:root[data-theme="light"] .cockpit .leaflet-control-attribution { background: rgba(255, 255, 255, .6) !important; }
.cockpit .leaflet-control-attribution a { color: var(--ink-2) !important; }
.cockpit .leaflet-bottom.leaflet-right { right: 0; }
@media (min-width: 1100px) { .cockpit .leaflet-bottom.leaflet-right { right: 424px; } }
:root[data-theme="dark"] .cockpit .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(.35) sepia(.28) brightness(.62) contrast(1.15); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cockpit .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(.35) sepia(.28) brightness(.62) contrast(1.15); } }
.lpin-w, .lbase-w, .ltruck-w { background: none !important; border: 0 !important; }
.lpin { --rc: var(--cyan); position: relative; width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; }
.lpin b { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--f-mono); color: var(--ink); background: var(--map-bg); box-shadow: inset 0 0 0 2.5px var(--rc), 0 4px 12px -4px rgba(0, 0, 0, .6); }
.lpin i { position: absolute; inset: -6px; border-radius: 50%; background: var(--rc); opacity: 0; transition: opacity .2s; }
.lpin.on i { opacity: .4; }
.lpin.done b { background: var(--ok); color: #032016; box-shadow: 0 0 12px -2px var(--ok); }
.lpin.fail b { background: var(--danger); color: #fff; box-shadow: 0 0 12px -2px var(--danger); }
.lpin.flag b { box-shadow: inset 0 0 0 2.5px var(--warn), 0 0 0 3px color-mix(in srgb, var(--warn) 30%, transparent); }
.lpin.next b { box-shadow: inset 0 0 0 2.5px var(--cyan), 0 0 16px -2px var(--cyan); }
.lpin.next i { background: var(--cyan); opacity: .3; animation: nextP 1.8s ease-out infinite; }
.lbase { display: grid; place-items: center; width: 48px; height: 26px; border-radius: 10px; font: 800 10px var(--f-disp); letter-spacing: .1em; color: #fff; background: linear-gradient(90deg, #ffa25c, #d94a0a); box-shadow: 0 6px 20px -6px var(--glow), 0 0 0 1px rgba(255, 255, 255, .25); }
.ltruck { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--rc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc) 30%, transparent), 0 8px 20px -6px var(--rc); }
.leaflet-overlay-pane path.lglow { filter: blur(5px); }
.leaflet-overlay-pane path.lroute.draw { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: ldraw 1.4s var(--e-out) forwards; }
@keyframes ldraw { to { stroke-dashoffset: 0; } }
.leaflet-overlay-pane path.lprev { filter: drop-shadow(0 0 6px var(--ok)); animation: dash 1s linear infinite; }
.leaflet-overlay-pane path.lghost { stroke-dasharray: 2 7; }
.stops-h { margin: 14px 0 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; }
.stops .stop.base .n { background: var(--g-inner-hi); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hair); }
.stops .stop.base .a { color: var(--ink-2); }
.stops .stop.locked .n::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--g-solid); }
.stops .stop .sa { display: flex; gap: 4px; margin-top: 6px; }
.stops .stop .sa .ibtn.on { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }
.stops .stop[draggable="true"] { cursor: grab; }
.stops .stop.dragging { opacity: .45; }
.stops.drop { box-shadow: inset 0 0 0 1.5px var(--cyan); border-radius: 16px; }
.det-sc .tin { width: auto; min-height: 0; height: 34px; padding: 0 10px; border-radius: 10px; font: 700 13px var(--f-mono); }
.det-sc .tgs { display: flex; gap: 6px 16px; flex-wrap: wrap; padding: 6px 2px 2px; }
.det-sc .plazas { margin: -4px 0 6px; padding-left: 22px; color: var(--muted); }
.det-sc details.more { margin-top: 14px; padding: 10px 12px; border-radius: 16px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; }
.det-sc details.more summary { cursor: pointer; font-weight: 700; display: flex; gap: 8px; align-items: center; color: var(--ink-2); min-height: 32px; }
.det-ft .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.banner.ok { background: var(--ok-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent); }
.banner.ok .ico { color: var(--ok); }
.banner > .btn { margin-left: auto; flex: none; }
.banner > div { min-width: 0; flex: 1; }
.provider-notes { margin-bottom: 12px; }
.provider-notes summary { cursor: pointer; display: inline; }
.provider-notes > .small { margin-top: 6px; display: grid; gap: 4px; }
.rv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rv-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 700 16px var(--f-disp); min-width: 0; }
.fpipe .lp b { font-size: 18px; }
.lp.warnp b { color: var(--warn); }
.rtool { margin: 0 0 12px; }
@media (max-width: 1099px) { .stops .stop .sa .ibtn { width: var(--tap); height: var(--tap); } }
/* Sem os blocos do mapa (sem internet), o fundo mostra uma trama discreta em vez de um vazio preto. */
.cockpit .leaflet-container, .mapbox .leaflet-container { background-image: linear-gradient(var(--map-st) 1px, transparent 1px), linear-gradient(90deg, var(--map-st) 1px, transparent 1px) !important; background-size: 56px 56px !important; }
.det-sc .provider-notes { margin: 14px 0 0; font-size: 12.5px; }
.ltruck { width: 30px; height: 30px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #ffa25c, #fc6105); box-shadow: 0 0 0 4px rgba(252, 97, 5, .25), 0 8px 20px -6px var(--glow); }
.ltruck .ico { width: 16px; height: 16px; }

/* =================== PORTAL DO MOTORISTA (tela cheia no aparelho) =================== */
/* Mesma composição do protótipo (.pscreen), sem a moldura de celular: o aparelho do motorista já é o celular. */
.dshell { position: relative; z-index: 1; height: 100vh; height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; }
.dshell .dtop { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
.dshell .dtop .mark { width: 40px; height: 40px; }
.dshell .dbody { padding: 4px max(14px, env(safe-area-inset-right)) calc(110px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); outline: none; }
.dshell .dnav { position: fixed; left: 50%; right: auto; width: min(532px, calc(100% - 28px)); transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); }
.dnav a { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; gap: 8px; height: 52px; border-radius: 20px; color: var(--muted); font-weight: 800; font-size: 13px; text-decoration: none; transition: color .3s; }
.dnav a:hover { text-decoration: none; color: var(--ink); }
.dnav a[aria-current="page"] { color: var(--ink); }
.dnav a[aria-current="page"] .ico { color: var(--cyan); }
#sync-ind:empty { display: none; }
.sync.err { color: var(--danger); background: var(--danger-soft, rgba(255, 90, 90, .14)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
button.sync { cursor: pointer; }
body.outdoor { --g1: rgba(24, 17, 12, .96); --g2: rgba(24, 17, 12, .96); --g-inner: rgba(255, 255, 255, .07); --muted: #e6d6ca; --ink-2: #fff6ef; }
:root[data-theme="light"] body.outdoor { --g1: #ffffff; --g2: #ffffff; --g-inner: #f6efe8; --muted: #4a3a2f; --ink-2: #1d140e; }
body.outdoor .atmo { opacity: .3; }
body.outdoor .next { background: #b4430a; }
.dshell .dsh-scrim { position: fixed; }
.dshell .dsh { position: fixed; left: 50%; right: auto; width: min(544px, calc(100% - 16px)); transform: translateX(-50%); bottom: calc(8px + env(safe-area-inset-bottom)); max-height: 90dvh; }
.dsh .dsh-hd { display: flex; align-items: center; gap: 10px; }
.dsh .dsh-hd h2 { flex: 1; font-size: 19px; }
.dsh .dsh-sub { margin-top: 4px; font-weight: 600; }
.dsh .per { margin: 0 0 12px; display: grid; gap: 8px; }
.dsh .per li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); }
.dsh .per ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dsh .per select, .dsh .per input { min-height: 40px; }
.dsh .per .pv { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 700; }
.dsh .per .pv input { width: 84px; }
.dsh .sig .clr { position: absolute; z-index: 2; right: 6px; top: 6px; min-height: 30px; padding: 0 10px; border-radius: 10px; border: 0; font-size: 11.5px; font-weight: 800; background: var(--g-solid); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); }
.dsh .proof label.req, .dsh .proof .sig.req { box-shadow: inset 0 0 0 1.5px var(--warn); }
.dsh .proof .lb2 { font-size: 11px; color: var(--muted); font-weight: 700; }
.dfield .req { color: var(--warn); font-weight: 700; font-size: 11.5px; margin-left: 6px; }
.dtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); }
.dtabs a { display: grid; place-items: center; min-height: 40px; border-radius: 12px; font-size: 13px; font-weight: 800; color: var(--muted); text-decoration: none; }
.dtabs a[aria-current="page"] { color: var(--ink); background: var(--g-solid); box-shadow: inset 0 0 0 1px var(--edge-b), 0 6px 16px -10px var(--glow); }
.droute.link { color: inherit; text-decoration: none; transition: transform .2s var(--e-out), box-shadow .3s; }
.droute.link:hover { text-decoration: none; transform: translateY(-2px); }
.droute .lf { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--g-inner-hi); overflow: hidden; }
.droute .lf i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22c98a, #5cf0b6); }
.droute .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; font-weight: 650; color: var(--muted); }
.droute .meta .w { color: var(--warn); font-weight: 800; }
.dback { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 13px; font-weight: 800; color: var(--ink-2); text-decoration: none; }
.dback:hover { text-decoration: none; color: var(--ink); }
.dacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.dacts .btn { --h: 50px; border-radius: 16px; }
.mmap .leaflet-container { width: 100%; height: 100%; background: var(--map-bg); }
.mmap.big { height: 300px; }
.mmap .mm-open { position: absolute; z-index: 500; right: 8px; bottom: 8px; min-height: 34px; }
.dstops .stop { cursor: pointer; }
.dstops .stop .s .pill { white-space: nowrap; }
.dstops .stop .lq { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 800; color: var(--warn); }
.dstops .stop .lq.e { color: var(--danger); }
.ddel { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.ddel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; }
.ddel li .m { font-size: 12px; color: var(--muted); font-weight: 600; }
.next .ddel li { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); color: #fff; }
.next .ddel li .m { color: rgba(255, 255, 255, .78); }
.next .ddel .btn { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.navopts { display: grid; gap: 8px; }
.navopts .btn { --h: 52px; justify-content: flex-start; }

/* Minha Conta */
.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.acc-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 899px) { .acc-grid { grid-template-columns: minmax(0, 1fr); } }
.dshell .acc-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.dshell .phead { margin-bottom: 4px; }

/* Peças comuns dos módulos sem tela no protótipo */
.fld input:not([type]), .fld input[type="text"], .fld input[type="search"], .fld input[type="date"], .fld input[type="time"], .fld select { height: 42px; border-radius: 12px; border: 0; padding: 0 12px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font: 600 14px var(--f-ui); color: var(--ink); min-width: 0; }
.fld select:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .6), 0 0 18px -6px var(--glow); }
.grow-fld { flex: 1 1 260px; min-width: 0; }
.grow-fld input { width: 100%; }
.rv-entry .fld input.qty-input { width: 120px; }
.hbars { display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; }
.hb .k { font-size: 13px; font-weight: 650; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.hb b { font: 700 13px var(--f-mono); }
.hb i { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: var(--g-inner-hi); position: relative; }
.hb i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, #ff9a4d, #fc6105); box-shadow: 0 0 10px -2px var(--glow); }
.hb small { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); font-weight: 600; }
@media (max-width: 599px) { .rv-entry > .grow-fld { flex-basis: 100%; } .rv-entry > label.fld { flex: 1 1 100px; min-width: 0; } .rv-entry .fld input.qty-input { width: 100%; } }
.seg button .ico { vertical-align: -3px; margin-right: 6px; }
.side-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.side-grid > .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--gap); align-items: start; }
@media (min-width: 1600px) { .side-grid { grid-template-columns: minmax(0, 1fr) 360px; } .side-grid > .side { grid-template-columns: minmax(0, 1fr); } }
.pnl.mt-gap { margin-top: var(--gap); }
.pnl .act .fld select { height: 36px; font-size: 13px; }
.alert + .alert, .alert + .banner, .banner + .alert { margin-top: 10px; }
.alert { margin-bottom: 10px; }
.row.nowrap { flex-wrap: nowrap; }
@media print {
  .phead .act, .page-date-wrap, .ptool, .ft .ibtn, .ft .btn { display: none !important; }
  .phead h1, .phead .grad-text { color: #000 !important; -webkit-text-fill-color: #000; background: none !important; }
  .rcards { grid-template-columns: 1fr 1fr !important; }
  .rc, .rc * { color: #000 !important; }
  .truckcap .f { background: #999 !important; }
  .view, #view { padding: 0 !important; }
}
.segn { font: 700 11px var(--f-mono); opacity: .75; margin-left: 4px; }
.rc .hd.nock { grid-template-columns: minmax(0, 1fr) auto; }

/* Mapa Operacional */
.opmap-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.opmap-grid .mapbox { position: sticky; top: 96px; padding: 0; overflow: hidden; border-radius: var(--r); }
.opmap-grid #map { height: calc(100vh - 140px); min-height: 520px; background: var(--map-bg); }
.map-side2 { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.fgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fgrid2 .fld select { width: 100%; }
.cpin { --pc: var(--cyan); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--map-bg); box-shadow: inset 0 0 0 2.5px var(--pc), 0 0 16px -4px var(--pc), 0 4px 10px -4px rgba(0, 0, 0, .6); }
.cpin b { font: 700 10.5px var(--f-mono); color: var(--ink); }
.cpin.dot { display: inline-block; width: 12px; height: 12px; background: var(--pc); box-shadow: 0 0 8px -1px var(--pc); vertical-align: -1px; }
.seqb { width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; font: 700 10.5px var(--f-mono); color: #fff; background: var(--rc); box-shadow: 0 0 10px -2px var(--rc); }
.dir-arrow { font-size: 12px; text-shadow: 0 0 6px currentColor; }
.legend2 { display: grid; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.legend2 > div { display: flex; align-items: center; gap: 10px; }
.legend2 .grow { flex: 1; min-width: 0; }
.legend2 b { font: 700 12px var(--f-mono); }
.legend2 .ln { width: 22px; border-top: 3px solid var(--ink-2); flex: none; }
.legend2 .ln.d { border-top-style: dashed; }
.leg-list { margin: 8px 0 0 6px; padding-left: 16px; display: grid; gap: 4px; font-size: 12.5px; }
.pin-label { background: var(--g-solid) !important; color: var(--ink) !important; border: 0 !important; box-shadow: inset 0 0 0 1px var(--hair), 0 6px 14px -6px rgba(0, 0, 0, .6) !important; font-weight: 700; border-radius: 8px !important; }
.pin-label::before { display: none; }
@media (max-width: 1179px) { .opmap-grid { grid-template-columns: minmax(0, 1fr); } .opmap-grid .mapbox { position: relative; top: 0; } .opmap-grid #map { height: 62vh; min-height: 360px; } .map-side2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); } }
.leaflet-bar { border: 0 !important; border-radius: 14px !important; overflow: hidden; box-shadow: inset 0 0 0 1px var(--hair), 0 10px 24px -12px rgba(0, 0, 0, .6) !important; }
.leaflet-bar a { width: 38px !important; height: 38px !important; line-height: 38px !important; background: var(--g-solid) !important; color: var(--ink) !important; border-bottom: 1px solid var(--hair) !important; }
.leaflet-bar a:hover { background: var(--g-inner-hi) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--g-solid) !important; color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--hair), 0 18px 40px -16px rgba(0, 0, 0, .7) !important; }
.leaflet-popup-content-wrapper { border-radius: 14px !important; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted) !important; }
.fld select { font-size: 13.5px; }
.tot.w b { color: var(--warn); }
.tots .banner { margin: 0; }
.bp-opts { align-items: end; }

/* Motoristas */
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.dcard { padding: 16px; border-radius: 22px; display: grid; gap: 12px; align-content: start; }
.dcard.off { opacity: .72; }
.dcard .hd, .dcard-hd { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dcard-hd { margin-bottom: 12px; }
.dcard .ttl { flex: 1; min-width: 0; }
.dcard .ttl b { display: block; font: 700 15px var(--f-disp); overflow-wrap: anywhere; }
.dcard .ttl > span { font-size: 12px; color: var(--muted); font-weight: 650; }
.av { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; font: 800 14px var(--f-disp); color: #fff; background: linear-gradient(145deg, #ffa25c, #fc6105 60%, #d94a0a); box-shadow: 0 8px 20px -10px var(--glow); }
.dcard .ft { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.bal.inmodal { margin: 12px 0; }
.ptool .ssearch { height: 40px; }

/* Acompanhamento de Entregas */
.lpin.part b { background: var(--warn); color: #2a1800; box-shadow: 0 0 12px -2px var(--warn); }
.acr { padding: 14px; border-radius: 20px; display: grid; gap: 8px; }
.acr .r1 { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.acr .r1 b { flex: 1; min-width: 120px; font-size: 13.5px; overflow-wrap: anywhere; }
.acr .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 10px var(--rc); flex: none; }
.acr .mt { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 650; }
.acr .ft { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.pgb { height: 6px; border-radius: 999px; background: var(--g-inner-hi); overflow: hidden; }
.pgb span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1fbf83, #5cf0b6); box-shadow: 0 0 10px -2px var(--ok); }
.pgb.w span { background: linear-gradient(90deg, #1fbf83, #ffc04d); }
.opmap-grid #ac-map { height: calc(100vh - 140px); min-height: 520px; background: var(--map-bg); }
.mapbox { position: relative; }
.ac-legend { position: absolute; z-index: 500; left: 12px; bottom: 12px; display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 14px; background: var(--g-solid); box-shadow: inset 0 0 0 1px var(--hair); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.ac-legend span { display: inline-flex; gap: 6px; align-items: center; }
.ac-stops .stop { cursor: default; }
.ac-stops .stop-dels { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ac-stops .stop-dels li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); }
.ac-stops .stop-dels li > .small { flex: 1; min-width: 200px; }
@media (max-width: 1179px) { .opmap-grid #ac-map { height: 56vh; min-height: 340px; } }

/* Cartões herdados com a mesma aparência do painel de vidro do protótipo (cabeçalho sem linha, mesmo título e espaçamento) */
.card { border-radius: var(--r); }
.card-head { padding: 18px 20px 0; border-bottom: 0; }
.card-head h3, .card-head h2 { font: 650 15px/1.25 var(--f-disp); letter-spacing: -.01em; }
.card-body { padding: 16px 20px 20px; }
.card-body.tight { padding: 12px 0 0; }
.card > .card-body.tight:last-child { overflow: hidden; }
.card + .card { margin-top: var(--gap); }
.empty { padding: 46px 20px; gap: 8px; font-weight: 600; }
.empty > .icon { width: 26px; height: 26px; padding: 14px; border-radius: 17px; color: var(--cyan); background: linear-gradient(150deg, rgba(255, 150, 70, .18), rgba(252, 97, 5, .06)); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .2), 0 10px 30px -14px var(--glow); }
.empty h3 { font: 700 18px var(--f-disp); color: var(--ink); }
input[type="file"] { font: 600 13px var(--f-ui); color: var(--muted); max-width: 100%; }
input[type="file"]::file-selector-button { margin-right: 10px; height: 36px; padding: 0 14px; border: 0; border-radius: 11px; font: 750 12.5px var(--f-ui); color: var(--ink); background: var(--g-inner-hi); box-shadow: inset 0 0 0 1px var(--edge-b); cursor: pointer; }
.fi-filter { align-items: flex-end; margin-top: 0; }
.money-bal b { font-size: clamp(18px, 1.6vw, 24px); }
.bal .txt b { font-size: 18px; text-transform: capitalize; }

/* Configurações */
.cfg-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.cfg-nav { position: sticky; top: 96px; display: grid; gap: 2px; padding: 8px; border-radius: 22px; }
.cfg-nav button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-2); font: 650 13.5px var(--f-ui); text-align: left; transition: background-color .25s, color .25s; }
.cfg-nav button:hover { background: var(--g-inner); color: var(--ink); }
.cfg-nav button .ico { color: var(--muted); flex: none; }
.cfg-nav button.active { color: var(--ink); background: linear-gradient(150deg, rgba(255, 150, 70, .2), rgba(252, 97, 5, .08)); box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .3); }
.cfg-nav button.active .ico { color: var(--cyan); }
.cfg-body { min-width: 0; }
@media (max-width: 899px) { .cfg-layout { grid-template-columns: minmax(0, 1fr); } .cfg-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.field .hint, .fld .hint { margin-top: 2px; padding: 0; border-radius: 0; background: none; box-shadow: none; font-size: 12px; font-weight: 550; color: var(--muted); }
.cmd-res { background: var(--g-solid) !important; box-shadow: var(--shadow), inset 0 0 0 1px var(--hair) !important; }
:root { --g-pop: rgba(22, 15, 11, .97); }
:root[data-theme="light"] { --g-pop: rgba(255, 255, 255, .98); }
.cmd-res, .combo-list { background: var(--g-pop) !important; }
/* Zoom 150–200% em telas grandes (≈600–760 px úteis): a barra do topo não pode passar da tela. */
@media (min-width: 600px) and (max-width: 759px) { .live-chip { display: none; } .topbar .ttl { min-width: 0; flex: 1 1 auto; } .topbar .ttl b { overflow-wrap: anywhere; } }

/* ===== Seletores (1.6.1): seta própria, opções nativas no tema e lista suspensa Kyrios (js/lib/kselect.js) ===== */
:root { --sel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23ffb27a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); --opt-bg: #1a120d; --kls-sel: rgba(252, 97, 5, .16); --kls-hi: rgba(255, 255, 255, .07); }
:root[data-theme="light"] { --sel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23c2510a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); --opt-bg: #fffaf5; --kls-sel: rgba(252, 97, 5, .12); --kls-hi: rgba(120, 60, 20, .07); }
:root[data-theme="dark"] select { color-scheme: dark; }
:root[data-theme="light"] select { color-scheme: light; }
select:not([multiple]):not([size]), select.btn { appearance: none; -webkit-appearance: none; background-image: var(--sel-arrow); background-repeat: no-repeat; background-position: right 11px center; background-size: 16px 16px; padding-right: 36px; cursor: pointer; }
select:disabled { cursor: not-allowed; }
select:focus-visible { outline: 2px solid rgba(255, 160, 100, .8); outline-offset: 2px; }
select[aria-expanded="true"] { box-shadow: inset 0 0 0 1px rgba(255, 180, 130, .7), 0 0 20px -6px var(--glow); }
/* Lista nativa (toque, Firefox antigo): mesmas cores do tema em vez do branco padrão. */
select option, select optgroup, .sel select option { background-color: var(--opt-bg); color: var(--ink); }
select option:checked { background-color: #fc6105; color: #fff; }
.kls-pop { position: fixed; z-index: 2000; overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 16px; background: var(--g-pop); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 0 0 1px var(--edge-b), 0 1px 0 0 var(--edge-a) inset, 0 18px 40px -14px rgba(0, 0, 0, .6), 0 0 26px -12px var(--glow);
  font: 600 13.5px/1.3 var(--f-ui); color: var(--ink); outline: none; scrollbar-width: thin; scrollbar-color: rgba(252, 120, 40, .55) transparent;
  opacity: 0; transform: translateY(-4px) scale(.985); transform-origin: top center; transition: opacity .14s ease, transform .16s cubic-bezier(.2, .8, .2, 1); }
.kls-pop[data-up="1"] { transform-origin: bottom center; transform: translateY(4px) scale(.985); }
.kls-pop.in { opacity: 1; transform: none; }
.kls-pop.out { opacity: 0; transition-duration: .1s; }
.kls-pop.still { transition: none; }
.kls-pop::-webkit-scrollbar { width: 8px; }
.kls-pop::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(252, 120, 40, .5); border: 2px solid transparent; background-clip: padding-box; }
.kls-pop::-webkit-scrollbar-track { background: transparent; }
.kls-grp { padding: 10px 10px 4px; font: 800 10.5px/1.2 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kls-opt { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border-radius: 11px; cursor: pointer; color: var(--ink-2); transition: background-color .12s, color .12s; }
.kls-opt + .kls-opt { margin-top: 2px; }
.kls-opt.ingrp { padding-left: 18px; }
.kls-opt .kls-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kls-opt .kls-ck { flex: none; width: 16px; height: 16px; color: #fc6105; opacity: 0; }
.kls-opt.on { background: var(--kls-hi); color: var(--ink); }
.kls-opt.sel { background: var(--kls-sel); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(252, 120, 40, .35); }
.kls-opt.sel .kls-ck { opacity: 1; }
.kls-opt.sel.on { background: rgba(252, 97, 5, .24); }
.kls-opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
:root[data-theme="light"] .kls-pop { box-shadow: inset 0 0 0 1px rgba(194, 81, 10, .28), 0 18px 40px -16px rgba(80, 40, 10, .35); }
:root[data-theme="light"] .kls-opt.sel .kls-ck { color: #c2510a; }
@media (prefers-reduced-motion: reduce) { .kls-pop { transition: none; transform: none; } }

/* Menu lateral fixado aberto também em telas de 600 a 1099 px (botão "Fixar menu aberto" / "Recolher menu"). */
@media (min-width: 600px) and (max-width: 1099px) {
  body.rail-open { --rail-w: 268px; }
  body.rail-open .rail:not(:hover) .rail-brand .txt, body.rail-open .rail:not(:hover) .rlink .lbl, body.rail-open .rail:not(:hover) .rail-sec, body.rail-open .rail:not(:hover) .stage-hd .st { opacity: 1; }
  body.rail-open .rail:hover { width: var(--rail-w); box-shadow: none; }
}
/* Menu fixado aberto em tela estreita: a barra do topo fica mais enxuta (mesma regra do celular para a data). */
@media (min-width: 600px) and (max-width: 1099px) { body.rail-open .live-chip { display: none; } body.rail-open .topbar .ttl { min-width: 0; flex: 1 1 auto; } }
@media (min-width: 600px) and (max-width: 899px) {
  body.rail-open #themeTop, body.rail-open #datepill { display: none !important; }
  body.rail-open.datepill-on .page-date { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap; margin: 0 0 14px; }
  body.rail-open.datepill-on .page-date .quick-dates { display: none; }
  body.rail-open.datepill-on .page-date .date-nav { display: inline-flex; align-items: center; height: var(--tap, 44px); border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); padding: 0; gap: 0; }
  body.rail-open.datepill-on .page-date .date-nav .btn { background: none; box-shadow: none; border: 0; width: var(--tap, 44px); height: var(--tap, 44px); color: var(--muted); }
  body.rail-open.datepill-on .page-date .date-nav input { background: none; border: 0; box-shadow: none; font-weight: 800; font-size: 13px; color: var(--ink); width: auto; min-width: 0; padding: 0 2px; height: var(--tap, 44px); }
}

/* ---------- 1.7.0: Configurações reorganizadas, Lixeira e operação real (mesmo visual de vidro) ---------- */
.cfg-nav-g { padding: 12px 12px 4px; font: 700 10.5px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cfg-nav-g:first-child { padding-top: 6px; }
.cfg-body > .pnl:last-child, .cfg-body > details:last-child { margin-bottom: 0; }
.cfg-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; align-items: start; }
.cfg-form > .span-all, .cfg-form > .cfg-bool { grid-column: 1 / -1; }
.cfg-form .field { min-width: 0; }
.cfg-form input[type="color"] { width: 64px; padding: 4px; }
.cfg-bool { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 600; }
.cfg-bool > input { flex: none; margin-top: 2px; }
.cfg-bool > span { display: grid; gap: 3px; min-width: 0; }
.cfg-bool b { font-weight: 650; }
.cfg-bool .hint { margin: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; font-size: 12px; font-weight: 550; color: var(--muted); }
.cfg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 0 0 var(--gap); }
.cfg-actions.start { justify-content: flex-start; margin: 0; }
.cfg-body > .cfg-actions:last-child { margin-bottom: 0; }
.glass-bd .cfg-actions { margin: 16px 0 0; }
.cfg-test { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.cfg-test .field { width: 180px; }
.cfg-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; }
.cfg-body > .cfg-note { margin: 0 0 var(--gap); padding: 0 4px; }
.cfg-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hair); }
.cfg-logo img, .cfg-logo-k { width: 46px; height: 46px; border-radius: 12px; object-fit: contain; flex: none; }
.cfg-logo-k { display: grid; place-items: center; font: 800 20px var(--f-disp); color: #fff; background: linear-gradient(150deg, #ff9a4d, #fc6105); }
.cfg-adv { margin-bottom: var(--gap); border-radius: 22px; padding: 0; }
.cfg-adv > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 20px; cursor: pointer; font: 650 14.5px var(--f-ui); list-style: none; color: var(--ink); }
.cfg-adv > summary::-webkit-details-marker { display: none; }
.cfg-adv > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s; }
.cfg-adv[open] > summary::after { transform: rotate(-135deg); }
.cfg-adv > summary .ico { color: var(--muted); }
.cfg-adv > :not(summary) { padding: 0 20px 20px; }
.glass-bd .cfg-adv, .modal .cfg-adv { background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 16px; }
.glass-bd .cfg-adv > summary, .modal .cfg-adv > summary { min-height: 44px; padding: 10px 14px; font-size: 13.5px; }
.glass-bd .cfg-adv > :not(summary), .modal .cfg-adv > :not(summary) { padding: 0 14px 14px; }
.cfg-sub summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.cfg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.cfg-row > b { text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cfg-row > .badge { justify-self: end; } .cfg-row > i { width: 0; }
.cfg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; align-items: start; }
.cfg-h { font: 650 14px/1.3 var(--f-disp); margin: 6px 0 8px; }
.cfg-code { width: 100%; font-family: var(--f-mono); }
.cfg-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 12px 14px; }
.cfg-fbd { padding-bottom: 4px; }
.cfg-kv .kv .k { min-width: 11em; }
.cfg-roles { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.cfg-scroll { max-height: 340px; overflow: auto; }
.cfg-keep { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cfg-keep li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--hair); font-size: 13px; }
.cfg-keep li .ico { color: var(--ok); }
.cfg-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cfg-checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 600; }
.cfg-checks li.ok .ico { color: var(--ok); } .cfg-checks li.bad .ico { color: var(--danger); }
.cfg-checks li small { grid-column: 2; color: var(--muted); font-weight: 550; overflow-wrap: anywhere; }
.cfg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.cfg-dl > div { display: grid; gap: 6px; justify-items: start; padding: 14px; border-radius: 16px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.cfg-dl .mono { overflow-wrap: anywhere; }
tr.is-prot td { background: var(--ok-soft); }
td.chk, th.chk { width: 40px; }
.rs-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; counter-reset: s; }
.rs-steps li { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 12px 4px 5px; border-radius: 999px; background: var(--g-inner); box-shadow: inset 0 0 0 1px var(--hair); font-size: 12.5px; font-weight: 650; color: var(--muted); }
.rs-steps li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--g-inner-hi); font-size: 11.5px; font-weight: 800; }
.rs-steps li.on { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(252, 120, 40, .45); }
.rs-steps li.on > span { color: #fff; background: linear-gradient(150deg, #ff9a4d, #fc6105); }
.rs-steps li.done { color: var(--ink-2); } .rs-steps li.done > span { color: var(--ok); background: var(--ok-soft); }
.rs-run { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rs-run li { display: flex; align-items: center; gap: 10px; min-height: 34px; color: var(--muted); font-weight: 600; }
.rs-run li.done { color: var(--ink-2); } .rs-run li.done .ico { color: var(--ok); }
.rs-run li.on { color: var(--ink); } .rs-run li.err { color: var(--danger); }
.rs-run .dot { width: 8px; height: 8px; margin: 0 4px; border-radius: 50%; background: var(--hair); }
@media (max-width: 899px) {
  .cfg-nav-g { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .cfg-form, .cfg-two { grid-template-columns: minmax(0, 1fr); }
  .cfg-actions .btn { flex: 1 1 auto; }
  .cfg-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cfg-row > i { display: none; }
}
