/* v2.48 (pacote 314) -- App do Supervisor. Mesmas cores do portal (public/css/style.css). Feito pro celular. */
:root {
  --bg: #f2f4f1; --surface: #ffffff; --surface-2: #eceeea; --ink: #14181b; --ink-2: #5b6469; --ink-3: #868f8c;
  --border: #dde1dc; --accent: #0f6b5c; --accent-ink: #ffffff; --accent-wash: #e4efec;
  --good: #1e8e3e; --good-wash: #e5f4e8; --warn: #a5730a; --warn-wash: #faf0dc; --crit: #c0392b; --crit-wash: #fbe6e3;
  --neutral: #6f777b; --neutral-wash: #eceeed;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12181a; --surface: #182022; --surface-2: #1e2729; --ink: #f0f3f1; --ink-2: #a9b3af; --ink-3: #78827f;
    --border: #2a3335; --accent: #4fc1a8; --accent-ink: #0c1514; --accent-wash: #1b2c29;
    --good: #46c26a; --good-wash: #1b2b1e; --warn: #e3ac4e; --warn-wash: #2e2717; --crit: #e2685a; --crit-wash: #331e1c;
    --neutral: #9aa3a0; --neutral-wash: #1e2527;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.tela { padding: calc(14px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.tela.com-barra { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.tela.centro { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
h1 { font-size: 21px; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin: 0 0 10px; }
p { margin: 0; }
.apagado { color: var(--ink-2); }
.mini { font-size: 13px; }
.logo { width: 150px; height: auto; background: #fff; border-radius: 14px; padding: 10px 14px; }
.login-topo { text-align: center; padding: 28px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }

.topo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 44px; }
.topo > div { flex: 1; min-width: 0; }
.topo h1 { flex: 1; min-width: 0; }
.topo-mini { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.btn-voltar { width: 44px; height: 44px; margin-left: -10px; border: 0; background: none; color: var(--ink); font-size: 34px; line-height: 1; padding: 0 0 6px; cursor: pointer; }
.btn-texto { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; padding: 12px 6px; cursor: pointer; }

.cartao, .bloco { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.campo { display: block; margin-bottom: 12px; }
.campo:last-child { margin-bottom: 0; }
.campo > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
input[type="email"], input[type="password"], input[type="date"], input[type="text"], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
textarea { min-height: 72px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .menu-item:focus-visible, .envio:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.fixo { min-height: 50px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 18px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn svg, .menu-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.primario { background: var(--accent); color: var(--accent-ink); }
.btn.secundario { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn.largo { width: 100%; margin-top: 10px; }
.btn[disabled] { opacity: 0.55; cursor: default; }
#form-login .btn { width: 100%; margin-top: 4px; }
.link { display: block; text-align: center; color: var(--accent); margin-top: 16px; font-size: 14px; }

.aviso { background: var(--warn-wash); color: var(--warn); border-radius: 10px; padding: 11px 13px; font-size: 14px; margin-bottom: 12px; }
.aviso.err { background: var(--crit-wash); color: var(--crit); font-weight: 600; }
.aviso.ok { background: var(--good-wash); color: var(--good); }
.cartao > .aviso:last-child { margin-bottom: 0; margin-top: 12px; }

.menu { display: grid; gap: 10px; margin-bottom: 14px; }
.menu-item { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.menu-item.principal { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.menu-item.principal small { color: inherit; opacity: 0.85; }
.menu-item[disabled] { opacity: 0.5; cursor: default; }
.menu-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-wash); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.menu-item.principal .menu-ic { background: rgba(255,255,255,0.18); color: inherit; }
.menu-tx { min-width: 0; }
.menu-tx strong { display: block; font-size: 16.5px; }
.menu-tx small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.hoje-linha { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.hoje-linha:first-child { border-top: 0; padding-top: 0; }
.hoje-linha span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rodape { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 18px; }

.escondido { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.foto-caixa, .conf-foto { border-radius: 10px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.foto-caixa img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.conf-foto { margin-top: 14px; }
.conf-foto img { display: block; width: 100%; max-height: 200px; object-fit: contain; }
.foto-pdf { padding: 34px; font-weight: 800; color: var(--ink-2); letter-spacing: 0.08em; }
.foto-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); }
.foto-info span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.valores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.valor span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
.valor input { text-align: right; font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 600; }
@media (max-width: 340px) { .valores { grid-template-columns: 1fr; } }

.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--border); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.barra > * { flex: 1; }
.barra-total small { display: block; font-size: 12px; color: var(--ink-2); }
.barra-total strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 592px) { .barra { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border: 1px solid var(--border); border-bottom: 0; border-radius: 14px 14px 0 0; } }

.conf-cab { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 12px; }
.conf-tab { width: 100%; border-collapse: collapse; font-size: 16px; }
.conf-tab td { padding: 9px 0; border-top: 1px solid var(--border); }
.conf-tab td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.conf-tab tfoot td { font-weight: 800; font-size: 18px; border-top: 2px solid var(--ink); }
#conf-obs { margin-top: 10px; }

.res-ic { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 800; }
.res-ic.ok { background: var(--good-wash); color: var(--good); }
.res-ic.critica { background: var(--crit-wash); color: var(--crit); }
.res-ic.espera { background: var(--warn-wash); color: var(--warn); }
#t-resultado p { color: var(--ink-2); max-width: 420px; }
.res-num { width: 100%; text-align: left; margin: 6px 0 4px; }
.res-num div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-variant-numeric: tabular-nums; }
.res-num div + div { border-top: 1px solid var(--border); }

.envio { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; color: var(--ink); font: inherit; cursor: pointer; }
.envio-l1 { display: flex; justify-content: space-between; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.envio-l1 strong { font-size: 16px; }
.envio-l2 { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.envio-l2 span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.envio-l2 span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); font-weight: 600; }
.selo { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.selo.conferido { background: var(--good-wash); color: var(--good); }
.selo.critica { background: var(--crit-wash); color: var(--crit); }
.selo.sem_referencia { background: var(--warn-wash); color: var(--warn); }
.selo.pendente, .selo.nada { background: var(--neutral-wash); color: var(--neutral); }
@media (prefers-reduced-motion: no-preference) { .btn, .menu-item, .envio { transition: transform 0.08s ease; } .btn:active, .menu-item:active, .envio:active { transform: scale(0.985); } }
