:root {
  --navy: #013064;
  --navy-2: #0b3f7a;
  --navy-ink: #0d2240;
  --gold: #af965e;
  --gold-2: #d2ad66;
  --gold-soft: #f6efe0;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --line: #dfe4ec;
  --line-2: #eef1f5;
  --text: #17233a;
  --muted: #5d6b82;
  --ruptura: #7f1414;
  --critico: #c62828;
  --reposicao: #a15c00;
  --atencao: #7a6100;
  --normal: #2e7d32;
  --info: #2c5d9b;
  --chart-min: #d32f2f;
  --chart-reorder: #a87600; /* 4,0:1 sobre branco; o formato (ponta) diferencia do mínimo */
  --radius: 10px;
  --shadow: 0 1px 2px rgba(13, 34, 64, .06), 0 2px 8px rgba(13, 34, 64, .04);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--navy-ink); }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
small, .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- layout desktop ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--navy) 0%, var(--navy) 32%, #01264d 100%); color: #dfe7f3; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 22px 20px 16px; }
.side .brand a { display: block; border-radius: 8px; }
.side .brand img { width: 100%; max-width: 184px; height: auto; display: block; }
.side .ic { width: 18px; height: 18px; flex: none; }
.nav-cta { margin: 2px 14px 14px; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 10px; background: var(--gold-2); color: var(--navy-ink); font-weight: 650; letter-spacing: .005em; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 14px rgba(0,0,0,.18); }
.nav-cta:hover { background: #dcb978; text-decoration: none; }
.nav-cta.active { box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 4px 14px rgba(0,0,0,.18); }
.side nav { padding: 4px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side nav a, .side .nav-item { color: #c3d0e3; min-height: 40px; padding: 0 12px; border-radius: 10px; display: flex; gap: 11px; align-items: center; font-weight: 500; transition: background-color .12s, color .12s; }
.side nav a .ic, .side .nav-item .ic { color: #8fa6c6; transition: color .12s; }
.side nav a:hover, .side .nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.side nav a:hover .ic, .side .nav-item:hover .ic { color: #dfe7f3; }
.side nav a.active, .side .nav-item.active { background: rgba(255,255,255,.11); color: #fff; font-weight: 600; }
.side nav a.active .ic, .side .nav-item.active .ic { color: var(--gold-2); }
.side a:focus-visible, .side button:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.side nav a .badge { margin-left: auto; min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.side-foot { padding: 8px 12px 14px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; }
.side .user { display: flex; align-items: center; gap: 10px; padding: 6px 4px 0; }
.side .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-2); color: var(--navy-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.side .u-txt { min-width: 0; flex: 1; }
.side .u-name { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .u-st { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #9fb2cc; line-height: 1.3; }
.side .u-st i { width: 7px; height: 7px; border-radius: 50%; background: #8fa3bd; flex: none; }
.side .u-st.ok i { background: #5cc27a; }
.side .logout { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: transparent; border: 1px solid rgba(255,255,255,.14); color: #c3d0e3; cursor: pointer; }
.side .logout:hover { background: rgba(255,255,255,.08); color: #fff; }
.side .logout .ic { width: 17px; height: 17px; }
main { padding: 22px 28px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- componentes ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel > .hd { padding: 14px 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel > .bd { padding: 14px 16px; }
.panel + .panel, .grid + .panel, .panel + .grid, .kpis + .panel, .kpis + .grid, .tabs + .panel { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid > .panel, .cards > .panel { margin-top: 0 !important; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .v { font-size: 26px; font-weight: 700; color: var(--navy-ink); font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12px; text-transform: none; }
.kpi.danger .v { color: var(--critico); }
.kpi.warn .v { color: var(--reposicao); }

.btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--navy-ink); padding: 7px 12px; border-radius: 8px; font: inherit; font-weight: 550; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.btn:hover { border-color: #b8c3d4; background: #fafbfd; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.danger { color: var(--critico); border-color: #f0c8c8; }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.25); color: #e6edf6; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-ruptura { color: #fff; background: var(--ruptura); }
.st-ruptura::before { background: #fff; }
.st-critico { color: var(--critico); background: #fdecec; border-color: #f6caca; }
.st-reposicao { color: var(--reposicao); background: #fff3df; border-color: #f3d9a8; }
.st-atencao { color: var(--atencao); background: #fbf6d8; border-color: #ece0a2; }
.st-normal { color: var(--normal); background: #e9f5ea; border-color: #c7e3c9; }
.st-limite_nao_configurado, .st-sem_saldo_inicial, .st-nao_aplicavel, .st-coberto_por_grupo { color: var(--muted); background: #f0f2f6; border-color: #e1e5ec; }
.st-sem_saldo_inicial { color: var(--info); background: #eaf1fa; border-color: #cddcf0; }
.badge { background: var(--critico); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--gold-soft); color: #6d5726; border: 1px solid #eadcb9; font-weight: 600; }
.tag.blue { background: #eaf1fa; color: var(--info); border-color: #cddcf0; }
.tag.gray { background: #f0f2f6; color: var(--muted); border-color: #e1e5ec; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfd; position: sticky; top: 0; z-index: 1; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f7f9fc; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; min-width: 0; max-width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 1px; }
input[type="checkbox"] { width: 16px; height: 16px; }
.search { min-width: 220px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
label.f > span.hint { font-weight: 400; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form .full { grid-column: 1 / -1; }
.note { background: #f7f9fc; border: 1px solid var(--line); border-left: 3px solid var(--info); padding: 9px 12px; border-radius: 6px; color: #2f405c; }
.note.warn { border-left-color: var(--reposicao); background: #fffaf0; }
.note.err { border-left-color: var(--critico); background: #fff5f5; color: #7a1d1d; }
.note.ok { border-left-color: var(--normal); background: #f3faf3; }
.note + .note { margin-top: 8px; }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li + li { margin-top: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--navy-ink); border-bottom-color: var(--gold); }
.tabs a:hover { text-decoration: none; color: var(--navy-ink); }
.bar { height: 10px; background: #edf0f5; border-radius: 6px; overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--navy-2); border-radius: 6px; }
.bar.formulado > i { background: var(--gold); }
.tank { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.tank:hover { border-color: #b8c3d4; }
.tank .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tank .id { font-weight: 700; color: var(--navy-ink); }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.toast { position: fixed; right: 16px; bottom: 16px; background: var(--navy-ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.2); z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast.err { background: #8a1c1c; }
.offline { background: #fff3df; color: #6a3d00; border-bottom: 1px solid #f3d9a8; padding: 8px 16px; font-size: 13px; }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 5px; }

dialog { border: none; border-radius: 12px; padding: 0; width: min(760px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(13, 34, 64, .45); }
dialog .hd { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; }
dialog .bd { padding: 16px 18px; max-height: 70vh; overflow: auto; }
dialog .ft { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.pdfview { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.row-doubt td { background: #fffaf0; }
.row-excl td { opacity: .5; text-decoration: line-through; }
td input, td select { padding: 5px 7px; width: 100%; }
td.w-qty input { width: 110px; }
td input[name=item] { min-width: 260px; }
td input[name=lot] { margin-top: 4px; }
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy) 0%, #062a55 60%, #031d3d 100%); padding: 16px; }
.login .card { width: min(380px, 100%); background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login .card .logo { background: var(--navy); border-radius: 10px; padding: 14px; margin-bottom: 18px; }
.login .card .logo img { width: 100%; height: auto; display: block; }
.login form { display: grid; gap: 12px; }

/* ---------- celular (consulta) ---------- */
.m-top { display: none; }
.m-nav { display: none; }
.cards { display: grid; gap: 10px; }
.card-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; cursor: pointer; }
.card-item .n { font-weight: 650; color: var(--navy-ink); overflow-wrap: anywhere; }
.card-item .q { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.card-item .meta { color: var(--muted); font-size: 12px; }

body.mobile .shell { display: block; }
body.mobile .side { display: none; }
body.mobile main { padding: 12px 16px 86px; }
body.mobile .m-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--navy); padding: calc(10px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 10px calc(16px + env(safe-area-inset-left)); position: sticky; top: 0; z-index: 20; }
body.mobile .m-top img { height: 34px; width: auto; max-width: 60vw; }
body.mobile .m-top .who { color: #c9d5e7; font-size: 12px; text-align: right; }
body.mobile .m-nav { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; inset: auto 0 0 0; background: #fff; border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
body.mobile .m-nav a { min-height: 56px; justify-content: center; padding: 6px 4px; text-align: center; color: var(--muted); font-weight: 600; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
body.mobile .m-nav a.active { color: var(--navy); box-shadow: inset 0 3px 0 var(--gold); }
body.mobile .m-nav a:hover { text-decoration: none; }
body.mobile h1 { font-size: 19px; }
body.mobile .page-head { margin-bottom: 12px; }
body.mobile .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.mobile .kpi .v { font-size: 22px; }
body.mobile .g2, body.mobile .g3, body.mobile .g4, body.mobile .split { grid-template-columns: minmax(0, 1fr); }
body.mobile .search { min-width: 0; width: 100%; }
body.mobile .tabs a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; }
body.mobile .desktop-only { display: none !important; }
body:not(.mobile) .mobile-only { display: none !important; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } }
@media print { .side, .m-nav, .m-top, .actions, .btn { display: none !important; } .shell { display: block; } }

/* ---------- gráfico de bala: barra = disponível; linha vermelha = mínimo; linha amarela = reposição ---------- */
.bullets { display: grid; gap: 4px; }
.bullet { display: block; padding: 8px 4px 8px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 6px; color: inherit; }
.bullet:hover { text-decoration: none; }
.bullet:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 1px; background: #f7f9fc; }
.bullet:hover { background: #f7f9fc; }
.bullet:last-child { border-bottom: 0; }
.b-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.b-name { font-weight: 600; color: var(--navy-ink); overflow-wrap: anywhere; }
.b-val { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; color: var(--text); }
.b-val small { color: var(--muted); font-weight: 500; }
.b-track { position: relative; height: 12px; background: #edf0f5; border-radius: 4px; margin: 7px 0 5px; }
.b-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--navy-2); min-width: 2px; }
.b-fill.s-ruptura { background: var(--ruptura); }
.b-fill.s-critico { background: var(--critico); }
.b-fill.s-reposicao { background: #e0a800; }
.b-line { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; box-shadow: 0 0 0 2px #fff; }
.b-line.min { background: var(--chart-min); }
.b-line.rep { background: var(--chart-reorder); top: -3px; }
.b-line.rep::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--chart-reorder); filter: drop-shadow(0 0 1px #fff); }
.b-legend i.lg-rep { position: relative; overflow: visible; }
.b-legend i.lg-rep::before { content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--chart-reorder); }
.b-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; align-items: center; }
.b-foot .chip { font-size: 11px; padding: 1px 7px; }
.b-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.b-legend i { display: inline-block; width: 3px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 5px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.hbar:last-child { border-bottom: 0; }
.hbar .t { height: 12px; background: #edf0f5; border-radius: 4px; position: relative; }
.hbar .t i { position: absolute; inset: 0 auto 0 0; background: var(--navy-2); border-radius: 4px; min-width: 2px; }
.hbar .v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.seg { display: flex; gap: 4px; background: #e9edf3; padding: 3px; border-radius: 9px; margin-bottom: 12px; overflow-x: auto; }
.seg a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; padding: 0 10px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.seg a.active { background: #fff; color: var(--navy-ink); box-shadow: var(--shadow); }
.seg a:hover { text-decoration: none; }
.more-empty { font-size: 12px; color: var(--muted); padding: 8px 4px 0; }
.b-allok { font-size: 13px; color: var(--muted); padding: 6px 4px 10px; }
.b-more { margin-top: 6px; border-top: 1px solid var(--line-2); }
.b-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; font-size: 13px; color: var(--muted); border-radius: 6px; }
.b-more > summary::-webkit-details-marker { display: none; }
.b-more > summary::after { content: ''; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.b-more[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.b-more > summary:hover { color: var(--text); background: #f4f7fb; }
.b-more > summary:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.b-more-n { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.b-none { list-style: none; margin: 0 0 8px; padding: 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.b-none a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--text); background: #fff; }
.b-none a:hover { border-color: #b8c3d4; text-decoration: none; }

/* ---------- Arquivo: calendário do mês ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal .wd { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cal .day { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 92px; display: flex; flex-direction: column; gap: 6px; }
.cal .day .n { font-weight: 700; color: var(--navy-ink); font-size: 15px; }
.cal .day.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cal .day.off { background: transparent; border-style: dashed; color: var(--muted); }
.cal .day .btn { justify-content: center; margin-top: auto; }
.cal .blank { min-height: 0; }
.month-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.month-nav h2 { min-width: 180px; text-align: center; }
@media (max-width: 1000px) { .cal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cal .wd, .cal .blank { display: none; } }

.btn.wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.btn.wa:hover { background: #18773f; text-decoration: none; }

/* ---------- Visão geral: faixa de situação + "Precisa de ação" ---------- */
.status-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.status-strip .stat { display: flex; align-items: baseline; gap: 8px; padding: 14px 18px; color: var(--muted); text-decoration: none; min-height: 56px; }
.status-strip .stat + .stat { border-left: 1px solid var(--line-2); }
.status-strip .stat:hover { background: #f7f9fc; text-decoration: none; }
.status-strip .stat:focus-visible { outline: 2px solid var(--gold-2); outline-offset: -2px; }
.status-strip .v { font-size: 26px; font-weight: 700; color: var(--navy-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.status-strip .l { font-size: 13px; line-height: 1.25; }
.status-strip .is-crit .v { color: var(--critico); }
.status-strip .is-repo .v { color: var(--reposicao); }
.status-strip button.stat { appearance: none; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.status-strip .stat.is-open { background: var(--gold-soft); }
.status-strip .stat.is-open .l { color: var(--navy-ink); }
.strip-list { margin-top: 12px; }
.panel.action { margin-top: 16px; scroll-margin-top: 16px; }
.panel.action .hd h2 { display: flex; align-items: center; gap: 8px; }
.panel.action .count { font-size: 12px; font-weight: 700; color: #fff; background: var(--critico); border-radius: 999px; padding: 1px 8px; }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-row { display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(0, 2fr) auto; align-items: center; gap: 8px 18px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.act-row:first-child { border-top: 0; }
.act-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.act-name { font-weight: 650; color: var(--navy-ink); overflow-wrap: anywhere; }
.act-nums { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; }
.act-nums b { color: var(--text); font-variant-numeric: tabular-nums; }
.act-do { justify-self: end; }
.act-watch { padding: 10px 16px 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13px; }
body.mobile .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.mobile .status-strip .stat:nth-child(3) { border-left: 0; }
body.mobile .status-strip .stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
body.mobile .status-strip .stat { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; }
body.mobile .status-strip .v { font-size: 24px; }
body.mobile .act-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 14px; }
body.mobile .act-nums { grid-column: 1; grid-row: 2; font-size: 12.5px; gap: 2px 12px; }
body.mobile .act-do { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
body.mobile .act-do .btn { min-height: 44px; padding: 0 12px; font-size: 13px; }
.act-all { display: flex; align-items: center; justify-content: center; min-height: 44px; border-top: 1px solid var(--line-2); font-weight: 600; font-size: 13px; }
@media (max-width: 1100px) { body:not(.mobile) .act-row { grid-template-columns: minmax(0, 1fr) auto; } body:not(.mobile) .act-nums { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Tanques desenhados ---------- */
.tanks-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px 14px; }
.tank-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 8px 12px; border-radius: 12px; color: var(--text); text-decoration: none; }
.tank-tile:hover { background: #f4f7fb; text-decoration: none; }
.tank-tile:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.tank-svg { width: 84px; height: auto; margin-bottom: 6px; }
.tank-id { font-weight: 700; color: var(--navy-ink); font-size: 15px; }
.tank-pct { font-weight: 600; color: var(--muted); font-size: 13px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.tank-content { font-size: 13px; font-weight: 600; color: var(--text); min-height: 1.3em; overflow-wrap: anywhere; }
.tank-l { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tank-l b { color: var(--text); }
.tank-st { font-size: 11.5px; color: var(--muted); }
.stack { display: grid; gap: 16px; align-content: start; }
.stack > .panel { margin-top: 0 !important; }
body.mobile .tanks-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 4px; }
body.mobile .tank-tile { padding: 8px 2px 10px; }
body.mobile .tank-svg { width: 58px; margin-bottom: 4px; }
body.mobile .tank-id { font-size: 14px; }
body.mobile .tank-pct { font-size: 12px; }
body.mobile .tank-content { font-size: 12px; }
body.mobile .tank-l { font-size: 11px; white-space: nowrap; letter-spacing: -0.01em; }
body.mobile .tank-st { font-size: 11px; }

/* ---------- alertas compactos ---------- */
.al-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 4px; display: grid; gap: 8px; }
.al-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.al-name { font-weight: 700; color: var(--navy-ink); }
.al-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.al-nums b { color: var(--text); }
.al-track { margin: 2px 0; }
.al-do { display: flex; flex-wrap: wrap; gap: 8px; }
.al-do .btn { min-height: 40px; }
.al-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 40px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-2); }
.al-more > summary::-webkit-details-marker { display: none; }
.al-more > summary::after { content: ''; width: 6px; height: 6px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.al-more[open] > summary::after { transform: rotate(-135deg); }
.al-more > summary:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.al-msg { white-space: pre-wrap; font: inherit; font-size: 13px; margin: 4px 0 8px; color: var(--text); }
.al-deliv { margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.al-rows { list-style: none; margin: 0 0 16px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.al-rows li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.al-rows li:last-child { border-bottom: 0; }
.al-rows li a { font-weight: 600; color: var(--navy-ink); }
.al-rows li span { color: var(--muted); }
body.mobile .al-do .btn { min-height: 44px; flex: 1; justify-content: center; }
body:not(.mobile) .al-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.ro-line { margin: -8px 0 14px; font-size: 12.5px; color: var(--muted); }
.ro-line b { color: var(--text); font-weight: 600; }

/* ---------- IBCs (1.000 L cada) ---------- */
.ibc-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ibc-group { display: block; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--text); }
.ibc-group:hover { background: #f7f9fc; border-color: var(--line); text-decoration: none; }
.ibc-group:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.ibc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ibc-name { font-weight: 650; color: var(--navy-ink); }
.ibc-tot { font-variant-numeric: tabular-nums; color: var(--muted); }
.ibc-tot b { color: var(--text); font-size: 15px; }
.ibc-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.ibc-row { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.ibc-u { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ibc-u small { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ibc-svg { width: 52px; height: auto; display: block; }
.ibc-note { display: block; margin-top: 10px; }
.ibc-h { margin: 22px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.ibc-h small { font-weight: 500; }
body.mobile .ibc-groups { grid-template-columns: minmax(0, 1fr); }
body.mobile .ibc-svg { width: 46px; }

.inst-url { font-size: 17px; font-weight: 650; margin: 0 0 12px; overflow-wrap: anywhere; }
.inst-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
