/* Shop pages (dashboard, top-up, history) · design session. Needs tokens.css + ui.css first. */

/* ---------- dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: var(--s4); padding-top: 12px; padding-bottom: calc(var(--s8) + env(safe-area-inset-bottom)); }
.dash__head { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.dash__face { width: 44px; height: 44px; flex: none; display: block; }
.dash__face.is-low .mascot__tile { fill: #FFD9A8; }
.dash__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.dash__who b { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash__status { font: 500 13px/1.4 var(--font); color: var(--ink-2); }
.dash__status.is-ok { color: var(--leaf); }
.dash__status.is-low { color: var(--ember-ink); }
.dash__status.is-zero { color: var(--alarm); }

.dash__setup { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); background: var(--saffron-tint); border-radius: var(--shape-bot-card); padding: 14px 16px; }
.dash__setup b { font-size: 16px; font-weight: 600; }
.dash__setup .t-small { color: var(--ink-2); }

/* waitlist bonus waiting for the first connected page (2 Dec, api 22.3): dashboard card + channels page note */
.wl-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 2px var(--saffron); border-radius: var(--shape-bot-card); padding: 14px 16px; }
.wl-card b { font-size: 16px; font-weight: 600; }
.wl-card .t-small { color: var(--ink-2); }
.wl-card__tag { flex: none; min-width: 66px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; border-radius: 16px 16px 16px 6px; background: var(--saffron); color: #16161D; }
.wl-card__tag b { font: 700 16px/1.1 var(--font); letter-spacing: -.01em; }
.wl-card__tag b::before { content: "+"; }
.wl-card__tag small { font: 600 11px/1.2 var(--font); }
.wl-card--note { margin: 0; }

.dash__hlink { color: #C4C5CE; font: var(--t-label); font-size: 13px; padding: 4px 0; }
.dash__bal { display: flex; align-items: baseline; gap: 8px; margin-top: -6px; }
.dash__fine { margin: 0; font-size: 12px; line-height: 1.5; color: #9B9DA8; }
.dash__days { display: flex; flex-direction: column; gap: 8px; }
.dash__daystext { font: 500 15px/1.4 var(--font); }
.hero.is-low .dash__daystext { color: var(--ember-on-dark); }
.dash__days.is-empty .dash__daystext { font-size: 14px; font-weight: 400; color: #C4C5CE; }
.dash__days.is-empty .dash__fine { display: none; }
.dash__trial { align-self: flex-start; font: 600 12px/1 var(--font); padding: 6px 10px; border-radius: var(--r-pill); background: rgba(255, 197, 48, .16); color: var(--saffron); }
.hero .alert--zero { align-items: flex-start; line-height: 1.55; }
.hero.is-zero .btn { background: #fff; }

.dash__now { display: flex; flex-direction: column; gap: 10px; }
.dash__live { display: flex; align-items: center; gap: 8px; font: 600 15px/1.4 var(--font); }
.dash__live .typing { background: var(--saffron); color: #16161D; padding: 7px 9px; border-radius: 12px 12px 12px 4px; }
.dash__live .typing i { width: 6px; height: 6px; }
.dash__today { display: flex; justify-content: space-between; gap: 10px; font: var(--t-small); color: var(--ink-2); }
.dash__today b { color: var(--ink); font-variant-numeric: tabular-nums; }

.dash__inbox { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.dash__inbox .ibub { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--ink); color: var(--card); display: grid; place-items: center; }
.dash__inbox .ibub--order { background: var(--saffron); color: #16161D; }   /* orders = what the bot brought in */
.dash__count { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; background: var(--alarm); color: #fff; font: 700 14px/28px var(--font); text-align: center; }
.dash__count--order { background: var(--ink); color: var(--card); }

.dash__month { display: flex; flex-direction: column; gap: 12px; }
.chrow { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.chrow:first-of-type { padding-top: 0; border-top: 0; }
.chrow__top { display: flex; align-items: center; gap: 10px; }
.chrow__name { flex: 1; font-size: 15px; }
.chrow__num { font-size: 14px; color: var(--ink-2); }
.chrow__num b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chip--state { min-height: 0; padding: 4px 10px; font: 600 12px/1.3 var(--font); box-shadow: none; background: var(--card-2); color: var(--ink-2); }
.chip--state.is-live { background: var(--leaf-tint); color: var(--leaf-ink); }
.chip--state.is-test { background: var(--saffron-tint); color: var(--saffron-ink); }
.chip--state.is-alarm { background: var(--alarm-tint); color: var(--alarm); }
.tile span.tile__alarm { color: var(--alarm); font-weight: 600; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--saffron); border-radius: 4px; transform-origin: right center; transform: scaleX(0); transition: transform 900ms var(--ease-out); }
[dir="ltr"] .bar > span { transform-origin: left center; }
.dash__total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card); border-radius: 20px; padding: 14px 16px; min-height: 92px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: transform var(--t-press) var(--ease-out); }
.tile:active { transform: scale(.97); }
.tile b { font-size: 15px; font-weight: 600; }
.tile span { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.tile[aria-disabled="true"] { background: var(--card-2); color: var(--ink-3); }
.tile__bubbles { display: flex; gap: 3px; align-items: center; height: 22px; }
.tile__bubbles i { height: 10px; border-radius: 5px 5px 5px 2px; background: var(--saffron); }

.dash__out { align-self: center; min-height: 44px; padding: 0 16px; color: var(--ink-2); font: 500 14px/1 var(--font); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- top-up ---------- */
.tu { min-height: 100dvh; display: flex; flex-direction: column; gap: var(--s4); padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom)); }
.tu__now { display: flex; justify-content: space-between; align-items: baseline; font: var(--t-small); color: var(--ink-2); }
.tu__now b { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.amts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.amt-card { min-height: 92px; border-radius: 22px 22px 22px 8px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink);
  padding: 12px 14px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; text-align: start;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-quick); }
.amt-card:active { transform: scale(.97); }
.amt-card[aria-checked="true"] { background: var(--saffron); box-shadow: inset 0 0 0 2.5px #16161D; }
.amt-card__n { display: flex; align-items: baseline; gap: 5px; }
.amt-card__n b { font: 700 26px/1 var(--font); letter-spacing: -.02em; direction: ltr; unicode-bidi: isolate; }
.amt-card__n span { font-size: 13px; }
.amt-card__eq { font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.amt-card[aria-checked="true"] .amt-card__eq { color: #16161D; }
.tu__after { background: var(--card); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.tu__after b { font: 700 30px/1.1 var(--font); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.tu__days { font: 500 14px/1.4 var(--font); color: var(--leaf-ink); }
.tu__other { align-self: flex-start; min-height: 44px; color: var(--saffron-ink); font: 600 14px/1 var(--font); text-decoration: underline; text-underline-offset: 3px; }
.tu__foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.tu__wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: var(--s6) 0; }
.tu__wait .bubble--typing { align-self: center; padding: 22px 26px; border-radius: 30px 30px 30px 10px; }
.tu__done .hero { padding: 24px 22px; }
.tu__done .dash__bal { position: relative; }
.tu__done .hero > * { position: relative; }
.tu__done .hero > .flood { position: absolute; }
.tu__msg { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.tu__face { width: 72px; height: 72px; }
.rise { animation: born var(--t-split) var(--ease-spring) both; animation-delay: .5s; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } .bar > span { transition: none; } }

/* ---------- history ---------- */
.hist { display: flex; flex-direction: column; gap: var(--s4); padding-bottom: calc(var(--s8) + env(safe-area-inset-bottom)); }
.sums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sum { background: var(--card); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.sum__n { font: 700 24px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.receipt { background: var(--card); border-radius: 6px 6px 24px 24px; padding: 4px 16px 16px; position: relative; margin-top: 8px; }
.receipt::before { content: ""; position: absolute; top: -8px; inset-inline: 0; height: 10px; background-image: radial-gradient(circle at 8px 0, var(--paper) 6px, transparent 6.5px); background-size: 16px 10px; background-repeat: repeat-x; }
.receipt h2 { margin: 14px 0 2px; font: 600 13px/1.4 var(--font); color: var(--ink-3); }
.rrow__what { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.rrow__what b { font-size: 15px; font-weight: 600; }
.rrow__what span { font-size: 12px; color: var(--ink-3); }
.rrow .amt { font-size: 16px; }

/* ---------- inbox list ---------- */
.ibx { display: flex; flex-direction: column; gap: var(--s4); padding-bottom: calc(var(--s8) + env(safe-area-inset-bottom)); }
.ibx__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ibx__item { display: flex; gap: 12px; background: var(--card); border-radius: 22px; padding: 14px; text-decoration: none; color: var(--ink); transition: transform var(--t-press) var(--ease-out); }
.ibx__item:active { transform: scale(.98); }
.ibx__item.is-hot { box-shadow: inset 0 0 0 2px var(--ink); }
.ava { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 17px/1 var(--font); }
.ava__ch { position: absolute; bottom: -2px; inset-inline-end: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); display: grid; place-items: center; color: var(--ink); }
.ava__ch .ico { width: 14px; height: 14px; }
.ibx__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ibx__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ibx__top b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibx__when { flex: none; font-size: 12px; color: var(--ink-3); }
.ibx__when.is-late { color: var(--ember-ink); font-weight: 600; }
.ibx__last { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibx__last--media .ico { display: inline-block; vertical-align: -3px; margin-inline-end: 4px; color: var(--ink-3); }   /* photo / voice / file icon */
.ibx__tags { display: flex; gap: 6px; flex-wrap: wrap; }
/* .tag lives in ui/ui.css since 27 Nov (the test chat uses it too) */

/* ---------- one chat (staff view) ---------- */
.cv { height: 100dvh; display: flex; flex-direction: column; max-width: 680px; margin-inline: auto; background: var(--paper); }
.cv__head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.cv__head .iconbtn { background: transparent; }
.cv__head .ava { width: 40px; height: 40px; font-size: 15px; }
.cv__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.cv__who b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv__who span { font-size: 12px; color: var(--ink-3); }
/* the chat's newest order under the header (27 Nov): one line, tap to open the card + staff buttons */
.cv__order { background: var(--card); border-bottom: 1px solid var(--line); padding: 4px 12px; max-height: 60vh; overflow-y: auto; }
.cv__ordsum { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 48px; font: 600 14px/1.3 var(--font); color: var(--ink); text-align: start; }
.cv__ordico { width: 32px; height: 32px; flex: none; border-radius: 11px 11px 11px 4px; background: var(--saffron-tint); color: var(--saffron-ink); display: grid; place-items: center; }
.cv__ordico .ico { width: 18px; height: 18px; }
.cv__ordt { white-space: nowrap; }
.cv__ordtot { font: 500 13px/1 var(--font); color: var(--ink-2); white-space: nowrap; }
.cv__ordtot b { font-weight: 600; color: var(--ink); }
.cv__chev { width: 18px; height: 18px; flex: none; color: var(--ink-3); transition: transform var(--t-quick) var(--ease-out); }
.cv__ordsum[aria-expanded="true"] .cv__chev { transform: rotate(180deg); }
.cv__ordsum[aria-expanded="true"] .cv__ordchip { display: none; }   /* the open card shows its own status */
.cv__ordbody { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 12px; }
.cv__ordbody[hidden] { display: none; }
.cv__ordall { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; min-height: 36px; font: 600 13px/1 var(--font); color: var(--ink); text-decoration: none; }
.cv__scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column-reverse; }
.cv__log { padding: 14px 16px; }
.cv__day { align-self: center; font-size: 12px; color: var(--ink-3); margin: 8px 0 6px; }
.cv__older { align-self: center; min-height: 40px; padding: 0 14px; font: 600 13px/1 var(--font); color: var(--saffron-ink); }
.msg--staff { flex-direction: column; align-items: flex-end; gap: 2px; }
.msg--staff .staff-name { font-size: 11px; }
.msg.is-pending .bubble { opacity: .6; }
.msg.is-failed .bubble { box-shadow: inset 0 0 0 2px var(--alarm); }
.msg__state { font-size: 11px; color: var(--ink-3); } .msg.is-failed .msg__state { color: var(--alarm); font-weight: 600; }
.cv__foot { background: var(--card); border-top: 1px solid var(--line); padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.cv__acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cv__acts .chip { min-height: 40px; font-size: 14px; }
.cv__free { margin-inline-start: auto; font: 500 12px/1.4 var(--font); color: var(--leaf-ink); }
.cv__form { display: flex; gap: 8px; align-items: flex-end; }
.cv__form textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 140px; resize: none; border-radius: 24px; padding: 12px 16px; line-height: 1.5; }
.cv__send { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--ink); color: var(--card); display: grid; place-items: center; }
.cv__send:disabled { background: var(--line); color: var(--ink-3); }
.cv__blocked { font: var(--t-small); color: var(--ink-2); background: var(--card-2); border-radius: var(--r-m); padding: 12px 14px; }

/* ---------- channels ---------- */
.chs { display: flex; flex-direction: column; gap: var(--s4); padding-bottom: calc(var(--s8) + env(safe-area-inset-bottom)); }
.chc { background: var(--card); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.chc.is-soon { background: transparent; box-shadow: inset 0 0 0 2px var(--line-input); }
.chc__top { display: flex; align-items: center; gap: 12px; }
.chc__ico { width: 48px; height: 48px; flex: none; border-radius: 16px; background: var(--card-2); display: grid; place-items: center; }
.chc.is-soon .chc__ico { background: var(--line); }
.chc__name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.chc__name b { font-size: 17px; font-weight: 600; }
.chc__name span { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1.4 var(--font); padding: 4px 10px; border-radius: var(--r-pill); background: var(--card-2); color: var(--ink-2); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill--live { background: var(--leaf-tint); color: var(--leaf-ink); }
.pill--live i { animation: breathe 2.2s ease-in-out infinite; }
.pill--test { background: var(--saffron-tint); color: var(--saffron-ink); }
.pill--off { background: var(--line); color: var(--ink-2); }
.pill--alarm { background: var(--alarm-tint); color: var(--alarm); }
.chc__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.chc__row > span { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.chc__row b { font-size: 15px; font-weight: 600; }
.chc__row small { font-size: 13px; color: var(--ink-3); }
.chc__test { background: var(--saffron-tint); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font: var(--t-small); color: var(--ink); }
.chc__test code { font: 700 15px/1 var(--font); direction: ltr; unicode-bidi: isolate; background: var(--card); padding: 3px 8px; border-radius: 8px; }
.chc__gate { display: flex; gap: 8px; }
.chc__gate .input { min-height: 44px; direction: ltr; text-align: right; }
.chc__link { align-self: flex-start; min-height: 40px; color: var(--ink-2); font: 500 14px/1 var(--font); text-decoration: underline; text-underline-offset: 3px; }
.chc__confirm { display: flex; flex-direction: column; gap: 10px; background: var(--alarm-tint); border-radius: 16px; padding: 12px 14px; font: var(--t-small); }
.chc__confirm .row .btn { flex: 1; }
.btn--alarm { background: var(--alarm); color: #fff; }
/* real Messenger / Instagram connect (28 Nov): the link shows dots while the browser goes to Facebook; the pick panel */
.chc__connect .typing { display: none; }
.chc__connect.is-loading .typing, .pk__go.is-loading .typing { display: inline-flex; }
.chc__link.chc__connect { display: inline-flex; align-items: center; gap: 6px; }
.chc__link.chc__connect.is-loading > :not(.typing) { display: none; }
.pk__go .typing { display: none; }
#connectBox:empty { display: none; }
.cnx__x { width: 40px; height: 40px; background: transparent; color: inherit; margin-inline-start: auto; }
.pk { box-shadow: inset 0 0 0 2px var(--saffron); }
.pk__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pk__item { display: flex; align-items: center; gap: 12px; background: var(--card-2); border-radius: 16px; padding: 10px 12px; min-height: 64px; }
.pk__item .ava { width: 40px; height: 40px; font-size: 15px; }
.pk__item.is-off .ava { filter: grayscale(1); opacity: .6; }
.pk__what { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.pk__what b { font-size: 15px; font-weight: 600; text-align: right; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pk__what small { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.pk__item.is-off .pk__what b { color: var(--ink-2); }
.pk__what .pk__why { color: var(--ink-2); }
.pk__go { flex: none; min-height: 44px; padding: 0 18px; }
.pk__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chc__broken { display: flex; flex-direction: column; gap: 10px; background: var(--alarm-tint); color: var(--ink); border-radius: 16px; padding: 12px 14px; font: var(--t-small); }
.chc__broken-t { display: flex; align-items: center; gap: 6px; color: var(--alarm); }
.chc__broken-t b { font-size: 15px; font-weight: 600; }
.chc.is-new { animation: chc-new 1.6s var(--ease-out) 1; }
@keyframes chc-new { 0%, 40% { box-shadow: inset 0 0 0 2px var(--saffron); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
@media (prefers-reduced-motion: reduce) { .chc.is-new { animation: none; box-shadow: inset 0 0 0 2px var(--saffron); } }
.devbox { border: 2px dashed var(--line-input); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; font: var(--t-small); }
.devbox b { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .pill--live i { animation: none; } }

/* ---------- saved answers ---------- */
.ans { display: flex; flex-direction: column; gap: var(--s4); padding-bottom: calc(var(--s8) + env(safe-area-inset-bottom)); }
.ans__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ans__item { background: var(--card); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.ans__item.is-off { opacity: .6; }
.ans__item .bubble { max-width: 88%; }
.ans__item .bubble--cust { margin-bottom: 2px; }
.ans__alt { align-self: flex-start; font-size: 12px; color: var(--ink-3); margin: -2px 6px 4px; }
.ans__meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.ans__meta .t-label { color: var(--ink-3); flex: 1; }
.ans__edit { min-height: 40px; padding: 0 6px; font: 600 14px/1 var(--font); color: var(--saffron-ink); }
.editor { background: var(--card); border-radius: var(--shape-bot-card); padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: inset 0 0 0 2px var(--ink); }
.editor textarea.input { min-height: 96px; padding: 12px 16px; line-height: 1.6; resize: vertical; }
.editor__prev { background: var(--card-2); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.editor__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.editor__acts .btn { flex: 1; }
.editor__del { align-self: center; min-height: 40px; color: var(--alarm); font: 600 14px/1 var(--font); }

/* ---------- alerts ---------- */
.alr { display: flex; flex-direction: column; gap: var(--s4); padding-bottom: calc(var(--s8) + env(safe-area-inset-bottom)); }
.alr__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.alr__item { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 20px; padding: 14px; transition: background-color .6s; }
.alr__item.is-unread { background: var(--saffron-tint); }
.alr__ico { width: 40px; height: 40px; flex: none; border-radius: 13px 13px 13px 4px; background: var(--card-2); color: var(--ink); display: grid; place-items: center; }
.alr__ico.is-low { background: var(--ember-tint); color: var(--ember-ink); }
.alr__ico.is-zero { background: var(--alarm-tint); color: var(--alarm); }
.alr__ico.is-ok { background: var(--leaf-tint); color: var(--leaf-ink); }
.alr__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.alr__text { font: 400 15px/1.6 var(--font); white-space: pre-line; }
.alr__item.is-unread .alr__text { font-weight: 500; }
.alr__meta { font-size: 12px; color: var(--ink-3); }
.alr__go { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; min-height: 32px; font: 600 13px/1 var(--font); color: var(--ink); text-decoration: none; }
.alr__go .ico { width: 16px; height: 16px; }
.alert .alr__go { flex: none; white-space: nowrap; align-self: center; }   /* a link at the end of an alert line (28 Nov) */
.alr__dot { width: 10px; height: 10px; flex: none; margin-top: 6px; border-radius: 50%; background: var(--alarm); }
.alr__steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; font: var(--t-small); color: var(--ink-2); }
.dash__bell { position: relative; }
.dash__bell .badge { top: 2px; inset-inline-end: 2px; }

/* ---------- progress track (set it up for me) ---------- */
.track { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }
.track li { position: relative; padding-inline-start: 30px; padding-block: 8px; font: var(--t-small); color: var(--ink-3); }
.track li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 12px; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-input); background: var(--card); }
.track li::after { content: ""; position: absolute; inset-inline-start: 10px; top: 28px; bottom: -10px; width: 2px; background: var(--line); }
.track li:last-child::after { display: none; }
.track li.done { color: var(--ink-2); } .track li.done::before { background: var(--ink); box-shadow: none; }
.track li.now { color: var(--ink); font-weight: 600; } .track li.now::before { background: var(--saffron); box-shadow: inset 0 0 0 2px #16161D; }

/* ---------- tab bar room ---------- */
body.has-tabbar main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body.has-tabbar main { padding-bottom: var(--s8); } }

.kpi-big { font: 700 34px/1.1 var(--font); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

.dash__bot { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.dash__bot b { font-size: 16px; font-weight: 600; }

.cv__limited { align-self: flex-start; margin: -2px 6px 6px; font: 500 11px/1.4 var(--font); color: var(--ember-ink); }

/* loading placeholders (never a real-looking value before the data arrives) */
.sk--dark { background: rgba(255, 255, 255, .12); }
.sk--num { display: inline-block; width: 170px; height: 50px; border-radius: 14px; vertical-align: middle; }
.sk--tile { min-height: 92px; border-radius: 20px; }

.tu__loader { width: 96px; height: 96px; display: block; }
