:root {
  --bg: #f4f7f7;
  --surface: #ffffff;
  --surface-2: #e9efef;
  --text: #10201f;
  --muted: #5d6f6e;
  --accent: #0e8f84;
  --accent-ink: #ffffff;
  --out: #b4372f;
  --in: #1d7f3f;
  --warn: #b07a00;
  --border: #d5dfde;
  --chart: #0e8f84;   /* validated vs #ffffff: dataviz check, light */
  /* Categorical slots 1–3 (dataviz reference palette) + de-emphasis gray, light */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --deemph: #898781;
  /* Status: always paired with an icon + label, never color alone */
  --good: #0ca30c; --warning: #fab219; --critical: #d03b3b;
  --grid: #e3eaea;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1d20;
    --surface: #12292c;
    --surface-2: #1a3538;
    --text: #e6f3f1;
    --muted: #8fb0ac;
    --accent: #1fcfbf;
    --accent-ink: #032a2e;
    --out: #ff8a80;
    --in: #7ee2a0;
    --warn: #f5c211;
    --border: #23464a;
    --chart: #15a698; /* validated vs #12292c: dataviz check, dark */
    --s1: #3987e5; --s2: #d95926; --s3: #199e70;
    --grid: #1f3b3e;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; width: 100%;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.9rem; }
.row { display: flex; gap: 8px; align-items: center; }
.between { justify-content: space-between; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; }
.top h1 { font-size: 1.25rem; margin: 0; color: var(--accent); letter-spacing: 0.2px; }
.ghost { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }

main { padding: 0 16px; max-width: 520px; margin: 0 auto; }
.tab { display: none; }
.tab.active { display: block; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.chip { padding: 7px 12px; border-radius: 999px; background: var(--surface-2); font-size: 0.85rem; font-weight: 600; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.amount { text-align: center; font-size: 3rem; font-weight: 700; margin: 14px 0 8px; font-variant-numeric: tabular-nums; }
.amount small { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.amount.empty #amountValue { color: var(--muted); }

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button {
  height: 54px; border-radius: var(--radius); background: var(--surface); font-size: 1.4rem; font-weight: 600;
  border: 1px solid var(--border); font-variant-numeric: tabular-nums;
}
.pad button:active { background: var(--surface-2); }

.hint { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 14px 0 8px; }
.tags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tag {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 74px;
}
.tag .e { font-size: 1.4rem; }
.tag .n { font-size: 0.82rem; font-weight: 600; text-align: center; }
.tag .l { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tag:active { background: var(--accent); color: var(--accent-ink); }
.tag:active .l { color: inherit; }

.wide { display: block; width: 100%; padding: 13px; border-radius: var(--radius); font-weight: 600; margin: 14px 0; }
.primary { background: var(--accent); color: var(--accent-ink); }
.secondary { background: var(--surface-2); }
.danger { background: transparent; color: var(--out); border: 1px solid var(--out); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 8px 0; }
.big { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.day { color: var(--muted); font-size: 0.8rem; font-weight: 600; margin: 16px 2px 6px; text-transform: uppercase; letter-spacing: .4px; }
.tx { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 6px; width: 100%; text-align: start; }
.tx .e { font-size: 1.3rem; width: 30px; text-align: center; }
.tx .mid { flex: 1; min-width: 0; }
.tx .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .s { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .a { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.a.out { color: var(--out); } .a.in { color: var(--in); } .a.move { color: var(--muted); }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--warn); color: #111; margin-inline-start: 6px; vertical-align: middle; }
.review-banner { background: var(--surface); border: 1px solid var(--warn); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; font-size: 0.9rem; }

.env { margin-bottom: 10px; }
.env .row { justify-content: space-between; font-size: 0.92rem; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar i.over { background: var(--out); }

.acct .row { justify-content: space-between; }
.acct .name { font-weight: 600; }
.acct .bal { font-weight: 700; font-variant-numeric: tabular-nums; }
.acct .actions { margin-top: 8px; display: flex; gap: 8px; }
.acct .actions button { padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 0.85rem; font-weight: 600; }

.tabs {
  position: fixed; inset-inline: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.tabs button { padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); position: relative; }
.tabs button span { font-size: 1.2rem; line-height: 1; }
.tabs button b { font-size: 0.72rem; font-weight: 600; }
.tabs button.on { color: var(--accent); }
.dot { position: absolute; top: 6px; inset-inline-start: 55%; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 10; }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 11; background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 86vh; overflow-y: auto;
  max-width: 560px; margin: 0 auto;
}
.sheet h2 { margin: 0 0 12px; font-size: 1.1rem; }
.sheet label { display: block; font-size: 0.85rem; color: var(--muted); margin: 10px 0 4px; }
.sheet .cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sheet .cats button { background: var(--surface-2); border-radius: 10px; padding: 10px 4px; font-size: 0.8rem; }
.sheet .cats button.on { background: var(--accent); color: var(--accent-ink); }
.sheet .opt { display: block; width: 100%; text-align: start; padding: 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 6px; font-weight: 600; }

.toast {
  position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); inset-inline: 16px; z-index: 20; max-width: 488px; margin: 0 auto;
  background: var(--text); color: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 0.92rem;
}
.toast button { color: var(--accent); font-weight: 700; }
@media (prefers-color-scheme: dark) { .toast button { color: #0e8f84; } }

/* Home */
.filters { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0 10px; }
.stepper { display: flex; align-items: center; gap: 4px; font-size: 0.88rem; font-weight: 600; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); font-size: 1.1rem; }
.stepper button:disabled { opacity: .35; }
.hero { padding: 14px 16px; }
.hero .label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.hero .value { font-size: 3rem; font-weight: 700; line-height: 1.1; margin: 2px 0; }
.hero .value small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.delta { font-size: 0.85rem; font-weight: 600; }
.delta.up { color: var(--out); } .delta.down { color: var(--in); } .delta.flat { color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.kpi .label { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.kpi .value { font-size: 1.05rem; font-weight: 700; margin-top: 2px; }
.card h3 { margin: 0 0 10px; font-size: 0.95rem; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart .axis.today { fill: var(--text); font-weight: 700; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .bar { fill: var(--chart); }
.chart .hit { fill: transparent; cursor: pointer; outline: none; }
.chart .hit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chart .bar.on { opacity: .75; }
.tip { position: absolute; transform: translate(-50%, -100%); background: var(--text); color: var(--bg); padding: 6px 9px; border-radius: 8px;
       font-size: 0.78rem; pointer-events: none; white-space: nowrap; }
.tip b { display: block; font-size: 0.9rem; }
.cat-row { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; margin-bottom: 10px; }
.cat-row .name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-row .val { font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.cat-row .val span { color: var(--muted); font-weight: 600; margin-inline-start: 4px; }
.cat-row .track { grid-column: 2 / 4; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.cat-row .track i { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
[dir="rtl"] .cat-row .track i { border-radius: 4px 0 0 4px; }
details.table { margin-top: 8px; font-size: 0.82rem; }
details.table summary { color: var(--muted); cursor: pointer; }
details.table table { width: 100%; border-collapse: collapse; margin-top: 6px; }
details.table td { padding: 4px 2px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
details.table td:last-child { text-align: end; }
.env-head { display: flex; align-items: center; gap: 8px; }
.env-icon { font-size: 1.3rem; width: 1.8rem; text-align: center; }
.icon-btn { font-size: 1.3rem; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); flex: none; }
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 6px 0 4px; }
.icon-grid button { font-size: 1.25rem; padding: 6px 0; border-radius: 8px; }
.icon-grid button.on { background: var(--accent); }
.limit-row { display: flex; gap: 8px; align-items: center; }

/* Dashboard */
h2.section { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 22px 2px 6px; }
.payday { color: var(--muted); font-size: 0.85rem; margin: 2px 2px 8px; }
.payday b { color: var(--text); }
.ots .value { font-size: 3rem; font-weight: 700; line-height: 1.1; margin: 2px 0; }
.ots .value small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.ots .value.neg { color: var(--critical); }
.ots .sub { color: var(--muted); font-size: 0.88rem; }
.pace { margin-top: 14px; }
.pace .track { position: relative; height: 10px; background: var(--surface-2); border-radius: 99px; }
.pace .fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; }
.pace .fill.onTrack { background: var(--good); } .pace .fill.fast { background: var(--warning); } .pace .fill.over { background: var(--critical); }
.pace .marker { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 2px; }
.pace .caption { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.78rem; margin-top: 8px; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 700; margin-top: 8px; }
.status i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.7rem; color: #fff; }
.status.onTrack i { background: var(--good); } .status.fast i { background: var(--warning); color: #111; } .status.over i { background: var(--critical); }
.bill { display: flex; align-items: center; gap: 10px; }
.bill .e { font-size: 1.4rem; }
.bill .mid { flex: 1; min-width: 0; }
.bill .t { font-weight: 600; }
.bill .s { color: var(--muted); font-size: 0.82rem; }
.bill .s.soon { color: var(--text); font-weight: 600; }
.bill button { padding: 7px 10px; border-radius: 10px; background: var(--surface-2); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.bill + .bill { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--grid); }
.chart .bar.deemph { fill: var(--deemph); opacity: .55; }
.chart .peak { fill: var(--text); font-size: 10px; font-weight: 700; }
.split { display: flex; gap: 2px; height: 14px; border-radius: 99px; overflow: hidden; margin: 4px 0 12px; }
.split span { display: block; height: 100%; }
.legend { display: grid; gap: 7px; }
.legend .item { display: grid; grid-template-columns: 10px 1.4rem minmax(0,1fr) auto; gap: 6px; align-items: center; font-size: 0.88rem; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend .pct { font-variant-numeric: tabular-nums; font-weight: 700; }
.legend .pct span { color: var(--muted); font-weight: 600; margin-inline-start: 6px; }
.merchant { display: flex; align-items: center; gap: 10px; }
.merchant + .merchant { margin-top: 10px; }
.badge-m { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 0.8rem;
           background: var(--surface-2); color: var(--text); flex: none; letter-spacing: .3px; }
.merchant .mid { flex: 1; min-width: 0; }
.merchant .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merchant .s { color: var(--muted); font-size: 0.8rem; }
.merchant .a { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Themes. "Auto" (no data-theme) follows the phone's light/dark setting with the teal
   defaults above. Each named theme fixes its own colors. Chart colors (--chart, --s1..3)
   are checked against each theme's surface with the dataviz validator. */
:root[data-theme="teal-day"] {
  --bg: #f4f7f7; --surface: #ffffff; --surface-2: #e9efef; --text: #10201f; --muted: #5d6f6e;
  --accent: #0e8f84; --accent-ink: #ffffff; --out: #b4372f; --in: #1d7f3f; --warn: #b07a00; --border: #d5dfde;
  --chart: #0e8f84; --grid: #e3eaea; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
}
:root[data-theme="teal-night"] {
  --bg: #0b1d20; --surface: #12292c; --surface-2: #1a3538; --text: #e6f3f1; --muted: #8fb0ac;
  --accent: #1fcfbf; --accent-ink: #032a2e; --out: #ff8a80; --in: #7ee2a0; --warn: #f5c211; --border: #23464a;
  --chart: #15a698; --grid: #1f3b3e; --s1: #3987e5; --s2: #d95926; --s3: #199e70;
}
:root[data-theme="pearl"] {
  --bg: #eef3f9; --surface: #ffffff; --surface-2: #e3eaf3; --text: #0f1d2e; --muted: #56677d;
  --accent: #1f63c6; --accent-ink: #ffffff; --out: #b4372f; --in: #1d7f3f; --warn: #b07a00; --border: #d2dcea;
  --chart: #1f63c6; --grid: #e2e9f2; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
}
:root[data-theme="desert"] {
  --bg: #f5efe6; --surface: #fffbf5; --surface-2: #eee3d3; --text: #2b2118; --muted: #76654f;
  --accent: #a8571c; --accent-ink: #ffffff; --out: #a8322b; --in: #2f7a3a; --warn: #9a6a00; --border: #e2d3bf;
  --chart: #a8571c; --grid: #ebe0d0; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
}
:root[data-theme="rose"] {
  --bg: #f9f1f4; --surface: #ffffff; --surface-2: #f2e2e9; --text: #2a1620; --muted: #7a5868;
  --accent: #b83a66; --accent-ink: #ffffff; --out: #a8322b; --in: #1d7f3f; --warn: #9a6a00; --border: #ead3dd;
  --chart: #b83a66; --grid: #f0e2e8; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
}
:root[data-theme="midnight-gold"] {
  --bg: #0c1424; --surface: #131e33; --surface-2: #1b2942; --text: #eef2f8; --muted: #9aa8bf;
  --accent: #e3b04b; --accent-ink: #1a1300; --out: #ff8a80; --in: #7ee2a0; --warn: #f5c211; --border: #26375a;
  --chart: #bb8a2f; --grid: #1f2c45; --s1: #3987e5; --s2: #d95926; --s3: #199e70;
}
:root[data-theme="palm"] {
  --bg: #0d1a14; --surface: #13241c; --surface-2: #1b3127; --text: #e8f4ee; --muted: #94b3a4;
  --accent: #4cc38a; --accent-ink: #062114; --out: #ff8a80; --in: #9be8bd; --warn: #f5c211; --border: #244636;
  --chart: #3aa874; --grid: #1d3529; --s1: #3987e5; --s2: #d95926; --s3: #199e70;
}
/* Light themes keep the toast readable. */
:root[data-theme="teal-day"] .toast button, :root[data-theme="pearl"] .toast button,
:root[data-theme="desert"] .toast button, :root[data-theme="rose"] .toast button { color: var(--accent); }
:root[data-theme="teal-day"], :root[data-theme="pearl"], :root[data-theme="desert"], :root[data-theme="rose"] { color-scheme: light; }
:root[data-theme="teal-night"], :root[data-theme="midnight-gold"], :root[data-theme="palm"] { color-scheme: dark; }

.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0 4px; }
.theme-opt { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2);
             border: 2px solid transparent; font-weight: 600; font-size: 0.85rem; text-align: start; }
.theme-opt.on { border-color: var(--accent); }
.theme-opt .dots { display: flex; flex: none; }
.theme-opt .dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface-2); margin-inline-end: -5px; }
:root[data-theme="teal-night"] .toast button, :root[data-theme="midnight-gold"] .toast button,
:root[data-theme="palm"] .toast button { color: var(--accent-ink); }
.sheet label.opt { font-size: inherit; color: var(--text); margin: 0 0 6px; cursor: pointer; }

/* Official brand logos: on a white tile so each logo shows as designed, in every theme. */
img.logo { background: #fff; border-radius: 10px; object-fit: contain; padding: 3px; flex: none; }
img.badge-m { width: 36px; height: 36px; }
img.bill-logo, img.tx-logo { width: 32px; height: 32px; }
img.tag-logo { width: 30px; height: 30px; border-radius: 8px; }
img.acct-logo { width: 38px; height: 38px; }
.acct-head { display: flex; align-items: center; gap: 10px; }
.acct-icon { font-size: 1.5rem; width: 38px; text-align: center; }

/* First-run setup */
body.ob-open { overflow: hidden; }
.ob { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; display: flex; flex-direction: column;
      padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
.ob > * { width: 100%; max-width: 520px; margin-inline: auto; }
.ob-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ob-progress { display: flex; gap: 4px; flex: 1; }
.ob-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-2); }
.ob-progress i.on { background: var(--accent); }
.ob-body { flex: 1; padding: 10px 0 20px; }
.ob-body h1 { font-size: 1.5rem; margin: 6px 0 6px; }
.ob-h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.ob-hero { font-size: 2.6rem; margin-top: 10px; }
.ob-body label { display: block; font-size: 0.85rem; color: var(--muted); margin: 12px 0 4px; }
.small { font-size: 0.8rem; }
.ob-langs { display: flex; gap: 8px; flex-wrap: wrap; }
.ob-langs button { flex: 1; padding: 12px; border-radius: 12px; background: var(--surface-2); font-weight: 700; border: 2px solid transparent;
                   display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ob-langs button.on { border-color: var(--accent); }
.ob-points { padding-inline-start: 20px; line-height: 1.55; }
.ob-banks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ob-bank { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px;
           background: var(--surface); border: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; }
.ob-bank img.logo { width: 34px; height: 34px; }
.ob-bank-e { font-size: 1.6rem; line-height: 34px; }
.ob-acc label { margin-top: 8px; }
.ob-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
img.inline-logo { width: 22px; height: 22px; vertical-align: middle; padding: 1px; border-radius: 5px; }
.ob-total { margin-top: 14px; }
.ob-warn { color: var(--critical); font-weight: 700; margin-top: 4px; }
.ob-copy { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.ob-copy code { flex: 1; font-size: 0.78rem; word-break: break-all; }
.ob-copy button { padding: 6px 10px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.ob-guide { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.ob-guide summary { font-weight: 700; cursor: pointer; }
.ob-steps { padding-inline-start: 22px; line-height: 1.5; font-size: 0.9rem; }
.ob-steps li { margin: 6px 0; }
.ob-note { font-size: 0.82rem; color: var(--muted); border-inline-start: 3px solid var(--warning); padding-inline-start: 8px; }
.ob-nav { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; position: sticky; bottom: 0;
          background: var(--bg); padding-top: 10px; }
.ob-nav button { padding: 13px 18px; border-radius: var(--radius); font-weight: 700; }
.ob-nav .ghost-btn { color: var(--muted); justify-self: end; }
button.link { color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.ob-privacy { font-size: 0.88rem; line-height: 1.5; margin-top: 16px; }
.ob-sms-head { font-weight: 800; margin-bottom: 2px; }
.ob-sms .ob-steps a { color: var(--accent); }
.ob-consent { display: flex !important; gap: 10px; align-items: flex-start; margin-top: 14px !important; font-size: 0.82rem !important;
              color: var(--text) !important; line-height: 1.45; cursor: pointer; padding: 10px; border-radius: 12px; border: 1px solid var(--border); }
.ob-consent input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--accent); }
.ob-consent.need { border-color: var(--critical); }
.ob-nav button:disabled { opacity: .45; }

/* Prioritised Home: action items and recent transactions. */
.attention { border-color: var(--warn); }
.att-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 8px 0; background: none; border: 0; color: inherit; font: inherit; }
.att-item + .att-item { border-top: 1px solid var(--border); }
.att-item .e { width: 24px; text-align: center; }
.att-item .mid { flex: 1; }
.att-item .chev { color: var(--muted); font-size: 1.2rem; }
.recent h3 { margin: 0; }
.recent .row.between { margin-bottom: 8px; }
.recent .tx { background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; margin: 0; padding: 10px 0; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; padding: 4px 0; }
