/* PB1 design system: dark, glassy, orange. Apple-style bevels and depth, pill navigation.
   Tokens first, then base, then components. No external fonts or assets.
   Palette comes from the PB logo: vivid orange (#FB7500, shading #F65100 to #FFBD13) on warm black. */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  color-scheme: dark;
  --paper: #0a0908;                       /* page background (warm black) */
  --ink: #15120f;
  --ink-2: #1d1914;
  --ink-3: #8e877e;
  --surface: rgb(255 255 255 / .07);      /* glass fill */
  --surface-2: rgb(255 255 255 / .11);
  --sunk: rgb(255 255 255 / .06);
  --line: rgb(255 255 255 / .10);
  --line-strong: rgb(255 255 255 / .18);
  --text: #f6f2ec;
  --muted: #b2aba2;
  --accent: #ff7a00;
  --accent-hi: #ffb04a;
  --accent-lo: #e25800;
  --accent-deep: #ffa24d;                 /* orange for text/links on dark */
  --on-primary: #1d0e02;
  --primary: var(--accent);
  --ok: #5fe3b2;  --ok-bg: rgb(60 220 160 / .14);
  --warn: #ffb35c; --warn-bg: rgb(255 140 20 / .16);
  --err: #ff8f86; --err-bg: rgb(255 80 70 / .15);
  --info-bg: rgb(255 255 255 / .09);
  --radius-s: 14px; --radius-m: 20px; --radius-l: 28px; --pill: 999px;
  --glass: linear-gradient(180deg, rgb(255 255 255 / .115), rgb(255 255 255 / .045));
  --glass-shadow: inset 0 1px 0 rgb(255 255 255 / .24), inset 0 -1px 0 rgb(0 0 0 / .3), 0 24px 60px -22px rgb(0 0 0 / .8), 0 2px 6px rgb(0 0 0 / .25);
  --blur: blur(28px) saturate(175%);
  --spring: cubic-bezier(.3, 1.35, .5, 1);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", var(--font-ui);
  --font-code: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: transparent; color: var(--text); font: 15px/1.55 var(--font-ui); -webkit-font-smoothing: antialiased; letter-spacing: -0.003em; overflow-x: hidden; }
#root { position: relative; z-index: 1; }

/* ambient light: slow drifting orange glows behind everything */
body::before, body::after { content: ""; position: fixed; z-index: 0; pointer-events: none; }
body::before { inset: -25%; background:
    radial-gradient(38% 38% at 18% 14%, rgb(255 122 0 / .34), transparent 70%),
    radial-gradient(32% 32% at 86% 18%, rgb(255 76 0 / .22), transparent 70%),
    radial-gradient(42% 42% at 72% 92%, rgb(255 176 74 / .18), transparent 70%),
    radial-gradient(30% 30% at 8% 88%, rgb(226 88 0 / .2), transparent 70%);
  filter: blur(36px); animation: drift 26s ease-in-out infinite alternate; }
body::after { inset: 0; opacity: .5; background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgb(0 0 0 / .55)); }
@keyframes drift { 0% { transform: translate3d(-2%, -1%, 0) scale(1); } 50% { transform: translate3d(2%, 2%, 0) scale(1.06); } 100% { transform: translate3d(-1%, 3%, 0) scale(1.02); } }

h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
a { color: inherit; text-decoration-color: rgb(255 255 255 / .3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
p a, .auth-foot a, .small a, .notice a, .co-note a { color: var(--accent-deep); }
::selection { background: rgb(255 122 0 / .45); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-family: var(--font-num); font-variant-numeric: lining-nums tabular-nums; }
.mono { font-family: var(--font-code); font-size: 12.5px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgb(255 150 40 / .85); outline-offset: 2px; border-radius: 12px; }

/* ---------- glass surfaces ---------- */
.card, .modal, .stats, .tablewrap, .section, .side, .pillbar, .receipt, .auth-aside, .co-right .co-inner, .idpanel, .toast {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--line); box-shadow: var(--glass-shadow);
}
.card { border-radius: var(--radius-l); padding: 28px; }
.card.flush { padding: 0; overflow: hidden; }

/* ---------- buttons: beveled, pressable ---------- */
.btn {
  appearance: none; position: relative; overflow: hidden; isolation: isolate; font: inherit; font-weight: 600; letter-spacing: -0.005em;
  height: 44px; padding: 0 22px; border-radius: var(--pill); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, rgb(255 255 255 / .2), rgb(255 255 255 / .06) 52%, rgb(255 255 255 / .1));
  border: 1px solid rgb(255 255 255 / .17);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .38), inset 0 -2px 0 rgb(0 0 0 / .28), 0 1px 0 rgb(0 0 0 / .5), 0 8px 18px -8px rgb(0 0 0 / .7);
  transition: transform .18s var(--spring), box-shadow .18s, filter .18s, background-color .18s;
}
.btn:hover { transform: translateY(-1.5px); filter: brightness(1.12); box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .28), 0 1px 0 rgb(0 0 0 / .5), 0 14px 24px -10px rgb(0 0 0 / .75); }
.btn:active { transform: translateY(1.5px) scale(.99); filter: brightness(.96); box-shadow: inset 0 2px 5px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .1), 0 0 0 rgb(0 0 0 / 0); transition-duration: .06s; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.btn::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgb(255 255 255 / .35), transparent); opacity: 0; }
.btn:hover::after { opacity: 1; animation: sheen .75s ease-out; }
@keyframes sheen { to { left: 130%; } }
.btn.primary {
  color: var(--on-primary); border: 1px solid #a64200; text-shadow: 0 1px 0 rgb(255 255 255 / .4);
  background: linear-gradient(180deg, #ffbe66 0%, #ff9124 46%, #f56b00 54%, #e85d00 100%);
  box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .7), inset 0 -3px 0 rgb(140 48 0 / .55), 0 3px 0 #a23f00, 0 12px 26px -6px rgb(255 110 0 / .6), 0 0 0 0 rgb(255 140 30 / 0);
  transition: transform .18s var(--spring), box-shadow .18s, filter .18s;
}
.btn.primary:hover { filter: brightness(1.07) saturate(1.05); transform: translateY(-2px); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .8), inset 0 -3px 0 rgb(140 48 0 / .55), 0 5px 0 #a23f00, 0 18px 34px -6px rgb(255 120 0 / .75), 0 0 28px rgb(255 140 30 / .35); }
.btn.primary:active { transform: translateY(3px); filter: brightness(.97); box-shadow: inset 0 2px 6px rgb(120 40 0 / .6), inset 0 1px 0 rgb(255 255 255 / .35), 0 0 0 #a23f00, 0 4px 10px -4px rgb(255 110 0 / .5); }
.btn.danger { color: var(--err); background: linear-gradient(180deg, rgb(255 110 100 / .26), rgb(255 80 70 / .08) 55%, rgb(255 80 70 / .14)); border-color: rgb(255 120 110 / .4); }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; }
.btn.quiet:hover { background: var(--sunk); box-shadow: none; transform: none; }
.btn.sm { height: 34px; padding: 0 15px; font-size: 13px; }
.btn.block { width: 100%; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: block; }
.field > .label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; padding-left: 4px; }
.field > .hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 7px; padding-left: 4px; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 18px; font: inherit; color: var(--text); color-scheme: dark; border-radius: 18px;
  background: rgb(0 0 0 / .32); border: 1px solid var(--line-strong);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / .55), inset 0 -1px 0 rgb(255 255 255 / .06), 0 1px 0 rgb(255 255 255 / .06);
  transition: border-color .15s, box-shadow .2s, background-color .15s;
}
.input::placeholder { color: rgb(255 255 255 / .34); }
select.input option { background: #1a1612; color: var(--text); }
textarea.input { height: auto; padding: 12px 18px; min-height: 90px; resize: vertical; border-radius: 20px; }
.input:hover { border-color: rgb(255 255 255 / .3); }
.input:focus { outline: none; border-color: rgb(255 150 40 / .9); background: rgb(0 0 0 / .42); box-shadow: inset 0 2px 6px rgb(0 0 0 / .55), 0 0 0 4px rgb(255 122 0 / .25), 0 0 26px rgb(255 122 0 / .22); }
.input[aria-invalid="true"] { border-color: var(--err); }
.code-input { letter-spacing: .5em; text-align: center; font-family: var(--font-num); font-size: 26px; font-variant-numeric: tabular-nums; height: 60px; border-radius: 24px; }
.pw { position: relative; display: block; }
.pw .input { padding-right: 76px; }
.pw button { position: absolute; right: 7px; top: 7px; height: 34px; border: 0; border-radius: var(--pill); background: rgb(255 255 255 / .08); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0 13px; transition: background-color .15s, color .15s; }
.pw button:hover { color: var(--text); background: rgb(255 255 255 / .16); }
.strength { display: flex; gap: 5px; margin-top: 10px; padding: 0 4px; }
.strength i { flex: 1; height: 5px; border-radius: 3px; background: rgb(255 255 255 / .1); box-shadow: inset 0 1px 1px rgb(0 0 0 / .5); transition: background-color .25s, box-shadow .25s; }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--err); box-shadow: 0 0 10px rgb(255 100 90 / .5); }
.strength[data-score="2"] i:nth-child(-n+2) { background: var(--accent); box-shadow: 0 0 10px rgb(255 122 0 / .5); }
.strength[data-score="3"] i:nth-child(-n+3), .strength[data-score="4"] i:nth-child(-n+4) { background: var(--ok); box-shadow: 0 0 10px rgb(95 227 178 / .45); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- messages ---------- */
.notice { display: flex; gap: 10px; padding: 13px 18px; border-radius: var(--radius-m); font-size: 14px; background: var(--info-bg); border: 1px solid var(--line); }
.notice.err { background: var(--err-bg); color: var(--err); border-color: rgb(255 120 110 / .3); }
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: rgb(95 227 178 / .28); }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: rgb(255 170 70 / .3); }
.notice b { font-weight: 650; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: var(--pill); background: rgb(255 255 255 / .08); color: var(--muted); white-space: nowrap; border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: rgb(95 227 178 / .25); }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: rgb(255 170 70 / .28); }
.pill.err { background: var(--err-bg); color: var(--err); border-color: rgb(255 120 110 / .28); }
.pill.info { background: var(--info-bg); color: #d6d0c8; }
.pill.lock::before { display: none; }

.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; display: grid; gap: 10px; z-index: 60; max-width: calc(100vw - 32px); justify-items: center; }
.toast { color: var(--text); padding: 12px 22px; border-radius: var(--pill); font-size: 14px; font-weight: 550; background: linear-gradient(180deg, rgb(60 52 44 / .85), rgb(26 22 18 / .88)); animation: toast-in .5s var(--spring); }
.toast.err { color: var(--err); border-color: rgb(255 120 110 / .4); }
@keyframes toast-in { from { transform: translateY(24px) scale(.9); opacity: 0; } }

/* ---------- brand mark: the logo sits on a beveled light tile, like an app icon ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .06em; text-decoration: none; color: var(--text); }
.brand img { width: 24px; height: 24px; display: block; }
.brand .tile, .tile { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(180deg, #fff, #ece7e0); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgb(0 0 0 / .14), 0 0 0 1px rgb(0 0 0 / .4), 0 6px 14px -4px rgb(255 122 0 / .5); }

/* ---------- pill navigation bar ---------- */
.pillbar { position: fixed; z-index: 30; top: 14px; left: 50%; transform: translateX(-50%); width: min(1180px, calc(100% - 28px)); height: 60px; padding: 0 9px 0 11px; border-radius: var(--pill);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; animation: bar-in .7s var(--spring) both; }
@keyframes bar-in { from { transform: translate(-50%, -90px); opacity: 0; } }
.pillbar .links { display: flex; align-items: center; gap: 4px; }
.pillbar .right { display: flex; align-items: center; gap: 10px; }
.pillbar .link { padding: 8px 16px; border-radius: var(--pill); text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); transition: background-color .15s, color .15s; }
.pillbar .link:hover { color: var(--text); background: rgb(255 255 255 / .09); }
.chip { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: var(--pill); background: rgb(0 0 0 / .3); border: 1px solid var(--line); box-shadow: inset 0 2px 5px rgb(0 0 0 / .45); max-width: 240px; }
.chip .meta { min-width: 0; line-height: 1.2; }
.chip .meta b, .chip .meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .meta b { font-size: 13.5px; } .chip .meta span { font-size: 12px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; color: var(--on-primary); display: grid; place-items: center; font-weight: 750; font-size: 13.5px; flex: none;
  background: linear-gradient(180deg, #ffbe66, #ff8a1a 50%, #e85d00); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .65), inset 0 -2px 0 rgb(140 48 0 / .45), 0 0 0 1px rgb(150 55 0 / .8), 0 6px 14px -4px rgb(255 110 0 / .55); text-shadow: 0 1px 0 rgb(255 255 255 / .35); }

/* ---------- app shell (account + admin): pill sidebar ---------- */
.shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding-top: 92px; display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 30px; align-items: start; }
.side { position: sticky; top: 90px; padding: 12px; border-radius: 34px; display: flex; flex-direction: column; gap: 14px; animation: side-in .8s .08s var(--spring) both; }
@keyframes side-in { from { transform: translateX(-36px); opacity: 0; } }
.side .cap { padding: 8px 14px 0; }
.nav { position: relative; display: grid; gap: 4px; }
.nav a { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 11px 18px; border-radius: var(--pill); text-decoration: none; color: var(--muted); font-weight: 600; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--text); background: rgb(255 255 255 / .07); }
.nav a[aria-current="page"] { color: var(--on-primary); text-shadow: 0 1px 0 rgb(255 255 255 / .35); background: linear-gradient(180deg, #ffbe66, #ff8a1a 50%, #e85d00); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .65), inset 0 -3px 0 rgb(140 48 0 / .5), 0 3px 0 #a23f00, 0 10px 22px -6px rgb(255 110 0 / .55); }
.nav.has-pill a[aria-current="page"], .nav.has-pill a[aria-current="page"]:hover { background: none; box-shadow: none; }
.nav.has-pill a:hover:not([aria-current="page"]) { background: rgb(255 255 255 / .07); }
.nav-pill { position: absolute; z-index: 0; left: 0; top: 0; width: var(--w, 0); height: var(--h, 0); transform: translate(var(--x, 0), var(--y, 0)); border-radius: var(--pill); pointer-events: none;
  background: linear-gradient(180deg, #ffbe66, #ff8a1a 50%, #e85d00); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .65), inset 0 -3px 0 rgb(140 48 0 / .5), 0 3px 0 #a23f00, 0 10px 22px -6px rgb(255 110 0 / .55); transition: transform .5s var(--spring), width .4s var(--spring), height .4s var(--spring); }
.nav .count { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: var(--pill); background: rgb(255 255 255 / .12); color: var(--text); }
.nav a[aria-current="page"] .count { background: rgb(0 0 0 / .2); color: var(--on-primary); }
.main { min-width: 0; padding: 4px 0 120px; }
.main > * { animation: rise .6s var(--spring) both; }
.main > :nth-child(2) { animation-delay: .06s; } .main > :nth-child(3) { animation-delay: .12s; } .main > :nth-child(4) { animation-delay: .18s; } .main > :nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } }
.page-head { margin-bottom: 26px; padding: 0 6px; }
.page-head p { color: var(--muted); margin-top: 7px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding-top: 88px; }
  .side { position: fixed; z-index: 30; top: auto; bottom: 14px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 28px)); padding: 7px; border-radius: var(--pill); flex-direction: row; animation: dock-in .8s .1s var(--spring) both; }
  @keyframes dock-in { from { transform: translate(-50%, 90px); opacity: 0; } }
  .side .cap { display: none; }
  .nav { display: flex; overflow-x: auto; scrollbar-width: none; gap: 2px; width: 100%; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 10px 16px; }
  .toasts { bottom: 92px; }
  .chip .meta { display: none; } .chip { padding-right: 5px; }
  .pillbar .link { display: none; }
}

/* settings groups: glass panels */
.section { margin-top: 16px; padding: 28px; border-radius: var(--radius-l); display: grid; grid-template-columns: 210px 1fr; gap: 26px; }
.section > header p { color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.items { display: grid; }
.item { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 0; }
.item:last-child { padding-bottom: 0; }
@media (max-width: 760px) { .section { grid-template-columns: 1fr; gap: 14px; padding: 22px; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-radius: var(--radius-l); overflow: hidden; }
.stat { padding: 20px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .v { font-family: var(--font-num); font-size: 32px; font-weight: 650; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.02em; }
.stat .k { color: var(--muted); font-size: 13px; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 12px 18px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .04); white-space: nowrap; }
table.t td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background-color .15s; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: rgb(255 140 30 / .09); }
table.t td.r, table.t th.r { text-align: right; }
.tablewrap { overflow-x: auto; border-radius: var(--radius-l); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

.tabs { display: inline-flex; gap: 4px; padding: 5px; margin-bottom: 22px; border-radius: var(--pill); background: rgb(0 0 0 / .3); border: 1px solid var(--line); box-shadow: inset 0 2px 6px rgb(0 0 0 / .45); overflow-x: auto; max-width: 100%; }
.tabs button { background: none; border: 0; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--muted); padding: 8px 18px; cursor: pointer; border-radius: var(--pill); white-space: nowrap; transition: color .15s, background-color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--on-primary); text-shadow: 0 1px 0 rgb(255 255 255 / .35); background: linear-gradient(180deg, #ffbe66, #ff8a1a 50%, #e85d00); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), inset 0 -2px 0 rgb(140 48 0 / .45), 0 2px 0 #a23f00; }

.method { display: flex; align-items: center; gap: 14px; }
.method .chip-ico { width: 54px; height: 36px; border-radius: 10px; background: linear-gradient(180deg, #3b342d, #1c1814); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; flex: none; }
.method .chip { all: unset; width: 54px; height: 36px; border-radius: 10px; background: linear-gradient(180deg, #3b342d, #1c1814); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; flex: none; }

/* ---------- the PB1 ID: permanent identity, the memorable thing ---------- */
.idpanel { position: relative; border-radius: var(--radius-l); padding: 26px 28px; margin-bottom: 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; overflow: hidden; }
.idpanel::before { content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--spin), rgb(255 122 0 / 0), rgb(255 150 40 / .95) 12%, rgb(255 122 0 / 0) 30%, rgb(255 122 0 / 0) 60%, rgb(255 190 100 / .6) 72%, rgb(255 122 0 / 0) 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin-border 9s linear infinite; }
@keyframes spin-border { to { --spin: 360deg; } }
.idpanel .badge { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--on-primary);
  background: linear-gradient(180deg, #ffbe66, #ff8a1a 48%, #e85d00); box-shadow: inset 0 2px 0 rgb(255 255 255 / .65), inset 0 -4px 0 rgb(140 48 0 / .5), 0 5px 0 #a23f00, 0 18px 34px -8px rgb(255 110 0 / .6); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px) rotate(-2deg); } }
.idpanel .uuid { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.idchip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 8px 7px 16px; border-radius: var(--pill); background: rgb(0 0 0 / .4); border: 1px solid var(--line-strong); box-shadow: inset 0 2px 6px rgb(0 0 0 / .55); }
.idchip code { min-width: 0; font-family: var(--font-code); font-size: 13.5px; user-select: all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idchip button { flex: none; }
.idchip button { all: unset; cursor: pointer; font-size: 12.5px; font-weight: 700; padding: 5px 13px; border-radius: var(--pill); background: rgb(255 255 255 / .12); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); transition: background-color .15s, transform .12s; }
.idchip button:hover { background: rgb(255 255 255 / .2); } .idchip button:active { transform: scale(.94); }
.idchip button:focus-visible { outline: 3px solid rgb(255 150 40 / .85); }
.idchip.sm { padding: 3px 4px 3px 11px; } .idchip.sm code { font-size: 12px; }
@media (max-width: 640px) {
  .idpanel { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 16px; }
  .idchip { align-items: flex-start; border-radius: 22px; padding: 10px 10px 10px 14px; }
  .idchip code { white-space: normal; word-break: break-all; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .stat { padding: 16px 16px; } .stat .v { font-size: 26px; }
}

/* ---------- modal ---------- */
.scrim { position: fixed; inset: 0; background: rgb(6 4 2 / .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .2s; }
.modal { background: linear-gradient(180deg, rgb(70 60 50 / .6), rgb(30 26 22 / .8)); border-radius: 32px; padding: 28px; width: 100%; max-width: 460px; animation: pop .45s var(--spring); max-height: calc(100vh - 32px); overflow: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(24px) scale(.94); opacity: 0; } }

/* ---------- brand panels / auth ---------- */
.auth { width: min(1180px, 100%); margin: 0 auto; min-height: 100vh; padding: 88px 14px 14px; display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: 16px; }
.auth-aside { border-radius: 38px; padding: 40px 44px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background: radial-gradient(90% 60% at 0% 0%, rgb(255 122 0 / .28), transparent 65%), var(--glass); animation: rise .8s var(--spring) both; }
.auth-aside .spine { display: none; }
.auth-aside h2 { font-weight: 700; font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -0.035em; max-width: 13em; }
.auth-aside .lead { color: #cbc4bb; margin-top: 14px; max-width: 30em; }
.assurances { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 30em; }
.assurances li { padding: 10px 16px; border-radius: var(--radius-m); background: rgb(0 0 0 / .22); border: 1px solid var(--line); color: #ded8d0; font-size: 14px; }
.handoff { margin: 28px 0 0; display: flex; align-items: center; max-width: 380px; }
.handoff .node { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; font-weight: 750; flex: none; }
.handoff .node.pb { background: linear-gradient(180deg, #fff, #ece7e0); padding: 11px; box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgb(0 0 0 / .14), 0 0 0 1px rgb(0 0 0 / .4), 0 14px 30px -6px rgb(255 122 0 / .6); animation: float 5s ease-in-out infinite; }
.handoff .node.pb img { width: 100%; height: 100%; display: block; }
.handoff .node.app { color: #fff; font-size: 22px; background: var(--glass); border: 1px solid var(--line-strong); box-shadow: var(--glass-shadow); border-radius: 50%; }
.handoff .wire { flex: 1; height: 4px; min-width: 40px; margin: 0 6px; border-radius: 4px; background: repeating-linear-gradient(90deg, rgb(255 150 40 / .9) 0 8px, transparent 8px 16px); background-size: 16px 4px; animation: march 1s linear infinite; position: relative; }
@keyframes march { to { background-position: 16px 0; } }
.handoff-cap { margin-top: 14px; font-size: 13.5px; color: #cbc4bb; max-width: 22em; }
.auth-main { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: 100%; max-width: 430px; padding: 34px; border-radius: 36px; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--glass-shadow); animation: rise .8s .1s var(--spring) both; }
.auth-card > .stack { --gap: 20px; }
.auth-card .sub { color: var(--muted); margin-top: 8px; }
.providers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.provider { height: 46px; gap: 8px; padding: 0 10px; }
.provider .glyph { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: rgb(255 255 255 / .14); }
.auth-foot { margin-top: 28px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; padding-top: 84px; }
  .auth-aside { padding: 24px 22px; gap: 18px; border-radius: 30px; }
  .auth-aside .lead, .auth-aside .assurances { display: none; }
  .auth-aside h2 { font-size: 22px; }
  .handoff { margin-top: 14px; } .handoff .node { width: 46px; height: 46px; border-radius: 15px; }
  .auth-main { align-items: start; padding: 8px 0 40px; }
  .auth-card { padding: 26px 22px; border-radius: 30px; }
}
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 96px 24px 24px; }
.narrow { max-width: 440px; width: 100%; }

/* ---------- checkout: the receipt ---------- */
.co { min-height: 100vh; padding-top: 76px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.co-left { padding: 40px 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
.co-right { padding: 40px 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.co-inner { width: 100%; max-width: 440px; }
.co-right .co-inner { padding: 30px; border-radius: 34px; animation: rise .7s .1s var(--spring) both; }
.receipt { width: 100%; max-width: 440px; padding: 30px 30px 44px; position: relative; border-radius: 28px 28px 0 0; --tooth: 9px; animation: rise .7s var(--spring) both;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--tooth) 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) * .5) no-repeat;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--tooth) 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) * .5) no-repeat; }
.receipt .who-pays { color: var(--muted); font-size: 13.5px; }
.receipt h1 { font-size: 24px; margin-top: 4px; }
.receipt .desc { color: var(--muted); font-size: 14px; margin-top: 4px; }
.ledger { margin: 22px 0 0; padding: 0; list-style: none; }
.ledger li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; }
.ledger li .dots { flex: 1; border-bottom: 2px dotted rgb(255 255 255 / .22); transform: translateY(-4px); min-width: 16px; }
.ledger li.total { border-top: 1.5px solid rgb(255 255 255 / .5); margin-top: 10px; padding-top: 14px; font-weight: 650; }
.ledger li.total .num { font-size: 34px; letter-spacing: -0.02em; }
.receipt .ref { margin-top: 20px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
.stamp { position: absolute; right: 22px; top: 22px; border: 2px solid var(--ok); color: var(--ok); border-radius: var(--pill); padding: 4px 16px; font-weight: 800; letter-spacing: .06em; transform: rotate(-6deg); box-shadow: 0 0 20px rgb(95 227 178 / .3); animation: stamp .45s var(--spring) both; }
.stamp.void { border-color: var(--err); color: var(--err); box-shadow: 0 0 20px rgb(255 100 90 / .3); }
@keyframes stamp { from { transform: rotate(-14deg) scale(1.7); opacity: 0; } }
.co-note { margin-top: 28px; color: var(--muted); font-size: 13.5px; max-width: 440px; width: 100%; }
.gateways { display: grid; gap: 10px; }
.gw { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border: 1px solid var(--line-strong); border-radius: 22px; background: rgb(0 0 0 / .22); cursor: pointer; box-shadow: inset 0 1px 0 rgb(255 255 255 / .1); transition: border-color .15s, box-shadow .2s, transform .18s var(--spring); }
.gw:hover { border-color: rgb(255 255 255 / .34); transform: translateY(-1px); }
.gw:has(input:checked) { border-color: rgb(255 150 40 / .95); background: rgb(255 122 0 / .12); box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 0 0 4px rgb(255 122 0 / .2), 0 0 28px rgb(255 122 0 / .25); }
.gw input { accent-color: var(--accent); width: 18px; height: 18px; }
.gw .t { font-weight: 650; }
.confirming { text-align: center; padding: 8px 0; }
.ring { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid rgb(255 255 255 / .12); border-top-color: var(--accent); box-shadow: 0 0 24px rgb(255 122 0 / .35); animation: spin 1s linear infinite; }
.tick { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--ok-bg); border: 1px solid rgb(95 227 178 / .35); display: grid; place-items: center; color: var(--ok); box-shadow: 0 0 30px rgb(95 227 178 / .3); animation: pop .6s var(--spring) both; }
.tick.bad { background: var(--err-bg); color: var(--err); border-color: rgb(255 120 110 / .35); box-shadow: 0 0 30px rgb(255 100 90 / .3); }
.timer { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .co { grid-template-columns: 1fr; }
  .co-left { padding: 24px 16px 8px; align-items: center; }
  .co-right { padding: 20px 16px 48px; align-items: center; }
  .co-note { display: none; }
}

/* ---------- consent ---------- */
.scope { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); align-items: baseline; }
.scope:first-child { border-top: 0; }
.scope .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; transform: translateY(-1px); box-shadow: 0 0 10px var(--ok); }

/* ---------- landing ---------- */
.hero { min-height: 100vh; padding: 92px 14px 14px; display: grid; grid-template-columns: 7fr 5fr; gap: 16px; width: min(1280px, 100%); margin: 0 auto; }
.hero-l { padding: 40px 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.hero-l h1 { font-weight: 750; font-size: clamp(42px, 6vw, 80px); line-height: 1; letter-spacing: -0.045em; max-width: 10em; }
.hero-l .stack { animation: rise .8s .1s var(--spring) both; }
.hero-r { padding: 24px; display: grid; place-items: center; perspective: 1100px; }
.idcard { position: relative; width: min(380px, 88vw); aspect-ratio: 1.586; border-radius: 30px; padding: 24px 26px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background: radial-gradient(80% 90% at 100% 0%, rgb(255 140 30 / .55), transparent 60%), linear-gradient(160deg, rgb(255 255 255 / .2), rgb(255 255 255 / .05));
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid rgb(255 255 255 / .22);
  box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .3), 0 50px 90px -30px rgb(255 100 0 / .55), 0 30px 60px -20px rgb(0 0 0 / .8);
  transform: rotateY(-16deg) rotateX(9deg) rotateZ(-2deg); transform-style: preserve-3d; animation: card-float 7s ease-in-out infinite; }
.idcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / .22) 48%, transparent 60%); background-size: 250% 100%; animation: glint 6s ease-in-out infinite; pointer-events: none; }
@keyframes card-float { 50% { transform: rotateY(-10deg) rotateX(5deg) rotateZ(-1deg) translateY(-12px); } }
@keyframes glint { 0% { background-position: 150% 0; } 55%, 100% { background-position: -60% 0; } }
.idcard .top { display: flex; justify-content: space-between; align-items: center; }
.idcard .top .tile { width: 44px; height: 44px; border-radius: 15px; }
.idcard .top .tile img { width: 30px; height: 30px; }
.idcard .lbl { font-size: 12px; color: rgb(255 255 255 / .75); font-weight: 600; margin-bottom: 4px; }
.idcard .id { font-family: var(--font-code); font-size: clamp(11.5px, 3.3vw, 14px); letter-spacing: .01em; word-break: break-all; }
.idcard .nm { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-top: 12px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 84px; } .hero-l { padding: 24px 12px; gap: 28px; } .hero-r { padding: 8px 0 32px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.modal .stats { grid-template-columns: repeat(3, 1fr); border-radius: var(--radius-m); }
.modal .stat { padding: 14px 16px; } .modal .stat .v { font-size: 24px; }

/* Staff console: wider dialogs for forms and detail views, and a plain two-column helper. */
.modal:has(> .stack.wide) { max-width: 640px; }
.field textarea.input { min-height: 84px; resize: vertical; }
.field select.input { appearance: auto; }
