/* Spółdzielnia Mazowszanka - styl wg makiet (templatePage.png). Duże elementy dla osób 40+. */
:root {
  --smoke: #2B2622;
  --smoke-2: #4a3b30;
  --cream: #F7F1E8;
  --paper: #FFFCF7;
  --amber: #C8742B;
  --amber-d: #a85d1d;
  --alder: #5E7A4C;
  --alder-d: #4a6239;
  --brick: #A63D2F;
  --info: #2f5d8a;
  --text: #2B2622;
  --muted: #6f6258;
  --line: #e4d8c8;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 38, 34, .08);
  --nav-h: 72px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Bitter', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 18px/1.45 var(--font);
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
p { margin: 0; }
a { color: var(--amber-d); }
button { font: inherit; }

.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.ico-lg { width: 40px; height: 40px; }
.ico-xl { width: 64px; height: 64px; stroke-width: 1.6; }

/* ---------- nagłówek ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.25)),
    repeating-linear-gradient(90deg, #5a3f2c 0 3px, #553a28 3px 7px, #5e4330 7px 12px), var(--smoke-2);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.topbar h1 { font-size: 22px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { display: grid; place-items: center; width: 48px; height: 48px; margin-left: -8px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.back[hidden] { display: none; }
.admin-tag { display: none; padding: 4px 10px; border-radius: 8px; background: var(--amber); font-weight: 800; font-size: 14px; letter-spacing: .05em; }
body.is-admin .admin-tag { display: inline-block; }

.offline-bar { display: none; position: sticky; top: 64px; z-index: 19; padding: 8px 16px; background: var(--brick); color: #fff; text-align: center; font-weight: 700; font-size: 16px; }
body.offline .offline-bar { display: block; }

.main { max-width: 760px; margin: 0 auto; padding: 16px; }

/* ---------- dolna nawigacja ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--smoke); box-shadow: 0 -2px 10px rgba(0,0,0,.2);
}
.nav[hidden] { display: none; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #d9cbbb; text-decoration: none; font-size: 13px; font-weight: 700; }
.nav a.active { color: #fff; background: rgba(200,116,43,.25); box-shadow: inset 0 3px 0 var(--amber); }
.nav-ico { position: relative; }
.nav-ico .ico { width: 28px; height: 28px; }
.dot { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--brick); color: #fff; font-size: 13px; font-weight: 800; }
.nav-ico .dot { position: absolute; top: -6px; right: -14px; }

/* ---------- układ ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 12px; align-items: flex-end; }
.row > .field { flex: 1; min-width: 0; }
.row.between { justify-content: space-between; align-items: center; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.meta { color: var(--muted); font-size: 16px; display: flex; align-items: flex-start; gap: 6px; }
.meta .ico { width: 18px; height: 18px; margin-top: 3px; }
small { display: block; color: var(--muted); font-size: 15px; }
.sub { margin-top: 8px; color: var(--smoke-2); font-size: 19px; text-transform: none; }
.hello { font-family: var(--font-head); font-size: 22px; }
.lead { font-size: 20px; }
.ok-text { color: var(--alder-d); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.slim { padding: 12px 16px; }
.card h3 { margin-bottom: 4px; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: inherit; text-decoration: none; min-height: 72px; }
.row-link > .grow { color: inherit; text-decoration: none; }
.error-card { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; color: var(--brick); }
.error-card p { color: var(--text); }

/* ---------- przyciski ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 12px 20px;
  border: 2px solid transparent; border-radius: var(--radius);
  font-size: 19px; font-weight: 800; text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .05s, filter .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #b9b0a6 !important; border-color: #b9b0a6 !important; color: #fff !important; cursor: not-allowed; }
.btn-primary { background: var(--amber); color: #fff; box-shadow: 0 3px 0 var(--amber-d); }
.btn-success { background: var(--alder); color: #fff; box-shadow: 0 3px 0 var(--alder-d); }
.btn-danger { background: var(--brick); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--smoke); border-color: var(--smoke-2); }
.btn-ghost { background: transparent; color: var(--smoke-2); border-color: var(--line); }
.btn-ghost.danger, .danger { color: var(--brick); }
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--smoke-2); cursor: pointer; flex: none; }
.icon-btn.danger { color: var(--brick); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.link-strong { font-weight: 800; }

/* ---------- formularze ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 4px; }
.field-hint { font-size: 15px; color: var(--muted); }
.input {
  width: 100%; min-height: 54px; padding: 12px 14px;
  font: inherit; font-size: 19px; color: var(--text);
  background: #fff; border: 2px solid var(--line); border-radius: 12px;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: none; border-color: var(--alder); box-shadow: 0 0 0 3px rgba(94,122,76,.2); }
.input.invalid, .input:user-invalid { border-color: var(--brick); background: #fff5f3; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.input.big { font-size: 24px; font-weight: 800; min-height: 60px; }
.input.static { display: flex; align-items: center; background: var(--cream); color: var(--muted); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 56px; }
.input-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; cursor: pointer; }
.check input, .big-check { width: 28px; height: 28px; flex: none; accent-color: var(--alder); margin: 0; }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #efe5d6; font-size: 16px; }
.hint.warn { background: #fbe3dc; color: #7c271c; }
.hint .ico { flex: none; color: var(--amber-d); }
.segmented { display: flex; gap: 8px; }
.segmented button { flex: 1; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; font-size: 18px; cursor: pointer; }
.segmented button.on { border-color: var(--amber); background: #fbeee1; color: var(--amber-d); }
details > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 8px; }
details[open] > summary { margin-bottom: 10px; }

/* ---------- logowanie ---------- */
.auth { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.brand { text-align: center; }
.brand-logo { width: 120px; height: 120px; }
.brand h1 { font-size: 32px; color: var(--smoke); margin-top: 6px; }
.illu { width: 160px; height: 160px; margin: 0 auto; }

/* ---------- plakietki ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; font-size: 14px; font-weight: 800; white-space: nowrap; color: #fff; }
.badge-ok { background: var(--alder); }
.badge-info { background: var(--info); }
.badge-warn { background: var(--amber); }
.badge-err { background: var(--brick); }
.badge-muted { background: #8c8178; }
.badge-admin { background: var(--amber); }
.badges { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; background: #e5eedd; color: var(--alder-d); font-weight: 800; font-size: 15px; white-space: nowrap; }
.pill .ico { width: 16px; height: 16px; }

/* ---------- spółdzielnia i wyroby ---------- */
.workshop { display: flex; flex-direction: column; gap: 12px; }
.workshop-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.workshop-head h2 { margin-bottom: 6px; }
.signup-window { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #e5eedd; font-weight: 700; font-size: 16px; }
.countdown { margin-left: auto; font-variant-numeric: tabular-nums; }
.countdown b { font-size: 20px; }
.desc { color: var(--muted); }
.products { display: flex; flex-direction: column; gap: 4px; }
.product { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.product:last-child { border-bottom: 0; }
.product-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #f1dfcb; color: var(--amber-d); flex: none; }
.product-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.signup-item { display: flex; flex-direction: column; gap: 10px; }
.range { color: var(--muted); font-size: 15px; text-align: center; }

.stepper { display: flex; align-items: center; justify-content: center; gap: 16px; }
.stepper-btn { width: 64px; height: 64px; border-radius: 16px; border: 0; background: var(--amber); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 3px 0 var(--amber-d); }
.stepper-btn:first-child { background: var(--alder); box-shadow: 0 3px 0 var(--alder-d); }
.stepper-btn:disabled { background: #cfc6bc; box-shadow: none; cursor: not-allowed; }
.stepper-btn .ico { width: 30px; height: 30px; stroke-width: 3; }
.stepper-val { min-width: 90px; text-align: center; font-size: 30px; font-weight: 800; padding: 6px 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }

.sticky-bottom { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius); background: rgba(247,241,232,.96); box-shadow: 0 -4px 16px rgba(43,38,34,.12); }
.sum-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 19px; }
.sum-bar b { font-size: 22px; }
.money { color: var(--amber-d); font-variant-numeric: tabular-nums; white-space: nowrap; }
.money.big { font-size: 32px; }
.total { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* oś czasu */
.timeline { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.timeline li { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 0; color: var(--muted); font-weight: 700; }
.timeline li::before { content: ''; position: absolute; left: 15px; top: -6px; height: 12px; width: 2px; background: var(--line); }
.timeline li:first-child::before { display: none; }
.tl-dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: #fff; color: #fff; flex: none; }
.tl-dot .ico { width: 18px; height: 18px; stroke-width: 3; }
.timeline li.done { color: var(--text); }
.timeline li.done .tl-dot { background: var(--alder); border-color: var(--alder); }
.timeline li.current { color: var(--amber-d); }
.timeline li.current .tl-dot { background: var(--amber); border-color: var(--amber); }

/* koszyk */
.check-item { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.check-item p { font-size: 16px; }

.notif { display: flex; gap: 14px; align-items: flex-start; color: inherit; text-decoration: none; }
.notif.unread { border-left: 6px solid var(--amber); background: #fff6ec; }
.notif .ico { color: var(--amber-d); margin-top: 2px; }

.profile { display: flex; gap: 14px; align-items: center; }
.install-card { border: 2px solid var(--amber); background: #fff6ec; }
.install-card .ico-lg { color: var(--amber-d); }
.install-steps { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.ico-inline { width: 20px; height: 20px; vertical-align: -4px; color: var(--info); }
.auth.center .install-card { text-align: left; }

/* instrukcja instalacji: kroki z rysunkami przycisków iPhone'a */
.help-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.help-step { display: flex; gap: 12px; align-items: flex-start; }
.help-num { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 20px; background: var(--amber); color: #fff; font-weight: 800; font-size: 18px; flex: none; }
.mock { border: 2px solid #d5d0ca; border-radius: 16px; background: #f2f2f4; padding: 10px; font-family: -apple-system, system-ui, sans-serif; font-size: 15px; color: #222; }
.mock-url { text-align: center; padding: 8px 12px; border-radius: 10px; background: #fff; color: #555; margin-bottom: 8px; }
.mock-url.inline { flex: 1; margin: 0; }
.mock-bar { display: flex; align-items: center; justify-content: space-around; gap: 8px; }
.mock-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #1a73e8; }
.mock-btn small { font-size: 11px; }
.mock .hl { outline: 3px solid var(--amber); outline-offset: 2px; background: #fff6ec; border-radius: 12px; animation: pulse 1.6s ease-in-out infinite; }
.mock-menu { padding: 4px 0; background: #fff; }
.mock-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #eee; }
.mock-row:last-child { border-bottom: 0; }
.mock-row .ico { color: #1a73e8; }
.mock-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #eee; color: #1a73e8; }
.mock-head b { color: #222; font-size: 14px; }
.mock-add { padding: 4px 8px; font-weight: 700; }
.mock-icon { width: 40px; height: 40px; border-radius: 9px; }
.mock-pair { display: flex; flex-direction: column; gap: 8px; }
@keyframes pulse { 50% { outline-color: rgba(200, 116, 43, .35); } }
@media (prefers-reduced-motion: reduce) { .mock .hl { animation: none; } }
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note { font-size: 14px; color: var(--muted); text-align: center; }
.recaptcha-note a { color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 16px; text-align: center; color: var(--muted); }

/* ---------- admin ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 130px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); color: var(--smoke); text-decoration: none; font-weight: 800; text-align: center; }
.tile-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: #fbeee1; color: var(--amber-d); }
.tile-ico .ico { width: 32px; height: 32px; }
.tile .dot { position: absolute; top: 10px; right: 10px; }

.person-head { display: flex; gap: 12px; align-items: flex-start; }
.person-head > .ico { color: var(--smoke-2); }

.table { width: 100%; border-collapse: collapse; font-size: 17px; }
.table th, .table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 15px; color: var(--muted); }
.table .r, .a4-table .r { text-align: right; }

/* kreatory */
.wiz-steps { list-style: none; display: flex; justify-content: space-between; margin: 0; padding: 0; position: relative; }
.wiz-steps::before { content: ''; position: absolute; left: 20px; right: 20px; top: 50%; height: 3px; background: var(--line); z-index: 0; }
.wiz-steps li { position: relative; z-index: 1; }
.wiz-steps button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--line); background: #fff; font-weight: 800; color: var(--muted); cursor: pointer; }
.wiz-steps li.done button { background: var(--alder); border-color: var(--alder); color: #fff; }
.wiz-steps li.current button { background: var(--amber); border-color: var(--amber); color: #fff; transform: scale(1.12); }
.wiz-nav { display: flex; gap: 12px; }
.wiz-nav .btn { flex: 1; }
.ing-row { display: flex; gap: 12px; align-items: flex-start; }
.ing-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--smoke-2); color: #fff; font-weight: 800; flex: none; margin-top: 30px; }

.meat-bar { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--amber); background: #fff6ec; }
.meat-bar.ok { border-color: var(--alder); background: #eef4e8; }
.meat-bar-top { display: flex; justify-content: space-between; align-items: center; font-size: 20px; }
.meat-bar.warn .ico { color: var(--amber-d); }
.meat-bar.ok .ico { color: var(--alder); }
.progress { height: 12px; border-radius: 6px; background: #e8dccd; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--amber); border-radius: 6px; transition: width .2s; }
.meat-bar.ok .progress span, .shop-progress .progress span { background: var(--alder); }

/* lista zakupów */
.shop-item { display: flex; flex-direction: column; gap: 10px; }
.shop-item.is-done { border-left: 6px solid var(--alder); background: #f3f7ef; }
.shop-item.unneeded { opacity: .6; }
.need { font-size: 17px; font-weight: 700; color: var(--smoke-2); }
.who { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--smoke-2); color: #fff; font-weight: 800; font-size: 15px; flex: none; margin-bottom: 5px; }
.who:empty { background: transparent; }
.save-state { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 4px; min-height: 18px; }
.save-state .ico { width: 16px; height: 16px; }
.save-state.ok { color: var(--alder-d); }
.save-state.warn { color: var(--amber-d); }
.save-state.err { color: var(--brick); }
.switch-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; cursor: pointer; }
.switch { appearance: none; width: 58px; height: 34px; border-radius: 17px; background: #cfc6bc; position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch:checked { background: var(--alder); }
.switch:checked::after { left: 27px; }

/* podział */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip { flex: none; min-height: 48px; padding: 8px 16px; border-radius: 24px; border: 2px solid var(--line); background: #fff; font-weight: 800; cursor: pointer; }
.chip.on { background: var(--amber); border-color: var(--amber); color: #fff; }
.division-counter { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 19px; }
.person-weigh { display: flex; gap: 12px; align-items: flex-end; }
.person-weigh .field { width: 140px; flex: none; }
.person-weigh .field.small { width: 80px; }
.basket-row summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.basket-row .btn { margin-top: 10px; }
.push-preview { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }

/* ---------- wydruk A4 ---------- */
.a4 { background: #fff; color: #000; padding: 24px; border: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.a4 h1 { font-size: 26px; }
.a4 h2 { font-size: 18px; margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 2px solid #000; }
.a4-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.a4-scale { flex: none; display: flex; flex-direction: column; align-items: center; padding: 8px 12px; border: 2px solid #000; border-radius: 8px; font-size: 13px; text-align: center; }
.a4-scale b { font-size: 26px; }
.a4-meta { margin-top: 8px; font-size: 13px; color: #444; }
.a4-table { width: 100%; border-collapse: collapse; table-layout: fixed; overflow-wrap: anywhere; }
.a4-table th, .a4-table td { border: 1px solid #999; padding: 5px 8px; text-align: left; }
.a4-table tr.group th { background: #eee; }
.a4-table .muted { color: #666; font-size: 13px; }
.a4-steps { padding-left: 22px; margin: 0; }
.a4-steps li { margin-bottom: 8px; }
.a4-steps p { white-space: pre-line; }
.a4-notes { height: 120px; border: 1px solid #999; background: repeating-linear-gradient(#fff 0 27px, #ccc 27px 28px); }

/* ---------- komunikaty i okna ---------- */
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 520px; width: 100%; padding: 14px 16px; border-radius: 12px; background: var(--alder-d); color: #fff; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: opacity .5s, transform .5s; }
.toast-err { background: var(--brick); }
.toast-warn { background: var(--amber-d); }
.toast.out { opacity: 0; transform: translateY(10px); }
.dialog { width: min(92vw, 440px); border: 0; border-radius: 18px; padding: 24px; background: var(--paper); color: var(--text); }
.dialog::backdrop { background: rgba(43,38,34,.55); }
.dialog h2 { margin-bottom: 10px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 0; color: var(--muted); }
.spinner { width: 44px; height: 44px; border: 5px solid var(--line); border-top-color: var(--amber); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; padding: 0; }
  .topbar, .nav, .toasts, .offline-bar, .no-print { display: none !important; }
  .main { max-width: none; padding: 0; }
  .a4 { border: 0; padding: 0; }
  .a4-table tr, .a4-steps li { break-inside: avoid; }
}
