/* ============ AionWash — design system (tema escuro + dourado) ============ */
:root {
  --gold: #C9A84C; --gold-2: #E5C76B; --gold-3: #9A7E3A; --gold-glow: rgba(201,168,76,.14);
  --bg: #0A0A0B; --bg-2: #111113; --surface: #16161A; --surface-2: #1D1D22; --line: #2A2A31; --line-2: #36363F;
  --text: #F5F5F7; --text-2: #B9B9C2; --muted: #8A8A94;
  --ok: #43A047; --warn: #FB8C00; --danger: #E53935; --info: #42A5F5; --violet: #9C6ADE;
  --c-requested: #F2B84B; --c-scheduled: #42A5F5; --c-entrada: #9C6ADE; --c-running: #FB8C00;
  --c-ready: #43A047; --c-delivered: #8A8A94; --c-cancelled: #F26D68;
  --r: 14px; --r-sm: 10px; --shadow: 0 8px 30px rgba(0,0,0,.45);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 68px;
  font-family: -apple-system, 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); min-height: 100dvh; font-size: 15px; line-height: 1.45; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--gold-2); }
img { max-width: 100%; display: block; }
.ic { flex: none; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.gold { color: var(--gold); }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* ---------- Topo ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 6px; padding: calc(10px + var(--safe-t)) 10px 10px;
  background: linear-gradient(180deg, var(--bg-2), rgba(10,10,11,.92)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .brand-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; background: var(--surface); border: 1px solid var(--gold-3); flex: none; }
.topbar h1 { flex: 1; font-size: 17px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--text-2); position: relative; flex: none; }
.icon-btn:hover { background: var(--surface); color: var(--gold); }
.icon-btn .badge { position: absolute; top: 4px; right: 2px; }
#syncState[data-state="ok"] { color: var(--ok); }
#syncState[data-state="error"] { color: var(--danger); }
#syncState[data-state="syncing"] .ic { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.op-chip { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); max-width: 120px; overflow: hidden; white-space: nowrap; }

/* ---------- Conteúdo ---------- */
#view { padding: 14px 16px calc(var(--nav-h) + 24px + var(--safe-b)); max-width: 1100px; margin: 0 auto; }
.section { margin: 18px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section h2, .h2 { font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.section .link { color: var(--text-2); font-size: 13px; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.card.gold { border-color: var(--gold-3); background: linear-gradient(160deg, rgba(201,168,76,.10), var(--surface) 55%); }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--text-2); }
.kv b { text-align: right; }

/* ---------- Tiles (menu com ícones) ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 100px; padding: 12px 6px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: center; font-size: 13px; font-weight: 600; color: var(--text);
  transition: transform .12s ease, border-color .15s ease, background .15s ease; }
.tile:active { transform: scale(.97); }
@media (hover: hover) { .tile:hover { border-color: var(--gold-3); background: var(--surface-2); } }
.tile .tile-ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: var(--tc, var(--gold)); background: color-mix(in srgb, var(--tc, var(--gold)) 16%, transparent); }
.tile .tile-sub { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: -4px; line-height: 1.25; }
.tile .badge { position: absolute; top: 8px; right: 8px; }
.tile.locked { opacity: .45; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #C62828; color: #fff; font-size: 11px; font-weight: 700; }
.group-title { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 20px 0 10px; }

/* Ações rápidas grandes */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 700px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick-btn { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 14px; border-radius: var(--r); font-weight: 700; font-size: 15px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); }
.quick-btn.primary { background: linear-gradient(135deg, var(--gold-2), var(--gold) 45%, var(--gold-3)); color: #111; border: 0; }
.quick-btn .qi { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.2); flex: none; }
.quick-btn:not(.primary) .qi { background: var(--gold-glow); color: var(--gold); }
.quick-btn small { display: block; font-weight: 500; font-size: 12px; opacity: .8; }

/* ---------- Indicadores ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.stat-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--gold-glow); color: var(--gold); flex: none; }
.stat.ok .stat-ic { background: rgba(67,160,71,.15); color: var(--ok); }
.stat.warn .stat-ic { background: rgba(251,140,0,.15); color: var(--warn); }
.stat.danger .stat-ic { background: rgba(229,57,53,.15); color: var(--danger); }
.stat.info .stat-ic { background: rgba(66,165,245,.15); color: var(--info); }
.stat-val { font-size: clamp(15px, 4.4vw, 20px); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.2px; }
.stat > div { min-width: 0; }
.stat-lbl { font-size: 12px; color: var(--text-2); }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Gráficos */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 18px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); }
.bar.ok { background: linear-gradient(180deg, #66BB6A, #2E7D32); }
.bar.info { background: linear-gradient(180deg, #64B5F6, #1565C0); }
.bar.danger { background: linear-gradient(180deg, #EF5350, #B71C1C); }
.bar-val { font-size: 10px; color: var(--text-2); margin-bottom: 3px; white-space: nowrap; }
.bar-lbl { font-size: 10px; color: var(--muted); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rank-row { margin-bottom: 10px; }
.rank-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.rank-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.rank-track div { height: 100%; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); border-radius: 4px; }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-height: 64px; text-align: left; width: 100%; }
button.item:hover, .item[role=button]:hover { border-color: var(--gold-3); }
.item .avatar { width: 42px; height: 42px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--gold);
  background: var(--gold-glow); border: 1px solid rgba(201,168,76,.25); }
.item .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .end { margin-left: auto; text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.money-in { color: #66BB6A; font-weight: 700; font-variant-numeric: tabular-nums; }
.money-out { color: #EF5350; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .3px;
  color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 40%, transparent); white-space: nowrap; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }

/* Placa estilo Mercosul */
.plate { display: inline-flex; flex-direction: column; align-items: stretch; min-width: 84px; border-radius: 5px; overflow: hidden; background: #fff; color: #111; border: 1.5px solid #222;
  font-family: 'DIN Alternate', 'Arial Narrow', 'Roboto Condensed', monospace; font-weight: 800; font-size: 15px; letter-spacing: 1.5px; text-align: center; line-height: 1; flex: none; }
.plate::before { content: 'BRASIL'; display: block; background: #1D4FA0; color: #fff; font-size: 7px; letter-spacing: 2px; padding: 2px 0; font-weight: 700; }
.plate span { padding: 4px 6px 5px; }

/* ---------- Pátio em colunas ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 86%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 8px; margin: 0 -16px; }
@media (min-width: 900px) { .board { grid-auto-columns: 1fr; overflow: visible; } }
.col { scroll-snap-align: start; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 200px; }
.col-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; padding: 4px 4px 10px; color: var(--cc, var(--gold)); }
.col-head .count { margin-left: auto; background: var(--surface-2); color: var(--text-2); border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.os-card { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--cc, var(--gold)); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.os-card .os-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.os-card .os-sub { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.os-card .os-actions { display: flex; gap: 6px; margin-top: 10px; }
.os-card .os-actions .btn { flex: 1; min-height: 44px; padding: 8px; font-size: 13px; }
.timer { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--warn); display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 16px; border-radius: 12px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: transform .1s ease, filter .15s ease; text-decoration: none; text-align: center; }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.primary { background: linear-gradient(135deg, var(--gold-2), var(--gold) 45%, var(--gold-3)); color: #111; }
.btn.secondary { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn.success { background: linear-gradient(135deg, #4CAF50, #2E7D32); color: #fff; }
.btn.danger { background: linear-gradient(135deg, #EF5350, #C62828); color: #fff; }
.btn.info { background: linear-gradient(135deg, #42A5F5, #1565C0); color: #fff; }
.btn.warn { background: linear-gradient(135deg, #FFA726, #E65100); color: #111; }
.btn.wa { background: #1FA855; color: #fff; }
.btn.sm { min-height: 44px; padding: 8px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.btn-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); z-index: 40; width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: #111; box-shadow: 0 10px 30px rgba(201,168,76,.35); }

/* ---------- Formulários ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 480px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; }
.field label b { color: var(--gold); }
.input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; font-size: 16px; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.input[aria-invalid="true"] { border-color: var(--danger); }
textarea.input { min-height: 84px; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input[type=date].input, input[type=time].input { color-scheme: dark; }
.money-wrap { position: relative; }
.money-wrap span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.money-wrap .input { padding-left: 40px; font-variant-numeric: tabular-nums; }
.plate-input { text-transform: uppercase; letter-spacing: 2px; font-weight: 800; font-size: 18px; }
.hint { color: var(--muted); font-size: 12px; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.search { position: relative; }
.search > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 44px; }

/* Escolha com ícones */
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.seg.wrap { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.seg-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 6px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; line-height: 1.2; }
.seg-btn { position: relative; }
.seg-btn.on { border: 2px solid var(--gold); color: var(--gold-2); background: var(--gold-glow); }
.seg-btn.on::after { content: '✓'; position: absolute; top: 3px; right: 6px; font-size: 12px; font-weight: 800; color: var(--gold-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; align-items: flex-start; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 14px; font-weight: 600; color: var(--text-2); text-align: left; }
.chip small { font-size: 11px; font-weight: 500; color: var(--muted); }
.chip.on { background: var(--gold); color: #111; border-color: var(--gold); }
.chip.on small { color: #3a2f10; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); }
.tab.on { background: var(--gold); color: #111; border-color: var(--gold); }

/* Checklist de avarias */
.chk-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.chk-item:last-child { border-bottom: 0; }
.chk-opts { display: flex; gap: 6px; flex: none; }
.chk-opts button { min-width: 48px; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 12px; font-weight: 700; color: var(--text-2); }
.chk-opts button[aria-pressed="true"][data-v="ok"] { background: rgba(67,160,71,.18); border-color: var(--ok); color: #81C784; }
.chk-opts button[aria-pressed="true"][data-v="nok"] { background: rgba(229,57,53,.18); border-color: var(--danger); color: #EF9A9A; }
.chk-opts button[aria-pressed="true"][data-v="na"] { background: var(--surface-2); border-color: var(--muted); color: var(--text); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1.5px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 12px; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo .rm { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 2; }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.75); color: var(--gold-2); font-size: 11px; text-align: center; padding: 3px; z-index: 2; }
.sign-pad { width: 100%; height: 150px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); touch-action: none; display: block; }

/* ---------- Modal e toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.72); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
@media (min-width: 640px) { .modal-back { align-items: center; padding: 20px; } }
.modal { width: 100%; max-width: 520px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); animation: up .2s ease; }
.modal.wide { max-width: 760px; }
@media (min-width: 640px) { .modal { border-radius: 20px; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 8px 10px 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; font-size: 17px; }
.modal-ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--gold-glow); color: var(--gold); flex: none; }
.modal-ic.danger { background: rgba(229,57,53,.15); color: var(--danger); }
.modal-ic.ok { background: rgba(67,160,71,.15); color: var(--ok); }
.modal-body { padding: 16px; overflow-y: auto; }
.modal-actions { display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.modal-actions .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + var(--safe-b)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 2000;
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--gold-3); color: var(--text); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); text-align: center; transition: all .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: var(--ok); }
.toast.warn { border-color: var(--warn); }
.toast.danger { border-color: var(--danger); }

/* ---------- Navegação inferior ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(17,17,19,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.bottom-nav button.on { color: var(--gold); }
.bottom-nav button.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
.bottom-nav .nav-center .ic-wrap { width: 50px; height: 50px; margin-top: -20px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: #111; box-shadow: 0 6px 20px rgba(201,168,76,.35); }
.bottom-nav .nav-center.on::before { display: none; }
.bottom-nav [data-badge] { position: absolute; top: 6px; left: calc(50% + 6px); }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(ellipse at top, rgba(201,168,76,.15), transparent 60%), var(--bg); }
.login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.login-logo { width: 110px; margin: 0 auto 6px; border-radius: 14px; }
.login h1 { text-align: center; font-size: 22px; }
.login p.sub { text-align: center; color: var(--text-2); margin-bottom: 6px; }
.login .err { color: #EF9A9A; background: rgba(229,57,53,.1); border: 1px solid rgba(229,57,53,.35); padding: 10px 12px; border-radius: 10px; font-size: 14px; }

/* ---------- Diversos ---------- */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty p { max-width: 300px; }
.alert-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; font-size: 14px; background: rgba(251,140,0,.1); border: 1px solid rgba(251,140,0,.35); color: #FFCC80; margin-bottom: 12px; }
.alert-box.info { background: rgba(66,165,245,.08); border-color: rgba(66,165,245,.3); color: #90CAF9; }
.alert-box.ok { background: rgba(67,160,71,.1); border-color: rgba(67,160,71,.35); color: #A5D6A7; }
.alert-box.danger { background: rgba(229,57,53,.1); border-color: rgba(229,57,53,.35); color: #EF9A9A; }
.alert-box .grow { color: inherit; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress div { height: 100%; background: var(--gold); }
.progress.danger div { background: var(--danger); }
.ad-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .ad-grid { grid-template-columns: repeat(4, 1fr); } }
.ad-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-align: left; }
.ad-card .ad-img { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; color: #999; }
.ad-card .ad-img img { width: 100%; height: 100%; object-fit: contain; }
.ad-card .ad-body { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ad-card .ad-title { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-card .ad-price { color: var(--gold-2); font-weight: 800; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
table.tbl td.r, table.tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.quick-btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Marca AionWash ---------- */
.center { text-align: center; }
.brand-foot { margin-top: 24px; }
.lg-brand, .pw-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.lg-brand img, .pw-brand img { border-radius: 14px; flex: none; }
.lg-name, .pw-brand span { font-size: 28px; font-weight: 800; letter-spacing: -.3px; line-height: 1.1; }
.lg-name b, .pw-brand b, .sn-brand b { color: var(--gold); font-weight: 800; }
.lg-tag { font-size: 13px; color: var(--text-2); }
.lg-dev, .pw-dev { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.lg-dev img, .pw-dev img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.lg-tabs { display: grid; grid-template-columns: 1fr 1.6fr; gap: 6px; padding: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.lg-tab { min-height: 48px; padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--text-2); line-height: 1.2; }
.lg-tab.on { background: var(--gold); color: #111; }
.lg-form { display: flex; flex-direction: column; gap: 12px; }
.lg-h { font-size: 20px; text-align: center; }
.lg-done { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.lg-done h1 { font-size: 22px; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 92px; }
.pass-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 44px; min-width: 80px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--gold-2); }
.ios-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.ios-steps .ic { vertical-align: -3px; color: var(--info); }
.install-card .tile-ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; color: var(--gold); background: var(--gold-glow); }

/* ---------- Assinatura: faixa, bloqueio e pagamento ---------- */
.plan-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line);
  background: rgba(251,140,0,.12); color: #FFCC80; }
.plan-bar.danger { background: rgba(229,57,53,.14); color: #EF9A9A; }
.plan-bar .btn { flex: none; }
.paywall { min-height: 100dvh; display: flex; justify-content: center; padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  background: radial-gradient(ellipse at top, rgba(201,168,76,.16), transparent 60%), var(--bg); }
.pw-box { width: 100%; max-width: 460px; }
.pw-card { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: stretch; padding: 22px 18px; }
.pw-card h1 { font-size: 23px; }
.pw-lock { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: #111;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); box-shadow: 0 10px 30px rgba(201,168,76,.3); }
.pay-box { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; text-align: left; }
.pay-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; justify-content: center; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.pay-price span { width: 100%; text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); font-weight: 700; }
.pay-price b { font-size: 30px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.pay-price small { color: var(--text-2); }
.pay-pix { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--gold-3); }
.pay-pix-lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .6px; }
.pay-pix-key { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; user-select: all; }

/* ---------- Barra lateral (computador) ---------- */
.side-nav { display: none; }
@media (min-width: 1024px) {
  :root { --side-w: 240px; }
  #app { padding-left: var(--side-w); }
  .bottom-nav { display: none; }
  .side-nav { display: flex; flex-direction: column; gap: 6px; position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); z-index: 60; padding: calc(14px + var(--safe-t)) 12px 14px;
    background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto; }
  .sn-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; font-size: 21px; font-weight: 800; letter-spacing: -.2px; }
  .sn-brand img { border-radius: 10px; }
  .sn-new { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; font-weight: 800; color: #111; margin-bottom: 8px;
    background: linear-gradient(135deg, var(--gold-2), var(--gold) 45%, var(--gold-3)); }
  .sn-list { display: flex; flex-direction: column; gap: 2px; }
  .sn-list button, .sn-extra { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); text-align: left; width: 100%; }
  .sn-list button:hover, .sn-extra:hover { background: var(--surface); color: var(--text); }
  .sn-list button.on { background: var(--gold-glow); color: var(--gold-2); }
  .sn-list button.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
  .sn-list .nv-ic, .sn-extra .nv-ic, .sn-new .nv-ic { display: inline-flex; }
  .sn-list [data-badge] { margin-left: auto; }
  .sn-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
  .sn-extra { color: var(--gold-2); }
  .topbar { padding-left: 20px; padding-right: 16px; }
  #view { max-width: 1280px; padding: 20px 28px 40px; }
  .tiles { grid-template-columns: repeat(6, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .quick { grid-template-columns: repeat(4, 1fr); }
  .ad-grid { grid-template-columns: repeat(5, 1fr); }
  .fab { bottom: 24px; right: 24px; }
  .toast { bottom: 24px; left: calc(50% + var(--side-w) / 2); }
  .plan-bar { padding-left: 28px; }
}
.pw-card h1:focus { outline: none; }
