/* Roboto (TOTVS PO UI) — 400 normal, 500 médio, 700 negrito (600 usa o 700). Licença em fonts/LICENSE-Roboto.txt */
@font-face { font-family: "Roboto"; src: url("fonts/roboto-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/roboto-latin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/roboto-latin-700.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

/* TOPSYS ERP — mesmo design system do site institucional */
:root {
  --red-600: #e41017; --red-700: #c10d13; --red-50: #fdecec;
  --navy-900: #0a1f4f; --navy-800: #0c3376; --navy-700: #113078; --navy-600: #1a3f94; --navy-50: #eef2fa;
  --sky-400: #3aa8e8; --green-600: #16a34a; --green-50: #ecfdf3; --amber-600: #b45309; --amber-50: #fff7e6;
  --ink-900: #0f172a; --ink-700: #334155; --ink-500: #64748b; --ink-300: #cbd5e1;
  --line: #e2e8f0; --surface: #fff; --surface-2: #f6f8fc;
  /* Roboto, a mesma fonte do padrão visual da TOTVS (PO UI) — decisão do usuário, 2026-10-20.
     Arquivos guardados no próprio sistema (static/erp/fonts), sem depender do Google Fonts */
  --font-system: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-system); --font-body: var(--font-system);
  --radius: 14px; --radius-lg: 24px;
  --shadow: 0 10px 30px -10px rgba(12, 51, 118, .25);
  --shadow-lg: 0 30px 60px -20px rgba(12, 51, 118, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 16px/1.6 var(--font-body); color: var(--ink-700); background: var(--surface-2); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink-900); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .4em; }
.icon { width: 1.2em; height: 1.2em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--sky-400); outline-offset: 2px; border-radius: 6px; }

/* ---------- Botões ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; border: 2px solid transparent; border-radius: 12px; cursor: pointer;
  font: 600 16px/1 var(--font-head); transition: background .2s, transform .15s, box-shadow .2s;
}
.btn--primary { background: var(--red-600); color: #fff; }
.btn--primary:hover { background: var(--red-700); box-shadow: 0 12px 24px -10px rgba(228,16,23,.6); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost { background: #fff; color: var(--navy-700); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy-700); }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn__icon { transition: transform .2s; }
.btn--primary:hover .btn__icon { transform: translateX(3px); }
.spinner { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.is-loading { pointer-events: none; opacity: .9; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn__icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--font-head); color: var(--navy-600); }
.link:hover { color: var(--red-600); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Layout de autenticação ---------- */
.auth { background: #fff; }
.auth__layout { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth__aside {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px clamp(32px, 5vw, 64px); color: #fff;
  background:
    linear-gradient(160deg, rgba(10,31,79,.94) 0%, rgba(12,51,118,.86) 55%, rgba(10,31,79,.7) 100%),
    var(--photo) center / cover no-repeat, var(--navy-900);
}
.auth__brand img { height: 56px; width: auto; }
.auth__pitch { position: relative; z-index: 1; max-width: min(420px, 68%); margin-bottom: 40px; }
.auth__tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); font: 500 13px var(--font-head); margin-bottom: 20px; }
.auth__pitch h2 { color: #fff; font-size: clamp(28px, 3vw, 40px); font-weight: 800; }
.auth__pitch p { color: #cfd9ee; font-size: 17px; margin: 0; }
.auth__stripes { position: absolute; right: -60px; top: -10%; bottom: -10%; width: 260px; pointer-events: none; }
.auth__stripes span { position: absolute; top: 0; bottom: 0; transform: skewX(-20deg); }
.auth__stripes span:nth-child(1) { left: 0; width: 90px; background: rgba(228,16,23,.85); }
.auth__stripes span:nth-child(2) { left: 110px; width: 22px; background: rgba(58,168,232,.8); }
.auth__stripes span:nth-child(3) { left: 150px; width: 8px; background: rgba(255,255,255,.5); }

.auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 24px; }
.auth__mobile-brand { display: none; }
.auth__card { width: 100%; max-width: 420px; margin: auto 0; animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.auth__card h1 { font-size: clamp(26px, 3vw, 32px); font-weight: 700; }
.auth__sub { color: var(--ink-500); margin: 0 0 28px; }
.auth__secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 0; font-size: 13px; color: var(--ink-500); }
.auth__secure .icon { color: var(--green-600); }
.auth__alt { text-align: center; margin-top: 18px; }
.auth__foot { width: 100%; max-width: 420px; display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; font-size: 13.5px; color: var(--ink-500); }
.auth__foot a { display: inline-flex; align-items: center; gap: 6px; }
.auth__foot a:hover { color: var(--navy-700); }
.step-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--red-50); color: var(--red-700); font: 600 13px var(--font-head); margin-bottom: 14px; }

/* ---------- Campos ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font: 500 14.5px var(--font-head); color: var(--ink-900); margin-bottom: 8px; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field__row label { margin-bottom: 8px; }
.input { position: relative; display: flex; align-items: center; }
.input__icon { position: absolute; left: 16px; color: var(--ink-500); pointer-events: none; transition: color .2s; }
.input input {
  width: 100%; height: 54px; padding: 0 52px 0 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2);
  font: 400 16px var(--font-body); color: var(--ink-900); transition: border-color .2s, box-shadow .2s, background .2s;
}
.input input::placeholder { color: #94a3b8; }
.input input:hover { border-color: var(--ink-300); }
.input input:focus { outline: none; border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 4px rgba(26,63,148,.12); }
.input:focus-within .input__icon { color: var(--navy-600); }
.input__toggle { position: absolute; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-500); cursor: pointer; display: grid; place-items: center; }
.input__toggle:hover { background: var(--navy-50); color: var(--navy-700); }
.field.has-error input { border-color: var(--red-600); background: #fff; }
.hint { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13.5px; color: var(--ink-500); }
.hint .icon { width: 16px; height: 16px; }
.hint--error { color: var(--red-600); }
.hint--warn { color: var(--amber-600); }
.hint--ok { color: var(--green-600); }

.check { display: flex; align-items: center; gap: 10px; margin: 4px 0 24px; font-size: 15px; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; }
.check__box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--ink-300); display: grid; place-items: center; background: #fff; transition: all .2s; }
.check__box .icon { width: 14px; height: 14px; stroke-width: 3; color: #fff; opacity: 0; }
.check input:checked + .check__box { background: var(--navy-700); border-color: var(--navy-700); }
.check input:checked + .check__box .icon { opacity: 1; }
.check input:focus-visible + .check__box { outline: 3px solid var(--sky-400); outline-offset: 2px; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 22px; font-size: 14.5px; animation: shake .4s; }
.alert .icon { margin-top: 2px; }
.alert--error { background: var(--red-50); color: var(--red-700); border: 1px solid #f9c9cb; }
.alert--success { background: var(--green-50); color: var(--green-600); border: 1px solid #bbf0cf; animation: none; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.forgot { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--navy-50); color: var(--navy-800); font-size: 14px; margin: -4px 0 18px; }
.forgot p { margin: 0; }
.forgot .icon { margin-top: 2px; }

/* força da senha */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.strength span { height: 5px; border-radius: 5px; background: var(--line); transition: background .3s; }
.strength[data-level="1"] span:nth-child(-n+1) { background: var(--red-600); }
.strength[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength[data-level="3"] span:nth-child(-n+3) { background: #84cc16; }
.strength[data-level="4"] span { background: var(--green-600); }
.strength__label { margin: 6px 0 0; font: 500 13px var(--font-head); color: var(--ink-500); }
.rules { list-style: none; padding: 14px 16px; margin: 0 0 18px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 6px; font-size: 14px; }
.rules li { display: flex; align-items: center; gap: 8px; color: var(--ink-500); transition: color .2s; }
.rules li .icon { width: 16px; height: 16px; }
.rules li.is-ok { color: var(--green-600); }
.rules .opt { color: var(--ink-300); }

/* ---------- App: estrutura (topbar + sidebar + conteúdo) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app { background: #eef1f7; }
.shell { --top-h: 60px; --side-w: 84px; min-height: 100vh; }
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 8px;
  padding: 0 16px 0 0; background: var(--navy-900); color: #cfd9ee;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; width: var(--side-w); justify-content: center; flex-shrink: 0; }
.topbar__brand img { height: 30px; width: auto; }
.topbar__brand span { display: none; }
.topbar__btn {
  position: relative; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #cfd9ee;
  display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s;
}
.topbar__btn:hover, .topbar__btn[aria-expanded="true"] { background: rgba(255,255,255,.1); color: #fff; }
.topbar__btn .icon { width: 20px; height: 20px; }
.topbar__menu { display: none; }
.topbar__quick, .topbar__user { position: relative; }
.topbar__search {
  display: flex; align-items: center; gap: 10px; height: 40px; width: min(420px, 36vw); padding: 0 12px; margin-left: 4px;
  border-radius: 10px; background: rgba(255,255,255,.08); color: #9fb1d6; transition: background .15s, box-shadow .15s;
}
.topbar__search:focus-within { background: #fff; color: var(--ink-500); box-shadow: 0 0 0 3px rgba(58,168,232,.4); }
.topbar__search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 14.5px var(--font-body); color: inherit; outline: none; }
.topbar__search:focus-within input { color: var(--ink-900); }
.topbar__search input::placeholder { color: inherit; }
.topbar__search kbd { font: 500 11px var(--font-body); padding: 3px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); color: #9fb1d6; }
.topbar__search:focus-within kbd { border-color: var(--line); color: var(--ink-500); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar__date { display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 0 14px; margin-right: 6px; border-right: 1px solid rgba(255,255,255,.15); }
.topbar__date small { font: 500 11px var(--font-head); text-transform: capitalize; color: #9fb1d6; }
.topbar__date strong { font: 700 22px var(--font-head); color: #fff; margin-top: 3px; }
.avatar-btn { border: 0; background: none; padding: 2px; margin-left: 6px; border-radius: 50%; cursor: pointer; }
.avatar-btn:hover .avatar, .avatar-btn[aria-expanded="true"] .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--red-600); color: #fff; font: 700 15px var(--font-head); transition: box-shadow .15s; }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 220px; padding: 6px; border-radius: 12px;
  background: #fff; color: var(--ink-700); box-shadow: 0 16px 40px -12px rgba(10,31,79,.35); border: 1px solid var(--line);
  animation: drop .15s var(--ease);
}
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.dropdown--right { left: auto; right: 0; }
.dropdown__title { display: block; padding: 8px 10px 6px; font: 600 11px var(--font-head); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }
.dropdown__user { padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.dropdown__user strong { display: block; font: 600 14.5px var(--font-head); color: var(--ink-900); }
.dropdown__user small { color: var(--ink-500); font-size: 12.5px; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none;
  font: 500 14px var(--font-body); color: var(--ink-700); cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--navy-50); color: var(--navy-700); }
.dropdown .icon { width: 18px; height: 18px; color: var(--ink-500); }
.dropdown form { margin: 0; }

.sidebar {
  position: fixed; top: var(--top-h); bottom: 0; left: 0; z-index: 25; width: var(--side-w); display: flex; flex-direction: column; gap: 2px;
  padding: 10px 8px; background: var(--navy-900); overflow-y: auto;
}
.sidebar__item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 12px;
  font: 500 11.5px var(--font-head); color: #9fb1d6; text-align: center; transition: background .15s, color .15s;
}
.sidebar__item .icon { width: 22px; height: 22px; }
.sidebar__item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar__item.is-active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar__item.is-active::before { content: ""; position: absolute; left: -8px; top: 50%; width: 3px; height: 28px; margin-top: -14px; border-radius: 0 3px 3px 0; background: var(--red-600); }
.sidebar__spacer { flex: 1; }
.sidebar__backdrop { position: fixed; inset: 0; z-index: 24; background: rgba(10,31,79,.45); }

.main { margin-left: var(--side-w); padding: calc(var(--top-h) + 24px) clamp(16px, 2.5vw, 32px) 40px; max-width: calc(1440px + var(--side-w)); }

/* ---------- Cabeçalho da página ---------- */
.page-head { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 0; }
.tabs { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.tabs__item { position: relative; padding: 10px 14px; border: 0; background: none; font: 500 14.5px var(--font-head); color: var(--ink-500); cursor: pointer; }
.tabs__item:hover { color: var(--navy-700); }
.tabs__item.is-active { color: var(--navy-700); }
.tabs__item.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--navy-700); }
.tabs__add { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--navy-600); cursor: pointer; display: grid; place-items: center; }
.tabs__add:hover { background: var(--navy-50); }
.page-head__actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--ink-500); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: #fff; color: var(--ink-900); }
.btn--primary.btn--sm { background: var(--navy-600); }
.btn--primary.btn--sm:hover { background: var(--navy-700); box-shadow: 0 10px 20px -10px rgba(26,63,148,.6); }
.demo-note { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 10px 14px; border-radius: 10px; background: var(--amber-50); color: var(--amber-600); font-size: 13.5px; }

/* ---------- Widgets ---------- */
.widgets {
  display: grid; gap: 20px; grid-template-columns: repeat(12, 1fr);
  grid-template-areas:
    "hero hero hero kpi kpi kpi stock stock stock stock stock stock"
    "donut donut donut donut donut donut stock stock stock stock stock stock"
    "donut donut donut donut donut donut tasks tasks tasks tasks tasks tasks"
    "funnel funnel funnel funnel funnel funnel tasks tasks tasks tasks tasks tasks";
  align-items: start;
}
/* perfil que não vê todos os widgets: grade simples, sem espaços vazios */
.widgets.widgets--livre { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); grid-template-areas: none; }
.widgets.widgets--livre > .widget { grid-area: auto !important; }
.widget { position: relative; padding: 20px 22px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.05); border: 1px solid #e6eaf2; min-width: 0; }
.widget--hero { grid-area: hero; color: #fff; border: 0; background: linear-gradient(120deg, var(--navy-800) 0%, var(--navy-600) 55%, var(--sky-400) 130%); min-height: 150px; overflow: hidden; }
.widget--hero::after { content: ""; position: absolute; right: -30px; top: -20px; bottom: -20px; width: 70px; transform: skewX(-20deg); background: rgba(228,16,23,.55); }
.widget--kpi { grid-area: kpi; min-height: 150px; }
.widget--tasks { grid-area: tasks; }
.widget--donut { grid-area: donut; }
.widget--funnel { grid-area: funnel; }
.widget--stock { grid-area: stock; align-self: stretch; }
.widget__label { margin: 0 0 6px; font: 500 14px var(--font-head); opacity: .9; }
.kpi { margin: 0; font: 700 40px/1.1 var(--font-head); letter-spacing: -.02em; }
.kpi--dark { color: var(--ink-900); }
.widget__foot { margin: 14px 0 0; font-size: 13px; opacity: .85; position: relative; z-index: 1; }
.widget__foot--muted { color: var(--ink-500); opacity: 1; }
.widget__grip {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 28px; height: 28px; border: 0; border-radius: 8px; cursor: grab;
  display: grid; place-items: center; background: var(--surface-2); color: var(--ink-300);
}
.widget--hero .widget__grip { background: rgba(255,255,255,.15); color: rgba(255,255,255,.8); }
.widget__grip:hover { color: var(--ink-500); }
.widget__grip .icon { width: 16px; height: 16px; }
.widget__grip--inline { position: static; margin-left: 8px; }
.widget__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.widget__head h2 { display: flex; align-items: center; gap: 6px; font-size: 17px; margin: 0 auto 0 0; }
.icon--muted { width: 16px; height: 16px; color: var(--ink-300); }
.widget__sub { margin: -10px 0 16px; font-size: 13px; color: var(--ink-500); }

.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.seg__btn { min-width: 34px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; font: 500 13px var(--font-head); color: var(--ink-500); cursor: pointer; display: grid; place-items: center; }
.seg__btn .icon { width: 16px; height: 16px; }
.seg__btn.is-active { background: var(--navy-600); color: #fff; }

/* tarefas */
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li + li { border-top: 1px solid var(--line); }
.tasks label { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; cursor: pointer; border-radius: 8px; }
.tasks label:hover { background: var(--surface-2); }
.tasks input { position: absolute; opacity: 0; }
.tasks__box { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px; border: 2px solid var(--navy-600); transition: background .15s; }
.tasks__box--warn { border-color: #eda100; }
.tasks input:checked + .tasks__box { background: var(--navy-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--navy-600); }
.tasks input:checked ~ span strong { text-decoration: line-through; color: var(--ink-500); }
.tasks input:focus-visible + .tasks__box { outline: 3px solid var(--sky-400); outline-offset: 2px; }
.tasks strong { display: block; font: 500 14.5px var(--font-body); color: var(--ink-900); }
.tasks small { font-size: 12.5px; color: var(--ink-500); }

/* rosca — paleta categórica validada (4 cores, ordem fixa) */
.donut { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut__chart { position: relative; width: 200px; aspect-ratio: 1; flex-shrink: 0; }
.donut__chart svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.donut__chart circle { fill: none; stroke-width: 16; cursor: pointer; transition: stroke-width .15s, opacity .15s; }
.donut__chart circle.is-dim { opacity: .35; }
.donut__chart circle.is-hover { stroke-width: 20; }
.donut__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut__center strong { font: 700 20px var(--font-head); color: var(--ink-900); }
.donut__center small { font-size: 12.5px; color: var(--ink-500); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; flex: 1; min-width: 180px; }
.legend li { display: grid; grid-template-columns: 12px 1fr; column-gap: 10px; align-items: center; border-radius: 8px; padding: 2px 4px; }
.legend li:hover { background: var(--surface-2); }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.legend span { font: 500 14px var(--font-body); color: var(--ink-900); }
.legend small { grid-column: 2; font-size: 12.5px; color: var(--ink-500); font-variant-numeric: tabular-nums; }

/* funil: uma só cor (azul da marca), do mais escuro ao mais claro */
.funnel { position: relative; display: grid; gap: 4px; justify-items: center; }
.funnel__bar {
  height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font: 500 13.5px var(--font-head);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 14px 100%); transition: filter .15s;
}
.funnel__bar:hover { filter: brightness(1.12); }
.funnel__bar strong { font-weight: 700; }

.tooltip { position: absolute; z-index: 5; pointer-events: none; padding: 8px 10px; border-radius: 8px; background: var(--ink-900); color: #fff; font-size: 12.5px; line-height: 1.4; white-space: nowrap; box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 10px)); }
.tooltip strong { display: block; font: 600 13px var(--font-head); }

/* frota — cores de status sempre com ícone + texto */
.fleet { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fleet li { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.fleet strong { font: 700 20px var(--font-head); color: var(--ink-900); }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--font-body); color: var(--ink-900); }
.status .icon { width: 26px; height: 26px; padding: 5px; border-radius: 8px; }
.status--ok .icon { background: var(--green-50); color: var(--green-600); }
.status--busy .icon { background: var(--navy-50); color: var(--navy-600); }
.status--warn .icon { background: var(--amber-50); color: var(--amber-600); }

/* módulo em construção */
.empty { max-width: 520px; margin: 60px auto; padding: 40px; text-align: center; background: #fff; border-radius: 16px; border: 1px solid #e6eaf2; }
.empty__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); }
.empty__icon .icon { width: 30px; height: 30px; }
.empty p { color: var(--ink-500); margin: 0 0 24px; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .auth__layout { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .auth__main { justify-content: flex-start; padding-top: 32px; background: linear-gradient(180deg, var(--navy-50), #fff 240px); }
  .auth__mobile-brand { display: block; margin-bottom: 32px; }
  .auth__mobile-brand img { height: 48px; width: auto; }
}
@media (max-width: 1200px) {
  .widgets { grid-template-columns: repeat(2, 1fr); grid-template-areas: "hero kpi" "stock stock" "tasks tasks" "donut donut" "funnel funnel"; }
  .topbar__search kbd { display: none; }
}
@media (max-width: 760px) {
  .shell { --side-w: 0px; }
  .topbar { padding-left: 4px; }
  .topbar__menu { display: grid; }
  .topbar__brand { width: auto; }
  .topbar__search { width: auto; flex: 1; }
  .topbar__date, .topbar__right > .topbar__btn { display: none; }
  .sidebar { width: 96px; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .sidebar.is-open { transform: none; }
  .widgets { grid-template-columns: 1fr; grid-template-areas: "hero" "kpi" "stock" "tasks" "donut" "funnel"; }
  .tabs { margin: 0; order: 3; width: 100%; }
  .page-head__actions { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Estoque
   ===================================================================== */
.muted { color: var(--ink-500); }
.opt { color: var(--ink-500); font-weight: 400; }
kbd { font: 500 12px var(--font-body); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); background: #fff; }
.back { display: inline-flex; align-items: center; gap: 6px; font: 500 13.5px var(--font-head); color: var(--ink-500); margin-bottom: 6px; }
.back:hover { color: var(--navy-700); }
.page-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 0; font-size: 14px; }

/* status no menu e no sino */
.sidebar__badge, .notif-badge {
  position: absolute; top: 4px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red-600); color: #fff; font: 700 10.5px/18px var(--font-head); text-align: center;
}
.notif-badge { top: 2px; right: 2px; box-shadow: 0 0 0 2px var(--navy-900); }
.topbar__notif { position: relative; }
.dropdown--wide { min-width: 300px; }
.dropdown a .dot { flex-shrink: 0; }
.dropdown a > span:last-child { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.dropdown a strong { font: 500 14px var(--font-body); color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown a small { font-size: 12.5px; color: var(--ink-500); }
.dropdown__all { justify-content: center; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px !important; color: var(--navy-600) !important; font-weight: 600 !important; }
.dropdown .dropdown__item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; font-size: 14px; }
.dropdown__item small { display: block; color: var(--ink-500); font-size: 12.5px; }
.notif-badge--nc { background: var(--red-600); }
.nc-popup { width: min(520px, calc(100% - 32px)); }
.nc-popup__titulo { display: flex; align-items: center; gap: 8px; font-size: 18px; color: var(--red-700); }
.nc-popup__vtr { padding: 10px 0; border-top: 1px solid var(--line); }
.nc-popup__head { margin: 0 0 6px; }
.nc-popup ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.nc-popup li { display: flex; align-items: center; gap: 8px; }
.dropdown__empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 10px; font-size: 14px; color: var(--green-600); }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot--danger { background: var(--red-600); }
.dot--warn { background: #eda100; }
.dot--info { background: var(--navy-600); }
.dot--ok { background: var(--green-600); }
.vtr-lib { display: inline-flex; align-items: center; gap: 6px; }
.vtr-lib__dot { cursor: help; }

/* badges de situação — sempre ícone + texto */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-700); font: 600 12px var(--font-head); white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; stroke-width: 2.5; }
.badge--ok { background: var(--green-50); color: var(--green-600); }
.badge--warn { background: var(--amber-50); color: var(--amber-600); }
.badge--danger { background: var(--red-50); color: var(--red-700); }
.badge--info { background: var(--navy-50); color: var(--navy-600); }

/* barra de nível de estoque */
.bar { display: block; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 6px; min-width: 60px; }
.bar > span { display: block; height: 100%; border-radius: 6px; background: var(--green-600); }
.bar--baixo > span { background: #eda100; }
.bar--zerado > span { background: var(--red-600); }

/* indicadores */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid #e6eaf2; transition: border-color .15s, box-shadow .15s; }
a.kpi-card:hover { border-color: var(--navy-600); box-shadow: var(--shadow); }
.kpi-card.is-active { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(26,63,148,.12); }
.kpi-card__icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); }
.kpi-card__icon .icon { width: 22px; height: 22px; }
.kpi-card--warn .kpi-card__icon { background: var(--amber-50); color: var(--amber-600); }
.kpi-card--danger .kpi-card__icon { background: var(--red-50); color: var(--red-600); }
.kpi-card > span:last-child { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.kpi-card small { font-size: 13px; color: var(--ink-500); }
.kpi-card strong { font: 700 24px/1.2 var(--font-head); color: var(--ink-900); }
.kpi-card strong em { font-style: normal; font-size: 15px; font-weight: 500; color: var(--ink-500); }
.kpi-card--tall { align-items: flex-start; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14.5px; }
.banner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.banner--danger { background: var(--red-50); color: var(--red-700); border: 1px solid #f9c9cb; }

/* painel / tabela */
.panel { background: #fff; border: 1px solid #e6eaf2; border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; min-width: 0; }
.panel--narrow { max-width: 760px; }
.panel__title { font-size: 17px; margin: 0 0 14px; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink-500); }
.search:focus-within { border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 4px rgba(26,63,148,.12); }
.search input { flex: 1; border: 0; background: none; outline: none; font: 400 15px var(--font-body); color: var(--ink-900); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font: 500 13.5px var(--font-head); color: var(--ink-700); background: #fff; }
.chip:hover { border-color: var(--navy-600); color: var(--navy-700); }
.chip.is-active { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; padding: 10px 12px; font: 600 12px var(--font-head); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--click tbody tr { cursor: pointer; transition: background .12s; }
.table--click tbody tr:hover { background: var(--surface-2); }
.cell-title { display: block; font-weight: 600; color: var(--ink-900); }
.cell-title:hover { color: var(--navy-600); }
.cell-sub { display: block; font-size: 12.5px; color: var(--ink-500); }
.level strong { font: 600 15px var(--font-head); color: var(--ink-900); }
.date-alert { display: inline-flex; align-items: center; gap: 5px; color: var(--amber-600); font-weight: 600; }
.date-alert .icon { width: 15px; height: 15px; }
.date-alert--danger { color: var(--red-700); }
.delta { font-weight: 600; font-size: 13px; }
.delta--up { color: var(--red-700); }
.delta--down { color: var(--green-600); }
.empty--inline { margin: 20px auto; border: 0; }
.start-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; text-align: left; }
.start-options a { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 12px; border: 1.5px solid var(--line); transition: border-color .15s, transform .15s; }
.start-options a:hover { border-color: var(--navy-600); transform: translateY(-2px); }
.start-options .icon { width: 26px; height: 26px; color: var(--navy-600); margin-bottom: 6px; }
.start-options strong { font: 600 15px var(--font-head); color: var(--ink-900); }
.start-options small { font-size: 13px; color: var(--ink-500); }

/* abas de modo (entrada) */
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; max-width: 900px; }
.mode-tab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1.5px solid #e6eaf2; transition: border-color .15s, box-shadow .15s; }
.mode-tab:hover { border-color: var(--navy-600); }
.mode-tab.is-active { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(26,63,148,.12); }
.mode-tab .icon { width: 26px; height: 26px; color: var(--ink-500); flex-shrink: 0; }
.mode-tab.is-active .icon { color: var(--navy-600); }
.mode-tab strong { display: block; font: 600 15px var(--font-head); color: var(--ink-900); }
.mode-tab small { font-size: 12.5px; color: var(--ink-500); }

/* formulário de entrada */
.entry { max-width: 900px; }
.step { border: 1px solid #e6eaf2; }
fieldset.step { min-width: 0; }
fieldset.step[disabled] { opacity: .55; }
fieldset.step[disabled] .step__head h2::after { content: " — escolha o produto primeiro"; font: 400 14px var(--font-body); color: var(--ink-500); }
.step__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step__head h2 { font-size: 17px; margin: 0; }
.step__num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-600); color: #fff; font: 700 14px var(--font-head); }
.grid { display: grid; gap: 14px 16px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.field--span2 { grid-column: span 2; }
.grid .field { margin-bottom: 0; }
.input-plain {
  width: 100%; height: 46px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface-2);
  font: 400 15px var(--font-body); color: var(--ink-900); transition: border-color .15s, box-shadow .15s, background .15s;
}
select.input-plain { appearance: auto; }
.input-plain:focus { outline: none; border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 4px rgba(26,63,148,.12); }
.field.has-error .input-plain { border-color: var(--red-600); background: #fff; }
.input-plain.is-empty-warn { border-color: #f3d38a; background: var(--amber-50); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.scan { display: flex; gap: 10px; }
.scan > .search-box, .scan > .scan__field { flex: 1; }
.scan__field { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink-500); transition: border-color .15s, box-shadow .15s, background .15s; }
.scan__field:focus-within { border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 4px rgba(26,63,148,.12); color: var(--navy-600); }
.scan__field .icon { width: 26px; height: 26px; }
.scan__field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 500 18px var(--font-body); color: var(--ink-900); }
.scan .btn { min-height: 58px; }
.scan.is-flash .scan__field { border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
.scan-msg { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14.5px; }
.scan-msg--warn { background: var(--amber-50); color: var(--amber-600); }
.scan-msg--error { background: var(--red-50); color: var(--red-700); }
.scan-msg--ok { background: var(--green-50); color: var(--green-600); }

.search-box { position: relative; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(10,31,79,.3); max-height: 320px; overflow-y: auto; }
.suggest li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--navy-50); }
.suggest li strong { font: 500 14.5px var(--font-body); color: var(--ink-900); display: block; }
.suggest li small { font-size: 12.5px; color: var(--ink-500); }
.suggest li .saldo { font: 600 13px var(--font-head); color: var(--ink-700); white-space: nowrap; }
.suggest__new { color: var(--navy-600); font-weight: 600; border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 8px 8px !important; }
.suggest__empty { color: var(--ink-500); cursor: default !important; }

.chosen { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--navy-50); border: 1.5px solid #c9d6f0; animation: drop .2s var(--ease); }
.chosen__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--navy-600); flex-shrink: 0; }
.chosen__info { flex: 1; min-width: 0; }
.chosen__info strong { display: block; font: 600 16px var(--font-head); color: var(--ink-900); }
.chosen__info small { font-size: 13px; color: var(--ink-500); }
.newprod { margin-top: 16px; padding: 16px; border-radius: 12px; border: 1.5px dashed #c9d6f0; animation: drop .2s var(--ease); }
.newprod__head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 14.5px; color: var(--navy-700); }
.stepper { display: flex; align-items: stretch; }
.stepper button { width: 44px; border: 1.5px solid var(--line); background: #fff; font-size: 20px; color: var(--navy-700); cursor: pointer; }
.stepper button:first-child { border-radius: 10px 0 0 10px; border-right: 0; }
.stepper button:last-child { border-radius: 0 10px 10px 0; border-left: 0; }
.stepper button:hover { background: var(--navy-50); }
.stepper .input-plain { border-radius: 0; text-align: center; font-weight: 600; }
.money { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface-2); padding-left: 12px; }
.money:focus-within { border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 4px rgba(26,63,148,.12); }
.money span { color: var(--ink-500); font-weight: 500; }
.money .input-plain { border: 0; background: none; box-shadow: none !important; }
.total { margin: 0; height: 46px; display: flex; align-items: center; font: 700 22px var(--font-head); color: var(--navy-700); }

/* dropzone (NF) */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; margin: 16px 0 4px; border-radius: 14px; border: 2px dashed #c9d6f0; background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--navy-600); background: var(--navy-50); }
.dropzone.has-file { border-style: solid; border-color: var(--green-600); background: var(--green-50); }
.dropzone.has-error { border-color: var(--red-600); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__icon { width: 40px; height: 40px; color: var(--navy-600); }
.dropzone strong { font: 600 16px var(--font-head); color: var(--ink-900); }
.dropzone small { color: var(--ink-500); }
.tips { list-style: none; padding: 16px 0 0; margin: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14px; color: var(--ink-500); }
.tips li { display: flex; gap: 8px; align-items: center; }
.tips .icon { width: 16px; height: 16px; color: var(--green-600); }

/* revisão da NF */
.nf-head { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 16px; }
.nf-head small { display: block; font-size: 12.5px; color: var(--ink-500); }
.nf-head strong { display: block; font: 600 16px var(--font-head); color: var(--ink-900); }
.nf-head .muted { font-size: 13px; }
.legend-line { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13.5px; color: var(--ink-500); }
.legend-line > span { display: inline-flex; align-items: center; gap: 8px; }
.nf-items { display: grid; gap: 12px; padding-bottom: 90px; }
.nf-item { display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1.5px solid #e6eaf2; transition: opacity .15s, border-color .15s; }
.nf-item.is-off { opacity: .5; }
.nf-item.is-off .nf-item__body { pointer-events: none; }
.nf-item.has-error { border-color: var(--red-600); }
.nf-item__check { position: relative; padding-top: 2px; cursor: pointer; }
.nf-item__check input { position: absolute; opacity: 0; }
.nf-item__check input:checked + .check__box { background: var(--navy-700); border-color: var(--navy-700); }
.nf-item__check input:checked + .check__box .icon { opacity: 1; }
.nf-item__body { flex: 1; min-width: 0; display: grid; gap: 12px; }
.nf-item__top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nf-item__top .hint { margin: 0; }
.nf-item__desc { display: block; font: 600 15px var(--font-head); color: var(--ink-900); }
.nf-item__link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nf-item__vincular { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px; }
.nf-item__vincular .search-box { flex: 1; }
.nf-item__novo { flex: 1; min-width: 260px; }
.grid--novo { grid-template-columns: 1fr 110px; gap: 10px; }
.grid--nf { grid-template-columns: repeat(4, 1fr); }
.seg--text .seg__btn { height: 34px; padding: 0 12px; font-size: 13px; white-space: nowrap; position: relative; }
.seg--text input { position: absolute; opacity: 0; }
.sticky-actions { position: fixed; left: var(--side-w); right: 0; bottom: 0; z-index: 15; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px clamp(16px, 2.5vw, 32px); background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.sticky-actions .muted { margin-right: auto; font-size: 14px; }

/* saída */
.saida__grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.saida__side { position: sticky; top: calc(var(--top-h) + 20px); }
.saida__summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; margin: 4px 0 14px; border-top: 1px solid var(--line); font-size: 15px; }
.saida__summary strong { font: 700 22px var(--font-head); color: var(--ink-900); }
.cart { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.cart__item { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); animation: drop .2s var(--ease); }
.cart__item.is-bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.02); border-color: var(--green-600); } }
.cart__item.has-error { border-color: var(--red-600); background: var(--red-50); }
.cart__name strong { display: block; font: 600 15px var(--font-head); color: var(--ink-900); }
.cart__name small { display: block; font-size: 12.5px; color: var(--ink-500); }
.cart__name .warn { color: var(--red-700); font-weight: 600; }
.cart .stepper { width: 150px; }
.cart .stepper button { width: 38px; height: 42px; }
.cart .stepper .input-plain { height: 42px; }
.cart__remove { width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--ink-500); cursor: pointer; display: grid; place-items: center; }
.cart__remove:hover { background: var(--red-50); color: var(--red-600); }
.cart__lote { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-500); }
.cart__lote select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: 400 13px var(--font-body); background: #fff; }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 10px; margin-top: 16px; border-radius: 12px; border: 2px dashed var(--line); text-align: center; color: var(--ink-300); }
.cart-empty .icon { width: 40px; height: 40px; }
.cart-empty p { margin: 0; color: var(--ink-700); }

/* câmera */
.camera { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(10,31,79,.7); }
.camera__box { width: min(520px, 100%); background: #fff; border-radius: 16px; padding: 16px; }
.camera__box header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-family: var(--font-head); }
.camera__view { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: #000; }
.camera__view video { width: 100%; height: 100%; object-fit: cover; }
.camera__line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--red-600); box-shadow: 0 0 12px var(--red-600); animation: scanline 2s ease-in-out infinite; }
@keyframes scanline { 50% { transform: translateY(-60px); } }

/* ficha do produto */
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.cols > .panel { margin-bottom: 20px; }
.linechart { position: relative; height: 220px; margin: 0 0 16px; }
.linechart svg { width: 100%; height: 100%; overflow: visible; }
.linechart .grid-line { stroke: var(--line); stroke-width: 1; }
.linechart .axis-label { fill: var(--ink-500); font: 400 11px var(--font-body); }
.linechart .line { fill: none; stroke: var(--navy-600); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.linechart .area { fill: url(#lc-grad); }
.linechart .pt { fill: var(--navy-600); stroke: #fff; stroke-width: 2; }
.linechart .crosshair { stroke: var(--ink-300); stroke-width: 1; stroke-dasharray: 3 3; }
.linechart .hit { fill: transparent; cursor: crosshair; }
.lots { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lot { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--green-600); }
.lot--vencendo { border-left-color: #eda100; }
.lot--vencido { border-left-color: var(--red-600); background: var(--red-50); }
.lot strong { display: block; font: 600 14.5px var(--font-head); color: var(--ink-900); }
.lot small { font-size: 12.5px; }
.lot__qtd { font: 700 18px var(--font-head) !important; }

/* widget estoque baixo (Início) */
.icon--warn { width: 18px; height: 18px; color: var(--amber-600); }
.count-pill { min-width: 26px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--amber-50); color: var(--amber-600); font: 700 13px/24px var(--font-head); text-align: center; }
.widget__head .count-pill { margin-left: -4px; }
.stock-list { list-style: none; margin: 0; padding: 0; }
.stock-list li + li { border-top: 1px solid var(--line); }
.stock-list a { display: grid; grid-template-columns: 1fr 90px auto; gap: 14px; align-items: center; padding: 11px 6px; border-radius: 8px; }
.stock-list a:hover { background: var(--surface-2); }
.stock-list .bar { margin: 0; }
.stock-list__name { min-width: 0; }
.stock-list__name strong { display: block; font: 500 14.5px var(--font-body); color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-list__name small { font-size: 12.5px; color: var(--ink-500); }
.widget__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font: 600 14px var(--font-head); color: var(--navy-600); }
.widget__more:hover { color: var(--red-600); }
.widget__empty { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 12px; background: var(--green-50); }
.widget__empty > .icon { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: #fff; color: var(--green-600); flex-shrink: 0; }
.widget__empty p { margin: 0; font-size: 14px; color: var(--ink-900); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols, .saida__grid { grid-template-columns: 1fr; }
  .saida__side { position: static; }
  .nf-head { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .kpis, .mode-tabs, .start-options, .grid--2, .grid--3, .grid--nf { grid-template-columns: 1fr; }
  .field--span2 { grid-column: auto; }
  .mode-tab small { display: none; }
  .scan .btn span { display: none; }
  .table th:nth-child(2), .table td:nth-child(2) { display: none; }
  .cart__item { grid-template-columns: 1fr auto; }
  .cart .stepper { grid-column: 1; }
  .sticky-actions { left: 0; }
  .stock-list a { grid-template-columns: 1fr auto; }
  .stock-list .bar { display: none; }
}

/* =====================================================================
   Acabamento sóbrio (ERP) — menos "template", mais sistema profissional
   Decisão 2026-10-11: Inter na interface, cantos 6–8px, sem pílulas
   coloridas com ícone, status como texto + ponto, tabelas densas.
   ===================================================================== */
.app { --font-head: var(--font-system); }
.app h1, .app h2, .app h3 { font-weight: 600; letter-spacing: -.01em; }
.app .page-head h1 { font-size: 22px; }

/* cantos e sombras */
.app .widget, .app .panel, .app .empty, .app .mode-tab, .app .nf-item, .app .chosen, .app .newprod,
.app .cart__item, .app .lot, .app .start-options a, .app .dropdown, .app .banner, .app .alert,
.app .kpis, .app .scan-msg, .app .dropzone, .app .suggest, .app .camera__box { border-radius: 8px; }
.app .widget { box-shadow: none; }
.app .btn { border-radius: 6px; }
.app .input-plain, .app .search, .app .scan__field, .app .money, .app .seg, .app .chips { border-radius: 6px; }
.app .stepper button:first-child { border-radius: 6px 0 0 6px; }
.app .stepper button:last-child { border-radius: 0 6px 6px 0; }
.app .scan__field { height: 52px; border-width: 1.5px; }
.app .scan .btn { min-height: 52px; }

/* números de etapa discretos */
.app .step__num { width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); color: var(--ink-700); border: 1px solid var(--line); font: 600 13px var(--font-body); }

/* status: texto + ponto (sem pílula, sem ícone) */
.status-dot { display: inline-flex; align-items: center; gap: 7px; font: 500 13.5px var(--font-body); color: var(--ink-500); white-space: nowrap; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300); flex-shrink: 0; }
.status-dot--ok::before { background: var(--green-600); }
.status-dot--warn { color: var(--amber-600); }
.status-dot--warn::before { background: #e09400; }
.status-dot--danger { color: var(--red-700); }
.status-dot--danger::before { background: var(--red-600); }
.txt-warn { color: var(--amber-600); font-weight: 500; }
.txt-danger { color: var(--red-700); font-weight: 500; }

/* badges restantes (ficha, NF, movimentações) no mesmo estilo de ponto */
.app .badge { background: none; padding: 0; border-radius: 0; gap: 7px; font: 500 13px var(--font-body); color: var(--ink-500); }
.app .badge .icon { display: none; }
.app .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300); }
.app .badge--ok::before { background: var(--green-600); }
.app .badge--ok { color: var(--ink-700); }
.app .badge--warn { color: var(--amber-600); }
.app .badge--warn::before { background: #e09400; }
.app .badge--danger { color: var(--red-700); }
.app .badge--danger::before { background: var(--red-600); }
.app .badge--info { color: var(--navy-600); }
.app .badge--info::before { background: var(--navy-600); }

/* tabela densa */
.app .table { font-size: 14px; }
.app .table th { text-transform: none; letter-spacing: 0; font: 500 12.5px var(--font-body); color: var(--ink-500); background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 9px 12px; }
.app .table th:first-child { border-radius: 6px 0 0 0; }
.app .table th:last-child { border-radius: 0 6px 0 0; }
.app .table td { padding: 10px 12px; }
.app .cell-title { font-weight: 500; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; color: var(--ink-500); white-space: nowrap; }
.unit { color: var(--ink-500); font-size: 12.5px; }
.app .table .num strong { font-weight: 600; color: var(--ink-900); }

/* indicadores em faixa única */
.app .kpis { gap: 0; background: #fff; border: 1px solid #e6eaf2; overflow: hidden; }
.app .kpi-card { border: 0; border-radius: 0; border-right: 1px solid var(--line); padding: 14px 20px; }
.app .kpi-card:last-child { border-right: 0; }
.app a.kpi-card:hover { box-shadow: none; background: var(--surface-2); }
.app .kpi-card.is-active { box-shadow: inset 0 -2px 0 var(--navy-600); background: #fff; }
.app .kpi-card strong { font: 600 22px/1.25 var(--font-body); }
.app .kpi-card small { font-size: 12.5px; }
.app .kpi-card--warn strong { color: var(--amber-600); }
.app .kpi-card--danger strong { color: var(--red-700); }

/* aviso sóbrio */
.app .banner--danger { background: #fff; border: 1px solid #e6eaf2; border-left: 3px solid var(--red-600); color: var(--ink-700); }
.app .banner--danger strong { color: var(--red-700); }
.app .banner--danger .icon { color: var(--red-600); }

/* filtros como controle segmentado */
.app .chips { gap: 0; border: 1px solid var(--line); overflow: hidden; }
.app .chip { border: 0; border-radius: 0; border-right: 1px solid var(--line); padding: 8px 14px; font: 500 13.5px var(--font-body); background: #fff; }
.app .chip:last-child { border-right: 0; }
.app .chip:hover { background: var(--surface-2); color: var(--ink-900); }
.app .chip.is-active { background: var(--surface-2); color: var(--ink-900); font-weight: 600; box-shadow: inset 0 -2px 0 var(--navy-600); }
.app .search { height: 40px; border-width: 1px; }

/* abas de modo: menos "card" */
.app .mode-tab { border-width: 1px; padding: 12px 14px; }
.app .mode-tab.is-active { box-shadow: inset 0 -2px 0 var(--navy-600); }

@media (max-width: 1100px) {
  .app .kpi-card:nth-child(2) { border-right: 0; }
  .app .kpi-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .app .kpi-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .app .table:not(.is-stack) th:nth-child(2), .app .table:not(.is-stack) td:nth-child(2),
  .app .table:not(.is-stack) th:nth-child(3), .app .table:not(.is-stack) td:nth-child(3),
  .app .table:not(.is-stack) th:nth-child(5), .app .table:not(.is-stack) td:nth-child(5) { display: none; }
}

/* =====================================================================
   Tela cheia (decisão 2026-10-11): o conteúdo ocupa toda a largura,
   sem largura máxima, em todas as telas do ERP.
   ===================================================================== */
.app .main { max-width: none; padding: calc(var(--top-h) + 20px) 20px 32px; }
.app .entry, .app .panel--narrow, .app .mode-tabs { max-width: none; }
.app .empty { max-width: none; margin: 20px 0; }
@media (max-width: 760px) { .app .main { padding: calc(var(--top-h) + 16px) 12px 24px; } }

/* =====================================================================
   Remoções / Financeiro
   ===================================================================== */
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.center { text-align: center !important; }
.mono-title { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 600; color: var(--ink-500); }
.input-area { height: auto; min-height: 70px; padding: 10px 12px; resize: vertical; font: 400 15px var(--font-body); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.field--span2 { grid-column: span 2; }

/* submenu do módulo */
.subnav { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -6px 0 18px; overflow-x: auto; }
.subnav a, .subnav__soon { padding: 10px 14px; font: 500 14px var(--font-body); color: var(--ink-500); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--ink-900); }
.subnav a.is-active { color: var(--navy-700); border-bottom-color: var(--navy-600); font-weight: 600; }
.subnav__soon { color: var(--ink-300); cursor: default; }
.subnav__soon::after { content: " · em breve"; font-size: 12px; }

/* avisos extras */
.banner--warn { background: #fff; border: 1px solid #e6eaf2; border-left: 3px solid #e09400; color: var(--ink-700); border-radius: 8px; }
.banner--warn .icon { color: #e09400; }
.banner--ok { background: #fff; border: 1px solid #e6eaf2; border-left: 3px solid var(--green-600); color: var(--ink-700); border-radius: 8px; }
.banner--ok .icon { color: var(--green-600); }

/* formulário de remoção */
.rform__grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.rform__side { position: sticky; top: calc(var(--top-h) + 20px); }
.rform .step { margin-bottom: 20px; }
.route { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.route__title { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 10px; color: var(--ink-700); }
.route__dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--navy-600); }
.route__dot--end { background: var(--red-600); border-color: var(--red-600); }
.route--view p { margin: 0; font-size: 14px; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.team__item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: 14px; }
.team__item:has(input:checked) { border-color: var(--navy-600); background: var(--navy-50); }
.team__item input { accent-color: var(--navy-600); width: 16px; height: 16px; }
.quote { padding: 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); margin: 6px 0 16px; }
.quote small { font-size: 12.5px; color: var(--ink-500); }
.quote strong { display: block; font: 600 26px/1.2 var(--font-body); color: var(--ink-900); margin: 2px 0 6px; }
.quote.is-doubt { border-color: #f3d38a; background: var(--amber-50); }
.quote__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-700); }
.quote__lines li { padding-left: 10px; border-left: 2px solid var(--line); }
.quote__aviso { margin: 8px 0 0; font-size: 12.5px; color: var(--amber-600); }
.quote__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; margin-bottom: 8px; border-top: 1px solid var(--line); }
.quote__total strong { font: 700 20px var(--font-body); color: var(--navy-700); }

/* detalhe */
.panel__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel__head .panel__title { margin: 0 auto 0 0; }
.panel__head form { margin: 0; }
.facts { display: grid; gap: 0; margin: 12px 0 0; }
.facts > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--ink-500); }
.facts dd { margin: 0; color: var(--ink-900); }
.big-value { font: 700 30px/1.1 var(--font-body); color: var(--ink-900); margin: 0 0 4px; }
.small-title { font-size: 13px; margin: 14px 0 6px; color: var(--ink-500); font-weight: 600; }
.mini-list { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13.5px; display: grid; gap: 4px; }
.mini-list a:hover { color: var(--navy-600); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.timeline li { padding-left: 12px; border-left: 2px solid var(--line); }
.timeline li span:first-child { display: block; font-size: 12px; color: var(--ink-500); }
.dialog { border: 0; border-radius: 10px; padding: 24px; width: min(480px, calc(100% - 32px)); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(10,31,79,.45); }
.dialog h2 { font-size: 18px; margin: 0 0 16px; }

/* atendimento (celular) */
.att__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.att__head h1 { font-size: 22px; margin: 0; }
.att__route { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.att__route > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: #fff; border: 1px solid #e6eaf2; border-radius: 8px; font-size: 13.5px; }
.att__route small { color: var(--ink-500); font-size: 12px; }
.att__route strong { color: var(--ink-900); }
.att__nav { position: sticky; top: var(--top-h); z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; margin-bottom: 12px; background: #eef1f7; }
.att__nav a { flex-shrink: 0; padding: 7px 12px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font: 500 13px var(--font-body); color: var(--ink-700); }
.att__nav a:hover { border-color: var(--navy-600); color: var(--navy-700); }
.att__sec { scroll-margin-top: calc(var(--top-h) + 56px); }
.att__ficha { border: 0; padding: 0; margin: 0; min-width: 0; }
.att__ficha[disabled] .btn, .att__ficha[disabled] form button { display: none; }
.next-step { display: grid; gap: 10px; padding: 16px; border-radius: 8px; background: var(--navy-50); border: 1px solid #c9d6f0; margin-bottom: 16px; max-width: 520px; }
.next-step small { color: var(--ink-500); font-size: 12.5px; }
.next-step strong { font: 600 20px var(--font-body); color: var(--navy-700); }
.km-input { display: flex; align-items: center; gap: 8px; }
.km-input .input-plain { font: 600 22px var(--font-body); height: 54px; letter-spacing: .04em; }
.km-input span { color: var(--ink-500); }
.btn--lg-touch { min-height: 56px; font-size: 17px; }
.steps-done { list-style: none; margin: 0 0 10px; padding: 0; }
.steps-done li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-500); }
.steps-done__dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-300); }
.steps-done li.is-done { color: var(--ink-900); }
.steps-done li.is-done .steps-done__dot { background: var(--green-600); border-color: var(--green-600); }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle { position: relative; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--ink-700); }
.toggle input:checked + span { border-color: var(--navy-600); background: var(--navy-600); color: #fff; }
.toggle input:focus-visible + span { outline: 3px solid var(--sky-400); outline-offset: 2px; }
.glasgow { padding: 14px; border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; }
.glasgow__head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.glasgow__total b { font-size: 18px; color: var(--navy-700); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; }
.pill span { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13.5px; background: #fff; }
.pill input:checked + span { border-color: var(--navy-600); background: var(--navy-50); color: var(--navy-700); font-weight: 600; }
.pill input:focus-visible + span { outline: 3px solid var(--sky-400); outline-offset: 2px; }
.pain { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; max-width: 560px; }
.pain__item { position: relative; cursor: pointer; }
.pain__item input { position: absolute; opacity: 0; }
.pain__item span { display: grid; place-items: center; height: 42px; border-radius: 6px; font-weight: 600; color: #fff; opacity: .55; }
.pain__item input:checked + span { opacity: 1; outline: 3px solid var(--ink-900); outline-offset: 1px; }
.pain__item--0 span, .pain__item--1 span { background: #16a34a; }
.pain__item--2 span, .pain__item--3 span { background: #65a30d; }
.pain__item--4 span, .pain__item--5 span { background: #ca8a04; }
.pain__item--6 span, .pain__item--7 span { background: #ea580c; }
.pain__item--8 span, .pain__item--9 span, .pain__item--10 span { background: #dc2626; }
.vitals, .med-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; align-items: end; }
.vitals .field, .med-form .field { margin: 0; }
.vitals__btn { display: flex; align-items: end; }
.pa { display: flex; align-items: center; gap: 6px; }
.pa span { color: var(--ink-500); }
.injuries { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.injury { display: flex; gap: 6px; align-items: center; }
.injury .toggle { flex: 1; }
.injury .toggle span { width: 100%; }
.injury select { height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font: 400 13px var(--font-body); background: #fff; }
.meds { list-style: none; margin: 0; padding: 0; }
.meds li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meds strong { display: block; font-weight: 600; color: var(--ink-900); }
.meds small { font-size: 12.5px; color: var(--ink-500); }
.meds form { margin: 0; }
.signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.sign { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.sign__pad { width: 100%; height: 150px; border: 1.5px dashed var(--ink-300); border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; }
.sign__saved { max-height: 80px; max-width: 100%; border-bottom: 1px solid var(--line); }
.sign small { color: var(--ink-500); font-size: 12.5px; }
.sign__actions { display: flex; justify-content: flex-end; gap: 8px; }
.checklist-min { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.checklist-min li { display: flex; gap: 8px; align-items: center; color: var(--ink-500); }
.checklist-min li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-300); flex-shrink: 0; }
.checklist-min li.is-ok { color: var(--ink-900); }
.checklist-min li.is-ok::before { background: var(--green-600); border-color: var(--green-600); }

/* lista de atendimentos da equipe */
.cards-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-bottom: 20px; }
.job { display: grid; gap: 10px; padding: 14px 16px; background: #fff; border: 1px solid #e6eaf2; border-radius: 8px; border-left: 3px solid var(--ink-300); }
.job:hover { border-color: var(--navy-600); }
.job--live { border-left-color: var(--navy-600); }
.job--done { opacity: .7; border-left-color: var(--green-600); }
.job__top { display: flex; gap: 12px; align-items: flex-start; }
.job__time { display: flex; flex-direction: column; font: 600 18px/1.1 var(--font-body); color: var(--ink-900); min-width: 52px; }
.job__time small { font-size: 12px; color: var(--ink-500); font-weight: 400; }
.job__main { flex: 1; min-width: 0; }
.job__main strong { display: block; color: var(--ink-900); }
.job__main small { font-size: 12.5px; color: var(--ink-500); }
.job__route { display: flex; gap: 8px; font-size: 13px; color: var(--ink-700); }
.job__route span:not(.job__arrow) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job__arrow { color: var(--ink-300); }
.section-title { font-size: 16px; margin: 8px 0 12px; }
.kpi-text { font-size: 15px !important; font-weight: 500 !important; }

/* tabela de preço (Financeiro) */
.price-table th, .price-table td { white-space: nowrap; }
.price-table td { padding: 4px 6px !important; }
.cell-input { width: 92px; height: 32px; padding: 0 8px; text-align: right; border: 1px solid transparent; border-radius: 4px; background: transparent; font: 400 14px var(--font-body); font-variant-numeric: tabular-nums; color: var(--ink-900); }
.cell-input:hover { border-color: var(--line); background: #fff; }
.cell-input:focus { outline: none; border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 3px rgba(26,63,148,.12); }
.cell-input.is-doubt { background: var(--amber-50); border-color: #f3d38a; }
.cell-input.is-changed { background: var(--navy-50); border-color: var(--navy-600); font-weight: 600; }

@media (max-width: 1100px) {
  .rform__grid { grid-template-columns: 1fr; }
  .rform__side { position: static; }
  .grid--4, .vitals, .med-form { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .route, .att__route, .grid--4 { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .pain { grid-template-columns: repeat(6, 1fr); }
  .att__head .btn { display: none; }
}

/* idade calculada automaticamente */
.input-plain.is-auto { background: var(--navy-50); color: var(--navy-700); font-weight: 600; cursor: default; }

/* =====================================================================
   MAIÚSCULO (decisão 2026-10-11): títulos dos campos e texto digitado.
   Exceção: tela de login (usuário e senha diferenciam maiúsculas).
   ===================================================================== */
.field > label, .field__row > label, .field > .label, .app .glasgow__head strong {
  text-transform: uppercase; letter-spacing: .03em; font-size: 12.5px; font-weight: 600;
}
.app input:not([type="password"]):not([type="email"]):not([type="checkbox"]):not([type="radio"]):not([type="date"]):not([type="datetime-local"]):not([type="time"]),
.app textarea, .app select { text-transform: uppercase; }
.app input::placeholder, .app textarea::placeholder { text-transform: none; }
.app input[data-keep-case] { text-transform: none; }  /* nome de usuário (login diferencia maiúsculas) */
.auth .field > label, .auth .field__row > label { text-transform: none; letter-spacing: 0; font-size: 14.5px; font-weight: 500; }

/* registro de etapa pela central (detalhe) */
.row-next td { background: var(--navy-50); }
.row-pending td { color: var(--ink-500); }
.inline-step { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-step .input-plain { height: 38px; width: auto; }
.inline-step input[name="km"] { width: 120px; }
.other-time summary { cursor: pointer; font-size: 13px; color: var(--navy-600); }
.other-time .input-plain { margin-top: 8px; }

/* avisos flutuantes (sempre visíveis, mesmo com a página rolada) */
.toasts { position: fixed; top: calc(var(--top-h, 60px) + 12px); left: 50%; transform: translateX(-50%); z-index: 80;
  display: grid; gap: 8px; width: min(560px, calc(100% - 24px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 8px; background: #fff;
  border: 1px solid #e6eaf2; border-left: 4px solid var(--navy-600); box-shadow: 0 16px 40px -12px rgba(10,31,79,.35);
  font-size: 14.5px; color: var(--ink-900); animation: drop .2s var(--ease); transition: opacity .3s, transform .3s; }
.toast > div { flex: 1; }
.toast .icon { margin-top: 2px; }
.toast--success { border-left-color: var(--green-600); } .toast--success > .icon { color: var(--green-600); }
.toast--error { border-left-color: var(--red-600); background: #fff7f7; } .toast--error > .icon { color: var(--red-600); }
.toast--warning { border-left-color: #e09400; }
.toast.is-leaving { opacity: 0; transform: translateY(-6px); }
.toast__close { border: 0; background: none; color: var(--ink-500); cursor: pointer; padding: 2px; }
/* corrigir etapa */
.fix-step { display: inline-block; margin-left: 8px; }
.fix-step summary { display: inline; cursor: pointer; font-size: 12.5px; color: var(--navy-600); list-style: none; }
.fix-step summary::-webkit-details-marker { display: none; }
.fix-step[open] summary { color: var(--ink-500); }
.fix-step .inline-step { margin-top: 6px; }
.steps-done li { grid-template-columns: 16px 1fr auto; }
.steps-done__fix { grid-column: 2 / -1; }
.steps-done__fix .fix-step { margin-left: 0; }

/* cartões de atendimento: nada vaza para fora do cartão */
.job { min-width: 0; overflow: hidden; }
.job__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.job__main { min-width: 0; }
.job__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job__top .status-dot { flex-shrink: 0; white-space: nowrap; font-size: 12.5px; padding-top: 2px; }
.job__route { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; min-width: 0; }
.job__route span:not(.job__arrow) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job__main strong { white-space: normal; overflow: visible; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job__route { grid-template-columns: minmax(0, max-content) auto minmax(0, 1fr); }
/* "Corrigir" na mesma linha da etapa; ao abrir, o formulário ocupa a linha inteira */
.steps-done li { grid-template-columns: 16px 1fr auto auto; }
.steps-done__fix { grid-column: auto; }
.steps-done__fix:has(details[open]) { grid-column: 1 / -1; }
.steps-done__fix .fix-step summary { font-size: 12.5px; }

/* submenu: sem barra de rolagem aparente */
.subnav { overflow-y: hidden; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }

/* busca de local (Google) */
.place-search { margin-bottom: 12px; }
.scan__field--sm { height: 44px; border-width: 1px; }
.scan__field--sm input { font-size: 15px; font-weight: 400; }
.scan__field--sm .icon { width: 20px; height: 20px; }
.place-search .hint { margin-top: 6px; }
/* assinaturas: três colunas ocupando toda a largura */
.signs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sign { grid-template-rows: auto 1fr auto auto; }
.sign__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sign__pad { height: 180px; }
.req { color: var(--red-600); }
@media (max-width: 900px) { .signs { grid-template-columns: 1fr; } }

.suggest__group { cursor: default !important; padding: 8px 12px 4px !important; font: 600 11px var(--font-body); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); background: none !important; }

.tag-warn { font: 600 11px var(--font-body); color: var(--amber-600); background: var(--amber-50); padding: 3px 7px; border-radius: 4px; white-space: nowrap; }

/* login: 'Esqueci minha senha' abaixo do campo de senha */
.field__below { display: flex; justify-content: flex-end; margin-top: 8px; }
/* espaço entre a busca de paciente e os campos (o texto de ajuda foi removido) */
[data-pac-busca] > .search-box { margin-bottom: 16px; }
/* itens da equipe: caixinha alinhada ao texto (sobrepõe a regra genérica de rótulo) */
.field .team .team__item { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px;
  font: 400 14px/1.35 var(--font-body); text-transform: none; letter-spacing: 0; color: var(--ink-900); }
.field .team .team__item input { flex-shrink: 0; margin: 1px 0 0; }
/* respiro entre uma grade de campos e o campo seguinte (ex.: Viatura/Base → Equipe) */
.rform .grid + .field, .rform .grid + .grid { margin-top: 18px; }

/* aviso compacto da busca de local */
.place-msg { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 4px 10px; border-radius: 6px;
  font-size: 13px; line-height: 1.3; color: var(--ink-700); background: var(--surface-2); }
.place-msg .icon { width: 15px; height: 15px; flex-shrink: 0; }
.place-msg.hint--warn { color: var(--amber-600); background: var(--amber-50); }
.place-msg.hint--ok { color: var(--green-600); background: var(--green-50); }
/* campo que precisa ser completado */
.input-plain.needs-fill { border-color: #e09400; background: #fffaf0; box-shadow: 0 0 0 3px rgba(224,148,0,.15); }

.suggest li .saldo { font: 500 11px var(--font-body); color: var(--ink-500); text-align: right; max-width: 160px; }

/* tabela de etapas (detalhe da remoção) */
.steps-table { table-layout: fixed; }
.steps-table .col-hora { width: 220px; } .steps-table .col-km { width: 140px; } .steps-table .col-acao { width: 190px; }
.steps-table td { height: 52px; padding-top: 6px !important; padding-bottom: 6px !important; }
.steps-table td.num { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ink-900); }
.steps-table .input-sm { height: 38px; padding: 0 10px; font-size: 14px; }
.steps-table input[type="datetime-local"] { width: 100%; }
.steps-table .input-km { width: 110px; text-align: right; }
.step-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink-300); margin-right: 10px; vertical-align: middle; }
.step-dot--done { background: var(--green-600); border-color: var(--green-600); }
.step-dot--next { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(26,63,148,.15); }
.row-next td { background: var(--navy-50); }
.row-pending td { color: var(--ink-500); }
.row-done .edit { display: none; }
.row-done.is-editing .edit { display: inline-flex; }
.row-done.is-editing input.edit { display: inline-block; }
.row-done.is-editing .view { display: none; }
.row-done.is-editing td { background: var(--amber-50); }
.edit-actions { gap: 6px; justify-content: flex-end; }
.trip-summary { display: flex; gap: 20px; }
.trip-summary span { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.trip-summary small { font-size: 11.5px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .03em; }
.trip-summary strong { font: 600 16px var(--font-body); color: var(--ink-900); font-variant-numeric: tabular-nums; }
.steps-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
/* faixa de indicadores divide a largura igualmente, com 3, 4 ou mais itens */
@media (min-width: 1101px) { .app .kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }

/* ações em ícone nas grades, com dica ao passar o mouse */
.row-actions { display: inline-flex; gap: 4px; justify-content: flex-end; }
.act { position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid transparent;
  border-radius: 6px; background: none; color: var(--ink-500); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.act .icon { width: 18px; height: 18px; }
.act:hover, .act:focus-visible { background: var(--navy-50); color: var(--navy-700); border-color: #c9d6f0; }
.act--danger:hover, .act--danger:focus-visible { background: var(--red-50); color: var(--red-600); border-color: #f9c9cb; }
[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px);
  padding: 4px 8px; border-radius: 5px; background: var(--ink-900); color: #fff; font: 500 12px var(--font-body); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 10; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.btn--danger { background: var(--red-600); color: #fff; }
.btn--danger:hover { background: var(--red-700); }
/* tabela de preço em modo visualização */
.price-form.is-readonly .cell-input, .price-form.is-readonly .input-plain[readonly] { border-color: transparent; background: transparent; pointer-events: none; box-shadow: none; }
.price-form.is-readonly .cell-input.is-doubt { background: var(--amber-50); border-color: #f3d38a; }  /* "a conferir" continua amarelo no somente leitura */
.view-actions { margin: -8px 0 14px; justify-content: flex-end; }
/* cabeçalho de página: bloco do título ocupa o espaço livre e as ações ficam à direita na mesma linha */
.page-head > div:first-child:not(.page-head__actions) { flex: 1 1 0; min-width: 0; }
/* coluna de ações na frente da grade */
.table .col-acoes { width: 1%; white-space: nowrap; padding-right: 4px !important; }
.table td.col-acoes .row-actions { justify-content: flex-start; }

.act.is-disabled { color: var(--ink-300); cursor: not-allowed; }
.act.is-disabled:hover, .act.is-disabled:focus-visible { background: var(--surface-2); color: var(--ink-300); border-color: transparent; }
/* dica das ações na 1ª coluna abre para a direita (não corta na borda da tela) */
.col-acoes [data-tip]::after { left: 0; transform: translate(0, 4px); }
.col-acoes [data-tip]:hover::after, .col-acoes [data-tip]:focus-visible::after { transform: translate(0, 0); }

/* cartões de escolha (ex.: como começar a nova tabela) */
.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 12px; }
.choice-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.choice-card input { margin-top: 3px; accent-color: var(--navy-600); }
.choice-card strong { display: block; font: 600 14.5px var(--font-body); color: var(--ink-900); }
.choice-card small { color: var(--ink-500); font-size: 13px; }
.choice-card.is-active { border-color: var(--navy-600); box-shadow: inset 0 0 0 1px var(--navy-600); background: var(--navy-50); }
@media (max-width: 760px) { .choice-cards { grid-template-columns: 1fr; } }
/* nova tabela: seções sem caixa dentro da caixa */
[data-nova-tabela] .step { border: 0; padding: 0; margin: 0; background: none; }

/* pop-up compacto (hora parada) */
.dialog--sm { width: min(340px, calc(100% - 32px)); padding: 22px; }
.dialog--sm h2 { font-size: 17px; margin: 0 0 6px; }
.dialog--sm .field { margin: 14px 0 0; }
.dialog--sm .stepper .input-plain { text-align: center; font-weight: 600; font-size: 18px; }
.dialog__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.parada-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; font-size: 14px; }

.conv-field { max-width: 520px; }
.link--add { margin-top: 10px; font-weight: 600; }
.link--add .icon { width: 16px; height: 16px; }
.conv-field .link { margin-top: 10px; }

/* nova tabela: duas colunas proporcionais */
.nt-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.nt-grid .panel { margin: 0; }
.nt-note { margin: 12px 0 0; }
.choice-list { display: grid; gap: 10px; }
.choice-list .choice-card { display: block; padding: 0; cursor: default; }
.choice-card__head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer; margin: 0 !important;
  font: inherit !important; text-transform: none !important; letter-spacing: 0 !important; }
.choice-card__head input { margin-top: 3px; accent-color: var(--navy-600); }
.choice-card__body { padding: 0 16px 14px 44px; }
.choice-card__body .field { margin: 0; }
.choice-card__body .link { margin-top: 8px; }
.input-file { padding: 10px 12px; height: auto; }
.nt-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@media (max-width: 900px) { .nt-grid { grid-template-columns: 1fr; } }
/* importação */
.import-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.import-grid .panel { margin: 0; }
.dropzone--sm { padding: 26px 16px; margin: 4px 0; }
.format-help { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.format-help code { font-size: 12.5px; background: var(--surface-2); padding: 3px 6px; border-radius: 4px; }
.kpis--mini { margin-bottom: 14px; }
.err-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-700); }
.empty-mini { display: flex; gap: 12px; align-items: center; padding: 24px; border: 1.5px dashed var(--line); border-radius: 8px; color: var(--ink-500); }
.empty-mini .icon { width: 28px; height: 28px; color: var(--ink-300); }
.empty-mini p { margin: 0; }
@media (max-width: 900px) { .import-grid { grid-template-columns: 1fr; } }

.choice-card__body .dropzone { margin: 0; }
.field > label.dropzone { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; }

.field label.dropzone { display: flex; flex-direction: column; text-transform: none; letter-spacing: 0; }


/* nova tabela de preço: cartão único, grade de 3 colunas */
.nt { padding: 0; }
.nt-sec { padding: 20px 22px; }
.nt-sec + .nt-sec { border-top: 1px solid var(--line); }
.nt-sec__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.nt-sec__head h2 { font-size: 15px; margin: 0; }
.nt-sec__head .link { margin: 0; font-size: 13px; }
.nt-row, .nt-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.nt-row .field { margin: 0; }
.nt-opt { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; margin: 0 !important; }
.nt-opt:hover { border-color: #b8c0cc; }
.nt-opt input { position: absolute; opacity: 0; pointer-events: none; }
.nt-opt__icon { grid-row: span 2; width: 34px; height: 34px; padding: 8px; border-radius: 8px; background: var(--surface-2); color: var(--ink-500); }
.nt-opt strong { font: 600 14px var(--font-body); color: var(--ink-900); text-transform: none; }
.nt-opt small { font-size: 12.5px; color: var(--ink-500); text-transform: none; line-height: 1.35; }
.nt-opt.is-active { border-color: var(--navy-600); box-shadow: inset 0 0 0 1px var(--navy-600); background: var(--navy-50); }
.nt-opt.is-active .nt-opt__icon { background: var(--navy-600); color: #fff; }
.nt-opt:has(input:focus-visible) { outline: 2px solid var(--navy-600); outline-offset: 2px; }
.nt-detail { margin-top: 16px; }
.nt-detail--arq .field { margin: 0; max-width: calc((100% - 28px) * 2 / 3 + 14px); }
.nt-detail--arq .dropzone { margin: 0 0 8px; }
.nt-detail--arq .dropzone__icon { width: 30px; height: 30px; }
.nt-detail--arq .dropzone strong { font-size: 14.5px; }
.nt-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 14px 14px; }
@media (max-width: 900px) { .nt-row, .nt-opts { grid-template-columns: 1fr; } .nt-detail--arq .field { max-width: none; } }

/* =====================================================================
   Agenda (2026-10-12): quadro do dia por viatura, semana, mês, escala
   ===================================================================== */
.subnav__count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 4px; background: var(--amber-50); color: var(--amber-600); font: 600 11.5px/18px var(--font-body); text-align: center; }
.agenda-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
a.seg__btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 7px; font: 600 13.5px var(--font-body); color: var(--ink-700, #334155); }
a.seg__btn.is-active { background: var(--navy-600); color: #fff; }
.datenav { display: flex; align-items: center; gap: 4px; }
.datenav .icon-btn { position: relative; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.datenav .btn--sm { min-height: 36px; }
.datenav__input { width: 150px; height: 36px; margin-left: 6px; }
.legend-blk { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; font-size: 12.5px; color: var(--ink-500); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ""; width: 14px; height: 10px; border-radius: 2px; border: 1px solid var(--line); border-left: 3px solid var(--ink-300); background: #fff; }
.lg--sol::before { border-left-color: #e09400; }
.lg--ag::before { border-left-color: var(--navy-600); }
.lg--and::before { border-left-color: var(--sky-400); }
.lg--fin::before { border-left-color: var(--green-600); background: var(--surface-2); }
.lg--conf::before { border-color: var(--red-600); border-left-color: var(--red-600); }
.lg--plt::before { border-color: #c9d6f0; border-left-width: 1px; background: var(--navy-50); }
.banner__list { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.inline-form { display: inline-block; margin-left: 8px; vertical-align: middle; }
.count-num { margin-left: 6px; font-weight: 500; color: var(--ink-500); }

.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.agenda-side .panel { padding: 16px; }
.agenda-side .panel__title { display: flex; align-items: center; font-size: 15px; }
.side-item { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.side-item:first-of-type { border-top: 0; padding-top: 0; }
.side-assign { display: flex; gap: 6px; }
.side-assign select { height: 36px; flex: 1; }
.side-assign .btn--sm, .side-item .btn--sm { min-height: 36px; }

/* quadro: linhas = viaturas, eixo = 24h */
.board { padding: 12px; }
.board__scroll { overflow-x: auto; }
.board__grid { min-width: 880px; }
.board__row { display: grid; grid-template-columns: 120px 1fr; border-top: 1px solid var(--line); }
.board__row--head { border-top: 0; }
.board__row.is-over .board__track { background-color: #eaf4fd; }
.board__label { padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; font-size: 13.5px; border-right: 1px solid var(--line); }
.board__label small { color: var(--ink-500); font-size: 12px; }
.board__row--head .board__label { font-size: 12.5px; color: var(--ink-500); }
.board__hours { display: grid; grid-template-columns: repeat(24, 1fr); }
.board__hours span { padding: 6px 0 6px 3px; overflow: hidden; font: 500 11.5px var(--font-body); color: var(--ink-500); border-left: 1px solid var(--line); }
.board__track { position: relative; min-height: calc(var(--pistas, 1) * 42px + 26px);
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / 24) 100%; }
.board__now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--red-600); z-index: 3; pointer-events: none; }
.plt { position: absolute; top: 2px; bottom: 2px; background: var(--navy-50); border-radius: 4px; z-index: 0; overflow: hidden; }
.plt span { display: block; padding: 2px 6px; font: 500 11px/1.3 var(--font-body); color: var(--navy-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plt:hover { background: #dfe7f6; }
.blk { position: absolute; top: calc(22px + var(--pista, 0) * 42px); height: 38px; z-index: 2; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; padding: 2px 7px; background: #fff; border: 1px solid #d5dce8; border-left: 3px solid var(--ink-300); border-radius: 4px; font-size: 12px; line-height: 1.3; color: var(--ink-700); }
.blk strong, .blk small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk strong { font-weight: 600; color: var(--ink-900); }
.blk strong em { font-style: normal; font-weight: 400; color: var(--ink-500); }
.blk small { color: var(--ink-500); font-size: 11.5px; }
.blk:hover { z-index: 4; box-shadow: 0 4px 12px -4px rgba(15,23,42,.25); }
.blk[draggable="true"] { cursor: grab; }
.blk.is-dragging { opacity: .45; }
.blk--sol { border-left-color: #e09400; }
.blk--ag { border-left-color: var(--navy-600); }
.blk--and { border-left-color: var(--sky-400); background: #f3f9fe; }
.blk--fin { border-left-color: var(--green-600); background: var(--surface-2); }
.blk--conf { border-color: var(--red-600); border-left-color: var(--red-600); box-shadow: 0 0 0 1px var(--red-600) inset; }
.board__hint { margin-top: 10px; }

/* semana e escala */
.week { padding: 12px; }
.week__scroll { overflow-x: auto; }
.week__table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.week__table th, .week__table td { border: 1px solid var(--line); vertical-align: top; padding: 6px; }
.week__table thead th { background: var(--surface-2); font: 500 12.5px var(--font-body); color: var(--ink-700); text-align: left; }
.week__table thead th a:hover { color: var(--navy-600); text-decoration: underline; }
.week__table thead th small { display: block; font-weight: 400; color: var(--ink-500); }
.week__table thead th.is-today { box-shadow: inset 0 -2px 0 var(--navy-600); color: var(--ink-900); font-weight: 600; }
.week__vtr { width: 120px; text-align: left; font-weight: 600; color: var(--ink-900); background: #fff; }
.week__vtr small { display: block; font-weight: 400; color: var(--ink-500); font-size: 12px; }
.wk-plt { display: block; margin-bottom: 4px; padding: 2px 6px; border-radius: 4px; background: var(--navy-50); color: var(--navy-700); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-item { display: flex; gap: 6px; align-items: baseline; padding: 3px 4px; border-radius: 4px; min-width: 0; }
.wk-item:hover { background: var(--surface-2); }
.wk-item .status-dot { font-size: 12.5px; color: var(--ink-700); }
.wk-item__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wk-item.is-conf { box-shadow: inset 2px 0 0 var(--red-600); }
.wk-item--prev { color: var(--ink-500); border: 1px dashed var(--ink-300); margin-top: 3px; }
.shift { display: block; margin-bottom: 6px; padding: 6px 8px; border: 1px solid var(--line); border-left: 3px solid var(--navy-600); border-radius: 4px; background: #fff; }
.shift:hover { border-color: var(--navy-600); }
.shift.has-alert { border-left-color: #e09400; }
.shift__t { display: block; font-weight: 600; color: var(--ink-900); font-size: 12.5px; margin-bottom: 2px; }
.shift__m { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift__m small { color: var(--ink-500); }
.shift-add { position: relative; display: grid; place-items: center; height: 26px; border: 1px dashed var(--line); border-radius: 4px; color: var(--ink-300); }
.shift-add:hover { border-color: var(--navy-600); color: var(--navy-600); }
.shift-add .icon { width: 15px; height: 15px; }
.cols--2 { grid-template-columns: 1fr 1fr; }
.app .panel__title:has(.link) { display: flex; align-items: center; }

/* mês */
.month { padding: 12px; }
.month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.month__dow { padding: 6px 8px; font: 500 12.5px var(--font-body); color: var(--ink-500); background: var(--surface-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.month__day { display: flex; flex-direction: column; gap: 2px; min-height: 112px; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; min-width: 0; }
.month__day:hover { background: var(--surface-2); }
.month__day.is-out { background: #fafbfd; color: var(--ink-300); }
.month__day.is-out .month__item { color: var(--ink-300); }
.month__num { font: 600 13px var(--font-body); color: var(--ink-900); }
.month__day.is-today .month__num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: var(--navy-600); color: #fff; }
.month__item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-700); }
.month__more { color: var(--ink-500); }
.month__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.month__foot .status-dot { font-size: 11.5px; }

/* formulários */
.time-pair { display: flex; align-items: center; gap: 8px; }
.time-pair span { color: var(--ink-500); font-size: 13px; }
.weekdays { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; width: max-content; max-width: 100%; }
.weekdays__item { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-right: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.weekdays__item:last-child { border-right: 0; }
.weekdays__item:has(input:checked) { background: var(--navy-50); color: var(--navy-700); font-weight: 600; }
.weekdays__item input { accent-color: var(--navy-600); }
.field--check, .field--end { display: flex; align-items: flex-end; }
.toggle-line { display: flex !important; align-items: center; gap: 8px; height: 44px; margin: 0 !important; font: 500 14px var(--font-body) !important; cursor: pointer; }
.toggle-line input { width: 16px; height: 16px; accent-color: var(--navy-600); }
.radio-line { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14.5px; cursor: pointer; }
.plantao-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 4px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--navy-600); border-radius: 6px; font-size: 13.5px; }
.plantao-hint .icon { color: var(--navy-600); width: 16px; height: 16px; }

/* minha agenda */
.my-day .panel__title { font-size: 15px; }
.my-item { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.my-item:first-of-type { border-top: 0; }
.my-item__time { flex-shrink: 0; width: 92px; font: 600 13.5px var(--font-body); color: var(--navy-700); }
a.my-item:hover strong { color: var(--navy-600); }

.serie-side .serie-campos { grid-template-columns: 1fr 1fr; }
.serie-side .weekdays { width: 100%; }
.serie-side .weekdays__item { flex: 1; justify-content: center; padding: 9px 4px; }

@media (max-width: 1100px) {
  .agenda-layout { grid-template-columns: 1fr; }
  .legend-blk { margin-left: 0; }
}
@media (max-width: 760px) {
  .cols--2 { grid-template-columns: 1fr; }
  .month__day { min-height: 70px; padding: 4px; }
  .month__item, .month__more, .month__foot .muted { display: none; }
  .datenav__input { width: 130px; }
  .app .page-head > div:first-child { flex: 1 1 100%; }
  .weekdays { width: 100%; }
  .weekdays__item { flex: 1; justify-content: center; padding: 9px 4px; }
}

/* =====================================================================
   Submódulos em quadrados (2026-10-12): entrada do Financeiro
   ===================================================================== */
.modtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.modtile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: 210px; padding: 24px 16px; background: #fff; border: 1px solid #e6eaf2; border-radius: 8px; text-align: center;
  transition: border-color .15s, box-shadow .15s; }
a.modtile:hover, a.modtile:focus-visible { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(26,63,148,.12); }
.modtile__icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 8px; background: var(--navy-50); color: var(--navy-600); }
.modtile__icon .icon { width: 40px; height: 40px; stroke-width: 1.6; }
.modtile__name { font: 500 15.5px/1.3 var(--font-body); color: var(--ink-900); }
.modtile.is-soon { cursor: default; }
.modtile.is-soon .modtile__icon { background: var(--surface-2); color: var(--ink-300); }
.modtile.is-soon .modtile__name { color: var(--ink-500); }
@media (max-width: 760px) { .modtiles { grid-template-columns: repeat(2, 1fr); gap: 12px; } .modtile { min-height: 150px; } }

/* =====================================================================
   Grades em cartões no tablet e celular (2026-10-12): sem rolagem lateral.
   Cartão = título (paciente/produto) + situação no topo, dados em linhas
   "rótulo · valor" em 2 colunas, ações no rodapé.
   ===================================================================== */
@media (max-width: 1180px) {
  .app .table-wrap:has(.is-stack) { overflow-x: visible; margin: 0; padding: 0; }
  .app .table.is-stack, .app .table.is-stack tbody { display: block; }
  .app .table.is-stack thead { display: none; }
  .app .table.is-stack tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px;
    margin-bottom: 10px; padding: 14px 16px 10px; background: #fff; border: 1px solid #e3e8f0; border-radius: 8px; }
  .app .table.is-stack tr:hover { background: #fff; border-color: #c9d6f0; }
  .app .table.is-stack td { display: block !important; position: relative; padding: 0 0 0 108px; border: 0;
    text-align: left; min-width: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: break-word; }
  .app .table.is-stack td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 0; width: 96px;
    font: 400 12.5px/1.6 var(--font-body); color: var(--ink-500); }
  .app .table.is-stack td:empty { display: none !important; }
  .app .table.is-stack td .cell-sub { display: inline; margin-left: 6px; }
  /* topo: título + situação */
  .app .table.is-stack td.is-title { order: -2; grid-column: 1; padding-left: 0; margin-bottom: 8px; }
  .app .table.is-stack td.is-title::before { display: none; }
  .app .table.is-stack td.is-title, .app .table.is-stack td.is-title .cell-title { font-size: 15px; font-weight: 600; color: var(--ink-900); }
  .app .table.is-stack td.is-title .cell-sub { display: block; margin: 2px 0 0; font-size: 12.5px; font-weight: 400; }
  .app .table.is-stack td.is-status { order: -1; grid-column: 2; padding-left: 0; text-align: right; margin-bottom: 8px; }
  .app .table.is-stack td.is-status::before { display: none; }
  /* rodapé: ações */
  .app .table.is-stack td.col-acoes { order: 99; grid-column: 1 / -1; margin-top: 6px; padding: 6px 0 0; border-top: 1px solid var(--line); }
  .app .table.is-stack td.col-acoes::before { display: none; }
  .app .table.is-stack td.col-acoes .row-actions { justify-content: flex-start; }
  .app .table.is-stack td[colspan] { grid-column: 1 / -1; padding-left: 0; }
  .app .table.is-stack .nowrap, .app .table.is-stack .mono { white-space: normal; }
}
@media (max-width: 760px) {
  .app .table.is-stack tr { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .app .table.is-stack td:not(.is-title):not(.is-status):not(.col-acoes) { grid-column: 1 / -1; }
}

/* =====================================================================
   Faturamento (2026-10-12): caminho em etapas, próximos passos, conferência
   ===================================================================== */
/* caminho: Visão geral | 1 A faturar › 2 Lotes a enviar › 3 A receber › 4 Recebidos | Glosas */
.flow { display: flex; align-items: stretch; gap: 10px; margin: -6px 0 20px; flex-wrap: wrap; }
.flow__home, .flow__side, .flow__steps a { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #fff;
  border: 1px solid #e3e8f0; font: 500 14px var(--font-body); color: var(--ink-700); white-space: nowrap; }
.flow__home, .flow__side { border-radius: 6px; }
.flow__side { margin-left: auto; }
.flow__steps { display: flex; list-style: none; margin: 0; padding: 0; }
.flow__steps li { display: flex; }
.flow__steps li + li a { border-left: 0; }
.flow__steps li:first-child a { border-radius: 6px 0 0 6px; }
.flow__steps li:last-child a { border-radius: 0 6px 6px 0; }
.flow__steps li + li a::before { content: "›"; margin-right: 4px; color: var(--ink-300); font-size: 18px; line-height: 1; }
.flow a:hover { background: var(--surface-2); color: var(--ink-900); }
.flow a.is-active { color: var(--navy-700); font-weight: 600; box-shadow: inset 0 -2px 0 var(--navy-600); }
.flow__n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: var(--surface-2);
  border: 1px solid var(--line); font: 600 11.5px var(--font-body); color: var(--ink-500); }
.flow a.is-active .flow__n { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }
.flow__c { min-width: 20px; padding: 0 6px; border-radius: 4px; background: var(--navy-50); color: var(--navy-700); font: 600 12px/20px var(--font-body); text-align: center; }
.flow__c--warn { background: var(--amber-50); color: var(--amber-600); }

/* próximos passos (o painel diz o que fazer) */
.next-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 20px; }
.next-up__item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid #e3e8f0;
  border-left: 3px solid var(--navy-600); border-radius: 8px; }
.next-up__item > .icon { width: 22px; height: 22px; color: var(--navy-600); }
.next-up__item span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.next-up__item strong { color: var(--ink-900); font-weight: 600; font-size: 14.5px; }
.next-up__item small { color: var(--ink-500); font-size: 13px; }
.next-up__go { color: var(--ink-300); }
.next-up__item:hover { border-color: var(--navy-600); }
.next-up__item:hover .next-up__go { color: var(--navy-600); }
.next-up__item--danger { border-left-color: var(--red-600); }
.next-up__item--danger > .icon { color: var(--red-600); }
.kpi-note { font-style: normal; font-size: 12px; color: var(--ink-500); }
.app .kpi-card strong .kpi-note { display: none; }

/* pagamentos previstos */
.due { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.due:first-of-type { border-top: 0; }
.due__date { flex-shrink: 0; width: 54px; padding: 4px 0; border-radius: 6px; background: var(--surface-2); text-align: center; font: 600 13px var(--font-body); color: var(--ink-700); }
.due span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.due small { color: var(--ink-500); font-size: 12.5px; }
.due__v { font-weight: 600; color: var(--ink-900); white-space: nowrap; }
.due--late .due__date { background: var(--red-50); color: var(--red-700); }
.due--late small { color: var(--red-700); }
.due:hover strong { color: var(--navy-600); }

/* a faturar */
.lead-hint { margin: 0 0 16px; font-size: 14px; color: var(--ink-500); max-width: 900px; }
.billgroup__head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.billgroup__head .panel__title { margin: 0; }
.billgroup__head p { margin: 2px 0 0; }
.billgroup__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.billgroup__sel { font-size: 13.5px; color: var(--ink-700); font-weight: 500; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.col-check { width: 36px; }
.col-check input { width: 17px; height: 17px; accent-color: var(--navy-600); cursor: pointer; }
.bill-table tr.is-blocked td { background: #fffdf7; }
.bill-table tr.is-blocked .cell-title, .bill-table tr.is-blocked .num { color: var(--ink-500); }
.bill-table .status-dot { display: flex; white-space: normal; margin-bottom: 2px; }
.receive-help { margin: 0 0 8px; }
@media (max-width: 1180px) {
  .app .table.is-stack tr.is-blocked { background: #fffdf7; }
  .app .table.is-stack tr.is-blocked td { background: none; }
  /* largura fixa das colunas (ex.: ações = 1%) não vale no cartão — era o "tracinho" acima dos ícones */
  .app .table.is-stack td { width: auto !important; background: none !important; }
  .app .table.is-stack tr { position: relative; }
  .app .table.is-stack tr.is-late { background: #fffafa; border-color: #f3d4d5; }
  /* seleção: no rodapé, à direita, na mesma linha dos ícones de ação */
  .app .table.is-stack td.col-check { position: absolute; right: 16px; bottom: 12px; padding: 0; }
  .app .table.is-stack td.col-check::before { display: none; }
}

/* lote */
.lotesteps { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0 0 18px; padding: 0; counter-reset: s; }
.lotesteps li { position: relative; padding: 0 12px 0 34px; counter-increment: s; }
.lotesteps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 1.5px solid var(--ink-300); color: var(--ink-500); font: 600 12px var(--font-body); }
.lotesteps li::after { content: ""; position: absolute; left: 30px; right: 12px; top: 12px; height: 0; }
.lotesteps strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink-500); }
.lotesteps small { font-size: 12.5px; color: var(--ink-500); }
.lotesteps li.is-done::before { content: "✓"; background: var(--green-600); border-color: var(--green-600); color: #fff; }
.lotesteps li.is-done strong { color: var(--ink-900); }
.lotesteps li.is-current::before { border-color: var(--navy-600); color: var(--navy-600); box-shadow: 0 0 0 3px rgba(26,63,148,.15); }
.lotesteps li.is-current strong { color: var(--navy-700); }
.lotesteps li.is-late::before { border-color: var(--red-600); color: var(--red-600); box-shadow: 0 0 0 3px rgba(228,16,23,.12); }
.lotesteps li.is-late small { color: var(--red-700); }
.lote-total { margin: 12px 0 0; text-align: right; font-size: 14px; color: var(--ink-500); }
.lote-total strong { color: var(--ink-900); font-size: 16px; margin-left: 4px; }
.danger-zone { display: flex; gap: 20px; justify-content: flex-end; margin-top: -6px; }
.link--danger { color: var(--red-700); }

/* recebimento */
.receive-top { display: grid; grid-template-columns: 200px 220px 1fr; gap: 20px; align-items: end; margin-bottom: 14px; }
.receive-top .field { margin: 0; }
.receive-top .hint { margin: 0 0 8px; }
.money--sm { max-width: 150px; margin-left: auto; height: 38px; }
.money--sm .input-plain { height: 36px; text-align: right; padding-right: 10px; }
.receive-table td { vertical-align: middle; }
.receive-table [data-motivo] { height: 38px; }
.receive-table tr.is-glosa td { background: #fffaf0; }
.receive-table tr.is-glosa [data-motivo] { border-color: #e09400; background: #fff; }
.receive-table tr.has-error [data-motivo] { border-color: var(--red-600); }
.receive-sum { display: flex; justify-content: flex-end; gap: 28px; margin: 14px 0 0; font-size: 14px; color: var(--ink-500); }
.receive-sum strong { margin-left: 6px; font-size: 16px; color: var(--ink-900); }

/* glosas */
.glosa-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; width: 100%; margin: 14px 0 4px; box-sizing: border-box; }
.glosa-opts .seg__btn { width: 100%; min-width: 0; height: auto; min-height: 36px; padding: 6px 8px; white-space: normal; line-height: 1.2; text-align: center; cursor: pointer; }
#dlg-glosa { width: min(440px, calc(100% - 32px)); }
#dlg-glosa .field, #dlg-glosa .hint { margin-top: 16px; }
#dlg-glosa .dialog__buttons { margin-top: 20px; }
.seg--text .seg__btn:has(input:checked) { background: var(--navy-600); color: #fff; }

@media (max-width: 900px) {
  .flow__side { margin-left: 0; }
  .flow__steps { flex-wrap: wrap; }
  .receive-top { grid-template-columns: 1fr; }
  .lotesteps { grid-template-columns: 1fr; gap: 12px; }
}

/* =====================================================================
   Contas a pagar / a receber e fluxo de caixa (2026-10-12)
   ===================================================================== */
.monthnav { display: flex; align-items: center; gap: 6px; }
.monthnav strong { min-width: 120px; text-align: center; font: 600 14.5px var(--font-body); color: var(--ink-900); }
.monthnav .icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.cat-filter { width: auto; min-width: 200px; height: 40px; }
.app .toolbar .search { flex: 1; min-width: 220px; }
.bills tr.is-late td { background: #fffafa; }
.due-day { font-weight: 600; color: var(--ink-900); }
.act--ok:hover, .act--ok:focus-visible { background: var(--green-50); color: var(--green-600); border-color: #bbf0cf; }

/* barra de ação em lote: fixa no rodapé enquanto houver seleção */
.bulkbar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 16px; justify-content: space-between;
  margin-top: 14px; padding: 10px 12px 10px 18px; background: var(--navy-900); color: #fff; border-radius: 8px;
  box-shadow: 0 10px 30px -12px rgba(10,31,79,.6); font-size: 14px; font-weight: 500; }
.bulkbar .btn--primary.btn--sm { background: #fff; color: var(--navy-700); }
.bulkbar .btn--primary.btn--sm:hover { background: var(--navy-50); box-shadow: none; }

/* baixa */
.baixa-grid { margin-top: 8px; }
.baixa-grid .field { margin: 0; }
.baixa-hint { min-height: 22px; }
.dialog .money .input-plain { height: 40px; }

/* novo lançamento: única / parcelada / repetir */
.repeat { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.repeat__label { font: 500 13px var(--font-body); color: var(--ink-500); }
.repeat__vezes { display: flex; align-items: center; gap: 8px; }
.repeat__vezes .input-plain { width: 80px; height: 36px; }
.repeat__vezes.has-error .input-plain { border-color: var(--red-600); }
.repeat__preview { margin: 0; flex-basis: 100%; }
.repeat .seg--text .seg__btn { cursor: pointer; }

/* fluxo de caixa */
.cashchart { position: relative; margin: 4px 0 8px; }
.cashchart svg { display: block; width: 100%; height: auto; overflow: visible; }
.cc-grid { stroke: var(--line); stroke-width: 1; }
.cc-zero { stroke: var(--ink-500); stroke-width: 1; }
.cc-ylab, .cc-xlab { font: 400 11px var(--font-body); fill: var(--ink-500); }
.cc-line { fill: none; stroke: var(--navy-600); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cc-neg { fill: var(--red-600); stroke: #fff; stroke-width: 2; }
.cc-dot { fill: #fff; stroke: var(--navy-600); stroke-width: 2; }
.cc-cross { stroke: var(--ink-300); stroke-width: 1; }
.cc-last { font: 600 11.5px var(--font-body); fill: var(--ink-900); }
.cashchart__tip { position: absolute; top: 0; width: 190px; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: #fff;
  border: 1px solid #d5dce8; border-radius: 6px; box-shadow: 0 8px 20px -10px rgba(15,23,42,.35); font-size: 12.5px; color: var(--ink-500); pointer-events: none; }
.cashchart__tip strong { color: var(--ink-900); font-size: 13px; margin-bottom: 2px; }
.cashchart__tip b { color: var(--ink-900); font-weight: 600; }
.cashtable summary { cursor: pointer; font-size: 13.5px; color: var(--navy-600); margin: 6px 0 10px; }
.acct { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.acct:first-of-type { border-top: 0; }
.acct span:first-child { display: flex; flex-direction: column; }
.acct small { color: var(--ink-500); font-size: 12.5px; }
.acct__v { font: 600 15px var(--font-body); color: var(--ink-900); white-space: nowrap; }
@media (max-width: 760px) {
  .cat-filter { width: 100%; }
  .bulkbar { flex-direction: column; align-items: stretch; text-align: center; }
}

/* =====================================================================
   Frota e Equipe (2026-10-12)
   ===================================================================== */
.status-dot--info { color: var(--navy-600); }
.status-dot--info::before { background: var(--sky-400); }
.txt-ok { color: var(--green-600); font-weight: 500; }
.h1-sub { font-weight: 400; font-size: .8em; }
.kpi-small { font-size: 17px !important; }
.senha { font-size: 15px; color: var(--ink-900); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }

/* "Atenção agora": lista curta que leva direto ao problema */
.attention .panel__title { display: flex; align-items: center; }
.attention__list { list-style: none; margin: 0; padding: 0; }
.attention__list a { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; align-items: center; gap: 12px;
  padding: 9px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.attention__list li:first-child a { border-top: 0; }
.attention__list a:hover { background: var(--surface-2); }
.attention__list .icon { color: var(--ink-300); width: 16px; height: 16px; }
.attention__list .status-dot strong { color: var(--ink-900); font-weight: 600; }
.attention__more summary { cursor: pointer; font-size: 13.5px; color: var(--navy-600); margin-top: 8px; }

/* cartões das viaturas */
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.vcard { display: flex; flex-direction: column; padding: 16px 18px; background: #fff; border: 1px solid #e3e8f0; border-radius: 8px; }
.vcard:hover { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(26,63,148,.1); }
.vcard.is-off { opacity: .6; }
.vcard__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vcard__code { font: 700 19px var(--font-body); color: var(--ink-900); }
.vcard__sub { margin: 2px 0 12px; font-size: 13px; color: var(--ink-500); }
.vcard__facts { margin: 0; display: grid; gap: 7px; }
.vcard__facts div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; font-size: 13.5px; }
.vcard__facts dt { color: var(--ink-500); }
.vcard__facts dd { margin: 0; color: var(--ink-900); min-width: 0; }
.vcard__foot { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.vcard--add { align-items: center; justify-content: center; gap: 8px; min-height: 200px; border-style: dashed; color: var(--ink-500); font-weight: 500; }
.vcard--add .icon { width: 26px; height: 26px; }
.vcard--add:hover { color: var(--navy-600); }

.att-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.att-line:first-of-type { border-top: 0; }
.att-line .status-dot { white-space: normal; }
.facts-list { margin: 0; display: grid; gap: 6px; }
.facts-list div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 14px; }
.facts-list dt { color: var(--ink-500); }
.facts-list dd { margin: 0; }

/* checklist (celular) */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pick { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: #fff; border: 1px solid #e3e8f0; border-radius: 8px; }
.pick strong { font-size: 18px; color: var(--ink-900); }
.pick small { color: var(--ink-500); }
.pick:hover { border-color: var(--navy-600); }
.pick.is-done { background: #fbfefc; }
.checklist { max-width: 760px; }
.checklist__bar { display: flex; justify-content: space-between; margin: 10px 0 0; }
.fuel { display: flex; flex-wrap: wrap; }
.fuel .seg__btn { cursor: pointer; }
.fuel-check { display: flex; flex-wrap: wrap; gap: 8px 20px; min-height: 44px; align-items: center; }
.fuel-check .toggle-line { cursor: pointer; white-space: nowrap; }
.fuel-check input { width: 20px; height: 20px; }
.ck-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ck-item:first-of-type { border-top: 0; }
.ck-item__name { font-size: 15px; color: var(--ink-900); }
.ck-item__opts { display: flex; gap: 6px; }
.ck-opt { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 92px; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 6px; font: 500 14px var(--font-body); color: var(--ink-500); cursor: pointer; background: #fff; }
.ck-opt input { position: absolute; opacity: 0; }
.ck-opt--ok:has(input:checked) { background: var(--green-50); border-color: var(--green-600); color: var(--green-600); font-weight: 600; }
.ck-opt--bad:has(input:checked) { background: var(--red-50); border-color: var(--red-600); color: var(--red-700); font-weight: 600; }
.ck-opt:has(input:focus-visible) { outline: 3px solid var(--sky-400); outline-offset: 2px; }
.ck-item__desc { grid-column: 1 / -1; border-color: var(--red-600); }
@media (max-width: 760px) {
  .attention__list a { grid-template-columns: 1fr auto; }
  .attention__list a > span:nth-child(2) { grid-column: 1; }
  .ck-item { grid-template-columns: 1fr; }
  .ck-opt { flex: 1; }
  .ck-item__opts { width: 100%; }
}


/* =====================================================================
   Check-in / Checkout (2026-10-12)
   ===================================================================== */
.ci-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ci-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: #fff; border: 1px solid #e3e8f0; border-radius: 8px; border-top: 3px solid var(--ink-300); }
.ci-card--livre { border-top-color: var(--green-600); }
.ci-card--em_uso { border-top-color: var(--sky-400); }
.ci-card--checkin, .ci-card--checkout { border-top-color: #e09400; }
.ci-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ci-card__vtr { font: 700 20px var(--font-body); color: var(--ink-900); }
.ci-card__sub { margin: -6px 0 0; font-size: 13px; color: var(--ink-500); }
.ci-card p.small { margin: 0; }
.ci-card .btn--block { min-height: 48px; }
.ci-facts { margin: 0; display: grid; gap: 4px; font-size: 13.5px; }
.ci-facts div { display: grid; grid-template-columns: 100px 1fr; gap: 8px; }
.ci-facts dt { color: var(--ink-500); }
.ci-facts dd { margin: 0; }
.ci-lock { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--ink-500); }
.ci-lock .icon { width: 14px; height: 14px; }
.ci-card__acoes { display: grid; grid-template-rows: auto 40px; gap: 8px; margin-top: auto; padding-top: 4px; }  /* linha do "Fazer depois" sempre reservada: botões principais alinhados entre os cartões */
.ci-fd { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13.5px; line-height: 1.35; }
.ci-fd .icon { width: 16px; height: 16px; margin-top: 1px; }
.ci-fd span { display: grid; gap: 2px; }
.ci-fd strong { font-weight: 600; }
.ci-fd small { font-size: 12.5px; opacity: .85; }
.ci-fd--danger { color: var(--red-700); }
.ci-fd--warn { color: var(--amber-600); }
.ci-card .ci-fd-btn { min-height: 40px; font-size: 14px; white-space: nowrap; }
.ci-fd-btn small { font: 500 13px var(--font-body); color: var(--ink-500); }
.ci-fd-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.ci-fd-box form .btn--block { width: auto; }
.ci-card .link { align-self: flex-start; background: none; border: 0; cursor: pointer; }

.ci-req__list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; counter-reset: r; }
.ci-req__list li { position: relative; padding-left: 32px; font-size: 14.5px; counter-increment: r; }
.ci-req__list li::before { content: counter(r); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--ink-300); color: var(--ink-500); font: 600 12px var(--font-body); }
.ci-req__list li.is-ok::before { content: "✓"; background: var(--green-600); border-color: var(--green-600); color: #fff; }
.ci-req__list li.is-ok a { color: var(--ink-500); text-decoration: line-through; }
.ci-req__list a { color: var(--ink-900); }
.ci-req__list a:hover { color: var(--navy-600); }
.ci-req .btn[disabled] { opacity: .45; }
.ci-probs { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.ci-probs ul { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.ci-probs .status-dot { white-space: normal; }

.ci-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 14px; }
.ci-upload label.btn { cursor: pointer; }
.ci-upload.is-sending label { opacity: .5; pointer-events: none; }
.ci-upload__msg { font-size: 13.5px; color: var(--navy-600); font-weight: 500; }
.ci-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ci-media { margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.ci-media video, .ci-media img { display: block; width: 100%; height: 150px; object-fit: cover; background: #0f172a; }
.ci-media figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 8px; font-size: 12px; color: var(--ink-500); }
.ci-media figcaption form { display: inline; }
.ci-empty { margin: 0; padding: 18px; border: 1.5px dashed var(--ink-300); border-radius: 6px; color: var(--ink-500); text-align: center; grid-column: 1 / -1; }

.ci-grupo { margin: 18px 0 2px; font: 600 12px var(--font-body); color: var(--ink-500); text-transform: uppercase; letter-spacing: .03em; }
.ci-crit { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 3px; background: var(--red-50); color: var(--red-700); font-size: 10.5px; font-weight: 600; vertical-align: middle; }
.ci-sign { margin: 18px 0 14px; }
.ci-sign .sign__pad { height: 170px; }
.ci-espera { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 6px; background: var(--surface-2); font-size: 14px; }
.ci-espera .icon { color: var(--ink-500); }
.ci-resumo p { margin: 4px 0; font-size: 14px; }
.ci-assinado { display: flex; align-items: center; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ci-assinado img { height: 60px; max-width: 200px; object-fit: contain; border-bottom: 1px solid var(--ink-300); }
.ci-assinado small { color: var(--ink-500); }

.ci-pergunta { text-align: center; }
.ci-rendicao { text-align: left; }
.ci-rendicao .field { margin-bottom: 12px; }
.ci-rendicao-aviso { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--navy-600); background: var(--surface-2); font-size: 14px; }
.ci-pergunta h2 { font-size: 19px; margin: 8px 0 6px; }
.ci-pergunta__icon { width: 40px; height: 40px; color: var(--red-600); }
.ci-pergunta__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 10px; }
.ci-pergunta__btns .btn { min-height: 56px; font-size: 17px; }
.ci-btn-sim { border-color: var(--red-600) !important; color: var(--red-700) !important; }
.ci-pergunta .link { background: none; border: 0; cursor: pointer; }

/* Check-in no tablet da VTR (2026-10-12): quem confere se identifica com nome + senha */
.ci-quem { border: 0; margin: 4px 0 14px; padding: 0; }
.ci-quem legend { font: 600 14px var(--font-body); color: var(--ink-900); margin-bottom: 8px; }
.ci-quem__lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ci-quem__item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-height: 56px; }
.ci-quem__item input { width: 20px; height: 20px; accent-color: var(--navy-600); }
.ci-quem__item span { display: flex; flex-direction: column; }
.ci-quem__item small { color: var(--ink-500); font-size: 12.5px; }
.ci-quem__item:has(input:checked) { border-color: var(--navy-600); background: var(--navy-50); box-shadow: 0 0 0 2px rgba(26,63,148,.15); }
.ci-confirma { margin-top: 18px; max-width: 420px; }
.ci-confirma .input-plain { height: 48px; font-size: 16px; }

/* Check-in no perfil do motorista (2026-10-12) */
.ci-card__head { flex-wrap: nowrap; }
.ci-card__vtr { white-space: nowrap; flex-shrink: 0; }
.ci-card__head .status-dot { white-space: normal; text-align: right; font-size: 12.5px; }
.ci-eu { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 12px 14px; border-radius: 8px; background: var(--navy-50); color: var(--navy-700); font-size: 14.5px; }
.ci-eu small { color: var(--ink-500); }

/* Check-in: dois módulos separados — Veículo e Material (2026-10-12) */
.ci-mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.ci-mod { display: flex; align-items: center; gap: 18px; padding: 22px; background: #fff; border: 1px solid #e3e8f0; border-left: 4px solid #e09400; border-radius: 8px; min-height: 130px; }
.ci-mod.is-ok { border-left-color: var(--green-600); }
.ci-mod:hover { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(26,63,148,.1); }
.ci-mod__icon { display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 8px; background: var(--navy-50); color: var(--navy-600); }
.ci-mod__icon .icon { width: 34px; height: 34px; stroke-width: 1.6; }
.ci-mod.is-ok .ci-mod__icon { background: var(--green-50); color: var(--green-600); }
.ci-mod__txt { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.ci-mod__txt strong { font: 700 20px var(--font-body); color: var(--ink-900); }
.ci-mod__txt small { color: var(--ink-500); font-size: 13px; margin-bottom: 4px; }
.ci-mod__txt .status-dot { white-space: normal; }
.ci-mod__go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy-600); white-space: nowrap; }
.ci-req__msg { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14.5px; color: var(--ink-700); }
.ci-req__msg .icon { color: var(--ink-500); }
.ci-req__msg.is-ok { color: var(--green-600); font-weight: 500; }
.ci-req__msg.is-ok .icon { color: var(--green-600); }
.ci-voltar { margin-top: 4px; }
@media (max-width: 760px) { .ci-mods { grid-template-columns: 1fr; } .ci-mod__go { display: none; } }

/* Check-in: respostas como no papel — Conforme / Não conforme e pneus Bom / Regular / Ruim (2026-10-12) */
.ck-opt--mid:has(input:checked) { background: var(--amber-50); border-color: #e09400; color: var(--amber-600); font-weight: 600; }
.ck-item__opts:has(.ck-opt--mid) .ck-opt { min-width: 74px; }
.ci-anot { margin-top: 18px; }

/* Material do check-in: colunas do papel (Qtd / Nº série) — 2026-10-12 */
.ck-item { grid-template-columns: 1fr auto auto; }
.ck-item__x { width: 70px; height: 40px; text-align: center; padding: 0 6px; }
.ck-item__x--serie { width: 160px; text-align: left; }
@media (max-width: 760px) { .ck-item__x, .ck-item__x--serie { width: 100%; } }

/* Check-in: aviso de vídeo pendente no checklist do veículo */
.ci-falta-video { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 6px; background: var(--amber-50); color: var(--amber-600); font-size: 14px; }
.ci-falta-video .icon { flex-shrink: 0; margin-top: 2px; }

/* ---------------------------------------------------------------- Faturamento (2026-10-20): abas, caminho, fechamentos */
.fat-tabs { display: flex; gap: 2px; margin: -4px 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.fat-tabs__item { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; font: 500 14px var(--font-body); color: var(--ink-500); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.fat-tabs__item:hover { color: var(--ink-900); }
.fat-tabs__item.is-active { color: var(--navy-700); font-weight: 600; border-bottom-color: var(--navy-600); }
.fat-tabs__c { min-width: 20px; padding: 0 6px; border-radius: 4px; background: var(--navy-600); color: #fff; font: 600 12px/20px var(--font-body); text-align: center; }
.fat-tabs__c--warn { background: #e09400; color: #fff; }

/* caminho do atendimento: Faturado › Enviado › Pago (também é o filtro) */
.stages { display: flex; align-items: stretch; margin-bottom: 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stages__flow { display: flex; flex: 1; list-style: none; margin: 0; padding: 0; }
.stages__flow li { flex: 1; display: flex; min-width: 0; }
.stages__item { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; color: var(--ink-700); position: relative; min-width: 0; }
.stages__item small { font-size: 13px; color: var(--ink-500); }
.stages__item strong { font: 600 20px/1.25 var(--font-body); color: var(--ink-900); font-variant-numeric: tabular-nums; }
.stages__item em { font-style: normal; font-size: 12.5px; color: var(--ink-500); }
.stages__item--all, .stages__item--side { flex: 0 0 auto; min-width: 104px; }
.stages__item--all { border-right: 1px solid var(--line); }
.stages__item--side { border-left: 1px solid var(--line); }
.stages__flow li + li .stages__item { border-left: 1px solid var(--line); padding-left: 30px; }
.stages__flow li + li .stages__item::before { content: "›"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--ink-300); }
.stages__item:hover { background: var(--surface-2); }
.stages__item.is-active { background: var(--navy-50); box-shadow: inset 0 -2px 0 var(--navy-600); }
.stages__item.is-active small { color: var(--navy-700); font-weight: 600; }
.stages__item--warn small, .stages__item--warn strong { color: var(--amber-600); }

.fat-filter { width: auto; min-width: 200px; }
.fat-dates { display: inline-flex; align-items: center; gap: 8px; }
.fat-dates .input-plain { width: auto; }
.fat-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: var(--ink-500); }
.fat-foot strong { color: var(--ink-900); }
.pager { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }

/* fechamentos: um cartão por convênio com os períodos de corte */
.fat-section { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 12px; font: 600 16px var(--font-body); color: var(--ink-900); }
.fat-section small { font-weight: 400; font-size: 13px; color: var(--ink-500); }
.fat-section + .panel, .closing-grid + .fat-section { margin-top: 0; }
.closing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; margin-bottom: 28px; }
.closing { margin: 0; padding: 14px 16px; border-left: 3px solid transparent; }
.closing--due { border-left-color: #e09400; }
.closing__head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.closing__head > div { flex: 1; min-width: 0; }
.closing__name { margin: 0; font: 600 15px var(--font-body); color: var(--ink-900); }
.closing__meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-500); }
.closing__periods { list-style: none; margin: 0; padding: 0; }
.period { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.period__info { display: flex; flex-direction: column; min-width: 0; }
.period__info strong { font-weight: 600; font-size: 14px; color: var(--ink-900); }
.period__info small { font-size: 12.5px; color: var(--ink-500); }
.period__v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* exportar relatório */
.report-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.report-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-900); }
.report-opt:hover { border-color: var(--navy-600); background: var(--surface-2); }
.report-opt.is-default { border-color: var(--navy-600); }
.report-opt .icon { width: 20px; height: 20px; color: var(--navy-600); }
.report-opt span { display: flex; flex-direction: column; }
.report-opt small { font-size: 12.5px; color: var(--navy-600); }

@media (max-width: 900px) {
  .stages { flex-wrap: wrap; }
  .stages__flow { order: 3; flex-basis: 100%; border-top: 1px solid var(--line); }
  .stages__item--all { flex: 1; }
  .stages__item { padding: 10px 12px; }
  .stages__flow li + li .stages__item { padding-left: 22px; }
  .stages__flow li + li .stages__item::before { left: 6px; }
  .stages__item strong { font-size: 16px; }
  .closing-grid { grid-template-columns: 1fr; }
  .fat-filter { flex: 1 1 100%; }
  .fat-dates { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .fat-dates .input-plain { flex: 1; min-width: 0; width: 100%; }
}
@media (max-width: 560px) {
  .period { grid-template-columns: 1fr auto; }
  .period form { grid-column: 1 / -1; }
  .period form .btn { width: 100%; }
}

/* detalhe da remoção: editar todos os horários de uma vez */
.is-steps-editing > .steps-table, .is-steps-editing > .steps-foot { display: none; }
.steps-foot--edit { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.steps-foot--edit .muted { margin-right: auto; }

/* filtros com rótulo (lista de remoções) */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.filters__field select.input-plain { width: 150px; }
.filters__field--date .input-plain { width: 140px; }
.filters__field { display: flex; flex-direction: column; gap: 4px; }
.filters__field--grow { flex: 1 1 160px; min-width: 140px; }

.filters__field label { font: 500 12.5px var(--font-body); color: var(--ink-500); }
.filters__field .input-plain { height: 38px; padding-top: 0; padding-bottom: 0; }
.filters__actions { display: flex; align-items: center; gap: 12px; height: 38px; }
.big-value--sm { font-size: 18px; }
@media (max-width: 900px) {
  .filters__field { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .filters__field--grow { flex-basis: 100%; }
  .filters__field select.input-plain, .filters__field--date .input-plain { width: 100%; }
}

/* diálogo de cancelamento: trajeto da remoção */
.cancel-trip { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); display: grid; gap: 6px; }
.cancel-trip div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; font-size: 13.5px; }
.cancel-trip dt { color: var(--ink-500); }
.cancel-trip dd { margin: 0; color: var(--ink-900); }

/* próxima etapa (detalhe): mostra "—" até clicar em Registrar */
.row-next .edit { display: none; }
.row-next.is-editing .edit { display: inline-flex; }
.row-next.is-editing input.edit { display: inline-block; }
.row-next.is-editing .view { display: none; }

/* hora parada em horas e minutos */
.hm-pop { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hm-pop .field { margin-top: 10px; }
.hm-fields { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.hm-fields label { font: 500 13px var(--font-body); color: var(--ink-500); margin: 0; }
.hm-fields .input-plain { width: 80px; }
.hm-fields--row { margin: 0; }
.hm-fields--row .input-plain { width: 72px; }
.row-parada td { background: var(--surface-2); }

/* equipe da remoção: campos com busca por função */
.combo { position: relative; }
.combo .suggest { top: calc(100% - 2px); }
.combo .suggest li.muted { cursor: default; color: var(--ink-500); }
/* respiro entre Viatura/Base, a equipe e as observações */
.grid[data-team] { margin: 18px 0; }
.grid[data-team] + [data-team-alert] { margin: -6px 0 18px; }

/* Listas (select) e campos com sugestões: a MESMA seta à direita em todo o sistema (2026-10-21) */
select.input-plain, .input-plain.input-combo, select.input-plain:focus, .input-plain.input-combo:focus {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1d3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 14px center !important; background-size: 14px !important;
}
select.input-plain[multiple] { background-image: none !important; padding-right: 12px; }
.combo-wrap { position: relative; width: 100%; }
.combo-wrap .suggest { top: calc(100% + 4px); max-height: 260px; }
.combo-wrap .suggest li { padding: 9px 12px; font-size: 14.5px; color: var(--ink-900); }
/* Escala de plantão: botões "Avisar a equipe" pelo WhatsApp */
.aviso-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.aviso-lista form { margin: 0; }

/* RH (2026-10-23): totais de grade viram cartão estranho no tablet/celular — os totais já ficam nos indicadores;
   botões do topo quebram linha no celular em vez de sair da tela */
@media (max-width: 1180px) { .app .table.is-stack tfoot { display: none; } }
@media (max-width: 700px) { .page-head__actions { flex-wrap: wrap; justify-content: flex-start; } }
