:root {
  --bg: #080d1d;
  --bg-2: #101735;
  --panel: #151d39;
  --panel-2: #111832;
  --line: #2a3968;
  --line-strong: #4263b8;
  --text: #f6f8ff;
  --muted: #a8b5df;
  --soft: #8093cc;
  --cyan: #35d4d8;
  --blue: #6b95ff;
  --blue-2: #3d77ef;
  --green: #2bc46c;
  --green-2: #153c3b;
  --yellow: #ffd46b;
  --orange: #f4a23a;
  --red: #ff6d83;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  --content-width: 1360px;
  --content-gutter: clamp(64px, 16vw, 320px);
  color-scheme: dark;
}

:root[data-theme="black"] {
  --bg: #030407;
  --bg-2: #0a0b10;
  --panel: #11131a;
  --panel-2: #0b0d13;
  --line: #2b3141;
  --line-strong: #4c6ed1;
  --text: #f8fafc;
  --muted: #a0a8b8;
  --soft: #7c879b;
  --cyan: #30d6d0;
  --blue: #6f91ff;
  --blue-2: #416de8;
  --green: #27c76f;
  --green-2: #102a24;
  --shadow: 0 22px 62px rgba(0, 0, 0, .52);
  color-scheme: dark;
}

:root[data-theme="white"] {
  --bg: #eef3fb;
  --bg-2: #f7f9fe;
  --panel: #ffffff;
  --panel-2: #f6f8fd;
  --line: #d7dfef;
  --line-strong: #7d99df;
  --text: #111827;
  --muted: #5b6780;
  --soft: #6d7890;
  --cyan: #0897a3;
  --blue: #3f6fe8;
  --blue-2: #275fd8;
  --green: #18a85d;
  --green-2: #e8f7ef;
  --yellow: #d89514;
  --orange: #d97918;
  --red: #d94a61;
  --shadow: 0 18px 46px rgba(45, 63, 102, .12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 96% 0, rgba(74, 45, 145, .35), transparent 34rem),
    linear-gradient(180deg, #0d1330 0, var(--bg) 46rem);
}

.topbar {
  min-height: 60px;
  padding: 8px 22px;
  border-bottom: 1px solid rgba(94, 115, 176, .32);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand.center {
  justify-content: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  color: white;
  font-weight: 900;
  background:
    linear-gradient(140deg, #24dbad, #6c8fff);
  font-size: 19px;
  box-shadow: inset 0 0 14px rgba(255, 255, 255, .18), 0 10px 24px rgba(27, 184, 193, .18);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.button-row.centered {
  justify-content: center;
}

.soft-button,
.primary-button,
.success-button,
.warm-button,
.ghost-button,
.text-button {
  border: 0;
  border-radius: 8px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
}

.soft-button {
  background: rgba(31, 42, 80, .86);
  border: 1px solid rgba(82, 104, 169, .35);
}

.primary-button {
  background: linear-gradient(180deg, #78a0ff, #5684f9);
  box-shadow: 0 12px 28px rgba(73, 116, 241, .28);
}

.success-button {
  background: linear-gradient(180deg, #30cd77, #24b95f);
  box-shadow: 0 12px 28px rgba(36, 185, 95, .22);
}

.warm-button {
  color: #1d2438;
  background: linear-gradient(180deg, #ffdf7d, #f4a53f);
  box-shadow: 0 12px 30px rgba(244, 165, 63, .26);
  font-weight: 800;
}

.ghost-button {
  background: rgba(15, 22, 47, .62);
  border: 1px solid rgba(82, 104, 169, .35);
  color: var(--muted);
}

.text-button {
  background: transparent;
  color: var(--muted);
  padding: 0;
  min-height: auto;
}

.soft-button:hover,
.primary-button:hover,
.success-button:hover,
.warm-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.wide {
  width: 100%;
}

.circle-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  font-weight: 800;
}

.theme-switch {
  min-height: 34px;
  padding: 3px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(31, 42, 80, .72);
  border: 1px solid rgba(82, 104, 169, .35);
}

.theme-switch button {
  min-height: 26px;
  border: 0;
  border-radius: 7px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.topbar .soft-button {
  min-height: 42px;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 800;
}

.topbar .circle-icon {
  width: 24px;
  height: 24px;
}

.topbar .theme-switch {
  min-height: 42px;
  padding: 4px;
  border-radius: 11px;
}

.topbar .theme-switch button {
  min-height: 32px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
}

.theme-switch button.is-active {
  color: var(--text);
  background: rgba(107, 149, 255, .22);
  box-shadow: inset 0 0 0 1px rgba(124, 156, 255, .26);
}

main {
  width: min(var(--content-width), calc(100% - var(--content-gutter)));
  margin: 26px auto 0;
}

.hero-panel {
  min-height: 318px;
  border: 1px solid rgba(76, 97, 160, .42);
  border-radius: 14px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(420px, 560px);
  justify-content: center;
  align-items: center;
  gap: 64px;
  overflow: hidden;
  background:
    linear-gradient(118deg, rgba(25, 63, 66, .52) 0, rgba(28, 36, 72, .82) 40%, rgba(36, 50, 92, .92) 100%);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-info {
  min-width: 0;
}

.hero-copy {
  justify-self: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: #adfff0;
  background: rgba(22, 128, 119, .28);
  border: 1px solid rgba(49, 225, 205, .42);
  font-size: 11px;
}

.hero-copy h1 {
  margin: 15px 0 9px;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-copy h1 span {
  color: var(--cyan);
  margin: 0 8px;
}

.hero-copy p,
.hero-info p,
.section-heading p,
.safe-tip,
.footer-line,
.modal p {
  color: var(--muted);
}

.hero-copy p {
  font-size: 13px;
  color: #d8e1ff;
}

i {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: middle;
  margin: 0 9px;
}

.hero-info {
  display: grid;
  gap: 8px;
  justify-self: stretch;
  width: min(100%, 560px);
}

.hero-info article {
  position: relative;
  min-width: 0;
  max-width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(16, 23, 50, .78);
  border: 1px solid rgba(58, 77, 132, .72);
}

.hero-info article.featured {
  border-color: rgba(80, 120, 218, .82);
}

.hero-info h2 {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.2;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.2;
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.2;
}

.hero-info p {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: anywhere;
}

.hero-info b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  margin-right: 6px;
  color: white;
  background: rgba(60, 111, 210, .6);
  border: 1px solid rgba(115, 153, 255, .7);
  font-size: 10px;
}

.pro-tag {
  position: absolute;
  top: -8px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(100deg, #ff936d, #a566ff);
  color: white;
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 1px;
  box-shadow: 0 8px 18px rgba(166, 102, 255, .3);
}

.stepper {
  margin: 18px 0 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
  list-style: none;
  counter-reset: none;
}

.stepper li {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #202b56;
  border: 1px solid rgba(87, 108, 176, .42);
  font-size: 12px;
  font-weight: 800;
}

.stepper li.active {
  color: white;
  background: linear-gradient(160deg, #42d7da, #5d87ff);
  box-shadow: 0 0 0 5px rgba(87, 132, 255, .18);
}

.stepper li:not(:last-child)::after {
  content: "";
  width: 40px;
  height: 2px;
  background: #25345f;
  position: absolute;
  left: calc(100% + 1px);
  top: 50%;
  transform: translateY(-50%);
}

.stepper li {
  position: relative;
}

.stepper li.done::after {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.flow-card,
.admin-card,
.login-panel {
  border: 1px solid rgba(76, 97, 160, .42);
  border-radius: 22px;
  background: rgba(21, 29, 57, .94);
  box-shadow: var(--shadow);
}

.flow-card {
  min-height: 246px;
  padding: 24px 26px;
}

#step2.flow-card {
  min-height: 386px;
  padding: 24px 26px;
}

#step2 .notice {
  min-height: 76px;
  border-radius: 17px;
  padding: 0 24px;
  margin-bottom: 30px;
  gap: 20px;
}

#step2 .notice span {
  width: 30px;
  height: 30px;
  font-size: 20px;
  font-weight: 900;
}

#step2 .notice strong {
  font-size: 17px;
}

#step2 .notice button {
  font-size: 28px;
}

#step2 .section-heading {
  margin-bottom: 24px;
}

#step2 .section-heading h2 {
  font-size: 20px;
}

#step2 .section-heading p,
#step2 .form-stack label {
  font-size: 13px;
}

#step2 .form-stack {
  gap: 14px;
}

#step2 textarea {
  min-height: 168px;
  border-radius: 14px;
  padding: 20px;
  font-size: 13px;
}

#step2 .button-row {
  gap: 10px;
  margin-top: 26px;
}

#step2 .primary-button,
#step2 .warm-button,
#step2 .ghost-button {
  min-height: 48px;
  border-radius: 10px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 800;
}

#step2 .button-icon.small {
  width: 18px;
  height: 18px;
  font-size: 12px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading.two-col {
  align-items: center;
}

.section-heading p {
  margin: 0;
  font-size: 12px;
}

.form-stack {
  display: grid;
  gap: 9px;
}

.form-stack label,
.modal-form label {
  color: var(--muted);
  font-size: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(76, 97, 160, .55);
  border-radius: 8px;
  color: var(--text);
  background: rgba(13, 20, 43, .88);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input {
  height: 42px;
  padding: 0 14px;
  font-size: 13px;
}

select {
  height: 42px;
  padding: 0 36px 0 14px;
  font-size: 13px;
  appearance: none;
  background-color: color-mix(in srgb, var(--panel-2) 88%, transparent);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

textarea {
  min-height: 112px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.55;
  font-size: 12px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(91, 131, 255, .22);
}

.flow-card .primary-button,
.flow-card .success-button,
.flow-card .warm-button {
  width: fit-content;
  min-width: 80px;
  min-height: 42px;
  font-size: 12px;
}

.notice {
  min-height: 44px;
  border-radius: 9px;
  padding: 0 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(43, 196, 108, .62);
  background: rgba(24, 65, 60, .76);
}

.notice span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(43, 196, 108, .28);
  color: #a7ffd1;
}

.notice button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}

.safe-tip {
  margin: -4px 0 0;
}

.result-panel {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.result-icon {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  font-size: 38px;
  font-weight: 900;
  margin-bottom: 18px;
  overflow: visible;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.result-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.result-icon.pending {
  display: inline-grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(189, 208, 255, .28), transparent 34%),
    rgba(91, 131, 255, .28);
  color: transparent;
  animation: waitingPulse 1.45s ease-in-out infinite;
}

.result-icon.pending::before {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: currentColor;
  color: #bed0ff;
  box-shadow: -18px 0 0 currentColor, 0 0 0 currentColor, 18px 0 0 currentColor;
  animation: waitingDots 1.1s ease-in-out infinite;
}

.result-icon.success {
  background:
    radial-gradient(circle at 34% 28%, rgba(214, 255, 231, .36), transparent 34%),
    linear-gradient(160deg, rgba(49, 216, 119, .92), rgba(27, 174, 92, .9));
  color: #f2fff8;
  text-shadow: 0 2px 12px rgba(0, 86, 35, .34);
  box-shadow: 0 18px 42px rgba(33, 198, 103, .22);
  animation: resultSuccessPop .72s cubic-bezier(.2, 1.28, .32, 1) both, successGlow 2.4s ease-in-out .72s infinite;
}

.result-icon.success::after {
  border: 2px solid rgba(92, 236, 146, .62);
  animation: resultSuccessRing 1.15s ease-out .08s both;
}

.result-icon.failed {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 214, 222, .24), transparent 34%),
    linear-gradient(160deg, rgba(255, 108, 130, .88), rgba(197, 55, 84, .9));
  color: #fff4f6;
  text-shadow: 0 2px 12px rgba(86, 0, 22, .35);
  box-shadow: 0 18px 42px rgba(255, 92, 122, .18);
  animation: resultFailedShake .58s ease both, failedGlow 2.1s ease-in-out .58s infinite;
}

.result-icon.failed::after {
  border: 2px solid rgba(255, 128, 152, .58);
  animation: resultFailedRing 1.05s ease-out both;
}

@keyframes waitingPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(91, 131, 255, .2);
  }
  50% {
    transform: scale(1.045);
    box-shadow: 0 0 0 14px rgba(91, 131, 255, 0);
  }
}

@keyframes waitingDots {
  0%, 100% {
    opacity: .45;
    transform: translate(-50%, -50%) scale(.96);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes resultSuccessPop {
  0% {
    opacity: .55;
    transform: scale(.72) rotate(-8deg);
  }
  58% {
    opacity: 1;
    transform: scale(1.12) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes resultSuccessRing {
  0% {
    opacity: .72;
    transform: scale(.82);
  }
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes successGlow {
  0%, 100% {
    box-shadow: 0 18px 42px rgba(33, 198, 103, .22), 0 0 0 0 rgba(43, 196, 108, .12);
  }
  50% {
    box-shadow: 0 20px 48px rgba(33, 198, 103, .3), 0 0 0 12px rgba(43, 196, 108, 0);
  }
}

@keyframes resultFailedShake {
  0% {
    opacity: .72;
    transform: scale(.9) translateX(0);
  }
  18% {
    transform: scale(1.04) translateX(-5px);
  }
  36% {
    transform: scale(1.04) translateX(5px);
  }
  54% {
    transform: scale(1.02) translateX(-3px);
  }
  72% {
    transform: scale(1.01) translateX(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

@keyframes resultFailedRing {
  0% {
    opacity: .64;
    transform: scale(.86);
  }
  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@keyframes failedGlow {
  0%, 100% {
    box-shadow: 0 18px 42px rgba(255, 92, 122, .18), 0 0 0 0 rgba(255, 109, 131, .1);
  }
  50% {
    box-shadow: 0 20px 48px rgba(255, 92, 122, .26), 0 0 0 10px rgba(255, 109, 131, 0);
  }
}

.result-icon.success + h2 {
  color: #d9ffe9;
}

.result-icon.failed + h2 {
  color: #ffdce3;
}

.result-panel dl {
  margin: 18px 0;
  border-radius: 10px;
  border: 1px solid rgba(76, 97, 160, .42);
  overflow: hidden;
  text-align: left;
}

.result-panel dl > div {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(76, 97, 160, .28);
}

.result-panel dl > div:last-child {
  border-bottom: 0;
}

#step3 .button-row {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 24px;
}

#step3 .button-row > button {
  flex: 0 0 auto;
  width: auto;
  min-width: 112px;
}

.tracked-orders-panel {
  margin: 18px 0 0;
  border: 1px solid rgba(76, 97, 160, .42);
  border-radius: 12px;
  background: rgba(12, 21, 49, .48);
  overflow: hidden;
  text-align: left;
}

.tracked-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(76, 97, 160, .26);
}

.tracked-orders-head strong {
  color: var(--text);
  font-size: 14px;
}

.tracked-orders-head span,
.tracked-order span {
  color: var(--muted);
  font-size: 12px;
}

.tracked-orders-list {
  display: grid;
}

.tracked-order {
  display: grid;
  grid-template-columns: 14px minmax(180px, 1fr) minmax(180px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(76, 97, 160, .18);
}

.tracked-order:last-child {
  border-bottom: 0;
}

.tracked-order.active {
  background: rgba(83, 126, 255, .09);
}

.tracked-order > div {
  min-width: 0;
}

.tracked-order strong,
.tracked-order span {
  display: block;
  overflow-wrap: anywhere;
}

.tracked-order-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(120, 150, 255, .12);
}

.tracked-order-dot.pending {
  background: #8aa5ff;
  animation: waitingPulse 1.45s ease-in-out infinite;
}

.tracked-order-dot.success {
  background: #35d079;
  box-shadow: 0 0 0 4px rgba(53, 208, 121, .13);
}

.tracked-order-dot.failed {
  background: #ff6b85;
  box-shadow: 0 0 0 4px rgba(255, 107, 133, .13);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.footer-line {
  width: min(var(--content-width), calc(100% - var(--content-gutter)));
  margin: 28px auto 0;
  padding: 18px 0 22px;
  font-size: 10px;
  text-align: center;
  border-top: 1px solid rgba(94, 115, 176, .32);
}

.hidden {
  display: none !important;
}

body.submission-started #step2 [data-reset],
body.submission-started [data-prev-step] {
  display: none !important;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 8, 23, .72);
  backdrop-filter: blur(8px);
  z-index: 40;
}

.modal {
  width: min(380px, 100%);
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(76, 97, 160, .5);
  padding: 22px;
  text-align: center;
  background: #171f3b;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
}

.modal-icon {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 14px auto 16px;
  background: linear-gradient(160deg, #7b6cff, #5a8dff);
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.modal-icon.good {
  background: linear-gradient(160deg, #2dd575, #20b662);
}

.modal-icon.login-icon {
  width: 54px;
  height: 54px;
  background: linear-gradient(160deg, #7b6cff, #5a8dff);
  font-size: 24px;
}

.guide-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.login-guide-modal {
  width: min(540px, calc(100vw - 32px));
  min-height: 540px;
  border-radius: 20px;
  padding: 62px 34px 30px;
  background: #151d37;
}

#guideModal .modal-close {
  top: 10px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  font-size: 28px;
  font-weight: 800;
}

#guideModal .modal-icon.login-icon {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: linear-gradient(160deg, #7d70ff, #5d85ff);
}

.login-glyph {
  position: relative;
  width: 38px;
  height: 34px;
  display: block;
}

.login-glyph::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 10px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: white;
}

.login-glyph::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 2px;
  width: 22px;
  height: 12px;
  border-radius: 12px 12px 2px 2px;
  background: white;
}

#guideModal .modal-icon.login-icon::after {
  content: "";
  position: absolute;
  top: 40px;
  left: 44px;
  width: 12px;
  height: 6px;
  border-left: 4px solid white;
  border-bottom: 4px solid white;
  transform: rotate(-45deg);
}

#guideModal h2 {
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
}

#guideModal p {
  max-width: 430px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

#guideModal .guide-actions {
  gap: 15px;
  margin-top: 38px;
}

#guideModal .guide-actions .success-button,
#guideModal .guide-actions .primary-button,
#guideModal .guide-actions .ghost-button {
  min-height: 66px;
  border-radius: 13px;
  font-size: 18px;
  font-weight: 900;
}

#guideModal .guide-actions .primary-button {
  background: linear-gradient(180deg, #4f86f6, #3677ee);
}

#guideModal .guide-actions .ghost-button {
  color: #98a5c5;
  background: rgba(15, 22, 47, .46);
  border-color: rgba(82, 104, 169, .46);
}

#guideModal .button-icon {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.guide-actions .success-button,
.guide-actions .primary-button,
.guide-actions .ghost-button {
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}

.guide-actions .ghost-button {
  border-color: rgba(76, 97, 160, .52);
}

.button-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  font-weight: 900;
}

.button-icon.small {
  width: 18px;
  height: 18px;
  font-size: 11px;
}

.modal-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.confirm-box,
.query-result {
  margin: 16px 0;
  border-radius: 10px;
  border: 1px solid rgba(76, 97, 160, .42);
  background: rgba(22, 31, 61, .78);
  text-align: left;
  overflow: hidden;
}

.confirm-box div,
.query-result div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(76, 97, 160, .24);
}

.confirm-box div:last-child,
.query-result div:last-child {
  border-bottom: 0;
}

.confirm-box span,
.query-result span {
  color: var(--muted);
}

.recharge-confirm-modal {
  width: min(440px, calc(100vw - 32px));
  min-height: auto;
  border-radius: 16px;
  padding: 44px 24px 24px;
  background: var(--panel);
}

#confirmModal .modal-close {
  top: 6px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 800;
}

#confirmModal .confirm-status-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  font-size: 30px;
  background: linear-gradient(160deg, #2dd575, #20b662);
}

#confirmModal h2 {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 900;
}

#confirmModal p {
  max-width: 360px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

#confirmModal .confirm-box {
  margin: 16px 0 20px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
}

#confirmModal .confirm-box div {
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
}

#confirmModal .confirm-box div:not(:last-child) {
  border-bottom-style: dashed;
}

#confirmModal .confirm-box span {
  font-size: 13px;
}

#confirmModal .confirm-box strong {
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

#confirmModal .success-button,
#confirmModal .primary-button,
#confirmModal .ghost-button {
  min-height: 46px;
  border-radius: 10px;
  margin-top: 9px;
  font-size: 15px;
  font-weight: 900;
}

#confirmModal .primary-button {
  background: linear-gradient(180deg, #4f86f6, #3677ee);
}

#confirmModal .ghost-button {
  color: #98a5c5;
  background: rgba(15, 22, 47, .46);
  border-color: rgba(82, 104, 169, .46);
}

#confirmModal .button-icon {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(620px, calc(100% - 44px));
  min-height: 72px;
  border: 1px solid rgba(91, 131, 255, .45);
  border-radius: 20px;
  padding: 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  background: rgba(24, 33, 65, .98);
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.toast::before {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  background: rgba(255, 255, 255, .16);
  color: white;
}

.toast.success {
  border-color: rgba(43, 196, 108, .7);
  background: rgba(21, 58, 55, .98);
}

.toast.success::before {
  content: "✓";
}

.toast.error {
  border-color: rgba(255, 109, 131, .72);
  background: rgba(57, 30, 51, .98);
}

.toast.error::before {
  content: "×";
}

.toast.warning {
  border-color: rgba(255, 212, 107, .74);
  background: rgba(66, 49, 25, .98);
}

.toast.warning::before {
  content: "!";
}

.toast.info::before {
  content: "i";
}

.admin-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0, rgba(40, 168, 155, .16), transparent 36rem),
    linear-gradient(180deg, #0c1230 0, #080d1d 100%);
}

.admin-layout {
  width: min(1480px, calc(100% - 32px));
  padding: 14px 0 36px;
}

.admin-theme-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.login-panel {
  width: min(380px, 100%);
  padding: 22px;
  margin: 12vh auto 0;
}

.dashboard {
  display: grid;
  gap: 12px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 10px;
}

.current-processing-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(76, 97, 160, .38);
  border-radius: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--panel-2) 80%, transparent);
  box-shadow: 0 14px 36px rgba(3, 8, 22, .14);
}

.current-processing-banner.active {
  cursor: pointer;
}

.current-processing-banner strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}

.current-processing-banner small,
.current-processing-banner em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.current-processing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.current-processing-actions .mini-button {
  min-height: 32px;
  padding: 0 12px;
}

.current-processing-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--muted) 16%, transparent);
}

.current-processing-banner.active {
  border-color: rgba(93, 178, 255, .56);
  background:
    linear-gradient(90deg, rgba(45, 145, 255, .18), rgba(45, 212, 191, .1)),
    color-mix(in srgb, var(--panel-2) 84%, transparent);
}

.current-processing-banner.active .current-processing-dot {
  background: #63d7ff;
  box-shadow: 0 0 0 6px rgba(99, 215, 255, .14), 0 0 22px rgba(99, 215, 255, .52);
  animation: current-processing-pulse 1.35s ease-in-out infinite;
}

.current-processing-banner.idle {
  opacity: .86;
}

@keyframes current-processing-pulse {
  0%, 100% {
    transform: scale(.9);
  }
  50% {
    transform: scale(1.18);
  }
}

.stat {
  border: 1px solid rgba(76, 97, 160, .42);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(21, 29, 57, .88);
}

.stat span {
  color: var(--muted);
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.admin-card {
  padding: 14px;
}

.admin-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.order-search {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.order-search-field,
.order-page-size {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.order-search-field input {
  width: min(260px, 46vw);
}

.order-page-size select {
  min-width: 82px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-grid label {
  display: grid;
  gap: 10px;
}

.single-import-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(160px, 1.1fr) minmax(110px, .7fr) minmax(96px, .6fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(88, 113, 180, .34);
  border-radius: 12px;
  background: rgba(10, 18, 42, .34);
}

.single-import-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-card textarea {
  min-height: 112px;
  font-size: 12px;
}

.admin-card input,
.admin-card select {
  height: 38px;
  font-size: 12px;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-item {
  border-radius: 8px;
  padding: 10px;
  background: rgba(13, 20, 43, .72);
  border: 1px solid rgba(76, 97, 160, .24);
}

.event-item strong {
  display: block;
  margin-bottom: 6px;
}

.event-item span,
td small {
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  border-radius: 9px;
  border: 1px solid rgba(76, 97, 160, .32);
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
}

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

.orders-table {
  min-width: 1240px;
  table-layout: fixed;
}

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

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

.orders-table th:nth-child(1),
.orders-table td:nth-child(1) {
  width: 150px;
}

.orders-table th:nth-child(2),
.orders-table td:nth-child(2) {
  width: 190px;
}

.orders-table th:nth-child(3),
.orders-table td:nth-child(3) {
  width: 150px;
}

.orders-table th:nth-child(4),
.orders-table td:nth-child(4) {
  width: 70px;
}

.orders-table th:nth-child(5),
.orders-table td:nth-child(5) {
  width: 190px;
}

.orders-table th:nth-child(7),
.orders-table td:nth-child(7) {
  width: 110px;
}

.orders-table th:nth-child(8),
.orders-table td:nth-child(8) {
  width: 150px;
}

th,
td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(76, 97, 160, .22);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 700;
  background: rgba(13, 20, 43, .56);
}

td {
  color: var(--text);
}

tr:last-child td {
  border-bottom: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-weight: 800;
  font-size: 11px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 999px;
  background: currentColor;
}

.status-unused,
.status-success {
  color: #9fffc7;
  background: rgba(43, 196, 108, .14);
  border: 1px solid rgba(43, 196, 108, .38);
}

.status-pending {
  color: #ffe08a;
  background: rgba(244, 162, 58, .16);
  border: 1px solid rgba(244, 162, 58, .46);
}

.status-used,
.status-failed {
  color: #ffb0bd;
  background: rgba(255, 109, 131, .14);
  border: 1px solid rgba(255, 109, 131, .38);
}

.status-deleted {
  color: var(--soft);
  background: rgba(128, 147, 204, .12);
  border: 1px solid rgba(128, 147, 204, .32);
}

.processing-state {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(76, 97, 160, .28);
  background: rgba(11, 18, 40, .42);
  line-height: 1.35;
}

.processing-state strong {
  font-size: 12px;
  color: var(--text);
}

.processing-state span,
.processing-state small,
.processing-state em {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.processing-processing {
  border-color: rgba(91, 131, 255, .46);
  background: rgba(91, 131, 255, .12);
}

.processing-processing strong {
  color: #9ec7ff;
}

.processing-ready {
  border-color: rgba(53, 212, 216, .38);
  background: rgba(53, 212, 216, .1);
}

.processing-success {
  border-color: rgba(43, 196, 108, .42);
  background: rgba(43, 196, 108, .1);
}

.processing-warning,
.processing-pending {
  border-color: rgba(244, 162, 58, .36);
  background: rgba(244, 162, 58, .1);
}

.processing-failed {
  border-color: rgba(255, 109, 131, .42);
  background: rgba(255, 109, 131, .1);
}

.orders-table tr.status-row-pending td:first-child {
  box-shadow: inset 3px 0 0 var(--orange);
}

.orders-table tr.is-current-processing td {
  background: rgba(66, 153, 225, .08);
}

.orders-table tr.is-current-processing td:first-child {
  box-shadow: inset 4px 0 0 #63d7ff;
}

.orders-table tr.order-row-jump td {
  animation: order-row-jump 1.15s ease-in-out 2;
  outline: 1px solid rgba(99, 215, 255, .5);
  outline-offset: -1px;
}

@keyframes order-row-jump {
  0%, 100% {
    background: rgba(66, 153, 225, .08);
  }
  50% {
    background: rgba(99, 215, 255, .24);
  }
}

.orders-table tr.status-row-success td:first-child {
  box-shadow: inset 3px 0 0 var(--green);
}

.orders-table tr.status-row-failed td:first-child {
  box-shadow: inset 3px 0 0 var(--red);
}

.row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(62px, 1fr));
  gap: 8px;
  align-items: center;
}

.row-actions .mini-button {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
}

.card-filter,
.copy-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-cell {
  min-width: 390px;
}

.copyable-cell {
  display: grid;
  gap: 10px;
  max-width: 100%;
}

.copyable-text {
  max-height: 7.2em;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border: 1px solid rgba(76, 97, 160, .26);
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid rgba(76, 97, 160, .4);
  color: var(--text);
  background: rgba(31, 42, 80, .86);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.mini-button.success {
  border-color: rgba(43, 196, 108, .52);
  background: rgba(43, 196, 108, .18);
}

.mini-button.danger {
  border-color: rgba(255, 109, 131, .52);
  background: rgba(255, 109, 131, .16);
}

.mini-button.copy {
  width: fit-content;
  border-color: rgba(91, 131, 255, .52);
  background: rgba(91, 131, 255, .18);
}

.mini-button.auto {
  width: fit-content;
  border-color: rgba(53, 212, 216, .52);
  background: rgba(53, 212, 216, .16);
}

.mini-button.is-active {
  border-color: rgba(91, 131, 255, .72);
  background: rgba(91, 131, 255, .26);
  color: var(--text);
}

.mini-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.batch-automation-card {
  min-width: 0;
}

.auto-execute-card {
  min-width: 0;
}

.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(76, 97, 160, .34);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  cursor: pointer;
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2fcf75;
}

.settings-toggle span {
  display: grid;
  gap: 5px;
}

.settings-toggle strong {
  color: var(--text);
  font-size: 13px;
}

.settings-toggle small {
  color: var(--muted);
  line-height: 1.5;
}

.settings-select {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(76, 97, 160, .34);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
}

.settings-select span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.settings-select select {
  width: min(520px, 100%);
}

.settings-select small {
  color: var(--muted);
  line-height: 1.5;
}

.auto-execute-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(76, 97, 160, .28);
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  font-size: 12px;
  line-height: 1.5;
}

.auto-execute-status.active {
  border-color: rgba(45, 212, 191, .48);
  color: #a7f3d0;
  background: rgba(20, 83, 68, .24);
}

.auto-execute-status.idle {
  border-color: rgba(148, 163, 184, .28);
}

.batch-automation-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
}

.batch-automation-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.batch-automation-form input,
.batch-automation-form select {
  width: 100%;
  height: 38px;
  min-width: 0;
  border-radius: 9px;
  border: 1px solid rgba(76, 97, 160, .42);
  padding: 0 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel-2) 86%, transparent);
  outline: none;
}

.batch-automation-form input:focus,
.batch-automation-form select:focus {
  border-color: rgba(91, 131, 255, .78);
  box-shadow: 0 0 0 3px rgba(91, 131, 255, .12);
}

.batch-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(76, 97, 160, .28);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-2) 76%, transparent);
}

.batch-check input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.batch-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.batch-output {
  margin-top: 14px;
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(76, 97, 160, .32);
  padding: 10px 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.payment-test-cell {
  min-width: 92px;
  max-width: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-output .ok {
  color: #9fffc7;
}

.batch-output .error {
  color: #ffb0bd;
}

.batch-output .warn {
  color: #ffd46a;
}

.code-text {
  white-space: nowrap;
}

.email-cell {
  min-width: 180px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.auto-login-info {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.auto-login-info.error {
  color: #ffb0bd;
}

.auto-login-info.warning {
  color: #ffd46a;
}

.order-account-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(76, 97, 160, .34);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 84%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.order-account-panel.muted,
.order-account-panel.error {
  color: var(--muted);
  font-size: 12px;
}

.order-account-panel.error {
  color: #ffb0bd;
  border-color: rgba(255, 109, 131, .4);
  background: rgba(255, 109, 131, .08);
}

.order-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(76, 97, 160, .22);
  color: var(--muted);
  font-size: 12px;
}

.order-account-header strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.order-account-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 12px;
  font-size: 12px;
}

.order-account-grid span {
  color: var(--muted);
}

.order-account-grid strong {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.order-payment-row {
  display: grid;
  grid-template-columns: minmax(118px, .55fr) minmax(220px, 1fr);
  gap: 8px;
  align-items: end;
}

.order-payment-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.order-payment-row select {
  width: 100%;
  height: 34px;
  border-radius: 7px;
  border: 1px solid rgba(76, 97, 160, .42);
  color: var(--text);
  background: color-mix(in srgb, var(--panel-2) 86%, transparent);
}

.order-payment-test-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(96px, .7fr) minmax(88px, .6fr);
  gap: 8px;
}

.order-payment-test-fields label {
  min-width: 0;
}

.order-payment-test-fields input {
  width: 100%;
  height: 36px;
  min-width: 0;
  border-radius: 9px;
  border: 1px solid rgba(76, 97, 160, .42);
  padding: 0 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  outline: none;
}

.order-payment-test-fields input:focus {
  border-color: rgba(91, 131, 255, .78);
  box-shadow: 0 0 0 3px rgba(91, 131, 255, .12);
}

.order-payment-test-fields.bound-card-fields {
  padding: 10px;
  border: 1px solid rgba(255, 204, 92, .35);
  border-radius: 10px;
  background: rgba(255, 204, 92, .08);
}

.order-payment-test-fields.bound-card-fields input[readonly] {
  cursor: default;
  color: var(--text);
  border-color: rgba(255, 204, 92, .38);
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
}

.order-payment-test-fields.bound-card-fields label span {
  color: #ffd46a;
}

.order-payment-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.order-action-result {
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-2) 80%, transparent);
}

.order-action-result.success {
  color: #9fffc7;
  background: rgba(43, 196, 108, .12);
}

.order-action-result.error {
  color: #ffb0bd;
  background: rgba(255, 109, 131, .1);
}

.order-action-result.warning {
  color: #ffd46a;
  border: 1px solid rgba(255, 212, 106, .28);
  background: rgba(255, 190, 76, .1);
}

:root[data-theme="black"] .site-shell,
:root[data-theme="black"] .admin-shell {
  background:
    radial-gradient(circle at 88% 0, rgba(54, 70, 138, .18), transparent 30rem),
    linear-gradient(180deg, #07080d 0, #030407 100%);
}

:root[data-theme="black"] .hero-panel {
  background:
    linear-gradient(118deg, rgba(15, 35, 37, .66) 0, rgba(16, 18, 28, .94) 45%, rgba(18, 22, 34, .98) 100%);
}

:root[data-theme="black"] .flow-card,
:root[data-theme="black"] .admin-card,
:root[data-theme="black"] .login-panel,
:root[data-theme="black"] .stat,
:root[data-theme="black"] .modal {
  background: rgba(17, 19, 26, .96);
}

:root[data-theme="black"] .hero-info article,
:root[data-theme="black"] input,
:root[data-theme="black"] select,
:root[data-theme="black"] textarea,
:root[data-theme="black"] .event-item,
:root[data-theme="black"] .confirm-box,
:root[data-theme="black"] .query-result {
  background: rgba(8, 10, 16, .88);
}

:root[data-theme="black"] .soft-button,
:root[data-theme="black"] .theme-switch,
:root[data-theme="black"] .mini-button {
  background: rgba(20, 23, 32, .92);
}

:root[data-theme="black"] .ghost-button {
  background: rgba(8, 10, 16, .72);
}

:root[data-theme="white"] .site-shell,
:root[data-theme="white"] .admin-shell {
  background:
    radial-gradient(circle at 92% 0, rgba(93, 126, 224, .16), transparent 30rem),
    linear-gradient(180deg, #f7f9fe 0, #eef3fb 100%);
}

:root[data-theme="white"] .hero-panel {
  background:
    linear-gradient(118deg, rgba(224, 249, 247, .9) 0, rgba(255, 255, 255, .96) 46%, rgba(230, 237, 252, .98) 100%);
}

:root[data-theme="white"] .flow-card,
:root[data-theme="white"] .admin-card,
:root[data-theme="white"] .login-panel,
:root[data-theme="white"] .stat,
:root[data-theme="white"] .modal {
  background: rgba(255, 255, 255, .96);
}

:root[data-theme="white"] .hero-info article,
:root[data-theme="white"] input,
:root[data-theme="white"] select,
:root[data-theme="white"] textarea,
:root[data-theme="white"] .event-item,
:root[data-theme="white"] .confirm-box,
:root[data-theme="white"] .query-result {
  background: rgba(248, 250, 255, .94);
}

:root[data-theme="white"] .soft-button,
:root[data-theme="white"] .theme-switch,
:root[data-theme="white"] .mini-button {
  background: rgba(255, 255, 255, .86);
  border-color: rgba(134, 154, 198, .42);
}

:root[data-theme="white"] .ghost-button {
  background: rgba(246, 248, 253, .86);
}

:root[data-theme="white"] .theme-switch button.is-active {
  background: rgba(63, 111, 232, .14);
}

:root[data-theme="white"] th {
  background: rgba(237, 242, 251, .86);
}

:root[data-theme="white"] td {
  color: #1f2937;
}

:root[data-theme="white"] .toast {
  background: rgba(255, 255, 255, .96);
}

:root[data-theme="white"] .toast.success {
  color: #0f5132;
  background: rgba(232, 247, 239, .98);
}

:root[data-theme="white"] .toast.error {
  color: #842029;
  background: rgba(255, 235, 238, .98);
}

:root[data-theme="white"] .toast.warning {
  color: #6a4a00;
  background: rgba(255, 247, 222, .98);
}

:root[data-theme="white"] .pill {
  color: #057b83;
  background: rgba(8, 151, 163, .1);
}

:root[data-theme="white"] .notice {
  background: rgba(232, 247, 239, .92);
}

:root[data-theme="white"] .status-pending {
  color: #3158bd;
  background: rgba(63, 111, 232, .1);
}

:root[data-theme="white"] .status-unused,
:root[data-theme="white"] .status-success {
  color: #0f8d4e;
  background: rgba(24, 168, 93, .1);
}

:root[data-theme="white"] .status-used,
:root[data-theme="white"] .status-failed {
  color: #bd3249;
  background: rgba(217, 74, 97, .1);
}

.account-shell {
  min-height: 100vh;
  color: #1f2937;
  background:
    linear-gradient(180deg, rgba(224, 233, 250, .98), rgba(245, 248, 254, .96)),
    #eef3fb;
}

.account-topbar {
  min-height: 64px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-main {
  width: min(100% - 96px, 1500px);
  margin: 18px auto 54px;
  display: grid;
  gap: 18px;
}

.account-entry,
.account-panel {
  background: rgba(255, 255, 255, .94);
  border: 1px solid #d7e2f5;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(71, 90, 130, .14);
}

.account-entry {
  padding: 22px 30px;
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(420px, 1fr);
  gap: 28px;
  align-items: start;
}

.account-entry h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.account-entry p {
  margin: 0;
  color: #68768f;
}

.token-form {
  display: grid;
  gap: 12px;
}

.token-form textarea {
  min-height: 82px;
  resize: vertical;
  color: #1f2937;
  background: #f9fbff;
  border-color: #cfdcf1;
}

.account-config-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.account-config-row select,
.subscription-picker-modal select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  color: #334155;
  background: #fff;
  border: 1px solid #cfd8e8;
  border-radius: 8px;
  outline: none;
}

.account-panel {
  overflow: hidden;
}

.account-panel-title {
  min-height: 78px;
  padding: 0 28px;
  border-bottom: 1px solid #dce5f5;
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-panel-title h2 {
  margin: 0;
  font-size: 25px;
}

.panel-line-icon {
  width: 24px;
  height: 24px;
  border: 2px solid #3a8fff;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  position: relative;
}

.panel-line-icon::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid #3a8fff;
  border-radius: 999px;
  position: absolute;
  top: -14px;
  left: 5px;
}

.panel-status {
  margin-left: auto;
  padding: 7px 12px;
  color: #68768f;
  background: #eef3fb;
  border: 1px solid #dbe5f5;
  border-radius: 999px;
  font-weight: 700;
}

.panel-status.good {
  color: #28a05e;
  background: #ecf9f1;
  border-color: #c9efd6;
}

.account-detail-grid {
  padding: 48px 30px 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 28px;
}

.detail-tile {
  min-height: 132px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #f9fbff, #eef5fd);
  border: 1px solid #d8e4f6;
  border-radius: 13px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.detail-tile span {
  color: #697893;
  font-size: 16px;
}

.detail-tile strong {
  min-width: 0;
  color: #1f2937;
  font-size: 23px;
  line-height: 1.22;
  word-break: break-word;
}

.detail-tile .accent {
  color: #ed9a23;
}

.detail-tile mark {
  display: inline-flex;
  min-height: 40px;
  padding: 8px 22px;
  align-items: center;
  color: #fff;
  background: #eda334;
  border-radius: 5px;
}

.detail-tile em,
.detail-tile small {
  display: inline-flex;
  padding: 9px 14px;
  color: #5fbf35;
  background: #f0fae9;
  border: 1px solid #d9f0cb;
  border-radius: 6px;
  font-size: 16px;
  font-style: normal;
}

.detail-tile em {
  color: #ff5d5d;
  background: #fff0f0;
  border-color: #ffd8d8;
}

.subscription-note {
  margin: 0 30px 30px;
  min-height: 90px;
  padding: 20px 28px;
  color: #5ec036;
  background: #effaea;
  border: 2px solid #5dc743;
  border-radius: 14px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.subscription-note strong {
  font-size: 19px;
}

.subscription-note span {
  color: #ed9a23;
}

.subscription-note.error {
  color: #ff5d5d;
  background: #fff0f0;
  border-color: #ff9b9b;
}

.subscription-note.error span {
  color: #ff5d5d;
}

.account-actions {
  margin: 0 30px 36px;
  padding-top: 30px;
  border-top: 1px solid #dde6f5;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 34px;
}

.gold-button,
.blue-gradient-button,
.danger-button,
.purple-button,
.account-actions .success-button {
  min-width: 250px;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 18px 30px rgba(51, 70, 110, .14);
}

.account-actions .success-button {
  width: auto;
}

.gold-button {
  background: #f1c77d;
}

.blue-gradient-button {
  background: linear-gradient(100deg, #24a1c9, #453dee);
}

.danger-button {
  background: #ffb0b4;
}

.purple-button {
  background: linear-gradient(100deg, #657ee9, #8050b0);
}

.account-actions button:disabled {
  cursor: not-allowed;
  filter: grayscale(.45);
  opacity: .56;
  box-shadow: none;
}

.account-action-result {
  margin: -8px 30px 36px;
  padding: 18px 22px;
  background: #f7fbff;
  border: 1px solid #d8e4f6;
  border-radius: 12px;
  display: grid;
  gap: 12px;
}

.account-action-result.success {
  background: #f0fae9;
  border-color: #b9eaa5;
}

.account-action-result.error {
  background: #fff0f0;
  border-color: #ffbaba;
}

.account-action-result > div {
  display: grid;
  gap: 4px;
}

.account-action-result strong {
  color: #1f2937;
  font-size: 17px;
}

.account-action-result span {
  color: #59667a;
}

.account-action-result pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  color: #263449;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-link {
  width: fit-content;
  padding: 9px 14px;
  color: #fff;
  background: linear-gradient(100deg, #24a1c9, #453dee);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.subscription-picker-modal {
  width: min(720px, calc(100vw - 32px));
  background: #fff;
  color: #202938;
  border-color: #d8e0ed;
}

.subscription-picker-modal h2 {
  margin: 0 0 26px;
  font-size: 22px;
  font-weight: 500;
}

.subscription-picker-modal label {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  color: #5f687a;
  font-size: 16px;
}

.modal-alert {
  min-height: 58px;
  padding: 17px 22px;
  color: #8c94a3;
  background: #f2f2f4;
  border-radius: 10px;
  font-size: 16px;
}

.modal-action-stack {
  margin-top: 28px;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.modal-action-stack .wide {
  width: min(100%, 540px);
}

@media (max-width: 980px) {
  .topbar,
  .admin-header,
  .account-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  main,
  .footer-line,
  .admin-layout,
  .account-main {
    width: min(100% - 28px, 860px);
  }

  .hero-panel,
  .admin-grid,
  .batch-automation-form,
  .account-entry,
  .account-detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 20px;
    gap: 22px;
  }

  .hero-copy h1,
  .hero-info p {
    white-space: normal;
  }

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

  .section-heading,
  .section-heading.two-col {
    display: grid;
  }
}

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

  body {
    font-size: 12px;
  }

  .site-shell {
    background:
      radial-gradient(circle at 100% 0, rgba(74, 45, 145, .24), transparent 22rem),
      linear-gradient(180deg, #0d1330 0, var(--bg) 36rem);
  }

  .batch-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-payment-test-fields {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 8px 12px;
    gap: 10px;
    align-items: stretch;
  }

  .brand {
    width: 100%;
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 9px;
    font-size: 17px;
  }

  .brand strong {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .brand small {
    font-size: 10px;
  }

  .top-actions,
  .button-row,
  .account-config-row {
    width: 100%;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .account-config-row {
    grid-template-columns: 1fr;
  }

  .theme-switch {
    width: 100%;
  }

  .theme-switch button {
    flex: 1;
    min-width: 0;
  }

  .soft-button,
  .primary-button,
  .success-button,
  .warm-button,
  .ghost-button,
  .gold-button,
  .blue-gradient-button,
  .danger-button,
  .purple-button {
    width: 100%;
  }

  .hero-panel,
  .flow-card,
  .admin-card,
  .login-panel,
  .modal,
  .account-entry {
    padding: 18px;
    border-radius: 12px;
  }

  main {
    width: min(100% - 20px, 520px);
    margin-top: 14px;
  }

  .hero-panel {
    min-height: auto;
    gap: 16px;
    align-items: stretch;
  }

  .hero-copy h1 {
    margin-top: 12px;
    font-size: 21px;
    line-height: 1.28;
    white-space: normal;
  }

  .hero-copy p {
    font-size: 12px;
    line-height: 1.6;
  }

  .hero-info {
    gap: 8px;
    width: 100%;
  }

  .hero-info article {
    min-height: auto;
    padding: 10px 12px;
  }

  .stepper {
    margin: 16px 0;
    gap: 36px;
  }

  .flow-card {
    min-height: auto;
  }

  .section-heading,
  .section-heading.two-col {
    gap: 10px;
  }

  .section-heading h2 {
    font-size: 16px;
  }

  .section-heading p {
    font-size: 12px;
    line-height: 1.55;
  }

  .text-button {
    justify-content: flex-start;
    width: auto;
  }

  .account-panel-title,
  .account-detail-grid,
  .subscription-note,
  .account-actions {
    margin-left: 18px;
    margin-right: 18px;
    padding-left: 0;
    padding-right: 0;
  }

  .account-panel-title {
    margin: 0;
    padding: 0 18px;
  }

  .account-detail-grid {
    padding-top: 22px;
  }

  .hero-copy h1 span {
    margin: 0 8px 0 0;
  }

  .hero-info p {
    font-size: 12px;
  }

  .stepper li:not(:last-child)::after {
    width: 34px;
  }

  input,
  select {
    height: 42px;
    font-size: 13px;
  }

  textarea {
    font-size: 12px;
  }

  #step2.flow-card {
    min-height: auto;
    padding: 18px;
  }

  #step2 .notice {
    min-height: 60px;
    padding: 0 14px;
    margin-bottom: 22px;
    border-radius: 12px;
  }

  #step2 .notice strong,
  #step2 .section-heading h2,
  #step2 .primary-button,
  #step2 .warm-button,
  #step2 .ghost-button {
    font-size: 15px;
  }

  #step2 textarea {
    min-height: 160px;
    padding: 14px;
    font-size: 12px;
  }

  #step2 .button-row {
    margin-top: 18px;
  }

  #step3 .button-row {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    flex-wrap: nowrap;
    gap: 10px;
  }

  #step3 .button-row > button {
    width: 100%;
    min-width: 0;
  }

  .result-panel {
    max-width: 100%;
  }

  .result-panel dl {
    margin: 14px 0;
  }

  .result-panel dl > div {
    padding: 10px 11px;
  }

  .tracked-orders-head {
    display: grid;
    align-items: start;
  }

  .tracked-order {
    grid-template-columns: 12px 1fr;
  }

  .tracked-order > div:last-child {
    grid-column: 2;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    transform: none;
  }

  .login-guide-modal {
    min-height: auto;
    padding: 56px 18px 22px;
  }

  #guideModal .modal-icon.login-icon {
    width: 68px;
    height: 68px;
    margin-bottom: 22px;
  }

  #guideModal .modal-icon.login-icon::after {
    top: 38px;
    left: 42px;
  }

  #guideModal h2 {
    font-size: 22px;
  }

  #guideModal p {
    font-size: 15px;
  }

  #guideModal .guide-actions .success-button,
  #guideModal .guide-actions .primary-button,
  #guideModal .guide-actions .ghost-button {
    min-height: 56px;
    font-size: 16px;
  }

  .recharge-confirm-modal {
    min-height: auto;
    padding: 56px 18px 22px;
  }

  #confirmModal .confirm-status-icon {
    width: 68px;
    height: 68px;
    margin-bottom: 22px;
    font-size: 34px;
  }

  #confirmModal h2 {
    font-size: 22px;
  }

  #confirmModal p,
  #confirmModal .confirm-box span,
  #confirmModal .confirm-box strong {
    font-size: 15px;
  }

  #confirmModal .confirm-box div {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 16px;
  }

  #confirmModal .success-button,
  #confirmModal .primary-button,
  #confirmModal .ghost-button {
    min-height: 56px;
    font-size: 16px;
  }

  .field-grid,
  .single-import-grid,
  .result-panel dl > div,
  .confirm-box div,
  .query-result div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
