/* Vormgeving: groot, rustig, een accentkleur. Basistekst 18px, knoppen minimaal 56px hoog. */
:root {
  --bg: #F5F4F0; --surface: #FFFFFF; --surface-2: #FAF9F6; --ink: #1D2530; --muted: #5A6472;
  --line: #E3E0D8; --line-strong: #CBC7BC;
  --accent: #2F5BD8; --accent-hover: #2549B8; --accent-ink: #FFFFFF; --accent-soft: #E8EEFD;
  --green: #1B7A52; --green-soft: #E2F3EA; --orange: #A55A08; --orange-soft: #FBEED8;
  --red: #BF342D; --red-soft: #FAE4E2; --grey: #4F5967; --grey-soft: #ECEEF0;
  --shadow: 0 1px 2px rgba(20, 25, 35, .05), 0 6px 18px rgba(20, 25, 35, .05);
  --shadow-big: 0 12px 48px rgba(20, 25, 35, .22);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #13161B; --surface: #1C2027; --surface-2: #232830; --ink: #EEF1F5; --muted: #A4ADB9;
  --line: #2E343E; --line-strong: #434B58;
  --accent: #7FA0FF; --accent-hover: #9BB5FF; --accent-ink: #0D1322; --accent-soft: #232E4B;
  --green: #5DD39E; --green-soft: #173327; --orange: #F2B155; --orange-soft: #3A2B12;
  --red: #FF8B82; --red-soft: #40201E; --grey: #B5BDC8; --grey-soft: #2A2F38;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-big: 0 12px 48px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13161B; --surface: #1C2027; --surface-2: #232830; --ink: #EEF1F5; --muted: #A4ADB9;
    --line: #2E343E; --line-strong: #434B58;
    --accent: #7FA0FF; --accent-hover: #9BB5FF; --accent-ink: #0D1322; --accent-soft: #232E4B;
    --green: #5DD39E; --green-soft: #173327; --orange: #F2B155; --orange-soft: #3A2B12;
    --red: #FF8B82; --red-soft: #40201E; --grey: #B5BDC8; --grey-soft: #2A2F38;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-big: 0 12px 48px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2.1rem; line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; }
h2 { font-size: 1.55rem; line-height: 1.2; font-weight: 720; letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 700; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.ic { width: 1.35em; height: 1.35em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }

/* ---------- knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 56px; padding: 0 1.5rem; border-radius: 16px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 1.05rem; font-weight: 680; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.big { min-height: 68px; font-size: 1.2rem; padding: 0 2rem; border-radius: 18px; }
.btn.danger { color: var(--red); border-color: var(--red-soft); background: var(--red-soft); }
.btn.danger:hover { border-color: var(--red); }
.btn.good { background: var(--green); border-color: var(--green); color: var(--surface); }
.btn.plain { border-color: transparent; background: transparent; padding: 0 .9rem; }
.btn.plain:hover { background: var(--grey-soft); border-color: transparent; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------- indeling ---------- */
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: .35rem; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .7rem; padding: .3rem .8rem 1.2rem; font-weight: 750; font-size: 1.1rem; letter-spacing: -0.01em; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.nav-item { display: flex; align-items: center; gap: .9rem; min-height: 60px; padding: 0 1rem; border-radius: 16px; color: var(--ink); font-size: 1.1rem; font-weight: 620; }
.nav-item svg.ic { width: 28px; height: 28px; color: var(--muted); }
.nav-item:hover { background: var(--grey-soft); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active svg.ic { color: var(--accent); }
.nav-count { margin-left: auto; min-width: 30px; height: 30px; padding: 0 .5rem; border-radius: 15px; background: var(--red); color: #fff; font-size: .9rem; font-weight: 750; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding: .8rem; color: var(--muted); font-size: .9rem; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .9rem 2.5rem; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar .spacer { flex: 1; }
.switch { display: inline-flex; align-items: center; gap: .7rem; min-height: 56px; padding: 0 1.1rem; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: 1.05rem; max-width: 100%; }
.switch:hover { border-color: var(--line-strong); }
.switch { min-width: 0; flex: 0 1 auto; }
.switch .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--accent); }
.top-btn { position: relative; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 26px; height: 26px; padding: 0 .4rem; border-radius: 13px; background: var(--red); color: #fff; font-size: .85rem; font-weight: 750; display: grid; place-items: center; }
.menu-btn { display: none; }
.page { max-width: 1020px; margin: 0 auto; padding: 1.2rem 2.5rem 7rem; }
.demo-bar { margin: 0 0 1.4rem; padding: .8rem 1.1rem; border-radius: 14px; background: var(--orange-soft); color: var(--orange); font-weight: 650; display: flex; gap: .6rem; align-items: center; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: .4rem 0 1.6rem; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-head .sub { color: var(--muted); font-size: 1.1rem; margin-top: .3rem; }
.back { display: inline-flex; align-items: center; gap: .35rem; min-height: 48px; padding: 0 .9rem 0 .5rem; margin: 0 0 .4rem -.5rem; border-radius: 12px; font-weight: 650; color: var(--muted); }
.back:hover { background: var(--grey-soft); text-decoration: none; color: var(--ink); }
.section { margin-top: 2.4rem; }
.section > h2 { margin-bottom: 1rem; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- kaarten, rijen, tegels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h3 { margin-bottom: .8rem; }
.row { display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 86px; padding: 1rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-align: left; }
a.row:hover, button.row:hover { border-color: var(--accent); text-decoration: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-size: 1.2rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.row .sub { color: var(--muted); margin-top: .1rem; overflow-wrap: anywhere; }
.row .side-val { text-align: right; flex: none; }
.row .amount { font-size: 1.2rem; font-weight: 720; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .chev { color: var(--line-strong); flex: none; }
.row .avatar, .thumb { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 750; font-size: 1.2rem; flex: none; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row.small { min-height: 68px; box-shadow: none; }

.tile { display: flex; flex-direction: column; gap: .3rem; padding: 1.5rem; border-radius: 22px; border: 2px solid transparent; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-align: left; min-height: 170px; }
a.tile:hover { text-decoration: none; border-color: currentColor; }
.tile .big { font-size: 3.4rem; line-height: 1; font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile .title { font-size: 1.3rem; font-weight: 720; line-height: 1.25; color: var(--ink); }
.tile .sub { color: var(--muted); }
.tile .go { margin-top: auto; padding-top: .8rem; display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; }
.tile.rood { background: var(--red-soft); color: var(--red); }
.tile.oranje { background: var(--orange-soft); color: var(--orange); }
.tile.blauw { background: var(--accent-soft); color: var(--accent); }
.tile.groen { background: var(--green-soft); color: var(--green); }
.figure { padding: 1.4rem 1.5rem; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.figure .label { color: var(--muted); font-weight: 620; }
.figure .value { font-size: 2.2rem; line-height: 1.15; font-weight: 780; letter-spacing: -0.025em; margin-top: .3rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.figure.rood .value { color: var(--red); }
.figure.groen .value { color: var(--green); }
.allgood { display: flex; align-items: center; gap: 1.2rem; padding: 1.8rem; border-radius: 22px; background: var(--green-soft); color: var(--green); }
.allgood .circle { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: var(--surface); display: grid; place-items: center; flex: none; }
.allgood .circle svg.ic { width: 40px; height: 40px; stroke-width: 3; }
.allgood .title { font-size: 1.5rem; font-weight: 750; }

.pill { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .9rem; border-radius: 18px; font-size: .95rem; font-weight: 720; white-space: nowrap; background: var(--grey-soft); color: var(--grey); }
.pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.pill.groen { background: var(--green-soft); color: var(--green); }
.pill.oranje { background: var(--orange-soft); color: var(--orange); }
.pill.rood { background: var(--red-soft); color: var(--red); }
.pill.blauw { background: var(--accent-soft); color: var(--accent); }
.pill.big { min-height: 46px; font-size: 1.1rem; padding: 0 1.2rem; border-radius: 23px; }

.empty { text-align: center; padding: 3.2rem 1.5rem; border: 2px dashed var(--line-strong); border-radius: 24px; background: var(--surface-2); }
.empty .art { width: 96px; height: 96px; margin: 0 auto 1.2rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty .art svg.ic { width: 46px; height: 46px; }
.empty h2 { margin-bottom: .5rem; }
.empty p { color: var(--muted); font-size: 1.1rem; max-width: 30rem; margin: 0 auto 1.6rem; }

.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.tab { min-height: 52px; padding: 0 1.2rem; border-radius: 26px; border: 2px solid var(--line); background: var(--surface); font-weight: 680; display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); }
.tab:hover { border-color: var(--line-strong); text-decoration: none; }
.tab.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tab[disabled] { opacity: .55; cursor: default; }
.tab.active[disabled] { opacity: 1; }
.tab .n { opacity: .7; font-variant-numeric: tabular-nums; }

/* ---------- formulieren ---------- */
.field { display: block; margin-bottom: 1.3rem; }
.field > .label { display: block; font-weight: 700; margin-bottom: .45rem; font-size: 1.05rem; }
.field .hint { color: var(--muted); margin-top: .35rem; }
.field .err { color: var(--red); font-weight: 650; margin-top: .35rem; }
.input, select.input, textarea.input { width: 100%; min-height: 60px; padding: .8rem 1.1rem; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); font-size: 1.1rem; }
textarea.input { min-height: 130px; line-height: 1.45; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.bad { border-color: var(--red); }
.with-prefix { position: relative; }
.with-prefix .prefix { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 650; pointer-events: none; }
.with-prefix .input { padding-left: 2.6rem; }
.search { position: relative; margin-bottom: 1.2rem; }
.search svg.ic { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 26px; height: 26px; }
.search .input { padding-left: 3.4rem; min-height: 64px; font-size: 1.15rem; border-radius: 18px; }
.check { display: flex; align-items: center; gap: .9rem; min-height: 56px; cursor: pointer; font-weight: 650; }
.check input { width: 30px; height: 30px; accent-color: var(--accent); flex: none; }
.form-msg { padding: 1rem 1.2rem; border-radius: 14px; background: var(--red-soft); color: var(--red); font-weight: 650; margin-bottom: 1.2rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
details.more { margin: .4rem 0 1.4rem; border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2); }
details.more > summary { list-style: none; cursor: pointer; min-height: 60px; padding: 0 1.2rem; display: flex; align-items: center; gap: .6rem; font-weight: 700; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary svg.ic { transition: transform .15s; color: var(--muted); }
details.more[open] > summary svg.ic { transform: rotate(90deg); }
details.more > .inner { padding: .4rem 1.2rem 1rem; }
.kv { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: .6rem 1.2rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 620; overflow-wrap: anywhere; }

/* ---------- stappen (wizard) ---------- */
.steps { display: flex; gap: .5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.step { flex: 1; display: flex; align-items: center; gap: .7rem; min-height: 64px; padding: 0 1rem; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); color: var(--muted); font-weight: 700; font-size: 1.05rem; }
.step .no { width: 36px; height: 36px; border-radius: 50%; background: var(--grey-soft); color: var(--grey); display: grid; place-items: center; flex: none; font-weight: 780; }
.step.now { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.step.now .no { background: var(--accent); color: var(--accent-ink); }
.step.done { color: var(--green); }
.step.done .no { background: var(--green); color: var(--surface); }
.step.done .no svg.ic { width: 20px; height: 20px; stroke-width: 3; }
button.step { cursor: pointer; text-align: left; }
.wizard-foot { position: sticky; bottom: 0; margin: 2rem -1rem -1rem; padding: 1rem; display: flex; gap: .8rem; align-items: center; justify-content: space-between; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 20px; }
.total-bar { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.total-bar .value { font-size: 1.9rem; font-weight: 780; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; gap: .3rem; }
.qty button { width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; }
.qty button:hover { border-color: var(--ink); }
.qty input { width: 76px; min-height: 52px; text-align: center; font-weight: 720; font-size: 1.15rem; padding: 0 .3rem; }
.line-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .8rem 1.2rem; align-items: center; padding: 1.1rem 1.3rem; }
.preview-frame { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }

/* ---------- venster, melding ---------- */
dialog.sheet { border: 0; padding: 0; border-radius: 24px; background: var(--surface); color: var(--ink); width: min(640px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); box-shadow: var(--shadow-big); }
dialog.sheet::backdrop { background: rgba(15, 18, 25, .5); }
dialog.sheet.wide { width: min(860px, calc(100vw - 2rem)); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.5rem .9rem; background: var(--surface); }
.sheet-head h2 { flex: 1; }
.sheet-body { padding: .3rem 1.5rem 1.6rem; }
.toasts { position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .6rem; width: min(680px, calc(100vw - 2rem)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 1rem; min-height: 72px; padding: .9rem 1.2rem .9rem 1.3rem; border-radius: 20px; background: var(--green); color: #fff; font-size: 1.15rem; font-weight: 680; box-shadow: var(--shadow-big); animation: rise .18s ease-out; }
:root[data-theme="dark"] .toast { color: #08130D; }
.toast.error { background: var(--red); }
.toast .msg { flex: 1; }
.toast svg.ic { width: 30px; height: 30px; stroke-width: 2.6; }
.toast button { min-height: 48px; padding: 0 1rem; border-radius: 12px; border: 2px solid currentColor; background: transparent; color: inherit; font-weight: 750; white-space: nowrap; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.spinner { width: 44px; height: 44px; margin: 4rem auto; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.menu-list { display: flex; flex-direction: column; gap: .4rem; }
.menu-list .row { box-shadow: none; }
.chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .5rem; align-items: end; height: 220px; padding-top: 1.6rem; }
.chart .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .4rem; height: 100%; min-width: 0; }
.chart .bar { width: 100%; max-width: 48px; border-radius: 10px 10px 4px 4px; background: var(--accent-soft); min-height: 4px; }
.chart .col.now .bar { background: var(--accent); }
.chart .m { color: var(--muted); font-size: .85rem; font-weight: 650; }
.chart .v { font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login .card { width: min(520px, 100%); padding: 2.4rem; }
.login h1 { margin-bottom: .4rem; }
.login .sub { color: var(--muted); font-size: 1.15rem; margin-bottom: 1.8rem; }
.note { padding: 1rem 1.2rem; border-radius: 14px; background: var(--accent-soft); color: var(--ink); display: flex; gap: .8rem; align-items: flex-start; }
.note.orange { background: var(--orange-soft); }
.note svg.ic { color: var(--accent); margin-top: .15rem; }
.stockbox { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.stockbox .number { font-size: 4rem; line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.timeline { display: flex; flex-direction: column; gap: .7rem; }
.timeline .item { padding: 1rem 1.2rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.timeline .meta { color: var(--muted); font-size: .95rem; margin-top: .3rem; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 1rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.kan-col { background: var(--grey-soft); border-radius: 20px; padding: .9rem; min-height: 200px; }
.kan-col.over { outline: 3px dashed var(--accent); }
.kan-col h3 { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem .8rem; }
.kan-col h3 .n { color: var(--muted); font-weight: 650; }
.kan-card { display: block; padding: 1rem 1.1rem; margin-bottom: .7rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); cursor: grab; }
.kan-card:hover { border-color: var(--accent); text-decoration: none; }
.kan-card .title { font-weight: 720; font-size: 1.1rem; line-height: 1.3; }
.kan-card .sub { color: var(--muted); }

/* ---------- telefoon ---------- */
@media (max-width: 1100px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: .7rem 1rem; gap: .5rem; }
  .topbar .hide-small { display: none; }
  .topbar .spacer { display: none; }
  .topbar .switch { flex: 1 1 auto; }
  .topbar .switch .name { flex: 1; text-align: left; }
  .menu-btn { position: relative; }
  .demo-bar { font-size: .95rem; padding: .6rem .9rem; margin-bottom: 1rem; }
  .page { padding: .6rem 1rem 7rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  .page-head .btn.primary { width: 100%; }
  .grid.two, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .row { padding: .9rem 1rem; gap: .6rem .8rem; flex-wrap: wrap; }
  .row .grow { flex: 1 1 50%; }
  .row .side-val { order: 5; flex: 1 1 100%; text-align: left; }
  .row .side-val > div { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
  .row .side-val > div > div { margin-top: 0 !important; }
  .row > .btn { flex: 1 1 auto; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-left: -1rem; margin-right: -1rem; padding: 0 1rem .4rem; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .row .avatar, .thumb { width: 48px; height: 48px; border-radius: 14px; }
  .steps { gap: .35rem; }
  .step { flex-direction: column; justify-content: center; gap: .2rem; padding: .5rem .2rem; font-size: .85rem; text-align: center; min-height: 76px; }
  .step .label { line-height: 1.1; }
  .tile { min-height: 150px; padding: 1.2rem; }
  .tile .big { font-size: 2.8rem; }
  .figure .value { font-size: 1.8rem; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .kv dd { margin-bottom: .7rem; }
  .line-card { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .line-card .line-total { display: flex; justify-content: space-between; align-items: center; }
  .line-card .line-total .amount { white-space: nowrap; }
  .line-card .line-total .btn-row { flex-wrap: nowrap; flex: none; }
  .line-card .line-total .btn-row .btn { flex: none; }
  .only-wide { display: none; }
  .total-bar { flex-direction: column; gap: 0; }
  .total-bar .value { font-size: 1.6rem; }
  dialog.sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .wizard-foot { margin: 1.5rem -.5rem -.5rem; }
  .wizard-foot .btn { flex: 1; padding: 0 1rem; }
  .preview-frame { height: 520px; }
  .chart { gap: .25rem; height: 180px; }
  .chart .v { display: none; }
  .btn-row .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
