/* ==========================================================================
   Carros de Emergência — tema institucional (turquesa Hospital da Luz)
   ========================================================================== */
:root {
  --brand-50: #e9f8f9; --brand-100: #cdeff1; --brand-200: #a3e1e5; --brand-300: #6fd0d6;
  --brand-500: #00a1ad; --brand-600: #008c97; --brand-700: #00707a; --brand-800: #0a5a62; --brand-900: #0b434a;
  --ink: #17303a; --muted: #5d7279; --line: rgba(10, 90, 98, .12); --line-strong: rgba(10, 90, 98, .22);
  --bg: #eef8f9;
  --red: #b42318; --red-bg: #fde4e2; --orange: #9a3412; --orange-bg: #ffe8d6; --amber: #8a5a00; --amber-bg: #fff3c4;
  --green: #166534; --green-bg: #dcf5e4; --grey-bg: #eef2f3; --farm: #5b21b6; --farm-bg: #efeafd;
  --radius: 16px; --radius-sm: 10px;
  --glass: rgba(255, 255, 255, .78); --glass-border: rgba(255, 255, 255, .75);
  --shadow: 0 1px 2px rgba(11, 67, 74, .05), 0 8px 24px rgba(11, 67, 74, .08);
  --sb-w: 268px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand-700); }
a:hover { color: var(--brand-800); }
h1 { font-size: 1.5rem; margin: 0 0 16px; letter-spacing: -.01em; color: var(--brand-900); }
h2 { font-size: 1.08rem; margin: 0 0 12px; color: var(--brand-900); }
h3 { font-size: .95rem; margin: 0 0 10px; color: var(--brand-900); }
p { margin: 0 0 12px; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84em; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; } .strong { font-weight: 700; }
.txt-red { color: var(--red); } .txt-orange { color: var(--orange); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { opacity: .55; }
code { background: var(--brand-50); padding: 1px 6px; border-radius: 5px; font-size: .9em; }

/* -------- faceted background (inspired by the institutional banner) -------- */
.bg-facets { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 38%, rgba(0,161,173,.09) 38% 52%, transparent 52%),
    linear-gradient(62deg, transparent 0 58%, rgba(0,140,151,.08) 58% 74%, transparent 74%),
    linear-gradient(160deg, rgba(255,255,255,.6) 0 22%, transparent 22% 100%),
    linear-gradient(28deg, transparent 0 70%, rgba(111,208,214,.18) 70% 86%, transparent 86%),
    linear-gradient(135deg, #f4fbfb 0%, #e3f5f6 45%, #d3eff1 100%);
}
.auth-page .bg-facets {
  background:
    linear-gradient(118deg, transparent 0 34%, rgba(255,255,255,.14) 34% 50%, transparent 50%),
    linear-gradient(62deg, transparent 0 56%, rgba(255,255,255,.10) 56% 72%, transparent 72%),
    linear-gradient(160deg, rgba(255,255,255,.18) 0 24%, transparent 24% 100%),
    linear-gradient(28deg, transparent 0 68%, rgba(11,67,74,.18) 68% 88%, transparent 88%),
    linear-gradient(135deg, #7fd6dc 0%, #2fb4be 40%, #00939e 75%, #00707a 100%);
}

/* -------- glass surfaces -------- */
.glass, .card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card { padding: 20px; margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }
.card-red { border-left: 4px solid var(--red); } .card-orange { border-left: 4px solid #ea580c; } .card-grey { border-left: 4px solid #98a2b3; }

/* -------- sidebar -------- */
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sb-w); z-index: 40; display: flex; flex-direction: column; padding: 18px 14px 14px;
  color: #fff; overflow-y: auto; }
.glass-dark {
  background: linear-gradient(165deg, rgba(0,112,122,.9) 0%, rgba(0,140,151,.82) 55%, rgba(0,161,173,.74) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border-right: 1px solid rgba(255,255,255,.28); box-shadow: 8px 0 32px rgba(11,67,74,.18);
}
.sb-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 4px 8px 18px; margin-bottom: 8px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.2); }
.sb-name { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.sb-name small { display: block; font-weight: 400; font-size: .76rem; opacity: .85; margin-top: 2px; }
.logo-img { display: block; max-width: 100%; object-fit: contain; }
.sb-logo.logo-img { max-height: 58px; border-radius: 10px; }
.logo-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--brand-600);
  background: rgba(255,255,255,.92); box-shadow: 0 4px 14px rgba(11,67,74,.18); }
.logo-mark svg { width: 26px; height: 26px; }
.sb-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sb-nav a, .sb-logout, .sb-me { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.88);
  text-decoration: none; font-weight: 600; font-size: .93rem; transition: background .15s, color .15s, box-shadow .15s; }
.sb-nav a svg, .sb-logout svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-nav a:hover, .sb-logout:hover, .sb-me:hover { background: rgba(255,255,255,.14); color: #fff; }
.sb-nav a.on, .sb-me.on { background: rgba(255,255,255,.24); color: #fff; box-shadow: inset 3px 0 0 #fff, 0 4px 16px rgba(11,67,74,.15);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sb-group { margin: 16px 12px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.sb-user { border-top: 1px solid rgba(255,255,255,.2); padding-top: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.sb-me { padding: 8px 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--brand-700); display: grid; place-items: center; font-weight: 800; flex: none; }
.sb-me-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sb-me-txt b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-me-txt small { font-size: .72rem; opacity: .8; font-weight: 500; }
.sb-logout { width: 100%; background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.sb-user form { margin: 0; }

.main { margin-left: var(--sb-w); min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 28px 8px; flex: 1; }
.wrap.narrow, .narrow { max-width: 640px; }
.foot { text-align: center; color: var(--muted); font-size: .76rem; padding: 18px 16px 30px; }

/* mobile top bar + drawer */
.mbar { display: none; }
.sb-scrim { display: none; }
@media (max-width: 979px) {
  .mbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
    color: #fff; background: linear-gradient(120deg, rgba(0,112,122,.92), rgba(0,161,173,.86));
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 4px 18px rgba(11,67,74,.18); }
  .mbar-menu { width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
  .mbar-menu svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .mbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; min-width: 0; }
  .mbar-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar-logo.logo-img { max-height: 32px; max-width: 120px; border-radius: 6px; }
  .mbar-logo.logo-mark { width: 32px; height: 32px; border-radius: 9px; } .mbar-logo.logo-mark svg { width: 18px; height: 18px; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; width: min(84vw, 300px); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(11,67,74,.32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .main { margin-left: 0; }
  .wrap { padding: 16px 14px 8px; }
  h1 { font-size: 1.3rem; }
}

/* -------- layout helpers -------- */
.pagehead, .row-between, .sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pagehead { margin-bottom: 16px; }
.pagehead h1 { margin: 0; }
.sec-head { margin-bottom: 14px; }
.sec-head h2 { margin: 0; }
.sec-head h2 small { font-weight: 500; margin-left: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline { display: inline; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; font-weight: 600; text-decoration: none; }

/* flash */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; border: 1px solid transparent; }
.flash-ok { background: var(--green-bg); color: var(--green); border-color: #bfe8cc; }
.flash-erro { background: var(--red-bg); color: var(--red); border-color: #f7c6c1; }
.flash-info { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-100); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.85); color: var(--brand-900); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 42px; transition: background .15s, box-shadow .15s; }
.btn:hover { background: #fff; box-shadow: 0 2px 10px rgba(11,67,74,.1); color: var(--brand-900); }
.btn-primary { background: linear-gradient(135deg, var(--brand-600), var(--brand-700)); border-color: var(--brand-700); color: #fff; box-shadow: 0 4px 14px rgba(0,112,122,.28); }
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-700), var(--brand-800)); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 11px; min-height: 34px; font-size: .85rem; border-radius: 9px; }
.btn-xs { padding: 1px 8px; min-height: 28px; font-size: .8rem; border-radius: 8px; }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* forms */
.form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 14px; color: var(--brand-900); }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form textarea, .search, select, .lote {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 11px; font: inherit; font-weight: 400;
  background: rgba(255,255,255,.9); color: var(--ink); }
select { width: auto; margin: 0; padding: 8px 10px; }
.form select { width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0,161,173,.25); border-color: var(--brand-500) !important; }
.form label.check, label.check { display: flex; align-items: center; gap: 9px; font-weight: 500; }
label.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-600); }
fieldset { border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 16px; }
legend { font-weight: 600; font-size: .88rem; padding: 0 6px; color: var(--brand-900); }
.hint { color: var(--muted); font-size: .82rem; margin: 6px 0 16px; line-height: 1.45; }
.card > .hint:last-child, .form > .hint:last-child { margin-bottom: 0; }
.grid2, .grid3 { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1.4fr 1fr; } }
.form.compact label { margin-bottom: 10px; }
.row-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-bottom: 12px; }
.row-form input { flex: 1; min-width: 220px; margin: 0 !important; }
.file-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.logo-preview { min-width: 120px; min-height: 64px; padding: 10px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-600), var(--brand-500)); display: grid; place-items: center; }
.logo-preview img { max-height: 60px; max-width: 240px; display: block; border-radius: 6px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-tight td { padding: 8px 10px; }
.table .num { text-align: right; white-space: nowrap; }
.table .col-qtd { width: 110px; text-align: right; white-space: nowrap; }
.table .col-date { width: 118px; white-space: nowrap; }
.table .col-st { width: 150px; }
.table .col-act { width: 1%; white-space: nowrap; text-align: right; }
.table.cols-right .col-qtd, .table.cols-right .col-date, .table.cols-right .col-st { text-align: right; }
.table.cols-right .col-st .badge + .badge { margin-left: 4px; }
.table tr.sec-row td { background: var(--brand-50); font-weight: 700; font-size: .78rem; letter-spacing: .03em; color: var(--brand-800); padding-top: 9px; padding-bottom: 9px; }
.table tr.hl td { background: rgba(0,161,173,.07); }
.st-expirado td:first-child { box-shadow: inset 4px 0 var(--red); }
.st-m1 td:first-child { box-shadow: inset 4px 0 #ea580c; }
.st-retirar td:first-child { box-shadow: inset 4px 0 #eab308; }
.list-retirar .st-expirado td { background: rgba(253,228,226,.7); }
.list-retirar .st-m1 td { background: rgba(255,232,214,.7); }
.list-retirar .st-retirar td { background: rgba(255,243,196,.6); }

/* badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .73rem; font-weight: 700; background: var(--grey-bg); color: #475467; white-space: nowrap; }
.badge-navy, .badge-brand { background: var(--brand-100); color: var(--brand-800); }
.badge-red, .st-badge-expirado { background: var(--red-bg); color: var(--red); }
.badge-orange, .st-badge-m1 { background: var(--orange-bg); color: var(--orange); }
.st-badge-retirar { background: var(--amber-bg); color: var(--amber); }
.badge-green, .st-badge-ok { background: var(--green-bg); color: var(--green); }
.badge-farm { background: var(--farm-bg); color: var(--farm); }
.pill { padding: 5px 11px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill-red { background: var(--red-bg); color: var(--red); } .pill-green { background: var(--green-bg); color: var(--green); } .pill-grey { background: var(--grey-bg); color: #475467; }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { position: relative; overflow: hidden; border-radius: var(--radius); padding: 16px 18px; color: #fff; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.3); }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; transform: rotate(35deg); background: rgba(255,255,255,.12); }
.kpi b { display: block; font-size: 2.1rem; line-height: 1.05; }
.kpi span { font-size: .82rem; font-weight: 600; opacity: .95; }
.kpi-red { background: linear-gradient(135deg, #c8372b, #a41f15); } .kpi-navy, .kpi-brand { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); }
.kpi-orange { background: linear-gradient(135deg, #e0621f, #b94310); } .kpi-green { background: linear-gradient(135deg, #22a05a, #157a43); }
.carros-grid { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 800px) { .carros-grid { grid-template-columns: 1fr 1fr; } .carros-grid.single { grid-template-columns: 1fr; } }
.carros-grid .card { margin: 0; }
.carro-card.is-late { box-shadow: var(--shadow), inset 0 3px var(--red); }
.carro-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 4px; }
.carro-head h2 { margin: 0 0 2px; } .carro-head h2 a { color: var(--brand-900); text-decoration: none; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 12px; }
.ms { background: rgba(238,242,243,.85); border-radius: 12px; padding: 9px 6px; text-align: center; }
.ms b { display: block; font-size: 1.35rem; line-height: 1.15; }
.ms span { font-size: .7rem; color: var(--muted); font-weight: 600; }
.ms-red { background: var(--red-bg); color: var(--red); } .ms-amber { background: var(--amber-bg); color: var(--amber); } .ms-orange { background: var(--orange-bg); color: var(--orange); }
.ms-red span, .ms-amber span, .ms-orange span { color: inherit; }
.carro-dates { margin-bottom: 14px; }
.carro-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tiles { display: grid; gap: 14px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile-link { display: block; text-decoration: none; color: var(--ink); margin: 0; transition: transform .15s, box-shadow .15s; }
.tile-link:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11,67,74,.12); }
.tile-link strong { display: block; font-size: 1.05rem; color: var(--brand-900); } .tile-link span { display: block; color: var(--brand-700); font-weight: 600; margin: 4px 0; } .tile-link small { color: var(--muted); }
.seg { display: inline-flex; background: rgba(238,242,243,.9); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .85rem; }
.seg a.on { background: #fff; color: var(--brand-800); box-shadow: 0 1px 4px rgba(11,67,74,.12); }
.hist { padding-left: 18px; margin: 0 0 12px; } .hist li { margin-bottom: 7px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 16px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 600; }
@media (min-width: 900px) { .dl-inline { grid-template-columns: repeat(4, max-content 1fr); } }
.pager { display: flex; gap: 8px; justify-content: space-between; }
.prob { margin: 0; padding-left: 18px; } .prob li { margin-bottom: 5px; }
.sec { padding-bottom: 10px; }

/* verification */
.verif-head { margin-bottom: 14px; }
.verif-head h1 { margin: 6px 0 8px; }
.progress { height: 8px; background: rgba(10,90,98,.12); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-500), #22a05a); transition: width .2s; }
.vsec { padding: 0; overflow: hidden; scroll-margin-top: 80px; }
.vsec summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-weight: 700; color: var(--brand-900); }
.vsec summary::-webkit-details-marker { display: none; }
.vsec summary::after { content: "▾"; color: var(--muted); transition: transform .15s; }
.vsec[open] summary::after { transform: rotate(180deg); }
.vsec[open] summary { border-bottom: 1px solid var(--line); background: rgba(233,248,249,.7); }
.vsec-title { flex: 1; font-size: .95rem; }
.vsec-meta { display: flex; gap: 8px; align-items: center; font-size: .78rem; color: var(--muted); font-weight: 600; }
.vsec-tools { padding: 12px 20px 0; display: flex; justify-content: flex-end; }
.vitem { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.vitem:last-child { border-bottom: 0; }
.vitem-name strong { display: block; font-weight: 600; font-size: .95rem; }
.vitem-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.vitem-extra { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 10px; }
.vitem-extra .lote { width: auto; flex: 1; min-width: 140px; margin: 0; padding: 8px 10px; font-size: .88rem; }
.vitem.is-na .vitem-fields, .vitem.is-na .lote { opacity: .35; pointer-events: none; }
.vitem.is-falta .stepper { outline: 2px solid #ea580c; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: #fff; }
.stepper button { width: 44px; border: 0; background: var(--brand-50); font-size: 1.3rem; cursor: pointer; color: var(--brand-800); }
.stepper button:active { background: var(--brand-100); }
.stepper input { width: 60px; border: 0; text-align: center; font: inherit; font-weight: 700; font-size: 1.05rem; padding: 8px 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.date-field input { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 12px; font: inherit; min-height: 44px; background: #fff; }
.vbadge:empty { display: none; }
.vbadge { font-size: .74rem; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.vbadge.expirado { background: var(--red-bg); color: var(--red); } .vbadge.m1 { background: var(--orange-bg); color: var(--orange); }
.vbadge.retirar { background: var(--amber-bg); color: var(--amber); } .vbadge.ok { background: var(--green-bg); color: var(--green); }
.vbadge.sem { background: var(--grey-bg); color: #475467; }
.seg-func { margin-top: 10px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span { display: inline-block; padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; }
.seg-ok input:checked + span { background: #16a34a; color: #fff; }
.seg-nao_ok input:checked + span { background: var(--red); color: #fff; }
.seg-na input:checked + span { background: #667085; color: #fff; }
.seg-opt input:focus-visible + span { outline: 3px solid rgba(0,161,173,.35); }
.sticky-actions { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 14px 0 max(14px, env(safe-area-inset-bottom)); z-index: 5;
  background: linear-gradient(to top, rgba(238,248,249,.96) 65%, rgba(238,248,249,0)); }
.sticky-actions .btn { flex: 1; min-height: 50px; }
.danger-zone { text-align: center; margin: 12px 0 30px; }

/* restock */
.ritem { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ritem:last-child { border-bottom: 0; }
.ritem-check { align-items: flex-start !important; margin-bottom: 0 !important; }
.ritem-check input { margin-top: 3px !important; }
.ritem-fields { display: none; gap: 10px; flex-wrap: wrap; margin: 10px 0 0 27px; }
.ritem.on .ritem-fields { display: flex; }
.ritem-fields label { margin: 0; font-weight: 600; }
.ritem-fields input { margin-top: 4px; }
.ritem-fields .lote { width: auto; flex: 1; }
.ritem.hidden { display: none; }
.search { margin: 0; }

/* auth / install */
.auth-page { min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px 28px 26px; text-align: center; background: rgba(255,255,255,.8); }
.auth-card .form { text-align: left; margin-top: 20px; }
.auth-card h1 { margin: 14px 0 6px; font-size: 1.45rem; }
.auth-sub { margin-bottom: 18px; font-size: .9rem; }
.auth-brand { display: flex; justify-content: center; }
.auth-logo.logo-img { max-height: 84px; max-width: 100%; border-radius: 12px; }
.auth-logo.logo-mark { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; }
.auth-logo.logo-mark svg { width: 36px; height: 36px; }
.auth-card .hint { margin: 16px 0 0; }
.install-wrap { max-width: 680px; margin: 0 auto; padding: 32px 16px; }
.install-wrap h2 { margin-top: 22px; }
.checks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; margin: 0 0 16px; }
.checks .ok { color: var(--green); } .checks .bad { color: var(--red); font-weight: 700; }
.debug { white-space: pre-wrap; font-size: .75rem; background: #111; color: #eee; padding: 12px; border-radius: 10px; overflow: auto; }

@media (prefers-reduced-transparency: reduce) {
  .glass, .card, .glass-dark { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
  .glass-dark { background: var(--brand-700); }
}

/* v1.2 */
.form input.mini, input.mini { display: inline-block !important; width: 70px !important; margin: 0 6px !important; padding: 5px 8px !important; }
.form label.check > span { line-height: 2.2; }
.logo-form + .logo-form { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.logo-form h3 { margin-bottom: 10px; }
.logo-preview.light { background: #fff; border: 1px solid var(--line-strong); }
.file-col { flex: 1; min-width: 220px; }
.file-col .hint { margin-bottom: 0; }
.seg-lg a { padding: 8px 14px; font-size: .9rem; }
