/* Umami app — one stylesheet. Big text, big buttons, few colours. */
:root {
  --ink: #191d25;
  --ink2: #3a3f4a;
  --muted: #6f6a64;
  --line: #e6e0d8;
  --cream: #f7f3ee;
  --paper: #ffffff;
  --accent: #9b2d20;
  --accent-soft: #fbe3e0;
  --green: #2e7d32;
  --green-soft: #e6f0e8;
  --orange: #a35a00;
  --orange-soft: #fdecd2;
  --teal: #1f6f73;
  --teal-soft: #dcefef;
  --radius: 14px;
  --nav-h: 68px;
  --top-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --head: "Futura", "Jost", "Century Gothic", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.4 var(--body); min-height: 100vh; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 700; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: var(--cream); padding: var(--safe-t) 8px 0;
  min-height: calc(var(--top-h) + var(--safe-t)); display: flex; align-items: center; gap: 4px; }
.top .back { width: 48px; height: 48px; border: 0; background: none; color: var(--cream); font-size: 26px; border-radius: 50%; display: grid; place-items: center; }
.top .title { flex: 1; min-width: 0; padding: 0 6px; }
.top .title h1 { font: 700 19px/1.15 var(--head); letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .title .sub { font-size: 13px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .brand { font: 700 18px var(--head); letter-spacing: 4px; text-transform: uppercase; }
.top .icon-btn { width: 46px; height: 46px; border: 0; background: none; color: var(--cream); border-radius: 50%; display: grid; place-items: center; }
.top .icon-btn svg { width: 24px; height: 24px; }
.top .who { border: 1px solid rgba(247,243,238,.35); background: none; color: var(--cream); border-radius: 999px; padding: 6px 12px; font-size: 15px; max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.net { background: var(--orange-soft); color: var(--orange); font-size: 14px; padding: 8px 14px; text-align: center; }

/* ---------- main + bottom nav ---------- */
.main { padding: 12px 12px calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 720px; margin: 0 auto; outline: none; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 600; position: relative; }
.nav a svg { width: 26px; height: 26px; }
.nav a.on { color: var(--accent); }
.nav a.plus .disc { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 4px 14px rgba(155,45,32,.35); }
.nav a.plus .disc svg { width: 30px; height: 30px; }
.nav .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }

/* ---------- generic blocks ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.card.flat { box-shadow: none; }
.section-title { font: 700 13px var(--head); text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin: 22px 4px 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty .big { font-size: 40px; margin-bottom: 6px; }
.hr { height: 1px; background: var(--line); margin: 12px 0; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; background: var(--cream); color: var(--ink2); white-space: nowrap; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--accent-soft); color: var(--accent); }
.pill.orange { background: var(--orange-soft); color: var(--orange); }
.pill.teal { background: var(--teal-soft); color: var(--teal); }
.pill.dark { background: var(--ink); color: var(--cream); }
.warnbox { background: var(--orange-soft); color: #6b3b00; border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 15px; }
.errbox { background: var(--accent-soft); color: var(--accent); border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 15px; }
.okbox { background: var(--green-soft); color: var(--green); border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 15px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; text-decoration: none; font-size: 16px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn.green { border-color: var(--green); color: var(--green); }
.btn.green.full { background: var(--green); color: #fff; }
.btn.red { border-color: var(--accent); color: var(--accent); }
.btn.ghost { border-color: transparent; background: none; color: var(--accent); }
.btn.block { display: flex; width: 100%; }
.btn.lg { min-height: 58px; font-size: 18px; border-radius: 14px; }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: 15px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.btns.three { grid-template-columns: 1fr 1fr 1fr; }
.btns.one { grid-template-columns: 1fr; }

/* ---------- day header + gauge ---------- */
.dayhead { display: flex; align-items: center; gap: 6px; margin: 2px 0 10px; }
.dayhead h2 { font: 700 22px/1.2 var(--head); flex: 1; text-align: center; }
.dayhead h2 small { display: block; font: 600 13px var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.arrow { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); font-size: 22px; display: grid; place-items: center; color: var(--ink); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #ebe5dd; border-radius: 14px; padding: 4px; gap: 4px; margin: 8px 0; }
.seg button { border: 0; background: none; border-radius: 11px; min-height: 52px; font-weight: 700; font-size: 16px; color: var(--ink2); padding: 4px 6px; line-height: 1.15; }
.seg button small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.seg button.closed { color: #aaa; }
.gauge { margin: 10px 2px 4px; }
.gauge .bar { height: 14px; background: #ebe5dd; border-radius: 7px; overflow: hidden; }
.gauge .fill { height: 100%; background: var(--teal); border-radius: 7px; }
.gauge .fill.orange { background: var(--orange); }
.gauge .fill.red { background: var(--accent); }
.gauge .legend { display: flex; justify-content: space-between; font-size: 15px; margin-top: 6px; }
.gauge .legend b { font-size: 18px; }

.alert-row { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1.5px solid var(--accent); color: var(--accent); border-radius: 14px; padding: 12px 14px; margin: 8px 0; font-weight: 600; text-decoration: none; }
.alert-row.teal { border-color: var(--teal); color: var(--teal); }
.alert-row .ico { font-size: 22px; }
.alert-row .chev { margin-left: auto; font-size: 22px; }

/* ---------- booking cards ---------- */
.bk { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 8px 0; align-items: flex-start; }
.bk .t { font: 700 20px/1.1 var(--head); min-width: 56px; padding-top: 2px; }
.bk .m { flex: 1; min-width: 0; }
.bk .n { font-weight: 700; font-size: 18px; line-height: 1.25; word-break: break-word; }
.bk .n .pp { font-weight: 700; color: var(--teal); white-space: nowrap; }
.bk .tbl { display: inline-block; background: var(--ink); color: var(--cream); border-radius: 6px; font-size: 13px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }
.bk .h { font-size: 14px; color: var(--muted); margin-top: 2px; }
.bk .h.warn { color: var(--accent); font-weight: 600; }
.bk .note { font-size: 15px; font-style: italic; color: var(--ink2); margin-top: 3px; }
.bk .src { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.bk .acts { display: flex; flex-direction: column; gap: 6px; }
.bk .acts button { min-width: 92px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 700; font-size: 15px; }
.bk .acts .ok { border-color: var(--green); color: var(--green); }
.bk .acts .ns { border-color: var(--accent); color: var(--accent); }
.bk.arrived { background: var(--green-soft); border-color: #cfe3d2; }
.bk.arrived .t, .bk.arrived .n { color: var(--green); }
.bk.noshow { background: var(--accent-soft); border-color: #f2cbc6; }
.bk.noshow .n { color: var(--accent); text-decoration: line-through; }
.bk.cancelled { opacity: .6; }
.bk.cancelled .n { text-decoration: line-through; }
.bk .stamp { font-weight: 700; font-size: 14px; }
.bk .undo { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 14px; padding: 4px 0; }
.details-toggle { width: 100%; border: 0; background: none; color: var(--muted); padding: 14px; font-size: 15px; font-weight: 600; }

/* ---------- planning list ---------- */
.prow { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0; text-decoration: none; color: inherit; }
.prow .d { width: 60px; text-align: center; }
.prow .d .wd { font-size: 13px; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .5px; }
.prow .d .num { font: 700 26px/1 var(--head); }
.prow .d .mo { font-size: 12px; color: var(--muted); }
.prow.today { border: 2px solid var(--accent); }
.prow.closed { opacity: .6; background: transparent; }
.prow .svcs { flex: 1; display: grid; gap: 6px; min-width: 0; }
.mini { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; font-size: 14px; }
.mini .bar { height: 10px; background: #ebe5dd; border-radius: 5px; overflow: hidden; }
.mini .bar i { display: block; height: 100%; background: var(--teal); }
.mini .bar i.orange { background: var(--orange); } .mini .bar i.red { background: var(--accent); }
.mini b { font-size: 15px; }
.prow .note { font-size: 13px; color: var(--orange); }

/* ---------- forms ---------- */
label.f { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 15px; }
.help { font-size: 13.5px; color: var(--muted); margin: 4px 2px 0; }
.input, select.input, textarea.input { width: 100%; min-height: 52px; border: 1.5px solid #d8d0c5; border-radius: 12px; padding: 12px 14px; background: var(--paper); font-size: 17px; }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.4; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,111,115,.15); }
.input.big { font-size: 22px; min-height: 60px; letter-spacing: .5px; }
.field-err { color: var(--accent); font-size: 14px; font-weight: 600; margin-top: 4px; }
.has-err .input { border-color: var(--accent); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 52px; height: 52px; border-radius: 12px; border: 1.5px solid #d8d0c5; background: var(--paper); font-size: 26px; font-weight: 700; color: var(--ink); }
.stepper input { width: 86px; text-align: center; font-weight: 700; font-size: 20px; }
.stepper .unit { color: var(--muted); font-size: 15px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.switch-row .lbl { flex: 1; font-weight: 600; }
.switch { position: relative; width: 58px; height: 34px; flex: none; border: 0; padding: 0; background: #cfc7bc; border-radius: 17px; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: var(--green); }
.switch.on::after { left: 27px; }
.radio-list { display: grid; gap: 8px; }
.radio-list button { text-align: left; min-height: 52px; border-radius: 12px; border: 1.5px solid #d8d0c5; background: var(--paper); padding: 10px 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.radio-list button::before { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b8afa3; flex: none; }
.radio-list button.on { border-color: var(--teal); background: var(--teal-soft); }
.radio-list button.on::before { border: 6px solid var(--teal); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid #d8d0c5; background: var(--paper); border-radius: 999px; min-height: 40px; padding: 6px 14px; font-weight: 600; font-size: 15px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chip .x { margin-left: 6px; opacity: .6; }
.days-grid { display: grid; grid-template-columns: 1fr 96px 96px; gap: 8px; align-items: center; }
.days-grid .dn { font-weight: 600; }
.days-grid button { min-height: 46px; border-radius: 10px; border: 1.5px solid #d8d0c5; background: var(--paper); font-weight: 700; color: #a29a8f; }
.days-grid button.on { background: var(--green); border-color: var(--green); color: #fff; }
.sms-preview { background: #e9f3ea; border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 15px; margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.sms-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- wizard ---------- */
.wiz-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; min-height: 40px; }
.wiz-sum button { border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 15px; }
.wiz-q { font: 700 24px/1.2 var(--head); margin: 14px 2px 14px; }
.dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dgrid button { min-height: 70px; border-radius: 12px; border: 1.5px solid #d8d0c5; background: var(--paper); padding: 6px 2px; line-height: 1.15; }
.dgrid button .wd { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.dgrid button .num { font: 700 22px var(--head); display: block; }
.dgrid button .st { font-size: 11.5px; color: var(--muted); }
.dgrid button.closed { background: transparent; color: #aaa; }
.dgrid button.closed .num { color: #aaa; }
.dgrid button.sel { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.ngrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ngrid button { min-height: 70px; border-radius: 14px; border: 1.5px solid #d8d0c5; background: var(--paper); font: 700 26px var(--head); }
.ngrid button.sel { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tgrid button { min-height: 64px; border-radius: 12px; border: 1.5px solid #9fc9a3; background: var(--green-soft); line-height: 1.15; }
.tgrid button b { font: 700 20px var(--head); display: block; }
.tgrid button small { font-size: 12.5px; color: var(--ink2); }
.tgrid button.mid { background: var(--orange-soft); border-color: #f0c88f; }
.tgrid button.full { background: var(--accent-soft); border-color: #eeb5ae; }
.tgrid button.shut { background: #eee; border-color: #ddd; color: #999; }
.tgrid button.sel { box-shadow: inset 0 0 0 3px var(--ink); }
.svc-h { font-weight: 700; margin: 16px 2px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.guest-card { border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: var(--teal-soft); color: #0f4547; font-size: 15px; }
.guest-card.warn { background: var(--accent-soft); color: var(--accent); }
.recap { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 17px; }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; font-weight: 600; word-break: break-word; }
.success { text-align: center; padding: 30px 10px; }
.success .tick { width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: #fff; font-size: 46px; display: grid; place-items: center; margin: 0 auto 16px; }

/* ---------- lists (calls, settings index, plus) ---------- */
.list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 10px 0; }
.li { display: flex; align-items: center; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 64px; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.li:last-child { border-bottom: 0; }
.li .ico { font-size: 24px; width: 32px; text-align: center; flex: none; }
.li .tx { flex: 1; min-width: 0; }
.li .tx b { display: block; font-size: 17px; }
.li .tx span { display: block; font-size: 14px; color: var(--muted); }
.li .chev { color: #b8afa3; font-size: 22px; }
.li .lock { font-size: 16px; }
.call { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0; }
.call.done { opacity: .6; }
.call .top-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.call .who { font-weight: 700; font-size: 18px; }
.call .when { color: var(--muted); font-size: 14px; white-space: nowrap; }
.call .info { font-size: 14px; color: var(--muted); margin-top: 2px; }
.call .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- stats ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .v { font: 700 28px/1.1 var(--head); }
.kpi .l { font-size: 13.5px; color: var(--muted); }
.kpi .d { font-size: 13px; font-weight: 700; margin-top: 2px; }
.kpi .d.up { color: var(--green); } .kpi .d.down { color: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding: 6px 0 0; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars .b i { width: 100%; background: var(--teal); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .b span { font-size: 10.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.bars .b em { font-style: normal; font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.hbar { display: grid; grid-template-columns: 92px 1fr 46px; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0; }
.hbar .bar { height: 12px; background: #ebe5dd; border-radius: 6px; overflow: hidden; }
.hbar .bar i { display: block; height: 100%; background: var(--teal); }

/* ---------- system ---------- */
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--green); }
.dot.warn { background: var(--orange); } .dot.bad { background: var(--accent); }

/* ---------- sheets (bottom panels) ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(25,29,37,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet { width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; background: var(--cream); border-radius: 20px 20px 0 0; padding: 8px 16px calc(20px + var(--safe-b)); animation: up .2s ease-out; overscroll-behavior: contain; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: #cfc7bc; margin: 4px auto 10px; }
.sheet h2 { font: 700 21px/1.25 var(--head); margin: 4px 0 6px; }
.sheet .close { float: right; width: 44px; height: 44px; border: 0; background: none; font-size: 24px; color: var(--muted); margin: -4px -8px 0 0; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 16px; margin: 10px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* PIN pad */
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 8px; min-height: 22px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); }
.pin-dots i.f { background: var(--ink); }
.pin-msg { text-align: center; min-height: 22px; color: var(--accent); font-weight: 600; font-size: 15px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 12px auto 0; }
.pad button { min-height: 64px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); font: 700 26px var(--head); }
.pad button.fn { font-size: 16px; font-family: var(--body); }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; background: var(--ink); color: var(--cream); border-radius: 14px; padding: 12px 14px 12px 16px; display: flex; align-items: center; gap: 12px; max-width: 560px; width: 100%; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: up .2s ease-out; font-size: 16px; }
.toast.err { background: var(--accent); }
.toast .tx { flex: 1; }
.toast button { border: 0; background: rgba(255,255,255,.15); color: #fff; border-radius: 10px; padding: 10px 14px; font-weight: 700; }

/* ---------- save bar (settings) ---------- */
.savebar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 25; background: var(--ink); color: var(--cream); padding: 10px 14px; display: flex; gap: 10px; align-items: center; justify-content: center; }
.savebar .tx { flex: 1; max-width: 360px; font-weight: 600; }
.savebar .btn { min-height: 46px; }

/* ---------- pair / who screens ---------- */
.splash { text-align: center; padding: 34px 8px 10px; }
.splash .logo { font: 700 34px var(--head); letter-spacing: 9px; text-transform: uppercase; }
.splash .logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin: 8px auto 18px; }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.who-grid button { min-height: 76px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--paper); font: 700 20px var(--head); }
.qr-img { display: block; margin: 12px auto; width: 240px; height: 240px; image-rendering: pixelated; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.url-box { font-size: 13px; color: var(--muted); word-break: break-all; background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; }

.loading-screen { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid #e2d9ce; border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.skeleton { height: 76px; border-radius: var(--radius); background: linear-gradient(90deg, #efe9e2 0%, #f8f4ef 50%, #efe9e2 100%); background-size: 200% 100%; animation: sk 1.2s infinite; margin: 8px 0; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (min-width: 640px) {
  .dgrid { grid-template-columns: repeat(7, 1fr); }
  .ngrid { grid-template-columns: repeat(6, 1fr); }
  .tgrid { grid-template-columns: repeat(4, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
