/* The web cashier: the app's 0.3 look (the Sulafat palette), wide screens first-class. */
:root {
  --night: #0B1533; --deep: #2848B8; --glow: #4C7DFF; --paper: #F5F8FF; --ink: #0E1B3D; --muted: #5A6785; --line: #DCE3F1;
  --ok: #1B7F3B; --ok-bg: #E2F4E8; --ok-ink: #0D4A22;
  --warn: #9A5B00; --warn-bg: #FFF1D6; --warn-ink: #5C3600;
  --bad: #B3261E; --bad-bg: #FDE6E4; --bad-ink: #6E120D;
  --info-bg: #E3EAFF; --neutral-bg: #EDF0F7;
  --r: 14px; --r-lg: 20px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Lao", "Noto Sans SC", sans-serif;
  color: var(--ink); background: var(--paper);
  font-size: 16px; line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1 { font-size: 24px; font-weight: 600; margin: 0; }
h2 { font-size: 18px; margin: 0 0 8px; }
h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 4px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mark { display: block; }

.testnet { background: #8A5A00; color: #fff; font-weight: 700; font-size: 13px; text-align: center; padding: 5px 12px; }
.bar { background: var(--night); color: #fff; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 12px; }
.bar .title { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .icon { background: none; border: 0; color: #fff; font-size: 22px; width: 44px; height: 44px; border-radius: 22px; cursor: pointer; }
.bar .icon:hover { background: rgba(255,255,255,.1); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.12); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #4ADE80; }
.pill.warn::before { background: #FBBF24; }
.pill.bad::before { background: #F87171; }
.banner { padding: 12px 16px; font-size: 14px; }
.banner.warn { background: var(--warn-bg); color: var(--warn-ink); }
.banner.bad { background: var(--bad-bg); color: var(--bad-ink); }

.page { padding: 20px; display: flex; flex-direction: column; gap: 14px; max-width: 1100px; margin: 0 auto; }
.page.narrow { max-width: 520px; }
.page.center { align-items: center; text-align: center; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.card.start { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }

button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
.primary, .secondary, .danger { border-radius: var(--r); padding: 14px 18px; font-weight: 600; font-size: 16px; border: 1px solid transparent; }
.primary { background: var(--deep); color: #fff; }
.primary:hover:not(:disabled) { background: #1f3a99; }
.secondary { background: #fff; color: var(--deep); border-color: var(--line); }
.danger { background: var(--bad); color: #fff; }
.wide { width: 100%; }
.text { background: none; border: 0; color: var(--deep); padding: 10px; font-weight: 600; }
.text.on { text-decoration: underline; }
textarea { width: 100%; font: 13px ui-monospace, monospace; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; resize: vertical; }
.portal-link { color: var(--deep); font-weight: 600; text-decoration: none; }
.portal-link:hover { text-decoration: underline; }
.pair-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.langs { display: flex; gap: 4px; justify-content: center; }

.notice { border-radius: var(--r); padding: 12px 14px; font-size: 14px; text-align: left; width: 100%; }
.notice.info { background: var(--info-bg); color: var(--night); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.bad { background: var(--bad-bg); color: var(--bad-ink); }
.awaiting { display: inline-flex; align-items: center; gap: 10px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--deep); border-radius: 50%; animation: spin 1s linear infinite; }
.spinner.big { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar-progress { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--deep) 30%, var(--line) 30%); background-size: 200% 100%; animation: slide 1.2s linear infinite; }
@keyframes slide { to { background-position: -200% 0; } }

.scanner { width: 100%; max-width: 420px; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); background: #000; }
.fingerprint { background: var(--info-bg); border-radius: var(--r-lg); padding: 18px 16px; width: 100%; }
.fingerprint strong { display: block; font: 700 42px ui-monospace, monospace; letter-spacing: 8px; color: var(--night); margin-top: 8px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tile { display: flex; align-items: center; gap: 14px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; color: var(--ink); }
.tile:hover:not(:disabled) { border-color: var(--glow); }
.tile-text { flex: 1; display: flex; flex-direction: column; }
.symbol { font-size: 22px; font-weight: 600; }
.chev { color: var(--muted); font-size: 26px; }
.badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; flex: none; }

.asset-line { display: flex; align-items: center; gap: 10px; }
.typed { font-size: 40px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; margin-top: 8px; word-break: break-all; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { height: 62px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; font-size: 26px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.key.alt { background: #EEF2FA; }
.key:active { background: var(--info-bg); }

.pay { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 900px) { .pay { grid-template-columns: minmax(320px, 420px) 1fr; } }
.pay-code, .pay-info { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pay-info { align-items: flex-start; }
@media (max-width: 899px) { .pay-info { order: -1; align-items: center; text-align: center; } }
.qr { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; line-height: 0; }
.qr canvas { width: min(320px, 80vw); height: auto; image-rendering: pixelated; }
.address { font: 13px ui-monospace, monospace; background: #EEF2FA; border-radius: var(--r); padding: 10px 12px; word-break: break-all; text-align: center; width: 100%; }
.address .ends { font-size: 17px; font-weight: 700; color: var(--night); }
.network { display: inline-flex; align-items: center; gap: 8px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; padding: 6px 12px; border-radius: var(--r); }
.due { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.expiry { width: 100%; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.expiry .urgent { color: var(--bad); }
progress { width: 100%; height: 6px; accent-color: var(--deep); }

.outcome { width: 100%; border-radius: var(--r-lg); padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.outcome h1 { font-size: 30px; }
.outcome .line { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.outcome-icon { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 40px; font-weight: 700; }
.outcome.ok { background: var(--ok-bg); color: var(--ok-ink); } .outcome.ok .outcome-icon { background: var(--ok); }
.outcome.bad { background: var(--bad-bg); color: var(--bad-ink); } .outcome.bad .outcome-icon { background: var(--bad); }
.outcome.warn { background: var(--warn-bg); color: var(--warn-ink); } .outcome.warn .outcome-icon { background: var(--warn); }
.outcome.neutral { background: var(--neutral-bg); color: var(--ink); } .outcome.neutral .outcome-icon { background: var(--muted); }

.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; color: var(--ink); }
.row-text { flex: 1; display: flex; flex-direction: column; }
.chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); } .chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); } .chip.info { background: var(--info-bg); color: var(--night); }
.chip.neutral { background: var(--neutral-bg); color: var(--ink); }
.radio { display: flex; align-items: center; gap: 10px; padding: 4px 0; cursor: pointer; }

.scrim { position: fixed; inset: 0; background: rgba(11,21,51,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog { background: #fff; border-radius: var(--r-lg); padding: 20px; max-width: 440px; width: 100%; text-align: left; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
