/* Coleta de Leite – identidade visual da Cooperativa Barra Mansa */
:root {
  --azul: #0d2a4a; --azul-2: #1b4f8a; --azul-3: #2f6fb8; --azul-claro: #eaf1fa; --azul-borda: #c9daf0;
  --fundo: #f3f5f8; --card: #fff; --texto: #101b29; --sub: #5f6c7b; --sub-2: #8a96a5; --borda: #e2e7ee;
  --ok: #17804a; --ok-claro: #e4f4eb; --alerta: #b06300; --alerta-claro: #fff3dd; --erro: #c0281e; --erro-claro: #fdecea;
  --campo: #fff; --campo-borda: #d3dae4; --r: 16px; --r-sm: 12px;
  --sombra: 0 1px 2px rgba(16,27,41,.06), 0 2px 8px rgba(16,27,41,.05);
  --sombra-2: 0 6px 24px rgba(16,27,41,.12);
  --grad: linear-gradient(135deg, #0d2a4a 0%, #17406f 60%, #1f5a99 100%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --azul: #0a1f37; --azul-2: #6aa8ec; --azul-3: #8dbdf2; --azul-claro: #14273e; --azul-borda: #24405f;
    --fundo: #0b121a; --card: #131c27; --texto: #e9eef4; --sub: #9daaba; --sub-2: #75839a; --borda: #223042;
    --ok: #41c07b; --ok-claro: #11301f; --alerta: #f2ab3c; --alerta-claro: #33260d; --erro: #ff6f63; --erro-claro: #3b1613;
    --campo: #0e1620; --campo-borda: #2a3a4e;
    --sombra: 0 1px 2px rgba(0,0,0,.3); --sombra-2: 0 6px 24px rgba(0,0,0,.45);
    --grad: linear-gradient(135deg, #081a2e 0%, #0f3054 60%, #164577 100%);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); font: 16.5px/1.42 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
body { padding-bottom: env(safe-area-inset-bottom); }
a { color: inherit; }
.hide { display: none !important; }
.empty { text-align: center; color: var(--sub); padding: 36px 16px; }
.num { font-variant-numeric: tabular-nums; }
.i { flex: 0 0 auto; vertical-align: middle; }
.muted { color: var(--sub); font-size: 14px; }
.small { font-size: 13px; }

/* ---------- cabeçalho ---------- */
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--grad); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.18); }
header.top h1 { flex: 1; margin: 0; font-size: 17.5px; font-weight: 700; line-height: 1.2; min-width: 0; letter-spacing: -.005em; }
header.top h1 span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.top h1 small { display: block; font-size: 12.5px; font-weight: 500; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.top .back { display: grid; place-items: center; width: 38px; height: 38px; margin-left: -8px; border-radius: 12px; color: #fff; text-decoration: none; }
header.top .back:active { background: rgba(255,255,255,.12); }
header.top .logo { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.chips { display: flex; gap: 6px; align-items: center; }
.chip { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 5px 9px; border-radius: 99px; font-weight: 700; white-space: nowrap; background: rgba(255,255,255,.14); color: #fff; letter-spacing: .01em; }
.chip.warn { background: #f6c453; color: #3a2800; }
.chip.live { background: rgba(80, 220, 140, .2); color: #b7f5cf; }
.chip.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #4be38c; box-shadow: 0 0 0 0 rgba(75,227,140,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(75,227,140,.6); } 70% { box-shadow: 0 0 0 7px rgba(75,227,140,0); } 100% { box-shadow: 0 0 0 0 rgba(75,227,140,0); } }
.demo-band { background: #f6c453; color: #3a2800; text-align: center; font-size: 12.5px; font-weight: 700; padding: 5px 10px; letter-spacing: .01em; }

main { padding: 16px 16px 120px; max-width: 680px; margin: 0 auto; }
main.com-barra { padding-bottom: 150px; }

/* ---------- navegação inferior ---------- */
nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--borda); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(16,27,41,.06); }
nav.bottom > div { max-width: 680px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
nav.bottom a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 10px; text-decoration: none; color: var(--sub-2); font-size: 11.5px; font-weight: 650; position: relative; }
nav.bottom a.on { color: var(--azul-2); }
nav.bottom a.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--azul-2); }
nav.bottom a .dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: #22c55e; border: 2px solid var(--card); }

/* ---------- cartões ---------- */
.card { background: var(--card); border: 1px solid var(--borda); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--sombra); }
.card-h { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; }
.card-h .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--azul-claro); color: var(--azul-2); flex: 0 0 34px; }
.card-h h2 { margin: 0; font-size: 16px; font-weight: 750; flex: 1; letter-spacing: -.005em; }
.card-h .step { font-size: 12px; color: var(--sub-2); font-weight: 700; }
.card h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.01em; }
.sec-title { font-size: 12.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--sub); margin: 20px 4px 10px; display: flex; justify-content: space-between; align-items: center; }

/* ---------- botões ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 52px; padding: 12px 18px; font: inherit; font-weight: 700; font-size: 16.5px; border-radius: var(--r-sm); border: 0; background: var(--azul-2); color: #fff; cursor: pointer; text-decoration: none; text-align: center; transition: transform .06s, filter .15s; }
@media (prefers-color-scheme: dark) { .btn:not(.ok):not(.danger):not(.outline):not(.ghost):not(.soft) { color: #071628; } }
.btn:active { transform: scale(.985); filter: brightness(.95); }
.btn.big { min-height: 60px; font-size: 18px; border-radius: 14px; }
.btn.ok { background: var(--ok); color: #fff; box-shadow: 0 4px 14px rgba(23,128,74,.28); }
.btn.danger { background: var(--erro); color: #fff; }
.btn.outline { background: var(--card); color: var(--texto); border: 1.5px solid var(--campo-borda); }
.btn.soft { background: var(--azul-claro); color: var(--azul-2); }
.btn.ghost { background: transparent; color: var(--azul-2); min-height: 42px; }
.btn.sm { min-height: 42px; font-size: 14.5px; padding: 8px 12px; width: auto; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row2 > .btn { font-size: 15px; padding: 10px 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stack > * + * { margin-top: 10px; }

/* ---------- campos ---------- */
.fld { display: block; margin-bottom: 14px; }
.fld > span, .lbl { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--sub); margin-bottom: 7px; font-weight: 700; }
.req::after { content: '*'; color: var(--erro); margin-left: 1px; }
input, textarea, select { width: 100%; font: inherit; padding: 13px 14px; border: 1.5px solid var(--campo-borda); border-radius: var(--r-sm); background: var(--campo); color: var(--texto); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--azul-3); box-shadow: 0 0 0 4px rgba(47,111,184,.15); }
input::placeholder, textarea::placeholder { color: var(--sub-2); }
.unit { display: flex; align-items: center; border: 1.5px solid var(--campo-borda); border-radius: var(--r-sm); background: var(--campo); transition: border-color .15s, box-shadow .15s, background .15s; }
.unit input { border: 0; background: transparent; box-shadow: none !important; }
.unit em { font-style: normal; color: var(--sub); padding-right: 14px; font-size: 16px; font-weight: 700; }
.unit:focus-within { border-color: var(--azul-3); box-shadow: 0 0 0 4px rgba(47,111,184,.15); }
.unit.xl input { font-size: 38px; font-weight: 800; padding: 10px 14px; letter-spacing: -.01em; }
.unit.xl em { font-size: 20px; }
.unit.lg input { font-size: 24px; font-weight: 750; padding: 10px 14px; }
.unit.warn { border-color: var(--alerta); background: var(--alerta-claro); }
.unit.err { border-color: var(--erro); background: var(--erro-claro); }
.hint { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin-top: 7px; font-weight: 650; color: var(--sub); }
.hint:empty { display: none; }
.hint.ok { color: var(--ok); } .hint.warn { color: var(--alerta); } .hint.err { color: var(--erro); }

/* escolhas */
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 58px; font: inherit; font-weight: 750; font-size: 17px; border: 1.5px solid var(--campo-borda); background: var(--campo); border-radius: var(--r-sm); color: var(--sub); cursor: pointer; transition: all .12s; }
.seg button.on { background: var(--azul-2); border-color: var(--azul-2); color: #fff; box-shadow: 0 3px 10px rgba(27,79,138,.25); }
@media (prefers-color-scheme: dark) { .seg button.on { color: #071628; } }
.seg button.neg.on { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 3px 10px rgba(23,128,74,.25); }
.seg button.pos.on { background: var(--erro); border-color: var(--erro); color: #fff; box-shadow: 0 3px 10px rgba(192,40,30,.25); }
.seg.comp button { font-size: 24px; flex-direction: column; gap: 0; line-height: 1; }
.seg.comp button small { font-size: 11px; font-weight: 650; opacity: .75; margin-top: 4px; letter-spacing: .03em; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button { font: inherit; font-size: 14px; font-weight: 650; padding: 8px 13px; border-radius: 99px; border: 1.5px solid var(--campo-borda); background: var(--campo); color: var(--sub); cursor: pointer; }
.pills button.on { background: var(--azul-claro); border-color: var(--azul-3); color: var(--azul-2); }
.chk { display: flex; gap: 12px; align-items: center; padding: 12px 0; cursor: pointer; font-weight: 650; border-bottom: 1px solid var(--borda); }
.chk:last-child { border-bottom: 0; }
.chk input { width: 24px; height: 24px; flex: 0 0 24px; margin: 0; accent-color: var(--ok); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-weight: 650; cursor: pointer; }
.switch input { appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--campo-borda); position: relative; padding: 0; border: 0; flex: 0 0 48px; cursor: pointer; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .2s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { left: 23px; }

.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 12px; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.alert .i { margin-top: 1px; }
.alert.warn { background: var(--alerta-claro); color: var(--alerta); }
.alert.err { background: var(--erro-claro); color: var(--erro); }
.alert.ok { background: var(--ok-claro); color: var(--ok); }
.alert.info { background: var(--azul-claro); color: var(--azul-2); }
.alert > div { flex: 1; }

/* ---------- destaque (hero) ---------- */
.hero { background: var(--grad); color: #fff; border-radius: 20px; padding: 18px; margin-bottom: 14px; box-shadow: var(--sombra-2); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.06); pointer-events: none; }
.hero .k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .82; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.hero .v { font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin-top: 6px; }
.hero .v small { font-size: 18px; font-weight: 650; opacity: .8; letter-spacing: 0; }
.hero .meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; opacity: .9; }
.hero .meta span { display: inline-flex; align-items: center; gap: 5px; }
.comps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.comps div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 9px 10px; }
.comps b { display: block; font-size: 18px; font-weight: 800; }
.comps span { font-size: 11.5px; opacity: .8; font-weight: 600; }
.bar { height: 8px; border-radius: 9px; background: rgba(255,255,255,.16); overflow: hidden; margin-top: 14px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #5fe39b, #b6f5cf); border-radius: 9px; transition: width .4s; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stats.two { grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--card); border: 1px solid var(--borda); border-radius: var(--r); padding: 12px 13px; box-shadow: var(--sombra); }
.stat .si { color: var(--azul-2); margin-bottom: 6px; }
.stat b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.stat span { font-size: 12.5px; color: var(--sub); font-weight: 650; }

/* ---------- próximo produtor ---------- */
.next-card { background: var(--card); border: 2px solid var(--azul-3); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: 0 6px 20px rgba(27,79,138,.14); }
.next-card .lbl2 { font-size: 12px; font-weight: 800; color: var(--azul-2); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; }
.next-card h3 { font-size: 21px; margin: 6px 0 2px; }
.next-card .acts { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }

/* ---------- lista de produtores ---------- */
.search { position: relative; margin-bottom: 12px; }
.search input { padding-left: 42px; }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--sub-2); }
.prod { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--borda); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; text-decoration: none; cursor: pointer; box-shadow: var(--sombra); transition: transform .06s; }
.prod:active { transform: scale(.99); }
.prod .ord { flex: 0 0 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--azul-claro); color: var(--azul-2); font-weight: 800; font-size: 14px; }
.prod .info { flex: 1; min-width: 0; }
.prod .info b { display: block; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod .info small { display: block; color: var(--sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod .res { text-align: right; font-weight: 800; font-size: 17px; white-space: nowrap; }
.prod .res small { display: block; font-weight: 600; font-size: 12px; color: var(--sub); }
.prod .chev { color: var(--sub-2); }
.prod.done .ord { background: var(--ok-claro); color: var(--ok); }
.prod.skip .ord { background: var(--alerta-claro); color: var(--alerta); }
.prod.next { border-color: var(--azul-3); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: var(--azul-claro); color: var(--azul-2); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.tag.ok { background: var(--ok-claro); color: var(--ok); }
.tag.warn { background: var(--alerta-claro); color: var(--alerta); }
.tag.err { background: var(--erro-claro); color: var(--erro); }
.tag.grey { background: var(--fundo); color: var(--sub); }

/* ---------- barra de ação fixa ---------- */
.footbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--borda); }
.footbar > div { max-width: 680px; margin: 0 auto; display: flex; gap: 10px; }
.footbar .btn { flex: 1; }

/* ---------- vale ---------- */
.vale-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vale-top .n { text-align: right; flex: 0 0 auto; }
.vale-top .n small { display: block; font-size: 11px; color: var(--sub); font-weight: 800; letter-spacing: .06em; }
.vale-top .n b { display: block; font-size: 21px; letter-spacing: .02em; color: var(--erro); }
.vale-top .n span { font-size: 12.5px; color: var(--sub); }
.loc { font-size: 13px; color: var(--sub); margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--borda); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.loc a { color: var(--azul-2); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }

.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.fotos:empty { display: none; }
.foto { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fundo); }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto span { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; letter-spacing: .02em; }
.foto button { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.cam-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; border: 2px dashed var(--azul-borda); border-radius: 14px; background: var(--azul-claro); color: var(--azul-2); font-weight: 750; cursor: pointer; font-size: 16px; }
.sig-wrap { border: 1.5px dashed var(--campo-borda); border-radius: 12px; background: #fff; position: relative; }
.sig-wrap canvas { width: 100%; height: 170px; display: block; touch-action: none; }
.sig-wrap .line { position: absolute; left: 16px; right: 16px; bottom: 36px; border-bottom: 1px solid #c9d1da; pointer-events: none; }
.sig-wrap .x { position: absolute; left: 14px; bottom: 40px; color: #9aa6b5; font-size: 18px; pointer-events: none; }
.sig-img { width: 100%; max-height: 140px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--borda); }
details.more > summary { cursor: pointer; font-weight: 750; color: var(--azul-2); padding: 4px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .i:last-child { margin-left: auto; transition: transform .2s; }
details.more[open] > summary .i:last-child { transform: rotate(90deg); }
details.more[open] > summary { margin-bottom: 10px; }

.vale-img { width: 100%; border-radius: 14px; box-shadow: var(--sombra-2); display: block; margin-bottom: 14px; background: #fff; }
.status-line { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13.5px; font-weight: 650; color: var(--sub); margin-top: 12px; text-align: center; }
.status-line.ok { color: var(--ok); }

/* ---------- diálogos ---------- */
.dlg { position: fixed; inset: 0; z-index: 50; background: rgba(5,12,20,.55); display: flex; align-items: flex-end; justify-content: center; padding: 12px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.dlg-box { background: var(--card); border-radius: 22px; padding: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: var(--sombra-2); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(30px); } }
.dlg-box h3 { margin: 0 0 14px; font-size: 19px; }
.dlg-box p { margin: 0 0 18px; font-size: 16.5px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-weight: 650; padding: 14px; margin-bottom: 8px; border-radius: 13px; border: 1.5px solid var(--campo-borda); background: var(--campo); color: var(--texto); cursor: pointer; }
.opt.on { border-color: var(--azul-3); background: var(--azul-claro); }
.opt .r { margin-left: auto; color: var(--sub); font-weight: 600; font-size: 13.5px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; transition: .25s; z-index: 60; background: #16212d; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 650; width: max-content; max-width: 92vw; box-shadow: 0 8px 24px rgba(0,0,0,.3); display: flex; gap: 8px; align-items: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.ok { background: var(--ok); } .toast.err { background: var(--erro); }

/* ---------- login ---------- */
.login-bg { min-height: 100vh; background: var(--grad); display: flex; flex-direction: column; }
.login { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 20px; max-width: 440px; width: 100%; margin: 0 auto; }
.login .brand { text-align: center; margin-bottom: 26px; color: #fff; }
.login .brand img { width: 108px; height: 108px; background: #fff; border-radius: 50%; padding: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.login .brand h1 { margin: 16px 0 4px; font-size: 26px; letter-spacing: -.02em; }
.login .brand p { margin: 0; opacity: .78; font-size: 14px; }
.login .card { padding: 22px; border: 0; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.pin { letter-spacing: .5em; text-align: center; font-size: 28px; font-weight: 800; }
.ver { text-align: center; color: rgba(255,255,255,.7); font-size: 12px; margin-top: 18px; }
.ver.dark { color: var(--sub); }

/* ---------- perfil / mais ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.avatar { width: 54px; height: 54px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 21px; font-weight: 800; flex: 0 0 54px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--borda); text-decoration: none; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; font: inherit; color: var(--texto); text-align: left; }
.menu-item:last-child { border-bottom: 0; }
.menu-item .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--azul-claro); color: var(--azul-2); }
.menu-item div { flex: 1; }
.menu-item div small { display: block; color: var(--sub); font-size: 13px; }

/* ---------- tabelas ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--sub); padding: 10px 8px; border-bottom: 1px solid var(--borda); white-space: nowrap; font-weight: 750; background: var(--fundo); position: sticky; top: 0; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--azul-claro); }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 800; border-top: 1.5px solid var(--borda); border-bottom: 0; background: var(--fundo); }
.scroll-x { overflow: auto; -webkit-overflow-scrolling: touch; max-height: 70vh; border-radius: 10px; border: 1px solid var(--borda); }

/* Selo do Netlify (plano gratuito, ~64 px no canto de baixo) */
html.com-selo nav.bottom { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
html.com-selo .footbar { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
html.com-selo main { padding-bottom: 190px; }
html.com-selo .toast { bottom: 150px; }

/* leitor de QR Code */
.qr-tela { position: fixed; inset: 0; z-index: 55; background: #000; display: flex; flex-direction: column; justify-content: space-between; }
.qr-tela video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qr-mira { position: absolute; left: 50%; top: 40%; width: min(68vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid #fff; border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.qr-topo { position: relative; color: #fff; text-align: center; font-weight: 750; font-size: 18px; padding: max(24px, env(safe-area-inset-top)) 16px 0; }
.qr-base { position: relative; padding: 16px; padding-bottom: max(18px, env(safe-area-inset-bottom)); display: grid; gap: 10px; max-width: 520px; width: 100%; margin: 0 auto; }
html.com-selo .qr-base { padding-bottom: 80px; }
.qr-msg { margin: 0; color: #fff; text-align: center; font-weight: 650; text-shadow: 0 1px 4px #000; }
.qr-msg:empty { display: none; }

/* ---------- modo simples do motorista ---------- */
html.simples, html.simples body { font-size: 18.5px; }
html.simples .btn.big { min-height: 64px; }
.s-main { display: flex; flex-direction: column; gap: 12px; padding-bottom: 40px; }
html.com-selo .s-main { padding-bottom: 100px; }
.s-main .alert, .s-main .fotos { margin: 0; }
.s-main label.btn { cursor: pointer; }
.s-menu { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.16); color: #fff; }
.s-ola { font-size: 26px; text-align: center; padding: 8px 0; }
.s-gigante { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 176px; padding: 18px; border: 0; border-radius: 24px; background: var(--grad); color: #fff; font: inherit; text-decoration: none; text-align: center; cursor: pointer; box-shadow: var(--sombra-2); }
.s-gigante span { font-size: 28px; font-weight: 850; letter-spacing: .01em; line-height: 1.15; }
.s-gigante small { font-size: 17px; opacity: .85; font-weight: 600; }
.s-gigante.ok { background: var(--ok); }
.s-gigante.ruim { background: var(--erro); }
.s-gigante:active, .s-opcao:active, .s-teclas button:active, .s-comps button:active, .s-salvar:active { transform: scale(.97); filter: brightness(.93); }
.s-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; background: var(--card); border: 1px solid var(--borda); border-radius: 18px; padding: 16px 18px; }
.s-total span { color: var(--sub); font-weight: 700; }
.s-total b { font-size: 26px; font-weight: 850; }
.s-total.grande b { font-size: 36px; }
.s-pergunta { margin: 4px 0 0; font-size: 28px; font-weight: 850; text-align: center; letter-spacing: -.01em; }
.s-ajuda { margin: -6px 0 0; text-align: center; color: var(--sub); font-weight: 600; }
.s-opcao { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 92px; padding: 18px 20px; font: inherit; font-size: 24px; font-weight: 800; text-align: left; border: 2.5px solid var(--azul-3); border-radius: 20px; background: var(--card); color: var(--texto); cursor: pointer; }
.s-opcao .i { color: var(--azul-2); }
.s-mais > summary { cursor: pointer; text-align: center; font-weight: 750; color: var(--azul-2); padding: 14px; border: 1.5px solid var(--campo-borda); border-radius: 14px; background: var(--card); list-style: none; }
.s-mais[open] > summary { margin-bottom: 12px; }
.s-mais > .s-opcao, .s-mais > .btn { margin-bottom: 10px; }
.s-proximo { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; text-decoration: none; background: var(--card); border: 2.5px solid var(--ok); border-radius: 20px; padding: 16px 18px; }
.s-proximo small { grid-column: 1; color: var(--sub); font-weight: 700; font-size: 14px; }
.s-proximo b { grid-column: 1; font-size: 22px; line-height: 1.2; }
.s-proximo .i { grid-column: 2; grid-row: 1 / span 2; color: var(--ok); }
.s-passos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.s-passos i { height: 7px; border-radius: 9px; background: var(--borda); }
.s-passos i.on { background: var(--ok); }
.s-visor { display: flex; align-items: baseline; justify-content: center; gap: 10px; min-height: 92px; background: var(--card); border: 3px solid var(--azul-3); border-radius: 20px; padding: 6px 12px; }
.s-visor b { font-size: 62px; font-weight: 850; line-height: 1.2; }
.s-visor b.vazio { color: var(--sub-2); }
.s-visor em { font-style: normal; font-size: 22px; font-weight: 700; color: var(--sub); }
.s-teclas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.s-teclas button { min-height: 64px; font: inherit; font-size: 32px; font-weight: 800; border: 1.5px solid var(--campo-borda); border-radius: 16px; background: var(--card); color: var(--texto); cursor: pointer; touch-action: manipulation; user-select: none; }
.s-salvar { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 76px; border: 0; border-radius: 20px; background: var(--ok); color: #fff; font: inherit; font-size: 26px; font-weight: 850; cursor: pointer; box-shadow: 0 5px 18px rgba(23,128,74,.32); }
.s-rodape { display: flex; gap: 10px; margin-top: 6px; }
.s-rodape .btn { flex: 1; font-size: 16px; }
.s-nao { color: var(--erro) !important; }
.s-comps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.s-comps button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 150px; font: inherit; border: 2.5px solid var(--azul-3); border-radius: 20px; background: var(--card); color: var(--texto); cursor: pointer; }
.s-comps button b { font-size: 60px; font-weight: 850; line-height: 1; }
.s-comps button small { font-size: 12.5px; font-weight: 700; color: var(--ok); margin-top: 8px; }
.s-comps button.ultimo { border-color: var(--ok); background: var(--ok-claro); }
.s-comps button.on { background: var(--azul-2); color: #fff; }
.s-linha { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 12px 16px; font: inherit; border: 1.5px solid var(--campo-borda); border-radius: 16px; background: var(--card); color: var(--texto); text-align: left; cursor: pointer; }
.s-linha span { color: var(--sub); font-weight: 700; flex: 1; }
.s-linha b { font-size: 22px; font-weight: 850; }
.s-linha .i { color: var(--sub-2); }
.s-check { width: 34px; height: 34px; flex: 0 0 34px; accent-color: var(--ok); }
.s-salvo { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; border-radius: 24px; padding: 24px 16px; background: var(--ok-claro); color: var(--ok); }
.s-salvo b { font-size: 32px; font-weight: 850; }
.s-salvo span { font-size: 26px; font-weight: 800; color: var(--texto); }
.s-salvo small { font-size: 16px; color: var(--sub); font-weight: 700; }
.s-salvo.nao { background: var(--alerta-claro); color: var(--alerta); }
.s-salvo.nao span { font-size: 19px; }
.s-dlg h3 { font-size: 24px; text-align: center; }
.s-dlg p { text-align: center; font-size: 18px; }
.s-dlg .btn { margin-top: 10px; }
.s-dlg.perigo { border: 4px solid var(--erro); }
.s-dlg.perigo h3 { color: var(--erro); }
.s-dlg.aviso { border: 4px solid var(--alerta); }
.s-placa { font-size: 30px; font-weight: 800; text-align: center; text-transform: uppercase; }
@media (max-height: 720px) { .s-teclas button { min-height: 54px; font-size: 28px; } .s-visor { min-height: 74px; } .s-visor b { font-size: 48px; } .s-pergunta { font-size: 23px; } }
#salvar.s-salvar { position: sticky; bottom: 12px; z-index: 5; flex: 0 0 auto; }
html.com-selo #salvar.s-salvar { bottom: 72px; }
.s-linha { min-height: 54px; padding: 9px 16px; }
