:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  background: #f4f6f8;
  color: #0d1726;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.app {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #0d1726;
  --ink-soft: #334155;
  --muted: #667386;
  --line: #e1e6ec;
  --line-strong: #c9d2dd;
  --accent: #0c8f6c;
  --accent-strong: #0a6b51;
  --accent-soft: #e6f5ef;
  --warn: #9a5b0b;
  --warn-soft: #fdf3e2;
  --danger: #b23a3a;
  --danger-soft: #fbecec;
  --info: #2c5c8f;
  --info-soft: #eaf1f8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13, 23, 38, 0.04), 0 12px 34px rgba(13, 23, 38, 0.06);
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

.console {
  --bg: #0b1220;
  --surface: #121b2d;
  --surface-soft: #0f1728;
  --ink: #eef2f7;
  --ink-soft: #c7d2e0;
  --muted: #8fa0b6;
  --line: #223049;
  --line-strong: #334667;
  --accent: #57dfb0;
  --accent-strong: #8af0cc;
  --accent-soft: #12352c;
  --warn: #f0b968;
  --warn-soft: #332512;
  --danger: #f19a9a;
  --danger-soft: #341b1b;
  --info: #9dc4ef;
  --info-soft: #16283c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 18px 50px rgba(0, 0, 0, 0.22);
}

.checkout {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #0d1726;
  --ink-soft: #334155;
  --muted: #667386;
  --line: #e1e6ec;
  --line-strong: #c9d2dd;
  --accent: #0c8f6c;
  --accent-strong: #0a6b51;
  --accent-soft: #e6f5ef;
  --warn: #9a5b0b;
  --warn-soft: #fdf3e2;
  --danger: #b23a3a;
  --danger-soft: #fbecec;
  --info: #2c5c8f;
  --info-soft: #eaf1f8;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 26px 24px 64px;
}

.checkout-shell {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 20px 16px calc(48px + env(safe-area-inset-bottom));
}

.topbar,
.checkout-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}

.brand--light {
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--mode {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.badge--secure {
  color: var(--accent-strong);
  border-color: transparent;
  background: var(--accent-soft);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  padding: 0 12px;
  min-height: 32px;
}

.badge svg {
  width: 13px;
  height: 13px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.console-main {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.console-main .panel {
  min-width: 0;
}

.orders-head {
  margin-bottom: 14px;
}

.orders-head h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.panel-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.orders-toolbar input,
.orders-toolbar select {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.orders-toolbar input:focus,
.orders-toolbar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.orders-search {
  flex: 1 1 280px;
  min-width: 200px;
}

.orders-toolbar select {
  flex: 0 0 auto;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid--create {
  grid-template-columns: minmax(160px, 1.2fr) minmax(110px, 0.65fr) minmax(180px, 1fr) minmax(160px, 1fr) auto;
  align-items: end;
}

.form-grid--create .create-submit {
  justify-content: end;
}

.form-grid--create .btn {
  min-height: 46px;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--bg);
}

.console .btn--primary {
  color: #06231b;
}

.checkout .btn--primary {
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--accent-strong);
  border-color: transparent;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn--ghost:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.btn--sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.btn--wide {
  width: 100%;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.form-error {
  min-height: 0;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

.orders-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.orders-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  font-size: 12px;
}

.orders-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.orders-table td {
  padding: 12px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.orders-table tbody tr:first-child td {
  border-top: 0;
}

.orders-row[data-action] {
  cursor: pointer;
}

.orders-row:hover {
  background: var(--surface-soft);
}

.orders-row.is-selected {
  background: var(--accent-soft);
}

.orders-row.is-selected:hover {
  background: var(--accent-soft);
}

.orders-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.orders-table .actions-col,
.orders-table .actions-cell {
  text-align: right;
  white-space: nowrap;
}

.orders-table .actions-col {
  width: 1%;
}

.orders-table .network-cell,
.orders-table .time-cell {
  color: var(--ink-soft);
  white-space: nowrap;
}

.orders-table code {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.order-id {
  display: grid;
  gap: 2px;
  max-width: 220px;
  min-width: 0;
}

.order-id strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-id span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amount-cell strong {
  color: var(--ink);
  font-weight: 600;
}

.amount-cell span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
}

.orders-empty {
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
}

.orders-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.tone-success {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tone-info {
  background: var(--info-soft);
  color: var(--info);
}

.tone-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.tone-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.tone-muted {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--muted);
}

.test-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.test-row:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.test-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.test-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-row span {
  color: var(--muted);
  font-size: 12px;
}

.test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.empty {
  padding: 30px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.sweep-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sweep-form {
  min-width: 0;
}

.sweep-auto-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}

.sweep-auto-toggle > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.sweep-auto-toggle input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent);
}

.sweep-save {
  display: flex;
  align-items: flex-end;
}

.sweep-save .btn {
  width: 100%;
}

.sweep-result {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.sweep-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.sweep-gas-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.sweep-gas-line code {
  color: var(--ink);
  font-family: var(--mono);
}

.sweep-gas-line strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sweep-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.sweep-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.sweep-stats > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.sweep-stats span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.sweep-stats strong {
  display: block;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.sweep-warnings {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--warn);
  font-size: 12px;
  line-height: 1.6;
}

.sweep-table-wrap {
  overflow-x: auto;
}

.sweep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.sweep-table th {
  padding: 0 8px 6px;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.sweep-table td {
  padding: 8px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.sweep-table td code {
  font-family: var(--mono);
  font-size: 11px;
}

.sweep-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sweep-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.sweep-tag--ok {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.sweep-tag--warn {
  border-color: transparent;
  background: var(--warn-soft);
  color: var(--warn);
}

.sweep-tag--error {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}

.checkout-top {
  margin-bottom: 22px;
}

.link-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.link-btn:hover {
  color: var(--ink);
}

.checkout-head {
  margin-bottom: 18px;
}

.checkout-head h1 {
  margin: 0;
  font-size: clamp(26px, 5.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.checkout-head h1 span {
  color: var(--accent-strong);
}

.checkout-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.checkout-sub strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.checkout-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.checkout-flow--joined {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pay-card,
.status-card {
  padding: 22px;
}

.checkout-flow--joined .pay-card,
.checkout-flow--joined .status-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.checkout-flow--joined .status-card {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.checkout-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.checkout-toggle-icon {
  flex: none;
  font-size: 13px;
  line-height: 1;
}

.checkout-progress {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pay-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.amount-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.amount {
  font-size: clamp(38px, 5.4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.asset {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.fiat-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.fiat-note strong {
  color: var(--ink-soft);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

.copy-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.qr-wrap {
  display: grid;
  justify-items: center;
  padding: 26px 0 18px;
}

.qr {
  display: grid;
  place-items: center;
  width: 196px;
  height: 196px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.qr-fallback {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  word-break: break-all;
}

.qr-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.address-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.address-box > div {
  min-width: 0;
}

.address-box code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}

.meta {
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.meta > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.meta > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta dt {
  color: var(--muted);
  font-size: 12px;
}

.meta dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: right;
}

.status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}


.status-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.status-banner {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.status-banner--success {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-banner--info {
  border-color: transparent;
  background: var(--info-soft);
  color: var(--info);
}

.status-banner--warn {
  border-color: transparent;
  background: var(--warn-soft);
  color: var(--warn);
}

.status-banner--danger {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}

.status-banner--muted {
  border-color: transparent;
  background: var(--surface-soft);
  color: var(--muted);
}


.confirm-progress {
  --confirm-bar: #0c8f6c;
  --confirm-bar-2: #19b98a;
  --confirm-ink: #0a6b51;
  --confirm-border: #d9ece4;
  --confirm-bg: #f5fbf9;
  margin: 16px 0;
  padding: 15px;
  border: 1px solid var(--confirm-border);
  border-radius: 13px;
  background: var(--confirm-bg);
}

.confirm-progress[data-tone="success"] {
  --confirm-border: #cde8dc;
  --confirm-bg: #f1faf6;
}

.confirm-progress[data-tone="warn"] {
  --confirm-bar: #c07a12;
  --confirm-bar-2: #dda03a;
  --confirm-ink: #9a5b0b;
  --confirm-border: #f0e2c6;
  --confirm-bg: #fdf8ef;
}

.confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.confirm-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.confirm-kicker::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--confirm-bar);
  content: "";
}

.confirm-end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.confirm-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.confirm-pct {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--confirm-ink);
  font-variant-numeric: tabular-nums;
}

.confirm-pct strong {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.confirm-pct span {
  font-size: 12px;
  font-weight: 600;
}

.confirm-track {
  position: relative;
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf0;
}

.confirm-fill {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--confirm-bar), var(--confirm-bar-2));
  transition: width 1.4s cubic-bezier(0.33, 0, 0.2, 1);
}

.confirm-fill::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.38) 50%, rgba(255, 255, 255, 0) 80%);
  background-size: 220% 100%;
  content: "";
  opacity: 0;
}

.confirm-progress[data-tone="info"] .confirm-fill::after {
  opacity: 1;
  animation: confirmSheen 2.4s linear infinite;
}

.confirm-tip {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(13, 23, 38, 0.24);
  transform: translate(50%, -50%);
}

.confirm-tip.is-hidden {
  display: none;
}

.confirm-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 550;
}

.confirm-marks .is-active {
  color: var(--confirm-ink);
  font-weight: 650;
}

.confirm-marks .is-done {
  color: var(--ink-soft);
}

.confirm-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed var(--confirm-border);
}

.confirm-stats > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.confirm-stats > div + div {
  padding-left: 12px;
  border-left: 1px solid var(--confirm-border);
}

.confirm-stats strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.confirm-stats span {
  color: var(--muted);
  font-size: 10.5px;
}

.confirm-live {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.confirm-pulse {
  position: relative;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--confirm-bar);
}

.confirm-pulse::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--confirm-bar);
  content: "";
  animation: confirmPing 2.2s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}

.confirm-progress[data-tone="success"] .confirm-pulse::after {
  animation: none;
}

@keyframes confirmSheen {
  from {
    background-position: 140% 0;
  }
  to {
    background-position: -60% 0;
  }
}

@keyframes confirmPing {
  0% {
    opacity: 0.45;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(2.8);
  }
}


@media (max-width: 620px) {
  .confirm-progress {
    padding: 13px;
  }

  .confirm-pct strong {
    font-size: 25px;
  }

  .confirm-stats strong {
    font-size: 11.5px;
  }
}
.timeline-label {
  margin-top: 20px;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 10px 0 18px;
  padding: 0;
  list-style: none;
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 18px;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-step::before {
  position: absolute;
  top: 14px;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-step:last-child::before {
  display: none;
}

.dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.timeline-step strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.timeline-step span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-step.is-done .dot,
.timeline-step.is-active .dot {
  background: var(--accent);
}

.timeline-step.is-active .dot {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-step.is-pending {
  opacity: 0.62;
}

.expiry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.expiry strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.tx-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.tx-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tx-panel-head h3 {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.step-chip {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.tx-panel-lede {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.tx-form {
  display: grid;
  gap: 10px;
}

.tx-form .btn {
  margin-top: 2px;
}

.toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  max-width: min(90vw, 460px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #0d1726;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(13, 23, 38, 0.24);
  font-size: 13px;
  line-height: 1.4;
  transform: translateX(-50%);
  animation: toast-in 180ms ease-out;
}

.toast--danger {
  background: #8f2f2f;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.loading-card {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.noscript {
  padding: 24px;
  color: #0d1726;
  font-family: var(--sans);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .sweep-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sweep-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid--create {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid--create .create-submit {
    grid-column: 1 / -1;
  }

  .form-grid--create .btn {
    width: 100%;
  }

  .checkout-top {
    margin-bottom: 20px;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 20px 16px 52px;
  }

  .checkout-shell {
    padding: 16px 12px calc(44px + env(safe-area-inset-bottom));
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .orders-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-search,
  .orders-toolbar select {
    flex: 1 1 auto;
    width: 100%;
  }

  .orders-head {
    align-items: center;
  }

  .test-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .test-actions {
    justify-content: flex-start;
  }

  .pay-card,
  .status-card,
  .panel {
    padding: 18px;
  }

  .amount {
    font-size: 38px;
  }

  .qr {
    width: 172px;
    height: 172px;
  }

  .address-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-btn {
    margin-left: 0;
  }

  .meta > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .meta dd {
    text-align: left;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Merchant sign-in */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(79, 70, 229, 0.18), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(16, 185, 129, 0.14), transparent 55%),
    #f4f6f8;
}

.login-card {
  width: min(440px, 100%);
  padding: 34px 32px 30px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.login-card .brand { margin-bottom: 26px; }
.login-card .eyebrow { margin-bottom: 6px; }
.login-card h1 { margin: 0 0 10px; font-size: 26px; letter-spacing: -0.02em; color: #0f172a; }
.login-lede { margin: 0 0 22px; color: #5b6472; font-size: 14px; line-height: 1.65; }
.login-card .field { margin-bottom: 16px; }
.login-card .form-hint { margin-top: 16px; }

.field--wide { grid-column: 1 / -1; }
