:root {
  --orange:#ff7f12; --orange-dark:#e36700; --navy:#0e315f; --paper:#fffaf4;
  --cream:#efe6d8; --line:#f2d3a5; --danger:#ef4438; --ok:#2e9e44; --warn:#e6a700;
  --muted:#68758a;
}
* { box-sizing:border-box; }
html, body { margin:0; padding:0; max-width:100%; overflow-x:hidden; }
img { max-width:100%; height:auto; }
body {
  min-height:100vh; background:var(--cream); color:var(--navy);
  font-family:Arial, Helvetica, sans-serif; padding-bottom:76px;
}
.hidden { display:none !important; }
/* o atributo `hidden` do HTML perdia para qualquer regra nossa com display (ex.: label.field
   é display:block) — o campo ficava visível mesmo escondido no código. Agora vale sempre. */
[hidden] { display:none !important; }

/* ---------- ampulheta global de processamento ---------- */
#busy-overlay {
  position:fixed; inset:0; z-index:99999;
  display:none; align-items:center; justify-content:center;
  background:rgba(14,49,95,0.28); backdrop-filter:blur(1px);
}
#busy-overlay.on { display:flex; }
#busy-overlay .busy-box {
  background:#fff; border-radius:16px; padding:22px 30px; text-align:center;
  box-shadow:0 12px 44px rgba(0,0,0,0.28); min-width:150px;
}
#busy-overlay .busy-glass { font-size:44px; line-height:1; display:inline-block; animation:busy-flip 1.1s ease-in-out infinite; }
#busy-overlay .busy-txt { margin-top:10px; font-weight:800; font-size:13px; color:var(--navy); letter-spacing:.3px; }
@keyframes busy-flip { 0%{transform:rotate(0)} 45%{transform:rotate(175deg)} 55%{transform:rotate(185deg)} 100%{transform:rotate(360deg)} }
@media print { #busy-overlay { display:none !important; } }

/* ---------- topo (hero laranja com logo + mascote) ---------- */
.topbar {
  position:relative; z-index:20; color:#fff;
  background:linear-gradient(165deg, #e36700 0%, #f47920 48%, #ff8c2e 100%);
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:14px;
  padding:22px 18px 18px; box-shadow:0 3px 12px rgba(0,0,0,.22);
  border-bottom:3px solid rgba(14,49,95,.35);
}
.tb-logo { width:128px; height:auto; filter:drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.tb-burger {
  position:absolute; top:12px; left:12px; z-index:2;
  background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.5); color:#fff;
  width:40px; height:40px; border-radius:9px; font-size:22px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.tb-burger:active { background:rgba(255,255,255,.32); }

/* ---------- menu lateral (drawer) ---------- */
.drawer-overlay {
  position:fixed; inset:0; background:rgba(14,49,95,.5); z-index:80;
  opacity:0; pointer-events:none; transition:opacity .2s;
}
.drawer-overlay.open { opacity:1; pointer-events:auto; }
.drawer {
  position:fixed; top:0; left:0; bottom:0; z-index:90; width:min(300px, 84vw);
  background:var(--paper); box-shadow:4px 0 24px rgba(0,0,0,.3);
  transform:translateX(-100%); transition:transform .22s ease;
  display:flex; flex-direction:column; overflow-y:auto;
}
.drawer.open { transform:translateX(0); }
.dw-head {
  display:flex; align-items:center; gap:12px; padding:20px 16px 16px;
  background:linear-gradient(165deg, #e36700, #f47920); color:#fff; position:relative;
}
.dw-avatar {
  width:48px; height:48px; border-radius:50%; background:#fff; color:var(--orange-dark);
  display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:900; flex-shrink:0;
}
.dw-user { min-width:0; }
.dw-name { font-size:16px; font-weight:900; line-height:1.15; }
.dw-role { font-size:11.5px; opacity:.95; font-weight:700; }
.dw-close {
  position:absolute; top:10px; right:10px; background:rgba(255,255,255,.2); border:0; color:#fff;
  width:30px; height:30px; border-radius:50%; font-size:15px; cursor:pointer;
}
.dw-nav { flex:1; padding:8px 0; }
.dw-group {
  font-size:11px; font-weight:900; letter-spacing:1.5px; text-transform:uppercase;
  color:var(--orange-dark); padding:14px 18px 4px;
}
.dw-item {
  display:flex; align-items:center; gap:12px; padding:12px 18px; text-decoration:none;
  color:var(--navy); font-size:15px; font-weight:800; border:0; background:none;
  width:100%; text-align:left; cursor:pointer; font-family:inherit;
}
.dw-item:active { background:#f7ecdc; }
.dw-item.active { background:#fff3e4; box-shadow:inset 4px 0 0 var(--orange); }
.dw-ico { font-size:18px; width:24px; text-align:center; }
.dw-foot { border-top:1px solid var(--line); padding:6px 0 14px; }
.dw-logout { color:var(--danger); }
.tb-center { text-align:center; min-width:0; }
.tb-title {
  font-size:clamp(19px, 5.5vw, 25px); font-weight:900; line-height:1.1;
  letter-spacing:clamp(1.5px, .9vw, 4px); white-space:nowrap;
  text-shadow:0 2px 4px rgba(0,0,0,.18);
}
.tb-sub {
  font-size:clamp(8.5px, 2.4vw, 10.5px); font-weight:800; text-transform:uppercase;
  letter-spacing:clamp(.8px, .5vw, 2.2px); white-space:nowrap;
  opacity:.95; margin-top:4px; display:flex; align-items:center; justify-content:center; gap:8px;
}
.tb-sub::before, .tb-sub::after {
  content:''; height:1px; width:clamp(10px, 3vw, 26px); background:rgba(255,255,255,.6); flex-shrink:0;
}
.tb-mascot {
  width:84px; height:84px; border-radius:50%; object-fit:contain; object-position:center;
  border:3px solid #fff; box-shadow:0 3px 10px rgba(0,0,0,.25); background:#fff;
}
.tb-filial {
  display:inline-flex; align-items:center; gap:9px; margin-top:10px;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.55);
  color:#fff; font-size:12px; font-weight:900; letter-spacing:1.5px;
  padding:4px 16px 4px 5px; border-radius:99px; text-transform:uppercase;
  backdrop-filter:blur(2px); text-shadow:0 1px 2px rgba(0,0,0,.2); white-space:nowrap;
  max-width:100%; overflow:hidden; text-overflow:ellipsis;
}
.tb-filial-cod {
  background:#fff; color:var(--orange-dark); border-radius:99px; min-width:24px; height:24px;
  display:inline-flex; align-items:center; justify-content:center; font-size:12.5px;
  box-shadow:0 1px 3px rgba(0,0,0,.2); text-shadow:none; letter-spacing:0; flex-shrink:0;
}
.tb-datetime {
  margin-top:7px; font-size:11.5px; font-weight:800; color:#fff; letter-spacing:.4px;
  opacity:.95; text-shadow:0 1px 2px rgba(0,0,0,.25);
}

@media (max-width: 520px) {
  .topbar { padding:16px 10px 14px; gap:8px; }
  .tb-logo { width:74px; }
  .tb-mascot { width:56px; height:56px; border-width:2px; }
  .tb-sub::before, .tb-sub::after { display:none; }
  .tb-sub { font-size:8.5px; letter-spacing:.6px; }
  .tb-filial { font-size:10.5px; letter-spacing:.8px; margin-top:7px; padding:3px 12px 3px 4px; }
  .tb-filial-cod { min-width:20px; height:20px; font-size:11px; }
  .tb-datetime { font-size:10px; margin-top:5px; }
  .tb-pill { font-size:8.5px; padding:3px 9px; top:5px; right:8px; }
}
.tb-pill {
  position:absolute; top:8px; right:12px; background:rgba(255,255,255,.22);
  border:1px solid rgba(255,255,255,.5); color:#fff; font-size:10px; font-weight:900;
  letter-spacing:1.5px; padding:4px 12px; border-radius:99px;
}

/* faixa do usuário logado */
.userbar {
  background:var(--paper); border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 16px; font-size:12.5px; font-weight:800; color:var(--muted);
}
.userbar a { color:#f36f00; text-decoration:none; font-weight:900; }

/* seletor de filial global (todas as telas) */
.filialbar { display:flex; align-items:center; gap:8px; background:#fbf1e2; border-bottom:1px solid var(--line); padding:7px 14px; }
.filialbar .fb-ico { font-size:16px; }
.filialbar select {
  flex:1; min-width:0; height:40px; border:2px solid var(--line); border-radius:8px;
  padding:0 10px; font:inherit; font-size:14px; font-weight:900; color:var(--navy); background:#fff;
}

/* topo da home: filtro de empresa + atualizar */
.home-top { display:grid; grid-template-columns:1fr; gap:10px; padding:12px 14px; align-items:end; }
.home-top select { font-weight:900; }
.home-top .btn { min-height:46px; }
.ht-info { font-size:12px; color:var(--muted); font-weight:800; }
@media (min-width:600px) {
  .home-top { grid-template-columns:minmax(260px, 380px) auto 1fr; }
  .ht-info { text-align:right; }
}

/* barra de ações do resumo */
.actionbar { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.actionbar .grow { flex:1; min-width:0; font-size:12px; color:var(--muted); font-weight:800; line-height:1.35; }
.actionbar .grow b { color:var(--navy); font-size:13px; }
.dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--ok); margin-right:6px; }

/* alerta de risco */
.alertbar {
  border-radius:8px; padding:13px 14px; font-weight:900; font-size:13.5px; margin-bottom:14px;
  border-left:6px solid;
}
.alertbar.green { background:#f0fae9; color:#315817; border-color:#5cb85c; }
.alertbar.vencido { background:#f6d7d3; color:#5c1a14; border-color:#5c1a14; }
.alertbar.red { background:#fde3e1; color:#b3271b; border-color:var(--danger); }
.alertbar.orange { background:#ffe8d6; color:#b5480a; border-color:#e8590c; }
.alertbar.yellow { background:#fff3cd; color:#7a6000; border-color:var(--warn); }

/* ---------- navegação inferior ---------- */
.bottomnav {
  position:fixed; bottom:0; left:0; right:0; z-index:20;
  display:flex; background:var(--paper); border-top:2px solid var(--line);
  box-shadow:0 -4px 14px rgba(35,28,16,.12);
}
.bottomnav a {
  flex:1; text-align:center; padding:8px 1px 9px; text-decoration:none;
  color:var(--muted); font-size:10px; font-weight:800; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.bottomnav a .ico { display:block; font-size:18px; margin-bottom:2px; }
.bottomnav a.active { color:var(--orange-dark); }

/* ---------- conteúdo ---------- */
.page { padding:16px; max-width:760px; margin:0 auto; }
/* telas grandes (tablet/desktop): aproveita a largura, menos vazio */
@media (min-width:900px) {
  .page { max-width:1040px; padding:20px 24px; }
}
.page h2 { margin:4px 0 14px; font-size:22px; }
.page h3 { margin:18px 0 8px; font-size:16px; }

.card {
  background:var(--paper); border:1px solid var(--line); border-radius:10px;
  padding:14px; margin-bottom:12px; box-shadow:0 3px 10px rgba(35,28,16,.07);
}
.card h4 { margin:0 0 10px; font-size:15px; }

.kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:10px; margin-bottom:14px; }
.kpi { background:var(--paper); border:1px solid var(--line); border-radius:10px; padding:14px 14px 12px; text-align:left; box-shadow:0 3px 10px rgba(35,28,16,.06); }
.kpi .l { font-size:10.5px; font-weight:900; color:var(--muted); letter-spacing:1.8px; text-transform:uppercase; }
.kpi .v { font-size:30px; font-weight:900; color:var(--navy); margin:2px 0; }
.kpi .d { font-size:12px; font-weight:700; color:var(--muted); }
.kpi.danger .v { color:var(--danger); }
.kpi.vencido .v { color:#5c1a14; }
.kpi.warn .v, .kpi .v.v-warn { color:#c99700; }
.kpi.ok .v, .kpi .v.v-ok { color:var(--ok); }
.kpi.orange .v { color:var(--orange-dark); }
.kpis-5 { grid-template-columns:repeat(5, 1fr); }
@media (max-width:720px) { .kpis-5 { grid-template-columns:1fr 1fr; } }

/* painel de risco (Home) */
.risk-hero {
  background:linear-gradient(135deg,#ffffff,#fff6ec); border:1px solid var(--line);
  border-left:6px solid var(--orange); border-radius:12px; padding:16px 18px; margin-bottom:12px;
  box-shadow:0 3px 12px rgba(35,28,16,.09); text-align:center;
}
.rh-cap { font-size:11px; font-weight:900; letter-spacing:1px; color:var(--muted); text-transform:uppercase; }
.rh-val { font-size:38px; font-weight:900; color:var(--orange-dark); line-height:1.05; margin:5px 0; }
.rh-val.danger { color:var(--danger); }
.rh-sub { font-size:13px; font-weight:800; color:var(--navy); }
.risk-cards { grid-template-columns:repeat(3,1fr); }
.risk-cards .kpi { text-align:center; padding:12px 8px; }
.risk-cards .kpi .v { font-size:26px; margin:0; }
.risk-cards .kpi .l { font-size:9.5px; letter-spacing:.6px; margin-top:3px; }
.risk-cards .kpi .d { font-size:12px; font-weight:900; margin-top:2px; }
.riskbar { display:flex; align-items:center; justify-content:space-between; gap:10px; text-decoration:none;
  border-radius:10px; padding:12px 14px; margin-bottom:10px; font-weight:900; border-left:6px solid; }
.riskbar.red { background:#fde3e1; color:#b3271b; border-color:var(--danger); }
.riskbar.vencido { background:#f6d7d3; color:#5c1a14; border-color:#5c1a14; }
.riskbar .rb-s { font-size:12px; font-weight:700; margin-top:2px; opacity:.9; }
.riskbar .rb-arw { font-size:24px; flex:none; }
.lv-tbl td:first-child { box-shadow:inset 4px 0 0 transparent; }
.lv-tbl tr.lv-vencido td:first-child { box-shadow:inset 4px 0 0 #5c1a14; }
.lv-tbl tr.lv-red td:first-child { box-shadow:inset 4px 0 0 var(--danger); }
.lv-tbl tr.lv-yellow td:first-child { box-shadow:inset 4px 0 0 var(--warn); }
.lv-tbl tr.lv-green td:first-child { box-shadow:inset 4px 0 0 var(--ok); }
.occ-mini { display:flex; gap:10px; flex-wrap:wrap; }
.occ-mini span { flex:1 1 30%; min-width:90px; background:var(--cream); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font-size:12px; font-weight:800; color:var(--muted); text-align:center; }
.occ-mini b { display:block; font-size:20px; color:var(--orange-dark); margin-top:2px; }
.dpill { display:inline-block; min-width:42px; padding:5px 12px; border-radius:99px; color:#fff; font-weight:900; font-size:14px; text-align:center; line-height:1; box-shadow:0 1px 3px rgba(0,0,0,.15); print-color-adjust:exact; -webkit-print-color-adjust:exact; }
/* resumo por filial no Resumo */
.rf-tbl td, .rf-tbl th { text-align:center; font-size:12px; }
.rf-tbl td:first-child, .rf-tbl th:first-child { text-align:left; }
.rf-tbl .rf { font-weight:700; }
.rf-tbl .rf-crit b { color:var(--danger); }
.rf-tbl .rf-aten b { color:#c99700; }
.rf-tbl .rf-ok b { color:var(--ok); }
/* Linha de filial que abre PDF: precisa PARECER clicável no dedo e no mouse */
.rf-tbl tr.rf-clic { cursor:pointer; transition:background .15s; }
.rf-tbl tr.rf-clic:hover { background:#fff3e4; }
.rf-tbl tr.rf-clic:active { background:#ffe7cc; }
.rf-pdf { display:inline-flex; vertical-align:-3px; margin-left:3px; }
.rf-pdf .mi { width:14px; height:14px; color:var(--orange); }
.rf-semfefo { display:inline-block; margin-top:2px; font-size:9.5px; font-weight:800; letter-spacing:.04em;
  text-transform:uppercase; color:#0f8b7d; background:#e7f7f3; border:1px solid #bfe8df;
  border-radius:99px; padding:1px 6px; }
.rf-tbl tr.rf-clic:hover .rf-pdf .mi { color:var(--danger); }
/* ---- PDF inventário: 4 blocos-resumo (crítico · atenção · % CX · % FD) ---- */
.inv-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:10px 0 4px; }
.inv-kpis .ik { border:1px solid #e3d5bd; border-radius:8px; padding:8px 10px; text-align:center; background:#fff; }
.inv-kpis .ik-v { font-size:17px; font-weight:900; line-height:1.1; }
.inv-kpis .ik-l { font-size:8.5px; font-weight:800; letter-spacing:.5px; color:#6b6355; margin-top:3px; }
.inv-kpis .ik-s { font-size:10px; color:#8a8172; margin-top:1px; }
.ik-crit { border-left:5px solid #e11900; }
.ik-crit .ik-v { color:#e11900; }
.ik-aten { border-left:5px solid #c99700; }
.ik-aten .ik-v { color:#c99700; }
.ik-pct { border-left:5px solid var(--navy); }
.ik-pct .ik-v { color:var(--navy); }
@media (max-width:640px) { .inv-kpis { grid-template-columns:1fr 1fr; } }
@media print { .inv-kpis, .inv-kpis .ik { -webkit-print-color-adjust:exact; print-color-adjust:exact; } }

/* ---- Freio mestre das APIs (Admin) ---- */
.apisw { border-left:6px solid var(--ok); }
.apisw.apisw-off { border-left-color:var(--danger); background:#fdf1f0; }
.apisw-row { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin:6px 0 8px; }
.apisw-estado { font-size:22px; letter-spacing:.5px; }
.apisw-on .apisw-estado b { color:var(--ok); }
.apisw-off .apisw-estado b { color:var(--danger); }
.apisw-info { color:#5b6678; font-size:12.5px; line-height:1.5; }

/* ---- HUB / Portal SEMALO ---- */
.hub { min-height:100vh; max-width:720px; margin:0 auto; padding:32px 20px 60px; display:flex; flex-direction:column; align-items:center; text-align:center; }
.hub-top { display:flex; align-items:center; justify-content:center; gap:18px; margin-top:8px; }
.hub-logo { width:150px; max-width:52%; height:auto; filter:drop-shadow(0 3px 6px rgba(0,0,0,.2)); }
.hub-mascot { width:78px; height:78px; border-radius:50%; object-fit:contain; border:4px solid #fff; box-shadow:0 6px 16px rgba(35,28,16,.18); background:#fff; }
.hub-h1 { margin:18px 0 2px; font-size:30px; font-weight:900; color:var(--navy); }
.hub-h1 span { color:var(--orange); }
.hub-sub { margin:0 0 22px; color:#4f5c76; font-weight:700; }
.hub-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; width:100%; }
@media (max-width:560px){ .hub-grid { grid-template-columns:1fr; } }
.hub-card { text-align:left; background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:20px; cursor:pointer; box-shadow:0 6px 16px rgba(35,28,16,.08); transition:transform .08s, box-shadow .15s; display:flex; flex-direction:column; gap:6px; }
.hub-card:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(35,28,16,.14); border-color:var(--orange); }
.hub-ico { font-size:40px; line-height:1; }
.hub-tt { font-size:20px; font-weight:900; color:var(--navy); }
.hub-ds { color:#5b6678; font-size:13px; line-height:1.4; min-height:34px; }
.hub-go { margin-top:6px; color:var(--orange-dark); font-weight:900; }
/* cartão NIKO (hub Comercial): não navega, liga e desliga o robô do WhatsApp */
.hub-card-niko { cursor:default; }
.hub-card-niko:hover { transform:none; }
.hub-niko-img { width:44px; height:44px; border-radius:50%; object-fit:cover; display:block; }
.hub-niko-sw { margin-top:6px; }
.hn-row { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.hn-estado { font-weight:900; font-size:16px; }
.hn-on .hn-estado b { color:var(--ok); }
.hn-off .hn-estado b { color:var(--danger); }
.hn-dot { display:inline-block; width:12px; height:12px; border-radius:50%; vertical-align:middle; margin:0 2px; }
.hn-on .hn-dot { background:var(--ok); box-shadow:0 0 0 4px rgba(46,158,68,.20); }
.hn-off .hn-dot { background:var(--danger); box-shadow:0 0 0 4px rgba(239,68,56,.20); }
/* NIKO RESPONDE (editor dos textos do robô) */
.nr-card { width:100%; max-width:760px; text-align:left; }
.nr-meta { color:#5b6678; font-size:12.5px; margin-bottom:6px; }
.nr-h3 { margin:16px 0 8px; font-size:13px; letter-spacing:.6px; text-transform:uppercase; color:#8a7a63; border-bottom:2px solid #e8d9c2; padding-bottom:4px; }
.nr-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; }
@media (max-width:560px){ .nr-grid { grid-template-columns:1fr; } }
.nr-field { display:flex; flex-direction:column; gap:4px; margin:6px 0; font-size:13px; color:var(--navy); font-weight:700; }
.nr-field input, .nr-field textarea { font:14px/1.4 system-ui, "Segoe UI", sans-serif; font-weight:400; color:var(--navy); padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; width:100%; box-sizing:border-box; resize:vertical; }
.nr-field textarea { min-height:38px; }
.nr-dica { font-weight:400; color:#8a7a63; font-size:12px; }
.nr-check { display:flex; align-items:center; gap:8px; margin:8px 0; font-size:13px; color:var(--navy); }
.nr-acoes { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; align-items:center; }
.nr-reset { color:var(--danger); }
.hn-teste { display:flex; gap:8px; margin-top:10px; align-items:center; }
.hn-teste input { flex:1; min-width:0; padding:8px 10px; border:1px solid var(--line); border-radius:10px; font-size:14px; background:#fff; }
.hn-previa { margin:8px 0 0; padding:10px 12px; background:#FFF8EE; border:1px solid #FFE3C2; border-radius:10px; font:13px/1.45 system-ui, "Segoe UI", sans-serif; white-space:pre-wrap; color:var(--navy); max-height:320px; overflow:auto; }
.hub-apisw { margin-top:18px; display:flex; align-items:center; gap:14px; background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:12px 18px; box-shadow:0 4px 12px rgba(35,28,16,.08); }
.hub-apisw.ha-on { border-left:6px solid var(--ok); }
.hub-apisw.ha-off { border-left:6px solid var(--danger); background:#fdf1f0; }
.ha-estado { font-size:16px; }
.ha-on .ha-estado b { color:var(--ok); }
.ha-off .ha-estado b { color:var(--danger); }
.ha-info { margin-top:6px; color:var(--muted); font-size:11.5px; }
.hub-exit { margin-top:26px; color:#8a3b32; font-weight:800; text-decoration:none; }
.hub-clock { margin-top:14px; color:var(--muted); font-size:12px; }
.ub-links { display:inline-flex; gap:2px; }

.rf-old { display:inline-block; background:var(--danger); color:#fff; font-weight:800; padding:1px 8px; border-radius:10px; }
.rf-ok2 { display:inline-block; background:#e4f3e7; color:var(--ok); font-weight:700; padding:1px 8px; border-radius:10px; }
.rf-nunca { color:#9a8f80; font-style:italic; }

/* ---------- formulários ---------- */
label.field { display:block; margin-bottom:12px; font-weight:900; font-size:13px; }
label.field input:not([type=checkbox]):not([type=radio]), label.field select, label.field textarea {
  display:block; width:100%; margin-top:6px; height:46px; border:1px solid var(--line);
  border-radius:8px; padding:0 12px; font:inherit; font-size:16px; color:var(--navy); background:#fff;
}
/* seletor de data customizado: visual idêntico em iOS/Android/desktop (dd/mm/aaaa) */
.datepick {
  position:relative; display:flex; align-items:center; gap:8px;
  height:46px; padding:0 14px; box-sizing:border-box;
  border:1px solid var(--line); border-radius:8px; background:#fff;
  color:var(--navy); font-weight:900; font-size:16px; cursor:pointer;
}
.datepick .dp-ico { font-size:16px; line-height:1; }
.datepick .dp-chev { margin-left:auto; color:var(--muted); font-size:14px; }
/* input nativo por cima, invisível: capta o toque e abre o calendário do sistema */
.datepick-input {
  position:absolute; inset:0; width:100%; height:100%;
  margin:0; padding:0; border:0; opacity:0; cursor:pointer;
  -webkit-appearance:none; appearance:none;
}
.datepick-input::-webkit-calendar-picker-indicator { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.row3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.exp-btns { display:flex; flex-wrap:wrap; gap:8px; }
.exp-btns .btn-ghost, .exp-btns .q-exp-on { flex:1 1 28%; min-width:88px; }
/* botão de faixa selecionado: assume a cor do sinalizador */
.q-exp-on {
  min-height:46px; border:0; border-radius:8px; padding:0 14px;
  font:inherit; font-weight:900; font-size:14px; cursor:pointer; color:#fff;
  box-shadow:0 3px 10px rgba(35,28,16,.18);
}
.q-exp-on.q-vencido { background:#5c1a14; }
.q-exp-on.q-red     { background:var(--danger); }
.q-exp-on.q-orange  { background:#e8590c; }
.q-exp-on.q-yellow  { background:#f5b800; color:#4a3a00; }
.q-exp-on.q-green   { background:var(--ok); }
.pos-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; margin-bottom:8px; }
.pos-grid .field { margin-bottom:0; font-size:12px; }
.pos-grid input { height:44px; padding:0 8px; text-align:center; }

.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:46px; border:0; border-radius:8px; padding:0 18px;
  font:inherit; font-weight:900; font-size:15px; cursor:pointer;
}
.btn-primary { background:var(--orange); color:#fff; }
.btn-primary:active { background:var(--orange-dark); }
.btn-navy { background:var(--navy); color:#fff; }
.btn-danger { background:var(--danger); color:#fff; }
.btn-ghost { background:transparent; border:1px solid var(--line); color:var(--navy); font-weight:800; border-radius:8px; min-height:40px; padding:0 12px; cursor:pointer; font-size:14px; }
.btn-block { width:100%; }
.btn[disabled] { opacity:.5; cursor:default; }

/* ---------- listas ---------- */
.list-item {
  background:var(--paper); border:1px solid var(--line); border-radius:10px;
  padding:12px 14px; margin-bottom:8px; display:flex; justify-content:space-between;
  align-items:center; gap:10px; cursor:pointer;
}
.list-item .main { min-width:0; }
.list-item .t { font-weight:900; font-size:14px; }
.list-item .s { font-size:12px; color:var(--muted); margin-top:2px; }

.badge { display:inline-block; padding:3px 9px; border-radius:99px; font-size:11px; font-weight:900; white-space:nowrap; }
.badge.vencido { background:#5c1a14; color:#fff; }
.badge.red { background:#fde3e1; color:#b3271b; }
.badge.orange { background:#ffe2cc; color:#c2410c; }
.badge.yellow { background:#fff3cd; color:#8a6d00; }
.badge.green { background:#e3f5e6; color:#1d6b2e; }
.badge.gray { background:#e8e8ee; color:#555f77; }
.badge.navy { background:#e0e9f7; color:var(--navy); }

table.tbl { width:100%; border-collapse:collapse; font-size:13px; }
table.tbl th { text-align:left; padding:8px 6px; border-bottom:2px solid var(--line); font-size:11px; color:var(--muted); text-transform:uppercase; }
table.tbl td { padding:9px 6px; border-bottom:1px solid #f0e6d2; }

/* ---------- login ---------- */
.auth-shell { min-height:100vh; display:grid; place-items:center; padding:24px; }
.auth-panel {
  width:min(440px,100%); background:var(--paper); border:1px solid var(--line);
  border-radius:10px; padding:30px; box-shadow:0 10px 22px rgba(35,28,16,.12);
}
.auth-panel h1 { margin:0 0 2px; font-size:30px; letter-spacing:.5px; }
.auth-panel h1 span { color:var(--orange); }
.auth-panel .auth-tag { margin:0 0 8px; color:var(--orange-dark); font-size:13px; font-weight:900; text-transform:uppercase; letter-spacing:1.6px; }
.auth-panel .auth-tag b { color:var(--navy); }
.auth-panel p { margin:0 0 20px; color:#4f5c76; font-size:14px; }
.brand-row { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:22px; }
.brand-logo { width:138px; max-width:48%; height:auto; filter:drop-shadow(0 3px 5px rgba(0,0,0,.22)); }
.brand-mascot {
  width:92px; height:92px; border-radius:50%; object-fit:contain; object-position:center;
  border:4px solid #fff; box-shadow:0 4px 12px rgba(0,0,0,.18); background:#fff;
}

/* ---------- câmera ---------- */
.cam-modal {
  position:fixed; inset:0; z-index:50; background:#000; display:flex; flex-direction:column;
}
.cam-top { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; color:#fff; font-weight:900; }
.cam-top .btn-ghost { color:#fff; border-color:#555; }
#cam-video { flex:1; width:100%; object-fit:cover; min-height:0; }
.cam-hint { color:#fff; text-align:center; padding:10px; font-size:13px; font-weight:800; background:rgba(0,0,0,.6); }
.cam-actions { padding:14px 16px calc(14px + env(safe-area-inset-bottom)); display:flex; gap:10px; background:#000; }
.cam-actions .btn { flex:1; }

/* ---------- verificação ---------- */
.check-line { display:flex; gap:10px; align-items:flex-start; padding:9px 0; border-bottom:1px solid #f0e6d2; font-size:14px; font-weight:700; }
.check-line .ic { font-size:18px; }
.verdict { border-radius:10px; padding:18px; text-align:center; font-size:20px; font-weight:900; margin-bottom:12px; }
.verdict.ok { background:#e3f5e6; color:#1d6b2e; border:2px solid #7cc98b; }
.verdict.bad { background:#fde3e1; color:#b3271b; border:2px solid #f0958d; }

/* ---------- toast ---------- */
.toast {
  position:fixed; left:50%; bottom:90px; transform:translateX(-50%); z-index:60;
  background:var(--navy); color:#fff; padding:12px 20px; border-radius:9px;
  font-weight:800; font-size:14px; box-shadow:0 6px 18px rgba(0,0,0,.3);
  max-width:90vw; text-align:center;
}
.toast.err { background:var(--danger); }

.muted { color:var(--muted); font-size:12px; }

/* modal do link de acesso */
.link-modal { position:fixed; inset:0; z-index:70; background:rgba(14,49,95,.55); display:grid; place-items:center; padding:20px; }
.link-box { width:min(460px,100%); background:var(--paper); border-radius:12px; padding:22px; box-shadow:0 12px 30px rgba(0,0,0,.3); }
.link-box h4 { margin:0 0 6px; font-size:16px; }
.ac-item { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.ac-main { min-width:0; }
.ac-main .badge { margin-top:3px; }
.ac-btns { display:flex; gap:6px; flex:none; }
.ac-btns .btn-ghost { min-height:38px; padding:0 10px; }
.link-box #lk-url {
  width:100%; height:48px; border:2px solid var(--line); border-radius:8px; padding:0 12px;
  font:inherit; font-size:13px; color:var(--navy); background:#fff; margin:12px 0; user-select:all;
}
.link-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.link-actions .btn { width:100%; min-height:46px; text-decoration:none; }

/* legenda dos sinalizadores + status nas linhas */
.legend {
  display:grid; grid-template-columns:auto 1fr; gap:6px 10px; align-items:center;
  background:var(--paper); border:1px dashed var(--line); border-radius:8px; padding:10px 12px; margin:10px 0;
}
.legend .lg-t { font-size:12px; color:var(--muted); font-weight:700; }
.list-item.st-vencido { border-left:6px solid #5c1a14; }
.list-item.st-red { border-left:6px solid var(--danger); }
.list-item.st-orange { border-left:6px solid #e8590c; }
.list-item.st-yellow { border-left:6px solid var(--warn); }
.list-item.st-green { border-left:6px solid var(--ok); }
.st-frase { font-size:12px; font-weight:800; margin-top:4px; }
.st-frase.red { color:#b3271b; }
.st-frase.yellow { color:#8a6d00; }
.st-frase.green { color:#1d6b2e; }
.sum-chips { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.sum-chips .badge { font-size:12.5px; padding:6px 12px; }

/* resumo profissional do dia (Banco de Dados) */
.bd-summary {
  display:grid; grid-template-columns:auto 1fr; gap:14px; align-items:stretch;
  margin:4px 0 10px;
}
.bd-date {
  background:var(--navy); color:#fff; border-radius:10px; padding:12px 18px;
  display:flex; flex-direction:column; justify-content:center; text-align:center;
  box-shadow:0 3px 8px rgba(14,49,95,.25);
}
.bd-date .d1 { font-size:19px; font-weight:900; letter-spacing:.5px; }
.bd-date .d2 { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:1.5px; opacity:.85; margin-top:2px; }
.bd-stats { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; margin:4px 0 10px; }

/* chips de filial no B. Dados */
.bd-filiais { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:10px; }
.fil-chip {
  border:1.5px solid var(--line); background:#fff; color:var(--muted);
  border-radius:99px; padding:4px 12px; font:inherit; font-size:12px; font-weight:800; cursor:pointer;
}
.fil-chip.on { background:var(--navy); color:#fff; border-color:var(--navy); }
.fil-chip.alt { border-style:dashed; color:var(--orange-dark); border-color:var(--orange); }
.bd-stats .bs {
  background:var(--paper); border:1px solid var(--line); border-radius:10px;
  padding:8px 6px; text-align:center; display:flex; flex-direction:column; justify-content:center;
}
.bd-stats .bs-v { font-size:20px; font-weight:900; color:var(--orange-dark); }
.bd-stats .bs-l { font-size:10px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.6px; margin-top:1px; }
.bd-stats .bs-r { font-size:11px; font-weight:900; color:var(--navy); margin-top:3px; opacity:.8; }
@media (max-width:520px) {
  .bd-summary { grid-template-columns:1fr; }
  .bd-stats { grid-template-columns:repeat(4, 1fr); }
  .bd-stats .bs-v { font-size:17px; }
}

/* selo grande de status (Banco de Dados) */
.st-chip {
  border-radius:10px; padding:8px 12px; text-align:center; min-width:88px;
  font-weight:900; flex-shrink:0; box-shadow:0 2px 6px rgba(0,0,0,.15);
}
.st-chip .scl { font-size:12px; letter-spacing:1px; }
.st-chip .scd { font-size:17px; margin-top:1px; }
.st-chip .scq {
  font-size:13px; margin-top:4px; padding-top:4px;
  border-top:1px solid rgba(255,255,255,.4);
}
.st-chip.yellow .scq { border-top-color:rgba(74,58,0,.25); }
.st-chip.vencido { background:#5c1a14; color:#fff; }
.st-chip.red { background:var(--danger); color:#fff; }
.st-chip.orange { background:#e8590c; color:#fff; }
.st-chip.yellow { background:#f5b800; color:#4a3a00; }
.st-chip.green { background:var(--ok); color:#fff; }
.gone-item { border-left:6px solid #9aa2b5; background:#f4f2ee; }

/* filtros multiseleção (estilo DRP) */
.msel-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:10px; }
.msel { position:relative; }
.msel-top { font-size:11px; font-weight:900; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:4px; display:flex; justify-content:space-between; align-items:baseline; }
.msel-all { color:var(--orange-dark); cursor:pointer; text-transform:none; font-size:11px; }
.msel-field { width:100%; height:46px; border:1px solid var(--line); border-radius:8px; background:#fff; padding:0 10px; display:flex; align-items:center; justify-content:space-between; gap:6px; font:inherit; font-weight:800; font-size:15px; color:var(--navy); cursor:pointer; }
.msel-sum { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.msel-chev { color:var(--muted); flex:none; }
.msel-panel { position:absolute; z-index:40; top:100%; left:0; right:0; margin-top:4px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 22px rgba(35,28,16,.2); max-height:260px; overflow:auto; padding:4px; }
.msel-opt { display:flex; align-items:center; gap:8px; padding:9px 8px; font-size:13px; font-weight:700; color:var(--navy); border-radius:6px; cursor:pointer; }
.msel-opt:hover { background:var(--cream); }
.msel-opt input { width:17px; height:17px; accent-color:var(--orange); }

/* barra de ações do Banco de Dados */
.bd-toolbar { display:flex; flex-direction:column; gap:10px; margin-bottom:6px; }
.bd-toolbar .field { margin:0; }
.bd-btns { display:flex; flex-wrap:wrap; gap:10px; }
.bd-btns .btn { flex:1 1 calc(50% - 5px); min-width:0; min-height:46px; padding:0 8px; font-size:14px; white-space:nowrap; }
@media (min-width:600px) {
  .bd-toolbar { flex-direction:row; align-items:center; }
  .bd-toolbar .field { width:200px; }
  .bd-toolbar .datepick { flex:0 0 200px; width:200px; }
  .bd-btns { flex:1; flex-wrap:nowrap; }
  .bd-btns .btn { flex:0 1 auto; padding:0 18px; font-size:15px; }
}
.bd-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.bd-actions .btn { min-height:46px; width:100%; }
.btn-outline {
  background:#fff; border:2px solid var(--orange); color:var(--orange-dark);
}
.btn-outline:active { background:#fff3e4; }

/* grade de capacidade por filial */
.cap-row { border-top:1px solid #f0e6d2; padding:10px 0 4px; }
.cap-row:first-child { border-top:0; }
.cap-emp { font-size:13px; font-weight:800; color:var(--navy); margin-bottom:4px; }
.cap-row .btn { min-height:46px; }

/* checkboxes de filiais no cadastro de usuário */
.emp-checks { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:4px 12px; margin:8px 0 14px; }
.emp-check { font-size:13px; font-weight:700; display:flex; align-items:center; gap:7px; padding:4px 0; }
.emp-check input { width:18px; height:18px; accent-color:var(--orange); }

/* ---------- relatório de inventário (PDF via impressão) — visual ERP, retrato ---------- */
.inv-print { background:#fff; min-height:100vh; color:#111; }
/* cabeçalho: faixa BRANCA com a logo colorida (onde era laranja virou branco) */
.inv-head {
  display:flex; align-items:center; gap:16px; padding:14px 18px;
  background:#fff; color:var(--navy); border-bottom:4px solid var(--orange);
  print-color-adjust:exact; -webkit-print-color-adjust:exact;
}
.inv-head > img:first-child { width:118px; }
.inv-mascot {
  width:60px; height:60px; border-radius:50%; object-fit:contain; margin-left:auto;
  border:3px solid var(--orange); box-shadow:0 2px 6px rgba(0,0,0,.15);
}
.inv-title { font-size:18px; font-weight:900; color:var(--navy); letter-spacing:.5px; }
.inv-filial { display:inline-block; margin:4px 0 2px; background:var(--orange); color:#fff; font-size:13px; font-weight:900;
  letter-spacing:.5px; padding:3px 12px; border-radius:6px; text-transform:uppercase;
  print-color-adjust:exact; -webkit-print-color-adjust:exact; }
.inv-sub { font-size:11px; color:#666; margin-top:3px; }
.inv-tot { padding:8px 18px; font-size:12px; color:var(--navy); background:#faf6ef; border-bottom:1px solid #e6dcc9;
  print-color-adjust:exact; -webkit-print-color-adjust:exact; }
.inv-tblwrap { margin:12px 18px 16px; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.inv-tbl { margin:0; width:100%; min-width:0; font-size:11px; border-collapse:collapse; }
/* cabeçalho da tabela na COR DA LOGO (laranja), FONTE BRANCA — repete em toda página impressa */
.inv-tbl thead { display:table-header-group; }
.inv-tbl th { background:var(--orange); color:#fff !important; font-size:10px; text-transform:uppercase; letter-spacing:.3px; text-align:left;
  print-color-adjust:exact; -webkit-print-color-adjust:exact; }
.inv-tbl thead th, .inv-cons thead th { color:#fff !important; }
.inv-tbl td, .inv-tbl th { border:1px solid #c9c9c9; padding:4px 7px; white-space:nowrap;
  print-color-adjust:exact; -webkit-print-color-adjust:exact; }
/* coluna Produto absorve o espaço; as demais ficam justas (sem vãos) */
.inv-tbl th:nth-child(4), .inv-tbl td.inv-prod { width:100%; white-space:normal; }
.inv-emp { font-size:9.5px; color:inherit; opacity:.8; }
/* ÚNICO destaque de linha: CRÍTICO/VENCIDO (≤60 dias) em vermelho, fonte branca. Resto em branco. */
.inv-tbl tr.inv-crit td { background:#e11900; color:#fff; }
.inv-tbl tr.inv-crit .dpill { background:#fff !important; color:#c62211 !important; }
.inv-tbl tr.inv-total td { background:#faf6ef; border-top:2px solid var(--orange); font-weight:900; }
.inv-cons th { background:#b3271b; }
.inv-tempo { margin:12px 18px 4px; border:1px solid #e3d5bd; border-radius:8px; padding:10px 14px; background:#faf6ef; max-width:340px;
  print-color-adjust:exact; -webkit-print-color-adjust:exact; break-inside:avoid; }
.inv-tempo .it-ttl { font-size:11px; font-weight:900; letter-spacing:.6px; color:var(--navy); margin-bottom:6px; }
.inv-tempo .it-row { display:flex; justify-content:space-between; gap:16px; font-size:12px; color:#4b4436; padding:2px 0; }
.inv-tempo .it-row b { color:var(--navy); font-variant-numeric:tabular-nums; }
.inv-tempo .it-dur { border-top:1px solid #e3d5bd; margin-top:4px; padding-top:5px; }
.inv-tempo .it-dur b { color:var(--orange-dark); font-size:14px; }
.inv-sign { display:flex; justify-content:space-between; gap:20px; padding:22px 18px 40px; font-size:12px; flex-wrap:wrap; }

/* celular: margens menores e cabeçalho compacto p/ o relatório caber melhor */
@media (max-width:560px) {
  .inv-head { padding:12px 12px 6px; gap:10px; }
  .inv-mascot { width:52px; height:52px; }
  .inv-title { font-size:15px; }
  .inv-sub { font-size:11px; }
  .inv-tot { padding:6px 12px 10px; font-size:11.5px; }
  .inv-tblwrap { margin:0 12px 16px; }
  .inv-sign { padding:18px 12px 30px; }
}

@media print {
  @page { size: A4 portrait; margin: 8mm; }
  html, body { padding-bottom:0; background:#fff; overflow:visible; }
  .no-print, .bottomnav, .topbar, .userbar, #toast, .cam-modal { display:none !important; }
  .inv-print { min-height:auto; }
  .inv-head { padding:10px 12px; }
  .inv-tblwrap { overflow:visible; margin:8px 0 12px; }
  .inv-tbl { font-size:9.5px; }
  .inv-tbl td, .inv-tbl th { padding:3px 5px; }
  .inv-tbl tr { break-inside:avoid; }
  .inv-tot, .inv-sign { padding-left:0; padding-right:0; }
}
.mt { margin-top:12px; }
.pick-step { border-left:5px solid var(--line); padding-left:12px; margin-bottom:14px; }
.pick-step.current { border-left-color:var(--orange); }
.pick-step.done { border-left-color:var(--ok); opacity:.75; }
.pos-big { font-size:26px; font-weight:900; letter-spacing:1px; color:var(--navy); }

/* ============ COMPACTAÇÃO MOBILE (telas pequenas) ============ */
@media (max-width: 560px) {
  body { padding-bottom:70px; }
  .page { padding:10px; }
  .page h2 { font-size:18px; margin:2px 0 10px; }
  .page h3 { font-size:14px; margin:12px 0 6px; }

  /* cards mais justos */
  .card { padding:10px; margin-bottom:9px; border-radius:9px; }
  .card h4 { font-size:14px; margin:0 0 8px; }
  .card p.muted { font-size:11px; }

  /* campos e botões menores */
  label.field { font-size:12px; margin-bottom:9px; }
  label.field input:not([type=checkbox]):not([type=radio]), label.field select, label.field textarea { height:42px; font-size:15px; margin-top:4px; }
  .btn { min-height:42px; font-size:14px; padding:0 14px; }
  .btn-ghost { min-height:38px; font-size:13px; }
  .row2, .row3 { gap:8px; }

  /* KPIs em 2 colunas compactas */
  .kpis { grid-template-columns:1fr 1fr; gap:8px; margin-bottom:10px; }
  .kpi { padding:9px 10px; border-radius:9px; }
  .kpi .l { font-size:9px; letter-spacing:1px; }
  .kpi .v { font-size:22px; margin:1px 0; }
  .kpi .d { font-size:10.5px; }

  /* topo da home mais enxuto */
  .home-top { padding:9px 10px; gap:8px; }
  .home-top .btn { min-height:42px; }

  /* alerta e legenda menores */
  .alertbar { font-size:12px; padding:10px 11px; margin-bottom:10px; }
  .legend { padding:8px 10px; gap:4px 8px; }
  .legend .lg-t { font-size:11px; }
  .badge { font-size:10px; padding:2px 7px; }

  /* banco de dados: resumo do dia compacto */
  .bd-summary { gap:8px; margin:2px 0 8px; }
  .bd-date { padding:8px 12px; }
  .bd-date .d1 { font-size:16px; }
  .bd-date .d2 { font-size:9.5px; letter-spacing:1px; }
  .bd-stats { gap:6px; }
  .bd-stats .bs { padding:6px 4px; }
  .bd-stats .bs-v { font-size:16px; }
  .bd-stats .bs-l { font-size:8.5px; letter-spacing:.3px; }

  /* selo de status menor */
  .st-chip { min-width:74px; padding:6px 9px; }
  .st-chip .scl { font-size:10px; }
  .st-chip .scd { font-size:14px; }
  .st-chip .scq { font-size:11px; margin-top:3px; padding-top:3px; }

  /* listas mais justas */
  .list-item { padding:9px 11px; margin-bottom:6px; }
  .list-item .t { font-size:13px; }
  .list-item .s { font-size:11px; }
  .st-frase { font-size:11px; }

  /* posição em grade: rótulos menores */
  .pos-grid { gap:6px; }
  .pos-grid .field { font-size:10.5px; }
  .pos-grid input { height:40px; }
}

/* ============ Material Symbols (ícones SVG oficiais Google) ============ */
.mi{ width:1.15em; height:1.15em; display:inline-block; vertical-align:-.18em; fill:currentColor; flex:none; }
.btn .mi, .btn-ghost .mi, .btn-navy .mi, .btn-primary .mi, .btn-danger .mi, .btn-outline .mi{ vertical-align:-.22em; margin-right:3px; }
h2 .mi, h3 .mi, h4 .mi{ vertical-align:-.15em; margin-right:7px; color:var(--orange-dark); }
/* barra inferior de navegação */
.bottomnav a{ text-align:center; }
.bottomnav a .ico{ line-height:0; }
.bottomnav a .ico .mi{ width:25px; height:25px; }
/* menu lateral (drawer) */
.dw-ico{ font-size:0; }
.dw-ico .mi{ width:22px; height:22px; color:var(--navy); }
.dw-item.active .dw-ico .mi, .dw-logout .dw-ico .mi{ color:inherit; }
.dw-close .mi{ width:22px; height:22px; }
/* topbar / burger */
.tb-burger .mi{ width:26px; height:26px; }
.tb-filial-cod .mi{ width:14px; height:14px; vertical-align:-.2em; }
/* userbar */
.userbar .mi{ width:15px; height:15px; vertical-align:-.2em; color:var(--muted); }
.userbar a .mi{ color:inherit; }
/* filialbar / datepicker */
.filialbar .fb-ico{ font-size:0; }
.filialbar .fb-ico .mi{ width:19px; height:19px; color:var(--orange-dark); vertical-align:-.25em; }
.datepick .dp-ico{ font-size:0; }
.datepick .dp-ico .mi{ width:18px; height:18px; color:var(--orange-dark); }
/* HUB / portal */
.hub-ico{ font-size:0; }
.hub-ico .mi{ width:42px; height:42px; color:var(--orange); }
.hub-exit .mi{ width:18px; height:18px; vertical-align:-.22em; margin-right:3px; }
.ha-estado .mi{ width:18px; height:18px; vertical-align:-.22em; color:var(--navy); }
/* relatórios impressos */
.inv-filial .mi{ width:16px; height:16px; vertical-align:-.2em; margin-right:2px; }
.inv-tempo .it-ttl .mi{ color:var(--navy); }
.riskbar .mi{ vertical-align:-.2em; margin-right:3px; }
/* pontos de status LIGADO/DESLIGADO (freio das APIs) */
.apisw-dot, .ha-dot{ display:inline-block; width:12px; height:12px; border-radius:50%; vertical-align:middle; margin:0 2px; }
.apisw-on .apisw-dot, .ha-on .ha-dot{ background:var(--ok); box-shadow:0 0 0 4px rgba(46,158,68,.20); }
.apisw-off .apisw-dot, .ha-off .ha-dot{ background:var(--danger); box-shadow:0 0 0 4px rgba(239,68,56,.20); }
@media print{ h2 .mi, h3 .mi, h4 .mi, .inv-filial .mi, .it-ttl .mi{ -webkit-print-color-adjust:exact; print-color-adjust:exact; } }

/* ==================== LIQUID GLASS (v62) ==================== */
:root{
  --glass-bg:rgba(255,255,255,.60);
  --glass-brd:rgba(255,255,255,.72);
  --glass-sh:0 8px 30px rgba(35,28,16,.12), inset 0 1px 0 rgba(255,255,255,.7);
}
/* fundo ambiente translúcido (para o vidro "ler" o blur) */
body{
  background:
    radial-gradient(115% 70% at 0% 0%, rgba(255,140,46,.20), transparent 55%),
    radial-gradient(110% 80% at 100% 2%, rgba(47,109,246,.14), transparent 55%),
    radial-gradient(140% 120% at 50% 118%, rgba(18,165,148,.12), transparent 60%),
    linear-gradient(180deg,#fbf3e8 0%, #f1e6d5 100%);
  background-attachment:fixed;
}
/* topbar glossy + cantos arredondados */
.topbar{
  border-radius:0 0 24px 24px; border-bottom:0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,0) 44%),
    linear-gradient(165deg,#e36700 0%, #f47920 48%, #ff8c2e 100%);
  box-shadow:0 10px 28px rgba(227,103,0,.34), inset 0 1px 0 rgba(255,255,255,.45);
}
/* logo Semalo descida (estava sobre o filtro/menu) */
.tb-logo{ margin-top:26px; }
@media (max-width:520px){ .tb-logo{ margin-top:20px; } }
/* legenda SEMARVIS sob o mascote */
.tb-mascot-wrap{ display:flex; flex-direction:column; align-items:center; gap:4px; }
.tb-mascot-cap{ font-size:10px; font-weight:900; letter-spacing:1.6px; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.30); }
/* superfícies em vidro */
.card, .kpi, .risk-hero, .hub-card, .bd-stats .bs{
  background:var(--glass-bg);
  -webkit-backdrop-filter:blur(14px) saturate(150%);
  backdrop-filter:blur(14px) saturate(150%);
  border:1px solid var(--glass-brd);
  border-radius:18px;
  box-shadow:var(--glass-sh);
}
.card{ padding:16px; }
.kpi{ border-radius:16px; }
/* filtro (barra de filial) também em vidro */
.filialbar{
  background:rgba(255,247,235,.66);
  -webkit-backdrop-filter:blur(12px) saturate(140%);
  backdrop-filter:blur(12px) saturate(140%);
  border-bottom:1px solid rgba(255,255,255,.6);
}
/* barra inferior flutuante em vidro */
.bottomnav{
  background:rgba(255,251,246,.72);
  -webkit-backdrop-filter:blur(22px) saturate(180%);
  backdrop-filter:blur(22px) saturate(180%);
  border-top:1px solid rgba(255,255,255,.7);
  box-shadow:0 -8px 28px rgba(35,28,16,.14);
}
.bottomnav a{ position:relative; z-index:0; }
.bottomnav a.active::before{
  content:''; position:absolute; top:4px; left:50%; transform:translateX(-50%);
  width:46px; height:34px; border-radius:13px; background:rgba(255,127,18,.15); z-index:-1;
}
/* ícones coloridos: herdam a cor do <span> inline (não força mais navy/laranja fixo) */
.hub-ico .mi{ color:inherit; }
.dw-ico .mi{ color:inherit; }

/* ==================== ajustes v63 (título FEFO + barra estilo NIKO) ==================== */
/* Wordmark FEFO: maior, encorpado, espaçamento equilibrado, com brilho */
.tb-title{
  font-size:clamp(25px, 7.2vw, 35px);
  letter-spacing:clamp(3px, 1.4vw, 7px);
  font-weight:900;
  text-shadow:0 2px 6px rgba(0,0,0,.24), 0 1px 0 rgba(255,255,255,.30);
}
/* Barra inferior IGUAL AO NIKO: emojis coloridos, ativo laranja + leve zoom */
.bottomnav a .ico{ display:block; font-size:23px; line-height:1; margin-bottom:3px; transition:transform .12s ease; }
.bottomnav a.active{ color:var(--orange-dark); }
.bottomnav a.active .ico{ transform:scale(1.15); }
.bottomnav a.active::before{ display:none !important; }
@media (prefers-reduced-motion:reduce){ .bottomnav a.active .ico{ transform:none; } }

/* toggle de áudio (minha conta) */
.switch-row{ display:flex; align-items:center; gap:10px; font-size:14px; font-weight:700; color:var(--navy); cursor:pointer; }
.switch-row input{ width:20px; height:20px; accent-color:var(--orange); flex:none; }

/* ênfase no "90 DIAS" do aviso crítico (contagem/banco) */
.fefo-dias{ font-size:1.35em; font-weight:900; letter-spacing:.5px; padding:0 4px; border-radius:6px;
  background:rgba(214,60,45,.14); color:#b3271b; }
/* paletização MAXIMIZADA (destaque na contagem) */
.pal-box{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:4px;
  background:linear-gradient(180deg,#fff,#fff6ec); border:2px solid var(--orange);
  border-radius:14px; padding:14px 16px; box-shadow:0 4px 14px rgba(227,103,0,.14); }
.pal-box .pal-ico .mi{ width:26px; height:26px; color:var(--orange-dark); }
.pal-box .pal-txt{ font-size:13px; font-weight:900; letter-spacing:1px; text-transform:uppercase; color:var(--navy); }
.pal-box .pal-num{ font-size:34px; font-weight:900; line-height:1; color:var(--orange-dark); }
.pal-box .pal-un{ font-size:14px; font-weight:800; color:var(--navy); }

/* barra de ações do relatório (compacta: ícone + nome curto) */
.inv-actions{ display:flex; gap:8px; padding:12px 14px; background:var(--cream); flex-wrap:wrap; align-items:center; }
.ia-btn{ display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff; color:var(--navy);
  font-weight:800; font-size:13px; border-radius:12px; padding:8px 14px; min-height:42px; cursor:pointer; line-height:1; }
.ia-btn .mi{ width:20px; height:20px; }
.ia-btn:active{ transform:translateY(1px); }
.ia-pdf{ background:var(--orange); border-color:var(--orange-dark); color:#fff; }
.ia-wpp{ background:#25d366; border-color:#1eb257; color:#fff; }
.ia-print{ background:var(--navy); border-color:var(--navy); color:#fff; }
.ia-xls{ background:#1d6f42; border-color:#155232; color:#fff; }
.btn-xls{ background:#1d6f42; border:1px solid #155232; color:#fff; font-weight:800; border-radius:12px; padding:10px 16px; cursor:pointer; font-size:14px; font-family:inherit; }
.btn-xls .mi{ width:18px; height:18px; vertical-align:-.22em; margin-right:4px; }
.btn-xls:active{ transform:translateY(1px); }
.ia-back{ background:#fff; color:var(--navy); }
@media print { .inv-actions{ display:none !important; } }

/* seletor de idioma (menu e Minha conta) */
.dw-lang{ display:flex; align-items:center; gap:8px; padding:10px 18px 4px; flex-wrap:wrap; }
.dw-lang-lbl{ font-size:11px; font-weight:900; letter-spacing:1.5px; text-transform:uppercase; color:var(--orange-dark); width:100%; }
.dw-lang-btn{ display:inline-flex; align-items:center; gap:6px; border:1.5px solid var(--line); background:#fff; color:var(--navy);
  font-weight:800; font-size:13px; border-radius:99px; padding:7px 14px; cursor:pointer; line-height:1; font-family:inherit; }
.dw-lang-btn.on{ background:var(--orange); border-color:var(--orange-dark); color:#fff; }

/* bandeiras de idioma (userbar + login) */
.ub-lang{ display:inline-flex; align-items:center; gap:4px; margin-right:8px; vertical-align:middle; }
.ub-flag{ border:1.5px solid transparent; background:transparent; font-size:17px; line-height:1; cursor:pointer;
  border-radius:8px; padding:2px 5px; opacity:.45; filter:grayscale(35%); }
.ub-flag.on{ opacity:1; filter:none; border-color:var(--orange); background:rgba(255,127,18,.10); }
.login-lang{ justify-content:center; margin-top:16px; }
.login-lang .ub-flag{ font-size:22px; padding:4px 8px; }

/* link "ver histórico completo" nos cards do Banco de dados */
.bd-verhist{ display:flex; align-items:center; justify-content:center; gap:6px; margin-top:10px;
  padding:10px; border:1.5px dashed var(--orange); border-radius:12px; background:rgba(255,127,18,.06);
  color:var(--orange-dark); font-weight:900; font-size:13.5px; text-decoration:none; }
.bd-verhist .mi{ width:18px; height:18px; }
.bd-verhist:active{ background:rgba(255,127,18,.14); }

/* ==================== PAINEL DIRETORIA (estilo NIKO: claro, laranja/creme) ==================== */
.dx{ position:fixed; inset:0; z-index:70; overflow:auto; color:#1e3a5f; font-family:Arial,Helvetica,sans-serif;
  background:
    radial-gradient(120% 70% at 100% -10%, rgba(246,135,31,.14), transparent 55%),
    radial-gradient(120% 90% at -10% 110%, rgba(46,158,68,.08), transparent 55%),
    linear-gradient(180deg,#fff8f0 0%, #fdf1e2 100%); }
.dx-top{ display:flex; align-items:center; gap:14px; padding:12px 20px; position:sticky; top:0; z-index:5; color:#fff;
  background:linear-gradient(165deg,#e36700 0%, #f6871f 55%, #ff8c2e 100%);
  box-shadow:0 6px 18px rgba(227,103,0,.30); }
.dx-top img{ width:92px; filter:drop-shadow(0 2px 4px rgba(0,0,0,.22)); }
.dx-tt{ font-size:16px; font-weight:900; letter-spacing:2.2px; text-shadow:0 1px 3px rgba(0,0,0,.18); }
.dx-tt span{ opacity:.92; font-size:12px; letter-spacing:1.4px; display:block; }
.dx-clock{ margin-left:auto; font-size:13px; font-weight:800; }
.dx-clock .mi{ width:15px; height:15px; vertical-align:-.2em; }
.dx-refresh{ display:inline-flex; align-items:center; gap:7px; background:#fff; color:#e36700; border:0; border-radius:99px;
  padding:9px 16px; font-weight:900; font-size:13px; cursor:pointer; box-shadow:0 3px 10px rgba(0,0,0,.18); }
.dx-refresh .mi{ width:17px; height:17px; }
.dx-refresh:active{ transform:translateY(1px); }
.dx-exit{ width:38px; height:38px; border-radius:10px; background:rgba(255,255,255,.20); border:1px solid rgba(255,255,255,.5);
  display:flex; align-items:center; justify-content:center; color:#fff; text-decoration:none; }
.dx-exit .mi{ width:20px; height:20px; }
/* KPIs gigantes (cards brancos NIKO) */
.dx-kpis{ display:grid; grid-template-columns:repeat(4,1fr) 200px; gap:14px; padding:18px 20px 6px; }
.dxk{ background:#fff; border:1px solid #fce3c7; border-radius:16px; padding:15px 18px; box-shadow:0 4px 14px rgba(120,72,10,.08); }
.dxk i{ font-style:normal; font-size:10.5px; font-weight:900; letter-spacing:1.4px; color:#8a93a6; display:flex; align-items:center; gap:6px; text-transform:uppercase; }
.dxk i .mi{ width:15px; height:15px; }
.dxk b{ display:block; font-size:clamp(26px,3vw,40px); font-weight:900; margin:5px 0 2px; }
.dxk s{ text-decoration:none; font-size:12px; color:#8a93a6; font-weight:800; }
.dxk-c b{ color:#e11900; } .dxk-c{ border-top:4px solid #e11900; }
.dxk-a b{ color:#c99700; } .dxk-a{ border-top:4px solid #e6a700; }
.dxk-o b{ color:#2e9e44; } .dxk-o{ border-top:4px solid #2e9e44; }
.dxk-t b{ color:#1e3a5f; } .dxk-t{ border-top:4px solid #f6871f; }
.dxk-d{ display:flex; align-items:center; gap:10px; justify-content:center; }
.dx-donut{ width:104px; height:104px; flex:none; }
.dxd-v{ fill:#1e3a5f; font-size:20px; font-weight:900; }
.dxd-l{ fill:#8a93a6; font-size:9px; font-weight:800; letter-spacing:1px; }
.dxd-leg{ display:flex; flex-direction:column; gap:5px; font-size:11px; font-weight:900; color:#4f5c76; }
.dxd-leg em{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; }
/* barra maior risco (igual riskbar do app) */
.dx-risk{ margin:12px 20px; padding:13px 18px; border-radius:14px; display:flex; align-items:center; flex-wrap:wrap;
  background:#fde3e1; border:1px solid #ef4438; border-left:6px solid #ef4438; color:#b3271b; font-size:14.5px; font-weight:800; }
.dx-risk .mi{ width:19px; height:19px; color:#e11900; margin-right:8px; }
.dx-risk b{ color:#8f1d12; }
/* grid de filiais */
.dx-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; padding:6px 20px 14px; }
.dxf{ background:#fff; border:1px solid #fce3c7; border-radius:16px; padding:14px 16px; box-shadow:0 4px 14px rgba(120,72,10,.08); }
.dxf-off{ opacity:.62; background:#fffdf9; }
.dxf-head{ display:flex; align-items:center; gap:9px; margin-bottom:10px; }
.dxf-cod{ background:#f6871f; color:#fff; font-weight:900; font-size:12.5px; border-radius:8px; padding:3px 9px; box-shadow:0 2px 6px rgba(227,103,0,.35); }
.dxf-nome{ font-weight:900; font-size:14.5px; letter-spacing:.3px; flex:1; color:#1e3a5f; }
.dxf-b{ font-size:10.5px; font-weight:900; border-radius:99px; padding:3px 10px; letter-spacing:.3px; }
.dxf-b-ok{ background:#e7f6ec; color:#1d7a35; border:1px solid #bfe6cb; }
.dxf-b-red{ background:#fde3e1; color:#c62211; border:1px solid #f4b1aa; }
.dxf-b-off{ background:#f3f0ea; color:#8a93a6; border:1px solid #e5ddd0; }
.dxf-vals{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-bottom:9px; }
.dxv i{ font-style:normal; font-size:9px; font-weight:900; letter-spacing:1px; color:#8a93a6; display:block; }
.dxv b{ font-size:16.5px; font-weight:900; display:block; margin:2px 0 1px; }
.dxv s{ text-decoration:none; font-size:10.5px; color:#8a93a6; font-weight:800; }
.dxv-c b{ color:#e11900; } .dxv-a b{ color:#c99700; } .dxv-o b{ color:#2e9e44; }
.dxf-bar{ display:flex; height:8px; border-radius:99px; overflow:hidden; background:#f3ede3; margin-bottom:10px; }
.dxf-bar i{ display:block; height:100%; }
.dxf-nunca{ font-size:12px; color:#8a93a6; font-weight:800; padding:8px 0 10px; }
.dxf-occ{ display:grid; grid-template-columns:auto 1fr; gap:5px 10px; align-items:center; font-size:11px; font-weight:900; color:#4f5c76; }
.dxf-occ b{ color:#1e3a5f; }
.dxf-pb{ height:7px; border-radius:99px; background:#f3ede3; overflow:hidden; }
.dxf-pb i{ display:block; height:100%; background:linear-gradient(90deg,#ffb257,#f6871f); border-radius:99px; }
.dxf-occ-off{ display:block; color:#a7b0c0; font-weight:800; }
/* rodapé */
.dx-foot{ display:flex; flex-wrap:wrap; gap:10px 26px; align-items:center; padding:12px 20px 26px; font-size:12.5px; color:#5b6678; font-weight:800; }
.dx-foot .mi{ width:15px; height:15px; vertical-align:-.22em; color:#e36700; }
.dx-upd{ margin-left:auto; }
/* botão de acesso no Resumo */
.dx-open{ display:flex; align-items:center; gap:9px; margin-bottom:12px; padding:13px 16px; border-radius:14px; text-decoration:none;
  background:linear-gradient(120deg,#f6871f,#ff8c2e); color:#fff; font-weight:900; font-size:14.5px;
  border:1px solid #e36700; box-shadow:0 6px 18px rgba(227,103,0,.30); }
.dx-open .mi{ width:20px; height:20px; color:#fff; }
.dx-open span{ margin-left:auto; font-size:20px; }
@media (max-width:900px){ .dx-kpis{ grid-template-columns:1fr 1fr; } .dxk-d{ grid-column:span 2; } }
@media (max-width:560px){
  .dx-kpis{ grid-template-columns:1fr 1fr; gap:10px; padding:12px 12px 4px; }
  .dx-grid{ padding:4px 12px 12px; grid-template-columns:1fr; }
  .dx-top{ padding:10px 12px; gap:9px; flex-wrap:wrap; }
  .dx-top img{ width:64px; } .dx-tt{ font-size:12.5px; letter-spacing:1.2px; }
  .dx-clock{ display:none; }
  .dx-refresh{ padding:8px 12px; font-size:12px; }
  .dx-risk{ margin:10px 12px; font-size:13px; }
  .dx-foot{ padding:10px 14px 20px; } }

/* campos obrigatórios (contagem) */
.req{ color:#e11900; font-size:15px; }
.err-field{ border-color:#e11900 !important; box-shadow:0 0 0 3px rgba(225,25,0,.16) !important; animation:fshake .3s; }
@keyframes fshake{ 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

/* aparelhos conectados (Admin) */
.dev-badge{ display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:900; border-radius:99px;
  padding:2px 9px; margin:3px 5px 0 0; letter-spacing:.2px; }
.dev-badge .mi{ width:13px; height:13px; }
.dev-none{ background:#f3f0ea; color:#8a93a6; border:1px solid #e5ddd0; }
.dev-one{ background:#e7f6ec; color:#1d7a35; border:1px solid #bfe6cb; }
.dev-many{ background:#fde3e1; color:#c62211; border:1px solid #f4b1aa; }
.dev-lock{ background:#eaf1fb; color:#0e315f; border:1px solid #c3d7f4; }

/* slots de aparelho (1 celular + 1 PC) no modal do Admin */
.dv-slots{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.dv-slot{ display:flex; align-items:center; gap:8px; border:1.5px dashed var(--line); border-radius:12px; padding:9px 11px; background:#fffdf9; }
.dv-slot.dv-on{ border-style:solid; border-color:#2e9e44; background:#f2fbf5; }
.dv-slot .dv-ico .mi{ width:22px; height:22px; color:var(--orange-dark); }
.dv-slot.dv-on .dv-ico .mi{ color:#1d7a35; }
.dv-txt{ display:flex; flex-direction:column; min-width:0; flex:1; }
.dv-txt b{ font-size:12.5px; color:var(--navy); }
.dv-txt span{ font-size:10.5px; color:var(--muted); font-weight:700; }
.dv-slot .dv-free{ padding:4px 8px; font-size:11px; }
@media (max-width:520px){ .dv-slots{ grid-template-columns:1fr; } }

/* login sem senha: aviso do link de acesso */
.lg-token{ display:flex; flex-direction:column; gap:4px; text-align:left; background:#fff7ee; border:1.5px solid var(--line);
  border-left:5px solid var(--orange); border-radius:12px; padding:12px 14px; margin-bottom:14px; }
.lg-token .lg-ico .mi{ width:22px; height:22px; color:var(--orange-dark); }
.lg-token b{ font-size:14px; color:var(--navy); }
.lg-token span{ font-size:12px; color:#5b6678; font-weight:600; line-height:1.45; }
/* cartões dos 2 tokens (celular / PC) no Admin */
.tk-card{ border:1.5px solid var(--line); border-radius:14px; padding:11px 13px; margin-bottom:9px; background:#fffdf9; }
.tk-card.tk-bound{ border-color:#bfe6cb; background:#f4fbf6; }
.tk-card.tk-free{ border-color:#f4dca8; background:#fffaf0; }
.tk-card.tk-none{ border-style:dashed; }
.tk-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tk-head .tk-ico .mi{ width:21px; height:21px; color:var(--orange-dark); }
.tk-head b{ font-size:14px; color:var(--navy); }
.tk-info{ font-size:11px; margin:3px 0 7px; }
.tk-btns{ display:flex; gap:6px; flex-wrap:wrap; }
.tk-btns .btn-ghost, .tk-btns .btn{ padding:6px 10px; font-size:12px; min-height:36px; }

/* subtítulo de dia na tela de inventários (filiais separadas) */
.hi-dia{ display:flex; align-items:center; gap:7px; font-size:12px; font-weight:900; color:var(--navy);
  letter-spacing:.4px; margin:12px 0 6px; padding-bottom:5px; border-bottom:1.5px solid var(--line); }
.hi-dia .mi{ width:16px; height:16px; color:var(--orange-dark); }
.hi-dia .muted{ font-weight:700; }

/* ============ OFFLINE: faixa de estado da fila (v102) ============
   UMA régua, UM número laranja = "ainda no aparelho". É o único conceito que o
   estoquista precisa decorar: não encerrar o turno com número laranja.            */
.ob-bar{ padding:0 12px; }
.ob-bar:empty{ display:none; }
.ob-line{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12.5px; font-weight:800;
  border-radius:12px; padding:9px 12px; margin:8px 0 0; line-height:1.35; }
.ob-line .mi{ width:19px; height:19px; flex:none; }
.ob-amber{ background:#fff4e2; border:1.5px solid #f3c98a; color:#8a4b00; }
.ob-amber .mi{ color:#d97706; }
.ob-red{ background:#feecec; border:1.5px solid #f0a9a9; color:#a11a1a; }
.ob-red .mi{ color:#dc2626; }
.ob-gray{ background:#f2f4f7; border:1.5px solid #dde2ea; color:#48546a; }
.ob-gray .mi{ color:#6b7688; }
.ob-num{ font-size:22px; font-weight:900; color:#c2410c; line-height:1;
  background:#fff; border:2px solid #f3a15a; border-radius:9px; padding:2px 9px; }
/* a faixa é só informativa: envio é automático, botões ficam na lista MEU TURNO */

/* último lançamento — fica FIXO na tela, não é toast */
.cu-box{ display:flex; flex-direction:column; gap:3px; border-radius:12px; padding:10px 12px; margin-top:10px;
  border:1.5px solid var(--line); background:#fff; }
.cu-box.cu-ok{ border-color:#bfe6cb; background:#f4fbf6; }
.cu-box.cu-wait{ border-color:#f3c98a; background:#fff8ee; }
.cu-tag{ display:flex; align-items:center; gap:6px; font-size:11.5px; font-weight:900; letter-spacing:.5px; }
.cu-ok .cu-tag{ color:#137a3c; } .cu-ok .cu-tag .mi{ width:18px; height:18px; color:#16a34a; }
.cu-wait .cu-tag{ color:#a35a00; } .cu-wait .cu-tag .mi{ width:18px; height:18px; color:#d97706; }
.cu-txt{ font-size:12.5px; font-weight:700; color:var(--navy); }

/* MEU TURNO: lista local que NÃO é apagada ao sincronizar (o item fica verde) */
.ct-head{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; font-size:12px; font-weight:900;
  color:var(--navy); letter-spacing:.4px; padding-bottom:7px; margin-bottom:6px; border-bottom:1.5px solid var(--line); }
.ct-head .mi{ width:17px; height:17px; color:var(--orange-dark); }
.ct-pend{ color:#c2410c; }
.ct-row{ display:grid; grid-template-columns:44px 84px 1fr 62px 92px 26px; align-items:center; gap:6px;
  font-size:11.5px; font-weight:700; padding:6px 4px; border-bottom:1px solid #f1f3f6; }
.ct-row .ct-h{ color:#7a8698; font-weight:800; }
.ct-row .ct-p{ color:var(--navy); font-weight:900; }
.ct-row .ct-d{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#3f4a5c; }
.ct-row .ct-q{ text-align:right; font-weight:900; color:var(--navy); }
.ct-row .ct-s{ font-size:10.5px; font-weight:900; letter-spacing:.2px; }
.ct-enviado .ct-s{ color:#137a3c; }
.ct-fila .ct-s, .ct-erro .ct-s{ color:#c2410c; }
.ct-presa{ background:#fff5f5; }
.ct-presa .ct-s{ color:#b91c1c; }
.ct-del{ background:none; border:none; cursor:pointer; padding:0; color:#a4aec0; }
.ct-del .mi{ width:16px; height:16px; }
@media (max-width:420px){
  .ct-row{ grid-template-columns:40px 74px 1fr 54px 24px; }
  .ct-row .ct-s{ display:none; }
}

/* Banco de dados sem internet: aviso + selo por linha */
.bd-offline{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12px; font-weight:800; line-height:1.4;
  background:#fff4e2; border:1.5px solid #f3c98a; color:#8a4b00; border-radius:12px; padding:9px 12px; margin-bottom:10px; }
.bd-offline .mi{ width:18px; height:18px; color:#d97706; flex:none; }
.bd-tag{ display:inline-block; font-size:10px; font-weight:900; letter-spacing:.3px; border-radius:7px;
  padding:2px 6px; margin-left:6px; vertical-align:middle; }
.bd-tag-ok{ background:#e9f7ef; color:#137a3c; border:1px solid #bfe6cb; }
.bd-tag-wait{ background:#fff4e2; color:#a35a00; border:1px solid #f3c98a; }
.bd-tag-bad{ background:#feecec; color:#b91c1c; border:1px solid #f0a9a9; }
.list-item.bd-local{ cursor:default; border-left:5px solid #f3a15a; }
/* selo de "ainda no aparelho" em linha própria (não quebra o nome do produto) */
.bd-selo{ margin:2px 0 4px; }
.bd-de{ font-size:11px; font-weight:800; color:#7a8698; display:flex; align-items:center; gap:5px; margin:0 0 6px; }
.bd-de .mi{ width:14px; height:14px; color:#a4aec0; }

/* Banco de dados (ADMIN): coluna de seleção + barra de exclusão em lote */
.bd-selbar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:#fff7ee;
  border:1.5px solid #f3c98a; border-radius:12px; padding:9px 12px; margin:0 0 10px; }
.bd-selall{ display:flex; align-items:center; gap:7px; font-size:12px; font-weight:900; color:var(--navy); cursor:pointer; }
.bd-selall input{ width:20px; height:20px; accent-color:var(--orange-dark); }
.bd-seln{ font-size:12px; font-weight:800; color:#8a4b00; }
.bd-selbtn{ margin-left:auto; padding:8px 12px; font-size:12.5px; min-height:38px; }
.bd-selbtn:disabled{ opacity:.45; cursor:not-allowed; }
.bd-pick{ display:flex; align-items:center; justify-content:center; flex:none; padding:0 4px 0 0; cursor:pointer; }
.bd-pick input{ width:22px; height:22px; accent-color:var(--danger); }

/* ---- Banco: RESUMO DO DIA + lista agrupada (a tela abre resumida, não com tudo aberto) ---- */
.bd-resumo{ background:#fff; border:1.5px solid var(--line); border-radius:14px; padding:11px 13px; margin:0 0 10px; }
.br-linha{ font-size:13.5px; color:var(--navy); display:flex; align-items:center; gap:6px; flex-wrap:wrap; line-height:1.5; }
.br-linha .mi{ width:18px; height:18px; color:var(--orange-dark); flex:none; }
.br-chips{ display:flex; gap:7px; flex-wrap:wrap; margin:9px 0 0; }
.br-chip{ display:flex; flex-direction:column; align-items:flex-start; gap:1px; border:1.5px solid var(--line);
  background:#fff; color:var(--navy); font:800 12px/1.15 inherit; border-radius:11px; padding:6px 11px; cursor:pointer; }
.br-chip b{ font-size:15px; }
.br-chip span{ font-size:10.5px; font-weight:700; opacity:.75; }
.br-chip.vencido{ border-color:#5c1a14; color:#5c1a14; background:#fdf2f1; }
.br-chip.red{ border-color:#e11900; color:#c21500; background:#fdf1ef; }
.br-chip.yellow{ border-color:#e6a700; color:#8a6500; background:#fffaeb; }
.br-chip.green{ border-color:#2e9e44; color:#1d6b2e; background:#f1faf3; }
.br-chip.on{ box-shadow:0 0 0 3px rgba(255,127,18,.28); border-color:var(--orange-dark); }
.br-chip.br-limpa{ flex-direction:row; align-items:center; gap:5px; color:#7a8698; }
.br-chip.br-limpa .mi{ width:15px; height:15px; }
.br-mais{ font-size:10.5px; font-weight:800; color:#a4aec0; }
.br-quem{ font-size:11.5px; font-weight:700; color:#68758a; margin:9px 0 0; display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.br-quem .mi{ width:15px; height:15px; color:#a4aec0; }
.br-quem b{ color:var(--navy); }

.bd-agrupar{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:0 0 10px; }
.bg-lbl{ font-size:10.5px; font-weight:900; letter-spacing:1.2px; text-transform:uppercase; color:var(--orange-dark); margin-right:2px; }
.bd-gbtn{ border:1.5px solid var(--line); background:#fff; color:var(--navy); font:800 12px inherit;
  border-radius:99px; padding:6px 13px; cursor:pointer; line-height:1; min-height:34px; }
.bd-gbtn.on{ background:var(--navy); border-color:var(--navy); color:#fff; }
.bd-gall{ margin-left:auto; display:inline-flex; align-items:center; gap:4px; color:var(--orange-dark); border-color:#f3c98a; }
.bd-gall .mi{ width:16px; height:16px; }

.bd-grupo{ border:1.5px solid var(--line); border-radius:13px; background:#fff; margin:0 0 8px; overflow:hidden; }
.bg-head{ display:flex; align-items:center; gap:9px; width:100%; text-align:left; border:0; cursor:pointer;
  background:#fffaf3; padding:10px 12px; font-family:inherit; color:var(--navy); }
.bg-head:active{ background:#fdf0e0; }
.bg-seta{ display:inline-flex; flex:none; transition:transform .15s; }
.bg-seta .mi{ width:20px; height:20px; color:var(--orange-dark); }
.bd-grupo.on .bg-seta{ transform:rotate(180deg); }
.bg-nome{ font-weight:900; font-size:14px; flex:none; max-width:42%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bg-info{ font-size:11.5px; color:#68758a; font-weight:700; flex:1; }
.bg-info b{ color:var(--navy); }
.bg-mini{ display:flex; gap:4px; flex:none; }
.bg-p{ font-style:normal; font-weight:900; font-size:10.5px; color:#fff; border-radius:99px; padding:2px 7px; }
.bg-p.vencido{ background:#5c1a14; } .bg-p.red{ background:#e11900; }
.bg-p.yellow{ background:#e6a700; color:#3a2c00; } .bg-p.green{ background:#2e9e44; }
.bg-corpo{ padding:0; }
.bd-grupo.on .bg-corpo{ padding:8px 8px 2px; border-top:1px solid var(--line); }

@media (max-width:560px){
  .bg-nome{ max-width:100%; }
  .bg-head{ flex-wrap:wrap; }
  .bg-info{ flex:1 0 100%; order:3; margin-left:29px; }
}

/* ============ CONTAGEM SEM FEFO (declaração de que não há item na faixa crítica) ============ */
.nf-card{ border-left:5px solid #12a594; background:#f3fbf9; }
.nf-check{ display:flex; align-items:flex-start; gap:11px; cursor:pointer; }
.nf-check input{ width:26px; height:26px; flex:none; margin-top:1px; accent-color:#0f8b7d; }
.nf-txt{ display:flex; flex-direction:column; gap:2px; }
.nf-txt b{ font-size:14.5px; color:var(--navy); line-height:1.25; }
.nf-txt small{ font-size:11.5px; font-weight:700; color:#5b6678; }
.nf-info{ display:flex; align-items:flex-start; gap:7px; flex-wrap:wrap; font-size:12px; font-weight:700;
  line-height:1.45; color:#0d5f56; background:#fff; border:1.5px solid #bfe6df; border-radius:11px;
  padding:9px 11px; margin-top:10px; }
.nf-info .mi{ width:18px; height:18px; flex:none; color:#0f8b7d; }
/* cards de contagem apagados quando a flag está marcada (não são usados) */
.card.nf-off{ opacity:.4; pointer-events:none; filter:grayscale(.35); }
/* botão vira "declarar" — cor diferente para não salvar sem querer */
.btn.btn-nofefo{ background:#0f8b7d; }
.nf-ultima:empty{ display:none; }
.nf-last{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; font-size:11.5px; font-weight:800;
  color:#0d5f56; background:#eef9f7; border:1.5px solid #cfeae5; border-radius:11px; padding:8px 11px; margin-top:10px; }
.nf-last .mi{ width:16px; height:16px; color:#0f8b7d; }
.ct-row.ct-nofefo .ct-p{ color:#0f8b7d; }
.ct-row.ct-nofefo{ background:#f3fbf9; }

/* ============ RECEBIMENTO DE MERCADORIA ============ */
.card.rc-nota{ border-left:5px solid #0f8b7d; background:#f4fbf9; }
/* no celular a linha de 3 campos deixava a ORIGEM com ~100px — nome de filial não cabe */
@media (max-width:560px){
  .card.rc-nota .row3{ grid-template-columns:1fr 1fr; }
  .card.rc-nota .row3 > label:last-child{ grid-column:1 / -1; }
}
.pp-nao{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin:8px 0 0; padding:9px 11px;
  background:#fdf1ef; border:1.5px solid #f0b3ae; border-radius:11px; font-size:12.5px; font-weight:700; color:#a81400; }
.pp-nao .mi{ width:18px; height:18px; color:#c21500; flex:none; }
.rc-forn{ margin:2px 0 8px; animation:rc-abre .16s ease-out; }
.rc-forn input{ border-color:#0f8b7d; background:#fff; }
@keyframes rc-abre{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.rc-filial{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; font-size:12.5px; font-weight:800;
  color:#0d5f56; margin-top:10px; }
.rc-filial .mi{ width:17px; height:17px; color:#0f8b7d; }
.rc-alerta{ display:flex; align-items:center; gap:6px; color:#a11a1a; font-weight:800; }
.rc-alerta .mi{ width:17px; height:17px; color:#dc2626; }
table.tbl.rc-tbl{ font-size:12px; }
table.tbl.rc-tbl td{ padding:7px 6px; vertical-align:middle; }
.rc-tbl .rc-desc{ min-width:150px; font-weight:700; color:var(--navy); }
.rc-tbl tr.rc-vencido td:first-child{ box-shadow:inset 4px 0 0 #5c1a14; }
.rc-tbl tr.rc-red td:first-child{ box-shadow:inset 4px 0 0 var(--danger); }
.rc-tbl tr.rc-yellow td:first-child{ box-shadow:inset 4px 0 0 var(--warn); }
.rc-tbl tr.rc-green td:first-child{ box-shadow:inset 4px 0 0 var(--ok); }
.list-item.rc-nota-item{ cursor:pointer; border-left:5px solid #0f8b7d; }
/* PDF do resumo — botão discreto na barra do usuário, só na tela inicial */
.ub-pdf{ display:inline-flex; align-items:center; gap:4px; font-weight:900; color:var(--orange-dark);
  text-decoration:none; border:1.5px solid #f3c98a; background:#fff; border-radius:99px; padding:2px 10px; }
.ub-pdf .mi{ width:15px; height:15px; }
.ub-pdf:active{ transform:translateY(1px); }
/* Horários do envio no WhatsApp: um chip por horário, com o botão de tirar do lado */
.wa-horas{ display:flex; gap:8px; flex-wrap:wrap; margin:-2px 0 6px; }
.wa-h{ display:inline-flex; align-items:center; gap:6px; background:var(--bg-soft,#fff7ef);
  border:1.5px solid var(--line); border-radius:10px; padding:5px 8px; }
.wa-h i{ font-style:normal; font-weight:900; font-size:11px; color:var(--orange); min-width:14px; }
.wa-h input[type=time]{ border:none; background:transparent; font:800 14px inherit; color:var(--navy);
  padding:0; outline:none; }
.wa-hx{ border:none; background:transparent; color:#8a94a6; cursor:pointer; padding:0 2px;
  display:inline-flex; align-items:center; }
.wa-hx .mi{ width:15px; height:15px; }
.wa-hx:hover{ color:var(--danger); }

/* Observação do recebimento: etiquetas rápidas (sobra/falta/avaria) + texto livre */
.rc-obs-card{ border-left:5px solid #f3c98a; }
.rc-obs-tags{ display:flex; gap:7px; flex-wrap:wrap; }
.rc-tag{ border:1.5px solid var(--line); background:#fff; color:var(--navy); font:900 12px inherit;
  border-radius:99px; padding:7px 14px; cursor:pointer; line-height:1; min-height:36px; }
.rc-tag:active{ transform:translateY(1px); }
.rc-tag.on{ background:var(--orange); border-color:var(--orange-dark); color:#fff; }
.rc-tag-x{ margin-left:auto; display:inline-flex; align-items:center; gap:4px; color:#8a94a6; font-weight:800; }
.rc-tag-x .mi{ width:15px; height:15px; }
.rc-nota-pdf{ flex:none; align-self:center; padding:6px 9px; color:var(--orange-dark); border-color:#f3c98a; }
.rc-nota-pdf .mi{ width:18px; height:18px; }
.rc-nota-del{ flex:none; align-self:center; padding:6px 9px; color:var(--danger); border-color:#f0b3ae; }
.rc-nota-del .mi{ width:18px; height:18px; }

/* seletor de qual APP o link de acesso abre (FEFO ou RECEBIMENTO) */
.ac-alvo{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin:10px 0 4px; }
.ac-alvo-lbl{ font-size:11.5px; font-weight:900; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; }
.ac-tab{ display:inline-flex; align-items:center; gap:5px; background:#fff; border:1.5px solid var(--line);
  color:#5b6678; border-radius:99px; padding:6px 12px; font:inherit; font-size:12px; font-weight:900; cursor:pointer; }
.ac-tab .mi{ width:16px; height:16px; }
.ac-tab.on{ border-color:var(--orange); background:#fff4e8; color:var(--orange-dark); }
.ac-alvo-obs{ font-size:11px; font-weight:600; color:#6b7688; line-height:1.5; margin:2px 0 10px; }
.ac-alvo-obs code{ background:#f3f4f7; border:1px solid var(--line); border-radius:6px; padding:1px 5px;
  font-size:10.5px; word-break:break-all; }

/* faixa que diz de QUAL app são os acessos mostrados */
.ac-appbar{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:900; color:var(--orange-dark);
  background:#fff4e8; border:1.5px solid #f3c98a; border-radius:11px; padding:9px 12px; margin:0 0 10px; }
.ac-appbar .mi{ width:19px; height:19px; }
.ac-appbar.ac-rec{ color:#0d5f56; background:#eef9f7; border-color:#cfeae5; }

/* ==================== PAINEL DE EXPEDIÇÃO ====================
   Herda a casca do Painel Diretoria (.dx) e acrescenta a lista de saída. Pensado para TV:
   endereço grande, cor da régua na linha inteira e nada que precise de mouse. */
.xp .dx-tt span{ opacity:.85; }
.xp-kpis{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; padding:16px 20px 6px; }
.xp-kpi{ border-radius:16px; padding:14px 16px; background:#fff; border:1.5px solid rgba(0,0,0,.06);
  box-shadow:0 6px 18px rgba(35,28,16,.08); display:flex; flex-direction:column; gap:2px; }
.xp-kpi i{ font-style:normal; font-size:11px; font-weight:900; letter-spacing:1px; color:#68758a; }
.xp-kpi b{ font-size:34px; line-height:1.1; font-weight:900; }
.xp-kpi s{ text-decoration:none; font-size:12.5px; font-weight:700; color:#68758a; }
.xp-k-venc{ border-left:6px solid #5c1a14; } .xp-k-venc b{ color:#5c1a14; }
.xp-k-crit{ border-left:6px solid #e11900; } .xp-k-crit b{ color:#e11900; }
.xp-k-aten{ border-left:6px solid #e6a700; } .xp-k-aten b{ color:#8a6500; }

.xp-filiais{ display:flex; gap:10px; flex-wrap:wrap; padding:10px 20px; }
.xp-f{ background:#fff; border:1.5px solid rgba(0,0,0,.06); border-radius:12px; padding:8px 12px; min-width:190px; }
.xp-f-nome{ font-weight:900; color:#0e315f; font-size:13px; margin-bottom:4px; }
.xp-f-vals{ display:flex; gap:12px; }
.xp-f-vals span{ font-weight:900; font-size:13px; display:flex; flex-direction:column; }
.xp-f-vals i{ font-style:normal; font-size:9.5px; font-weight:800; color:#8a94a6; letter-spacing:.6px; }
.xp-venc{ color:#5c1a14; } .xp-crit{ color:#e11900; } .xp-aten{ color:#8a6500; }

.xp-ords{ padding:6px 20px 0; }
.xp-ords h4{ margin:6px 0; font-size:13px; color:#0e315f; display:flex; align-items:center; gap:6px; }
.xp-ord{ display:inline-flex; flex-direction:column; background:#fff; border:1.5px solid #f3c98a; border-radius:12px;
  padding:8px 12px; margin:0 8px 8px 0; text-decoration:none; color:#0e315f; }
.xp-ord span{ font-size:11px; color:#68758a; font-weight:700; }

.xp-tabela{ padding:8px 20px 20px; }
.xp-tabela h4{ margin:8px 0; font-size:14px; color:#0e315f; display:flex; align-items:center; gap:6px; }
.xp-scroll{ overflow-x:auto; border-radius:14px; }
.xp-t{ width:100%; border-collapse:collapse; background:#fff; border-radius:14px; overflow:hidden; }
.xp-t th{ background:#0e315f; color:#fff; font-size:11px; letter-spacing:.8px; text-align:left; padding:9px 10px; white-space:nowrap; }
.xp-t td{ padding:9px 10px; border-bottom:1px solid #eef1f5; font-size:14px; vertical-align:middle; }
.xp-t td.xp-pos{ font-weight:900; font-size:17px; color:#0e315f; white-space:nowrap; }
.xp-t td.xp-prod b{ display:block; font-size:14px; color:#1a1a1a; }
.xp-prod span{ font-size:11px; color:#8a94a6; font-weight:700; }
.xp-val{ white-space:nowrap; font-weight:800; }
.xp-t td.xp-qtd{ white-space:nowrap; text-align:right; } .xp-qtd b{ font-size:16px; }
.xp-t td.xp-rs{ white-space:nowrap; text-align:right; font-weight:900; color:#1d6b2e; }
.xp-pill{ display:inline-block; font-weight:900; font-size:12px; padding:3px 10px; border-radius:99px; white-space:nowrap; }
.xp-p-venc{ background:#5c1a14; color:#fff; } .xp-p-crit{ background:#e11900; color:#fff; } .xp-p-aten{ background:#ffdf8a; color:#5a4300; }
.xp-l-venc{ background:#fdf1ef; } .xp-l-crit{ background:#fff6f4; }
.xp-l-venc .xp-pos, .xp-l-crit .xp-pos{ color:#a81400; }
.xp-vazio{ color:#68758a; font-weight:700; padding:8px 2px; }

@media (max-width:820px){
  .xp-kpis{ grid-template-columns:1fr; gap:10px; padding:12px; }
  .xp-kpi b{ font-size:28px; }
  .xp-filiais, .xp-tabela, .xp-ords{ padding-left:12px; padding-right:12px; }
  .xp-t td{ font-size:13px; } .xp-t td.xp-pos{ font-size:15px; }
}
