/* PARTIU ENTREGA Web — Design System v2 (mesmos papéis de cor do Android 0.9+, contraste AA conferido em design/tokens.json).
   Identidade: grafite + laranja. Celular primeiro (barra inferior); a partir de 900 px, menu lateral e grade em colunas. */
:root {
  --bg: #0D0F12; --bg-2: #111418; --surface: #16191E; --surface-raised: #1E2228; --surface-hero: #1C1915;
  --border: #262A31; --border-input: #6B7482; --text: #F2F4F7; --text-muted: #A7B0BD; --text-faint: #808996;
  --accent: #FF7A1A; --accent-2: #FF9A4D; --on-accent: #1A0D00; --accent-text: #FF9A4D; --accent-soft: rgba(255, 122, 26, .14); --accent-line: rgba(255, 122, 26, .42);
  --success: #34D399; --success-soft: rgba(52, 211, 153, .13); --danger: #F87171; --danger-soft: rgba(248, 113, 113, .13);
  --warning: #FBBF24; --warning-soft: rgba(251, 191, 36, .13); --info: #60A5FA; --info-soft: rgba(96, 165, 250, .13);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .35);
  --glow: 0 0 0 1px var(--accent-line), 0 10px 40px -12px rgba(255, 122, 26, .35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabbar-h: 68px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(900px 500px at 85% -10%, rgba(255, 122, 26, .10), transparent 60%), radial-gradient(700px 400px at -10% 110%, rgba(255, 122, 26, .05), transparent 60%); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-text); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--text-muted); }
.fine { color: var(--text-faint); font-size: 13px; line-height: 1.45; }
.center { text-align: center; }
.strong { font-weight: 700; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.success { color: var(--success); } .danger { color: var(--danger); } .warning { color: var(--warning); } .accent { color: var(--accent-text); }
.strike { text-decoration: line-through; }

/* ---------------- casca ---------------- */
.shell { min-height: 100dvh; }
.content { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }
.main { outline: none; }
.sidenav { display: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(13, 15, 18, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-muted); text-decoration: none; font-size: 12px; font-weight: 600; min-height: 48px; }
.tab-ic { position: relative; display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: background .15s; }
.tab.on { color: var(--text); } .tab.on .tab-ic { background: var(--accent-soft); color: var(--accent-text); }
.tab.center .tab-ic { width: 54px; height: 40px; border-radius: 14px; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px -6px rgba(255, 122, 26, .7); margin-top: -10px; }
.badge { position: absolute; top: -4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.netbar { position: sticky; top: 0; z-index: 30; display: flex; gap: 8px; align-items: center; padding: 10px 16px; background: var(--danger-soft); color: var(--danger); border-bottom: 1px solid rgba(248, 113, 113, .35); font-size: 14px; font-weight: 600; backdrop-filter: blur(10px); }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .shell { display: grid; grid-template-columns: 252px 1fr; }
  .content { padding-bottom: 32px; min-width: 0; }
  .sidenav { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 18px 12px; border-right: 1px solid var(--border); background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
  .side-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
  .side-brand img { border-radius: 10px; }
  .side-brand strong { display: block; font-size: 14px; letter-spacing: .02em; }
  .side-brand small { color: var(--text-muted); }
  .side-list { display: flex; flex-direction: column; gap: 2px; overflow: auto; }
  .side-item { position: relative; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
  .side-item:hover { background: var(--surface); color: var(--text); }
  .side-item.on { background: var(--accent-soft); color: var(--text); }
  .side-item.on .ic { color: var(--accent-text); }
  .side-item .badge { position: static; margin-left: auto; }
  .side-foot { margin-top: auto; padding: 12px 8px 0; }
}

/* ---------------- páginas ---------------- */
.page { max-width: 1240px; margin: 0 auto; padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.page.narrow { max-width: 720px; }
@media (min-width: 900px) { .page { padding: 28px 32px; gap: 18px; } }
.page-head { display: flex; align-items: center; gap: 12px; padding-top: env(safe-area-inset-top); }
.page-head > div { flex: 1; min-width: 0; }
.page-head p { margin-top: 2px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.section-title h2 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.grid-2, .grid-home, .grid-fin, .grid-3, .grid-cards { display: grid; gap: 14px; }
.grid-2.tight { grid-template-columns: 1fr 90px; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .grid-home { grid-template-columns: minmax(380px, 5fr) 6fr; align-items: start; }
  .grid-fin { grid-template-columns: minmax(340px, 5fr) 7fr; align-items: start; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
@media (min-width: 600px) and (max-width: 899px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-cards { grid-template-columns: 1fr 1fr; } }

/* ---------------- cartões ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card.hero { background: linear-gradient(160deg, #221c15 0%, var(--surface-hero) 55%, #17140f 100%); border-color: var(--accent-line); box-shadow: var(--glow); padding: 18px; }
.card-title { font-size: 15px; }
.hero-label { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.hero-value { font-size: 40px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.hero-foot { font-size: 14px; }
.big-money { font-size: 36px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.stat-label { display: flex; gap: 6px; align-items: center; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.stat-label .ic { width: 16px; height: 16px; }
.stat-value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.value-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.vr-label { color: var(--text-muted); font-weight: 600; font-size: 15px; }
.vr-hint { color: var(--text-faint); font-size: 12px; }
.vr-value { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.start-card { align-items: stretch; text-align: center; gap: 12px; }
.start-ic { width: 64px; height: 64px; margin: 4px auto; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px -10px rgba(255, 122, 26, .8); }
.start-ic .ic { width: 30px; height: 30px; }

/* ---------------- botões ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .06s, filter .15s, background .15s; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.busy { filter: saturate(.6); cursor: progress; }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 20px -8px rgba(255, 122, 26, .8); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.secondary { background: var(--surface-raised); border-color: var(--border); color: var(--text); }
.btn.secondary:hover:not(:disabled) { border-color: var(--border-input); }
.btn.ghost { background: transparent; color: var(--text-muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-raised); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(248, 113, 113, .35); }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.lg { min-height: 56px; font-size: 16px; }
.btn.xl { min-height: 64px; font-size: 17px; letter-spacing: .02em; border-radius: var(--r-lg); }
.btn.full { width: 100%; }
.btn span { overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-raised); color: var(--text); }
.icon-btn.accent { background: var(--accent); color: var(--on-accent); }
.actions-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.actions-row .btn { min-width: 0; padding: 0 12px; }
.actions-row .btn span { white-space: normal; line-height: 1.15; text-align: left; }
.actions-row.small { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-wrap, .chips-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sticky-actions { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; border-radius: var(--r-lg); background: rgba(22, 25, 30, .92); border: 1px solid var(--border); backdrop-filter: blur(12px); }
@media (min-width: 900px) { .sticky-actions { bottom: 16px; max-width: 560px; margin-left: auto; } }
.finish-area { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; }
@media (min-width: 900px) { .finish-area { bottom: 16px; } }

/* ---------------- chips, avisos ---------------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-raised); color: var(--text-muted); white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip.success { background: var(--success-soft); color: var(--success); } .chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.warning { background: var(--warning-soft); color: var(--warning); } .chip.info { background: var(--info-soft); color: var(--info); }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); } .chip.muted { color: var(--text-faint); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; line-height: 1.45; border: 1px solid; }
.notice .ic { margin-top: 1px; }
.notice.info { background: var(--info-soft); color: #BFD8FF; border-color: rgba(96, 165, 250, .3); }
.notice.success { background: var(--success-soft); color: #A7F3D0; border-color: rgba(52, 211, 153, .3); }
.notice.warning { background: var(--warning-soft); color: #FDE68A; border-color: rgba(251, 191, 36, .32); }
.notice.danger { background: var(--danger-soft); color: #FECACA; border-color: rgba(248, 113, 113, .35); }
.form-error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 0; }
.form-error:empty { display: none; }
.alert-line { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--r-md); background: var(--warning-soft); border: 2px solid var(--warning); color: var(--warning); font-size: 18px; letter-spacing: .01em; }
.alert-line .ic { width: 30px; height: 30px; }

/* ---------------- campos ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--border-input); background: var(--bg-2); color: var(--text); font-size: 16px; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.45; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-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:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-hint { font-size: 12.5px; color: var(--text-faint); }
.field-hint:empty { display: none; }
.field-hint.error { color: var(--danger); font-weight: 600; }
.input-wrap { display: flex; align-items: center; border: 1px solid var(--border-input); border-radius: var(--r-md); background: var(--bg-2); }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrap .input { border: 0; background: transparent; box-shadow: none; }
.prefix { padding-left: 14px; color: var(--text-muted); font-weight: 700; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; display: grid; place-items: center; border-radius: 10px; }
.form-grid { display: flex; flex-direction: column; gap: 12px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; }
.inline-form .field { flex: 1; }
.toggle { display: flex; gap: 12px; align-items: center; cursor: pointer; min-height: 44px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { position: relative; width: 46px; height: 28px; flex: none; border-radius: 999px; background: var(--surface-raised); border: 1px solid var(--border-input); transition: background .15s; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-muted); transition: transform .15s, background .15s; }
.toggle input:checked + .toggle-ui { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); background: var(--on-accent); }
.toggle input:focus-visible + .toggle-ui { outline: 3px solid var(--accent); outline-offset: 2px; }
.toggle-label { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; }
.toggle-label small { color: var(--text-faint); font-weight: 400; font-size: 12.5px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-muted); cursor: pointer; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow-x: auto; }
.seg button { flex: 1; display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.seg button .ic { width: 18px; height: 18px; }

/* ---------------- listas e entregas ---------------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; text-align: left; width: 100%; cursor: pointer; }
.list-row.static { cursor: default; }
a.list-row:hover, button.list-row:hover { border-color: var(--border-input); }
.list-row.voided { opacity: .6; }
.lr-main { flex: 1; min-width: 0; }
.lr-title { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lr-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }
.fee { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cards { display: grid; gap: 10px; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.dcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.dcard.review { border-color: rgba(96, 165, 250, .45); }
.dcard-top { display: flex; align-items: center; gap: 8px; }
.dcard-id { flex: 1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dcard-id strong { font-size: 17px; }
.dcard-addr { font-weight: 700; }
.dcard-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.review-reason { display: flex; gap: 6px; align-items: center; color: var(--info); font-size: 13.5px; font-weight: 600; }
.review-reason .ic { width: 16px; height: 16px; }
.reminders { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reminder { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-raised); color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.reminder.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.reminder.on .ic { color: var(--accent-text); }
.cur-top { display: flex; gap: 10px; align-items: center; }
.cur-order { font-size: 20px; flex: 1; }
.cur-addr { font-size: 26px; font-weight: 800; line-height: 1.15; }
.cur-comp { font-size: 17px; color: var(--text-muted); }
.cur-nb { display: flex; gap: 6px; align-items: center; font-size: 18px; font-weight: 700; color: var(--accent-text); }
.choose summary, .raw summary, .privacy-details summary { cursor: pointer; color: var(--accent-text); font-weight: 700; padding: 8px 0; }
.raw pre { white-space: pre-wrap; background: var(--bg-2); padding: 12px; border-radius: var(--r-md); font-size: 13px; color: var(--text-muted); max-height: 280px; overflow: auto; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.timeline li { padding-left: 14px; border-left: 2px solid var(--border); }
.small-list { margin: 0; padding-left: 18px; font-size: 14px; color: var(--text-muted); max-height: 180px; overflow: auto; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px; color: var(--text-muted); }
.empty-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-raised); color: var(--accent-text); }
.empty h3 { color: var(--text); }
.link { font-weight: 700; text-decoration: none; font-size: 14px; }

/* rota */
.route-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.route-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.route-item.dragging { opacity: .5; } .route-item.drop { border-color: var(--accent); box-shadow: var(--glow); }
.grip { color: var(--text-faint); cursor: grab; display: none; }
@media (pointer: fine) { .grip { display: block; } }
.route-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 800; flex: none; }
.route-main { flex: 1; min-width: 0; }
.route-btns { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .route-item { flex-wrap: wrap; } .route-btns { width: 100%; } }

/* registrar comanda */
.ocr-preview img { max-width: 100%; max-height: 300px; border-radius: var(--r-md); border: 1px solid var(--border); }
.nb-box { display: flex; flex-direction: column; gap: 8px; }
.nb-ok { display: flex; gap: 8px; align-items: center; color: var(--success); font-weight: 700; padding: 10px 12px; border-radius: var(--r-md); background: var(--success-soft); }
.nb-new { padding: 12px; border-radius: var(--r-md); border: 1px dashed var(--accent-line); background: var(--accent-soft); display: flex; flex-direction: column; gap: 8px; }

/* financeiro */
.period-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.period-bar .seg { flex: 0 1 300px; }
.period-nav { display: flex; align-items: center; gap: 4px; }
.period-nav strong { min-width: 150px; text-align: center; }
.goal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.goal-nums strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-raised); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.progress-bar.indeterminate { width: 40%; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.chart { display: flex; flex-direction: column; gap: 6px; }
.bar-chart { width: 100%; height: 160px; }
.bar-chart .axis { stroke: var(--border); stroke-width: .4; vector-effect: non-scaling-stroke; }
.bar-chart .bar { fill: var(--accent); cursor: pointer; } .bar-chart .bar:hover, .bar-chart .bar:focus { fill: var(--accent-2); outline: none; }
.bar-chart .bar.neg { fill: var(--danger); }
.chart-labels { display: grid; font-size: 11px; color: var(--text-faint); text-align: center; text-transform: capitalize; }
.chart-tip { font-size: 13px; color: var(--text-muted); min-height: 18px; }
.nb-bars { display: flex; flex-direction: column; gap: 10px; }
.nb-bar-top { display: flex; justify-content: space-between; font-size: 14px; }
.bar-track { height: 8px; border-radius: 99px; background: var(--surface-raised); margin: 4px 0 2px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--accent); }
.hist-top { display: flex; justify-content: space-between; gap: 8px; }
.hist-top strong { text-transform: capitalize; }
.hist-net { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hist-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hist-grid > div { display: flex; flex-direction: column; gap: 2px; }
.hist-grid strong { font-variant-numeric: tabular-nums; }

/* mais */
.menu-grid { display: grid; gap: 10px; }
@media (min-width: 700px) { .menu-grid { grid-template-columns: 1fr 1fr; } }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.menu-item:hover { border-color: var(--accent-line); }
.menu-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.menu-txt { flex: 1; display: flex; flex-direction: column; }
.menu-txt small { color: var(--text-muted); }
.pix-card { align-items: center; }
.pix-name { font-weight: 800; font-size: 18px; }
.qr { width: min(280px, 80vw); height: auto; border-radius: 12px; background: #fff; }
.recovery-code { font: 800 22px/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; text-align: center; padding: 16px; border-radius: var(--r-md); background: var(--bg-2); border: 1px dashed var(--accent-line); color: var(--accent-text); user-select: all; }

/* ---------------- entrar ---------------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-links { display: flex; flex-direction: column; gap: 6px; }
.brand-lockup { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 6px; }
.brand-lockup img { border-radius: 20px; box-shadow: 0 12px 40px -12px rgba(255, 122, 26, .55); }
.brand-lockup h1 { font-size: 26px; letter-spacing: .04em; }
.privacy { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-muted); }
.privacy-block h3 { font-size: 14px; color: var(--text); margin-bottom: 2px; }
.splash { min-height: 70dvh; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; }
.splash img { border-radius: 22px; }

/* ---------------- diálogos e avisos ---------------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(5, 6, 8, .72); backdrop-filter: blur(4px); display: grid; place-items: end center; padding: 0; animation: fade .12s ease-out; }
@media (min-width: 600px) { .overlay { place-items: center; padding: 24px; } }
.dialog { width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); padding-bottom: env(safe-area-inset-bottom); animation: rise .16s ease-out; }
@media (min-width: 600px) { .dialog { border-radius: var(--r-xl); } }
.dialog.wide { max-width: 760px; }
.dialog.warning { border-color: var(--warning); }
.dialog.danger { border-color: rgba(248, 113, 113, .5); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 18px 18px 6px; }
.dialog-body { padding: 8px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.dialog-body form { display: flex; flex-direction: column; gap: 12px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.dialog-actions .btn { flex: 1 1 140px; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(16px); opacity: .6; } }
.toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); z-index: 70; width: min(560px, calc(100% - 24px)); }
@media (min-width: 900px) { .toast-host { bottom: 24px; } }
.toast { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 16px; border-radius: var(--r-md); background: #262b33; border: 1px solid var(--border-input); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-weight: 600; font-size: 14.5px; animation: rise .16s ease-out; }
.toast.success { border-color: rgba(52, 211, 153, .55); } .toast.danger { border-color: rgba(248, 113, 113, .6); } .toast.warning { border-color: rgba(251, 191, 36, .55); }
.toast-action { border: 0; background: transparent; color: var(--accent-text); font-weight: 800; cursor: pointer; min-height: 40px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
