/* Yomi 自助兑换中心 v2 · 跟随商城 Cartoon 主题 */
:root {
  --bg: #faf9f7;
  --card: #ffffff;
  --ink: #111319;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --primary: #7a8cff;
  --primary-strong: #6673e8;
  --primary-gradient: linear-gradient(90deg, #7a8cff, #b88cff);
  --primary-soft: #eef0ff;
  --primary-ring: rgba(122, 140, 255, .22);
  --link-active: #479afb;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #ff6b88;
  --danger-soft: #fff0f3;
  --info: #479afb;
  --info-soft: #eef5fe;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-card: 0 10px 30px rgba(82, 63, 105, .10), 0 2px 8px rgba(17, 19, 25, .08);
  --ease: cubic-bezier(.2, .6, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
  /* 与商城首页同款背景图 + 深色罩层 */
  background-image: linear-gradient(180deg, rgba(10, 12, 28, .45), rgba(10, 12, 28, .6)), url('/assets/admin/images/login/bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-color: #10121c;
  min-height: 100vh;
}
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-feature-settings: "tnum"; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏（对齐商城 navbar：磨砂白） ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(82, 63, 105, .05);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--primary-gradient); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.brand-name em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 6px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; text-decoration: none; white-space: nowrap;
}
.pill-shop { color: var(--ink-2); border: 1px solid var(--line-strong); background: #fff; transition: border-color .18s var(--ease), color .18s var(--ease); }
.pill-shop:hover { border-color: var(--primary); color: var(--primary-strong); }
.pill-live { background: var(--success-soft); color: var(--success); border: 1px solid #bbf7d0; }
.pill-live.mock { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.pill-live .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Hero（深色背景上白字） ---------- */
.hero { padding: 44px 0 28px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(26px, 5vw, 34px); font-weight: 800; letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.hero p { margin: 0; color: rgba(255, 255, 255, .82); font-size: 15px; text-shadow: 0 1px 6px rgba(0, 0, 0, .3); }

/* ---------- 主卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 0 0 32px;
  overflow: hidden;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 4px;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 16px; font-size: 14.5px; font-weight: 600; color: #898989;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: var(--font); white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.tab svg { width: 17px; height: 17px; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--link-active); border-bottom-color: var(--link-active); font-weight: 600; }
.tab:focus-visible { outline: 2px solid var(--primary-ring); outline-offset: -2px; border-radius: 6px; }

.panel { padding: 28px 28px 0; animation: panel-in .22s var(--ease); }
.panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 提示条 ---------- */
.alert {
  margin: 20px 28px 0; padding: 12px 16px;
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid #ffd3dc; border-radius: var(--radius-md);
  font-size: 14px;
}
.notice {
  margin: 20px 28px 0; padding: 12px 16px;
  background: var(--info-soft); color: var(--info);
  border: 1px solid #cfe4fb; border-radius: var(--radius-md);
  font-size: 14px;
}
.notice-demo { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }

/* ---------- 步骤条 ---------- */
.stepper { list-style: none; margin: 0 0 28px; padding: 0; display: flex; align-items: center; }
.step { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--muted); position: relative; }
.step:not(:last-child)::after {
  content: ""; flex: 1; height: 2px; margin: 0 10px;
  background: var(--line); border-radius: 2px;
  transition: background .25s var(--ease);
}
.step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f4f5f7; border: 1.5px solid var(--line-strong);
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  transition: all .25s var(--ease);
}
.step-label { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.step.is-current { color: var(--link-active); }
.step.is-current .step-dot { background: var(--primary-gradient); border-color: transparent; color: #fff; box-shadow: 0 0 0 4px var(--primary-ring); }
.step.is-done { color: var(--ink-2); }
.step.is-done .step-dot { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }
.step.is-done:not(:last-child)::after { background: var(--primary); }

/* ---------- 表单 ---------- */
.stage { animation: panel-in .22s var(--ease); }
h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.stage-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
h3 { font-size: 15.5px; margin: 22px 0 8px; }
.field-label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: var(--ink-2); }
.input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-md);
  font-size: 15px; font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.input::placeholder { color: #9ca3af; }
textarea.input { resize: vertical; line-height: 1.55; }
.input-action { display: flex; gap: 10px; margin-bottom: 16px; }
.input-action .input { flex: 1; }
.fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

.btn {
  appearance: none; border: 0; cursor: pointer; font-family: var(--font);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 700;
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), opacity .18s var(--ease), border-color .18s var(--ease);
  position: relative;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary-gradient); color: #fff; box-shadow: 0 4px 14px rgba(122, 140, 255, .35); }
.btn-primary:hover:not(:disabled) { opacity: .92; box-shadow: 0 6px 20px rgba(122, 140, 255, .45); }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-strong); }
.btn-block { width: 100%; }
.btn-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.info-box {
  padding: 14px 16px; margin-bottom: 18px;
  background: var(--warn-soft); border: 1px solid #fde68a;
  color: var(--warn); border-radius: var(--radius-md); font-size: 14px;
}

/* ---------- 确认摘要 ---------- */
.summary { margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px; }
.summary-row + .summary-row { border-top: 1px solid var(--line); }
.summary-row:nth-child(odd) { background: #fafafa; }
.summary-row dt { color: var(--muted); font-size: 14px; flex-shrink: 0; }
.summary-row dd { margin: 0; font-weight: 600; font-size: 14.5px; text-align: right; word-break: break-all; }

.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; margin: 4px 0 0; }
.consent input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }

/* ---------- 状态页 ---------- */
.status-head { margin-bottom: 18px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; margin-bottom: 10px;
  background: var(--info-soft); color: var(--info); border: 1px solid #cfe4fb;
}
.status-chip.is-success { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.status-chip.is-warn { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.status-chip.is-danger { background: var(--danger-soft); color: var(--danger); border-color: #ffd3dc; }
.order-ref {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #f8f9fb; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 12px 16px; margin-bottom: 20px; font-size: 13.5px;
}
.order-ref span { color: var(--muted); }
.order-ref code { font-size: 13px; word-break: break-all; }

.timeline { list-style: none; margin: 0 0 16px; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 14px 24px; font-size: 14px; color: var(--ink-2); }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line-strong);
}
.timeline li.is-on::before { border-color: var(--primary); background: var(--primary); }
.timeline li time { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- 进度查询 ---------- */
.query-meta { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 16px; font-size: 13px; color: var(--muted); }
.query-results { margin-top: 24px; display: grid; gap: 10px; }
.query-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 13px 16px; background: #fff;
}
.query-row .q-code { font-size: 13px; word-break: break-all; color: var(--ink-2); }
.query-row .q-detail { font-size: 12.5px; color: var(--muted); grid-column: 1 / -1; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag-neutral { background: #f4f5f7; color: var(--muted); border: 1px solid var(--line-strong); }
.tag-info { background: var(--info-soft); color: var(--info); }
.tag-success { background: var(--success-soft); color: var(--success); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- 账单 ---------- */
.mini-steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-steps li {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start; background: #fff;
}
.mini-steps b { color: var(--primary-strong); font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-steps strong { display: block; font-size: 13.5px; }
.mini-steps span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

.bill-card { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: 24px; box-shadow: var(--shadow-card); }
.bill-head { padding: 18px 20px; background: var(--primary-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bill-head .b-plan { font-size: 17px; font-weight: 800; }
.bill-head .b-mail { font-size: 13px; color: var(--muted); }
.bill-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.bill-cell { padding: 14px 20px; border-top: 1px solid var(--line); }
.bill-cell:nth-child(odd) { border-right: 1px solid var(--line); }
.bill-cell .b-k { font-size: 12.5px; color: var(--muted); }
.bill-cell .b-v { font-size: 14.5px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.bill-invoices { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bill-invoices th, .bill-invoices td { padding: 10px 20px; text-align: left; border-top: 1px solid var(--line); }
.bill-invoices th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: #fafafa; }
.bill-invoices td { font-variant-numeric: tabular-nums; }
.bill-note { margin: 14px 20px; padding: 12px 14px; background: var(--warn-soft); border: 1px solid #fde68a; color: var(--warn); border-radius: var(--radius-md); font-size: 13.5px; }

/* ---------- 教程 ---------- */
.guide h3 { margin-top: 26px; }
.guide h3:first-child { margin-top: 4px; }
.guide p, .guide li { color: var(--ink-2); font-size: 14.5px; }
.guide ol { padding-left: 22px; margin: 8px 0; }
.guide li { margin-bottom: 6px; }
.guide code { background: #f4f5f7; border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; font-size: 13px; }

/* ---------- 页脚（深色背景上） ---------- */
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 28px 4px 40px; color: rgba(255, 255, 255, .6); font-size: 13px; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .brand-name em { display: none; }
  .panel { padding: 22px 18px 0; }
  .alert, .notice { margin: 16px 18px 0; }
  .step-label { display: none; }
  .step { flex: none; }
  .step:not(:last-child)::after { width: 34px; flex: none; }
  .stepper { justify-content: space-between; }
  .mini-steps { grid-template-columns: 1fr; }
  .bill-grid { grid-template-columns: 1fr; }
  .bill-cell:nth-child(odd) { border-right: 0; }
  .input-action { flex-direction: column; }
  .btn-row { flex-direction: column-reverse; }
  .btn-row .btn { width: 100%; }
  .hero { padding: 32px 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
