:root {
  color-scheme: dark;
  --bg: #070708;
  --bg-raised: #0d0d10;
  --panel: rgba(18, 18, 22, 0.9);
  --panel-strong: rgba(20, 20, 24, 0.98);
  --text: #f8f7f3;
  --soft: rgba(241, 239, 233, 0.76);
  --muted: rgba(209, 206, 200, 0.54);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --violet: #6e32ff;
  --violet-bright: #8a5dff;
  --coral: #ff5b4d;
  --coral-bright: #ff776a;
  --aqua: #8ee7d3;
  --amber: #f4c76b;
  --green: #b9f5b8;
  --red: #ff7b87;
  --radius: 8px;
  --radius-large: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --gradient: linear-gradient(120deg, var(--violet) 0%, #7b38f8 43%, var(--coral) 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 22% -10%, rgba(110, 50, 255, 0.12), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(255, 91, 77, 0.08), transparent 26%),
    linear-gradient(180deg, #0b0b0d, var(--bg) 280px);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled),
a {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.primary-button,
.ghost-button,
.small-button,
.text-button,
.icon-button {
  border: 0;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.primary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  border-radius: var(--radius);
  color: white;
  background: var(--gradient);
  box-shadow: 0 12px 34px rgba(110, 50, 255, 0.22);
  font-weight: 900;
}

.primary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.small-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-button.compact {
  min-height: 40px;
  padding: 0 14px;
  font-size: 12px;
}

.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 800;
}

.ghost-button {
  min-height: 42px;
  padding: 0 15px;
}

.ghost-button.compact {
  min-height: 40px;
  padding: 0 14px;
  font-size: 11px;
}

.small-button {
  min-height: 32px;
  padding: 0 11px;
  color: #17130a;
  background: var(--amber);
  border-color: rgba(244, 199, 107, 0.72);
  font-size: 11px;
}

.small-button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.text-button,
.table-link {
  padding: 4px;
  color: var(--aqua);
  background: transparent;
  font-weight: 850;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-size: 20px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(142, 231, 211, 0.09), 0 0 18px rgba(142, 231, 211, 0.54);
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  50% { opacity: 0.55; transform: scale(0.88); }
}

.pill {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.pill.aqua { color: var(--aqua); border-color: rgba(142, 231, 211, 0.28); background: rgba(142, 231, 211, 0.08); }
.pill.amber { color: var(--amber); border-color: rgba(244, 199, 107, 0.3); background: rgba(244, 199, 107, 0.09); }
.pill.green { color: var(--green); border-color: rgba(185, 245, 184, 0.28); background: rgba(185, 245, 184, 0.08); }
.pill.red { color: var(--red); border-color: rgba(255, 123, 135, 0.3); background: rgba(255, 123, 135, 0.08); }

/* Authentication */

.auth-page {
  overflow-x: hidden;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(420px, 0.84fr);
}

.auth-story {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(110, 50, 255, 0.09), transparent 42%),
    radial-gradient(circle at 30% 68%, rgba(110, 50, 255, 0.13), transparent 25%),
    #080809;
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.auth-story-inner {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 840px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px clamp(38px, 6vw, 94px) 42px;
}

.auth-wordmark {
  width: min(300px, 72%);
  height: auto;
  object-fit: contain;
}

.promise-block {
  margin: 60px 0 32px;
}

.brand-eyebrow {
  color: var(--coral-bright);
}

.promise-block h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(48px, 6.3vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.065em;
  font-weight: 950;
}

.privacy-line {
  margin: 22px 0 0;
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.story-copy {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.55;
}

.topup-promise {
  width: fit-content;
  display: grid;
  gap: 3px;
  margin-top: 20px;
  padding: 11px 14px;
  border: 1px solid rgba(142,231,211,.25);
  border-radius: var(--radius);
  background: rgba(142,231,211,.06);
}

.topup-promise strong {
  color: var(--aqua);
  font-size: 14px;
  letter-spacing: -.02em;
}

.topup-promise span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.preview-card {
  position: relative;
  width: min(430px, 72%);
  aspect-ratio: 1.586;
  align-self: flex-end;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.025) 45%),
    linear-gradient(135deg, #221858, #111018 64%, #341a1d);
  box-shadow: 0 32px 90px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.18);
  transform: rotate(-4deg);
}

.preview-card-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -90px;
  border-radius: 50%;
  background: var(--coral);
  filter: blur(74px);
  opacity: 0.24;
}

.preview-card-top,
.preview-card-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
}

.preview-card-top img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.preview-card-chip,
.card-chip {
  width: 42px;
  height: 31px;
  margin-top: 20px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 7px;
  background: linear-gradient(135deg, #e8dbc0, #8b7d68);
  opacity: 0.78;
}

.preview-card-number {
  margin: 18px 0 20px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .1em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
}

.trust-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-size: 10px;
  font-weight: 800;
}

.auth-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px;
  background: rgba(9, 9, 11, 0.82);
}

.auth-panel-inner {
  width: min(430px, 100%);
}

.mobile-brand {
  display: none;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 46px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}

.auth-tab {
  height: 42px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.auth-tab.is-active {
  color: var(--text);
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.auth-heading h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.auth-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

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

.field > span:first-child {
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
}

.field input,
.field select,
.input-shell {
  width: 100%;
  min-width: 0;
}

.field input,
.field select {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  color: var(--text);
  background: rgba(255,255,255,.045);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.input-shell:focus-within {
  border-color: rgba(142, 231, 211, .48);
  background-color: rgba(142, 231, 211, .035);
  box-shadow: 0 0 0 3px rgba(142, 231, 211, .06);
}

.field input::placeholder {
  color: rgba(220,220,220,.28);
}

.input-shell {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
}

.input-shell input {
  height: 46px;
  border: 0;
  background: transparent;
  box-shadow: none !important;
}

.input-prefix {
  padding-left: 14px;
  color: var(--coral-bright);
  font-weight: 900;
}

.password-toggle {
  height: 30px;
  margin-right: 8px;
  padding: 0 7px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 900;
}

.form-error,
.modal-error,
.form-warning {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 123, 135, .25);
  border-radius: var(--radius);
  color: var(--red);
  background: rgba(255, 123, 135, .07);
  font-size: 11px;
}

.auth-submit {
  width: 100%;
  justify-content: space-between;
  margin-top: 4px;
}

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

.local-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 38px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

/* App shell */

.app-page {
  background:
    radial-gradient(circle at 80% -20%, rgba(110,50,255,.1), transparent 32%),
    linear-gradient(180deg, #0b0b0d, #070708 300px);
}

.app-loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  color: var(--muted);
}

.app-loading > img {
  width: 92px;
  filter: drop-shadow(0 16px 32px rgba(110, 50, 255, .2));
}

.app-loading > div:not(.load-error) {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 850;
}

.load-error {
  max-width: 420px;
  display: grid;
  gap: 10px;
  text-align: center;
}

.load-error strong { color: var(--text); font-size: 20px; }
.load-error a { color: var(--aqua); }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: rgba(8, 8, 10, .88);
  backdrop-filter: blur(22px);
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 20px;
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.sidebar-brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1.22;
}

.sidebar-brand-copy strong {
  font-size: 14px;
  font-weight: 950;
}

.sidebar-brand-copy span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.sidebar-close {
  display: none;
  margin-left: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.nav-button {
  min-height: 46px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 850;
}

.nav-button:hover {
  color: var(--soft);
  background: rgba(255,255,255,.035);
}

.nav-button.is-active {
  color: var(--text);
  border-color: rgba(110, 50, 255, .28);
  background: linear-gradient(90deg, rgba(110,50,255,.16), rgba(255,91,77,.045));
  box-shadow: inset 3px 0 0 var(--violet-bright);
}

.nav-icon {
  width: 18px;
  height: 18px;
}

.nav-badge {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #191108;
  background: var(--amber);
  font-size: 9px;
}

.sidebar-foot {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sidebar-account {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.sidebar-account > span:last-child {
  min-width: 0;
  display: grid;
}

.sidebar-account strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.sidebar-account small {
  color: var(--muted);
  font-size: 9px;
}

.avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(110,50,255,.34);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, rgba(110,50,255,.75), rgba(255,91,77,.7));
  font-size: 10px;
  font-weight: 950;
}

button.avatar {
  padding: 0;
}

.sidebar-logout {
  width: 100%;
  min-height: 38px;
  font-size: 10px;
}

.sidebar-backdrop {
  display: none;
}

.app-main {
  min-width: 0;
  padding-bottom: 50px;
}

.topbar {
  position: relative;
  z-index: 20;
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(190px, .65fr) minmax(300px, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 16px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(8,8,10,.66);
  backdrop-filter: blur(18px);
}

.topbar-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.topbar-title .eyebrow {
  font-size: 9px;
}

.menu-button {
  display: none;
  font-size: 15px;
}

.topbar-search {
  position: relative;
}

.topbar-search > label {
  height: 46px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.045);
}

.topbar-search input {
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 11px;
}

.topbar-search label > button {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255,255,255,.06);
}

.search-results {
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 430px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(16,16,19,.98);
  box-shadow: var(--shadow);
}

.search-results > button {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
}

.search-results > button:hover {
  background: rgba(255,255,255,.055);
}

.search-results > button > span:nth-child(2) {
  min-width: 0;
  display: grid;
}

.search-results strong,
.search-results small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results small,
.search-empty {
  color: var(--muted);
  font-size: 9px;
}

.search-empty {
  padding: 18px;
  text-align: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.topbar-avatar {
  border: 1px solid rgba(110,50,255,.34);
}

.page-content {
  display: grid;
  gap: 18px;
  padding: 24px clamp(16px, 3vw, 34px) 0;
}

.panel,
.metric-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.018)),
    rgba(17, 17, 20, .88);
  box-shadow: 0 20px 58px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.045);
}

.panel {
  padding: 20px;
}

.panel-header {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header h3,
.sheet-section h3,
.dense-form h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -.025em;
}

.panel-copy,
.panel > p,
.card-status-panel > p,
.subscription-hero p,
.queue-hero p {
  color: var(--soft);
}

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

.metric-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  padding: 17px;
}

.metric-card > span {
  min-height: 30px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.metric-card strong {
  overflow: hidden;
  margin-top: 7px;
  text-overflow: ellipsis;
  font-size: clamp(20px, 2.15vw, 30px);
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.metric-card small {
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
}

/* User app */

.user-hero,
.admin-hero,
.subscription-hero,
.queue-hero {
  display: grid;
  align-items: stretch;
  gap: 30px;
  padding: 28px;
}

.user-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .75fr);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 20%, rgba(110,50,255,.16), transparent 33%),
    radial-gradient(circle at 90% 85%, rgba(255,91,77,.09), transparent 30%),
    rgba(15,15,18,.92);
}

.hero-copy {
  align-self: center;
}

.activation-test-toolbar {
  width: min(350px, 100%);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
  padding: 11px 13px;
  border: 1px solid rgba(244,199,107,.3);
  border-radius: var(--radius);
  background: rgba(244,199,107,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  transition: border-color 180ms ease, background 180ms ease;
}

.activation-test-toolbar.is-active {
  border-color: rgba(142,231,211,.4);
  background: rgba(142,231,211,.08);
}

.activation-test-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.activation-test-copy strong {
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
}

.activation-test-toolbar.is-active .activation-test-copy strong { color: var(--aqua); }

.activation-test-copy small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.activation-card-showcase {
  align-self: stretch;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.activation-card-stage {
  position: relative;
  min-height: 410px;
  display: grid;
  place-items: center;
  isolation: isolate;
  perspective: 1400px;
}

.activation-card-stage::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: min(76%, 500px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 36%, rgba(110,50,255,.19), transparent 52%),
    radial-gradient(circle at 68% 66%, rgba(255,91,77,.1), transparent 48%);
  filter: blur(20px);
}

.activation-card-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 14%;
  bottom: 15%;
  width: min(64%, 390px);
  height: 38px;
  border-radius: 50%;
  background: rgba(63,42,138,.35);
  filter: blur(22px);
  transform: rotate(-3deg);
}

.activation-card-stack {
  position: relative;
  z-index: 1;
  width: min(73%, 440px);
  aspect-ratio: 1.586;
  transform: translate(-2%, 3%);
  transform-style: preserve-3d;
}

.activation-card-layer {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 21px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.09), transparent 45%),
    linear-gradient(145deg, #1d1739, #151116 62%, #32191e);
  box-shadow: 0 24px 58px rgba(0,0,0,.27), inset 0 1px 0 rgba(255,255,255,.1);
  backface-visibility: hidden;
}

.activation-card-layer.is-back {
  opacity: .7;
  border-color: rgba(110,50,255,.48);
  transform: translate3d(11%, -9%, -40px) rotate(4.5deg);
}

.activation-card-layer.is-middle {
  opacity: .88;
  border-color: rgba(255,132,119,.25);
  transform: translate3d(6%, -4%, -18px) rotate(-1.5deg);
}

.virtual-card.activation-card-visual {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  transform: translate3d(-3%, 5%, 32px) rotateZ(-4deg) rotateX(3deg) rotateY(-6deg);
  transform-origin: 42% 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  box-shadow:
    -15px 32px 72px rgba(0,0,0,.5),
    20px 16px 54px rgba(110,50,255,.12),
    inset 0 1px 0 rgba(255,255,255,.26);
}

.activation-card-visual .virtual-card-light {
  opacity: .3;
}

.hero-status {
  margin-bottom: 24px;
}

.hero-copy h2,
.admin-hero h2,
.subscription-hero h2,
.queue-hero h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 47px);
  line-height: 1.02;
  letter-spacing: -.052em;
}

.hero-copy > p:last-child,
.admin-hero > div > p:last-child {
  max-width: 650px;
  margin: 16px 0 0;
  color: var(--soft);
  font-size: 14px;
}

.address-card {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 4px 0 4px 28px;
  border: 0;
  border-left: 1px solid rgba(142,231,211,.28);
  border-radius: 0;
  background: transparent;
}

.address-card.is-renewal {
  border-color: rgba(255,123,135,.3);
  background: transparent;
}

.address-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.address-payment-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.membership-qr-button {
  appearance: none;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(142,231,211,.35);
  border-radius: 10px;
  background: #aeb3b1;
  box-shadow: 0 10px 26px rgba(0,0,0,.2);
  cursor: zoom-in;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.membership-qr-button:hover {
  transform: translateY(-1px);
  border-color: rgba(142,231,211,.7);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}

.membership-qr-button svg,
.membership-qr-large svg {
  width: 100%;
  height: 100%;
  display: block;
}

.membership-qr-button svg rect,
.membership-qr-large svg rect { fill: #aeb3b1; }

.membership-qr-button svg path,
.membership-qr-large svg path { fill: #0a0c0d; }

.address-code {
  appearance: none;
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid rgba(142,231,211,.3);
  border-radius: 999px;
  background: rgba(142,231,211,.07);
  color: var(--aqua);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: .01em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.address-code:hover {
  transform: translateY(-1px);
  border-color: rgba(142,231,211,.5);
  background: rgba(142,231,211,.11);
}

.address-copy-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.qr-unavailable {
  color: #0a0c0d;
  font-size: 13px;
  font-weight: 900;
}

.membership-qr-modal {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 20px;
  text-align: center;
}

.membership-qr-large {
  width: min(320px, 100%);
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid rgba(142,231,211,.38);
  border-radius: 12px;
  background: #aeb3b1;
  box-shadow: 0 18px 46px rgba(0,0,0,.3);
}

.membership-qr-modal code {
  color: var(--aqua);
  font-size: 14px;
}

.membership-qr-modal p {
  max-width: 34ch;
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.55;
}

.payment-instruction,
.claim-payment-context {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.claim-payment-context {
  padding: 12px;
  border: 1px solid rgba(142,231,211,.25);
  border-radius: var(--radius);
  background: rgba(142,231,211,.055);
}

.claim-payment-context.amber {
  border-color: rgba(244,199,107,.3);
  background: rgba(244,199,107,.07);
}

.claim-payment-context.red {
  border-color: rgba(255,123,135,.3);
  background: rgba(255,123,135,.07);
}

.payment-instruction.amber > span { color: var(--amber); }
.payment-instruction.red > span { color: var(--red); }

.payment-instruction > span,
.claim-payment-context > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.payment-instruction > strong {
  color: var(--text);
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.claim-payment-context > strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.payment-instruction > small,
.claim-payment-context > small {
  color: var(--soft);
  font-size: 9px;
  line-height: 1.45;
}

.payment-instruction > .payment-network-note,
.claim-payment-context > .payment-network-note {
  color: var(--aqua);
  font-weight: 850;
}

.address-card small,
.panel-footnote {
  color: var(--muted);
  font-size: 9px;
}

.address-card .payment-instruction > small {
  max-width: 48ch;
  color: var(--soft);
}

.address-footnote {
  padding-top: 2px;
}

.address-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.split-grid,
.admin-grid,
.fee-grid,
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.admin-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.asset {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
}

.asset-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.asset-button:hover,
.asset-button:focus-visible {
  border-color: rgba(142,231,211,.36);
  background: rgba(142,231,211,.07);
}

.asset-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, rgba(110,50,255,.86), rgba(255,91,77,.72));
  font-size: 11px;
  font-weight: 950;
}

.network-icon {
  color: white;
  font-size: 8px;
  letter-spacing: -.02em;
}

.network-icon.ethereum,
.network-icon.scroll { background: linear-gradient(135deg, #7d9cff, #4d69d8); }
.network-icon.tron { background: linear-gradient(135deg, #ff294d, #d90025); }
.network-icon.solana { background: linear-gradient(135deg, #59f1a6, #23c982); }
.network-icon.near,
.network-icon.aptos,
.network-icon.optimism,
.network-icon.ton { background: linear-gradient(135deg, #45464b, #292a2e); }
.network-icon.gnosis { background: linear-gradient(135deg, #17c4dd, #0795ae); }
.network-icon.polygon { background: linear-gradient(135deg, #8a5cff, #6031d5); }
.network-icon.bnb { background: linear-gradient(135deg, #ffc845, #ecaa12); }
.network-icon.avalanche { background: linear-gradient(135deg, #ff5d63, #d92f38); }

.see-all-network .asset-icon {
  background: var(--gradient);
}

.see-all-network strong {
  color: var(--aqua);
}

.network-modal-content {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.network-modal-content > p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.55;
}

.provider-network-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.provider-network-row {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
}

.provider-network-row > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.provider-network-row strong { font-size: 11px; }
.provider-network-row small { color: var(--muted); font-size: 9px; }

.asset > span:last-child {
  min-width: 0;
  display: grid;
}

.asset strong { font-size: 11px; }
.asset small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.subscription-callout {
  display: grid;
  align-content: center;
}

.subscription-callout.aqua { border-color: rgba(142,231,211,.24); }
.subscription-callout.amber { border-color: rgba(244,199,107,.25); }
.subscription-callout.amber .eyebrow { color: var(--amber); }
.subscription-callout.green { border-color: rgba(185,245,184,.23); }
.subscription-callout.red { border-color: rgba(255,123,135,.25); }

.activity-list,
.people-list,
.audit-list {
  display: grid;
}

.activity-row,
.person-row,
.audit-row {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--line);
}

.activity-list > :first-child,
.people-list > :first-child,
.audit-list > :first-child {
  border-top: 0;
}

.person-row {
  width: 100%;
  padding: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.person-row:hover {
  background: rgba(255,255,255,.025);
}

.token-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(110,50,255,.32);
  border-radius: 50%;
  color: white;
  background: rgba(110,50,255,.16);
  font-size: 12px;
  font-weight: 950;
}

.row-main,
.row-value,
.row-pills {
  min-width: 0;
  display: grid;
}

.row-main strong,
.row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-main strong { font-size: 11px; }
.row-main small,
.row-value small { color: var(--muted); font-size: 9px; }

.row-main .row-warning {
  color: var(--amber);
  margin-top: 4px;
  max-width: 58ch;
}

.row-value {
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.row-value strong { font-size: 11px; }
.row-pills { grid-auto-flow: column; gap: 5px; }

.empty-state {
  min-height: 190px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-state > span {
  margin-bottom: 10px;
  color: var(--aqua);
  font-size: 26px;
}

.empty-state strong { color: var(--soft); }
.empty-state p { max-width: 300px; margin: 5px 0 0; font-size: 10px; }

.card-page-grid {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13,13,16,.74);
}

.virtual-card-wrap {
  align-self: center;
}

.card-test-toolbar {
  width: min(100%, 480px);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 auto 14px;
  padding: 9px 11px;
  border: 1px solid rgba(244,199,107,.24);
  border-radius: var(--radius);
  background: rgba(244,199,107,.055);
}

.card-test-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.card-test-copy strong {
  color: var(--amber);
  font-size: 10px;
}

.card-test-copy small {
  color: var(--muted);
  font-size: 8px;
}

.test-switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
  cursor: pointer;
}

.test-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.test-switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  transition: border-color 180ms ease, background 180ms ease;
}

.test-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--soft);
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  transition: transform 180ms ease, background 180ms ease;
}

.test-switch input:checked + .test-switch-track {
  border-color: rgba(142,231,211,.48);
  background: rgba(142,231,211,.22);
}

.test-switch input:checked + .test-switch-track::after {
  transform: translateX(18px);
  background: var(--aqua);
}

.test-switch input:focus-visible + .test-switch-track {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
}

.topup-preview-content {
  display: grid;
  gap: 15px;
  padding: 18px;
}

.preview-mode-notice,
.topup-preview-allowance {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(244,199,107,.24);
  border-radius: var(--radius);
  background: rgba(244,199,107,.06);
}

.preview-mode-notice strong { color: var(--amber); font-size: 11px; }
.preview-mode-notice span,
.topup-preview-allowance span,
.topup-preview-allowance small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.topup-preview-allowance strong { color: var(--text); font-size: 23px; }

.topup-review-list {
  display: grid;
  margin: 0;
}

.topup-review-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.topup-review-list > div:first-child { border-top: 0; }
.topup-review-list dt { font-size: 11px; }
.topup-review-list dd { color: var(--text); font-size: 12px; }

.topup-preview-actions {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 8px;
}

.modal.modal-wide {
  width: min(650px, calc(100% - 28px));
}

.modal-overlay.modal-drawer-overlay {
  align-items: stretch;
  justify-items: end;
}

.modal.modal-drawer {
  width: min(880px, 86vw);
  height: 100dvh;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-width: 0 0 0 1px;
  border-radius: var(--radius) 0 0 var(--radius);
  animation: topup-drawer-in 210ms ease-out;
}

.modal.modal-drawer .modal-header {
  background: rgba(17,17,20,.985);
}

.modal.modal-drawer #modal-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@keyframes topup-drawer-in {
  from { transform: translateX(100%); }
}

.topup-flow-content {
  display: grid;
  padding: 18px 22px 24px;
}

.topup-flow-step {
  display: grid;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  animation: topup-step-in 180ms ease-out;
}

.topup-flow-step:first-of-type {
  margin-top: 16px;
}

.topup-flow-step > header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.topup-flow-step > header > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--gradient);
  font-size: 10px;
  font-weight: 950;
}

.topup-flow-step > header > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.topup-flow-step > header strong {
  color: var(--text);
  font-size: 14px;
}

.topup-flow-step > header small {
  color: var(--muted);
  font-size: 9px;
}

.topup-token-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.topup-token {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255,255,255,.025);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.topup-token:hover,
.topup-token:focus-visible {
  border-color: rgba(142,231,211,.34);
  transform: translateY(-1px);
}

.topup-token.is-selected {
  border-color: rgba(142,231,211,.55);
  background: rgba(142,231,211,.09);
  box-shadow: inset 0 0 0 1px rgba(142,231,211,.08);
}

.topup-token > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.topup-token strong { font-size: 11px; }
.topup-token small { color: var(--muted); font-size: 8px; }
.token-icon.usdt { background: linear-gradient(135deg, #38c79a, #159675); }
.token-icon.usdc { background: linear-gradient(135deg, #4f9bf3, #286fc4); }
.token-icon.ethereum,
.token-icon.scroll { background: linear-gradient(135deg, #7d9cff, #4d69d8); }
.token-icon.tron { background: linear-gradient(135deg, #ff294d, #d90025); }
.token-icon.solana { background: linear-gradient(135deg, #59f1a6, #23c982); }
.token-icon.near,
.token-icon.aptos,
.token-icon.optimism,
.token-icon.ton { background: linear-gradient(135deg, #45464b, #292a2e); }
.token-icon.gnosis { background: linear-gradient(135deg, #17c4dd, #0795ae); }
.token-icon.bnb { background: linear-gradient(135deg, #ffc845, #ecaa12); }
.token-icon.polygon { background: linear-gradient(135deg, #8a5cff, #6031d5); }
.token-icon.avalanche { background: linear-gradient(135deg, #ff5d63, #d92f38); }

.topup-deposit-reveal {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  animation: topup-step-in 200ms ease-out;
}

.topup-qr-shell {
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(142,231,211,.34);
  border-radius: var(--radius);
  background: rgba(142,231,211,.055);
}

.topup-qr-shell svg {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border-radius: 5px;
}

.topup-qr-shell span {
  color: var(--aqua);
  font-size: 8px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.topup-deposit-copy {
  min-width: 0;
  align-content: start;
  display: grid;
  gap: 9px;
}

.topup-deposit-copy > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.topup-deposit-copy code {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--aqua);
  background: rgba(0,0,0,.18);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.topup-deposit-copy .ghost-button {
  min-height: 40px;
  font-size: 10px;
}

.topup-deposit-reveal .topup-review-list {
  grid-column: 1 / -1;
}

.topup-test-warning {
  grid-column: 1 / -1;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255,107,120,.24);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255,107,120,.055);
  font-size: 9px;
  line-height: 1.55;
}

.topup-test-warning strong { color: var(--red); }

.topup-deposit-action {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
}

.topup-deposit-action .primary-button {
  width: 50%;
  min-height: 48px;
  justify-self: center;
}

.topup-deposit-action small {
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.topup-deposit-placeholder {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  padding: 18px;
  border: 1px dashed rgba(142,231,211,.25);
  border-radius: var(--radius);
  background: rgba(142,231,211,.035);
}

.topup-deposit-placeholder strong {
  color: var(--text);
  font-size: 12px;
}

.topup-deposit-placeholder span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.preview-topup-row {
  min-height: 78px;
  padding: 10px 14px;
  border: 1px solid rgba(244,199,107,.14);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(244,199,107,.045), rgba(255,255,255,.012));
}

.preview-topup-row .row-main {
  gap: 3px;
}

.preview-topup-row .row-value {
  display: flex;
  align-items: center;
  gap: 14px;
}

#card-funding-history .activity-list {
  gap: 10px;
}

@keyframes topup-step-in {
  from { opacity: 0; transform: translateY(-5px); }
}

.virtual-card {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1.586;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  padding: 27px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 21px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.16), transparent 44%),
    linear-gradient(145deg, #24165b, #111016 62%, #3b1c20);
  box-shadow: 0 32px 80px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.2);
}

.virtual-card.is-preparing {
  filter: saturate(.58);
}

.virtual-card-light {
  position: absolute;
  width: 240px;
  height: 240px;
  right: -80px;
  top: -100px;
  border-radius: 50%;
  background: var(--coral);
  filter: blur(80px);
  opacity: .2;
}

.virtual-card-head,
.virtual-card-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.virtual-card-foot {
  justify-content: flex-end;
}

.virtual-card-head img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.virtual-card-head > span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

.virtual-card .card-chip { margin: 0; }

.card-number {
  position: relative;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(15px, 2.1vw, 22px);
  letter-spacing: .06em;
}

.virtual-card-foot small { color: rgba(255,255,255,.54); font-size: 7px; letter-spacing: .11em; }
.virtual-card-foot strong { font-size: 10px; letter-spacing: .05em; }
.visa-mark { font-size: 21px; font-style: italic; font-weight: 950; }

.card-control-bar {
  width: min(100%, 480px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px auto 0;
}

.card-control-button {
  min-width: 0;
  min-height: 60px;
  padding: 8px 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft);
  background: rgba(255,255,255,.045);
  font-size: 10px;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card-control-button .nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.card-control-button > span { line-height: 1; }

.card-control-button.reveal {
  border-color: rgba(142,231,211,.42);
  color: var(--text);
  background: rgba(142,231,211,.11);
}

.card-control-button.danger {
  border-color: rgba(255,123,135,.25);
  color: var(--red);
  background: rgba(255,123,135,.055);
}

.card-control-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(142,231,211,.66);
  background: rgba(142,231,211,.16);
}

.card-security-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.card-status-panel {
  align-self: stretch;
  display: grid;
  align-content: center;
  justify-items: start;
}

.card-status-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-status-head > .eyebrow { margin: 0; }

.successful-topup-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(244,199,107,.25);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(244,199,107,.06);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.successful-topup-toggle.is-active {
  border-color: rgba(142,231,211,.4);
  color: var(--aqua);
  background: rgba(142,231,211,.09);
}

.successful-topup-toggle > span:first-child {
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.test-switch.compact {
  width: 36px;
  height: 22px;
}

.test-switch.compact .test-switch-track::after {
  width: 14px;
  height: 14px;
}

.test-switch.compact input:checked + .test-switch-track::after {
  transform: translateX(14px);
}

.status-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.card-balance-block {
  width: 100%;
  display: grid;
  gap: 5px;
  margin: 16px 0 12px;
  padding: 14px;
  border: 1px solid rgba(142,231,211,.22);
  border-radius: var(--radius);
  background: rgba(142,231,211,.045);
}

.card-balance-block > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card-balance-block > strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.045em;
}

.card-balance-block > small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.card-status-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.card-status-actions > button {
  min-width: 0;
}

.secure-points {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.secure-points span::before {
  content: "✓";
  margin-right: 8px;
  color: var(--aqua);
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-panel > .panel-header {
  padding: 20px 20px 0;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: rgba(255,255,255,.018);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

td {
  color: var(--soft);
  font-size: 10px;
}

td > strong,
td > small {
  display: block;
}

td > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

td code {
  color: var(--aqua);
  font-size: 9px;
}

.clickable-row {
  transition: background 160ms ease;
}

.clickable-row:hover {
  background: rgba(142,231,211,.025);
}

.table-user {
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.table-user > span:last-child {
  min-width: 0;
}

.table-user .avatar {
  width: 34px;
  height: 34px;
}

.subscription-hero,
.queue-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(142,231,211,.2);
}

.subscription-hero.amber { border-color: rgba(244,199,107,.25); }
.subscription-hero.red { border-color: rgba(255,123,135,.25); }
.subscription-hero.green { border-color: rgba(185,245,184,.23); }

.subscription-hero.panel {
  padding: 10px 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.subscription-hero p,
.queue-hero p {
  max-width: 680px;
  margin-bottom: 0;
}

.fee-card {
  display: grid;
  align-content: start;
}

.fee-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.fee-card > strong {
  margin-top: 22px;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -.06em;
}

.fee-card h3 {
  margin: 8px 0 0;
  font-size: 17px;
}

.fee-card p {
  min-height: 45px;
  margin-bottom: 18px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  margin-bottom: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient);
}

.fee-card > small { color: var(--muted); font-size: 9px; }

.fee-card dl,
.account-detail-panel dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.fee-card dl > div,
.account-detail-panel dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.included-topup-card dl > div:first-child { border-top: 0; }

dt { color: var(--muted); }
dd { margin: 0; color: var(--soft); font-weight: 800; }

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

.process-steps > div {
  min-height: 160px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}

.process-steps span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  color: white;
  background: var(--gradient);
  font-size: 9px;
  font-weight: 950;
}

.process-steps strong { display: block; font-size: 11px; }
.process-steps p { color: var(--muted); font-size: 9px; }

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

.subscription-state-grid > div {
  min-width: 0;
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
}

.subscription-state-grid > div.is-processing {
  border-color: rgba(244,199,107,.42);
  background: rgba(244,199,107,.075);
  box-shadow: inset 0 1px 0 rgba(244,199,107,.08);
}

.subscription-state-grid > div.is-complete {
  border-color: rgba(185,245,184,.38);
  background: rgba(185,245,184,.07);
  box-shadow: inset 0 1px 0 rgba(185,245,184,.08);
}

.subscription-state-grid span,
.subscription-state-grid small {
  color: var(--muted);
  font-size: 8px;
}

.subscription-state-grid span {
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.subscription-state-grid strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.04em;
}

.subscription-state-grid > div.is-processing strong,
.subscription-state-grid > div.is-complete strong {
  display: flex;
  align-items: center;
  gap: 10px;
}

.claim-loading-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex: 0 0 auto;
  border: 2px solid rgba(244,199,107,.25);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: claim-loading-spin 760ms linear infinite;
}

.claim-complete-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(185,245,184,.42);
  border-radius: 50%;
  color: var(--green);
  background: rgba(185,245,184,.1);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.claim-submitting-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.subscription-payment-row.is-submitting {
  background: linear-gradient(90deg, rgba(244,199,107,.055), transparent 62%);
}

@keyframes claim-loading-spin {
  to { transform: rotate(360deg); }
}

.subscription-payment-list {
  border-top: 1px solid var(--line);
}

.subscription-payment-row {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}

.subscription-payment-row:last-child {
  border-bottom: 0;
}

.profile-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(110,50,255,.36);
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, rgba(110,50,255,.8), rgba(255,91,77,.7));
  box-shadow: 0 14px 36px rgba(110,50,255,.15);
  font-size: 18px;
  font-weight: 950;
}

.profile-panel h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.04em;
}

.profile-panel p:last-child { margin: 4px 0 0; color: var(--muted); }
.inline-button { width: fit-content; }

/* Admin */

.admin-hero {
  grid-template-columns: minmax(0, 1fr) 260px;
  background:
    radial-gradient(circle at 10% 20%, rgba(142,231,211,.08), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.018)),
    rgba(17,17,20,.9);
}

.admin-hero-action {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border: 1px solid rgba(142,231,211,.24);
  border-radius: var(--radius);
  background: rgba(142,231,211,.05);
}

.admin-hero-action span,
.admin-hero-action small {
  color: var(--muted);
  font-size: 9px;
}

.admin-hero-action strong {
  color: var(--aqua);
  font-size: 23px;
  letter-spacing: -.04em;
}

.load-row .avatar {
  border: 0;
}

.audit-row {
  grid-template-columns: 18px minmax(0, 1fr) auto;
}

.audit-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(142,231,211,.06);
}

/* Overlays */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: end;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
}

.sheet {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 22px));
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background:
    linear-gradient(135deg, rgba(110,50,255,.08), transparent 34%),
    rgba(16,16,19,.99);
  box-shadow: var(--shadow);
  animation: sheet-in 190ms ease-out;
}

@keyframes sheet-in {
  from { transform: translateY(22px); opacity: 0; }
}

.sheet-header,
.modal-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.sheet-header h2,
.modal-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.035em;
}

.sheet-content {
  overflow-y: auto;
  padding: 18px;
}

.sheet-loading {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

.profile-hero-row {
  min-height: 92px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0 4px 18px;
}

.profile-hero-row > span:nth-child(2) {
  display: grid;
}

.profile-hero-row > span:nth-child(2) strong { font-size: 20px; }
.profile-hero-row > span:nth-child(2) small { color: var(--muted); font-size: 9px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.detail-grid > div {
  min-height: 100px;
  display: grid;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
}

.detail-grid span,
.detail-grid small { color: var(--muted); font-size: 8px; }
.detail-grid strong { margin: 12px 0 4px; font-size: 15px; }

.sheet-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}

.sheet-section > header,
.dense-form > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.full-address {
  display: block;
  overflow-wrap: anywhere;
  padding: 13px;
  border: 1px solid rgba(142,231,211,.18);
  border-radius: var(--radius);
  color: var(--aqua);
  background: rgba(142,231,211,.035);
  font-size: 11px;
}

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

.dense-form {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}

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

.dense-form .field input,
.dense-form .field select,
.dense-form .input-shell {
  min-height: 42px;
  height: 42px;
}

.dense-form .input-shell input { height: 40px; }
.dense-form .primary-button { min-height: 42px; font-size: 11px; }
.form-warning { color: var(--amber); border-color: rgba(244,199,107,.24); background: rgba(244,199,107,.06); }

.modal-overlay {
  align-items: center;
  justify-items: center;
}

.modal {
  position: relative;
  z-index: 1;
  width: min(470px, calc(100% - 28px));
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(17,17,20,.99);
  box-shadow: var(--shadow);
  animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
  from { transform: translateY(8px) scale(.985); opacity: 0; }
}

.modal-form {
  display: grid;
  gap: 15px;
  padding: 20px;
}

.modal-form > p {
  margin: 0;
  color: var(--soft);
}

.claim-review-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.claim-review-summary > span {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
}

.claim-review-summary small {
  color: var(--muted);
  font-size: 8px;
}

.claim-review-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.revealed-card {
  margin: 20px;
  padding: 18px;
  border: 1px solid rgba(142,231,211,.28);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(110,50,255,.13), rgba(255,91,77,.07));
}

.revealed-card > div {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.revealed-card > div:first-child { border-top: 0; padding-top: 0; }
.revealed-card span,
.revealed-card small { color: var(--muted); font-size: 9px; }
.revealed-card strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.revealed-card-small { grid-template-columns: 1fr 1fr; }
.revealed-card-small > span { display: grid; gap: 4px; }

.copy-mini {
  position: absolute;
  top: 10px;
  right: 0;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--aqua);
  background: rgba(255,255,255,.05);
  font-size: 9px;
  font-weight: 900;
}

.reveal-countdown {
  margin: -6px 20px 20px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 15px;
  border: 1px solid rgba(185,245,184,.28);
  border-radius: var(--radius);
  color: var(--green);
  background: rgba(18,25,19,.97);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 800;
  animation: toast-in 180ms ease-out;
}

.toast.error { color: var(--red); border-color: rgba(255,123,135,.28); background: rgba(29,17,19,.97); }
.toast.info { color: var(--aqua); border-color: rgba(142,231,211,.28); background: rgba(16,25,24,.97); }

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
}

@media (max-width: 1100px) {
  .user-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .address-actions { grid-template-columns: 1fr; }
  .card-page-grid { grid-template-columns: minmax(320px, .9fr) minmax(0, 1fr); padding: 20px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(380px, .85fr); }
  .preview-card { width: 86%; }

  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-102%);
    width: min(286px, calc(100vw - 48px));
    transition: transform 200ms ease;
    box-shadow: var(--shadow);
  }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0,0,0,.62);
  }
  .sidebar-open .sidebar-backdrop { display: block; }
  .menu-button { display: inline-grid; }
  .topbar { position: sticky; top: 0; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1fr) auto; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-hero { grid-template-columns: 1fr; }
  .address-card { min-height: 210px; }
  .card-page-grid { grid-template-columns: 1fr; }
  .virtual-card { margin: 0 auto; }
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body { font-size: 16px; }

  /* iOS Safari zooms focused controls whose text is below 16px. */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  input,
  select,
  button { touch-action: manipulation; }

  .auth-shell { display: block; min-height: 100svh; }
  .auth-story { display: none; }
  .auth-panel {
    min-height: 100svh;
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  }
  .auth-panel-inner { width: min(480px, 100%); }
  .mobile-brand {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
  }
  .mobile-brand img { width: 190px; height: auto; }
  .mobile-auth-promise {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid rgba(142,231,211,.22);
    border-radius: var(--radius);
    background: rgba(142,231,211,.055);
  }
  .mobile-auth-promise strong { color: var(--text); font-size: 15px; }
  .mobile-auth-promise span { color: var(--aqua); font-size: 13px; font-weight: 800; line-height: 1.4; }
  .auth-tabs { margin-bottom: 26px; }
  .auth-tab { height: 48px; font-size: 15px; }
  .auth-heading h2 { font-size: 31px; line-height: 1.08; overflow-wrap: anywhere; }
  .auth-heading > p:last-child { margin-top: 10px; font-size: 15px; line-height: 1.5; }
  .auth-form { gap: 17px; margin-top: 26px; }
  .field > span:first-child { font-size: 14px; }
  .field input,
  .field select { height: 56px; padding-inline: 15px; }
  .input-shell { min-height: 56px; }
  .input-shell input { height: 54px; }
  .input-prefix { padding-left: 15px; font-size: 18px; }
  .password-toggle { min-width: 56px; height: 44px; margin-right: 5px; font-size: 14px; }
  .auth-submit { min-height: 56px; font-size: 17px; }
  .auth-note { font-size: 13px; line-height: 1.45; }
  .local-status { margin-top: 24px; font-size: 13px; }
  .form-error,
  .modal-error,
  .form-warning { font-size: 14px; line-height: 1.45; }

  .app-main { padding-top: 78px; }
  .app-main:has(.topbar-search:not([hidden])) { padding-top: 140px; }
  .topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 30;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 78px;
    padding: 13px 14px;
  }
  .topbar-search { grid-column: 1 / -1; grid-row: 2; }
  .topbar:has(.topbar-search:not([hidden])) { padding-bottom: 12px; }
  .menu-button { width: 48px; height: 48px; font-size: 18px; }
  .topbar-title { gap: 11px; }
  .topbar-title h1 { font-size: 26px; overflow-wrap: anywhere; }
  .topbar-title .eyebrow { font-size: 11px; }
  .topbar-avatar { width: 48px; height: 48px; font-size: 13px; }
  .topbar-search > label { height: 52px; }
  .topbar-search input { height: 48px; }
  .page-content { gap: 14px; padding: 16px 14px 0; }
  .eyebrow { font-size: 12px; }
  .pill { min-height: 29px; padding: 4px 10px; font-size: 12px; }
  .panel { padding: 18px; }
  .panel-header { min-height: 42px; margin-bottom: 12px; }
  .panel-header h3,
  .sheet-section h3,
  .dense-form h3 { font-size: 18px; }
  .panel-copy,
  .panel > p,
  .card-status-panel > p,
  .subscription-hero p,
  .queue-hero p { font-size: 15px; line-height: 1.6; }
  .user-hero,
  .admin-hero,
  .subscription-hero,
  .queue-hero { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .subscription-hero.panel {
    width: auto;
    margin-inline: -14px;
    padding: 26px 14px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .wallet-hero {
    width: auto;
    margin-inline: -14px;
    gap: 32px;
    padding: 30px 14px 34px;
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(circle at 4% 14%, rgba(110,50,255,.24), transparent 42%),
      radial-gradient(circle at 96% 58%, rgba(142,231,211,.08), transparent 40%),
      radial-gradient(circle at 82% 100%, rgba(255,91,77,.09), transparent 36%),
      linear-gradient(180deg, rgba(22,19,31,.98), rgba(14,14,19,.98) 58%, rgba(17,13,17,.98));
    box-shadow: none;
  }
  .wallet-hero .hero-status { margin-bottom: 32px; }
  .activation-test-toolbar {
    width: 100%;
    min-height: 64px;
    margin-bottom: 28px;
    padding: 12px 14px;
  }
  .activation-test-copy strong { font-size: 14px; }
  .activation-test-copy small { font-size: 12px; }
  .activation-card-showcase { min-height: 0; }
  .activation-card-showcase .activation-test-toolbar { margin-bottom: 12px; }
  .activation-card-stage {
    min-height: 300px;
    overflow: hidden;
  }
  .activation-card-stage::after {
    left: 12%;
    bottom: 15%;
    width: 72%;
  }
  .activation-card-stack { width: min(78vw, 340px); }
  .activation-card-layer.is-back { transform: translate3d(8%, -7%, -32px) rotate(3deg); }
  .activation-card-layer.is-middle { transform: translate3d(4%, -3%, -14px) rotate(-1deg); }
  .virtual-card.activation-card-visual {
    width: 100%;
    transform: translate3d(-2%, 4%, 24px) rotateZ(-3deg) rotateX(2deg) rotateY(-4deg);
  }
  .wallet-hero .hero-copy .eyebrow { margin-bottom: 10px; }
  .wallet-hero .hero-copy > p:last-child { margin-top: 22px; }
  .admin-hero-action { min-height: 135px; }
  .hero-copy h2,
  .admin-hero h2,
  .subscription-hero h2,
  .queue-hero h2 { font-size: 30px; overflow-wrap: anywhere; }
  .hero-copy > p:last-child,
  .admin-hero > div > p:last-child { font-size: 15px; line-height: 1.6; }
  .split-grid,
  .admin-grid,
  .account-grid { grid-template-columns: 1fr; }
  .fee-grid {
    --carousel-card-width: min(74vw, 460px);
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: auto;
    margin-inline: -14px;
    padding: 4px max(13vw, calc((100vw - 460px) / 2)) 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: max(13vw, calc((100vw - 460px) / 2));
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    perspective: 1200px;
  }
  .fee-grid::-webkit-scrollbar { display: none; }
  .fee-grid .fee-card {
    flex: 0 0 var(--carousel-card-width);
    scroll-snap-align: center;
    opacity: var(--carousel-opacity, .52);
    transform: translateZ(0) scale(var(--carousel-scale, .88)) rotateY(var(--carousel-rotate, 0deg));
    transform-origin: center;
    backface-visibility: hidden;
    will-change: transform, opacity;
    box-shadow: 0 18px 44px rgba(0,0,0,var(--carousel-shadow, .08)), inset 0 1px 0 rgba(255,255,255,.04);
    transition: border-color 160ms ease;
  }
  .fee-grid .fee-card.is-active {
    z-index: 1;
    border-color: rgba(255,255,255,.2);
  }
  .fee-grid .fee-card .fee-card-head { flex-wrap: wrap; gap: 8px; }
  .metric-card { min-height: 126px; padding: 18px; }
  .metric-card > span { min-height: 28px; font-size: 14px; }
  .metric-card strong { font-size: 30px; }
  .metric-card small { font-size: 13px; line-height: 1.4; }
  .address-card {
    min-height: 0;
    gap: 24px;
    padding: 28px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(142,231,211,.28);
  }
  .address-card.is-renewal { border-color: rgba(255,123,135,.3); }
  .address-card-head { align-items: flex-start; gap: 14px; font-size: 13px; line-height: 1.4; }
  .payment-instruction { gap: 0; }
  .claim-payment-context { gap: 8px; }
  .claim-payment-context { padding: 14px; }
  .payment-instruction > span,
  .claim-payment-context > span { font-size: 12px; }
  .payment-instruction > span { margin-bottom: 10px; }
  .payment-instruction > strong { margin-bottom: 12px; font-size: 32px; }
  .payment-instruction > .payment-network-note { margin-bottom: 14px; }
  .claim-payment-context > strong { font-size: 24px; }
  .payment-instruction > small,
  .claim-payment-context > small { font-size: 13px; line-height: 1.6; }
  .address-payment-tools {
    flex-direction: column;
    gap: 20px;
  }
  .membership-qr-button { width: 84px; height: 84px; }
  .address-code { font-size: 14px; line-height: 1.65; }
  .address-card small,
  .panel-footnote { font-size: 13px; line-height: 1.5; }
  .address-footnote { padding-top: 4px; }
  .primary-button.compact,
  .ghost-button.compact { min-height: 48px; font-size: 15px; }
  .profile-panel { grid-column: auto; grid-template-columns: 60px minmax(0, 1fr); }
  .profile-panel .profile-avatar { width: 58px; height: 58px; }
  .profile-panel > .pill { grid-column: 1 / -1; width: fit-content; }
  .profile-panel h2 { font-size: 25px; }
  .profile-panel p:last-child { font-size: 14px; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset { min-height: 68px; }
  .asset strong { font-size: 14px; }
  .asset small { font-size: 12px; }
  .network-modal-content { padding: 16px; }
  .network-modal-content > p { font-size: 14px; }
  .provider-network-list { grid-template-columns: 1fr; }
  .provider-network-row { min-height: 64px; }
  .provider-network-row strong { font-size: 15px; }
  .provider-network-row small { font-size: 12px; }
  .card-page-grid { padding: 0; border: 0; background: transparent; }
  .card-test-toolbar { min-height: 54px; padding: 10px 12px; }
  .card-test-copy strong { font-size: 14px; }
  .card-test-copy small { font-size: 12px; }
  .card-status-head { align-items: flex-start; }
  .successful-topup-toggle > span:first-child { font-size: 11px; }
  .topup-preview-content { padding: 16px; }
  .modal.modal-wide { width: calc(100% - 18px); max-height: 92vh; }
  .modal.modal-drawer {
    width: 88vw;
    height: 100dvh;
    max-height: none;
    border-radius: var(--radius) 0 0 var(--radius);
  }
  .topup-flow-content { padding: 14px 16px 20px; }
  .topup-flow-step { gap: 13px; padding: 17px 0; }
  .topup-flow-step > header { grid-template-columns: 34px minmax(0, 1fr); }
  .topup-flow-step > header > span { width: 34px; height: 34px; font-size: 12px; }
  .topup-flow-step > header strong { font-size: 16px; }
  .topup-flow-step > header small { font-size: 12px; }
  .topup-token-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topup-token { min-height: 68px; grid-template-columns: 38px minmax(0, 1fr); }
  .topup-token .asset-icon { width: 38px; height: 38px; }
  .topup-token strong { font-size: 14px; }
  .topup-token small { font-size: 11px; }
  .topup-flow-step .field > span:first-child { font-size: 13px; }
  .topup-flow-step input,
  .topup-flow-step select { font-size: 16px; }
  .topup-deposit-reveal { grid-template-columns: 1fr; gap: 14px; }
  .topup-qr-shell { width: min(190px, 64vw); justify-self: center; }
  .topup-deposit-copy > span { font-size: 12px; }
  .topup-deposit-copy code { font-size: 12px; }
  .topup-deposit-copy .ghost-button { min-height: 48px; font-size: 13px; }
  .topup-deposit-reveal .topup-review-list,
  .topup-test-warning { grid-column: auto; }
  .topup-test-warning { font-size: 12px; }
  .topup-deposit-placeholder strong { font-size: 14px; }
  .topup-deposit-placeholder span { font-size: 13px; }
  .preview-mode-notice strong { font-size: 14px; }
  .preview-mode-notice span,
  .topup-preview-allowance span,
  .topup-preview-allowance small { font-size: 13px; }
  .topup-review-list dt,
  .topup-review-list dd { font-size: 14px; }
  .virtual-card { padding: 22px; }
  .virtual-card-head img { width: 44px; height: 44px; }
  .card-control-bar { gap: 7px; }
  .card-control-button { min-height: 64px; padding: 8px; font-size: 13px; }
  .card-control-button .nav-icon { width: 20px; height: 20px; }
  .card-security-note { font-size: 13px; }
  .card-balance-block { padding: 16px; }
  .card-balance-block > span { font-size: 12px; }
  .card-balance-block > strong { font-size: 32px; }
  .card-balance-block > small { font-size: 13px; }
  .card-status-actions { grid-template-columns: 1fr; }
  .card-status-actions > button { min-height: 50px; font-size: 15px; }
  .secure-points { font-size: 14px; }
  .process-steps { grid-template-columns: 1fr; }
  .process-steps > div { min-height: 0; padding: 17px; }
  .process-steps span { margin-bottom: 16px; font-size: 11px; }
  .process-steps strong { font-size: 15px; }
  .process-steps p { font-size: 14px; line-height: 1.5; }
  .subscription-state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-state-grid > div { min-height: 112px; padding: 15px; }
  .subscription-state-grid span,
  .subscription-state-grid small { font-size: 12px; }
  .subscription-state-grid strong { font-size: 32px; }
  .subscription-payment-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
  }
  .subscription-payment-row .row-value {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
  .fee-card > strong { font-size: 44px; }
  .fee-card-head { font-size: 13px; }
  .fee-card h3 { font-size: 22px; }
  .fee-card p { min-height: 0; font-size: 15px; line-height: 1.55; }
  .fee-card > small { font-size: 13px; line-height: 1.45; }
  .fee-card dt,
  .fee-card dd { font-size: 14px; }
  .sheet { width: calc(100% - 10px); max-height: 88vh; }
  .sheet-header,
  .modal-header { min-height: 68px; padding: 12px 14px; }
  .sheet-header h2,
  .modal-header h2 { font-size: 22px; }
  .sheet-content { padding: 12px; }
  .profile-hero-row { grid-template-columns: 58px minmax(0, 1fr); }
  .profile-hero-row .profile-avatar { width: 56px; height: 56px; }
  .profile-hero-row > .pill { grid-column: 1 / -1; width: fit-content; }
  .profile-hero-row > span:nth-child(2) strong { font-size: 19px; }
  .profile-hero-row > span:nth-child(2) small { font-size: 13px; }
  .two-form-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .dense-form .field input,
  .dense-form .field select,
  .dense-form .input-shell { min-height: 52px; height: 52px; }
  .dense-form .input-shell input { height: 50px; }
  .dense-form .primary-button { min-height: 48px; font-size: 15px; }
  .activity-row,
  .person-row { min-height: 82px; grid-template-columns: 42px minmax(0, 1fr); padding: 10px 0; }
  .activity-row .row-value,
  .person-row .row-pills { grid-column: 2; justify-items: start; text-align: left; }
  .row-main strong { font-size: 14px; }
  .row-main small,
  .row-value small { overflow: visible; font-size: 12px; line-height: 1.45; text-overflow: clip; white-space: normal; }
  .row-value strong { font-size: 14px; }
  .preview-topup-row {
    min-height: 104px;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px;
  }
  .preview-topup-row .token-avatar {
    align-self: start;
    margin-top: 1px;
  }
  .preview-topup-row .row-main {
    gap: 4px;
  }
  .preview-topup-row .row-main strong {
    font-size: 16px;
    line-height: 1.25;
  }
  .preview-topup-row .row-main small {
    font-size: 12px;
    line-height: 1.45;
  }
  .preview-topup-row .row-value {
    width: 100%;
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 5px;
    text-align: left;
  }
  .preview-topup-row .row-value strong {
    font-size: 18px;
  }
  .preview-topup-row .row-value .pill {
    flex: 0 0 auto;
  }
  .row-pills { grid-auto-flow: row; }
  .empty-state { min-height: 160px; padding: 22px 10px; }
  .empty-state strong { font-size: 16px; }
  .empty-state p { font-size: 14px; line-height: 1.5; }
  th { font-size: 11px; }
  td { font-size: 13px; }
  td > small { font-size: 12px; }
  td code { font-size: 12px; }
  .detail-grid span,
  .detail-grid small { font-size: 12px; }
  .detail-grid strong { font-size: 17px; }
  .full-address { font-size: 14px; line-height: 1.55; }
  .modal-form > p { font-size: 15px; line-height: 1.55; }
  .small-button { min-height: 38px; font-size: 13px; }
  .text-button,
  .table-link { font-size: 14px; }
  .toast { font-size: 14px; }
}

@media (max-width: 480px) {
  .auth-panel { padding-inline: 16px; }
  .mobile-brand img { width: 170px; }
  .auth-heading h2 { font-size: 29px; }
  .topbar-title h1 { font-size: 24px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 116px; }
  .metric-card strong { font-size: 28px; }
  .user-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .user-metrics .metric-card {
    min-width: 0;
    min-height: 138px;
    padding: 14px;
  }
  .user-metrics .metric-card > span {
    min-height: 34px;
    font-size: 12px;
    line-height: 1.3;
  }
  .user-metrics .metric-card strong {
    min-width: 0;
    overflow: visible;
    margin-top: 4px;
    font-size: 24px;
    line-height: 1.05;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
  .user-metrics .metric-card small {
    margin-top: 9px;
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .asset-grid { grid-template-columns: 1fr 1fr; }
  .panel { padding: 16px; }
  .virtual-card { border-radius: 16px; padding: 19px; }
  .activation-card-stage { min-height: 258px; }
  .activation-card-stack { width: min(76vw, 300px); }
  .virtual-card.activation-card-visual {
    width: 100%;
    transform: translate3d(-2%, 4%, 18px) rotateZ(-2.5deg) rotateX(1.5deg) rotateY(-3deg);
  }
  .virtual-card .card-chip { width: 36px; height: 27px; }
  .card-number { font-size: 13px; }
  .detail-grid { grid-template-columns: 1fr; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100% - 24px); }
}

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