/* Allowance app styles, shared by prototype.html (phone) and desktop.html.

   KINETIC tokens and components first, taken from
   /portfolio/design-systems/kinetic/system/ as they stand there. Only the ramps
   and components this app uses are carried. What Allowance adds follows, and is
   built from these tokens. */
:root {
    --ramp-white: #ffffff;
    --ramp-brand-300: #8aabe6;
    --ramp-brand-400: #5b84d6;
    --ramp-brand-700: #293f83;
    --ramp-cyan-50: #e4fbff;
    --ramp-cyan-300: #3dd6f7;
    --ramp-cyan-400: #16bde6;
    --ramp-cyan-500: #059ec4;
    --ramp-cyan-600: #0a7ea0;
    --ramp-cyan-700: #12657f;
    --ramp-mint-400: #22c98a;
    --ramp-mint-700: #0a6d4c;
    --ramp-green-700: #0a6d4c;
    --ramp-amber-400: #f5ab1f;
    --ramp-amber-700: #8f5606;
    --ramp-red-400: #f65069;
    --ramp-red-600: #c31533;
    --ramp-blue-700: #293f83;
    --ramp-violet-300: #c4b5fd;
    --ramp-violet-700: #6d28d9;
}
:root {
    color-scheme: light;
    --sys-color-bg-canvas: #f5f8fd;
    --sys-color-surface: var(--ramp-white);
    --sys-color-surface-raised: var(--ramp-white);
    --sys-color-surface-sunken: #eef3fb;
    --sys-color-surface-hover: rgba(12, 21, 38, .04);
    --sys-color-surface-selected: rgba(47, 78, 166, .08);
    --sys-color-border: rgba(12, 21, 38, .08);
    --sys-color-border-strong: rgba(12, 21, 38, .16);
    --sys-color-border-focus: var(--ramp-cyan-500);
    --sys-color-text-primary: #0a1020;
    --sys-color-text-secondary: #252e40;
    --sys-color-text-tertiary: #3d4759;
    --sys-color-accent: #05cf82;
    --sys-color-accent-text: var(--ramp-cyan-700);
    --sys-color-accent-soft: var(--ramp-cyan-50);
    --sys-color-accent-solid: #007a3c;
    --sys-color-accent-solid-lift: #008942;
    --sys-color-text-on-accent-solid: #ffffff;
    --sys-color-spark: var(--ramp-cyan-600);
    --sys-color-spark-fill: var(--ramp-cyan-400);
    --sys-color-pos: var(--ramp-mint-700);
    --sys-color-neg: #0c1526;
    --sys-status-cleared-fg: var(--ramp-green-700);
    --sys-status-cleared-bg: rgba(15, 167, 113, .12);
    --sys-status-cleared-bd: rgba(15, 167, 113, .30);
    --sys-status-pending-fg: var(--ramp-amber-700);
    --sys-status-pending-bg: rgba(217, 138, 10, .14);
    --sys-status-pending-bd: rgba(217, 138, 10, .32);
    --sys-status-scheduled-fg: var(--ramp-blue-700);
    --sys-status-scheduled-bg: rgba(47, 78, 166, .10);
    --sys-status-scheduled-bd: rgba(47, 78, 166, .26);
    --sys-status-declined-fg: var(--ramp-red-600);
    --sys-status-declined-bg: rgba(229, 36, 63, .10);
    --sys-status-declined-bd: rgba(229, 36, 63, .26);
    --sys-status-refunded-fg: #5c6880;
    --sys-status-refunded-bg: rgba(12, 21, 38, .05);
    --sys-status-refunded-bd: rgba(12, 21, 38, .13);
    --sys-shadow-xs: 0 1px 2px rgba(20, 24, 33, .05);
    --sys-shadow-sm: 0 1px 2px rgba(20, 24, 33, .05), 0 2px 6px rgba(20, 24, 33, .04);
    --sys-shadow-lg: 0 24px 48px -16px rgba(20, 24, 33, .20), 0 4px 12px rgba(20, 24, 33, .06);
    --sys-shadow-xl: 0 36px 72px -24px rgba(30, 27, 90, .28);
    --sys-shadow-brand: 0 12px 28px -10px rgba(79, 70, 229, .45);
    --sys-radius-sm: 10px;
    --sys-radius-md: 14px;
    --sys-radius-lg: 18px;
    --sys-radius-xl: 24px;
    --sys-radius-pill: 999px;
    --sys-focus-ring-default: 0 0 0 2px var(--sys-color-surface), 0 0 0 4px var(--sys-color-border-focus);
    --sys-font-sans: var(--wr-family-body, "Inter WR", ui-sans-serif, system-ui, sans-serif);
    --sys-font-display: var(--wr-family-display, "Signika Negative WR", ui-sans-serif, system-ui, sans-serif);
    --sys-font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --sys-text-heading: 23px;
    --sys-text-sm: 16px;
    --sys-text-caption: 15px;
    --sys-text-label: 14px;
    --sys-text-micro: 13px;
    --sys-text-product: 13px;
    --sys-tracking-snug: -0.02em;
    --sys-space-1: 4px;
    --sys-space-2: 8px;
    --sys-space-3: 12px;
    --sys-space-4: 16px;
    --sys-space-5: 20px;
    --sys-space-6: 24px;
    --sys-container-product: 402px;
    --sys-weight-medium: 500;
    --sys-weight-semibold: 600;
    --sys-weight-bold: 700;
    --sys-duration-fast: 140ms;
    --sys-duration-base: 220ms;
    --sys-ease-standard: cubic-bezier(.2, .8, .2, 1);
    --sys-ease-emphasized: cubic-bezier(.2, .9, .1, 1);
    --sys-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --sys-motion-scale: 1;
    --sys-dur-fast: calc(var(--sys-duration-fast) * var(--sys-motion-scale));
    --sys-dur-base: calc(var(--sys-duration-base) * var(--sys-motion-scale));
    --sys-gradient-velocity: linear-gradient(96deg, var(--sys-color-accent) 0%, var(--sys-color-spark-fill) 62%, var(--sys-color-accent) 100%);
    --sys-gradient-command: linear-gradient(96deg, var(--sys-color-accent-solid) 0%, var(--sys-color-accent-solid-lift) 62%, var(--sys-color-accent-solid) 100%);
    --sys-rule-charge: 2px;
}
.dark {
    color-scheme: dark;
    --sys-color-bg-canvas: #0b1017;
    --sys-color-surface: #141d2e;
    --sys-color-surface-raised: #1e2a40;
    --sys-color-surface-sunken: #0e1521;
    --sys-color-surface-hover: rgba(255, 255, 255, .045);
    --sys-color-surface-selected: rgba(61, 99, 192, .20);
    --sys-color-border: rgba(255, 255, 255, .09);
    --sys-color-border-strong: rgba(255, 255, 255, .16);
    --sys-color-border-focus: var(--ramp-cyan-400);
    --sys-color-text-primary: #f6f9fe;
    --sys-color-text-secondary: #d5deee;
    --sys-color-text-tertiary: #b0bcd1;
    --sys-color-accent-text: var(--ramp-cyan-300);
    --sys-color-accent-soft: rgba(61, 214, 247, .12);
    --sys-color-spark: var(--ramp-cyan-300);
    --sys-color-spark-fill: var(--ramp-cyan-300);
    --sys-color-pos: var(--ramp-mint-400);
    --sys-color-neg: #eef2f9;
    --sys-status-cleared-fg: var(--ramp-mint-400);
    --sys-status-cleared-bg: rgba(34, 201, 138, .16);
    --sys-status-cleared-bd: rgba(34, 201, 138, .34);
    --sys-status-pending-fg: var(--ramp-amber-400);
    --sys-status-pending-bg: rgba(245, 171, 31, .16);
    --sys-status-pending-bd: rgba(245, 171, 31, .36);
    --sys-status-scheduled-fg: var(--ramp-brand-300);
    --sys-status-scheduled-bg: rgba(138, 171, 230, .16);
    --sys-status-scheduled-bd: rgba(138, 171, 230, .34);
    --sys-status-declined-fg: var(--ramp-red-400);
    --sys-status-declined-bg: rgba(246, 80, 105, .16);
    --sys-status-declined-bd: rgba(246, 80, 105, .34);
    --sys-status-refunded-fg: #aab6cc;
    --sys-status-refunded-bg: rgba(255, 255, 255, .06);
    --sys-status-refunded-bd: rgba(255, 255, 255, .14);
    --sys-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --sys-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 6px rgba(0, 0, 0, .3);
    --sys-shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .45);
    --sys-shadow-xl: 0 36px 72px -24px rgba(0, 0, 0, .7);
    --sys-shadow-brand: 0 12px 28px -10px rgba(128, 132, 255, .5);
}
@media (prefers-reduced-motion: reduce) { :root { --sys-motion-scale: 0; } }

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body {
    margin: 0;
    font-family: var(--sys-font-sans);
    color: var(--sys-color-text-primary);
    background: var(--sys-color-bg-canvas);
    -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit }
:focus-visible { outline: none; box-shadow: var(--sys-focus-ring-default) }
.mono { font-family: var(--sys-font-mono); font-variant-numeric: tabular-nums }

.card {
    position: relative;
    background: var(--sys-color-surface);
    border: 1px solid var(--sys-color-border);
    border-radius: var(--sys-radius-lg);
    box-shadow: var(--sys-shadow-sm)
}
.card::before {
    content: "";
    position: absolute;
    left: var(--sys-radius-lg);
    right: var(--sys-radius-lg);
    top: -1px;
    height: var(--sys-rule-charge);
    border-radius: 0 0 999px 999px;
    background: var(--sys-gradient-velocity);
    opacity: .22;
    pointer-events: none
}
.card-pad-sm { padding: var(--sys-space-4) }
.divider { height: 1px; background: var(--sys-color-border); border: 0; margin: 0 }

.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: var(--sys-weight-semibold);
    font-size: 15px;
    line-height: 1;
    padding: 12px 18px;
    border-radius: var(--sys-radius-pill);
    border: 1px solid var(--sys-color-border-strong);
    background: var(--sys-color-surface);
    color: var(--sys-color-text-primary);
    transition: border-color var(--sys-dur-fast) var(--sys-ease-standard),
                background var(--sys-dur-fast) var(--sys-ease-standard),
                color var(--sys-dur-fast) var(--sys-ease-standard),
                transform var(--sys-dur-fast) var(--sys-ease-spring);
    white-space: nowrap
}
.btn:hover { border-color: var(--sys-color-text-tertiary); transform: translateY(-1px) }
.btn:active { transform: translateY(0) }
.btn svg { width: 17px; height: 17px }
.btn--sm { padding: 9px 14px; font-size: 14px }
.btn--primary {
    background: var(--sys-gradient-command);
    background-size: 200% 100%;
    background-position: 40% 0;
    border-color: transparent;
    color: var(--sys-color-text-on-accent-solid);
    box-shadow: var(--sys-shadow-brand)
}
.btn--primary:hover { background-position: 0 0; border-color: transparent }
.btn--ghost { background: transparent; border-color: transparent; color: var(--sys-color-text-secondary) }
.btn--ghost:hover { background: var(--sys-color-surface-hover); border-color: transparent; color: var(--sys-color-text-primary) }
.btn--danger {
    color: var(--sys-status-declined-fg);
    border-color: color-mix(in srgb, var(--sys-status-declined-fg) 34%, transparent);
    background: var(--sys-color-surface)
}
.btn--danger:hover { color: var(--sys-color-text-on-accent-solid); border-color: transparent; background: var(--sys-status-declined-fg) }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: var(--sys-weight-bold);
    padding: 2px 9px 2px 7px;
    border-radius: var(--sys-radius-pill);
    border: 1px solid transparent;
    line-height: 1.4;
    white-space: nowrap
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85 }
.pill.cleared { color: var(--sys-status-cleared-fg); background: var(--sys-status-cleared-bg); border-color: var(--sys-status-cleared-bd) }
.pill.pending { color: var(--sys-status-pending-fg); background: var(--sys-status-pending-bg); border-color: var(--sys-status-pending-bd) }
.pill.scheduled { color: var(--sys-status-scheduled-fg); background: var(--sys-status-scheduled-bg); border-color: var(--sys-status-scheduled-bd) }
.pill.declined { color: var(--sys-status-declined-fg); background: var(--sys-status-declined-bg); border-color: var(--sys-status-declined-bd) }
.pill.refunded { color: var(--sys-status-refunded-fg); background: var(--sys-status-refunded-bg); border-color: var(--sys-status-refunded-bd) }

.toggle {
    position: relative;
    width: 44px;
    height: 26px;
    border-radius: var(--sys-radius-pill);
    background: var(--sys-color-border-strong);
    cursor: pointer;
    transition: .18s;
    flex-shrink: 0;
    border: 0
}
.toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: .18s;
    box-shadow: var(--sys-shadow-xs)
}
.toggle[aria-checked="true"] { background: var(--sys-color-accent-solid) }
.toggle[aria-checked="true"]::after { transform: translateX(18px) }

.phone {
    --phone-bezel: 12px;
    width: calc(var(--sys-container-product) + var(--phone-bezel) * 2);
    max-width: 100%;
    margin: 0 auto;
    border-radius: 50px;
    padding: var(--phone-bezel);
    background: linear-gradient(150deg, #23283a, #0e1119);
    box-shadow: var(--sys-shadow-xl);
    position: relative
}
.phone-scr {
    border-radius: 38px;
    overflow: hidden;
    font-size: var(--sys-text-product);
    background: var(--sys-color-bg-canvas);
    height: 780px;
    overflow-y: auto;
    scrollbar-width: none;
    position: relative;
    display: flex;
    flex-direction: column
}
.phone-scr::-webkit-scrollbar { display: none }
.phone-scr > * { flex: 0 0 auto }
.phone-scr > .app-bar { margin-top: auto }
.phone-notch {
    position: absolute;
    top: 21px;
    left: 50%;
    transform: translateX(-50%);
    width: 123px;
    height: 31px;
    border-radius: var(--sys-radius-pill);
    background: #0e1119;
    z-index: 5
}
.app-top {
    padding: 62px 18px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 0;
    background: var(--sys-color-bg-canvas);
    z-index: 3
}
.app-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    padding: 10px 8px 16px;
    background: color-mix(in srgb, var(--sys-color-surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--sys-color-border)
}
.app-bar .ab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: var(--sys-color-text-tertiary);
    font-weight: var(--sys-weight-semibold)
}
.app-bar .ab.on { color: var(--sys-color-accent-text) }
.app-bar .ab svg { width: 20px; height: 20px }

.act-list { list-style: none; margin: 0; padding: 0 }
.act-row {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid var(--sys-color-border);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background .12s ease
}
.act-list li:last-child .act-row { border-bottom: 0 }
.act-row:hover { background: var(--sys-color-surface-hover) }
.act-ava {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: var(--sys-weight-bold)
}
.act-ava svg { width: 16px; height: 16px }
.act-body { flex: 1; min-width: 0 }
.act-name { font-weight: var(--sys-weight-semibold); font-size: 14px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.act-sub { font-size: 12px; color: var(--sys-color-text-tertiary); margin-top: 2px; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden }
.act-right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px }
.act-amt { font-family: var(--sys-font-mono); font-weight: var(--sys-weight-semibold); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--sys-color-neg) }
.act-amt.pos { color: var(--sys-color-pos) }

.lm-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sys-space-2) }
.lm-track { height: 8px; border-radius: var(--sys-radius-pill); background: var(--sys-color-surface-sunken); border: 1px solid var(--sys-color-border); overflow: hidden }
.lm-fill { height: 100%; border-radius: inherit; background: var(--sys-gradient-velocity); transition: width var(--sys-dur-base) var(--sys-ease-emphasized) }
.lm-fill.is-near { background: var(--sys-status-pending-fg) }
.lm-foot { display: flex; justify-content: space-between; margin-top: var(--sys-space-2); font-size: 12px; color: var(--sys-color-text-tertiary) }

.ctrl-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--sys-space-3);
    padding: var(--sys-space-3) 0;
    border-bottom: 1px solid var(--sys-color-border)
}
.ctrl-row:last-child { border-bottom: 0 }
.ctrl-t { display: block; font-weight: var(--sys-weight-semibold); font-size: 14px }
.ctrl-d { display: block; font-size: 12px; font-weight: var(--sys-weight-medium); color: var(--sys-color-text-tertiary); margin-top: 1px }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--sys-radius-pill); background: var(--sys-color-surface-sunken); border: 1px solid var(--sys-color-border) }
.seg button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: var(--sys-weight-semibold);
    font-size: 14px;
    padding: 9px 16px;
    min-height: 40px;
    border-radius: var(--sys-radius-pill);
    color: var(--sys-color-text-tertiary)
}
.seg button[aria-pressed="true"] { background: var(--sys-color-surface); color: var(--sys-color-text-primary); box-shadow: var(--sys-shadow-xs) }

.tl { position: relative; padding-left: var(--sys-space-6) }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 10px; width: 2px; background: var(--sys-color-border) }
.tl-step { position: relative; padding-bottom: var(--sys-space-4) }
.tl-step:last-child { padding-bottom: 0 }
.tl-step::before {
    content: "";
    position: absolute;
    left: calc(var(--sys-space-6) * -1);
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--sys-color-surface);
    border: 2px solid var(--sys-color-border-strong)
}
.tl-step.is-done::before { background: var(--sys-color-accent-solid); border-color: var(--sys-color-accent-solid) }
.tl-step.is-now::before { border-color: var(--sys-color-accent-solid); box-shadow: 0 0 0 4px var(--sys-color-accent-soft) }
.tl-t { font-weight: var(--sys-weight-semibold); font-size: 14px }
.tl-d { font-size: 12px; font-weight: var(--sys-weight-medium); color: var(--sys-color-text-tertiary); margin-top: 2px }

/* ===========================================================
   ALLOWANCE additions, shared by the phone and the desktop.
   Everything here is built from the Kinetic tokens above.
   New to the system: the checks list, the account comparison,
   the invoice sheet, the Agent tag and the vendor chips.
   =========================================================== */
a { color: inherit }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
.scr-title { font-family: var(--sys-font-display); font-size: 22px; font-weight: var(--sys-weight-bold); line-height: 1.15; letter-spacing: var(--sys-tracking-snug); margin: 0 }
.scr-title:focus, .scr-title:focus-visible { outline: none; box-shadow: none }
.eyebrow { font-family: var(--sys-font-mono); font-size: 12px; font-weight: var(--sys-weight-medium); color: var(--sys-color-text-tertiary); margin: 0 0 6px }
.h3 { font-size: 15px; font-weight: var(--sys-weight-bold); margin: 0 }
.lede { font-size: 14px; line-height: 1.5; color: var(--sys-color-text-secondary); margin: 0 }
.note { font-size: 13px; line-height: 1.45; color: var(--sys-color-text-tertiary); margin: 0 }
.bal { font-family: var(--sys-font-display); font-size: 32px; font-weight: var(--sys-weight-bold); letter-spacing: var(--sys-tracking-snug); line-height: 1 }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.stack { display: flex; flex-direction: column; gap: 10px }
.btn { min-height: 44px; text-decoration: none }
.btn--block { width: 100%; white-space: normal; line-height: 1.25 }
.btn[disabled] { opacity: .62; cursor: not-allowed; transform: none }
.linkish { font-size: 14px; font-weight: var(--sys-weight-semibold); color: var(--sys-color-accent-text); text-decoration: none }
.linkish:hover { text-decoration: underline }

.tone-agent { background: var(--sys-status-scheduled-bg); color: var(--sys-status-scheduled-fg) }
.tone-own { background: var(--sys-color-surface-sunken); color: var(--sys-color-text-secondary) }
.tone-in { background: var(--sys-status-cleared-bg); color: var(--sys-color-pos) }
.tone-warn { background: var(--sys-status-pending-bg); color: var(--sys-status-pending-fg) }
.tone-bad { background: var(--sys-status-declined-bg); color: var(--sys-status-declined-fg) }
.tag {
    font-size: 11px;
    font-weight: var(--sys-weight-bold);
    padding: 0 6px;
    border-radius: 6px;
    line-height: 1.6;
    color: var(--sys-status-scheduled-fg);
    background: var(--sys-status-scheduled-bg);
    border: 1px solid var(--sys-status-scheduled-bd);
    flex-shrink: 0
}
.tag.warn { color: var(--sys-status-pending-fg); background: var(--sys-status-pending-bg); border-color: var(--sys-status-pending-bd) }

a.act-row { text-decoration: none; color: inherit }
/* The row's name is a span inside a link, and an inline box cannot be cut with an ellipsis. */
.act-name { display: block }
.act-right { max-width: 52% }
.act-row.is-on { background: var(--sys-color-surface-selected) }
.act-row .mini { flex-shrink: 0 }

.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 7px 0; border-bottom: 1px solid var(--sys-color-border) }
.kv:last-child { border-bottom: 0 }
.kv span:first-child { color: var(--sys-color-text-tertiary) }
.kv b { font-weight: var(--sys-weight-semibold); text-align: right }

/* The checks the agent ran on a bill. Each line carries an icon and words, so
   pass, heads-up and stop never rest on colour alone. */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px }
.ck { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; font-size: 14px; line-height: 1.4 }
.ck i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center }
.ck i svg { width: 13px; height: 13px }
.ck.ok i { background: var(--sys-status-cleared-bg); color: var(--sys-status-cleared-fg) }
.ck.warn i { background: var(--sys-status-pending-bg); color: var(--sys-status-pending-fg) }
.ck.bad i { background: var(--sys-status-declined-bg); color: var(--sys-status-declined-fg) }
.ck b { font-weight: var(--sys-weight-semibold) }
.ck small { display: block; font-size: 13px; color: var(--sys-color-text-tertiary) }

/* Old account and new account, side by side. The whole point of the stop. */
.accts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.acct { padding: 10px 12px; border-radius: var(--sys-radius-md); border: 1px solid var(--sys-color-border-strong); background: var(--sys-color-surface-sunken) }
.acct.is-new { border-color: var(--sys-status-declined-bd); background: var(--sys-status-declined-bg) }
.acct .eyebrow { margin-bottom: 3px }
.acct b { display: block; font-family: var(--sys-font-mono); font-size: 15px }
.acct small { display: block; font-size: 12px; color: var(--sys-color-text-tertiary); margin-top: 2px }

.alert { display: flex; gap: 11px; align-items: flex-start; border-color: var(--sys-status-pending-bd) }
.alert.is-bad { border-color: var(--sys-status-declined-bd) }
.alert .act-ava { margin-top: 1px }

.seg a { text-decoration: none; font-weight: var(--sys-weight-semibold); font-size: 13px; padding: 8px 12px; min-height: 36px; display: inline-flex; align-items: center; border-radius: var(--sys-radius-pill); color: var(--sys-color-text-tertiary) }
.seg a[aria-current="true"] { background: var(--sys-color-surface); color: var(--sys-color-text-primary); box-shadow: var(--sys-shadow-xs) }
.seg button { font-size: 14px }

.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip {
    border: 1px solid var(--sys-color-border-strong);
    background: var(--sys-color-surface);
    color: var(--sys-color-text-secondary);
    font-size: 14px;
    font-weight: var(--sys-weight-semibold);
    padding: 9px 14px;
    min-height: 40px;
    border-radius: var(--sys-radius-pill);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px
}
.chip svg { width: 14px; height: 14px; display: none }
.chip[aria-pressed="true"] { background: var(--sys-color-surface-selected); border-color: var(--sys-status-scheduled-bd); color: var(--sys-color-text-primary) }
.chip[aria-pressed="true"] svg { display: block }
.field-l { font-size: 14px; font-weight: var(--sys-weight-bold); margin: 0 0 8px }

.locks { list-style: none; margin: 0; padding: 0 }
.locks li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.4; padding: 8px 0; border-bottom: 1px solid var(--sys-color-border) }
.locks li:last-child { border-bottom: 0 }
.locks svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--sys-color-text-tertiary) }

.log { list-style: none; margin: 0; padding: 0 }
.log li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--sys-color-border); font-size: 14px; line-height: 1.4 }
.log li:last-child { border-bottom: 0 }
.log time { font-family: var(--sys-font-mono); font-size: 12px; color: var(--sys-color-text-tertiary); padding-top: 2px }
.log a { text-decoration: none }
.log a:hover { text-decoration: underline }

.check { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--sys-color-border-strong); border-radius: var(--sys-radius-md); font-size: 14px; font-weight: var(--sys-weight-semibold); line-height: 1.4; cursor: pointer }
.check input { width: 20px; height: 20px; accent-color: var(--sys-color-accent-solid); margin: 0; flex-shrink: 0 }
.check:has(input:checked) { background: var(--sys-color-surface-selected); border-color: var(--sys-status-scheduled-bd) }

/* The invoice as the vendor sent it: paper, whatever the theme. */
.invoice { background: #fff; color: #141821; border: 1px solid rgba(12, 21, 38, .16); border-radius: var(--sys-radius-sm); padding: 16px; font-size: 13px; line-height: 1.45 }
.invoice h3 { margin: 0 0 2px; font-size: 16px; font-family: var(--sys-font-display) }
.invoice .inv-kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(12, 21, 38, .1) }
.invoice .inv-kv b { font-family: var(--sys-font-mono); font-weight: 600 }
.invoice .inv-pay { margin-top: 12px; padding: 10px; border: 1px dashed rgba(12, 21, 38, .3); border-radius: 8px }
.invoice .inv-pay.is-new { border-color: #c31533; background: #fdeaed }
.invoice small { color: #515a6c }

.toast {
    position: absolute;
    z-index: 8;
    padding: 12px 14px;
    border-radius: var(--sys-radius-md);
    background: var(--sys-color-text-primary);
    color: var(--sys-color-bg-canvas);
    font-size: 14px;
    font-weight: var(--sys-weight-semibold);
    line-height: 1.35;
    box-shadow: var(--sys-shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px
}
.toast:empty { display: none }
.toast span { flex: 1 }
.toast button { border: 0; background: transparent; color: inherit; font-weight: var(--sys-weight-bold); text-decoration: underline; cursor: pointer; padding: 6px 4px; min-height: 32px }

.scrim { position: absolute; z-index: 9; background: rgba(8, 10, 15, .5); display: flex }
.scrim[hidden] { display: none }
.sheet { background: var(--sys-color-surface-raised); padding: 20px 16px 22px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; animation: up var(--sys-dur-base) var(--sys-ease-emphasized) }
@keyframes up { from { transform: translateY(24px); opacity: 0 } }
.empty { padding: 18px 12px; font-size: 14px; color: var(--sys-color-text-tertiary) }
.paused { opacity: .62 }

/* ===========================================================
   PHONE shell
   =========================================================== */
body[data-shell="phone"] { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 20px 12px 28px }
body[data-shell="phone"].bare { background: transparent; padding: 8px 0 }
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; max-width: 520px }
body.bare .steps { display: none }
.steps a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: 1px solid var(--sys-color-border-strong);
    background: var(--sys-color-surface);
    color: var(--sys-color-text-secondary);
    font-size: 14px;
    font-weight: var(--sys-weight-semibold);
    padding: 9px 14px;
    min-height: 40px;
    border-radius: var(--sys-radius-pill)
}
.steps a[aria-current="step"] { background: var(--sys-color-text-primary); color: var(--sys-color-bg-canvas); border-color: transparent }
.steps .n { font-family: var(--sys-font-mono); margin-right: 6px; opacity: .8 }

body[data-shell="phone"] .pad { padding: 0 14px 18px; display: flex; flex-direction: column; gap: 12px }
body[data-shell="phone"] .cols, body[data-shell="phone"] .col { display: contents }
.back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--sys-color-border-strong); background: var(--sys-color-surface); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; text-decoration: none }
.back svg { width: 18px; height: 18px }
.bell { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--sys-color-border-strong); background: var(--sys-color-surface); display: grid; place-items: center; flex-shrink: 0; text-decoration: none }
.bell svg { width: 18px; height: 18px }
.bell em { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sys-status-declined-fg); color: #fff; font-size: 11px; font-style: normal; font-weight: var(--sys-weight-bold); display: grid; place-items: center }
.app-bar a.ab { text-decoration: none; min-width: 56px; position: relative }
.app-bar .ab em { position: absolute; top: -4px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--sys-status-declined-fg); color: #fff; font-size: 10px; font-style: normal; display: grid; place-items: center }
body[data-shell="phone"] .toast { left: 24px; right: 24px; bottom: 92px }
body[data-shell="phone"] .scrim { inset: 12px; border-radius: 38px; overflow: hidden; align-items: flex-end }
body[data-shell="phone"] .sheet { width: 100%; max-height: 92%; border-radius: var(--sys-radius-xl) var(--sys-radius-xl) 0 0; font-size: var(--sys-text-product) }
.statusbar {
    position: absolute;
    top: var(--phone-bezel);
    left: calc(var(--phone-bezel) + 32px);
    right: calc(var(--phone-bezel) + 30px);
    height: 49px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    font-family: var(--sys-font-display);
    font-size: 16px;
    font-weight: var(--sys-weight-semibold);
    font-variant-numeric: tabular-nums;
    color: var(--sys-color-text-primary)
}
.statusbar .sb-r { display: flex; align-items: center; gap: 6px }
.statusbar svg { height: 13px; width: auto; display: block }
html[data-card-mode] body { flex-direction: row; min-height: 0 }

/* ===========================================================
   DESKTOP shell. The same screens, laid out for a wide window:
   a rail on the left, and lists that keep their detail beside
   them so nothing is opened and closed to work a queue.
   =========================================================== */
body[data-shell="desktop"] { height: 100vh; overflow: hidden; font-size: 15px }
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100vh; position: relative }
.side { display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; border-right: 1px solid var(--sys-color-border); background: var(--sys-color-surface) }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-family: var(--sys-font-display); font-weight: var(--sys-weight-bold); font-size: 18px; letter-spacing: var(--sys-tracking-snug) }
.brand i { width: 28px; height: 28px; border-radius: 9px; background: var(--sys-gradient-velocity); display: block }
.brand small { display: block; font-family: var(--sys-font-sans); font-size: 12px; font-weight: var(--sys-weight-medium); color: var(--sys-color-text-tertiary); letter-spacing: 0 }
.side a.nv { display: flex; align-items: center; gap: 11px; padding: 10px 12px; min-height: 44px; border-radius: var(--sys-radius-sm); text-decoration: none; font-weight: var(--sys-weight-semibold); color: var(--sys-color-text-secondary) }
.side a.nv svg { width: 19px; height: 19px }
.side a.nv:hover { background: var(--sys-color-surface-hover) }
.side a.nv[aria-current="page"] { background: var(--sys-color-surface-selected); color: var(--sys-color-text-primary) }
.side a.nv em { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--sys-status-declined-fg); color: #fff; font-size: 12px; font-style: normal; font-weight: var(--sys-weight-bold); display: grid; place-items: center }
.side .who { margin-top: auto; padding: 12px; border-top: 1px solid var(--sys-color-border); font-size: 13px; line-height: 1.4 }
.side .who b { display: block; font-size: 14px }
.side .who span { color: var(--sys-color-text-tertiary) }
.main { overflow-y: auto; padding: 22px 28px 40px }
body[data-shell="desktop"] .app-top { position: static; padding: 0 0 18px; background: transparent }
body[data-shell="desktop"] .scr-title { font-size: 28px }
body[data-shell="desktop"] .pad { display: flex; flex-direction: column; gap: 16px }
body[data-shell="desktop"] .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start }
body[data-shell="desktop"] .cols.md { grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr) }
body[data-shell="desktop"] .col { display: flex; flex-direction: column; gap: 16px; min-width: 0 }
body[data-shell="desktop"] .md > .col:last-child { position: sticky; top: 0 }
body[data-shell="desktop"] .card-pad-sm { padding: 18px }
body[data-shell="desktop"] .act-row { padding: 13px 16px; gap: 13px }
body[data-shell="desktop"] .act-name { font-size: 15px }
body[data-shell="desktop"] .act-sub { font-size: 13px }
body[data-shell="desktop"] .act-amt { font-size: 14px }
body[data-shell="desktop"] .h3 { font-size: 16px }
body[data-shell="desktop"] .lede, body[data-shell="desktop"] .kv, body[data-shell="desktop"] .ck, body[data-shell="desktop"] .log li, body[data-shell="desktop"] .locks li { font-size: 15px }
body[data-shell="desktop"] .btn--block { width: auto }
body[data-shell="desktop"] .actions { flex-direction: row; flex-wrap: wrap }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px }
.stat { padding: 16px 18px }
.stat b { display: block; font-family: var(--sys-font-display); font-size: 26px; letter-spacing: var(--sys-tracking-snug); margin-top: 4px }
a.stat { text-decoration: none; display: block }
a.stat:hover { border-color: var(--sys-color-border-strong) }
body[data-shell="desktop"] .toast { right: 28px; bottom: 24px; max-width: 420px }
body[data-shell="desktop"] .scrim { inset: 0; align-items: center; justify-content: center; padding: 24px }
body[data-shell="desktop"] .sheet { width: 520px; max-width: 100%; max-height: 100%; border-radius: var(--sys-radius-xl); padding: 26px; box-shadow: var(--sys-shadow-xl) }
