/* =========================================================
   FinControl — estilos
   ========================================================= */
:root {
  --bg: #f3f5f8; --surface: #ffffff; --surface2: #f8fafc; --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --brand: #0f766e; --brand2: #14b8a6; --brand-soft: #ccfbf1; --brand-ink: #134e4a;
  --in: #16a34a; --out: #dc2626; --warn: #d97706; --info: #2563eb;
  --in-soft: #dcfce7; --out-soft: #fee2e2; --warn-soft: #fef3c7; --info-soft: #dbeafe;
  --radius: 16px; --shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(15,23,42,.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2e; --surface2: #16213a; --text: #e5edf8; --muted: #94a3b8; --line: #243252;
  --brand: #2dd4bf; --brand2: #14b8a6; --brand-soft: #0f3b3a; --brand-ink: #99f6e4;
  --in: #4ade80; --out: #f87171; --warn: #fbbf24; --info: #60a5fa;
  --in-soft: #12351f; --out-soft: #3b1a1d; --warn-soft: #3a2f0e; --info-soft: #172a4d;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.in { color: var(--in); } .out { color: var(--out); } .warn { color: var(--warn); } .tr { color: var(--info); }

/* ---------- Layout ---------- */
#app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
#sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; }
.brand b { display: block; font-size: 18px; }
.brand small { font-size: 12px; }
.brand-logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, var(--brand2), #0f766e); color: #fff; font-weight: 800; font-size: 24px; }
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500; }
#nav a .ic { width: 24px; text-align: center; font-size: 18px; }
#nav a:hover { background: var(--surface2); }
#nav a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.side-foot { display: flex; gap: 8px; flex-wrap: wrap; }
#main { min-width: 0; display: flex; flex-direction: column; }
#topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-label { min-width: 170px; text-align: center; font-size: 17px; font-weight: 700; background: none; border: 0; padding: 6px 10px; border-radius: 10px; }
.month-label:hover { background: var(--surface); }
.top-actions { display: flex; gap: 8px; align-items: center; }
#view { padding: 22px 24px 60px; max-width: 1280px; width: 100%; margin: 0 auto; outline: none; }
#bottomnav { display: none; }
#fab { display: none; }
.only-mobile { display: none; }

/* ---------- Componentes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--brand2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .btn.primary { color: #042f2e; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--out); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; font-size: 18px; }
.icon-btn:hover { background: var(--surface); }
.icon-btn.sm { width: 30px; height: 30px; font-size: 15px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { font-size: 16px; }
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-h h1 { font-size: 24px; }
.page-h p { margin: 4px 0 0; color: var(--muted); }

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .lbl { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface2); color: var(--muted); }
.pill.in { background: var(--in-soft); color: var(--in); } .pill.out { background: var(--out-soft); color: var(--out); }
.pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.info { background: var(--info-soft); color: var(--info); }

/* Equação recebi − gastei = sobrou */
.hero { background: linear-gradient(135deg, #0f766e, #115e59 55%, #134e4a); color: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.hero h2 { font-size: 14px; font-weight: 600; opacity: .85; margin-bottom: 14px; }
.eq { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.eq-item { background: rgba(255,255,255,.12); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.eq-item span { font-size: 13px; opacity: .85; font-weight: 600; }
.eq-item b { display: block; font-size: clamp(20px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; margin: 2px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.eq-item small { color: rgba(255,255,255,.8); font-size: 12px; }
.eq-item.res { background: rgba(255,255,255,.95); color: #064e3b; }
.eq-item.res small { color: #475569; }
.eq-item.res.neg b { color: #b91c1c; }
.eq-op { font-size: 26px; font-weight: 700; opacity: .8; }

/* Barras de progresso */
.bar { height: 10px; border-radius: 999px; background: var(--surface2); overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; border-radius: 999px; transition: width .4s; }
.bar.lg { height: 14px; }
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.meter .top b { font-size: 15px; }
.meter .msg { font-size: 13px; color: var(--muted); }

/* Listas de lançamentos */
.day-h { display: flex; justify-content: space-between; padding: 10px 4px 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.tx { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 12px; }
.tx:hover { background: var(--surface2); }
.tx-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-size: 20px; border: 0; }
.tx-main { min-width: 0; cursor: pointer; }
.tx-main b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.chk { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: transparent; color: transparent; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.chk.on { background: var(--in); border-color: var(--in); color: #fff; }
.tx.pending .tx-main b { font-style: italic; }
.tx-actions { display: flex; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-size: 16px; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters input, .filters select { min-width: 0; }
.field input, .field select, .field textarea, .filters input, .filters select, .inline-input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); outline: none; transition: border-color .15s, box-shadow .15s;
}
.filters input, .filters select { width: auto; flex: 1 1 140px; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus, .inline-input:focus { border-color: var(--brand2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand2) 25%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
.field textarea { min-height: 70px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.input-affix { display: flex; align-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); overflow: hidden; }
.input-affix:focus-within { border-color: var(--brand2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand2) 25%, transparent); }
.input-affix input { border: 0 !important; box-shadow: none !important; background: transparent !important; }
.input-affix span { padding: 0 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.input-affix span:first-child { padding-right: 0; }
.big-input input { font-size: 26px; font-weight: 800; padding: 12px 8px; }
.inline-input { padding: 6px 8px; width: 130px; text-align: right; font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg input { display: none; }
.seg label { text-align: center; padding: 8px 6px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); }
.seg input:checked + label { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.seg input[value="expense"]:checked + label { color: var(--out); }
.seg input[value="income"]:checked + label { color: var(--in); }
.seg input[value="transfer"]:checked + label { color: var(--info); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-theme="dark"] .chip.active { color: #042f2e; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches input { display: none; }
.swatches label { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; }
.swatches input:checked + label { border-color: var(--text); }
.icon-pick { display: flex; gap: 6px; flex-wrap: wrap; max-height: 112px; overflow: auto; }
.icon-pick input { display: none; }
.icon-pick label { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-size: 19px; cursor: pointer; border: 2px solid transparent; background: var(--surface2); }
.icon-pick input:checked + label { border-color: var(--brand2); background: var(--brand-soft); }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 12.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
tfoot td { font-weight: 800; border-bottom: 0; }

/* Orçamento */
.brow { display: grid; grid-template-columns: minmax(130px, 1.2fr) 140px minmax(120px, 2fr) 120px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.brow:last-child { border-bottom: 0; }
.brow .name { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.brow .name span.t { overflow: hidden; text-overflow: ellipsis; }
.brow .right { text-align: right; font-variant-numeric: tabular-nums; }

/* Metas */
.goal { display: flex; flex-direction: column; gap: 12px; }
.goal-h { display: flex; gap: 12px; align-items: center; }
.goal-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; }
.goal-h b { font-size: 17px; display: block; }
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 22px; }

/* Gráficos */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line); }
.legend { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.legend .li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .li .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .li b { font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-wrap svg { width: 170px; height: 170px; flex: none; }
.chart-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; margin-top: 6px; }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); }

/* Calculadoras */
.calc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.calc-list { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; }
.calc-list button { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; font-weight: 600; }
.calc-list button:hover { background: var(--surface); }
.calc-list button.active { background: var(--brand-soft); color: var(--brand-ink); }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; margin-top: 14px; }
.res { background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.res span { font-size: 12.5px; color: var(--muted); font-weight: 600; display: block; }
.res b { font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.res small { display: block; margin-top: 2px; }
.res.accent { background: var(--brand-soft); border-color: transparent; }
.res.accent b { color: var(--brand-ink); }
.res.bad { background: var(--out-soft); border-color: transparent; }
.res.bad b { color: var(--out); }
.res.good { background: var(--in-soft); border-color: transparent; }
.res.good b { color: var(--in); }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--text); font-size: 14px; }
.note.warn { background: var(--warn-soft); }
.note.good { background: var(--in-soft); }
.note.bad { background: var(--out-soft); }
.qcalc-out { font-size: 34px; font-weight: 800; text-align: right; padding: 14px 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.keypad button { padding: 14px 0; font-size: 18px; font-weight: 700; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); }
.keypad button.op { background: var(--brand-soft); color: var(--brand-ink); }
.keypad button.eq { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Modal */
#modal-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.modal-bg { position: absolute; inset: 0; background: rgba(2,6,23,.55); display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: auto; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); animation: pop .18s; }
.modal.wide { width: min(760px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-h h3 { font-size: 18px; }
.modal-b { padding: 10px 20px 4px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; position: sticky; bottom: 0; background: var(--surface); }
.menu-list { display: grid; gap: 4px; padding: 4px 12px 16px; }
.menu-list a { display: flex; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; }
.menu-list a:hover { background: var(--surface2); }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }

/* Toast */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 14px; align-items: center; background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: 0; transform: translateY(10px); transition: .25s; max-width: min(92vw, 460px); }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #991b1b; }
.toast button { background: none; border: 0; color: #5eead4; font-weight: 700; }

.help { font-size: 13px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.tag { font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--surface2); border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dotc { width: 14px; height: 14px; border-radius: 50%; flex: none; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  #sidebar { display: none; }
  #topbar { padding: 10px 12px; }
  #view { padding: 14px 12px 120px; }
  .month-label { min-width: 0; font-size: 15px; }
  .top-actions .btn.primary span { display: none; }
  .top-actions .btn.primary { padding: 9px 12px; }
  .only-mobile { display: inline-grid; }
  #bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  #bottomnav a, #bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; font-size: 11px; font-weight: 600; text-decoration: none; color: var(--muted); background: none; border: 0; }
  #bottomnav .ic { font-size: 20px; }
  #bottomnav .active { color: var(--brand); }
  #fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 28px; box-shadow: 0 8px 24px rgba(15,118,110,.5); z-index: 31; }
  [data-theme="dark"] #fab { color: #042f2e; }
  .eq { grid-template-columns: 1fr; gap: 6px; }
  .eq-op { text-align: center; font-size: 20px; line-height: 1; }
  .brow { grid-template-columns: 1fr 1fr; }
  .brow .bar-cell { grid-column: 1 / -1; order: 3; }
  .brow .right { text-align: right; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-list { position: static; flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .calc-list button { white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
  .tx { gap: 8px; padding: 10px 2px; }
  .tx-actions { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { width: 100% !important; max-height: 92vh; border-radius: 22px 22px 0 0; }
  .kpi .val { font-size: 22px; }
  #toast-root { bottom: 96px; }
}
@media print {
  #sidebar, #topbar, #bottomnav, #fab, .no-print, #toast-root { display: none !important; }
  #app { display: block; } body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
  #view { padding: 0; max-width: none; }
}

/* Modo exemplo */
#demoBar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 24px 0; padding: 10px 14px; border-radius: 12px; background: #fef3c7; color: #78350f; border: 1px solid #f59e0b; font-size: 14px; }
[data-theme="dark"] #demoBar { background: #422006; color: #fde68a; border-color: #b45309; }
#nav a.demo-link { cursor: pointer; margin-top: 8px; border: 1px dashed var(--brand, #0f766e); }
@media (max-width: 720px) { #demoBar { margin: 0 12px; } }
