/* ===== Controle de Diárias — visual 1.1 ===== */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --ink: #0f172a; --ink2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e7eaf0; --line2: #d6dbe5;
  --brand: #2f55d4; --brand-deep: #1e3a9e; --brand-soft: #eef2ff; --brand-line: #c9d5fb;
  --side: #0b1220; --side2: #111a2e;
  --bad: #b42343; --bad-soft: #fde8ed; --ok: #16794a; --ok-soft: #e3f6ec; --warn: #9a5b00; --warn-soft: #fff4dc;
  --r: 12px;
  --sh1: 0 1px 2px rgba(15,23,42,.05), 0 1px 1px rgba(15,23,42,.03);
  --sh2: 0 12px 32px -12px rgba(15,23,42,.18), 0 3px 8px rgba(15,23,42,.06);
  --mono: "Cascadia Mono", Consolas, monospace;
}
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.5 "Inter", "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ic { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- estrutura ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.side { background: linear-gradient(180deg, var(--side) 0%, var(--side2) 100%); color: #c3cbdb; display: flex; flex-direction: column; padding: 22px 14px 16px; gap: 2px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 10px 22px; }
.mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, #4a72ff, #2342b8); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -6px rgba(74,114,255,.7); }
.brand b { display: block; color: #fff; font-size: 15px; font-weight: 650; letter-spacing: -.1px; line-height: 1.15; }
.brand small { display: block; color: #7f8aa3; font-size: 11.5px; margin-top: 2px; }
.navlabel { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #5d6985; padding: 6px 12px 8px; }
.nav { position: relative; background: none; border: 0; text-align: left; padding: 9px 12px; border-radius: 9px; color: inherit; cursor: pointer; display: flex; gap: 11px; align-items: center; font-weight: 500; transition: background .15s, color .15s; }
.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav.on { background: rgba(74,114,255,.18); color: #fff; }
.nav.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #6f8dff; }
.nav.on .ic { color: #8ea6ff; }
.side .spacer { flex: 1; }
.usercard { display: flex; align-items: center; gap: 11px; padding: 12px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(145deg, #3a4a73, #26304d); color: #dbe4ff; display: grid; place-items: center; font-weight: 650; font-size: 13px; flex: none; }
.usercard .nome { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usercard .papel { font-size: 11.5px; color: #7f8aa3; }
.usercard .info { min-width: 0; flex: 1; }
.sair { background: none; border: 0; color: #8a95ad; cursor: pointer; padding: 7px; border-radius: 8px; }
.sair:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 20px 32px 16px; }
.topbar h1 { font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; }
.topbar .sub { color: var(--muted); margin-top: 3px; font-size: 13.5px; }
.topbar .grow { flex: 1; }
.acoes { display: flex; gap: 8px; align-items: center; }
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.dot.off { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }
.content { padding: 4px 32px 32px; overflow: auto; flex: 1; }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line2); background: var(--surface); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 550; font-size: 13.5px; box-shadow: var(--sh1); transition: background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: #f8fafc; border-color: #c2c9d6; }
.btn.primary { background: linear-gradient(180deg, #3a60e0, var(--brand)); border-color: var(--brand-deep); color: #fff; box-shadow: 0 1px 2px rgba(30,58,158,.35), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { background: linear-gradient(180deg, #3257d6, #2749bd); }
.btn.danger { color: var(--bad); border-color: #f1bcc7; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { padding: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { border: 1px solid var(--line2); background: #fff; border-radius: 10px; padding: 8px 11px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #bcc4d3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,85,212,.15); }
input:disabled { background: #f4f6f9; color: var(--muted); }
textarea { resize: vertical; min-height: 66px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); margin-bottom: 5px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh1); }
.pad { padding: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- filtros ---------- */
.filtros { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.filtros > div { min-width: 132px; }
.filtros .busca { flex: 1; min-width: 260px; position: relative; }
.filtros .busca .ic { position: absolute; left: 12px; bottom: 11px; color: var(--faint); pointer-events: none; }
.filtros .busca input { padding-left: 36px; }
.filtros label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* ---------- resumo ---------- */
.resumo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-bottom: 16px; overflow: hidden; }
.resumo > div { padding: 14px 20px; border-right: 1px solid var(--line); }
.resumo > div:last-child { border-right: 0; }
.resumo .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.resumo .v { font-size: 20px; font-weight: 700; letter-spacing: -.3px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.resumo .v.emp { color: var(--brand); }
@media (max-width: 1000px) { .resumo { grid-template-columns: repeat(2, 1fr); } }

/* ---------- tabela ---------- */
.tablewrap { overflow: auto; max-height: calc(100vh - 330px); border-radius: var(--r); }
table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--surface); }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; background: #fafbfd; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; cursor: pointer; user-select: none; border-bottom: 1px solid var(--line2); }
th:hover { color: var(--ink); }
th .seta { color: var(--brand); margin-left: 4px; }
th.num, td.num { text-align: right; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: #f6f8ff; }
tbody tr:last-child td { border-bottom: 0; }
td .l1 { font-size: 13.5px; font-weight: 550; color: var(--ink); max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
td .l2 { font-size: 12px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.vazio { color: var(--faint); }
td.num .forte { font-weight: 700; }
td.num .emp { color: var(--brand); font-weight: 600; }
.empty { padding: 56px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink2); font-size: 15px; margin-bottom: 4px; }

/* ---------- status (pílulas) ---------- */
.c-amber { --c: #9a5b00; --bg: #fff4dc; }
.c-violet { --c: #5b3fd1; --bg: #efeaff; }
.c-cyan { --c: #0b6b82; --bg: #e1f5f9; }
.c-rose { --c: #b42343; --bg: #fde8ed; }
.c-green { --c: #16794a; --bg: #e3f6ec; }
.c-slate { --c: #475569; --bg: #eef1f5; }
.c-none { --c: #94a3b8; --bg: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--c); background: var(--bg); white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
select.st { appearance: none; -webkit-appearance: none; field-sizing: content; width: auto; min-width: 0; border-radius: 999px; padding: 4px 26px 4px 22px; font-size: 12px; font-weight: 600; color: var(--c); background-color: var(--bg);
  border: 1px solid color-mix(in srgb, var(--c) 24%, transparent); cursor: pointer;
  background-image: radial-gradient(circle, var(--c) 0 3px, transparent 3.6px), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat; background-position: left 9px center, right 9px center; background-size: 8px 8px, 10px 10px; }
select.st.c-none { border-style: dashed; }
select.st:hover { border-color: var(--c); }
select.st option { color: var(--ink); background: #fff; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(11,18,32,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 20; animation: fade .15s ease-out; }
.modal { background: var(--surface); border-radius: 16px; width: min(960px, 100%); max-height: 94vh; display: flex; flex-direction: column; box-shadow: var(--sh2); animation: sobe .18s ease-out; }
.modal.narrow { width: min(480px, 100%); }
.modal header { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal header h2 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.modal .body { padding: 20px 24px; overflow: auto; }
.modal footer { padding: 14px 24px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 16px 16px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.modal footer .left { margin-right: auto; }
.x { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; padding: 4px 9px; border-radius: 8px; }
.x:hover { background: #f1f4f9; color: var(--ink); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sobe { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(6, 1fr); }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c6 { grid-column: span 6; }
.sect { grid-column: span 6; display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-top: 8px; }
.sect::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.check { display: flex; gap: 9px; align-items: center; font-size: 13px; font-weight: 500; margin: 0; cursor: pointer; }
.check input { width: 17px; height: 17px; padding: 0; accent-color: var(--brand); }

/* ---------- cálculo ---------- */
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; background: linear-gradient(135deg, #f4f7ff, #eaf0ff); border: 1px solid var(--brand-line); border-radius: 14px; padding: 18px 22px; }
.calc .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #53628a; font-weight: 650; }
.calc .big { font-size: 34px; font-weight: 750; letter-spacing: -1px; line-height: 1.1; margin: 4px 0 12px; font-variant-numeric: tabular-nums; color: var(--ink); }
.splitbar { height: 7px; border-radius: 99px; background: #f0b429; overflow: hidden; }
.splitbar i { display: block; height: 100%; background: var(--brand); border-radius: 99px 0 0 99px; }
.split { display: flex; gap: 22px; margin-top: 10px; font-size: 12.5px; color: var(--ink2); flex-wrap: wrap; }
.split b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.split .dot2 { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.split .m .dot2 { background: var(--brand); } .split .e .dot2 { background: #f0b429; }
.calc-det { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 0; }
.calc-det dt { font-size: 11.5px; color: #53628a; }
.calc-det dd { margin: 1px 0 0; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.calc.simples { display: block; }
.calc .hint { color: #53628a; }
.calc .err { color: var(--bad); font-weight: 600; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }

/* ---------- painel ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.stat .k { color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.stat .v { font-size: 26px; font-weight: 750; letter-spacing: -.6px; margin-top: 2px; font-variant-numeric: tabular-nums; grid-column: 1; }
.stat .s { color: var(--muted); font-size: 12.5px; grid-column: 1 / -1; }
.stat .chip { grid-row: 1 / span 2; grid-column: 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--c); background: var(--bg); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 1150px) { .two { grid-template-columns: 1fr; } }
.card h3 { font-size: 14px; font-weight: 650; margin-bottom: 14px; }
.card table { background: transparent; }
.card table th { position: static; cursor: default; }
.card table tr { cursor: default; }
.card table tr:hover { background: transparent; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 74px 1fr 110px; gap: 12px; align-items: center; font-size: 13px; }
.bar .track { background: #eef1f6; border-radius: 6px; height: 14px; overflow: hidden; display: flex; }
.seg-p { background: #22a06b; } .seg-q { background: #f0b429; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin: -4px 0 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

/* ---------- entrada (login) ---------- */
.entrada { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.entrada-marca { position: relative; overflow: hidden; color: #fff; padding: 56px 56px 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 85% -10%, rgba(111,141,255,.55), transparent 60%), radial-gradient(700px 500px at -10% 110%, rgba(240,180,41,.22), transparent 55%), linear-gradient(160deg, #0d1630, #14246b 70%, #1b3199); }
.entrada-marca .brand b { font-size: 17px; }
.entrada-marca h2 { font-size: 38px; line-height: 1.1; font-weight: 750; letter-spacing: -1.2px; max-width: 440px; }
.entrada-marca p { color: #b9c5ee; margin-top: 14px; max-width: 420px; font-size: 15px; }
.entrada-marca ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; color: #cfd8f7; font-size: 13.5px; }
.entrada-marca li { display: flex; gap: 11px; align-items: center; }
.entrada-marca li .ic { color: #8ea6ff; }
.entrada-form { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.box { width: min(400px, 100%); }
.box h1 { font-size: 26px; font-weight: 750; letter-spacing: -.7px; margin-bottom: 6px; }
.box > p { color: var(--muted); margin-bottom: 22px; }
.box .field { margin-bottom: 15px; }
.box .btn.primary { width: 100%; padding: 11px 14px; font-size: 14.5px; }
.box a { color: var(--brand); text-decoration: none; font-weight: 550; }
.box a:hover { text-decoration: underline; }
@media (max-width: 900px) { .entrada { grid-template-columns: 1fr; } .entrada-marca { display: none; } }
.err-msg { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 13px; margin-bottom: 14px; font-weight: 500; font-size: 13.5px; }
.err-msg.info { background: var(--brand-soft); color: var(--brand-deep); }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 12px; box-shadow: var(--sh2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: 80vw; font-weight: 500; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { #toast, .overlay, .modal, .nav, .btn { transition: none; animation: none; } }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #cfd5e1; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b3bccd; background-clip: content-box; border: 3px solid transparent; }

/* ---------- Follow up / Pulmão / anexos / e-mail ---------- */
.stt { font-weight: 600; line-height: 1.35; white-space: normal; display: block; max-width: 340px; }
.txt-verde { color: #0a8a45; } .txt-vermelho { color: #c00000; } .txt-preto { color: var(--ink); }
tbody tr.dest td { background: #fdeee4; }
tbody tr.dest:hover td { background: #fbe2d3; }
.resumo .v.ok { color: var(--ok); } .resumo .v.warn { color: #c00000; }
.clipinfo { display: flex; align-items: center; gap: 4px; color: var(--brand); }
.clipinfo .ic { flex: none; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--brand-deep); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.dropzone { border: 1.5px dashed var(--line2); border-radius: 12px; padding: 14px; background: #fbfcfe; transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.anx { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.anx.pend { border-style: dashed; }
.anx-ic { color: var(--brand); display: flex; flex: none; }
.anx-nm { flex: 1; min-width: 0; }
.anx-nm .l1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.anx-lista { display: flex; flex-direction: column; gap: 6px; }
.anx-chk { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.anx-chk .ic { color: var(--brand); flex: none; }
.navlabel { margin-top: 14px; }

body.compacto td { padding-top: 5px; padding-bottom: 5px; font-size: 12.5px; }
body.compacto .l2 { font-size: 11px; }
code { font-family: var(--mono); font-size: 12px; background: var(--bg); padding: 1px 5px; border-radius: 5px; color: var(--ink2); word-break: break-word; }

/* ---------- identidade visual Emergent Cold LatAm ---------- */
:root {
  --brand: #075b9f;
  --brand-deep: #123b63;
  --brand-soft: #eaf3fa;
  --brand-line: #c9dce9;
  --side: #10213f;
  --side2: #18395e;
  --accent: #91223e;
  --r: 14px;
  --sh1: 0 2px 8px rgba(16, 40, 61, .045);
  --sh2: 0 18px 48px -18px rgba(16, 40, 61, .28), 0 4px 12px rgba(16, 40, 61, .09);
}
body { background: #f1f4f7; }
.shell { grid-template-columns: 248px minmax(0, 1fr); }
.side {
  background: linear-gradient(180deg, #10213f 0%, #17395e 100%);
  border-right: 1px solid rgba(255,255,255,.08);
  padding: 22px 14px 15px;
}
.brand { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 0 4px 20px; }
.brand-logo { display: grid; place-items: center; min-height: 58px; padding: 8px 12px; background: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 12px; box-shadow: 0 8px 22px rgba(5,18,38,.16); }
.brand-logo img { display: block; width: 100%; max-width: 198px; max-height: 50px; object-fit: contain; }
.brand-copy { padding: 0 6px; }
.brand-copy b { display: block; color: #fff; font-size: 13px; font-weight: 750; letter-spacing: .08em; line-height: 1.3; }
.brand-copy small { display: block; color: #b6c9dd; font-size: 11px; margin-top: 2px; }
.navlabel { color: #9db4cb; font-size: 10px; letter-spacing: .14em; margin-top: 10px; }
.nav { border-radius: 10px; min-height: 40px; }
.nav:hover { background: rgba(255,255,255,.09); }
.nav.on { background: linear-gradient(90deg, rgba(66,150,211,.25), rgba(255,255,255,.06)); color: #fff; }
.nav.on::before { left: -14px; width: 4px; background: #cf3555; }
.nav.on .ic { color: #a9d9ff; }
.avatar { background: linear-gradient(145deg, #b22a4a, #781a34); color: #fff; }
.side-frota { height: 82px; margin: 12px 2px 0; border: 1px solid rgba(255,255,255,.18); border-radius: 11px; overflow: hidden; box-shadow: 0 8px 20px rgba(5,18,38,.2); }
.side-frota img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 42% 52%; }
.main { background: #f1f4f7; }
.topbar { position: relative; padding: 20px 32px 17px; background: rgba(255,255,255,.94); border-bottom: 1px solid #e0e7ed; }
.topbar::after { content: ""; position: absolute; bottom: -1px; left: 32px; width: 54px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.topbar h1 { color: #172b43; }
.content { padding-top: 20px; }
.card { border-color: #e0e7ed; box-shadow: 0 3px 12px rgba(17,45,73,.045); }
.resumo { border: 1px solid #e0e7ed; border-radius: var(--r); background: #fff; box-shadow: 0 4px 14px rgba(16,40,61,.04); }
.resumo > div { position: relative; }
.resumo > div:first-child::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand); }
.resumo .v.emp { color: var(--accent); }
.stat { border-color: #e0e7ed; }
.stat .chip { border-radius: 12px; }
th { background: #f4f8fb; color: #37536d; }
tbody tr:hover td { background: #f0f6fa; }
tbody tr.selected td { background: #e3eff7; }
.btn.primary { background: linear-gradient(180deg, #126caf, #075b9f); border-color: #074a80; box-shadow: 0 2px 5px rgba(7,91,159,.2); }
.btn.primary:hover { background: linear-gradient(180deg, #0e5f9d, #064c85); }
input:focus, select:focus, textarea:focus { border-color: #1976b7; box-shadow: 0 0 0 3px rgba(25,118,183,.14); }
.sync { border-color: #dce6ee; }
.overlay { background: rgba(9,23,44,.62); }
.modal { border: 1px solid rgba(255,255,255,.7); }
.modal header { border-top: 3px solid var(--accent); }
.modal footer { background: #f5f8fa; }
.selectionbar { border-color: #c8dce9; color: #173b56; background: linear-gradient(100deg, #eef6fb, #fff); }
.dropzone { background: #f8fbfd; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.anx-ic, .clipinfo { color: var(--brand); }
.seg button.on { color: var(--brand-deep); }
.entrada-marca {
  background-image:
    linear-gradient(112deg, rgba(11,29,59,.96) 0%, rgba(14,47,91,.86) 42%, rgba(12,33,65,.3) 100%),
    url("frota-emergentcold.webp");
  background-size: cover;
  background-position: 48% center;
}
.entrada-marca .brand { max-width: 270px; }
.entrada-marca .brand-logo { min-height: 68px; padding: 9px 16px; }
.entrada-marca .brand-logo img { max-width: 230px; max-height: 54px; }
.entrada-marca .brand-copy { padding: 0 2px; }
.entrada-marca h2 { max-width: 520px; font-size: clamp(34px, 3.4vw, 48px); line-height: 1.08; letter-spacing: -1.5px; }
.entrada-marca p { max-width: 470px; color: #d3e2f0; }
.entrada-marca ul { color: #e1eaf2; }
.entrada-marca li .ic { color: #f18ca4; }
.entrada-form { background: radial-gradient(ellipse at 60% 35%, #fff 0%, #f4f7f9 66%, #edf2f5 100%); }
.box { padding: 32px; border: 1px solid #e1e8ee; border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: 0 20px 55px rgba(18,44,70,.1); }
.box h1 { color: #152c45; }
.box .btn.primary { background: linear-gradient(180deg, #126caf, #075b9f); }
.box a { color: var(--accent); }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 224px minmax(0,1fr); }
  .side { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 22px; padding-right: 22px; }
  .topbar::after { left: 22px; }
  .content { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .side-frota { display: none; }
  .side { padding: 12px; }
  .brand { flex-direction: row; align-items: center; padding: 0 4px 12px; }
  .brand-logo { min-height: 42px; width: 152px; padding: 5px 8px; }
  .brand-logo img { max-height: 31px; }
  .brand-copy { flex: 1; }
}

/* ---------- refinamento visual 1.4.3 ---------- */
:root { --brand: #244c72; --brand-deep: #15364f; --brand-soft: #eaf2f8; --brand-line: #c9dbe9; --side: #10283d; --side2: #16354c; --r: 14px; --sh1: 0 2px 8px rgba(16,40,61,.045); --sh2: 0 18px 48px -18px rgba(16,40,61,.28), 0 4px 12px rgba(16,40,61,.09); }
body { background: #f2f5f8; }
.side { border-right: 1px solid rgba(255,255,255,.04); }
.brand { padding-bottom: 24px; }
.mark { background: linear-gradient(145deg, #c42849, #9f1937); box-shadow: 0 6px 16px -6px rgba(196,40,73,.62); }
.nav.on { background: rgba(119,171,208,.18); }
.nav.on::before { background: #e04562; }
.nav.on .ic { color: #f2a2b2; }
.topbar { padding-top: 22px; }
.topbar h1 { letter-spacing: -.65px; }
.content { padding-bottom: 40px; }
.card { border-color: #e2e8ef; box-shadow: 0 2px 8px rgba(16,40,61,.035); }
.resumo { box-shadow: 0 4px 14px rgba(16,40,61,.04); }
th { background: #f6f8fa; color: #3b5265; font-size: 10.5px; letter-spacing: .07em; }
tbody tr:hover td { background: #f4f8fb; }
tbody tr.selected td { background: #e8f1f8; }
tbody tr.selected:hover td { background: #dfeaf3; }
.side-logo { margin: 14px 10px 0; padding: 9px 12px; border-radius: 10px; background: #fff; display: flex; justify-content: center; opacity: .96; }
.side-logo img { display: block; width: 100%; max-width: 145px; height: auto; object-fit: contain; }
.selectionbar { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #c8d9e7; border-radius: 12px; color: #173b56; background: linear-gradient(100deg, #f0f6fa, #fff); box-shadow: var(--sh1); }
.selectionbar[hidden] { display: none; }
.selectcol { width: 38px; min-width: 38px; text-align: center; padding-left: 10px; padding-right: 10px; }
.selectcol input[type="checkbox"] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: #244c72; vertical-align: middle; cursor: pointer; }
.btn { transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; }
.btn:hover { box-shadow: 0 3px 10px rgba(16,40,61,.09); }
.btn.primary { background: linear-gradient(180deg, #2e5d84, #244c72); border-color: #15364f; }
.btn.primary:hover { background: linear-gradient(180deg, #264f72, #1d4161); }
.btn.danger { background: #fff; }
.pill { border-radius: 999px; }
@media (max-width: 1120px) { .topbar { padding-left: 22px; padding-right: 22px; } .content { padding-left: 22px; padding-right: 22px; } }
body { font-size: 15px; line-height: 1.55; }
.topbar h1 { font-size: 26px; }
.topbar .sub { font-size: 14px; }
label { font-size: 13px; color: #263d50; }
input, select, textarea { font-size: 14.5px; padding: 10px 12px; }
.btn { font-size: 14px; padding: 9px 15px; }
.btn.sm { font-size: 13px; padding: 6px 11px; }
th { font-size: 12px; }
td { font-size: 14px; }
td .l1 { font-size: 14.5px; }
td .l2 { font-size: 13px; }
.nav { font-size: 14px; }
.navlabel { font-size: 11px; }
.filtros label { font-size: 11.5px; }
.field-hint { display: block; margin-top: 5px; color: #52687a; font-size: 12px; line-height: 1.35; }
.sect { font-size: 12px; }
.modal header h2 { font-size: 20px; }
.pill { font-size: 13px; }

/* ===== 1.6: cabeçalho fixo, cores por status, KMM e viagens finalizadas ===== */
.resumo { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
th { box-shadow: 0 1px 0 var(--line2), 0 3px 6px -4px rgba(20,40,70,.25); }
@media (min-width: 901px) {
  /* a lista ocupa o resto da tela e rola por dentro: o cabeçalho nunca sai do lugar */
  #conteudo:has(#tabela), #conteudo:has(#r_tab) { overflow: hidden; display: flex; flex-direction: column; }
  #conteudo:has(#tabela) > .card:last-child, #conteudo:has(#r_tab) > .card:last-child { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #tabela.tablewrap, #r_tab.tablewrap { flex: 1; min-height: 0; max-height: none; }
}
@media (max-width: 900px) { .tablewrap { max-height: calc(100dvh - 180px); } }

/* diárias: cor da linha pelo status */
tbody tr.rs-amber:not(.selected) td { background: #fff7e6; } tbody tr.rs-amber td:first-child { box-shadow: inset 4px 0 0 #e0a100; }
tbody tr.rs-violet:not(.selected) td { background: #f4f0ff; } tbody tr.rs-violet td:first-child { box-shadow: inset 4px 0 0 #7c5ce0; }
tbody tr.rs-cyan:not(.selected) td { background: #e9f8fc; } tbody tr.rs-cyan td:first-child { box-shadow: inset 4px 0 0 #1b9ab8; }
tbody tr.rs-rose:not(.selected) td { background: #fdecf0; } tbody tr.rs-rose td:first-child { box-shadow: inset 4px 0 0 #d63a5c; }
tbody tr.rs-green:not(.selected) td { background: #e8f7ee; } tbody tr.rs-green td:first-child { box-shadow: inset 4px 0 0 #1f9d5c; }
tbody tr.rs-slate:not(.selected) td { background: #f1f4f8; } tbody tr.rs-slate td:first-child { box-shadow: inset 4px 0 0 #8a97a8; }
tbody tr[class*="rs-"]:not(.selected):hover td { filter: brightness(.97); }

/* KMM */
.kmm-pill { border: 1px solid transparent; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.kmm-pill.ok { background: #d6f2e2; color: #0d6b3c; border-color: #9fd9b9; }
.kmm-pill.falta { background: #ffe9b8; color: #8a5200; border-color: #f0c46a; }
.kmm-pill:hover { filter: brightness(.95); } .kmm-pill:disabled { opacity: .6; cursor: wait; }
tbody tr.kmm-ok:not(.selected):not(.dest) td { background: #eaf7ef; } tbody tr.kmm-ok:not(.dest) td:first-child { box-shadow: inset 4px 0 0 #1f9d5c; }
tbody tr.kmm-falta:not(.selected):not(.dest) td { background: #fff6df; } tbody tr.kmm-falta:not(.dest) td:first-child { box-shadow: inset 4px 0 0 #e0a100; }

/* follow up: viagens finalizadas (verde) e atenção (vermelho) */
tbody tr.fu-fin:not(.selected) td { background: #e3f6ea; } tbody tr.fu-fin td:first-child { box-shadow: inset 5px 0 0 #1f9d5c; }
tbody tr.fu-aten:not(.selected) td { background: #fdecec; } tbody tr.fu-aten td:first-child { box-shadow: inset 5px 0 0 #d93a3a; }
/* a regra ".card table th { position: static }" (feita para as tabelas de configuração) desligava o cabeçalho fixo das listas */
.card #tabela th, .card #r_tab th { position: sticky; top: 0; z-index: 3; cursor: pointer; }
.card #tabela tbody tr, .card #r_tab tbody tr { cursor: pointer; }
.card #tabela tbody tr:hover, .card #r_tab tbody tr:hover { background: #f6f8ff; }

/* ===== 1.7: animações (login e entrada no sistema) ===== */
@keyframes anim-sobe { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes anim-esq { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes anim-desce { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes anim-zoom { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes anim-kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(-2.5%, -1.5%); } }
@keyframes anim-estrada { to { background-position: -40px 0; } }
@keyframes anim-brilho { 0% { transform: translateX(-120%) skewX(-18deg); } 55%, 100% { transform: translateX(260%) skewX(-18deg); } }
@keyframes anim-treme { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes anim-gira { to { transform: rotate(360deg); } }
@keyframes anim-linha { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes anim-sai { to { opacity: 0; visibility: hidden; } }
@keyframes anim-linha-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* login: fundo da frota se movendo devagar, estrada tracejada correndo, textos entrando em sequência */
.entrada-marca::before { content: ""; position: absolute; inset: -5%; background: inherit; z-index: 0; animation: anim-kenburns 26s ease-in-out infinite alternate; will-change: transform; }
.entrada-marca > * { position: relative; z-index: 1; }
.entrada-marca::after { content: ""; position: absolute; left: 56px; right: 56px; bottom: 20px; height: 2px; z-index: 1; opacity: .55;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.9) 0 18px, transparent 18px 40px); animation: anim-estrada 1.1s linear infinite; }
.entrada-marca .brand { animation: anim-esq .7s cubic-bezier(.2,.7,.2,1) both; }
.entrada-marca h2 { animation: anim-sobe .8s .15s cubic-bezier(.2,.7,.2,1) both; }
.entrada-marca p { animation: anim-sobe .8s .3s cubic-bezier(.2,.7,.2,1) both; }
.entrada-marca li { animation: anim-esq .6s both; }
.entrada-marca li:nth-child(1) { animation-delay: .5s; } .entrada-marca li:nth-child(2) { animation-delay: .65s; } .entrada-marca li:nth-child(3) { animation-delay: .8s; }
.box { animation: anim-zoom .7s .1s cubic-bezier(.2,.7,.2,1) both; }
.box > h1, .box > p, .box .field, .box .btn.primary, .box > .err-msg { animation: anim-sobe .55s both; }
.box > h1 { animation-delay: .25s; } .box > p { animation-delay: .32s; }
.box .field:nth-of-type(1) { animation-delay: .4s; } .box .field:nth-of-type(2) { animation-delay: .48s; } .box .field:nth-of-type(3) { animation-delay: .56s; } .box .field:nth-of-type(4) { animation-delay: .64s; }
.box .btn.primary { animation-delay: .7s; position: relative; overflow: hidden; }
.box .btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 36%; left: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: anim-brilho 3.6s 1.6s ease-in-out infinite; pointer-events: none; }
.box .btn.primary:disabled::before { content: ""; width: 14px; height: 14px; margin-right: 8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: anim-gira .7s linear infinite; }
.box .err-msg:not(.info) { animation: anim-treme .45s both; }

/* ao entrar: faixa de boas-vindas que some sozinha e a tela de trabalho entrando em cena */
#boas { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; color: #fff;
  background: radial-gradient(ellipse at 50% 40%, #12467f 0%, #0b1d3b 70%); animation: anim-sai .6s 3.3s forwards; }
#boas .b-in { text-align: center; animation: anim-zoom .6s both; }
#boas .brand-logo { margin: 0 auto 26px; width: 220px; }
#boas .b-sa { font-size: 20px; color: #c7d6ee; font-weight: 500; margin: 0 0 6px; animation: anim-sobe .7s .5s both; }
#boas h2 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -1px; margin: 0 0 10px; font-weight: 750; animation: anim-sobe .8s .95s both; }
#boas p { margin: 0; color: #c7d6ee; animation: anim-sobe .7s 1.6s both; }
#boas .b-barra { width: 260px; height: 3px; margin: 22px auto 0; background: rgba(255,255,255,.2); border-radius: 3px; overflow: hidden; }
#boas .b-barra i { display: block; height: 100%; background: linear-gradient(90deg, #6fb6ff, #fff); transform-origin: left; animation: anim-linha 3s .2s ease-in-out both; }
body.anim-entrada .side { animation: anim-esq .6s 3.2s cubic-bezier(.2,.7,.2,1) both; }
body.anim-entrada .topbar { animation: anim-desce .55s 3.3s cubic-bezier(.2,.7,.2,1) both; }
body.anim-entrada .nav { animation: anim-esq .45s both; }
body.anim-entrada .nav:nth-child(n) { animation-delay: calc(3.35s + var(--i, 0) * .04s); }
body.anim-entrada #conteudo .filtros, body.anim-entrada #conteudo .resumo, body.anim-entrada #conteudo .card { animation: anim-sobe .55s both; }
body.anim-entrada #conteudo .filtros { animation-delay: 3.45s; } body.anim-entrada #conteudo .resumo { animation-delay: 3.53s; } body.anim-entrada #conteudo .card:last-child { animation-delay: 3.61s; }
body.anim-entrada tbody tr { animation: anim-linha-entra .4s both; }
body.anim-entrada tbody tr:nth-child(1) { animation-delay: 3.7s; } body.anim-entrada tbody tr:nth-child(2) { animation-delay: 3.75s; } body.anim-entrada tbody tr:nth-child(3) { animation-delay: 3.8s; } body.anim-entrada tbody tr:nth-child(4) { animation-delay: 3.85s; } body.anim-entrada tbody tr:nth-child(5) { animation-delay: 3.9s; } body.anim-entrada tbody tr:nth-child(6) { animation-delay: 3.95s; } body.anim-entrada tbody tr:nth-child(n+7) { animation-delay: 4s; }
/* trocar de aba: o conteúdo entra suave */
body.anim-aba #conteudo > * { animation: anim-sobe .35s both; }
@media (prefers-reduced-motion: reduce) {
  .entrada-marca::before, .entrada-marca::after, .entrada-marca *, .box, .box *, .box .btn.primary::after, #boas, #boas *, body.anim-entrada *, body.anim-aba * { animation: none !important; }
  #boas { display: none; }
}

/* lançar em lote */
.lt-comum{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin:12px 0}
.lt-comum label{display:block;font-size:12px;margin-bottom:3px}
.lt-colar{margin:6px 0 12px}.lt-colar summary{cursor:pointer;font-size:13px}
.lt-grid{max-height:42vh;overflow:auto;border:1px solid var(--line,#d9dee5);border-radius:8px}
.lt-grid table{width:100%;border-collapse:collapse}
.lt-grid th{position:sticky;top:0;background:var(--surface,#fff);z-index:1;font-size:12px;text-align:left;padding:6px}
.lt-grid td{padding:3px 4px}.lt-grid td input{width:100%;min-width:90px;padding:6px 8px}

/* alertas de 7 dias: pulmão sem KMM (vermelho) e diária sem envio (laranja) */
@keyframes al-pulso-v { 0%,100% { background-color: #fdecee; } 50% { background-color: #ffb3bd; } }
@keyframes al-pulso-o { 0%,100% { background-color: #fff3e3; } 50% { background-color: #ffc98a; } }
tbody tr.al-vermelho:not(.selected) td { animation: al-pulso-v 1.5s ease-in-out infinite; }
tbody tr.al-vermelho td:first-child { box-shadow: inset 5px 0 0 #d6293f; }
tbody tr.al-laranja:not(.selected) td { animation: al-pulso-o 1.5s ease-in-out infinite; }
tbody tr.al-laranja td:first-child { box-shadow: inset 5px 0 0 #f08a00; }
@keyframes nav-pulso-v { 0%,100% { background: rgba(214,41,63,.22); box-shadow: 0 0 0 0 rgba(214,41,63,.55); } 50% { background: rgba(214,41,63,.55); box-shadow: 0 0 0 7px rgba(214,41,63,0); } }
@keyframes nav-pulso-o { 0%,100% { background: rgba(240,138,0,.22); box-shadow: 0 0 0 0 rgba(240,138,0,.55); } 50% { background: rgba(240,138,0,.55); box-shadow: 0 0 0 7px rgba(240,138,0,0); } }
.nav.nav-alerta.al-vermelho { animation: nav-pulso-v 1.5s ease-in-out infinite; color: #fff; }
.nav.nav-alerta.al-laranja { animation: nav-pulso-o 1.5s ease-in-out infinite; color: #fff; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; font-size: 11px; font-weight: 700; text-align: center; color: #fff; }
.nav.al-vermelho .nav-badge { background: #d6293f; } .nav.al-laranja .nav-badge { background: #f08a00; }
@media (prefers-reduced-motion: reduce) {
  tbody tr.al-vermelho:not(.selected) td { animation: none; background-color: #ffc9cf; }
  tbody tr.al-laranja:not(.selected) td { animation: none; background-color: #ffdcae; }
  .nav.nav-alerta { animation: none; } .nav.al-vermelho { background: rgba(214,41,63,.4); } .nav.al-laranja { background: rgba(240,138,0,.4); }
}

/* versão web */
#s_troca,#s_logs,#trocaurl,.c6:has(#m_classico){display:none!important}
#ex-atalho{position:fixed;right:14px;bottom:14px;z-index:50;display:none;align-items:center;padding:10px 16px;border-radius:999px;background:#0b63a8;color:#fff;text-decoration:none;font-weight:600;box-shadow:0 4px 14px rgba(0,0,0,.25);min-height:44px}
/* celular */
@media (max-width:700px){
  input,select,textarea{font-size:16px!important}
  .btn{min-height:42px}
  .content{padding-left:12px!important;padding-right:12px!important}
  .modal{max-width:100vw!important;width:100vw!important;border-radius:0!important}
  .nav{min-height:44px}
}
