/* Receipt Box. Phone first; works on a desktop browser too. */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e6eb;
  --text: #15191e;
  --text-2: #535c68;
  --text-3: #858e99;
  --ink: #15191e;          /* primary buttons */
  --on-ink: #ffffff;
  --me-bubble: #15191e;
  --on-me: #ffffff;
  /* Bin colors, in bin order (validated categorical palette: blue, orange, aqua, yellow). */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --warn-bg: #fff4dc;
  --warn-text: #7a4f00;
  --warn: #fab219;
  --danger: #d03b3b;
  --good: #0ca30c;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 16px rgb(0 0 0 / .05);
  --tabs-h: 64px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111214;
    --surface: #1a1a19;
    --surface-2: #242423;
    --border: #2f302e;
    --text: #f2f2ef;
    --text-2: #c3c2b7;
    --text-3: #8f8e86;
    --ink: #f2f2ef;
    --on-ink: #15191e;
    --me-bubble: #2b3a52;
    --on-me: #ffffff;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --warn-bg: #3a2d10;
    --warn-text: #f6d58a;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111214; --surface: #1a1a19; --surface-2: #242423; --border: #2f302e;
  --text: #f2f2ef; --text-2: #c3c2b7; --text-3: #8f8e86; --ink: #f2f2ef; --on-ink: #15191e;
  --me-bubble: #2b3a52; --on-me: #ffffff; --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --warn-bg: #3a2d10; --warn-text: #f6d58a; --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.app { height: 100dvh; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; }
.topbar h1 { font-size: 20px; margin: 0; flex: 1; letter-spacing: -.01em; }
.queue-badge { font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 99px; padding: 3px 10px; }
.view { flex: 1; overflow-y: auto; padding: 0 16px 24px; -webkit-overflow-scrolling: touch; }
.view.chat-view { overflow: hidden; display: flex; flex-direction: column; padding: 0; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); background: var(--surface); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { position: relative; border: 0; background: none; height: var(--tabs-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--text-3); }
.tabs button.active { color: var(--text); font-weight: 600; }
.tabs em { position: absolute; top: 10px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--warn); border: 2px solid var(--surface); }
.icon-btn { border: 0; background: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.off { opacity: .4; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 550; text-align: center; }
.btn.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--text-2); }
.field input, .field select, .field textarea, .input { font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field input, .field select { min-width: 0; }
.field-row.amount { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.field-row.dates { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
/* iPhone Safari gives date/month fields a built-in minimum width that ignores the grid; this lets them shrink. */
.field input[type="date"], .field input[type="month"], .input[type="date"], .input[type="month"] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; width: 100%; max-width: 100%;
  overflow: hidden; -webkit-min-logical-width: 0; padding-left: 10px; padding-right: 6px;
}
input[type="date"]::-webkit-date-and-time-value, input[type="month"]::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; margin: 6px 0; }
.check input { width: 20px; height: 20px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip svg.i { width: 16px; height: 16px; }
.chip:disabled { opacity: .5; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--text-3); }
.bin-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.banner { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-text); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.banner svg.i { width: 18px; height: 18px; margin-top: 1px; }
.banner.link { border: 0; width: 100%; text-align: left; }
.empty { text-align: center; color: var(--text-2); padding: 40px 20px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--text-2); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- chat ---------- */
.feed { flex: 1; overflow-y: auto; padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
/* Messages keep their height: a swipeable row clips its content, which would otherwise let the
   browser squash every message to fit the screen once the chat is longer than it. */
.feed > * { flex-shrink: 0; }
/* swipe left to delete, long-press or "Select" to pick several */
.swipe { position: relative; overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.swipe-delete { position: absolute; top: 0; right: 0; bottom: 0; width: 88px; border: 0; background: var(--danger); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; }
.swipe-delete svg.i { width: 20px; height: 20px; }
.swipe-content { position: relative; transition: transform .2s ease; }
.swipe.dragging .swipe-content { transition: none; }
.swipe.open .swipe-content { transform: translateX(-88px); }
.item .swipe-content { display: flex; flex-direction: column; gap: 8px; background: var(--bg); padding: 1px 0; }
.rows .swipe + .swipe { border-top: 1px solid var(--border); }
.row-item.swipe-content { background: var(--surface); }
.selecting .swipe .swipe-content { padding-left: 38px; }
.selecting .swipe::before { content: ""; position: absolute; left: 8px; top: 50%; width: 20px; height: 20px; margin-top: -12px; border-radius: 50%; border: 2px solid var(--text-3); background: var(--surface); z-index: 2; }
.selecting .swipe.selected::before { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--surface); }
.selecting .composer { display: none; }
.select-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.select-count { flex: 1; text-align: center; font-weight: 600; font-size: 14px; }
.btn.danger-fill { background: var(--danger); color: #fff; border-color: var(--danger); }
.text-btn { border: 0; background: none; color: var(--text-2); font-weight: 600; padding: 8px; min-height: 40px; }
.people-pick .chip svg.i { width: 14px; height: 14px; opacity: .6; }
.new-person { margin-top: 18px; border-style: dashed; }
.invite-actions { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.invite-actions .btn { flex: 1; }
.feed .intro { margin: auto 0; text-align: center; color: var(--text-2); padding: 24px 12px; }
.feed .intro h2 { color: var(--text); font-size: 20px; margin: 0 0 8px; }
.feed .intro ul { text-align: left; display: inline-block; margin: 12px 0 0; padding-left: 20px; }
.msg { max-width: 86%; border-radius: 18px; padding: 10px 12px; word-wrap: break-word; }
.msg p { margin: 4px 0; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--me-bubble); color: var(--on-me); border-bottom-right-radius: 6px; }
.msg.me .meta { color: color-mix(in srgb, var(--on-me) 65%, transparent); }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; box-shadow: var(--shadow); width: 86%; }
.msg .meta { font-size: 11px; margin-top: 4px; color: var(--text-3); }
.msg .transcript { font-style: italic; }
.msg audio { width: 220px; max-width: 100%; height: 36px; margin: 4px 0; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.thumbs img { width: 84px; height: 108px; object-fit: cover; border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.working { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; padding: 4px 0; }
.rcard { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 0; cursor: pointer; }
.rcard + .rcard { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.rcard-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.rcard-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.rcard .banner { margin: 8px 0 0; padding: 6px 10px; font-size: 13px; }
.rcard-actions { display: flex; gap: 6px; margin-top: 8px; }
.rcard-actions .chip { font-size: 13px; padding: 4px 10px; min-height: 30px; }
.load-more { align-self: center; }

.composer { background: var(--surface); border-top: 1px solid var(--border); padding: 8px 12px 10px; }
.composer .chips { margin-bottom: 8px; }
.composer .chip { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.composer-row { display: flex; align-items: flex-end; gap: 4px; }
.composer textarea { scrollbar-width: none; min-width: 0; flex: 1; resize: none; border: 1px solid var(--border); background: var(--bg); border-radius: 20px; padding: 10px 14px; font-size: 16px; max-height: 140px; min-height: 42px; line-height: 1.3; }
.composer .send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; flex: none; }
.composer .send:disabled { opacity: .35; }
.composer .icon-btn.rec { color: #fff; background: var(--danger); }
.attachments { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.attachment { position: relative; flex: none; }
.attachment img, .attachment .file { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.attachment .remove { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); background: var(--ink); color: var(--on-ink); display: grid; place-items: center; padding: 0; }
.attachment .remove svg.i { width: 12px; height: 12px; }
.audio-chip { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 6px 8px 6px 12px; flex: none; }
.audio-chip audio { height: 32px; width: 180px; }
.recording { display: flex; align-items: center; gap: 10px; color: var(--danger); font-weight: 600; padding: 4px 4px 10px; }
.recording .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.progress { height: 3px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.progress div { height: 100%; background: var(--ink); width: 0; transition: width .2s; }

/* ---------- receipts list ---------- */
.filters { position: sticky; top: 0; background: var(--bg); padding: 4px 0 10px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.filters .row { display: flex; gap: 8px; }
.filters .row > * { flex: 1; min-width: 0; }
.composer textarea::-webkit-scrollbar { display: none; }
.month-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 14px 4px 6px; }
.rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.row-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 10px 12px; }
.row-item + .row-item { border-top: 1px solid var(--border); }
.row-item:hover { background: var(--surface-2); }
.thumb { width: 44px; height: 54px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); flex: none; }
.row-item .mid { flex: 1; min-width: 0; }
.row-item .title, .row-item .sub { display: block; }
.row-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.row-item .amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.flag.done { color: var(--text-2); background: var(--surface-2); }
.flag { color: var(--warn-text); background: var(--warn-bg); font-size: 11px; border-radius: 6px; padding: 1px 6px; }

/* ---------- edit sheet ---------- */
.sheet { border: 0; padding: 0; width: 100%; max-width: 560px; max-height: 92dvh; border-radius: 20px 20px 0 0; margin: auto auto 0; background: var(--bg); color: var(--text); }
.sheet::backdrop { background: rgb(0 0 0 / .45); }
@media (min-width: 700px) { .sheet { border-radius: 20px; margin: auto; } }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--border); z-index: 1; }
.sheet-head h2 { flex: 1; font-size: 17px; margin: 0; }
.sheet-body { padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
.receipt-photo { display: block; width: 100%; max-height: 46dvh; object-fit: contain; background: var(--surface-2); border-radius: 12px; margin-bottom: 12px; }
.segmented { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.segmented button { flex: 1; border: 0; background: none; border-radius: 9px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.segmented button.on { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.meta-list { font-size: 13px; color: var(--text-2); margin: 8px 0 14px; display: grid; gap: 4px; word-break: break-word; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-actions .btn.primary { grid-column: 1 / -1; }
details.ocr { margin-top: 14px; font-size: 13px; color: var(--text-2); }
details.ocr pre { white-space: pre-wrap; background: var(--surface-2); padding: 10px; border-radius: 10px; max-height: 240px; overflow: auto; font-size: 12px; }

/* ---------- photo viewer ---------- */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #000; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: #000; }
.lightbox-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 12px 10px; background: linear-gradient(rgb(0 0 0 / .65), transparent); }
.lightbox-bar .hint { flex: 1; text-align: center; font-size: 12px; color: #d0d0d0; }
.lightbox-bar .icon-btn, .lightbox-bar .chip { color: #fff; background: rgb(255 255 255 / .12); border-color: transparent; }
.lightbox .stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: grab; }
.lightbox .stage img { max-width: 100%; max-height: 100%; transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-drag: none; }
.receipt-photo { cursor: zoom-in; }

/* ---------- crop by hand ---------- */
.cropper .crop-stage { top: calc(env(safe-area-inset-top) + 56px); bottom: calc(env(safe-area-inset-bottom) + 64px); padding: 24px; cursor: default; }
.cropper .crop-stage img { max-width: 100%; max-height: 100%; }
#crop-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.crop-shade { fill: rgb(0 0 0 / .55); fill-rule: evenodd; pointer-events: none; }
.crop-edge { fill: none; stroke: #fff; stroke-width: 2; pointer-events: none; }
.crop-hit { fill: transparent; cursor: grab; touch-action: none; }
.crop-handle { fill: rgb(255 255 255 / .3); stroke: #fff; stroke-width: 2.5; pointer-events: none; }
.crop-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; justify-content: center; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
.crop-bottom .chip, .cropper .lightbox-bar .chip { color: #fff; background: rgb(255 255 255 / .14); border-color: transparent; }
.cropper .lightbox-bar .chip.on { background: #fff; color: #111; }

/* ---------- overview ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.month-nav h2 { font-size: 18px; margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.tile .label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.tile .big { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.bar-row .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 12px; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 3px; }
.bar-row .val { font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; height: 150px; border-bottom: 1px solid var(--border); }
.trend .col { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; cursor: default; }
.trend .col:hover, .trend .col.on { background: var(--surface-2); border-radius: 6px 6px 0 0; }
.trend .b { width: min(16px, 40%); border-radius: 4px 4px 0 0; min-height: 0; }
.trend-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; font-size: 12px; color: var(--text-3); text-align: center; margin-top: 6px; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--on-ink); font-size: 13px; padding: 6px 10px; border-radius: 8px; max-width: 220px; }
.tooltip div { display: flex; align-items: center; gap: 6px; }

/* ---------- reports & settings ---------- */
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.actions-grid .btn.primary { grid-column: 1 / -1; }
.preview-list { font-size: 14px; display: grid; gap: 6px; margin-top: 10px; }
.preview-list div { display: flex; justify-content: space-between; gap: 10px; }
.preview-list span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.big-total { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.people { display: grid; gap: 8px; margin-bottom: 12px; }
.person { display: flex; align-items: center; gap: 10px; }
.person .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; }
.person .name { flex: 1; }
.status-list { display: grid; gap: 6px; font-size: 14px; }
.status-list div { display: flex; justify-content: space-between; gap: 10px; }
.ok { color: var(--good); font-weight: 600; }
.bad { color: var(--danger); font-weight: 600; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card img { width: 72px; height: 72px; border-radius: 18px; }
.login-card h1 { margin: 12px 0 6px; }
.login-card p { color: var(--text-2); margin: 0 0 20px; }
.login-card form { text-align: left; }
.login-card .chips { justify-content: center; margin-bottom: 16px; }
.login-card .chip { font-size: 16px; padding: 8px 16px; min-height: 42px; }
.pin { letter-spacing: .3em; text-align: center; font-size: 22px !important; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgb(0 0 0 / .2); }
