:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: rgba(20, 32, 48, .11);
  --accent: #1475f6;
  --accent-strong: #075bd8;
  --accent-soft: #e8f1ff;
  --danger: #dc2626;
  --soft: rgba(255, 255, 255, .64);
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow-soft: 0 24px 80px rgba(22, 37, 61, .12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(20, 117, 246, .18), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(125, 167, 255, .18), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 48%, #edf3fa 100%);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.public-shell { min-height: 100vh; padding: 22px; }
.admin-shell { min-height: 100vh; display: grid; place-items: start center; padding: 28px 18px; }
.public-hero, .public-workspace {
  width: min(1120px, 100%);
  margin: 0 auto;
}
.public-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 34px;
  padding: 18px clamp(18px, 4vw, 46px) clamp(30px, 5vw, 58px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .48)),
    rgba(255, 255, 255, .62);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}
.public-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -42% auto;
  width: min(520px, 70vw);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .96), transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(20, 117, 246, .22), rgba(20, 117, 246, 0) 62%);
  pointer-events: none;
}
.public-hero.compact { padding-bottom: clamp(28px, 5vw, 48px); }
.public-nav {
  position: relative;
  z-index: 1;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-lockup, .nav-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 760;
}
.brand-lockup { gap: 10px; color: #1b2738; }
.brand-orb {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #62a1ff);
  box-shadow: 0 12px 30px rgba(20, 117, 246, .28), inset 0 1px 0 rgba(255,255,255,.38);
  font-size: 13px;
}
.nav-link, .small-link {
  border: 1px solid rgba(20, 32, 48, .08);
  padding: 10px 15px;
  border-radius: 999px;
  color: #1e4f93;
  background: rgba(255, 255, 255, .68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  white-space: nowrap;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(22px, 6vw, 76px);
  align-items: end;
  padding-top: clamp(28px, 7vw, 74px);
}
.public-hero.compact .hero-grid { grid-template-columns: minmax(0, 760px); }
.hero-kicker {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}
h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(34px, 4.8vw, 52px);
  line-height: 1.08;
  font-weight: 720;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero-text {
  max-width: 620px;
  margin: 22px 0 0;
  color: #415064;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.75;
  text-wrap: pretty;
}
.hero-status {
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius-md);
  padding: 18px;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 18px 50px rgba(28, 53, 82, .1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.hero-status div { display: flex; align-items: center; gap: 10px; }
.hero-status p { margin: 10px 0 0; font-size: 14px; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2fd166;
  box-shadow: 0 0 0 6px rgba(47, 209, 102, .16);
}
.public-workspace {
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(360px, .82fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.public-workspace.single {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}
.instruction-panel, .submit-panel, .admin-card, .admin-login {
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 60px rgba(28, 53, 82, .09);
  padding: clamp(18px, 3vw, 26px);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
}
.admin-card, .admin-login { width: min(100%, 1180px); }
.public-card { width: min(100%, 980px); background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 80px rgba(31,54,78,.12); padding: 24px; }
.public-head, .admin-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 22px; }
.brand-mark { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--accent), #4f46e5); font-weight: 800; margin-bottom: 12px; }
h2 { margin: 0 0 10px; }
p { color: var(--muted); line-height: 1.6; }
.section-title { margin-bottom: 18px; }
.section-title h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.035em; text-wrap: balance; }
.soft-label {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 780;
}

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 22px; }
.ios-stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step {
  position: relative;
  border: 1px solid rgba(20, 32, 48, .08);
  border-radius: 18px;
  padding: 14px 10px 14px 44px;
  background: rgba(255,255,255,.56);
  color: #667386;
  font-weight: 720;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.step::before {
  content: attr(data-step-dot);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
}
.step.active { border-color: rgba(20,117,246,.22); color: var(--accent-strong); background: rgba(232,241,255,.72); }

.guide-panel, .panel-box, .status-panel, .result-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--soft); padding: 18px; margin-bottom: 18px; }
.guide-list { display: grid; gap: 10px; }
.guide-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(20, 32, 48, .08);
  border-radius: 20px;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.guide-row:first-of-type { border-top: 0; }
.guide-row strong { color: #182334; }
.guide-row p { margin: 5px 0 0; font-size: 14px; }
.guide-num { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; }

.form-stack { display: grid; gap: 16px; }
label span, .email-grid label { font-weight: 700; color: #263952; }
label { display: grid; gap: 8px; }
input, textarea, select {
  width: 100%;
  border: 1px solid rgba(20, 32, 48, .12);
  border-radius: 18px;
  padding: 14px 15px;
  font: inherit;
  background: rgba(255,255,255,.86);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}
textarea { resize: vertical; font-family: Consolas, "Microsoft YaHei", monospace; }
input::placeholder, textarea::placeholder { color: #748197; }
input:focus, textarea:focus, select:focus { border-color: rgba(20,117,246,.62); box-shadow: 0 0 0 4px rgba(20,117,246,.13), inset 0 1px 0 rgba(255,255,255,.9); background: #fff; }
.btn {
  border: 1px solid rgba(20, 32, 48, .1);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255,255,255,.78);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(28, 53, 82, .12); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .58; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: linear-gradient(180deg, #2184ff, var(--accent)); border-color: rgba(20,117,246,.2); color: #fff; box-shadow: 0 14px 34px rgba(20,117,246,.24), inset 0 1px 0 rgba(255,255,255,.32); }
.btn.secondary { color: #17324c; }
.btn.danger { color: #b91c1c; border-color: rgba(220,38,38,.18); background: rgba(254,226,226,.7); }
.btn.wide { width: 100%; padding: 15px; }
.hidden { display: none !important; }
.muted { color: var(--muted); margin: 0; }
.query-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-bottom: 18px; align-items: end; }
.query-field { display: grid; gap: 8px; }
.status-top { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.badge { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; }
.badge.success { background: #dcfce7; color: #047857; }
.badge.manual { background: #fee2e2; color: #b91c1c; }
.progress-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 18px 0; }
.progress-list li { border: 1px solid rgba(20, 32, 48, .08); background: rgba(255,255,255,.66); border-radius: 16px; padding: 13px 14px; color: var(--muted); }
.progress-list li.done { color: #4f647d; background: rgba(255,255,255,.78); }
.progress-list li.active { border-color: rgba(20,117,246,.34); color: var(--accent-strong); font-weight: 800; background: var(--accent-soft); }
.progress-list li.error { border-color: rgba(220,38,38,.24); color: #b91c1c; background: rgba(254,226,226,.72); }
.invoice-box { border-top: 1px solid var(--line); padding-top: 16px; }
.invoice-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 32, 48, .08);
  margin: 12px 0 8px;
}
.invoice-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b7f6d, #53b49f);
  transition: width .55s ease;
}
.invoice-percent { margin: 0 0 14px; font-size: 14px; }
.card-status-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.card-status-item {
  border: 1px solid rgba(20, 32, 48, .08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, .72);
}
.card-status-item.unused {
  border-color: rgba(5, 150, 105, .22);
  background: rgba(236, 253, 245, .72);
}
.card-status-item.success {
  border-color: rgba(20, 117, 246, .22);
  background: rgba(232, 241, 255, .72);
}
.card-status-item.used {
  border-color: rgba(245, 158, 11, .24);
  background: rgba(255, 251, 235, .72);
}
.card-status-item.danger {
  border-color: rgba(220, 38, 38, .22);
  background: rgba(254, 226, 226, .72);
}
.card-status-main {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.card-status-main code {
  overflow-wrap: anywhere;
  word-break: break-all;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-weight: 800;
}
.card-status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}
.card-status-pill.unused { background: #dcfce7; color: #047857; }
.card-status-pill.success { background: #dbeafe; color: #1d4ed8; }
.card-status-pill.used { background: #fef3c7; color: #a16207; }
.card-status-pill.danger { background: #fee2e2; color: #b91c1c; }
.card-status-item p {
  margin: 8px 0 0;
  color: #415064;
}
.card-status-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.card-status-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 16px;
  color: var(--muted);
}
.admin-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, .92);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .22);
  font-weight: 800;
  font-size: 14px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.admin-toast.success {
  background: rgba(4, 120, 87, .94);
}
.result-panel, .status-panel {
  margin-top: 18px;
  margin-bottom: 0;
  border-color: rgba(20,117,246,.18);
  background: rgba(232,241,255,.64);
}
.result-panel.error {
  border-color: rgba(220,38,38,.2);
  background: rgba(254,226,226,.72);
}
.result-panel.error h2,
.result-panel.error p { color: #991b1b; }
.result-panel.success {
  border-color: rgba(5,150,105,.2);
  background: rgba(236,253,245,.72);
}
.result-panel.success h2 { color: #047857; }

.admin-shell { place-items: start center; }
.admin-actions, .tabs, .toolbar, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tabs { border-bottom: 1px solid var(--line); margin-bottom: 18px; padding-bottom: 12px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 18px; font-weight: 800; cursor: pointer; }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats-grid div { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 18px; }
.stats-grid span { color: #4a5d77; font-weight: 700; }
.stats-grid strong { display: block; font-size: 34px; margin-top: 10px; }
.toolbar { margin-bottom: 14px; }
.toolbar input { flex: 1 1 360px; }
.toolbar select { width: 160px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid #e8eef5; vertical-align: top; }
th { color: #465977; font-size: 13px; background: #fbfdff; }
td { font-size: 14px; }
.status-pill { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-weight: 800; background: #edf5f2; color: #047857; }
.status-pill.pending { background: #fef3c7; color: #a16207; }
.status-pill.processing { background: #dbeafe; color: #1d4ed8; }
.status-pill.failed, .status-pill.session_expired, .status-pill.cancelled, .status-pill.destroyed { background: #fee2e2; color: #b91c1c; }
.cell-actions { display: grid; gap: 8px; }
.mini { padding: 7px 10px; font-size: 13px; }
.order-card-key-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 220px;
}
.order-card-key {
  display: inline-block;
  max-width: 420px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.45;
}
.order-card-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.email-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 14px; }
.email-grid label { display: grid; gap: 8px; }
.email-grid label:first-child, .email-grid label:nth-last-child(2), .email-grid .form-actions { grid-column: 1 / -1; }
.login-form { display: flex; gap: 10px; margin-top: 20px; }
.login-form input { max-width: 360px; }
.import-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.generate-form { grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .8fr) 120px 120px auto; }
.generated-box { margin-top: 14px; display: grid; gap: 10px; }
.generated-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.generated-box textarea { font-family: Consolas, "SFMono-Regular", monospace; }
.generated-field { display: grid; gap: 8px; }
.generated-field span { font-size: 13px; color: #465977; }
.generated-quick-list { display: grid; gap: 8px; }
.generated-quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  padding: 10px 12px;
}
.generated-quick-item code {
  overflow-wrap: anywhere;
  font-weight: 800;
}
.generated-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.card-stats-grid { margin-top: 4px; }
.cards-toolbar { align-items: end; }
#cardSelectionHint { margin: 6px 0 12px; }
#generatedCardsMeta { margin: 0; }
.card-key-link {
  display: inline-block;
  max-width: 360px;
  color: var(--accent-strong);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.card-key-link:hover { text-decoration: underline; }
.card-key-tools {
  display: grid;
  gap: 8px;
}
.card-key-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.card-key-actions .mini {
  padding: 6px 9px;
}
.inline-mini { margin-left: 8px; vertical-align: middle; }

@media (max-width: 760px) {
  .public-shell { padding: 12px; }
  .public-hero { border-radius: 26px; padding: 14px 16px 28px; }
  .public-nav { min-height: 48px; }
  .hero-grid, .public-workspace { grid-template-columns: 1fr; gap: 12px; }
  .hero-grid { padding-top: 28px; }
  h1 { font-size: clamp(31px, 8.5vw, 40px); letter-spacing: -.04em; }
  .hero-text { font-size: 16px; margin-top: 16px; }
  .instruction-panel, .submit-panel, .admin-card, .admin-login { padding: 16px; border-radius: 24px; }
  .public-card { padding: 18px; border-radius: 18px; }
  .public-head, .admin-head, .guide-row, .query-row, .login-form, .import-form { grid-template-columns: 1fr; display: grid; }
  .ios-stepper, .stepper, .stats-grid, .email-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

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

/* Minimal customer-facing recharge skin */
.minimal-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 32px);
  background:
    radial-gradient(circle at 5% 5%, rgba(48, 120, 104, .12), transparent 24%),
    radial-gradient(circle at 94% 16%, rgba(218, 201, 177, .2), transparent 26%),
    #f5f0e8;
}

.minimal-card {
  width: min(700px, 100%);
  overflow: hidden;
  border: 1px solid #d6dde5;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(24, 38, 52, .12);
}

.minimal-head {
  display: grid;
  justify-items: center;
  padding: 52px clamp(24px, 7vw, 78px) 36px;
  text-align: center;
}

.minimal-logo {
  display: grid;
  place-items: center;
  width: 166px;
  height: 166px;
  margin-bottom: 18px;
  color: #2f7868;
  text-decoration: none;
}

.chatgpt-mark {
  display: block;
  width: 160px;
  height: 160px;
}

.chatgpt-mark.compact {
  width: 96px;
  height: 96px;
}

.minimal-head h1 {
  max-width: none;
  margin: 0;
  color: #1c1714;
  font-size: clamp(42px, 6.4vw, 60px);
  line-height: 1.04;
  font-weight: 840;
  letter-spacing: -.052em;
}

.minimal-subtitle {
  margin: 10px 0 0;
  color: #6f7e8f;
  font-size: 16px;
}

.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;
}

.queue-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 18px;
  padding: 7px 18px;
  border: 1px solid rgba(47, 120, 104, .24);
  border-radius: 999px;
  color: #12695d;
  background: #edf8f5;
  font-size: 14px;
}

.flow-stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: min(540px, calc(100% - 64px));
  margin: 6px auto 30px;
}

.flow-stepper::before {
  content: "";
  position: absolute;
  left: 34px;
  right: 34px;
  top: 25px;
  height: 4px;
  border-radius: 999px;
  background: #dae4ec;
}

.flow-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #8a99ac;
  font-size: 14px;
  font-weight: 800;
}

.flow-step span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 4px solid #d9e3ec;
  border-radius: 50%;
  background: #fff;
  color: #8a99ac;
  font-size: 18px;
}

.flow-step.active {
  color: #12695d;
}

.flow-step.active span {
  border-color: #e1efeb;
  color: #fff;
  background: #2f7868;
  box-shadow: 0 0 0 7px rgba(47, 120, 104, .12);
}

.minimal-body {
  padding: 28px clamp(24px, 7vw, 78px) 34px;
  border-top: 1px solid #edf1f4;
  background: linear-gradient(180deg, #fbfcfd 0%, #fff 100%);
}

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

.minimal-field {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid #dce5ed;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(31, 45, 58, .06);
}

.minimal-field span {
  color: #171412;
  font-size: 15px;
  font-weight: 850;
}

.minimal-field input,
.minimal-field textarea {
  border-color: #d6e1ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
}

.minimal-field textarea {
  min-height: 138px;
}

.minimal-field input:focus,
.minimal-field textarea:focus {
  border-color: rgba(47, 120, 104, .55);
  box-shadow: 0 0 0 4px rgba(47, 120, 104, .12);
}

.field-note {
  margin: -2px 24px 2px;
  padding: 13px 16px;
  border: 1px solid #eadfd2;
  border-radius: 16px;
  color: #5e4a34;
  background: #fbf7f1;
  font-size: 14px;
}

.guide-details {
  border: 1px solid #dce5ed;
  border-radius: 18px;
  background: #f8fbfa;
}

.guide-details summary {
  cursor: pointer;
  padding: 15px 18px;
  color: #12695d;
  font-weight: 850;
}

.guide-details p {
  margin: 0;
  padding: 0 18px 18px;
  color: #5c6876;
  font-size: 14px;
}

.guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 18px 12px;
}

.minimal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 18px 0;
}

.minimal-actions .btn {
  min-width: 162px;
}

.minimal-actions .btn.primary,
.minimal-shell .btn.primary {
  border: 0;
  color: #fff;
  background: #2f7868;
  box-shadow: none;
}

.minimal-shell .btn.primary:hover {
  background: #266c5d;
  box-shadow: 0 14px 28px rgba(47, 120, 104, .22);
}

.minimal-shell .btn.secondary {
  color: #2f7868;
  background: #fff;
  border-color: #d5e2df;
}

.query-link {
  color: #12695d;
  font-weight: 850;
  text-decoration: none;
}

.query-link:hover {
  text-decoration: underline;
}

.minimal-shell .result-panel,
.minimal-shell .status-panel {
  margin-top: 18px;
  border-color: #dce5ed;
  border-radius: 20px;
  background: #fff;
}

.minimal-card-query {
  width: min(620px, 100%);
}

.minimal-card-query .minimal-logo {
  width: 96px;
  height: 96px;
  margin-bottom: 12px;
}

.minimal-card-query .minimal-head h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 820;
}

.flow-step.done {
  color: #12695d;
}

.flow-step.done span {
  border-color: rgba(47, 120, 104, .25);
  color: #2f7868;
  background: #edf8f5;
}

.flow-stepper-compact {
  margin-top: -8px;
}

.safe-guide {
  padding: 20px;
  border: 1px solid #dce5ed;
  border-radius: 22px;
  background: #f8fbfa;
}

.safe-guide strong {
  display: block;
  color: #171412;
  font-weight: 850;
  margin-bottom: 8px;
}

.safe-guide p {
  margin: 0 0 16px;
  color: #5c6876;
  font-size: 14px;
}

@media (max-width: 720px) {
  .minimal-shell {
    padding: 12px;
    place-items: start center;
  }

  .minimal-card {
    border-radius: 26px;
  }

  .minimal-head {
    padding: 34px 20px 28px;
  }

  .minimal-logo {
    width: 128px;
    height: 128px;
  }

  .chatgpt-mark {
    width: 120px;
    height: 120px;
  }

  .minimal-head h1 {
    font-size: clamp(31px, 9vw, 39px);
    letter-spacing: -.05em;
  }

  .flow-stepper {
    width: calc(100% - 28px);
    margin-bottom: 22px;
  }

  .flow-stepper::before {
    left: 24px;
    right: 24px;
    top: 21px;
  }

  .flow-step {
    font-size: 12px;
  }

  .flow-step span {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .minimal-body {
    padding: 22px 16px 26px;
  }

  .minimal-field {
    padding: 18px;
  }

  .field-note {
    margin-left: 0;
    margin-right: 0;
  }

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

  .minimal-actions {
    display: grid;
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .minimal-actions .btn {
    width: 100%;
  }
}

/* Session 帮助样式 */
.session-help {
  margin-top: 8px;
  padding: 16px 20px;
  border: 1px solid #dce5ed;
  border-radius: 18px;
  background: #f8fbff;
}

.session-help strong {
  display: block;
  margin-bottom: 12px;
  color: #1e4f93;
  font-size: 15px;
  font-weight: 700;
}

.session-help ol {
  margin: 0 0 14px;
  padding-left: 24px;
  color: #5c6876;
  font-size: 14px;
  line-height: 1.7;
}

.session-help ol li {
  margin-bottom: 6px;
}

.session-help code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(20, 117, 246, 0.08);
  color: #1475f6;
  font-family: Consolas, "SF Mono", Monaco, monospace;
  font-size: 13px;
}

.security-note {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
}

/* Token 获取指南样式 */
.token-guide {
  margin: 16px 24px;
  padding: 16px;
  border: 1px solid #dce5ed;
  border-radius: 16px;
  background: #f8fbff;
}

.guide-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.guide-step:not(:last-child) {
  border-bottom: 1px solid #eaf0f6;
}

.guide-step strong {
  color: #1e4f93;
  font-size: 15px;
  font-weight: 700;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
}

/* 卡密状态颜色标记 */
.status-pill.card-status-unused,
.card-status-unused {
  background: #10b981 !important;
  color: white !important;
}

.status-pill.card-status-used,
.card-status-used {
  background: #6b7280 !important;
  color: white !important;
}

.status-pill.card-status-destroyed,
.card-status-destroyed {
  background: #ef4444 !important;
  color: white !important;
}

/* 订单操作按钮样式 */
.cell-actions {
  white-space: nowrap;
}

.cell-actions .btn {
  margin: 2px;
}

.btn.primary.mini {
  background: #2563eb;
  color: white;
}

.btn.primary.mini:hover {
  background: #1d4ed8;
}

/* 标签样式 */
.tag-badge {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.tags-cell {
  max-width: 200px;
  white-space: normal;
}

#cardTagFilter {
  min-width: 150px;
}
