/* Controle de Frota — mobile first */
:root{
  --o:#ff6a00; --o-d:#c94f00; --o-l:#fff1e6;
  --ink:#111; --mut:#666; --line:#e4e4e0; --bg:#f4f4f1; --card:#fff;
  --red:#c62020; --red-l:#fde8e8; --green:#17803f; --green-l:#e3f5ea; --blue:#1a56db; --blue-l:#e6eefc; --amber-l:#fff1dc; --amber:#a85a00;
  --r:16px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
a{color:inherit;text-decoration:none}
h1{font-size:1.5rem;margin:0 0 .25rem;line-height:1.15} h2{font-size:1.15rem;margin:0 0 .5rem} h3{font-size:1.05rem;margin:0 0 .4rem}
p{margin:.3rem 0}
.muted{color:var(--mut)} .small{font-size:.86rem} [hidden]{display:none!important}

/* topo e navegação */
.top{position:sticky;top:0;z-index:20;background:#111;color:#fff;padding:0}
.top-row{display:flex;align-items:center;justify-content:space-between;padding:10px 14px}
.topnav{display:flex;gap:0;justify-content:space-between;overflow-x:auto;padding:0 4px;border-top:1px solid #2c2c2c}
.topnav a{flex:1 0 auto;text-align:center;padding:12px 8px;color:#bbb;font-weight:700;font-size:.84rem;border-bottom:3px solid transparent;white-space:nowrap}
.topnav a.on{color:#fff;border-bottom-color:var(--o)}
.admin main{padding-bottom:40px}
.brand{font-weight:800;display:flex;align-items:center;gap:8px}
.brand i{width:14px;height:14px;background:var(--o);border-radius:4px;display:inline-block}
.who{display:flex;align-items:center;gap:10px;font-size:.9rem}
.who button{background:none;border:1.5px solid #555;color:#fff;border-radius:8px;padding:6px 10px;font:inherit;font-size:.85rem;cursor:pointer}
#tabs{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;background:#fff;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
#tabs a{flex:1;text-align:center;padding:16px 4px;font-size:.92rem;font-weight:800;color:#777;border-top:3px solid transparent}
#tabs a.on{color:#111;border-top-color:var(--o)}
main{max-width:720px;margin:0 auto;padding:16px 14px 110px}

/* botões e campos */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 20px;border-radius:14px;border:2px solid var(--ink);background:var(--ink);color:#fff;font:inherit;font-weight:800;cursor:pointer;width:100%;text-align:center}
.btn.pri{background:var(--o);border-color:var(--o)}
.btn.ghost{background:#fff;color:var(--ink);border-color:var(--line)}
.btn.danger{background:#fff;color:var(--red);border-color:var(--red)}
.btn.sm{min-height:42px;font-size:.92rem;padding:0 14px;width:auto;display:inline-flex}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.stack>*+*{margin-top:10px}
label{display:block;font-weight:700;font-size:.92rem}
label>input,label>select,label>textarea{margin-top:5px;font-weight:400}
input[type=text],input[type=password],input[type=number],input[type=datetime-local],select,textarea,.note{width:100%;min-height:50px;padding:10px 12px;border:2px solid #d4d4d0;border-radius:12px;font:inherit;background:#fff;color:var(--ink)}
textarea{min-height:90px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:3px solid var(--o-l);border-color:var(--o)}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:16px;margin-bottom:14px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}

.pill{display:inline-block;padding:3px 11px;border-radius:99px;font-size:.8rem;font-weight:800;background:#eee;color:#444;white-space:nowrap}
.pill.ok{background:var(--green-l);color:var(--green)} .pill.bad{background:var(--red-l);color:var(--red)}
.pill.warn{background:var(--amber-l);color:var(--amber)} .pill.info{background:var(--blue-l);color:var(--blue)}
.pills{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}

/* conferência: topo */
.datebar{margin-bottom:12px}
.vtitle{font-size:.8rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--mut);margin:14px 2px 8px}
.chips{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
.chip{min-height:60px;border-radius:14px;border:2px solid var(--line);background:#fff;font:inherit;font-weight:800;font-size:1.02rem;cursor:pointer;padding:6px 10px}
.chip.on{background:var(--o);border-color:var(--o);color:#fff}

/* seções */
.sec{background:var(--card);border:1px solid var(--line);border-radius:var(--r);margin-bottom:12px;overflow:hidden}
.sec.open{border-color:#111}
.sec-h{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:none;border:0;padding:14px;font:inherit;color:inherit;cursor:pointer}
.sec-n{flex:none;width:34px;height:34px;border-radius:50%;background:#111;color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center}
.sec-t{flex:1;min-width:0} .sec-t b{display:block;font-size:1.05rem} .sec-t span{display:block;font-size:.84rem;color:var(--mut)}
.sec-b{padding:4px 14px 16px;border-top:1px solid var(--line)}
.sec-h .chev{color:#999;font-size:1.2rem}
.done{background:var(--green-l);border-radius:12px;padding:12px 14px;margin:12px 0}
.done.warn{background:var(--amber-l)}
.info-box{background:var(--blue-l);border-radius:12px;padding:10px 14px;margin:12px 0;font-size:.92rem}
.warn-box{background:var(--amber-l);border-radius:12px;padding:10px 14px;margin:12px 0;font-size:.92rem}

/* itens OK / Problema */
.opt{padding:12px 0;border-bottom:1px solid var(--line)}
.opt:last-of-type{border-bottom:0}
.opt-l b{display:block} .opt-l span{display:block;font-size:.84rem;color:var(--mut)}
.seg2{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.seg2 button{min-height:52px;border-radius:12px;border:2px solid #d4d4d0;background:#fff;font:inherit;font-weight:800;color:#777;cursor:pointer}
.seg2 button.on.ok{background:var(--green);border-color:var(--green);color:#fff}
.seg2 button.on.prob{background:var(--red);border-color:var(--red);color:#fff}
.opt .note{margin-top:8px}
.toggle2{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.toggle2 button{min-height:56px;border-radius:14px;border:2px solid #d4d4d0;background:#fff;font:inherit;font-weight:800;cursor:pointer}
.toggle2 button.on{background:#111;border-color:#111;color:#fff}
.bigcheck{display:flex;align-items:center;gap:12px;padding:14px;border:2px solid #d4d4d0;border-radius:14px;margin-bottom:8px;font-weight:700;cursor:pointer}
.bigcheck input{width:26px;height:26px;margin:0;accent-color:var(--green)}

/* figuras */
.fig{border:2px solid var(--line);border-radius:14px;padding:10px;margin:10px 0;background:#fff}
.fig.ok{border-color:var(--green)} .fig.oc{border-color:var(--o)}
.fig-h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.fig svg{width:100%;display:block;touch-action:manipulation}
.a1{fill:#fff;stroke:#222;stroke-width:2;stroke-linejoin:round} .a2{fill:#e6e6e2;stroke:#222;stroke-width:2;stroke-linejoin:round}
.a3{fill:#cfe3f0;stroke:#222;stroke-width:1.5;stroke-linejoin:round} .a4{fill:#f3b1b1;stroke:#222;stroke-width:1.5}
.wl{fill:#2a2a2a;stroke:#222;stroke-width:1.5}
.q{fill:transparent;stroke:#9a9a96;stroke-width:1;stroke-dasharray:4 3;cursor:pointer}
.q:active{fill:rgba(255,106,0,.18)}
.q.k{fill:rgba(198,32,32,.22)} .q.n{fill:rgba(255,106,0,.5);stroke:var(--o);stroke-dasharray:none;stroke-width:2}
.qt{font:800 15px system-ui;text-anchor:middle;dominant-baseline:middle;pointer-events:none;fill:#111}
.legend{display:flex;gap:12px;flex-wrap:wrap;font-size:.78rem;color:var(--mut);margin-top:4px}
.legend i{display:inline-block;width:12px;height:12px;border-radius:3px;vertical-align:-1px;margin-right:4px}
.oc-item{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-top:8px;background:#fffaf5}

/* ocorrências e listas */
.oc{border:1px solid #f1c4c4;background:#fffafa;border-radius:14px;padding:14px;margin-bottom:12px}
.oc.resolvida{border-color:#bfe3cd;background:#fafdfb;opacity:.85}
.attr{background:var(--o-l);border-radius:10px;padding:9px 12px;margin-top:8px;font-size:.9rem}
.thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.thumbs .t{position:relative}
.thumbs img{width:88px;height:88px;object-fit:cover;border-radius:10px;border:1px solid var(--line);display:block}
.thumbs .x{position:absolute;top:-7px;right:-7px;width:28px;height:28px;border-radius:50%;border:0;background:var(--red);color:#fff;font-weight:800;font-size:1rem}
.vcard{display:block;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:14px;margin-bottom:12px}
.vcard h3{margin:0}
.kv{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.kv span{display:block;font-size:.75rem;color:var(--mut);text-transform:uppercase;letter-spacing:.04em} .kv b{font-size:1rem}
.li{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}
.li:last-child{border-bottom:0}
.head{margin-bottom:14px}
.empty{text-align:center;padding:30px 10px;color:var(--mut)}
.filters{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;margin-bottom:10px}
.filters button{flex:none;min-height:42px;padding:0 16px;border-radius:99px;border:2px solid var(--line);background:#fff;font:inherit;font-weight:700;cursor:pointer}
.filters button.on{background:#111;color:#fff;border-color:#111}

/* login */
.login{max-width:380px;margin:0 auto;padding:60px 20px}
.login .logo{display:flex;align-items:center;gap:10px;font-size:1.5rem;font-weight:800;margin-bottom:26px}
.login .logo i{width:22px;height:22px;background:var(--o);border-radius:6px}
.err{color:var(--red);font-weight:700;margin:6px 0}

/* folha de baixo, aviso, ampliar */
#sheet{position:fixed;inset:0;z-index:40;background:rgba(0,0,0,.5);display:flex;align-items:flex-end;justify-content:center}
#sheet .panel{background:#fff;width:100%;max-width:720px;max-height:92vh;overflow:auto;border-radius:20px 20px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
#toast{position:fixed;left:50%;transform:translateX(-50%);bottom:84px;z-index:60;background:#111;color:#fff;padding:12px 18px;border-radius:12px;font-weight:700;max-width:90vw;text-align:center}
#lb{position:fixed;inset:0;background:rgba(0,0,0,.9);z-index:50;display:flex;align-items:center;justify-content:center;padding:16px}
#lb img{max-width:100%;max-height:100%;border-radius:8px}
.thumbs img,.zoomable{cursor:zoom-in}

@media (min-width:760px){
  main{padding-top:24px}
  #tabs{position:static;border:0;max-width:720px;margin:0 auto;background:none}
}

/* grade 15x15 */
.fig svg{width:100%;height:auto;display:block}
.fig svg .hit{cursor:crosshair}
.mk-k{fill:rgba(198,32,32,.4)} .mk-n{fill:rgba(255,106,0,.6);stroke:var(--o);stroke-width:1.5;vector-effect:non-scaling-stroke} .mk-s{fill:rgba(26,86,219,.45);stroke:#1a56db;stroke-width:1.5;vector-effect:non-scaling-stroke}
.fig svg.tall,.minifig svg.tall{max-width:300px;margin:0 auto}
.minifig{max-width:340px;margin:8px auto}.minifig svg{width:100%;height:auto;display:block;border-radius:8px}
.selbar{display:grid;gap:8px;margin-top:8px;padding:10px;border-radius:12px;background:var(--blue-l)}
.anexos{margin-top:16px;padding:14px;border:2px dashed #cfcfca;border-radius:14px}
.anexos .btn{margin-top:6px}

/* ===== Aba Ajuda ===== */
.ajuda-idx{position:sticky;top:0;z-index:5;background:var(--bg);padding-top:6px}
.admin .ajuda-idx{top:0}
.card[id],.passo[id]{scroll-margin-top:120px}
.vis{display:grid;gap:12px;margin-top:12px}
.vis-c{border:1px solid var(--line);border-radius:14px;padding:12px;background:#fafaf8}
.vis-c h3{margin:0 0 8px}
.dias{display:flex;gap:4px}.dias span{flex:1;height:30px;border-radius:6px;background:var(--green-l);color:var(--green);font-weight:800;display:flex;align-items:center;justify-content:center;font-size:.8rem}
.dias span.ini{background:var(--o);color:#fff}.dias span.fim{background:var(--red-l);box-shadow:inset 0 0 0 2px var(--red)}
.dias.d14 span{height:18px}
.fluxo{display:flex;align-items:center;gap:6px}.fluxo span{flex:1;text-align:center;padding:8px 4px;border-radius:10px;background:#111;color:#fff;font-weight:800;font-size:.8rem}
.fluxo span:nth-child(3){background:#eee;color:#555}.fluxo i{width:16px;height:2px;background:#999;position:relative;flex:none}.fluxo i:after{content:"";position:absolute;right:-1px;top:-4px;border:5px solid transparent;border-left:7px solid #999;border-right:0}
.cores{display:grid;gap:10px;margin-top:8px}.cores div{display:flex;align-items:center;gap:12px}.cores .pill{flex:none;min-width:130px;text-align:center}
.passo{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:16px;margin-bottom:16px}
.passo-h{display:flex;align-items:center;gap:12px;margin-bottom:6px}.passo-h h2{margin:0}
.pn{flex:none;width:36px;height:36px;border-radius:50%;background:var(--o);color:#fff;font-weight:900;display:flex;align-items:center;justify-content:center}
.shot{margin:12px 0}.phone-wrap{position:relative;max-width:350px;margin:0 auto;padding:0 40px}
.phone{position:relative;aspect-ratio:390/844;border-radius:22px;border:6px solid #111;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,.18);background:#fff}
.phone img{width:100%;height:100%;display:block;object-fit:cover}
.phone-ov{position:absolute;left:46px;right:46px;top:6px;bottom:6px;width:calc(100% - 92px);height:calc(100% - 12px);overflow:visible;pointer-events:none}
.ring{fill:rgba(255,106,0,.08);stroke:#ff6a00;stroke-width:4;animation:pulso 1.8s ease-in-out infinite}
.arr{fill:none;stroke:#ff6a00;stroke-width:4.5;stroke-linecap:round}
.bdg{fill:#111;stroke:#fff;stroke-width:2.5}.bdt{fill:#fff;font:800 22px system-ui;text-anchor:middle;dominant-baseline:middle}
@keyframes pulso{0%,100%{stroke-opacity:1}50%{stroke-opacity:.35}}
@media (prefers-reduced-motion:reduce){.ring{animation:none}}
.leg{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}.leg li{display:flex;gap:10px;align-items:flex-start}
.leg .n{flex:none;width:26px;height:26px;border-radius:50%;background:#111;color:#fff;font-weight:800;font-size:.85rem;display:flex;align-items:center;justify-content:center;margin-top:1px}
.dica{background:var(--o-l);border-left:0;border-radius:12px;padding:10px 14px;margin-top:12px;font-size:.93rem}
.dica b{display:inline-block;background:var(--o);color:#fff;border-radius:6px;padding:0 8px;margin-right:8px;font-size:.8rem}
.caso{margin-top:14px}.caso h3{margin-bottom:8px}
.fl{display:flex;flex-direction:column;align-items:stretch}
.fl .bx{border:2px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff}.fl .bx b{display:block}.fl .bx span{font-size:.9rem;color:var(--mut)}
.fl .bx.ok{border-color:var(--green);background:var(--green-l)}.fl .bx.bad{border-color:var(--red);background:var(--red-l)}.fl .bx.res{border-color:var(--o);background:var(--o-l)}
.fl .sp{height:22px;position:relative}.fl .sp:before{content:"";position:absolute;left:50%;top:2px;bottom:8px;width:3px;background:#999;transform:translateX(-50%)}
.fl .sp:after{content:"";position:absolute;left:50%;bottom:0;transform:translateX(-50%);border:7px solid transparent;border-top:9px solid #999;border-bottom:0}
details{border-top:1px solid var(--line);padding:12px 0}details:first-of-type{border-top:0}
summary{font-weight:800;cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:10px}
summary::-webkit-details-marker{display:none}summary:after{content:"+";font-size:1.3rem;line-height:1;color:var(--o-d)}details[open] summary:after{content:"–"}
@media (min-width:760px){.vis{grid-template-columns:1fr 1fr}.passo .passo-b{display:grid;grid-template-columns:350px 1fr;gap:20px;align-items:start}.fl{flex-direction:row;align-items:stretch}.fl .bx{flex:1}.fl .sp{width:34px;height:auto;flex:none}.fl .sp:before{left:2px;right:10px;top:50%;bottom:auto;width:auto;height:3px;transform:none}.fl .sp:after{left:auto;right:2px;bottom:auto;top:50%;transform:translateY(-50%);border:7px solid transparent;border-left:9px solid #999;border-right:0;border-top-color:transparent}}

/* data fixa, alertas e resumo do admin */
.datebar.fixa{display:block;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.datebar.fixa span{display:block;font-weight:400;color:var(--mut);font-size:.9rem;margin-top:2px}
.alerta{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;margin-top:10px;border-radius:12px;background:var(--amber-l)}
.alerta.bad{background:var(--red-l)}.alerta.info{background:var(--blue-l)}.alerta .btn{flex:none}
.ultok{margin-top:8px;padding-top:8px;border-top:1px dashed var(--line)}
