/* =========================================================
   FORTES · Controle de Rádios
   Paleta tirada do logo e da arte "Reunião de Servidores"
   ========================================================= */

@font-face { font-family: 'Anton'; src: url('../assets/fonts/anton-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --bg: #0e0b09;
  --bg-2: #14100c;
  --surface: #1b1510;
  --surface-2: #241c15;
  --surface-3: #2e241b;
  --line: #3a2d22;
  --line-2: #4d3c2d;
  --text: #f5efe8;
  --text-2: #d9cdc0;
  --muted: #a39080;
  --accent: #e08423;
  --accent-hi: #f09a3e;
  --accent-deep: #a6602b;
  --brand: #a6602b;
  --brand-light: #c47c42;
  --accent-ink: #1c0f04;
  --brown: #3b200d;
  --paper: #fbf7f2;

  --ok: #43a96f;
  --use: #e08423;
  --charge: #4c8ddb;
  --bad: #de4b4b;
  --maint: #8c7a6b;
  --lost: #a074e0;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --top-h: 60px;
  --bottom-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.has-sheet { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--accent-hi); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0 0 .6em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 24px 12px; }
.pad-b { margin-bottom: 12px; display: inline-flex; }
.grow { flex: 1 1 auto; }
.accent { color: var(--accent); }
.danger-text { color: var(--bad) !important; }
.ic { flex: none; vertical-align: middle; }

/* ---------- abertura e erro ---------- */
.splash { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; }
.splash img { animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: .55; transform: scale(.96); } }
.fatal { max-width: 520px; margin: 15vh auto; padding: 24px; text-align: center; }
.fatal h1 { font: 26px var(--display); text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-soft { background: var(--surface-2); border-color: var(--line); }
.btn-soft:hover, .btn-soft.on { border-color: var(--accent); }
.btn-soft.on { color: var(--accent-hi); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-lg { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.block { display: flex; width: 100%; }
.link { background: none; border: 0; color: var(--accent-hi); text-decoration: underline; padding: 0; cursor: pointer; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.spin {
  width: 16px; height: 16px; border-radius: 50%; display: inline-block;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r);
  font: 16px var(--font); /* 16px evita zoom no iPhone */
}
.input::placeholder { color: #7d6c5e; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 132, 35, .2); }
.input-lg { min-height: 52px; font-size: 17px; }
.input-sm { width: auto; min-height: 40px; padding: 6px 10px; font-size: 14px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea.input { resize: vertical; min-height: 70px; }

.field { display: block; margin-bottom: 14px; }
.field-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.search-row { position: relative; display: flex; align-items: center; min-width: 0; }
.search-row > .ic { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-row .input { padding-left: 38px; }

.check-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--accent); }

/* chips de escolha */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { position: relative; cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 500;
}
.chip-opt input:checked + span { background: rgba(224, 132, 35, .16); border-color: var(--accent); color: var(--accent-hi); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--accent-hi); }

.chip-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-2); cursor: pointer; font-size: 14px;
}
.chip-toggle .ic { opacity: .25; }
.chip-toggle.on { background: rgba(67, 169, 111, .16); border-color: var(--ok); color: #8fe0b0; }
.chip-toggle.on .ic { opacity: 1; }
.chip-toggle.warn { border-color: var(--use); }

.chip-del { display: inline-flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 14px; }
.chip-del button { border: 0; background: var(--surface-3); color: var(--muted); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }

/* interruptor */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row small { display: block; color: var(--muted); font-size: 12px; }
.switch { flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--accent); border-color: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: #fff; }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent-hi); }
.switch-row input:disabled + .switch { opacity: .4; }

/* segmentado */
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); min-height: 36px; padding: 0 12px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.seg-wide { display: flex; }
.seg-wide button { flex: 1; }

/* ---------- selos ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.badge.st-ok { background: rgba(67, 169, 111, .16); color: #7fd6a3; }
.badge.st-use { background: rgba(224, 132, 35, .16); color: var(--accent-hi); }
.badge.st-charge { background: rgba(76, 141, 219, .18); color: #8ab9f0; }
.badge.st-bad { background: rgba(222, 75, 75, .18); color: #f19090; }
.badge.st-maint { background: rgba(140, 122, 107, .22); color: #c9b8a8; }
.badge.st-lost { background: rgba(160, 116, 224, .18); color: #c5a7f0; }
.badge.ev-ativo { background: rgba(67, 169, 111, .16); color: #7fd6a3; }
.badge.ev-preparacao { background: rgba(224, 132, 35, .16); color: var(--accent-hi); }
.badge.ev-encerrado { background: var(--surface-3); color: var(--muted); }

.team-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.team-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--maint)); }
.team-chip .ch { font-weight: 800; color: var(--text); background: rgba(255,255,255,.08); padding: 0 6px; border-radius: 99px; }
.team-chip.muted { color: var(--muted); }

.pend { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(224,132,35,.25); vertical-align: middle; }

.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; margin: 0 0 14px; }
.note p { margin: 0 0 4px; }
.note .ic { margin-top: 1px; color: var(--muted); }
.note-warn { border-color: rgba(224,132,35,.5); background: rgba(224,132,35,.08); }
.note-warn .ic { color: var(--accent); }
.note-ok { border-color: rgba(67,169,111,.5); background: rgba(67,169,111,.1); }
.note-ok .ic { color: var(--ok); }

.empty { text-align: center; padding: 48px 16px; max-width: 420px; margin: 0 auto; }
.empty-mark { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.empty-mark img { width: 44px; opacity: .8; }
.empty h3 { font: 22px var(--display); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 6px; }
.empty p { color: var(--muted); }
.empty .btn { margin-top: 8px; }

/* ---------- login ---------- */
body.auth { background: radial-gradient(120% 70% at 50% 0%, #2a1a0d 0%, var(--bg) 60%); }
.auth-wrap { min-height: 100vh; display: grid; place-content: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.auth-card { width: min(420px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 22px; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-brand h1 { line-height: 0; margin-bottom: 8px; }
.auth-brand h1 img { height: 40px; width: auto; }
.auth-brand p { margin: 0; text-transform: uppercase; letter-spacing: .3em; font-size: 11px; font-weight: 700; color: var(--muted); }
.auth-card h2 { font: 24px var(--display); text-transform: uppercase; margin-bottom: 6px; }
.auth-err { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r); background: rgba(222,75,75,.14); color: #f5a3a3; font-size: 14px; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; font-weight: 700; }
.saved-users { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.saved-user { display: grid; justify-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font-size: 12px; color: var(--text-2); }
.saved-user:hover .avatar { border-color: var(--accent); }

.avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-2); font-weight: 800; font-size: 14px; color: var(--accent-hi); flex: none; text-decoration: none; }
.avatar.sm { width: 38px; height: 38px; font-size: 13px; }

/* ---------- topo e navegação ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 12px 0;
  background: rgba(14, 11, 9, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-txt img { height: 18px; width: auto; display: block; }
.brand-txt small { font-size: 9px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: 2px; }
.ev-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 42vw; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ev-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-chip .ic { color: var(--accent); }
.ev-closed { font-style: normal; font-size: 10px; text-transform: uppercase; color: var(--muted); }
.sync-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.sp-ok { color: #7fd6a3; background: rgba(67,169,111,.12); }
.sp-off { color: #f0c27a; background: rgba(224,132,35,.12); border-color: rgba(224,132,35,.35); }
.sp-busy { color: var(--accent-hi); background: rgba(224,132,35,.12); }
.sp-busy .ic { animation: spin 1.2s linear infinite; }
.sp-err { color: #fff; background: var(--bad); }
.avatar-btn { width: 38px; height: 38px; font-size: 13px; }

.expired-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(222,75,75,.15); border-bottom: 1px solid rgba(222,75,75,.4); color: #f5b0b0; font-size: 14px; }
.expired-bar span { flex: 1; }

#view { padding: 16px 14px calc(var(--bottom-h) + 28px + var(--safe-b)); max-width: 1400px; outline: none; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--bottom-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  background: rgba(20, 16, 12, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.bottomnav a { display: grid; justify-items: center; gap: 3px; padding: 10px 0; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
.bottomnav a.on { color: var(--accent-hi); }
.bottomnav .nav-scan .nav-ic { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(224,132,35,.4), 0 0 0 5px var(--bg); }
.bottomnav .nav-scan.on { color: var(--accent-hi); }
.sidenav { display: none; }

/* ---------- cabeçalho de página ---------- */
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.page-titles { flex: 1 1 200px; min-width: 0; }
.page-title { font: 28px var(--display); text-transform: uppercase; letter-spacing: .02em; }
.page-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { margin-left: -8px; }
.sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin: 22px 0 10px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .search-row { flex: 1 1 220px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; background: transparent; border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.fchip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- painel ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { text-align: left; padding: 12px 12px 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: pointer; position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--text-2); }
.kpi b { display: block; font: 34px/1 var(--display); }
.kpi span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi.k-ok::before { background: var(--ok); } .kpi.k-ok b { color: #7fd6a3; }
.kpi.k-use::before { background: var(--use); } .kpi.k-use b { color: var(--accent-hi); }
.kpi.k-charge::before { background: var(--charge); } .kpi.k-charge b { color: #8ab9f0; }
.kpi.k-bad::before { background: var(--bad); } .kpi.k-bad b { color: #f19090; }
.kpi.on { border-color: var(--text-2); background: var(--surface-2); }
.kpi .ks { display: none; }

.alert-bar { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--r); background: rgba(222,75,75,.12); border: 1px solid rgba(222,75,75,.45); color: #f5b0b0; cursor: pointer; font-size: 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  --sc: var(--ok);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  min-height: 150px; padding: 10px 12px 12px; border-radius: var(--r); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform .08s, border-color .15s;
}
.tile::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--sc); }
.tile:active { transform: scale(.98); }
.tile:hover { border-color: var(--line-2); }
.tile.st-ok { --sc: var(--ok); }
.tile.st-use { --sc: var(--use); background: linear-gradient(180deg, rgba(224,132,35,.13), var(--surface) 70%); }
.tile.st-charge { --sc: var(--charge); background: linear-gradient(180deg, rgba(76,141,219,.13), var(--surface) 70%); }
.tile.st-bad { --sc: var(--bad); background: repeating-linear-gradient(135deg, rgba(222,75,75,.07) 0 8px, transparent 8px 16px), var(--surface); }
.tile.st-maint { --sc: var(--maint); opacity: .8; }
.tile.st-lost { --sc: var(--lost); background: repeating-linear-gradient(135deg, rgba(160,116,224,.08) 0 8px, transparent 8px 16px), var(--surface); }
.tile.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.tile-top { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 20px; }
.tile-pref { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-batt { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; }
.tile-batt.batt-low { background: var(--bad); color: #fff; animation: blink 1.6s ease-in-out infinite; }
.tile-batt.batt-warn { background: rgba(224,132,35,.25); color: var(--accent-hi); }
@keyframes blink { 50% { opacity: .55; } }
.tile-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.tile.sel .tile-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile-num { font: 48px/1 var(--display); letter-spacing: .01em; margin: 4px 0 6px; }
.tile-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--sc); text-transform: uppercase; letter-spacing: .04em; }
.tile.st-use .tile-status { color: var(--accent-hi); }
.tile-who { margin-top: auto; padding-top: 8px; width: 100%; min-width: 0; }
.tile-who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-who small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile[style*='--tc'] .tile-who b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tc); margin-right: 6px; vertical-align: 1px; }

.team-group { margin-bottom: 18px; }
.team-group header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.team-group h3 { font: 20px var(--display); text-transform: uppercase; letter-spacing: .02em; }
.team-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tc); }
.ch-pill { padding: 2px 10px; border-radius: 99px; background: var(--surface-3); font-weight: 800; font-size: 12px; }
.team-group-rest { opacity: .85; }

.sel-bar {
  position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(var(--bottom-h) + var(--safe-b) + 10px);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.sel-bar > span { flex: 1; font-size: 14px; }

/* ---------- painéis deslizantes ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .2s; }
.sheet {
  position: relative; width: 100%; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.8,.3,1); box-shadow: var(--shadow);
}
.sheet-wrap.in .sheet-backdrop { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 8px; padding: 18px 12px 10px 18px; position: relative; }
.sheet-grab { position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-2); }
.sheet-titles { flex: 1; min-width: 0; padding-top: 6px; }
.sheet-title { font: 24px var(--display); text-transform: uppercase; letter-spacing: .02em; }
.sheet-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.sheet-body { padding: 6px 18px 18px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot .btn-primary { flex: 1 1 auto; max-width: 340px; }
.confirm-msg { font-size: 16px; color: var(--text-2); }

/* toasts */
#toasts { position: fixed; z-index: 90; left: 12px; right: 12px; bottom: calc(var(--bottom-h) + var(--safe-b) + 14px); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 520px; width: 100%; padding: 10px 12px; border-radius: var(--r); background: #2b2119; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.in { opacity: 1; transform: none; }
.toast-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; }
.toast-ok .toast-ic { background: var(--ok); color: #082414; }
.toast-err .toast-ic { background: var(--bad); color: #fff; }
.toast-info .toast-ic { background: var(--accent); color: var(--accent-ink); }
.toast-msg { flex: 1; }
.toast-act { border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 8px 12px; border-radius: 8px; cursor: pointer; }

/* listas de escolha */
.pick-list { display: grid; gap: 6px; margin: 10px 0; }
.pick-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px 12px 8px 8px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; }
.pick-item.on { border-color: var(--accent); background: rgba(224,132,35,.08); }
.pick-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3); font: 20px var(--display); flex: none; border-bottom: 3px solid var(--ok); }
.pick-num.st-use { border-bottom-color: var(--use); }
.pick-num.st-charge { border-bottom-color: var(--charge); }
.pick-num.st-bad { border-bottom-color: var(--bad); }
.pick-num.st-maint { border-bottom-color: var(--maint); }
.pick-num.st-lost { border-bottom-color: var(--lost); }
.pick-main { flex: 1; min-width: 0; }
.pick-main b { display: block; }
.pick-main small { color: var(--muted); font-size: 12px; }
.pick-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; flex: none; }
.pick-item.on .pick-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.sel-radios { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sel-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); border-left: 4px solid var(--ok); font-size: 14px; }
.sel-chip.st-use { border-left-color: var(--use); }
.sel-chip.st-charge { border-left-color: var(--charge); }
.sel-chip.st-bad, .sel-chip.st-lost { border-left-color: var(--bad); }
.sel-x { border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.sel-x:hover { background: var(--surface); color: var(--text); }
.sel-add { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; font-size: 14px; }
.sel-add:hover { border-color: var(--accent); color: var(--accent-hi); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.team-opt { position: relative; cursor: pointer; }
.team-opt input { position: absolute; opacity: 0; pointer-events: none; }
.team-opt > span { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; min-height: 52px; padding: 8px 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.team-opt i { width: 12px; height: 12px; border-radius: 50%; background: var(--tc); grid-row: span 2; }
.team-opt b { font-size: 14px; line-height: 1.2; }
.team-opt small { color: var(--muted); font-size: 12px; font-weight: 700; }
.team-opt input:checked + span { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, var(--bg-2)); box-shadow: 0 0 0 1px var(--tc) inset; }
.team-opt input:focus-visible + span { outline: 2px solid var(--accent-hi); }

.ret-card { padding: 10px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px; }
.ret-top { display: flex; align-items: center; gap: 10px; }
.ret-num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--surface-3); font: 22px var(--display); flex: none; }
.ret-num.st-use { background: rgba(224,132,35,.2); color: var(--accent-hi); }
.ret-num.st-bad { background: rgba(222,75,75,.2); color: #f19090; }
.ret-info { flex: 1; min-width: 0; }
.ret-info > b { display: block; }
.ret-acc { margin-top: 10px; display: grid; gap: 6px; }
.holder { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }

.batt { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 12px; color: var(--muted); }
.batt-track { flex: 1; max-width: 140px; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.batt-track i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.batt-warn .batt-track i { background: var(--accent); }
.batt-low .batt-track i { background: var(--bad); }
.batt-low { color: #f19090; }
.batt-ic { display: grid; }

.radio-hero { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.radio-hero-num { flex: none; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 16px; background: var(--surface-3); font: 54px/1 var(--display); border-bottom: 5px solid var(--ok); }
.radio-hero-num.st-use { border-bottom-color: var(--use); color: var(--accent-hi); }
.radio-hero-num.st-charge { border-bottom-color: var(--charge); }
.radio-hero-num.st-bad { border-bottom-color: var(--bad); }
.radio-hero-num.st-maint { border-bottom-color: var(--maint); }
.radio-hero-num.st-lost { border-bottom-color: var(--lost); }
.radio-hero-info { flex: 1; min-width: 0; }
.radio-hero-info p { margin: 6px 0 0; }
.hero-holder { margin-top: 8px; }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 14px; }
.act-grid .btn { min-height: 48px; justify-content: flex-start; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats div { padding: 10px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.mini-stats b { display: block; font: 22px var(--display); }
.mini-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }
.mini-list li { padding: 8px 10px; border-radius: 8px; background: var(--bg-2); }
.row-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; }
.row-links a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }

.photo-pick { display: block; cursor: pointer; }
.photo-pick > span { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 90px; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--muted); overflow: hidden; }
.photo-pick img { max-height: 220px; width: 100%; object-fit: cover; }
.inc-photo { width: 100%; border-radius: var(--r); margin: 8px 0; }

/* ---------- leitura de QR ---------- */
.scan-wrap { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; }
.cam { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden; background: #000; border: 1px solid var(--line); }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-frame { position: absolute; inset: 18%; }
.cam-frame i { position: absolute; width: 38px; height: 38px; border: 4px solid var(--accent); }
.cam-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.cam-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.cam-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.cam-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.cam-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: var(--text-2); background: rgba(0,0,0,.7); font-size: 14px; }
.cam-torch { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; }
.cam-torch.on { background: var(--accent); color: var(--accent-ink); }
.manual { display: flex; gap: 8px; }
.tray { padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.tray-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tray-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- histórico ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-day { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 2; padding: 10px 0 6px; background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 800; }
.tl-item { display: grid; grid-template-columns: 46px 30px 1fr auto; gap: 8px; align-items: start; padding: 10px 8px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.tl-item:hover { background: var(--surface); }
.tl-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; color: var(--text-2); padding-top: 4px; }
.tl-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); }
.tl-retirada .tl-ic { background: rgba(224,132,35,.2); color: var(--accent-hi); }
.tl-devolucao .tl-ic { background: rgba(67,169,111,.2); color: #7fd6a3; }
.tl-carga_inicio .tl-ic, .tl-carga_fim .tl-ic { background: rgba(76,141,219,.2); color: #8ab9f0; }
.tl-status .tl-ic { background: rgba(222,75,75,.18); color: #f19090; }
.tl-body { min-width: 0; font-size: 14px; }
.tl-body small { display: block; margin-top: 2px; }
.tl-item.voided .tl-body > div { text-decoration: line-through; opacity: .5; }
.tl-item .pend { margin-top: 10px; }

/* ---------- cartões e listas ---------- */
.cards { display: grid; gap: 8px; }
.inc-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.inc-card.done { opacity: .7; }
.inc-thumb { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; flex: none; }
.inc-ic { display: grid; place-items: center; background: rgba(222,75,75,.15); color: #f19090; }
.inc-main { flex: 1; min-width: 0; display: grid; gap: 2px; justify-items: start; }
.inc-desc { font-size: 14px; color: var(--text-2); }

.me-card, .sync-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; flex-wrap: wrap; }
.me-card > div, .sync-card > div { flex: 1 1 160px; min-width: 0; }
.me-card small, .sync-card small { display: block; color: var(--muted); font-size: 13px; }
.sync-card.off { border-color: rgba(224,132,35,.45); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.menu-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); cursor: pointer; }
.menu-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.menu-card > span:nth-child(2) { flex: 1; min-width: 0; }
.menu-card small { display: block; color: var(--muted); font-size: 12px; }
.menu-card > .ic:last-child { color: var(--muted); }
.menu-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(224,132,35,.13); color: var(--accent); flex: none; }
.install-card { border-color: var(--accent); margin: 10px 0; }

.ev-card { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.ev-card.cur { border-color: var(--accent); }
.ev-main { flex: 1 1 240px; min-width: 0; }
.ev-main h3 { font: 22px var(--display); text-transform: uppercase; margin: 6px 0 2px; }
.ev-main p { margin: 0; }
.ev-actions { display: flex; gap: 6px; align-items: center; }
.cur-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent-hi); }

.row-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: pointer; color: var(--text); }
.row-card:disabled { cursor: default; opacity: 1; }
.row-card:not(:disabled):hover { border-color: var(--line-2); }
.row-main { flex: 1; min-width: 0; }
.row-main small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.team-swatch { width: 14px; align-self: stretch; border-radius: 6px; background: var(--tc); flex: none; }
.ch-big { display: grid; justify-items: center; font: 30px/1 var(--display); color: var(--text); }
.ch-big small { font: 600 10px var(--font); text-transform: uppercase; color: var(--muted); letter-spacing: .08em; }

.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface); }
.table tr.inactive td { opacity: .5; }

.panel { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.panel h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 6px; }
.panel .chips { margin: 10px 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .input:not(.input-sm) { flex: 1 1 200px; width: auto; }
.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.color-opt { cursor: pointer; }
.color-opt input { position: absolute; opacity: 0; }
.color-opt i { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--c); border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line-2); }
.color-opt input:checked + i { border-color: var(--bg); box-shadow: 0 0 0 3px var(--text); }

/* ---------- checklist ---------- */
.progress-card { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.progress-top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.progress-top span { font: 22px var(--display); color: var(--accent); }
.progress { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 8px 0 10px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); border-radius: 99px; transition: width .3s; }
.ck-list { display: grid; gap: 6px; }
.ck-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.ck-row.ok { border-color: rgba(67,169,111,.45); }
.ck-num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--surface-3); font: 20px var(--display); flex: none; }
.ck-num.st-ok { background: var(--ok); color: #082414; }
.ck-name { flex: 1 1 120px; min-width: 0; }
.ck-name small { display: block; color: var(--muted); font-size: 12px; }
.ck-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-t { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; }
.ck-t .ic { opacity: .25; }
.ck-t.on { background: rgba(67,169,111,.16); border-color: var(--ok); color: #8fe0b0; }
.ck-t.on .ic { opacity: 1; }

/* ---------- fechamento ---------- */
.step-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.step-head h3 { font: 20px var(--display); text-transform: uppercase; margin: 0; }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); font-weight: 800; flex: none; }
.step-n.ok { background: var(--ok); color: #082414; }
.pend-list { display: grid; gap: 6px; margin-bottom: 12px; }
.pend-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); width: 100%; text-align: left; color: var(--text); }
.pend-row.as-btn { cursor: pointer; }
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin: 12px 0; }
.bag-item { position: relative; display: grid; justify-items: center; gap: 2px; padding: 12px 4px 8px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line-2); cursor: pointer; }
.bag-item b { font: 26px/1 var(--display); }
.bag-item small { font-size: 10px; color: var(--muted); text-transform: uppercase; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bag-check { position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.bag-item.on { background: rgba(67,169,111,.14); border-color: var(--ok); }
.bag-item.on .bag-check { background: var(--ok); border-color: var(--ok); color: #082414; }
.bag-item.warn { border-color: var(--use); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.owner-block { padding: 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px; }
.owner-block.done { border-color: rgba(67,169,111,.45); }
.owner-block header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.owner-block header b { font-size: 16px; }
.owner-block header .btn { margin-left: auto; }
.owner-block header a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }

/* ---------- relatório e impressos ---------- */
.paper { background: var(--paper); color: #1d140d; border-radius: var(--r-lg); padding: 28px; max-width: 980px; margin: 0 auto; box-shadow: var(--shadow); }
.paper-head { display: flex; gap: 16px; align-items: center; padding-bottom: 16px; border-bottom: 3px solid var(--accent-deep); margin-bottom: 20px; }
.paper-head img { width: 72px; height: auto; }
.paper-head > div { flex: 1; }
.paper-head h1 { font: 32px var(--display); text-transform: uppercase; letter-spacing: .01em; }
.paper-head p { margin: 2px 0 0; color: #6d5a49; font-size: 13px; }
.paper-kicker { font-size: 11px !important; letter-spacing: .25em; text-transform: uppercase; font-weight: 800; color: var(--accent-deep) !important; }
.paper-gen { text-align: right; font-size: 11px !important; }
.paper h2 { font: 20px var(--display); text-transform: uppercase; margin: 26px 0 10px; color: var(--brown); letter-spacing: .02em; }
.paper-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.paper-kpis div { padding: 10px 12px; border-radius: 10px; background: #f1e8de; }
.paper-kpis div.bad { background: #f8dcdc; }
.paper-kpis b { display: block; font: 26px var(--display); color: var(--brown); }
.paper-kpis span { font-size: 11px; color: #6d5a49; font-weight: 600; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ptable.small { font-size: 11px; }
.ptable th { text-align: left; background: var(--brown); color: #fff; padding: 7px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ptable td { padding: 6px 8px; border-bottom: 1px solid #e6dbcf; vertical-align: top; }
.ptable tr:nth-child(even) td { background: #f6efe7; }
.ptable .r { text-align: right; font-variant-numeric: tabular-nums; }
.pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.paper .muted { color: #8a7563; }
.paper-foot { margin-top: 28px; padding-top: 10px; border-top: 1px solid #e6dbcf; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: #8a7563; text-align: center; font-weight: 700; }
.paper-note { margin-top: 16px; font-size: 13px; color: #6d5a49; }

.channels-paper .ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ch-card { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: #f1e8de; border-left: 8px solid var(--tc); }
.ch-num { font: 46px/1 var(--display); color: var(--brown); min-width: 54px; text-align: center; }
.ch-info b { display: block; font-size: 17px; }
.ch-info small { color: #6d5a49; }

.labels { display: grid; gap: 10px; }
.labels-p { grid-template-columns: repeat(auto-fill, 4cm); }
.labels-m { grid-template-columns: repeat(auto-fill, 6cm); }
.label { background: #fff; color: #120c07; border-radius: 6px; border: 1px dashed #b9a796; display: flex; align-items: center; gap: 2mm; padding: 2mm; break-inside: avoid; page-break-inside: avoid; }
.labels-p .label { width: 4cm; height: 3cm; }
.labels-m .label { width: 6cm; height: 5cm; flex-direction: column; justify-content: center; }
.label-qr { flex: none; }
.labels-p .label-qr { width: 2.3cm; height: 2.3cm; }
.labels-p .label-word { display: none; }
.label-word { height: 2.6mm !important; width: auto !important; }
.labels-p .label-brand img { width: 4.5mm; height: 4.5mm; }
.labels-m .label-qr { width: 3.2cm; height: 3.2cm; }
.label-qr svg { width: 100%; height: 100%; display: block; }
.label-txt { display: grid; justify-items: center; min-width: 0; text-align: center; }
.labels-m .label-txt { grid-auto-flow: row; }
.label-txt { flex: 1; }
.label-brand { display: flex; align-items: center; gap: 1mm; font: 8pt var(--display); letter-spacing: .08em; color: var(--accent-deep); }
.label-brand img { width: 3.5mm; height: 3.5mm; }
.label-num { font: 22pt/1 var(--display); }
.labels-m .label-num { font-size: 20pt; }
.label-pref { font-size: 5.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0; max-width: 1.2cm; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.labels-m .label-pref { max-width: none; font-size: 8pt; }
.label-owner { font-size: 6pt; color: #6d5a49; }

/* ---------- telas maiores (tablet e computador) ---------- */
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
  .tile-num { font-size: 56px; }
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { width: min(560px, 100%); border-radius: 22px; border-bottom: 1px solid var(--line); max-height: 88vh; transform: translateY(24px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet-wide { width: min(820px, 100%); }
  .sheet-wrap.in .sheet { opacity: 1; }
  .sheet-grab { display: none; }
  .sheet-foot { border-radius: 0 0 22px 22px; }
}

@media (min-width: 900px) {
  :root { --bottom-h: 0px; }
  body:not(.auth) #app { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto auto 1fr; min-height: 100vh; }
  .topbar { grid-column: 1 / -1; padding-left: 18px; padding-right: 18px; }
  .expired-bar { grid-column: 1 / -1; }
  .bottomnav { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: 2px; padding: 14px 10px;
    position: sticky; top: calc(var(--top-h) + var(--safe-t)); height: calc(100vh - var(--top-h) - var(--safe-t)); overflow-y: auto;
    border-right: 1px solid var(--line); background: var(--bg-2);
  }
  .sidenav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: var(--r); color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; }
  .sidenav a:hover { background: var(--surface); color: var(--text); }
  .sidenav a.on { background: var(--surface-2); color: var(--accent-hi); }
  .sidenav a.nav-scan { background: var(--accent); color: var(--accent-ink); margin: 6px 0; }
  .sidenav a.nav-scan.on { box-shadow: 0 0 0 2px var(--accent-hi); }
  .side-extra { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
  .side-extra a { min-height: 40px; font-size: 13px; font-weight: 500; }
  #view { padding: 22px 26px 40px; width: 100%; }
  .sel-bar { left: 240px; right: 24px; bottom: 20px; }
  .ev-chip { max-width: 320px; }
  .kpi b { font-size: 40px; }
}

@media (max-width: 599px) {
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .kpi { padding: 10px 8px 8px; }
  .kpi b { font-size: 28px; }
  .kpi span { font-size: 10px; }
  .kpi .kl { display: none; }
  .kpi .ks { display: inline; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { min-height: 138px; }
  .brand-txt { display: none; }
  .ev-chip { flex: 1 1 auto; max-width: none; padding: 0 10px; }
  .sync-pill.sp-ok span { display: none; }
  .sync-pill.sp-ok { padding: 0 8px; }
  .sync-pill span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
  .topbar > .grow { display: none; }
  .hide-sm { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .page-title { font-size: 24px; }
  .toolbar .input-sm { flex: 1 1 140px; }
  .act-grid { grid-template-columns: 1fr 1fr; }
  .act-grid .btn { white-space: normal; text-align: left; line-height: 1.2; font-size: 13px; }
  .paper { padding: 16px; border-radius: 12px; }
  .paper-head { flex-wrap: wrap; }
  .paper-gen { text-align: left; width: 100%; }
  .table-wrap { margin: 0 -4px; }
}

@media (min-width: 900px) {
  #toasts { bottom: 20px; left: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- impressão ---------- */
.print-hide { }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff !important; color: #000; }
  .no-print, .topbar, .sidenav, .bottomnav, .expired-bar, #toasts, .sheet-wrap, .sel-bar { display: none !important; }
  body:not(.auth) #app { display: block !important; }
  #view { padding: 0 !important; max-width: none; }
  .paper { box-shadow: none; border-radius: 0; padding: 0; max-width: none; background: #fff; }
  .print-hide { display: none !important; }
  .ptable th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .paper-kpis div, .ptable tr:nth-child(even) td, .ch-card, .pdot, .label-brand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ptable tr { break-inside: avoid; }
  .paper h2 { break-after: avoid; }
  .labels { gap: 2mm; }
  .label { border-color: #ccc; }
}
body.has-sheet #toasts { bottom: auto; top: calc(var(--safe-t) + 14px); }
