:root {
  --paper: #ffffff;
  --ink: #102033;
  --muted: #5c6e86;
  --deep: #1a73e8;
  --deep-2: #185abc;
  --field: #eef3fb;
  --wash: #eef3f9;
  --line: #d7e3f2;
  --fault: #9b2c2c;
  --fault-bg: #fdecec;
  --shadow: 0 1px 2px rgba(16, 32, 51, 0.05), 0 10px 28px rgba(16, 32, 51, 0.05);
  --sidebar: 248px;
  --font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
a { color: var(--deep); }
[hidden] { display: none !important; }
.sr, .skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip:focus { width: auto; height: auto; margin: 0; clip: auto; left: 12px; top: 12px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 20; }

/* ---------- Homepage ---------- */
.site-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #fff;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.site-preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.site-preloader-inner {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(220px, 70vw);
}
.site-preloader-logo {
  width: min(220px, 70vw);
  height: auto;
  display: block;
}
.site-preloader-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}
.site-preloader-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #1a73e8;
  transition: width 0.18s linear;
}
@media (prefers-reduced-motion: reduce) {
  .site-preloader { transition: opacity 0.2s ease, visibility 0.2s ease; }
  .site-preloader-bar { transition: none; }
}
body:has(.screen) { background: #fff; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.top {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 8px;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--deep);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.mark-icon { display: block; }
.top-actions, .hero-actions { display: flex; align-items: center; gap: 8px; }
.hero {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.75fr);
  gap: 48px;
  align-items: center;
  padding: 12px 0 72px;
}
.kicker {
  color: var(--deep);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.screen h1 {
  max-width: 18ch;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.lead { max-width: 38rem; margin-top: 22px; color: var(--muted); font-size: 1.12rem; }
.hero-actions { margin-top: 28px; }
.solid, .text, .link, .close { border: 0; background: transparent; cursor: pointer; font: inherit; }
.solid {
  background: var(--deep);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 650;
}
.solid:hover { background: var(--deep-2); }
.text, .close, .link { color: var(--ink); padding: 12px 14px; }
.link { padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.wide { width: 100%; margin-top: 6px; }
.orbit-amount {
  font-size: clamp(3.2rem, 6vw, 5.2rem);
  letter-spacing: -0.055em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
}
.orbit-amount small { display: block; margin-top: 10px; color: var(--deep); font-size: 0.95rem; letter-spacing: 0.14em; }
.orbit-states { list-style: none; margin: 28px 0 0; padding: 0 0 0 18px; position: relative; display: grid; gap: 14px; }
.orbit-states::before { content: ""; position: absolute; left: 0; top: 0.45em; bottom: 0.45em; width: 2px; background: #d5e2f4; }
.orbit-states::after {
  content: "";
  position: absolute;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--deep);
  animation: travel 8s linear infinite;
}
.orbit-states li { color: var(--muted); animation: state 8s linear infinite; }
.orbit-states li:nth-child(1) { animation-delay: 0s; }
.orbit-states li:nth-child(2) { animation-delay: -6s; }
.orbit-states li:nth-child(3) { animation-delay: -4s; }
.orbit-states li:nth-child(4) { animation-delay: -2s; }
.cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cue span { display: block; padding-bottom: 10px; }
.cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 28px;
  margin: 0 auto;
  background: var(--deep);
  transform-origin: top;
  animation: cue 1.8s ease-in-out infinite;
}
.stage { padding: 96px 0 72px; background: var(--wash); }
.stage-words { position: relative; height: 1.05em; margin: 8px 0 28px; font-size: clamp(3rem, 8vw, 6.4rem); }
.stage-words span {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 560;
  color: var(--deep-2);
  opacity: 0;
  animation: word 12s infinite;
}
.stage-words span:nth-child(1) { animation-delay: 0s; }
.stage-words span:nth-child(2) { animation-delay: 3s; }
.stage-words span:nth-child(3) { animation-delay: 6s; }
.stage-words span:nth-child(4) { animation-delay: 9s; }
.flow { padding: 88px 0 40px; }
.flow-line { display: block; width: 100%; height: 4px; margin-bottom: 28px; }
.flow-line line { stroke: var(--deep); stroke-width: 4; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.flow.is-in .flow-line line { animation: draw 1.6s ease forwards; }
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.flow-grid article { opacity: 0; transform: translateY(16px); }
.flow.is-in .flow-grid article { animation: rise 0.7s ease forwards; }
.flow.is-in .flow-grid article:nth-child(2) { animation-delay: 0.15s; }
.flow.is-in .flow-grid article:nth-child(3) { animation-delay: 0.3s; }
.flow-grid span { display: block; margin-bottom: 12px; color: var(--deep); font-variant-numeric: tabular-nums; }
.flow-grid h2, .ticker h2, .band h2 { font-size: 1.35rem; letter-spacing: -0.03em; font-weight: 600; }
.flow-grid p { margin-top: 8px; color: var(--muted); }
.ticker { padding: 48px 0 88px; overflow: hidden; }
.ticker-head h2 { max-width: 16ch; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.04em; }
.ticker-mask { margin-top: 36px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; gap: 28px; width: max-content; animation: marquee 28s linear infinite; }
.ticker-track p { color: var(--muted); font-size: 1.15rem; white-space: nowrap; }
.ticker-track b { color: var(--deep); margin-right: 8px; }
.band { background: var(--deep-2); color: #fff; padding: 72px 0; }
.band-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.band p { margin-top: 8px; color: #d6e4f5; }
.band.is-in .band-grid > div { animation: rise 0.7s ease both; }
.band.is-in .band-grid > div:nth-child(2) { animation-delay: 0.12s; }
.band.is-in .band-grid > div:nth-child(3) { animation-delay: 0.24s; }
.site-foot { background: #f7f9fc; color: var(--muted); padding: 56px 0 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.site-foot .mark { margin-bottom: 12px; }
.site-foot h2 { margin-bottom: 12px; color: var(--ink); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.foot-links { display: grid; gap: 8px; }
.foot-links a, .foot-links button { border: 0; background: transparent; padding: 0; color: var(--muted); text-align: left; text-decoration: none; cursor: pointer; font: inherit; }
.foot-links a:hover, .foot-links button:hover { color: var(--deep); }
.foot-bar { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0 20px; box-shadow: inset 0 1px 0 #e4ebf5; font-size: 0.9rem; }
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in { animation: rise 0.8s ease forwards; }
html.modal-open, html.modal-open body { overflow: hidden; }
html.modal-open body { position: fixed; width: 100%; left: 0; right: 0; }
.gate {
  border: 0;
  padding: 26px 26px 22px;
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-radius: 28px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(16, 32, 51, 0.16);
}
.gate::backdrop { background: rgba(16, 32, 51, 0.46); }
.gate form { display: grid; gap: 12px; }
.gate-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.gate h2 { font-size: 1.55rem; letter-spacing: -0.03em; }
.gate .close { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 999px; }
.gate .close:hover { background: var(--field); }
.gate-note, .aside { color: var(--muted); font-size: 0.95rem; }
.aside a { color: var(--deep); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 16px; background: #f3f6fb; border-radius: 999px; }
.modes button { border: 0; background: transparent; border-radius: 999px; padding: 10px 12px; cursor: pointer; color: var(--muted); font: inherit; }
.modes button[aria-selected="true"] { background: #fff; color: var(--deep); box-shadow: 0 6px 16px rgba(16, 32, 51, 0.08); }
.field { display: flex; align-items: center; min-height: 54px; padding: 0 8px 0 14px; background: #f4f7fb; border-radius: 16px; }
.field-icon, .eye { display: inline-flex; color: #7d8da3; flex: none; }
.field-icon svg, .eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.field-icon { padding-right: 12px; box-shadow: 1px 0 0 #d7e0ec; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 14px 10px; color: var(--ink); width: auto; }
.field input:focus { outline: none; box-shadow: none; }
.field:focus-within { background: #fff; box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.28); }
.eye { border: 0; background: transparent; padding: 8px; cursor: pointer; border-radius: 999px; }
.eye.is-on { color: var(--deep); }
.fault { background: var(--fault-bg); color: var(--fault); border-radius: 14px; padding: 12px 14px; }

/* ---------- Cabinet shell ---------- */
html:has(.app-body) { height: 100%; overflow: hidden; }
.app-body { height: 100vh; overflow: hidden; background: var(--wash); }
.frame { display: flex; align-items: stretch; height: 100%; overflow: hidden; background: var(--wash); }
.sidebar {
  flex: 0 0 var(--sidebar);
  width: var(--sidebar);
  background: #0f1115;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 12px 20px;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  color: #e8ecf4;
}
.sidebar .brand {
  width: 100%;
  padding: 6px 10px 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.sidebar .brand-logo {
  display: block;
  height: 28px;
  width: auto;
}
.brand-light { color: #fff; }
.brand-pill {
  margin-left: auto;
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}
.side-nav {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #d7dde8;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.side-nav a i {
  width: 1.2em;
  text-align: center;
  color: #9aa3b5;
  font-size: 0.95rem;
  font-weight: 400;
}
.side-nav a:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}
.side-nav a:hover i { color: #c5cddc; }
.side-nav a[aria-current="page"],
.side-nav .side-parent.is-active {
  color: #3b82f6;
  background: #1c212b;
}
.side-nav a[aria-current="page"] i,
.side-nav .side-parent.is-active i {
  color: #3b82f6;
}
.side-group { display: grid; gap: 2px; }
.side-sub {
  display: none;
  gap: 2px;
  padding: 0 0 4px;
}
.side-group.is-open .side-sub,
.side-group:has([aria-current="page"]) .side-sub {
  display: grid;
}
.side-sub a {
  position: relative;
  padding: 9px 12px 9px 42px;
  color: #a8b0c0;
  font-weight: 550;
  font-size: 0.92rem;
}
.side-sub a::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4a5568;
  transform: translateY(-50%);
}
.side-sub a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.side-sub a[aria-current="page"] {
  color: #3b82f6;
  background: #1c212b;
}
.side-sub a[aria-current="page"]::before { background: #3b82f6; }
.side-label {
  margin: 4px 12px 0;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.side-nav a.side-back {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 10px 10px;
  padding-top: 14px;
  color: #9aa3b5;
  font-weight: 550;
}
.side-nav a.side-back:hover { color: #fff; }
.side-nav a.side-back i { color: #6b7280; }
.workspace { flex: 1 1 auto; min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  flex: none;
  gap: 14px;
  min-height: 64px;
  padding: 8px 22px;
  background: #fff;
  border-bottom: 1px solid #e7edf5;
  z-index: 8;
}
.crumb { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; font-weight: 650; }
.crumb .sep { color: #8aa0b8; font-weight: 500; }
.crumb-link {
  display: inline-flex;
  align-items: center;
  color: #8aa0b8;
  text-decoration: none;
  font-weight: 650;
  border-radius: 8px;
  cursor: pointer;
}
.crumb-link:hover { color: var(--deep); }
.crumb-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}
.crumb-home {
  width: 28px;
  height: 28px;
  justify-content: center;
}
.crumb-home:hover { background: var(--wash); }
.crumb-current {
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.merchant-switch { margin-left: auto; }
.merchant-switch + .session { margin-left: 0; }
.session { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.switch-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 650;
}
.switch-field i { color: var(--deep); }
.switch-field select { border: 0; background: transparent; min-width: 140px; height: 34px; padding: 0 4px; box-shadow: none; font-weight: 650; }
.switch-field select:focus { outline: none; box-shadow: none; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--field); color: var(--deep); }
.nav-toggle { display: none; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; list-style: none; padding: 4px 8px 4px 4px; border-radius: 999px; font-weight: 650; cursor: pointer; }
.user-chip::-webkit-details-marker, .menu-pop summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: #e5f6ec; color: #18864a; font-weight: 700; }
.user-meta { display: grid; line-height: 1.15; text-align: left; }
.user-meta strong { font-size: 0.88rem; }
.user-meta small { color: var(--muted); font-size: 0.75rem; font-weight: 550; }
.user-chip:hover { background: var(--field); }
.menu-pop { position: relative; }
.menu-pop summary { list-style: none; cursor: pointer; }
.pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 20;
  display: grid;
  gap: 4px;
}
.pop a, .pop p, .pop form { margin: 0; }
.pop a { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 650; padding: 8px; border-radius: 10px; color: var(--ink); }
.pop a:hover { background: var(--wash); }
.pop .muted { display: flex; align-items: center; gap: 8px; padding: 8px; color: var(--muted); }
.shell {
  width: auto;
  margin: 0;
  padding: 18px 20px 24px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.app-body .footer {
  width: auto;
  margin: 18px 0 0;
  padding: 0 0 4px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Cabinet content ---------- */
.app-body h1 { font-size: 1.65rem; letter-spacing: -0.03em; font-weight: 700; line-height: 1.2; }
.app-body h2 { font-size: 1rem; letter-spacing: -0.02em; font-weight: 700; }
.page-head > .button, .page-head > a.button { margin-left: auto; }
.shops-head { display: flex; justify-content: flex-end; margin: 0 0 18px; }
.sub, .lede, .muted, .help, .form-note { color: var(--muted); }
.sub { margin-top: 4px; font-size: 0.92rem; }
.eyebrow { color: var(--deep); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; margin: 0 0 6px; }
.shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.shortcut-green { background: #e8f7ee; }
.shortcut-amber { background: #fff6e4; }
.overview-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr); gap: 14px; align-items: stretch; }
.overview-split > .card { margin: 0; min-height: 0; }
.overview-split table { min-width: 0; }
.overview-split > .overview-recent {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.overview-recent .card-head { flex: none; }
.overview-recent .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}
.overview-recent table { min-width: 0; }
.overview-recent td:nth-child(1) {
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}
.overview-recent td:nth-child(2) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.overview-recent .overview-recent-empty:not([hidden]) {
  flex: 1 1 auto;
  display: grid;
  align-content: center;
  margin: 0;
  min-height: 200px;
}
.overview-recent .overview-recent-empty .empty-state {
  min-height: 200px;
  align-content: center;
}
.shortcut {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
}
.shortcut-blue { background: #e8f1ff; }
.shortcut-violet { background: #f3eeff; }
.shortcut:hover { filter: brightness(0.98); }
.shortcut-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.shortcut-copy strong { font-size: 0.98rem; }
.shortcut-copy small { color: var(--muted); font-size: 0.8rem; }
.shortcut .chev { color: #8aa0b8; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 14px; }
.app-body .stat,
.app-body .card,
.app-body .pay-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.app-body .stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 16px 18px;
}
.stat-body { display: grid; gap: 6px; min-width: 0; }
.stat-body p, .stat p { margin: 0; color: var(--muted); font-size: 0.82rem; font-weight: 650; }
.stat-body strong, .stat strong {
  display: block;
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 0.95rem;
}
.tile-blue { background: #e7f0ff; color: #1a73e8; }
.tile-green { background: #e5f6ec; color: #18864a; }
.tile-amber { background: #fff4d8; color: #b58105; }
.tile-violet { background: #f0e9ff; color: #6d4aff; }
.tile-rose { background: #fdecec; color: #9b2c2c; }
.app-body .card, .app-body .pay-card { padding: 18px; margin-bottom: 14px; display: grid; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head a { font-weight: 700; text-decoration: none; }
.range-row { display: inline-flex; gap: 2px; padding: 3px; background: var(--wash); border-radius: 12px; }
.range-row .button { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 9px; box-shadow: none; }
.range-row .button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 32, 51, 0.08); }
.chart-host { position: relative; min-height: 0; }
.chart-host svg, .chart svg { width: 100%; height: 240px; display: block; }
.chart-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.legend { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.82rem; font-weight: 650; margin: 0; }
.legend i { width: 18px; height: 3px; border-radius: 99px; background: var(--deep); display: block; }
.legend-orders i { background: transparent; border-top: 2px dashed #1aa35a; height: 0; border-radius: 0; }
.chart-tip { position: absolute; z-index: 3; pointer-events: none; min-width: 132px; padding: 8px 10px; border-radius: 10px; background: #1b2430; color: #fff; box-shadow: 0 10px 24px rgba(16, 32, 51, 0.22); }
.chart-tip strong { display: block; margin-bottom: 6px; font-size: 0.82rem; }
.chart-tip p { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 0.78rem; }
.chart-tip i { width: 8px; height: 8px; border-radius: 2px; background: #1a73e8; }
.chart-tip i.orders { background: #1aa35a; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 700; background: #f8fbff; }
tbody tr:hover td { background: #f8fbff; }
td a { font-weight: 650; text-decoration: none; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px; font-size: 0.8rem; font-weight: 650; background: var(--wash); color: var(--ink); white-space: nowrap; }
.pill-paid, .pill-confirmed, .pill-delivered, .pill-active, .pill-completed { background: #e7f6ee; color: #18864a; }
.pill-pending { background: #fff4d8; color: #b58105; }
.pill-api { background: #f0e9ff; color: #6d4aff; }
.pill-pending, .pill-awaiting_payment, .pill-partially_paid, .pill-confirming, .pill-retrying { background: #fff4d8; color: #8a6408; }
.pill-expired, .pill-cancelled, .pill-failed, .pill-suspended, .pill-disabled, .pill-rejected { background: var(--fault-bg); color: var(--fault); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
}
.button:hover { background: var(--wash); }
.button-primary { background: var(--deep); color: #fff; border-color: var(--deep); }
.button-primary:hover { background: var(--deep-2); border-color: var(--deep-2); }
.button-quiet { background: transparent; border-color: transparent; }
.button-quiet:hover { background: var(--field); }
.button-danger { color: var(--fault); background: var(--fault-bg); border-color: transparent; }
.button:disabled { opacity: 0.6; cursor: progress; }
.stack, .form-grid, .inline-form { display: grid; gap: 14px; }
.form-grid { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: span 2; }
.inline-form { grid-template-columns: 1fr 180px auto; align-items: end; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 0.88rem; font-weight: 650; }
label.field, label.switch-field { display: flex; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 450;
}
.field input { width: auto; }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 1rem; height: 1rem; padding: 0; accent-color: var(--deep); }
input:focus, select:focus, textarea:focus { border-color: var(--deep); box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15); outline: none; }
.invoice-toolbar { display: flex; align-items: flex-end; gap: 12px; }
.invoice-toolbar .filters { flex: 1 1 auto; min-width: 0; }
.invoice-toolbar > .button,
.invoice-toolbar .invoice-create { flex: none; height: 42px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.filters > label { flex: 1 1 160px; min-width: min(160px, 100%); margin: 0; }
.filters .filter-actions { margin-left: auto; }
.filters .filter-actions .button { min-width: 7.5rem; height: 42px; }
.invoices-table { min-width: 720px; }
.invoices-table .mono {
  font-size: 0.86rem;
  word-break: normal;
  overflow-wrap: anywhere;
}
.pager { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--muted); }
.pager a { font-weight: 700; text-decoration: none; }
.empty { color: var(--muted); background: var(--wash); border: 1px dashed var(--line); border-radius: 12px; padding: 16px; margin: 0; }
.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  padding: 36px 18px;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  border: 1px dashed #d7e2ef;
  border-radius: 16px;
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  color: #7c8da6;
  font-size: 1.35rem;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.06);
  margin-bottom: 4px;
}
.empty-state-title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.empty-state-text {
  margin: 0;
  max-width: 32ch;
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 500;
}
.facts { display: grid; margin: 0; }
.facts div { display: grid; grid-template-columns: 148px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.break { overflow-wrap: anywhere; }
.shop-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.shop-split > .card { margin: 0; }
.label-line { margin: 14px 0 6px; color: var(--ink); font-weight: 650; }
.copy-line { display: flex; gap: 8px; align-items: center; }
.copy-line input { flex: 1; min-width: 0; background: var(--field); }
.secret-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; padding: 12px 14px; border-radius: 12px; background: var(--field); color: var(--muted); }
.secret-note p { margin: 0; }
.secret-once { display: grid; gap: 10px; margin-bottom: 8px; padding: 12px 14px; border-radius: 12px; background: #fff6e4; }
.secret-once p { margin: 0; }
.button-regen { width: 100%; justify-content: center; margin-top: 14px; color: var(--fault); background: #fff; border-color: #f3c4c4; }
.button-regen:hover { background: var(--fault-bg); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.92rem; word-break: break-all; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.86em; background: var(--field); border-radius: 6px; padding: 1px 6px; }
.row-actions, .store-actions, .shop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.shop-grid, .store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.shop-table td { vertical-align: middle; }
.shop-name { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; }
button.shop-name { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.shop-name .tile { width: 34px; height: 34px; border-radius: 10px; font-size: 0.85rem; }
.row-actions { display: inline-flex; gap: 6px; }
.row-actions form { display: inline-flex; }
.row-icon { width: 34px; height: 34px; color: var(--muted); }
.form-card { max-width: 760px; }
.form-card .stack { gap: 16px; }
.req { color: var(--fault); }
.help { display: block; margin-top: 6px; color: var(--muted); font-size: 0.82rem; font-weight: 450; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); }
.empty-store { display: grid; gap: 10px; justify-items: start; }
.store-meta { color: var(--muted); margin: 0; }
.narrow { max-width: 560px; }
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: start; }
.settings-head { margin-bottom: 16px; }
.settings-head h1 { margin: 0 0 4px; }
.settings-stats { margin-bottom: 14px; }
.settings-stat-text {
  font-size: 1.05rem !important;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.settings-grid > .card,
.settings-side > .card,
.settings-sessions {
  margin-bottom: 0;
}
.settings-side {
  display: grid;
  gap: 14px;
  align-content: start;
}
.settings-grid .card-head,
.settings-sessions .card-head {
  align-items: flex-start;
}
.settings-grid .card-head .muted,
.settings-sessions .card-head .muted {
  margin: 4px 0 0;
  font-size: 0.88rem;
}
.settings-grid .form-actions,
.settings-side .form-actions {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.settings-grid textarea {
  min-height: 88px;
}
.sessions-table .session-ua {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.session-actions form { margin: 0; }
.amount { font-size: 2rem; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; font-weight: 700; }
.secret-once { border-color: var(--deep); background: var(--field); }
.volume-list { list-style: none; padding: 0; margin: 0; }
.volume-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
ul, ol { margin: 0; padding-left: 1.2rem; }
li + li { margin-top: 6px; }
#merchant-overview[data-state="loading"] .state-ready,
#merchant-overview[data-state="loading"] .state-error,
#merchant-overview[data-state="loading"] .state-empty,
#merchant-overview[data-state="ready"] .state-loading,
#merchant-overview[data-state="ready"] .state-error,
#merchant-overview[data-state="ready"] .state-empty,
#merchant-overview[data-state="empty"] .state-loading,
#merchant-overview[data-state="empty"] .state-error,
#merchant-overview[data-state="empty"] .state-ready,
#merchant-overview[data-state="error"] .state-loading,
#merchant-overview[data-state="error"] .state-ready,
#merchant-overview[data-state="error"] .state-empty,
#summary[data-state="loading"] .state-ready,
#summary[data-state="loading"] .state-error,
#summary[data-state="ready"] .state-loading,
#summary[data-state="ready"] .state-error,
#summary[data-state="error"] .state-loading,
#summary[data-state="error"] .state-ready { display: none; }
.state-loading, .state-empty { color: var(--muted); }
#content { transition: opacity 180ms ease; }
#content.turbo-out { opacity: 0; }
.turbo-bar { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 50; background: var(--deep); pointer-events: none; opacity: 0; }
.turbo-bar.is-on { opacity: 1; width: 72%; transition: width 400ms ease; }
.turbo-bar.is-done { width: 100%; opacity: 0; transition: width 120ms ease, opacity 180ms ease 100ms; }

/* ---------- Auth ---------- */
.auth-body { background: var(--wash); }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr); }
.auth-aside { background: var(--deep-2); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-aside h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); max-width: 12ch; font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; }
.auth-aside p { max-width: 36ch; color: #d6e4f5; }
.auth-panel { margin: auto; width: min(440px, calc(100% - 40px)); padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.auth-panel h2 { margin: 0; }
.auth-panel .button-primary { min-height: 44px; }

/* ---------- Payment ---------- */
body:has(.checkout), body:has(.pay) { background: var(--wash); }
.checkout { width: min(840px, calc(100% - 32px)); margin: 32px auto 64px; display: grid; gap: 18px; }
.checkout-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkout-secure { margin: 0; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em; }
.checkout-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 28px; border-top: 3px solid var(--deep); }
.checkout[data-state="paid"] .checkout-card { border-top-color: #18864a; }
.checkout[data-state="expired"] .checkout-card { border-top-color: var(--muted); }
.checkout[data-state="cancelled"] .checkout-card,
.checkout[data-state="failed"] .checkout-card { border-top-color: var(--fault); }
.merchant-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.merchant-row img { border-radius: 10px; }
.merchant-name { margin: 0; font-size: 1.05rem; font-weight: 650; }
.checkout-head { display: grid; gap: 6px; margin-bottom: 18px; }
.checkout-head h1 { font-size: 1.85rem; font-weight: 650; }
.status-kicker { margin: 0; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.checkout[data-state="paid"] .status-kicker { color: #18864a; }
.checkout[data-state="failed"] .status-kicker,
.checkout[data-state="cancelled"] .status-kicker { color: var(--fault); }
.checkout-note, .checkout-receipt { color: var(--muted); }
.checkout-timer { font-variant-numeric: tabular-nums; font-weight: 650; }
.checkout-loading { margin: 0 0 12px; color: var(--muted); }
.checkout-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; background: var(--fault-bg); color: var(--fault); }
.checkout-alert p { margin: 0; }
.checkout-grid { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.checkout-qr { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.checkout-qr svg { width: 100%; height: auto; display: block; }
.checkout-fiat { margin: 0; font-size: 2rem; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; font-weight: 700; }
.checkout-crypto { margin: 4px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.checkout-facts { display: grid; gap: 12px; margin: 18px 0; }
.checkout-facts div { display: grid; grid-template-columns: 148px 1fr; gap: 12px; }
.checkout-facts dt { color: var(--muted); }
.checkout-facts dd { margin: 0; }
.conf-meter { display: flex; gap: 6px; margin-top: 8px; }
.conf-meter i { display: block; width: 28px; height: 4px; border-radius: 99px; background: var(--line); }
.conf-meter i.is-on { background: var(--deep); }
.checkout-address { word-break: break-all; background: var(--field); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.checkout-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.checkout-main { display: grid; align-content: start; gap: 4px; }
#pay-continue, #mock-pay { margin-top: 8px; justify-self: start; }
.checkout[data-payable="0"] .pay-tools { display: none; }
.pay { width: min(560px, calc(100% - 32px)); margin: 48px auto; display: grid; gap: 18px; }
.pay-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 28px; display: grid; gap: 12px; }

/* ---------- Admin ---------- */
.admin-body .shell { max-width: none; }
.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.admin-head h1 { margin: 0 0 4px; font-size: 1.55rem; letter-spacing: -0.03em; }
.admin-head .sub { margin: 0; color: var(--muted); max-width: 52ch; }
.admin-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-quick .button { gap: 8px; }
.admin-section-head { margin: 0 0 10px; padding: 0; border: 0; }
.admin-section-head h2 { margin: 0; font-size: 1.05rem; }
.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 18px;
}
.admin-stats-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-filters { margin-bottom: 16px; }
.admin-inline-form {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-charts .chart-host { position: relative; min-height: 220px; }
.admin-charts .chart-host svg { width: 100%; height: 220px; display: block; }
.chart-caption { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
.status-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.status-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--line);
}
.status-card p { margin: 0 0 6px; color: var(--muted); font-size: 0.85rem; font-weight: 650; }
.status-card strong { font-size: 1.05rem; display: block; }
.status-card .status-detail {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  word-break: break-word;
}
.status-online { border-left-color: #18864a; }
.status-degraded { border-left-color: #b58105; }
.status-offline { border-left-color: var(--fault); }
.status-online strong { color: #18864a; }
.status-degraded strong { color: #b58105; }
.status-offline strong { color: var(--fault); }
#admin-status[data-state="loading"] .state-ready,
#admin-status[data-state="loading"] .state-error,
#admin-status[data-state="loading"] .state-empty,
#admin-status[data-state="ready"] .state-loading,
#admin-status[data-state="ready"] .state-error,
#admin-status[data-state="ready"] .state-empty,
#admin-status[data-state="error"] .state-loading,
#admin-status[data-state="error"] .state-ready,
#admin-status[data-state="error"] .state-empty,
#admin-status[data-state="empty"] .state-loading,
#admin-status[data-state="empty"] .state-ready,
#admin-status[data-state="empty"] .state-error,
#admin-overview[data-state="loading"] .state-ready,
#admin-overview[data-state="loading"] .state-error,
#admin-overview[data-state="ready"] .state-loading,
#admin-overview[data-state="ready"] .state-error,
#admin-overview[data-state="error"] .state-loading,
#admin-overview[data-state="error"] .state-ready { display: none; }
.modal { border: 0; border-radius: 16px; padding: 0; max-width: 440px; width: calc(100% - 32px); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(16, 32, 51, 0.45); }
.modal form { display: grid; gap: 12px; padding: 22px; }
.modal-invoice { max-width: 560px; }
.modal form.form-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 0; }
.modal .form-actions { justify-content: flex-end; margin-top: 0; padding-top: 4px; border-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.card-head > .button { margin-left: auto; }
.toasts {
  position: fixed;
  right: 16px;
  top: 16px;
  display: grid;
  gap: 10px;
  z-index: 80;
  width: min(360px, calc(100% - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 12px 12px 12px 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(16, 32, 51, 0.12);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.24s ease, transform 0.24s ease;
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateY(-8px) scale(0.98); }
.toast > i { margin-top: 2px; font-size: 0.95rem; }
.toast > p { margin: 0; min-width: 0; }
.toast-close {
  width: 28px;
  height: 28px;
  margin: -4px -4px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.toast-close:hover { background: var(--wash); color: var(--ink); }
.toast-success > i { color: #18864a; }
.toast-error > i { color: var(--fault); }
.toast-warn > i { color: #b58105; }
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
form.is-loading { opacity: 0.72; }
.detail-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px; }

@keyframes travel { from { top: 0.35em; } to { top: calc(100% - 0.9em); } }
@keyframes state { 0%, 18% { color: var(--ink); font-weight: 650; } 25%, 100% { color: var(--muted); font-weight: 400; } }
@keyframes word { 0%, 8% { opacity: 0; transform: translateY(10px); } 12%, 22% { opacity: 1; transform: none; } 28%, 100% { opacity: 0; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0%, 100% { transform: scaleY(0.35); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

@media (max-width: 1100px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .stats, .charts, .detail-grid, .split, .form-grid, .inline-form, .auth-layout, .checkout-grid, .admin-stats, .admin-stats-compact { grid-template-columns: 1fr 1fr; }
  .auth-layout, .split, .form-grid, .inline-form, .checkout-grid, .detail-grid, .shop-split { grid-template-columns: 1fr; }
  .user-meta { display: none; }
  .frame { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 40; transform: translateX(-110%); background: #0f1115; }
  .sidebar.is-open { transform: none; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
  body:has(.sidebar.is-open)::before { content: ""; position: fixed; inset: 0; background: rgba(4, 8, 16, 0.55); z-index: 30; }
  .nav-toggle { display: inline-flex; flex: none; }
  .topbar {
    flex-wrap: nowrap;
    gap: 8px;
    min-height: 56px;
    padding: 6px 10px 6px 8px;
  }
  .topbar .crumb {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .topbar .merchant-switch {
    flex: 0 1 auto;
    margin-left: 0;
    min-width: 0;
    max-width: min(42vw, 168px);
  }
  .topbar .switch-field {
    height: 36px;
    padding: 0 8px 0 10px;
    max-width: 100%;
  }
  .topbar .switch-field select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .topbar .session {
    flex: none;
    margin-left: 0;
    gap: 2px;
  }
  .topbar .user-chip { padding: 2px; }
  .topbar .icon-btn { width: 36px; height: 36px; }
  .workspace {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
  }
  .shell {
    width: auto;
    margin-inline: 0;
    padding: 14px 14px 20px;
  }
  .overview-split { grid-template-columns: 1fr; }
  .shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .shortcut {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-height: 96px;
    padding: 12px;
    border-radius: 14px;
  }
  .shortcut .chev { display: none; }
  .shortcut-copy strong { font-size: 0.9rem; }
  .shortcut-copy small {
    font-size: 0.72rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stats > :nth-child(3):last-child {
    grid-column: 1 / -1;
  }
  .app-body .stat {
    min-height: 0;
    padding: 12px 14px;
  }
  .stat-body strong, .stat strong { font-size: 1.2rem; }
  .empty-state { padding: 28px 14px; }
  .empty-state-icon { width: 48px; height: 48px; border-radius: 16px; font-size: 1.2rem; }
  .chart-meta {
    width: 100%;
    justify-content: flex-start;
  }
  .range-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .range-row .button {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}
@media (max-width: 800px) {
  .wrap, .top, .hero { width: min(100% - 32px, 1120px); }
  .hero, .flow-grid, .band-grid, .foot-grid { grid-template-columns: 1fr; }
  .hero { gap: 28px; padding-bottom: 84px; }
  .screen h1 { font-size: 1.85rem; }
  .foot-bar { display: grid; }
  .stage { padding: 64px 0 48px; }
  .page-head, .card-head { align-items: flex-start; flex-direction: column; }
  .overview-recent .card-head {
    flex-direction: row;
    align-items: center;
  }
  .shops-head { align-items: flex-end; }
  .invoice-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .invoice-toolbar .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .invoice-toolbar .filter-search { grid-column: 1 / -1; }
  .invoice-toolbar .filter-status,
  .invoice-toolbar .filter-actions { min-width: 0; margin: 0; }
  .invoice-toolbar .filter-actions .button,
  .invoice-toolbar .invoice-create {
    width: 100%;
    min-width: 0;
    height: 42px;
  }
  .invoices-table-wrap { overflow: visible; }
  .invoices-table,
  .invoices-table thead,
  .invoices-table tbody,
  .invoices-table tr,
  .invoices-table th,
  .invoices-table td {
    display: block;
    width: auto;
  }
  .invoices-table { min-width: 0; border-collapse: separate; border-spacing: 0; }
  .invoices-table thead { display: none; }
  .invoices-table tbody { display: grid; gap: 10px; }
  .invoices-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "id status"
      "customer customer"
      "amount origin"
      "pay pay";
    gap: 6px 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
  }
  .invoices-table td {
    padding: 0;
    border: 0;
    background: transparent !important;
    min-width: 0;
  }
  .invoices-table td:nth-child(1) { grid-area: id; }
  .invoices-table td:nth-child(2) {
    grid-area: customer;
    color: var(--muted);
    font-size: 0.86rem;
  }
  .invoices-table td:nth-child(3) {
    grid-area: amount;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .invoices-table td:nth-child(4) {
    grid-area: status;
    justify-self: end;
  }
  .invoices-table td:nth-child(5) { grid-area: origin; justify-self: end; }
  .invoices-table td:nth-child(6) { grid-area: pay; }
  .invoices-table td:nth-child(2)::before,
  .invoices-table td:nth-child(6)::before {
    content: attr(data-label) ": ";
    color: #8aa0b8;
    font-weight: 650;
    font-size: 0.78rem;
  }
  .invoices-table td:nth-child(6):has(a)::before { content: none; }
  .invoices-table td:nth-child(6) a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    margin-top: 2px;
    border-radius: 999px;
    background: #eaf1ff;
    color: var(--deep);
    font-weight: 700;
    text-decoration: none;
  }
  .invoices-table .pill { font-size: 0.75rem; }
  .overview-recent .table-wrap { overflow: visible; }
  .overview-recent table,
  .overview-recent thead,
  .overview-recent tbody,
  .overview-recent tr,
  .overview-recent th,
  .overview-recent td {
    display: block;
    width: auto;
  }
  .overview-recent thead { display: none; }
  .overview-recent table { min-width: 0; border-collapse: separate; border-spacing: 0; }
  .overview-recent tbody { display: grid; gap: 0; }
  .overview-recent tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "order status"
      "amount status";
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .overview-recent tr:last-child { border-bottom: 0; }
  .overview-recent td {
    padding: 0;
    border: 0;
    background: transparent !important;
  }
  .overview-recent td:nth-child(1) {
    grid-area: order;
    max-width: none;
  }
  .overview-recent td:nth-child(2) {
    grid-area: amount;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
  }
  .overview-recent td:nth-child(3) {
    grid-area: status;
    justify-self: end;
  }
  .overview-recent .pill { font-size: 0.75rem; padding: 3px 8px; }
}
@media (max-width: 420px) {
  .topbar .crumb .sep,
  .topbar .crumb-home { display: none; }
  .topbar .merchant-switch { max-width: min(38vw, 132px); }
  .shortcut { min-height: 88px; padding: 10px; }
  .shortcut-copy small { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-sessions .card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .settings-sessions .card-head .button { width: 100%; }
  .sessions-table-wrap { overflow: visible; }
  .sessions-table,
  .sessions-table thead,
  .sessions-table tbody,
  .sessions-table tr,
  .sessions-table th,
  .sessions-table td {
    display: block;
    width: auto;
  }
  .sessions-table { min-width: 0; border-collapse: separate; border-spacing: 0; }
  .sessions-table thead { display: none; }
  .sessions-table tbody { display: grid; gap: 10px; }
  .sessions-table tr {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
  }
  .sessions-table td {
    padding: 0;
    border: 0;
    background: transparent !important;
  }
  .sessions-table .session-ua {
    max-width: none;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sessions-table td:not(.session-actions)::before {
    content: attr(data-label) ": ";
    color: #8aa0b8;
    font-weight: 650;
    font-size: 0.78rem;
  }
  .session-actions { justify-content: flex-start; margin-top: 4px; }
}
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.order-back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--muted); }
.order-id { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: -0.03em; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.order-actions form { margin: 0; }
.order-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 14px; align-items: start; }
.order-grid .card h2, .buyer-card h2 { margin: 0 auto 0 0; font-size: 1.02rem; }
.card-head .bubble { margin-right: 2px; }
.kv-list { display: grid; margin: 0; }
.kv { display: grid; grid-template-columns: 34px minmax(108px, 0.8fr) minmax(0, 1.4fr); gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv dt { margin: 0; color: var(--muted); font-size: 0.84rem; }
.kv dd { margin: 0; text-align: right; font-weight: 680; overflow-wrap: anywhere; }
.address-line { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.bubble { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 0.86rem; }
.bubble-lg { width: 52px; height: 52px; border-radius: 16px; font-size: 1.15rem; }
.bubble-blue { background: #e7f0ff; color: #1a73e8; }
.bubble-green { background: #e5f6ec; color: #18864a; }
.bubble-amber { background: #fff4d8; color: #b58105; }
.bubble-violet { background: #f0e9ff; color: #6d4aff; }
.bubble-rose { background: #fdecec; color: #c24141; }
.bubble-slate { background: #eef2f6; color: #5c6e86; }
.buyer-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mini-stat { display: grid; gap: 6px; min-width: 0; padding: 12px; border-radius: 14px; background: var(--wash); }
.mini-stat p { margin: 0; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.mini-stat strong { font-size: 1.15rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mini-date { font-size: 0.78rem !important; font-weight: 700; line-height: 1.3; }
.timeline { list-style: none; display: grid; gap: 0; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 36px; bottom: 2px; width: 2px; background: var(--line); }
.step strong { display: block; }
.step p { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.step-wait { opacity: 0.72; }
.order-empty { display: grid; justify-items: center; gap: 10px; padding: 28px 8px; color: var(--muted); text-align: center; }
.order-empty p { margin: 0; }
.pay-link { overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .order-grid { grid-template-columns: 1fr; }
  .order-actions { margin-left: 0; }
}
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.docs-nav { position: sticky; top: 12px; display: grid; gap: 4px; padding: 10px; }
.docs-nav a { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 12px; text-decoration: none; font-weight: 700; color: var(--ink); }
.docs-nav a:hover { background: var(--wash); }
.docs-nav .bubble { width: 28px; height: 28px; border-radius: 9px; font-size: 0.75rem; }
.docs-main { display: grid; gap: 14px; min-width: 0; }
.docs-main .card { margin-bottom: 0; }
.docs-main .card > .mono { margin: 0 0 12px; color: var(--muted); font-weight: 650; }
.docs-main .table-wrap { margin-top: 12px; }
.doc-code { margin: 0; padding: 14px 16px; border-radius: 14px; background: #102033; color: #e7eef8; overflow: auto; font-size: 0.8rem; line-height: 1.5; }
.docs-main .doc-code + .table-wrap,
.docs-main .doc-code + .kv-list,
.docs-main .doc-code + .muted { margin-top: 12px; }
.docs-main .muted { margin-top: 10px; }
@media (max-width: 980px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; }
}
html:has(.flow-body) { height: 100%; overflow: hidden; }
.flow-body { margin: 0; height: 100dvh; overflow: hidden; background: #eef1f6; color: #1b2433; }
.flow-body .flow { position: relative; width: min(440px, calc(100% - 32px)); height: 100%; margin: 0 auto; padding: 16px 0 12px; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; }
.flow-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.flow-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.flow-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: #1b2433; font-weight: 750; letter-spacing: -0.03em; }
.flow-brand img { width: 28px; height: 28px; flex: none; }
.flow-brand span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-bubble { position: relative; z-index: 2; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #fff; color: #5c6b80; box-shadow: 0 1px 2px rgba(16, 32, 51, 0.08); display: grid; place-items: center; flex: none; cursor: pointer; }
.flow-bubble .flow-caret { margin-top: -2px; }
.flow-bubble[aria-expanded="true"] .flow-caret { transform: rotate(225deg); margin-top: 2px; }
.flow-top + .flow-details {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: 58px;
  max-height: calc(100% - 74px);
  margin: 0;
  overflow: auto;
  padding: 12px 14px 10px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(28, 43, 68, 0.08);
}
.flow-top-tools { display: flex; align-items: center; gap: 8px; }
.flow-pill { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border-radius: 999px; background: #fff; color: #5c6b80; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 1px 2px rgba(16, 32, 51, 0.06); }
.flow-live, .flow-card-timer { display: none; }
.flow-body .flow[data-step="pay"] .flow-live { display: inline-flex; }
.flow-clock { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.flow-clock::before { content: ""; position: absolute; left: 5px; top: 2px; width: 1.5px; height: 5px; background: currentColor; }
.flow-live { width: 28px; height: 28px; border-radius: 50%; background: #e8f8ee; color: #18a957; position: relative; }
.flow-live::after { content: ""; position: absolute; left: 8px; top: 8px; width: 8px; height: 5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.flow-details[hidden] { display: none; }
.flow-card { flex: 1 1 auto; min-height: 0; overflow: auto; background: #fff; border-radius: 28px; box-shadow: 0 10px 40px rgba(28, 43, 68, 0.06); padding: 26px 22px 22px; }
.flow-step { display: none; }
.flow-body .flow[data-step="coins"] .flow-step-coins,
.flow-body .flow[data-step="networks"] .flow-step-networks,
.flow-body .flow[data-step="pay"] .flow-step-pay,
.flow-body .flow[data-step="paid"] .flow-step-paid,
.flow-body .flow[data-step="expired"] .flow-step-expired { display: block; }
.flow-body .flow[data-step="pay"] .flow-step-pay { display: flex; flex-direction: column; min-height: 0; }
.flow > .flow-shop { display: none; }
.flow[data-step="pay"] > .flow-shop { display: block; }
.flow-sum { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.flow-merchant { margin: 0; font-weight: 750; font-size: 1.05rem; }
.flow-fiat { margin: 6px 0 0; font-size: 2.35rem; line-height: 1.05; letter-spacing: -0.04em; font-weight: 760; }
.flow-sum .flow-fiat { margin-top: 0; }
.flow-details-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 0; border: 0; background: transparent; color: #8b95a7; font-weight: 650; cursor: pointer; }
.flow-details { margin: 12px 0 0; display: grid; gap: 8px; }
.flow-details-title {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef1f6;
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #1b2433;
}
.flow-details-list { margin: 0; display: grid; gap: 0; }
.flow-kv {
  display: grid;
  grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid #f1f3f7;
}
.flow-kv:last-child { border-bottom: 0; }
.flow-kv dt {
  margin: 0;
  color: #5c6b80;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.25;
}
.flow-kv dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1b2433;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flow-kv-mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.flow-kv-due {
  margin-top: 4px;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: #f3f8ff;
}
.flow-kv-due dt { color: #3d6fb8; }
.flow-kv-due dd { color: #1a73e8; font-size: 0.92rem; font-weight: 780; }
.flow-card h2 { margin: 18px 0 12px; padding-top: 16px; border-top: 1px solid #eef1f6; font-size: 0.98rem; font-weight: 700; }
.flow-list { display: grid; gap: 0; border: 1px solid #e6ebf2; border-radius: 16px; overflow: hidden; }
.flow-row, .flow-back, .flow-link, .flow-shop { font: inherit; }
.flow-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; border-radius: 0; background: #fff; text-align: left; cursor: pointer; }
.flow-row + .flow-row { border-top: 1px solid #e6ebf2; }
.flow-row:hover { background: #f7f9fc; }
.flow-row-copy { display: grid; gap: 2px; min-width: 0; }
.flow-row-copy strong { font-size: 1rem; }
.flow-row-copy small { color: #8b95a7; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.flow-logo { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden; background: transparent; }
.flow-logo img { width: 40px; height: 40px; display: block; }
.flow-nets { display: inline-flex; align-items: center; }
.flow-nets img { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.flow-nets img + img { margin-left: -5px; }
.flow-chevron { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #9aa6b8; border-bottom: 2px solid #9aa6b8; transform: rotate(-45deg); flex: none; }
.flow-chevron-left { transform: rotate(135deg); margin: 0; }
.flow-caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); display: inline-block; }
.flow-back { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; font-weight: 750; padding: 0 0 8px; cursor: pointer; }
.flow-error { color: #d64545; margin: 10px 0 0; }
.flow-asset { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 0 12px; }
.flow-asset .flow-logo, .flow-asset .flow-logo img { width: 64px; height: 64px; }
.flow-asset-copy { min-width: 0; }
.flow-crypto { display: flex; align-items: baseline; gap: 5px; margin: 0; line-height: 1.1; }
.flow-crypto b { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.045em; color: #141b29; }
.flow-crypto span { color: #66748a; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.flow-chain { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin: 8px 0 0; padding: 5px 16px 5px 12px; border: 1px solid #e3e8ef; border-radius: 999px; background: #f6f8fb; color: #1b2433; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.flow-chain-icon { width: 16px; height: 16px; display: grid; place-items: center; flex: none; }
.flow-chain-icon svg,
.flow-chain-icon img { width: 100%; height: 100%; display: block; transform: scale(1.5); }
.flow-chain-icon[data-icon="bnb"] svg,
.flow-chain-icon[data-icon="bnb"] img { transform: scale(1.28); }
.flow-chain-icon[data-icon="ton"] svg,
.flow-chain-icon[data-icon="ton"] img { transform: none; }
.flow-body .flow[data-step="pay"] .flow-card { padding: 18px 18px 14px; container-type: size; }
.flow-qr { position: relative; width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 12px; border: 1px solid #edf1f6; border-radius: 26px; background: #fff; }
/* 380px is everything else in the pay step; keeps the page from scrolling. */
.flow-qr-art { position: relative; max-width: 270px; max-width: clamp(150px, calc(100cqh - 380px), 310px); margin: 0 auto; }
.flow-qr-frame { position: relative; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #fff; }
.flow-qr-skeleton {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.7) 45%, transparent 90%),
    repeating-conic-gradient(from 0deg, #eef2f7 0deg 90deg, #e4eaf2 90deg 180deg);
  background-size: 220% 100%, 18px 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.flow-qr[data-qr="loading"] .flow-qr-skeleton {
  opacity: 1;
  animation: flow-qr-shimmer 1.1s linear infinite;
}
.flow-qr-code {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.34s ease, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.flow-qr[data-qr="ready"] .flow-qr-code {
  opacity: 1;
  transform: scale(1);
}
.flow-qr[data-qr="loading"] .flow-qr-code {
  opacity: 0;
  transform: scale(0.96);
  transition-duration: 0.16s;
}
.flow-qr-code > svg { width: 100%; height: auto; display: block; }
.flow-qr-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.92);
  display: grid;
  opacity: 0;
  transition: opacity 0.28s ease 0.06s, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) 0.06s;
  z-index: 2;
}
.flow-qr[data-qr="ready"] .flow-qr-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.flow-qr[data-qr="loading"] .flow-qr-badge {
  opacity: 0.35;
  transform: translate(-50%, -50%) scale(0.92);
  transition-duration: 0.14s;
  transition-delay: 0s;
}
.flow-qr-plate { width: 100%; height: 100%; border-radius: 22%; overflow: hidden; background: #10182A; display: grid; place-items: center; }
.flow-qr-plate svg, .flow-qr-plate img { width: 100%; height: 100%; display: block; transform: scale(1.5); }
.flow-qr-badge[data-icon="bnb"] svg,
.flow-qr-badge[data-icon="bnb"] img { transform: scale(1.28); }
.flow-qr-badge[data-icon="ton"] svg,
.flow-qr-badge[data-icon="ton"] img { width: 72%; height: 72%; transform: none; }
.flow-paybox.is-loading,
.flow-qr[data-qr="loading"] + .flow-paybox { opacity: 0.72; transition: opacity 0.2s ease; }
@keyframes flow-qr-shimmer {
  0% { background-position: 120% 0, 0 0; }
  100% { background-position: -120% 0, 0 0; }
}
.flow-paybox { margin: 0 0 4px; border: 1px solid #e3e8ef; border-radius: 22px; background: #f7f9fc; }
.flow-payrow { position: relative; display: grid; gap: 4px; padding: 12px 56px 12px 16px; }
.flow-payrow + .flow-payrow::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: #e3e8ef; }
.flow-pay-label { color: #8b95a7; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.flow-pay-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 0; }
.flow-pay-amount b { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; color: #141b29; white-space: nowrap; }
.flow-pay-amount span { color: #8b95a7; font-size: 0.95rem; font-weight: 600; white-space: nowrap; }
.flow-pay-address { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; font-size: 0.9rem; font-weight: 700; line-height: 1.5; color: #141b29; word-break: break-all; }
.flow-chunk { color: #141b29; }
.flow-chunk-dim { color: #9aa6b8; }
.flow-copy {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 1px solid #e3e8ef;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.flow-copy::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 9px;
  width: 10px;
  height: 12px;
  border: 1.6px solid #5c6b80;
  border-radius: 3px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.flow-copy::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 13px;
  width: 10px;
  height: 12px;
  border: 1.6px solid #5c6b80;
  border-radius: 3px;
  background: #fff;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.flow-copy:hover { background: #eef2f7; }
.flow-copy:hover::after { background: #eef2f7; }
.flow-copy.is-copied {
  background: #e8f8ee;
  border-color: #b7e6c8;
  box-shadow: 0 0 0 3px rgba(24, 169, 87, 0.12);
  transform: translateY(-50%) scale(1.06);
}
.flow-copy.is-copied::before {
  opacity: 0;
  transform: scale(0.6);
}
.flow-copy.is-copied::after {
  left: 14px;
  top: 10px;
  width: 7px;
  height: 13px;
  border: 0;
  border-right: 2.5px solid #18a957;
  border-bottom: 2.5px solid #18a957;
  border-radius: 0;
  background: transparent;
  transform-origin: center;
  animation: flow-copy-check 0.38s cubic-bezier(0.2, 0.9, 0.2, 1.2) forwards;
}
@keyframes flow-copy-check {
  0% { transform: rotate(45deg) scale(0.2); opacity: 0; }
  60% { transform: rotate(45deg) scale(1.12); opacity: 1; }
  100% { transform: rotate(45deg) scale(1); opacity: 1; }
}
.flow-wait { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 6px 0 8px; color: #5c6b80; }
.flow-spin { width: 14px; height: 14px; box-sizing: border-box; border: 2px solid #5c6b80; border-right-color: transparent; border-radius: 50%; animation: flow-spin 0.9s linear infinite; }
@keyframes flow-spin { to { transform: rotate(360deg); } }
.flow-link, .flow-shop { display: block; width: 100%; margin-top: 8px; border: 0; background: transparent; color: #4a5568; text-align: center; text-decoration: none; font-size: 1.05rem; font-weight: 700; cursor: pointer; }
.flow-shop { margin-top: 14px; color: #5c6b80; font-size: 1rem; font-weight: 700; }
.flow-amp { font-style: normal; color: #8b95a7; }
.flow-result { text-align: center; padding-top: 36px; box-sizing: border-box; }
.flow-body .flow[data-step="paid"] .flow-step-paid,
.flow-body .flow[data-step="expired"] .flow-step-expired { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; }
.flow-result .flow-fiat { margin: 0 0 18px; }
.flow-result .flow-details { text-align: left; }
.flow-mark { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; }
.flow-mark-expired { background: linear-gradient(180deg, #fff4e8 0%, #ffe8d6 100%); color: #e07a2f; box-shadow: inset 0 0 0 1px rgba(224, 122, 47, 0.12); }
.flow-mark-expired i { font-size: 2rem; line-height: 1; }
.flow-back-shop { margin-top: 22px; min-width: min(100%, 240px); min-height: 48px; text-decoration: none; }
.flow-mark-bad { background: #fdecec; color: #e5484d; }
.flow-mark-bad::before, .flow-mark-bad::after { content: ""; position: absolute; left: 42px; top: 26px; width: 3px; height: 36px; background: currentColor; border-radius: 2px; }
.flow-mark-bad::before { transform: rotate(45deg); }
.flow-mark-bad::after { transform: rotate(-45deg); }
.flow-mark-ok { background: #e8f8ee; color: #18a957; }
.flow-mark-ok::after { content: ""; position: absolute; left: 28px; top: 34px; width: 28px; height: 14px; border-left: 3.5px solid currentColor; border-bottom: 3.5px solid currentColor; transform: rotate(-45deg); }
.flow-result h2 { border: 0; padding-top: 0; margin: 0; }
.flow-result-title { margin: 0; font-size: 1.7rem; letter-spacing: -0.03em; }
.flow-result-bad { color: #1b2433; }
.flow-result-ok { color: #18a957; }
.flow-result p { margin: 10px 0 0; max-width: 280px; color: #5c6b80; line-height: 1.45; }
.flow-body .flow[data-step="expired"] .flow-pill,
.flow-body .flow[data-step="paid"] .flow-pill { opacity: 0.55; }
.flow-foot { flex: none; margin: 8px 0 0; text-align: center; color: #9aa6b8; font-size: 0.8rem; }
@media (max-height: 760px) {
  .flow-body .flow { padding-top: 12px; }
  .flow-card { padding: 18px 16px 14px; }
  .flow-card h2 { margin: 12px 0 8px; padding-top: 10px; }
  .flow-list { gap: 0; }
  .flow-row { padding: 8px 12px; }
  .flow-fiat { font-size: 2rem; }
}
.flow-mock { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit-states::after, .orbit-states li, .stage-words span, .ticker-track, .cue::after, .flow-line line, .flow-grid article, .reveal, #content, .turbo-bar { animation: none; transition: none; }
  .stage-words span:first-child, .orbit-states li:first-child, .reveal, .flow-grid article { opacity: 1; transform: none; }
  .flow-line line { stroke-dashoffset: 0; }
  .flow-copy, .flow-copy::before, .flow-copy::after { transition: none; }
  .flow-copy.is-copied::after { animation: none; transform: rotate(45deg) scale(1); opacity: 1; }
  .flow-qr-skeleton { animation: none !important; }
  .flow-qr-code, .flow-qr-badge { transition: none; transform: none; }
  .flow-qr[data-qr="ready"] .flow-qr-code,
  .flow-qr[data-qr="ready"] .flow-qr-badge { opacity: 1; }
}
