/* Delta Fibra · sistema visual (casca, tokens e componentes). Carrega depois do styles.css e manda nele.
   Fundo claro e cartões pretos; o verde da logo fica na aba ativa, na ação principal e no que está em andamento. */

/* 1 · Tokens ---------------------------------------------------------------- */
:root {
  --font: "Urbanist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-2xs: 11px; --fs-xs: 12px; --fs-sm: 12.5px; --fs-md: 13.5px; --fs-base: 14px; --fs-lg: 15px; --fs-xl: 17px; --fs-2xl: 20px; --fs-3xl: 22px; --fs-4xl: 26px;
  --r-xs: 8px; --r-sm: 14px; --r: 22px; --r-lg: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dock-x: 20px; --dock-w: 60px; --gut: clamp(16px, 1.6vw, 28px); --app-max: 1840px; --tabbar-h: 0px;

  --bg: #eff0ee;
  --mesh-a: #d9e8df; --mesh-b: #f9f9f7; --mesh-c: #e2ebe5;
  --glass: #ffffffa3; --glass-2: #ffffffc7; --glass-3: #fffffff0; --rim: #ffffffeb;
  --float: #fcfcfb; --surface: #fcfcfb; --surface-2: #f4f5f3; --well: #1111110f;
  --line: #11111117; --line-2: #1111112b;
  --shadow: 0 1px 0 #fffc inset, 0 22px 44px -30px #00000038;
  --shadow-pop: 0 24px 60px -18px #0000004d, 0 2px 6px #00000014;
  --text: #121212; --ink: #121212; --muted: #4f4f4c; --faint: #636360;
  --green: #008848; --green-dark: #086040; --green-soft: #dcefe5; --on-green: #fff;
  --pill: #008848; --on-pill: #fff;
  --solid: #121212; --solid-ink: #f6f6f4; --solid-line: #121212;
  --dock: #121212; --on-dock: #f6f6f4; --dock-mark: #2fbf74;
  --tile: #121212; --on-tile: #f6f6f4; --on-tile-soft: #f6f6f4c7;
  --up: #086040; --up-soft: #dcefe5; --down: #b1412a; --down-soft: #f8e1da; --warn: #85580a; --warn-soft: #f5ead2;
  --red: #b1412a; --red-soft: #f8e1da; --amber: #85580a; --amber-soft: #f5ead2;
  --radius: var(--r); --radius-sm: var(--r-sm); --sidebar: 0px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0b;
  --mesh-a: #0088481f; --mesh-b: #ffffff06; --mesh-c: #08604026;
  --glass: #ffffff0b; --glass-2: #ffffff14; --glass-3: #202020; --rim: #ffffff13;
  --float: #1a1a1a; --surface: #161616; --surface-2: #1e1e1e; --well: #ffffff11;
  --line: #ffffff16; --line-2: #ffffff29;
  --shadow: 0 1px 0 #ffffff0d inset, 0 24px 48px -30px #000c;
  --shadow-pop: 0 24px 60px -18px #000000b3, 0 0 0 1px #ffffff14;
  --text: #ededeb; --ink: #ededeb; --muted: #a9a9a5; --faint: #8e8e8a;
  --green: #2fbf74; --green-dark: #5fd896; --green-soft: #2fbf7426; --on-green: #06140c;
  --pill: #2fbf74; --on-pill: #06140c;
  --solid: #ededeb; --solid-ink: #111; --solid-line: #ededeb;
  --dock: #ffffff14; --on-dock: #ededeb;
  --tile: #1f1f1f; --on-tile: #ededeb; --on-tile-soft: #ededebc7;
  --up: #8fe3c4; --up-soft: #8fe3c429; --down: #ffb3a1; --down-soft: #ffb3a129; --warn: #e9c46a; --warn-soft: #e9c46a26;
  --red: #ffb3a1; --red-soft: #ffb3a129; --amber: #e9c46a; --amber-soft: #e9c46a26;
  color-scheme: dark;
}

/* 2 · Base ------------------------------------------------------------------ */
body { background: var(--bg); color: var(--text); font: 500 var(--fs-base) / 1.45 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: var(--green); color: var(--on-green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.i { stroke-width: 1.8px; }

.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.mesh i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .95; will-change: transform; }
.mesh__a { width: 62vmax; height: 62vmax; top: -24vmax; left: -18vmax; background: radial-gradient(closest-side, var(--mesh-a), transparent); }
.mesh__b { width: 70vmax; height: 70vmax; bottom: -30vmax; right: -24vmax; background: radial-gradient(closest-side, var(--mesh-b), transparent); }
.mesh__c { width: 46vmax; height: 46vmax; top: -16vmax; right: 8vmax; background: radial-gradient(closest-side, var(--mesh-c), transparent); }

/* 3 · Casca: cabeçalho, abas e dock ----------------------------------------- */
.app { max-width: var(--app-max); margin: 0 auto; padding: 22px var(--gut) 40px calc(var(--dock-x) + var(--dock-w) + var(--gut)); overflow-x: clip; }
.top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; margin-bottom: 24px; }
.brand { display: inline-flex; align-items: center; min-width: 0; border-radius: 14px; }
.brand img { display: block; height: 40px; width: auto; }
:root[data-theme="dark"] .brand img { content: url("logo-delta-escura.png"); }

.tabs { justify-self: center; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim); }
.tabs::-webkit-scrollbar { display: none; }
.tabs__track { position: relative; display: flex; gap: 2px; width: max-content; padding: 4px; }
.tab, .tabs__pill > span { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 10px 16px; border-radius: 999px; font-size: var(--fs-md); font-weight: 600; white-space: nowrap; }
.tab { position: relative; z-index: 1; flex-direction: row; color: var(--text); background: none; text-decoration: none; transition: background-color .2s; }
.tab:hover { background: var(--well); color: var(--text); }
.tab.active { background: none; color: var(--text); }
.tab.active:hover { background: none; }
.tabs__pill { position: absolute; inset: 0; z-index: 2; display: flex; gap: 2px; padding: 4px; background: var(--pill); color: var(--on-pill); opacity: 0; pointer-events: none; }

.top__tools { display: flex; align-items: center; gap: 10px; justify-self: end; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px 8px 12px; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--rim); color: var(--text); font-size: var(--fs-md); font-weight: 600; white-space: nowrap; }
.status__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status__dot.is-on { background: var(--green); box-shadow: none; }
.status__dot.is-on::after { content: ""; position: absolute; inset: -4px; border: 1.5px solid var(--green); border-radius: 50%; opacity: 0; animation: ping 2.2s cubic-bezier(.2, .6, .3, 1) infinite; }
@keyframes ping { 0% { opacity: .9; transform: scale(.4); } 80%, 100% { opacity: 0; transform: scale(1.5); } }

.dock { position: fixed; top: 0; bottom: 0; z-index: 1300; left: max(var(--dock-x), calc((100vw - var(--app-max)) / 2 + var(--dock-x))); display: flex; flex-direction: column; gap: 4px; height: fit-content; margin: auto 0; padding: 8px; border-radius: 999px; background: var(--dock); color: var(--on-dock); box-shadow: 0 20px 40px -18px #0a141e80; }
:root[data-theme="dark"] .dock { backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--line), 0 20px 40px -18px #0009; }
.dock__btn, .dock .nav-item { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; color: inherit; background: none; opacity: .74; transition: opacity .2s, background-color .2s; }
.dock__btn:hover, .dock__btn:focus-visible, .dock__btn.active { opacity: 1; background: #ffffff21; color: inherit; }
.dock__btn:focus-visible { outline-color: var(--on-dock); }
.dock__btn.active::after { content: ""; position: absolute; top: 50%; right: 3px; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--dock-mark); }
.dock__sep { height: 1px; margin: 4px 10px; background: #ffffff24; }
.dock__tip { position: absolute; top: 0; bottom: 0; left: calc(100% + 14px); height: fit-content; margin: auto 0; padding: 6px 10px; border-radius: 10px; background: var(--float); color: var(--text); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s var(--ease); }
.dock__btn:hover .dock__tip, .dock__btn:focus-visible .dock__tip { opacity: 1; }

body.is-demo .app { padding-top: 18px; }
.demo-banner { position: relative; inset: auto; z-index: 2; max-width: calc(var(--app-max) - var(--dock-x) - var(--dock-w) - 2 * var(--gut)); margin: 14px auto 0; margin-left: calc(var(--dock-x) + var(--dock-w) + var(--gut)); margin-right: var(--gut); padding: 8px 8px 8px 18px; border: 0; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: var(--fs-md); box-shadow: none; }

.demo-banner .btn, .demo-banner .btn:hover:not(:disabled) { background: var(--solid); color: var(--solid-ink); box-shadow: none; }

/* 4 · Título e cartões de número -------------------------------------------- */
.page.active { animation: none; }
.page-head { align-items: center; gap: 14px clamp(20px, 2.4vw, 36px); min-height: 48px; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 600; line-height: 1.04; letter-spacing: -.025em; }
.page-head p { margin-top: 6px; color: var(--muted); font-size: var(--fs-md); }

.statbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-tile { display: grid; gap: 6px; min-width: 0; padding: 18px 20px 16px; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); }
.stat-tile__label { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.stat-tile__val { font-size: var(--fs-4xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.stat-tile small { color: var(--faint); font-size: var(--fs-sm); }
.stat-tile--ink { background: var(--tile); box-shadow: none; color: var(--on-tile); }
.stat-tile--ink .stat-tile__label { color: var(--on-tile-soft); }
.stat-tile--alert .stat-tile__val { color: var(--down); }
.stat-tile--warn .stat-tile__val { color: var(--warn); }

/* 5 · Componentes ----------------------------------------------------------- */
.card { padding: 20px; border: 0; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); }
.card--flush { padding: 0; }
.card__title { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.005em; }

h2 { font-weight: 600; letter-spacing: -.01em; }

.btn { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-md); font-weight: 600; transition: background-color .2s, color .2s, box-shadow .2s; }
.btn:hover:not(:disabled) { transform: none; background: var(--glass-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--dark { background: var(--solid); color: var(--solid-ink); box-shadow: none; }
.btn--dark:hover:not(:disabled) { background: color-mix(in srgb, var(--solid) 84%, var(--green)); box-shadow: none; }
.btn--primary { background: var(--green); color: var(--on-green); box-shadow: none; }
.btn--primary:hover:not(:disabled) { background: var(--green-dark); box-shadow: none; }
:root[data-theme="dark"] .btn--primary { color: var(--on-green); }
:root[data-theme="dark"] .btn--primary:hover:not(:disabled) { background: #45cf86; }
.btn--ghost { background: none; box-shadow: none; }
.btn--sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 999px; }
.btn--lg { height: 46px; font-size: var(--fs-lg); }
.btn:disabled { background: var(--well); color: var(--faint); box-shadow: none; opacity: 1; }
.icon-btn { border: 0; border-radius: 50%; background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--well); color: var(--text); }
.link-btn { color: var(--green-dark); font-size: var(--fs-sm); font-weight: 600; }
.pill-btn { border: 0; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.pill-btn.is-on, .pill-btn.selected { background: var(--solid); color: var(--solid-ink); box-shadow: none; }
.tag { padding: 2px 10px; border: 0; background: var(--well); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }

.count { background: var(--well); color: inherit; }

.field { font-size: var(--fs-sm); font-weight: 600; }
.field input, .field select, .inline-controls select, select, .field textarea, textarea { border: 0; border-radius: var(--r-sm); background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-md); }
.field input, .field select, .inline-controls select, select { height: 40px; }
.field input:focus, select:focus, textarea:focus { outline: none; border: 0; box-shadow: inset 0 0 0 1.5px var(--green); }
.search { height: 40px; border: 0; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.toggle-chip { border: 0; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); font-weight: 600; }
.toggle-chip:has(input:checked) { background: var(--solid); color: var(--solid-ink); box-shadow: none; }
:root[data-theme="dark"] .toggle-chip:has(input:checked) { color: var(--solid-ink); }

.table-wrap { border: 0; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); }
th { padding: 10px 14px; background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
td { padding: 12px 14px; border-top: 1px solid var(--line); font-size: var(--fs-md); }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: var(--well); }

.empty-state { border: 0; background: none; color: var(--muted); }
.empty-icon { background: var(--well); color: var(--muted); }
.more summary b { font-weight: 600; }

.bar-pop__panel, .more-menu__panel { border: 0; border-radius: var(--r); background: var(--float); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line); }
.pick { border: 0; border-radius: var(--r-sm); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); }
.avatar{ background: var(--well); color: var(--muted); }
.pick:has(input:checked) { background: var(--green-soft); box-shadow: inset 0 0 0 1.5px var(--green); }
.pick:has(input:checked) .avatar { background: var(--green); color: var(--on-green); }

.sheet { border: 0; border-radius: var(--r-lg); background: var(--float); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line); }
dialog::backdrop { background: #0e182047; backdrop-filter: blur(6px); }
:root[data-theme="dark"] dialog::backdrop { background: #00000094; }
.toast { border-radius: 999px; background: var(--solid); color: var(--solid-ink); font-size: var(--fs-md); font-weight: 600; box-shadow: var(--shadow-pop); }

/* 6 · Rotas do dia ---------------------------------------------------------- */

.routes-bar__send { margin-left: auto; }

.pending-alert { border: 0; border-radius: var(--r); background: var(--warn-soft); color: var(--warn); }

.map-card { border-radius: var(--r); overflow: hidden; height: clamp(480px, calc(100vh - 330px), 860px); }
.map-card .map { border-radius: 0; }
.map-badge { background: var(--float); box-shadow: var(--shadow-pop); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.map-legend { border-radius: 999px; background: var(--float); box-shadow: var(--shadow-pop); font-size: var(--fs-xs); font-weight: 600; }
.route-panel { border-left: 1px solid var(--line); background: var(--glass); }
.route-panel__head strong { font-size: var(--fs-lg); font-weight: 600; }

.shift-switch { position: relative; padding: 3px; gap: 0; border: 0; border-radius: 999px; background: var(--well); }
.shift-switch button { position: relative; z-index: 1; height: 32px; border-radius: 999px; background: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; transition: color .2s; }
.shift-switch button.is-on, :root[data-theme="dark"] .shift-switch button.is-on { background: none; color: var(--text); }
.shift-switch__pill { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 999px; background: var(--glass-3); box-shadow: 0 2px 8px #0000001a; pointer-events: none; }
:root[data-theme="dark"] .shift-switch__pill { background: #ffffff24; }
html:not(.has-motion) .shift-switch button.is-on { background: var(--glass-3); }

/* Painel do dia */
.panel-summary { gap: 16px; margin-bottom: 16px; }

.panel-map-card { border-radius: var(--r); overflow: hidden; }

/* Campos nativos e mapa */
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; background-size: 14px; }
input[type="date"], input[type="time"] { height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--rim); font: 600 var(--fs-md) var(--font); }

.leaflet-bar { border: 0 !important; border-radius: var(--r-sm) !important; overflow: hidden; box-shadow: var(--shadow-pop) !important; }
.leaflet-bar a { background: var(--float); color: var(--text); border-color: var(--line); }

/* 7 · Tema: a troca abre em círculo a partir do botão ------------------------ */
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; animation: none; }

/* 8 · Telas menores --------------------------------------------------------- */
@media (hover: none) {
  .tab:hover { background: none; }
  .dock__btn:hover:not(.active) { opacity: .74; background: none; }
  .dock__btn:hover .dock__tip { opacity: 0; }
}
@media (max-width: 1280px) { .statbar { gap: 12px; } }
@media (max-width: 1080px) {
  :root { --tabbar-h: calc(80px + env(safe-area-inset-bottom)); }
  .app { padding: max(16px, env(safe-area-inset-top)) var(--gut) calc(var(--tabbar-h) + 24px); }
  .top { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; margin-bottom: 18px; }
  .tabs { grid-area: 2 / 1 / auto / -1; justify-self: start; }
  .top__tools { grid-area: 1 / 2; }
  .dock { top: auto; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom)); flex-direction: row; width: fit-content; height: auto; margin: 0 auto; }
  .dock__sep { width: 1px; height: auto; margin: 10px 4px; }
  .dock__tip { display: none; }
  .dock__btn.active::after { inset: auto auto 3px 50%; margin: 0 0 0 -2.5px; }
  .statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-group { margin-left: 0; }
  .panel-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .route-panel { bottom: 0; height: calc(150px + var(--tabbar-h)); padding-bottom: var(--tabbar-h); background: var(--float); border-radius: var(--r) var(--r) 0 0; }
  .route-panel.is-open { height: calc(72vh + var(--tabbar-h)); }
  .tab, .dock .nav-item { font-size: var(--fs-md); }
  .demo-banner { flex-wrap: wrap; margin: 12px var(--gut) 0; padding: 12px 16px; border-radius: var(--r); }
}
@media (max-width: 760px) {
  .tabs { width: calc(100% + 2 * var(--gut)); max-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 calc(var(--gut) - 4px); border-radius: 0; background: none; box-shadow: none; }
  .page-head h1 { font-size: 28px; }
  .status span:last-child { display: none; }
  .status { padding: 0 13px; }
}
@media (pointer: coarse) {
  .btn { height: 44px; }
  .btn--sm { height: 38px; }
  .tab, .tabs__pill > span { padding-top: 12px; padding-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .mesh i { will-change: auto; }
  .status__dot.is-on::after { animation: none; }
}

/* 9 · Estrutura de painel: barra, cartões de número e grade --------------------- */
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(20px, 2.4vw, 36px); min-height: 48px; margin-bottom: 20px; }
.head__title { font-size: clamp(28px, 2.6vw, 38px); font-weight: 600; line-height: 1.04; letter-spacing: -.025em; white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 8px 13px 8px 12px; border-radius: 999px; background: var(--glass-3); color: var(--text); font-size: var(--fs-md); font-weight: 600; }
.live b { font-weight: 700; }
.live__label { font-weight: 500; }
.live__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.live__dot::after { content: ""; position: absolute; inset: -4px; border: 1.5px solid var(--green); border-radius: 50%; opacity: 0; animation: ping 2.2s cubic-bezier(.2, .6, .3, 1) infinite; }

.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: grid; gap: 12px; min-width: 0; padding: 18px 20px 16px; border-radius: var(--r); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.kpi__label { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.kpi__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.kpi__fig { display: grid; gap: 8px; min-width: 0; }
.kpi__val { font-size: var(--fs-4xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.kpi__meta { color: var(--faint); font-size: var(--fs-sm); min-height: 18px; }
.kpi__mini { display: flex; flex: none; align-items: flex-end; justify-content: flex-end; gap: 4px; width: 84px; height: 44px; }
.kpi .more-link { justify-self: start; width: 100%; padding-top: 10px; border-top: 1px dashed var(--line-2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.kpi .more-link:hover { color: var(--green-dark); }
.kpi--ink { --line-2: #ffffff3d; background: var(--tile); color: var(--on-tile); box-shadow: none; }
.kpi .kpi__val { color: inherit; font-weight: 600; }
.kpi--ink .kpi__label, .kpi--ink .kpi__meta, .kpi--ink .more-link { color: var(--on-tile-soft); }
.kpi--gray { background: #e2e2de; box-shadow: none; }
.kpi--gray2 { background: #d2d2cd; box-shadow: none; }
:root[data-theme="dark"] .kpi--gray { background: #242424; }
:root[data-theme="dark"] .kpi--gray2 { background: #2c2c2c; }
.mini-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; border-radius: 7px; background: #ffffff24; overflow: hidden; }
.mini-bar i { display: block; width: 100%; border-radius: inherit; background: var(--dock-mark); transform-origin: bottom; }
.kpi:not(.kpi--ink) .mini-bar { background: var(--well); }
.kpi:not(.kpi--ink) .mini-bar i { background: var(--green); }
.ring { width: 44px; height: 44px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; stroke: var(--well); }
.ring circle + circle { stroke: var(--green); stroke-linecap: round; }

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dash-grid > .card { margin: 0; min-width: 0; }
.dash-gauge { grid-column: span 4; }
.dash-map { grid-column: span 8; }
.dash-techs { grid-column: span 7; }
.dash-kinds { grid-column: span 5; }
.dash-load, .dash-orders { grid-column: 1 / -1; }
.card__head { display: flex; align-items: center; gap: 10px; min-height: 32px; margin-bottom: 14px; }
.card__head .card__title { margin: 0; }
.card__sub { color: var(--muted); font-size: var(--fs-sm); }

.card--ink { --line-2: #ffffff3d; display: flex; flex-direction: column; background: var(--tile); color: var(--on-tile); box-shadow: none; }
.dash-gauge .card__title { font-size: var(--fs-lg); }
.gauge { position: relative; margin: auto; width: min(100%, 360px); }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge__val { position: absolute; left: 0; right: 0; bottom: 4px; display: grid; justify-items: center; gap: 2px; }
.gauge__val b { font-size: 42px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.gauge__val span { color: var(--on-tile-soft); font-size: var(--fs-sm); }
.dash-gauge strong { padding-top: 12px; font-size: var(--fs-lg); font-weight: 600; }
.dash-gauge p { margin-top: 4px; color: var(--on-tile-soft); font-size: var(--fs-md); }

.dash-gauge .routes-bar__send { margin: 0; }

.dash-map.map-card { display: block; height: 500px; }
.dash-map .map-card__map { height: 100%; }
.dash-map.map-card.is-max, .dash-map.map-card:fullscreen { height: 100dvh; border-radius: 0; }
@media (min-width: 901px) { .dash-map.map-card.is-max, .dash-map.map-card:fullscreen { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); } }
.dash-techs { display: flex; flex-direction: column; min-height: 320px; overflow: hidden; }
.dash-techs .route-panel { position: static; width: auto; height: auto !important; flex: 1; border: 0; border-radius: 0; background: none; box-shadow: none; }
.dash-techs .route-panel__head { padding: 18px 16px 12px 20px; }
.dash-techs .route-panel__grip, .dash-techs .route-panel__toggle { display: none !important; }
.dash-techs .route-list { max-height: 420px; }

.donut-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: 18px; min-height: 200px; }
.donut { position: relative; width: 180px; height: 180px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 15; }
.donut__mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut__mid b { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.donut__mid span { color: var(--muted); font-size: var(--fs-sm); }
.donut-total { display: grid; gap: 2px; margin-bottom: 14px; }
.donut-total b { font-size: var(--fs-4xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.donut-total span { color: var(--muted); font-size: var(--fs-sm); }
.legend-rows { display: grid; gap: 10px; }
.legend-rows div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: var(--fs-md); }
.legend-rows i { width: 10px; height: 10px; border-radius: 3px; }

.bars { position: relative; display: flex; align-items: flex-end; gap: clamp(10px, 2.4vw, 36px); height: 240px; padding-top: 44px; }
.bars__col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; cursor: default; }
.bars__bar { width: min(100%, 44px); border-radius: 999px; background: repeating-linear-gradient(-45deg, #1111112e 0 2px, #11111109 2px 7px); transform-origin: bottom; transition: background .2s; }
:root[data-theme="dark"] .bars__bar { background: repeating-linear-gradient(-45deg, #ffffff40 0 2px, #ffffff0a 2px 7px); }
.bars__col.is-on .bars__bar { background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%); }
.bars__name { max-width: 100%; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars__col.is-on .bars__name { color: var(--text); }
.bars__tip { position: absolute; z-index: 3; min-width: 140px; padding: 10px 12px; border-radius: 14px; background: var(--tile); color: var(--on-tile); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); pointer-events: none; opacity: 0; transition: opacity .15s; }
.bars__tip b { display: block; margin-bottom: 6px; font-weight: 700; }
.bars__tip div { display: flex; justify-content: space-between; gap: 18px; color: var(--on-tile-soft); }
.bars__tip div span:last-child { color: var(--on-tile); font-weight: 700; }
.bars__empty { margin: auto; color: var(--muted); font-size: var(--fs-md); text-align: center; }

.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: auto; width: fit-content; margin-bottom: 12px; padding: 3px; border-radius: 999px; background: var(--well); }
.seg button { position: relative; z-index: 1; height: 32px; padding: 0 16px; border: 0; border-radius: 999px; background: none; box-shadow: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.seg button.is-on, .seg button:hover { color: var(--text); }
.seg__pill { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 999px; background: var(--glass-3); box-shadow: 0 2px 8px #0000001a; pointer-events: none; }
:root[data-theme="dark"] .seg__pill { background: #ffffff24; }
.dash-orders .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.dash-orders .search { flex: 0 1 340px; }
.toolbar__end { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.dash-orders .table-wrap { margin: 0 -20px -20px; border-radius: 0 0 var(--r) var(--r); box-shadow: none; border-top: 1px solid var(--line); }
.route-disclaimer { margin: 0; padding: 10px 20px 14px; color: var(--muted); font-size: var(--fs-sm); }
.route-disclaimer:empty { display: none; }
.dash-orders th:first-child, .dash-orders td:first-child { padding-left: 20px; }

.ibtn { position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--text); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--rim); transition: background-color .2s; }
.ibtn:hover { background: var(--glass-3); }
.ibtn[aria-expanded="true"] { background: var(--solid); color: var(--solid-ink); }
.bell__dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 2px var(--bg); }
.bell__dot.is-off { display: none; }
.pop { position: fixed; z-index: 1400; width: min(380px, 100vw - 24px); overflow: hidden; border-radius: var(--r); background: var(--float); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line); }
.pop__head { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: var(--fs-base); }
.pop__head b { font-weight: 700; }
.pop__body { display: grid; gap: 10px; padding: 12px; max-height: 60vh; overflow: auto; }
.pop__body .pending-alert, .pop__body .tracking-warning { margin: 0; border-radius: var(--r-sm); }
.pop__empty { padding: 18px 8px; color: var(--muted); text-align: center; font-size: var(--fs-md); }

dialog.finder { width: min(620px, 100vw - 24px); max-width: none; max-height: none; margin: 12vh auto auto; padding: 0; border: 0; background: none; color: var(--text); }
.finder__box { overflow: hidden; border-radius: 24px; background: var(--float); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line); }
.finder__field { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--faint); }
.finder__field input { flex: 1; border: 0; outline: none; background: none; color: var(--text); font: 500 var(--fs-xl) var(--font); }
.finder__list { max-height: 50vh; margin: 0; padding: 8px; overflow-y: auto; list-style: none; }
.finder__group { padding: 10px 10px 4px; color: var(--muted); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.finder__hit { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 14px; text-align: left; cursor: pointer; }
.finder__hit:hover, .finder__hit.is-on { background: var(--well); }
.finder__hit b { font-weight: 600; }
.finder__hit small { margin-left: auto; color: var(--faint); font-size: var(--fs-xs); }
.finder__empty { padding: 28px 16px; color: var(--muted); text-align: center; }
kbd { padding: 2px 7px; border-radius: 7px; background: var(--glass-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); font: 600 var(--fs-2xs) var(--font); }

@media (max-width: 1100px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dash-gauge, .dash-map, .dash-techs, .dash-kinds { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .dash-map.map-card { height: 420px; }
  .dash-techs .route-panel { box-shadow: none; }
  .map-legend { display: none; }
  body:has(#page-routes.active) .app { padding-bottom: calc(var(--tabbar-h) + 24px); }
}
@media (max-width: 560px) {

  .kpi { gap: 8px; padding: 14px; }
  .kpi__mini { display: none; }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .donut-wrap > div:first-child { width: 100%; }
  .bars { overflow-x: auto; }
  .bars__col { min-width: 58px; }
}
@media (prefers-reduced-motion: reduce) { .live__dot::after { animation: none; } }

/* 10 · Ações rápidas: dia e troca de técnico ------------------------------------ */
.day-nav { display: flex; align-items: center; justify-self: center; gap: 8px; }
.day-pick { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--glass-3); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.day-pick__arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--text); transition: background-color .2s; }
.day-pick__arrow:hover { background: var(--well); }
.day-pick__label { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; color: var(--text); font-size: var(--fs-base); font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color .2s; }
.day-pick__label:hover { background: var(--well); }
.day-pick__label input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.day-pick__label:focus-within { outline: 2px solid var(--green); outline-offset: 1px; }
.day-pick__chev { color: var(--muted); }

.tech-pick { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 34px; padding: 0 10px 0 14px; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-size: var(--fs-md); font-weight: 600; text-align: left; transition: background-color .2s, box-shadow .2s; }
.tech-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-pick svg { flex: none; color: var(--muted); }
.tech-pick:hover { background: var(--glass-3); box-shadow: inset 0 0 0 1.5px var(--green); }
.tech-pick.is-empty { background: var(--green); color: var(--on-green); box-shadow: none; }
.tech-pick.is-empty svg { color: inherit; }

.stop-swap { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: background-color .2s, color .2s; }
.stop-swap:hover { background: var(--green); color: var(--on-green); box-shadow: none; }
.stop-item[draggable="true"] { cursor: grab; }
.stop-item.is-dragging { opacity: .45; }
.tech-route.is-drop { background: var(--green-soft); box-shadow: inset 0 0 0 1.5px var(--green); }

.move-menu { width: 280px; max-height: min(420px, 70vh); display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 0; border-radius: var(--r); background: var(--float); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line); }
.move-menu > b { padding: 6px 8px 8px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.move-menu__search { display: flex; align-items: center; gap: 8px; height: 38px; margin-bottom: 4px; padding: 0 12px; border-radius: 999px; background: var(--well); color: var(--muted); }
.move-menu__search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; box-shadow: none; color: var(--text); font: 500 var(--fs-md) var(--font); }
.move-menu__list { display: grid; gap: 2px; overflow: auto; }
.move-menu__list button { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: var(--r-sm); font-size: var(--fs-md); font-weight: 600; text-align: left; }
.move-menu__list button[hidden] { display: none; }
.move-menu__list button:hover, .move-menu__list button:focus-visible { background: var(--well); outline: none; }
.move-menu__list i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--well); color: var(--muted); font-size: var(--fs-2xs); font-style: normal; font-weight: 700; }
.move-menu__list span { padding: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md); }
.move-menu__list small { color: var(--faint); font-size: var(--fs-xs); font-weight: 500; }
.move-menu__list .is-current { opacity: .7; }
.move-menu__auto { margin-top: 4px; padding: 10px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm) !important; color: var(--green-dark); font-size: var(--fs-sm); font-weight: 600; text-align: left; }

.toast { display: inline-flex; align-items: center; gap: 12px; inset: auto auto 24px 50%; margin: 0; padding: 10px 12px 10px 18px; border: 0; overflow: visible; }
.toast.show { pointer-events: auto; }
.toast__undo { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--green); color: var(--on-green); font-size: var(--fs-sm); font-weight: 700; }

@media (max-width: 560px) { .day-nav { justify-self: stretch; justify-content: space-between; } .stop-swap { height: 34px; } }
@media (max-width: 1280px) { .day-nav { justify-self: end; } }

/* 11 · Tabela de OS compacta e atalhos da página --------------------------------- */
.dash-orders { scroll-margin-top: 68px; }
#tecnicos-dia, #dash-map-anchor { scroll-margin-top: 68px; }
.dash-orders .table-wrap { max-height: calc(100vh - 150px); overflow: auto; }
.dash-orders table { font-size: var(--fs-md); }
.dash-orders th { z-index: 2; background: var(--surface-2); white-space: nowrap; }
.dash-orders td { padding: 8px 12px; vertical-align: middle; }
.os-cell, .os-service { max-width: 280px; }
.order-id { display: block; color: var(--faint); font-size: var(--fs-xs); font-weight: 600; }
.order-client, .order-subject { display: block; overflow: hidden; color: var(--text); font-size: var(--fs-md); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.order-subject { font-weight: 500; }
.os-service small { display: block; overflow: hidden; color: var(--faint); font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; }
.dash-orders .location-name { max-width: 190px; color: var(--muted); font-size: var(--fs-sm); }
.dash-orders .location-name span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.os-time { max-width: 210px; }
.order-time { display: block; white-space: nowrap; font-size: var(--fs-sm); }
.os-time .kind-pill, .os-time [class*="pill"] { display: inline-flex; max-width: 100%; margin-top: 3px; overflow: hidden; font-size: var(--fs-2xs); white-space: nowrap; text-overflow: ellipsis; }
.os-acts { text-align: right; white-space: nowrap; }
.act-onu-btn { display: inline-flex; margin: 0; }
.dash-orders .tech-pick { min-height: 32px; max-width: 190px; }
.priority-pill { white-space: nowrap; }

.jump { position: fixed; top: 12px; left: 50%; z-index: 1250; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass-3); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line); transform: translate(-50%, -70px); opacity: 0; backdrop-filter: blur(14px); transition: transform .45s var(--ease), opacity .25s; }
.jump.is-on { transform: translate(-50%, 0); opacity: 1; }
.jump button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; color: var(--text); font-size: var(--fs-md); font-weight: 600; white-space: nowrap; transition: background-color .2s, color .2s; }
.jump button:hover { background: var(--well); }
.jump button.is-here { background: var(--pill); color: var(--on-pill); }
.jump button[data-jump="top"] { width: 34px; padding: 0; justify-content: center; }
.jump__count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--well); font-size: var(--fs-2xs); font-weight: 700; text-align: center; }
.jump__count:empty { display: none; }
.jump .is-here .jump__count { background: #ffffff2e; }

@media (max-width: 1280px) { .dash-orders .location-name { display: none; } .dash-orders th:nth-child(3) { display: none; } }
@media (max-width: 760px) {
  .dash-orders .table-wrap { max-height: none; }
  .dash-orders table, .dash-orders tbody, .dash-orders tr, .dash-orders td { display: block; }
  .dash-orders thead { display: none; }
  .dash-orders tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
  .dash-orders td { max-width: none; padding: 0 !important; border: 0; }
  .dash-orders .os-acts { grid-column: 1 / -1; text-align: left; }
  .jump button { padding: 0 11px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) { .status { justify-content: center; width: 34px; height: 34px; padding: 0; } }

/* 12 · Montar as rotas: os quatro passos sempre à vista --------------------------- */
.head .shift-switch { display: inline-grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 1fr; margin: 0; }
.head .shift-switch button { padding: 0 16px; }
.head .day-nav { justify-self: auto; }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.75fr) minmax(0, .95fr); gap: 2px; margin-bottom: 16px; padding: 6px; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); }
.flow__step { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: 16px; transition: background-color .25s; }
.flow__step > :nth-child(3) { grid-column: 1 / -1; }
.flow__n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--well); color: var(--muted); font-size: var(--fs-md); font-weight: 700; transition: background-color .25s, color .25s; }
.flow__txt { display: grid; min-width: 0; line-height: 1.25; }
.flow__txt b { font-size: var(--fs-base); font-weight: 600; }
.flow__txt small { overflow: hidden; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; text-overflow: ellipsis; }
.flow__step.is-done .flow__n { background: var(--green-soft); color: var(--green-dark); }
.flow__step.is-now { background: var(--glass-3); box-shadow: inset 0 0 0 1.5px var(--green); }
.flow__step.is-now .flow__n { background: var(--green); color: var(--on-green); }
.flow__step.is-bad small { color: var(--down); font-weight: 600; }
.flow__step .btn, .flow__step .bar-pop, .flow__step .bar-pop > summary { width: 100%; }
.flow__build { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .75fr) minmax(0, .75fr); gap: 6px; }
.flow__build .btn { width: 100%; padding: 0 10px; }
.flow .bar-pop > summary.btn { display: inline-flex; justify-content: center; list-style: none; }
.flow .bar-pop__panel { z-index: 1000; }
.flow__step:not(.is-ready) .routes-bar__send.hidden { display: none; }
.routes-bar__send { margin: 0; }
#team-build { margin-top: 8px; }

@media (max-width: 1280px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .flow { grid-template-columns: minmax(0, 1fr); } .head .shift-switch { width: 100%; } .head .day-nav { width: 100%; justify-content: space-between; } .head .live { margin-left: 0; } }

/* 13 · Quadro de OS: colunas por técnico, como um kanban ---------------------------- */
.board { background: var(--bg); }
.board__head { gap: 10px 14px; padding: 16px var(--gut) 14px; border: 0; background: none; }
.board__title { margin-right: 10px; font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; letter-spacing: -.025em; }

.board__summary { color: var(--muted); font-size: var(--fs-sm); }
.board__body { gap: 16px; padding: 0 var(--gut) var(--gut); grid-template-columns: minmax(320px, 34%) minmax(0, 1fr); }
.board.is-nomap .board__body { grid-template-columns: minmax(0, 1fr); }
.board.is-nomap .board__map { display: none; }
.board__map { border-radius: var(--r); overflow: hidden; }
.board__columns { gap: 14px; padding: 0 0 6px; }
.board-col { flex: 0 0 300px; padding: 6px; border: 0; border-radius: var(--r); background: #e2e2de; box-shadow: none; }
:root[data-theme="dark"] .board-col { background: #1c1c1c; }
.board-col.is-over { background: var(--green-soft); box-shadow: inset 0 0 0 1.5px var(--green); }
.board-col__head { padding: 10px 12px; border: 0; font-size: var(--fs-base); }
.board-col__head b { font-weight: 600; }
.board-col__dot { width: 9px; height: 9px; }
.board-col__head .count { background: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.board-col__list { gap: 8px; padding: 2px; }
.board-col__empty { border: 0; color: var(--muted); }
.board-card { gap: 4px; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px #0000000f; font-size: var(--fs-sm); transition: box-shadow .2s, transform .2s; }
.board-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.board-card.is-flash { box-shadow: 0 0 0 2px var(--green); }
.board-card.is-pending { background: var(--warn-soft); }
.board-card.is-moved { border: 0; box-shadow: inset 0 0 0 1.5px var(--green); }
.board-card.is-f { opacity: .62; }
.board-card strong { font-size: var(--fs-base); font-weight: 600; }
.board-card__top b { font-weight: 600; font-size: var(--fs-sm); }
.board-card__subject { font-weight: 500; font-size: var(--fs-sm); }
.board-card small { font-size: var(--fs-xs); }
.board-card__actions { gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.board-card__actions .btn { flex: 1; height: 30px; padding: 0 8px; font-size: var(--fs-xs); box-shadow: none; background: var(--well); }
.board-card__actions .btn:hover:not(:disabled) { background: var(--solid); color: var(--solid-ink); box-shadow: none; }
.board-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; background: var(--well); color: var(--muted); font-size: var(--fs-2xs); font-weight: 600; }
.board-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.board-status.is-ag { background: var(--well); color: var(--text); }
.board-status.is-ex, .board-status.is-ds { background: var(--green-soft); color: var(--green-dark); }
.board-status.is-an { background: var(--warn-soft); color: var(--warn); }
.board-flag { color: var(--warn); font-size: var(--fs-xs); font-weight: 600; }
.board-drop { border-radius: var(--r); border: 1.5px dashed var(--green); background: var(--green-soft); color: var(--green-dark); }

/* 14 · Ficha e janelas grandes: painel lateral --------------------------------------- */
dialog.sheet:not(.sheet--small) { width: min(860px, calc(100vw - 24px)); height: calc(100dvh - 24px); margin: 12px 12px 12px auto; border-radius: var(--r-lg); }
.sheet form { padding: 22px 24px 0; }
.sheet__head h2 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -.02em; }
.sheet__head .hint { font-size: var(--fs-md); color: var(--muted); }
.sheet__foot { background: var(--float); border-top: 1px solid var(--line); }
.sheet__foot .btn { height: 40px; padding: 0 18px; }
.sheet--small textarea { border: 0; border-radius: var(--r-sm); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-md); }
.sheet-badge { background: var(--well); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }

@media (max-width: 900px) {
  .board__body { display: flex; flex-direction: column; }
  .board__map { flex: 0 0 240px; min-height: 0; }
  .board__columns { flex: 1; min-height: 0; }
  .board-col { flex-basis: min(300px, 84vw); }
  dialog.sheet:not(.sheet--small) { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; }
}

/* 15 · Painel do dia: lista com rolagem própria ao lado do mapa ------------------------ */


.panel-map-card { top: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 150px); }
.panel-map-card .map { flex: 1; height: auto; min-height: 420px; }

#sheet-act-open, .sheet [data-act-open] { background: var(--solid); color: var(--solid-ink); box-shadow: none; }

/* 16 · Login -------------------------------------------------------------------------- */
.login-card { gap: 16px; padding: 32px 28px; border-radius: var(--r-lg); background: var(--float); box-shadow: var(--shadow-pop); }
.login-card h1 { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -.02em; }
.login-card .btn--lg { height: 46px; }

/* 18 · Componentes do Corbel usados nas telas: pílulas, avatares, tabela, campos, chips, modal ------------------- */
.head__sub { flex-basis: 100%; margin-top: -8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--well); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill--mint { background: var(--up-soft); color: var(--up); }
.pill--coral { background: var(--down-soft); color: var(--down); }
.pill--amber { background: var(--warn-soft); color: var(--warn); }
.pill--blue { background: var(--green-soft); color: var(--green-dark); }
.pill--gray { background: var(--well); color: var(--muted); }
.av { --h: 150; display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: hsl(var(--h) 18% 88%); color: hsl(var(--h) 20% 24%); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; }

.av--lg { width: 56px; height: 56px; font-size: 18px; }
:root[data-theme="dark"] .av { background: hsl(var(--h) 10% 26%); color: hsl(var(--h) 30% 88%); }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.cus-who { display: grid; min-width: 0; line-height: 1.35; }
.cus-who b { font-weight: 600; }
.cus-who small { overflow: hidden; color: var(--faint); font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; }
.cus-link { padding: 0; border: 0; background: none; color: var(--text); border-radius: 8px; cursor: pointer; }
.cus-link:hover b { color: var(--green-dark); }
.cus-none { color: var(--faint); }
.cus-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cus-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--well); color: var(--muted); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; }
.cus-sub { display: block; color: var(--faint); font-size: var(--fs-xs); }
.cus-hours { font-weight: 500; white-space: nowrap; }
.cus-showing { margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--well); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; line-height: 20px; vertical-align: middle; }
.cus-showing:empty { display: none; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.table th { position: sticky; top: 0; z-index: 1; padding: 10px 14px; border-block: 1px solid var(--line); background: var(--surface-2); text-align: left; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.table td { padding: 10px 14px; border-top: 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table th.num { text-align: right; }
.cus-tablecard .card__head { margin-bottom: 16px; }
.cus-tablecard .table-wrap { margin: 0 -20px -20px; border-radius: 0 0 var(--r) var(--r); box-shadow: none; overflow: auto; }
.cus-table th:first-child, .cus-table td:first-child, .an-ptable th:first-child, .an-ptable td:first-child, .lnk-table th:first-child, .lnk-table td:first-child { padding-left: 20px; }
.cus-table th:last-child, .cus-table td:last-child, .an-ptable th:last-child, .an-ptable td:last-child, .lnk-table th:last-child, .lnk-table td:last-child { padding-right: 20px; }
.cus-table td { height: 56px; padding-block: 8px; }
.cus-table tr.is-hidden td { opacity: .6; }
.cus-table .switch { margin: 0; }
.input-icon { position: relative; display: block; }
.input-icon .i { position: absolute; top: 50%; left: 13px; width: 16px; height: 16px; margin-top: -8px; color: var(--faint); pointer-events: none; }
.input-icon .input { padding-left: 36px; border-radius: 999px; }
.input { width: 100%; height: 40px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 var(--fs-md) var(--font); }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--green); }
.cus-search { width: 260px; }
.cus-search .input { height: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--pill); color: var(--on-pill); box-shadow: none; }
.cus-chip-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--well); color: var(--muted); font-size: var(--fs-2xs); font-weight: 700; line-height: 18px; text-align: center; }
.cus-chip-n:empty { display: none; }
.chip[aria-pressed="true"] .cus-chip-n { background: #ffffff2e; color: inherit; }
.cus-bar { row-gap: 12px; margin-bottom: 16px; }
.cus-stats { margin-bottom: 16px; }
.live--auto:has(#live-count:empty) { display: none; }
.empty { display: grid; place-items: center; gap: 6px; padding: 40px 16px; color: var(--muted); text-align: center; }
.empty b { font-weight: 600; color: var(--text); }
.dash-asof { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: var(--fs-sm); }

dialog.modal { width: min(560px, 100vw - 24px); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; background: none; color: var(--text); }
.modal__box { border-radius: 26px; background: var(--float); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line); }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 20px 22px 0; }
.modal__head h2 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.015em; }
.modal__head .icon-btn { margin-left: auto; }
.modal__body { display: grid; gap: 14px; padding: 16px 22px 22px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.sheet__box { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.sheet__box > .sheet__head { align-items: center; gap: 14px; margin: 0; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.sheet__who { flex: 1; min-width: 0; }
.sheet__who h2 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -.02em; }
.sheet__body { display: grid; flex: 1; align-content: start; gap: 12px; padding: 18px 22px 26px; overflow-y: auto; }
.sheet-sec { padding: 16px 18px; border-radius: var(--r-sm); background: var(--surface-2); }
.sheet-sec--quiet { background: none; padding: 4px 0 0; }
.sheet-sec .form-line { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: start; gap: 8px 12px; padding: 8px 0; }
.sheet-sec .form-line__label { padding-top: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.sheet-sec .inline-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.sheet-sec select { height: 36px; }
.sheet-sec .phone { display: grid; gap: 6px; font-size: var(--fs-sm); }
.sheet-sec .phone-code code { padding: 2px 6px; border-radius: 6px; background: var(--well); font-size: var(--fs-xs); }

/* 19 · Painel do dia (página de análise) --------------------------------------------------------------- */
.an-toolbar { margin-bottom: 16px; }
.an-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.an-kpi .kpi__row { align-items: flex-end; }
.an-kpi .kpi__fig small { display: block; color: var(--faint); font-size: var(--fs-sm); }
.an-spark { flex: none; width: 96px; height: 34px; overflow: visible; }
.an-spark__line { fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.an-spark__area { fill: var(--green); opacity: .12; }
.an-spark--down .an-spark__line { stroke: var(--down); }
.an-spark--down .an-spark__area { fill: var(--down); }
.stat-tile--ink .an-spark__line { stroke: var(--dock-mark); }
.stat-tile--ink .an-spark__area { fill: var(--dock-mark); opacity: .18; }
.stat-tile--ink .ring circle { stroke: #ffffff24; }
.stat-tile--ink .ring circle + circle { stroke: var(--dock-mark); }
.an-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 16px; }
.an-grid > .card { margin: 0; min-width: 0; }
.an-main { grid-column: span 8; display: flex; flex-direction: column; }
.an-split { grid-column: span 4; display: flex; flex-direction: column; }
.an-products { grid-column: span 7; }
.an-mapcard { grid-column: span 5; grid-row: span 2; display: flex; flex-direction: column; min-height: 560px; }
.an-week { grid-column: span 7; display: flex; flex-direction: column; }
.an-main__head { align-items: flex-start; margin-bottom: 6px; }
.an-main__fig { display: grid; gap: 4px; }
.an-main__total { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.an-main__total b { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.delta { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--up-soft); color: var(--up); font-size: var(--fs-2xs); font-weight: 700; }
.delta.is-down { background: var(--down-soft); color: var(--down); }
.an-legend { display: flex; gap: 16px; margin-left: auto; padding: 0; list-style: none; color: var(--muted); font-size: var(--fs-sm); }
.an-legend li { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.an-sw { display: inline-block; flex: none; width: 16px; height: 0; border-top: 2.5px solid var(--green); border-radius: 2px; }
.an-sw--prev { border-top: 2px dashed var(--faint); }
.an-chart { position: relative; flex: 1; min-height: 280px; margin: 0 -6px -6px; border-radius: 10px; outline-offset: 4px; touch-action: pan-y; }
.an-chart__svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.an-grad-a { stop-color: var(--green); stop-opacity: .18; }
.an-grad-b { stop-color: var(--green); stop-opacity: 0; }
.an-gridlines line { stroke: var(--line); stroke-width: 1; }
.an-gridlines text, .an-xlabels text { fill: var(--faint); font: 500 11px var(--font); }
.an-area { fill: url(#an-grad); }
.an-line { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.an-prev { fill: none; stroke: var(--faint); stroke-width: 1.7; stroke-dasharray: 5 5; stroke-linecap: round; opacity: .8; }
.an-now { stroke: var(--text); stroke-width: 1; stroke-dasharray: 2 4; opacity: .5; }
.an-cross { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.an-dot { fill: var(--surface); stroke: var(--green); stroke-width: 3; pointer-events: none; }
.an-tip { position: absolute; top: 0; left: 0; z-index: 2; display: grid; gap: 5px; min-width: 180px; padding: 10px 12px; border-radius: 14px; background: var(--tile); color: var(--on-tile); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); pointer-events: none; }
.an-tip > b { font-weight: 600; }
.an-tip__row { display: flex; align-items: center; gap: 8px; color: var(--on-tile-soft); }
.an-tip__row b { margin-left: auto; padding-left: 12px; color: var(--on-tile); font-weight: 600; }
.an-tip .an-sw { width: 12px; border-color: var(--dock-mark); }
.an-tip .an-sw--prev { border-color: var(--on-tile-soft); }
.an-split__share { display: grid; gap: 10px; }
.an-split__pcts { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--fs-sm); }
.an-split__pcts b { margin-right: 4px; font-size: var(--fs-3xl); font-weight: 600; line-height: 1.1; color: var(--text); }
.an-split__track { position: relative; height: 10px; border-radius: 999px; background: var(--well); overflow: hidden; }
.an-split__fill--on { position: absolute; inset: 0; border-radius: 999px; background: var(--green); transform-origin: 0; transition: transform .8s var(--ease); }
.an-split__rows { display: grid; margin: 16px 0; }
.an-split__row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.an-split__row:last-child { border-bottom: 0; }
.an-split__key { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--faint); }
.an-split__key.is-done { background: var(--green); }
.an-split__key.is-run { background: var(--text); }
.an-split__key.is-late { background: var(--down); }
.an-split__key.is-todo { background: var(--line-2); }
.an-split__txt { display: grid; min-width: 0; line-height: 1.35; }
.an-split__txt b { font-weight: 600; }
.an-split__txt small { color: var(--faint); font-size: var(--fs-xs); }
.an-split__fig { margin-left: auto; }
.an-split__fig b { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.015em; }
.an-split__note { margin-top: auto; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.an-products .card__head { flex-wrap: wrap; }
.an-products__hint { flex-basis: 100%; margin-top: -4px; }
.an-products .table-wrap { margin: 0 -20px -20px; box-shadow: none; }
.an-ptable td { padding-top: 8px; padding-bottom: 8px; }
.an-ptable tr[data-panel-tech] { cursor: pointer; transition: background-color .15s; }
.an-ptable tr[data-panel-tech]:hover { background: var(--well); }
.an-ptable tr.is-on { background: var(--green-soft); }
.an-rank { width: 30px; color: var(--faint); font-weight: 600; }
.an-alert { color: var(--down) !important; font-weight: 600; }
.an-prog { min-width: 150px; }
.an-prog__n { display: block; margin-bottom: 4px; font-weight: 600; }
.an-prog__n small { color: var(--faint); font-weight: 500; }
.an-pbar { display: block; width: 100%; height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.an-pbar__fill { display: block; height: 100%; border-radius: inherit; background: var(--green); transform-origin: 0; transition: transform .8s var(--ease); }
.an-pbar--km { margin-top: 4px; }
.an-pbar--km .an-pbar__fill { background: var(--text); }
.an-km { min-width: 110px; font-variant-numeric: tabular-nums; }
.an-week__cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: -4px 0 16px; font-size: var(--fs-sm); }
.an-week__cap b { font-weight: 600; }
.an-week__cap span { color: var(--faint); }
.an-bars { --n: 12; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2px, calc(56px / var(--n)), 12px); flex: 172px; align-items: stretch; min-height: 172px; max-height: 220px; }
.an-bar { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; overflow: hidden; border-radius: 8px 8px 0 0; transition: background-color .2s; }
.an-bar:hover { background: var(--well); }
.an-bar__fill { display: block; width: min(100%, 28px); height: 100%; border-radius: 6px 6px 2px 2px; background: var(--line-2); transform-origin: 50% 100%; transition: background-color .2s; }
.an-bar.is-on .an-bar__fill { background: var(--green); }
.an-bars__x { --n: 12; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2px, calc(56px / var(--n)), 12px); margin-top: 8px; color: var(--faint); font-size: var(--fs-2xs); text-align: center; }
.an-week__sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: auto 0 0; padding-top: 16px; }
.an-week__sum > div { display: grid; gap: 2px; padding: 12px 0 0 12px; border-top: 1px solid var(--line); }
.an-week__sum > div:first-child { padding-left: 0; }
.an-week__sum > div + div { border-left: 1px solid var(--line); }
.an-week__sum dt { overflow: hidden; color: var(--faint); font-size: var(--fs-xs); white-space: nowrap; }
.an-week__sum dd { margin: 0; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.an-mapcard { position: static; }
.an-mapcard__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 18px 20px 12px; }
.an-mapcard .map { flex: none; height: 300px; min-height: 0; }
.an-mapcard__orders { flex: 1; min-height: 0; padding: 8px 12px 12px; overflow: auto; }
.an-side__none { padding: 16px 8px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.cus-orders { margin: 0; padding: 0; list-style: none; }
.cus-ord { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 8px; border-radius: var(--r-sm); transition: background-color .15s; }
.cus-orders li + li .cus-ord { border-top: 1px solid var(--line); border-radius: 0; }
.cus-ord:hover { background: var(--surface-2); }
.cus-ord__when { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.cus-ord__items { overflow: hidden; color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; }
.cus-ord__items b { color: var(--text); font-weight: 600; }
.panel-map-card .map { height: 300px; }

/* 20 · Regras (cartões de automação) ------------------------------------------------------------------ */
.au-lead { max-width: 62ch; }
.au-stats { margin-bottom: 16px; }
.au-section { margin-bottom: 20px; }
.au-section__head { display: grid; gap: 2px; margin-bottom: 12px; }
.au-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.au-grid__empty { grid-column: 1 / -1; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim); }
.au-card { display: flex; flex-direction: column; gap: 14px; margin: 0; transition: box-shadow .25s, transform .25s; }
.au-card:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow-pop); }
.au-card__top { display: flex; align-items: flex-start; gap: 16px; }
.au-card__name { flex: 1; min-width: 0; }
.au-card__name h3 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; }
.au-card__name p { max-width: 44ch; margin-top: 2px; color: var(--faint); font-size: var(--fs-sm); }
.au-card.is-off .au-card__name h3 { color: var(--muted); }
.au-mini { display: flex; align-items: center; padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.au-mini__step { display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--green-soft); color: var(--green-dark); font-size: var(--fs-2xs); font-weight: 700; }
.au-mini__step--who { background: var(--tile); color: var(--on-tile); }
.au-mini__step--off { background: var(--down-soft); color: var(--down); }
.au-card.is-off .au-mini__step:first-child { background: var(--well); color: var(--faint); }
.au-mini__line { flex: 18px; min-width: 6px; max-width: 40px; height: 2px; border-radius: 2px; background: var(--line-2); }
.au-mini--form { gap: 0; }
.au-mini__txt { flex: 1; margin-left: 12px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; }
.au-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.au-card__open { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.au-card__open:hover { color: var(--down); text-decoration-color: currentColor; }
.au-form { display: grid; gap: 14px; }
.au-form[hidden] { display: none; }
.au-form .field select { height: 40px; }

/* 21 · Configurações e Contas ------------------------------------------------------------------------ */
.set-tabs { max-width: 100%; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.set-tabs::-webkit-scrollbar { display: none; }
.set-seg { min-width: max-content; margin: 0; }
.set-seg button { padding: 0 18px; }
.set-panel { display: flex; flex-direction: column; gap: 16px; }
.set-panel[hidden] { display: none; }
.set-sec { display: grid; gap: 16px; margin: 0; padding: 20px 22px; }
.set-sec__h { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; }
.set-sec__head { display: grid; gap: 2px; }
.set-sec__head--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-sec .hint { color: var(--muted); font-size: var(--fs-sm); }
.set-sec .grid-2 { margin-top: 0; gap: 14px 16px; }
.set-sec .form-row { margin: 0; }
.set-sec .map--small { border-radius: var(--r-sm); overflow: hidden; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px 16px; }
.set-grid .full{ grid-column: 1 / -1; }
.set-bar { position: fixed; right: 0; bottom: calc(var(--tabbar-h) + 20px); left: calc(var(--dock-x) + var(--dock-w)); z-index: 1250; display: flex; align-items: center; gap: 10px; width: fit-content; max-width: calc(100% - 40px); margin: 0 auto; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--float); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line); font-size: var(--fs-md); font-weight: 600; }
.set-bar[hidden] { display: none; }
.set-bar__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.set-bar__txt { margin-right: 8px; white-space: nowrap; }
.demo-setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.system-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.system-actions > div { display: grid; align-content: start; gap: 6px; padding: 16px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.system-actions b { font-weight: 600; }
.set-team { gap: 0; margin: 0; }
.set-team .account-row { gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.set-team .account-row:first-child { padding-top: 0; }
.set-team .account-row:last-child { padding-bottom: 0; border-bottom: 0; }
.set-team .account-row.is-off { opacity: 1; }
.set-team .account-row.is-off .av { opacity: .5; }
.account-row__who strong { font-weight: 600; }
.account-row__who small { color: var(--faint); font-size: var(--fs-sm); }
.set-you { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: var(--green-soft); color: var(--green-dark); font-size: var(--fs-2xs); font-weight: 600; vertical-align: middle; }
.set-team .row-actions { display: flex; gap: 4px; margin: 0; }
.set-team .row-actions .btn { height: 30px; padding: 0 10px; font-size: var(--fs-xs); }
.token-list { gap: 0; margin: 0; }
.token-row { grid-template-columns: minmax(200px, 1.2fr) 110px minmax(220px, 1fr) auto auto; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.token-row:last-child { border-bottom: 0; }
.token-row__who strong { font-weight: 600; }
.token-row input { height: 36px; border: 0; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.token-status { font-size: var(--fs-xs); }
#account-new-dialog .form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* 22 · Encurtar link -------------------------------------------------------------------------------- */
.lnk-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.lnk-top { font-size: var(--fs-2xl); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnk-form { align-items: center; margin-bottom: 16px; }
.lnk-input { flex: 1 1 420px; }
.lnk-input .input { height: 44px; }
.lnk-result { height: 32px; font-size: var(--fs-sm); }
.lnk-result[hidden] { display: none; }
.lnk-short { font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.lnk-short:hover { color: var(--green-dark); text-decoration-color: currentColor; }
.lnk-target { max-width: 420px; color: var(--muted); font-size: var(--fs-sm); }
.lnk-target span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lnk-clicks { width: 180px; }
.lnk-clicks b { display: block; margin-bottom: 4px; font-weight: 600; }

/* 23 · Ajuda (central) --------------------------------------------------------------------------- */
.hlp mark { padding: 0 1px; border-radius: 3px; background: var(--warn-soft); color: inherit; }
.hlp-hero { display: grid; justify-items: start; gap: 14px; margin-bottom: 16px; }
.hlp-hero__txt { display: grid; gap: 6px; }
.hlp-hero h2 { font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.hlp-hero p { max-width: 60ch; color: var(--muted); font-size: var(--fs-lg); }
.hlp-search { position: relative; display: flex; align-items: center; width: min(640px, 100%); }
.hlp-search > .i { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--faint); pointer-events: none; }
.hlp-search__input { width: 100%; height: 52px; padding: 0 16px 0 48px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); color: var(--text); font: 500 var(--fs-lg) var(--font); }
.hlp-search__input::placeholder { color: var(--faint); }
.hlp-search__input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--green), var(--shadow); }
.hlp-count { min-height: 20px; color: var(--faint); font-size: var(--fs-sm); }
.hlp-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.hlp-topic { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; border: 0; border-radius: var(--r); background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow); color: var(--text); text-align: left; cursor: pointer; transition: background-color .2s, box-shadow .2s, transform .2s; }
.hlp-topic:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow-pop); }
.hlp-topic[aria-pressed="true"] { background: var(--green-soft); box-shadow: inset 0 0 0 1.5px var(--green); }
.hlp-topic__ico { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--well); color: var(--green-dark); transition: background-color .2s, color .2s; }
.hlp-topic[aria-pressed="true"] .hlp-topic__ico { background: var(--green); color: var(--on-green); }
.hlp-topic__txt { display: grid; gap: 2px; min-width: 0; }
.hlp-topic__txt b { font-size: var(--fs-base); font-weight: 600; }
.hlp-topic__txt small { color: var(--faint); font-size: var(--fs-sm); }
.hlp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 16px; }
.hlp-main, .hlp-side { display: grid; gap: 16px; min-width: 0; }
.hlp-main > .card, .hlp-side > .card { margin: 0; }
.hlp-main > .card[hidden] { display: none; }
@media (min-width: 1041px) { .hlp-side { position: sticky; top: 16px; } }
.hlp-steps { display: grid; margin: 0; padding: 0; list-style: none; }
.hlp-steps li { position: relative; display: flex; gap: 16px; padding-bottom: 20px; }
.hlp-steps li:last-child { padding-bottom: 4px; }
.hlp-steps li:not(:last-child)::before { content: ""; position: absolute; top: 34px; bottom: 6px; left: 14px; width: 1px; background: var(--line-2); }
.hlp-steps__n { display: grid; flex: none; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-size: var(--fs-sm); font-weight: 600; line-height: 1; }
.hlp-steps p { margin: 0; padding-top: 4px; font-size: var(--fs-base); line-height: 1.6; }
.hlp-list { display: grid; gap: 12px; padding-left: 18px; font-size: var(--fs-base); line-height: 1.55; }
.hlp-list.legend-list { padding-left: 0; list-style: none; }
.hlp-list.legend-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hlp-faq__list { display: grid; margin: -4px 0 -12px; }
.hlp-qa { border-top: 1px solid var(--line); }
.hlp-qa:first-child { border-top: 0; }
.hlp-qa[hidden] { display: none; }
.hlp-qa h3 { margin: 0; font: inherit; }
.hlp-q { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 0; color: var(--text); font-size: var(--fs-base); font-weight: 500; text-align: left; transition: color .2s; }
.hlp-q span { flex: 1; }
.hlp-q:hover, .hlp-qa.is-open .hlp-q { color: var(--green-dark); }
.hlp-q__chev { width: 18px; height: 18px; color: var(--faint); transition: transform .3s var(--ease); }
.hlp-qa.is-open .hlp-q__chev { transform: rotate(180deg); }
.hlp-a[hidden] { display: none; }
.hlp-a__in { max-width: 70ch; padding: 0 32px 16px 0; color: var(--muted); font-size: var(--fs-base); line-height: 1.6; }
.hlp-none { display: grid; justify-items: center; gap: 6px; padding: 24px 12px; color: var(--faint); font-size: var(--fs-sm); text-align: center; }
.hlp-none b { color: var(--text); }
.hlp-none[hidden] { display: none; }
.hlp-contact { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; }
.hlp-contact p { grid-column: 1 / -1; }
.hlp-contact__ico { display: grid; place-items: center; width: 36px; height: 36px; margin: 0; border-radius: var(--r-sm); background: var(--well); color: var(--green-dark); }
.hlp-contact h2 { font-size: var(--fs-lg); font-weight: 600; }
.hlp-contact p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.hlp-svcs { display: grid; gap: 12px; }
.hlp-svc { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.hlp-svc b { font-weight: 600; }
.hlp-svc__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--up); }
.hlp-svc__dot.is-off { background: var(--down); }
.hlp-svc__dot.is-warn { background: var(--warn); }
.hlp-svc small { margin-left: auto; color: var(--faint); font-size: var(--fs-xs); text-align: right; }
.hlp-status__ok { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--up-soft); color: var(--up); font-size: var(--fs-sm); font-weight: 600; }
.hlp-status__ok.is-off { background: var(--down-soft); color: var(--down); }

/* 24 · Quadro de OS: cabeçalho de quadro ---------------------------------------------------------- */
.board__head { flex-wrap: wrap; gap: 14px 24px; }
.ws-head__about { display: flex; flex: 1 1 420px; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0; }
.ws-head__meta { flex-basis: 100%; }
.ws-head__tools { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-left: auto; }
.ws-head__people { display: flex; align-items: center; gap: 10px; }
.ws-head__label { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.ws-people { display: flex; }
.ws-person { position: relative; margin-left: -6px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: 0 0 0 2px var(--bg); cursor: pointer; transition: transform .2s; }
.ws-person:first-child { margin-left: 0; }
.ws-person:hover { z-index: 2; transform: translateY(-2px); }
.ws-person .av { width: 30px; height: 30px; font-size: var(--fs-2xs); background: var(--dot, var(--well)); color: #fff; }
.ws-person--more .av { background: var(--well); color: var(--muted); }
.ws-head__prog { display: flex; align-items: center; gap: 12px; padding-left: 20px; border-left: 1px solid var(--line-2); }
.ws-ring { position: relative; flex: none; width: 44px; height: 44px; }
.ws-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ws-ring circle { fill: none; stroke-width: 6; }
.ws-ring__track { stroke: var(--well); }
.ws-ring__arc { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset .9s var(--ease); }
.ws-ring__pct { position: absolute; inset: 0; display: grid; grid-auto-flow: column; place-content: center; align-items: baseline; font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.02em; }
.ws-ring__pct small { margin-left: 1px; color: var(--faint); font-size: var(--fs-2xs); font-weight: 600; }
.ws-head__done { display: grid; line-height: 1.25; }
.ws-head__done b { font-size: var(--fs-lg); font-weight: 600; white-space: nowrap; }
.ws-head__done span { color: var(--faint); font-size: var(--fs-sm); white-space: nowrap; }
.board-col.is-flash { box-shadow: inset 0 0 0 2px var(--green); }

/* 25 · Telas menores para tudo acima --------------------------------------------------------------- */
@media (max-width: 1280px) {
  .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .an-kpis > :first-child { grid-column: span 3; }
  .hlp-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .an-main, .an-split, .an-products, .an-week, .an-mapcard { grid-column: span 12; grid-row: auto; }
  .an-mapcard { min-height: 0; }
  .hlp-grid { grid-template-columns: minmax(0, 1fr); }
  .set-bar { left: 12px; }
  .cus-table th:nth-child(3), .cus-table td:nth-child(3) { display: none; }
}
@media (max-width: 760px) {
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-kpis > :first-child { grid-column: span 2; }
  .an-spark { width: 72px; }
  .an-chart { min-height: 230px; }
  .an-week__sum dd { font-size: var(--fs-lg); }
  .cus-table th:nth-child(2), .cus-table td:nth-child(2), .cus-table th:nth-child(4), .cus-table td:nth-child(4), .cus-table th:nth-child(5), .cus-table td:nth-child(5) { display: none; }
  .an-ptable th:nth-child(1), .an-ptable td:nth-child(1), .an-ptable th:nth-child(5), .an-ptable td:nth-child(5) { display: none; }
  .lnk-stats { grid-template-columns: minmax(0, 1fr); }
  .lnk-table th:nth-child(2), .lnk-table td:nth-child(2) { display: none; }
  .hlp-hero h2 { font-size: 26px; }
  .hlp-topics { gap: 8px; }
  .hlp-topic { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .set-grid, .system-actions { grid-template-columns: minmax(0, 1fr); }
  .set-bar { right: 12px; left: 12px; width: auto; max-width: none; }
  .set-bar__txt { flex: 1; white-space: normal; line-height: 1.3; }
  .token-row { grid-template-columns: 1fr 1fr; }
  .token-row__who { grid-column: 1 / -1; }
  .ws-head__prog { padding-left: 0; border-left: 0; }
  .ws-head__tools { margin-left: 0; }
  .sheet-sec .form-line { grid-template-columns: minmax(0, 1fr); }
  .cus-search { width: 100%; }
}
