:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --violet: #7c3aed;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(79, 70, 229, 0.10), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(124, 58, 237, 0.08), transparent 30rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.5rem); margin-bottom: 16px; }
h2 { font-size: 22px; margin-bottom: 10px; }
h3 { font-size: 17px; margin-bottom: 8px; }
p { margin-bottom: 12px; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- header / footer ---------- */

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  color: #92400e;
  background: linear-gradient(90deg, #fef3c7, #fffbeb, #fef3c7);
  border-bottom: 1px solid #fde68a;
  font-size: 13px;
}
.demo-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 247, 251, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
.nav { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.nav a { transition: color 0.15s ease; }
.nav a:hover { color: var(--primary); }

.site-footer {
  margin-top: 80px;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.footer-inner p { margin: 0; }

/* ---------- common ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 26px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.fineprint { color: #94a3b8; font-size: 12px; margin: 16px 0 0; }
.gradient {
  background: linear-gradient(100deg, var(--primary), var(--violet) 60%, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.optional { color: #94a3b8; font-weight: 400; font-size: 11px; }
.narrow { width: min(620px, 100%); margin: 44px auto 0; }
.standalone { margin-top: 8px; }
.back-home { margin-top: 22px; font-size: 14px; }
.back-link { color: var(--muted); font-size: 13px; display: inline-block; margin-bottom: 12px; }
.back-link:hover { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.26);
}
.btn-primary:hover { box-shadow: 0 14px 28px rgba(79, 70, 229, 0.32); }
.btn-secondary {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: #c7d2fe;
}
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-small { min-height: 32px; padding: 4px 10px; font-size: 12px; border-radius: 9px; }
.btn-arrow { margin-left: auto; font-size: 18px; line-height: 1; }
.link-btn {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 12.5px;
}
.link-btn:hover { text-decoration: underline; }

.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 13.5px;
}
.notice-warning { color: #92400e; background: var(--warning-soft); border-color: #fde68a; }
.notice-danger { color: #991b1b; background: var(--danger-soft); border-color: #fecaca; }
.notice-success { color: #047857; background: var(--success-soft); border-color: #a7f3d0; margin-bottom: 16px; }
.notice-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 26px;
}
.notice-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  color: #92400e;
  background: var(--warning-soft);
  border: 1px solid #fde68a;
  font-weight: 800;
}

/* ---------- home ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 54px;
  align-items: center;
  padding: 56px 0 36px;
}
.hero-copy h1 { margin-top: 4px; }
.lede {
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}
.platform-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 30px; }
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
}
.chip-youtube { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.chip-bilibili { color: #0369a1; background: #f0f9ff; border-color: #bae6fd; }
.chip-xhs { color: #be123c; background: #fff1f2; border-color: #fecdd3; }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  flex: none;
  border-radius: 9px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}
.step strong { display: block; font-size: 13.5px; }
.step p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.form-card { padding: 30px; }
.form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.form-head h2 { margin: 0; }
.price-pill {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #c7d2fe;
  font-size: 12.5px;
  font-weight: 800;
}
.form-sub { margin: 8px 0 22px; font-size: 13px; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--text);
  background: var(--surface-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}
.field textarea { min-height: 92px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error {
  display: none;
  margin: 4px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #991b1b;
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  font-size: 13px;
}
.form-error.visible { display: block; }
.fineprint { line-height: 1.6; }

.section { margin-top: 52px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.section-head h2 { margin-bottom: 0; }
.section-note { max-width: 520px; margin: 0; font-size: 13px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 22px; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-bottom: 14px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 18px;
  font-weight: 800;
}
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- order ---------- */

.order-head { margin: 38px 0 24px; }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.title-row h1 { font-size: clamp(1.45rem, 2.8vw, 2.15rem); margin-bottom: 8px; }
.order-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 12.5px;
}
.platform-badge {
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #c7d2fe;
  font-size: 11.5px;
  font-weight: 700;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.status-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-warning { color: #92400e; background: var(--warning-soft); border-color: #fde68a; }
.status-info { color: #1d4ed8; background: var(--info-soft); border-color: #bfdbfe; }
.status-success { color: #047857; background: var(--success-soft); border-color: #a7f3d0; }
.status-danger { color: #b91c1c; background: var(--danger-soft); border-color: #fecaca; }
.status-muted { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }

.pay-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; align-items: start; }
.pay-card { text-align: center; padding: 32px; }
.pay-amount { font-size: 42px; margin: 4px 0 2px; letter-spacing: -0.04em; }
.pay-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 330px;
  margin: 16px auto 0;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}
.pay-brand-icon { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 11px; }
.pay-brand-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-brand-name { color: #0b57d0; font-size: 16px; }
.pay-brand-desc { color: #475569; font-size: 12px; line-height: 1.5; }
.qr-box {
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
  margin: 22px auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.pay-link {
  display: inline-block;
  margin: 2px 0 16px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.pay-link:hover { text-decoration: underline; }

.order-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr); gap: 18px; align-items: start; }
.order-main { display: grid; gap: 18px; }
.order-side { display: grid; gap: 18px; }

.order-summary h2 { margin-bottom: 16px; }
.detail-list { margin: 0; display: grid; gap: 10px; }
.detail-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.detail-list dt { color: var(--muted); font-size: 12.5px; flex: none; }
.detail-list dd { margin: 0; text-align: right; font-size: 13px; font-weight: 600; word-break: break-all; }
.source-link { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.source-link a { color: var(--primary); word-break: break-all; }
.source-link a:hover { text-decoration: underline; }
.help-card p { font-size: 13px; }

.progress-card { padding: 28px; }
.progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.progress-head h2 { margin: 0; font-size: 18px; }
.progress-percent { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; color: var(--primary); }
.progress-track {
  height: 12px;
  margin: 18px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf5;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.18) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.18) 75%, transparent 75%),
    linear-gradient(90deg, var(--primary), var(--violet));
  background-size: 28px 28px, 100% 100%;
  animation: progress-stripes 1.2s linear infinite;
  transition: width 0.45s ease;
}
@keyframes progress-stripes { from { background-position: 0 0, 0 0; } to { background-position: 28px 0, 0 0; } }
.progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 12.5px;
}
.progress-meta span:first-child { color: var(--text); font-weight: 600; }

.timeline-card { padding: 24px 28px; }
.timeline-card h2 { font-size: 16px; margin-bottom: 18px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { position: relative; display: flex; gap: 13px; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 19px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.timeline-dot {
  position: relative;
  z-index: 1;
  width: 16px; height: 16px;
  flex: none;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--surface);
}
.timeline-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.timeline-text strong { font-weight: 700; }
.timeline-text span { font-size: 12px; }
.timeline-item.done .timeline-dot { border-color: var(--success); background: var(--success); }
.timeline-item.done:not(:last-child)::before { background: #a7f3d0; }
.timeline-item.active .timeline-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.13);
}
.timeline-item.active .timeline-text strong { color: var(--primary); }

.result-card { padding: 30px; }
.result-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 16px;
  border-radius: 16px;
  color: #047857;
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  font-size: 24px;
  font-weight: 800;
}
.result-icon-danger { color: #b91c1c; background: var(--danger-soft); border-color: #fecaca; }
.result-copy p { margin-bottom: 20px; }
.share-field { margin-bottom: 14px; }
.share-field label { display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 700; }
.copy-row { display: flex; gap: 8px; }
.copy-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.share-code {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed #c7d2fe;
  border-radius: 12px;
  background: var(--primary-soft);
  font-size: 13px;
}
.share-code span { color: var(--muted); }
.share-code strong { font-size: 20px; letter-spacing: 0.14em; color: var(--primary-dark); }
.share-code .btn { margin-left: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.error-card { display: flex; gap: 18px; align-items: flex-start; }
.error-card h2 { margin-bottom: 8px; }
.error-card p { color: var(--muted); }

/* ---------- history / lookup ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 42px 0 24px;
}
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 6px; }
.page-head p { max-width: 620px; margin: 0; font-size: 13.5px; }
.history-list { display: grid; gap: 12px; }
.history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.history-card:hover {
  border-color: #c7d2fe;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.history-main { min-width: 0; }
.history-title-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.history-title-row h2 {
  margin: 0;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-side { flex: none; text-align: right; display: grid; gap: 4px; }
.history-side strong { font-size: 18px; }
.history-side span { font-size: 12px; }
.mini-progress { width: min(320px, 100%); height: 5px; margin-top: 10px; border-radius: 999px; background: #e9edf5; overflow: hidden; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--violet)); }
.history-note { margin-top: 18px; }
.empty-state { text-align: center; padding: 56px 24px; margin-top: 10px; }
.empty-icon { font-size: 36px; color: var(--line-strong); margin-bottom: 10px; }
.empty-state .btn { margin-top: 12px; }

.mock-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.mock-order > div:first-child { display: grid; gap: 2px; font-size: 13px; }
.mock-amount { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; }
.mock-title { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .hero-copy { max-width: 680px; }
  .pay-grid, .order-grid { grid-template-columns: 1fr; }
  .order-side { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-note { margin-top: 8px; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1120px); }
  body { font-size: 14.5px; }
  .demo-banner { padding: 7px 14px; font-size: 11.5px; text-align: center; }
  .header-inner { height: 60px; }
  .nav { gap: 14px; font-size: 12.5px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .hero-grid { padding-top: 30px; }
  .lede { font-size: 15px; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card, .card { padding: 20px; }
  .order-head { margin-top: 26px; }
  .title-row { display: block; }
  .title-row .status-badge { margin-top: 6px; }
  .pay-card { padding: 24px 18px; }
  .qr-box { width: 210px; height: 210px; }
  .pay-amount { font-size: 34px; }
  .order-side { grid-template-columns: 1fr; }
  .history-card { align-items: flex-start; padding: 18px; }
  .history-side { text-align: right; }
  .history-title-row h2 { white-space: normal; }
  .footer-inner { display: block; text-align: center; }
  .footer-inner p + p { margin-top: 6px; }
  .page-head { display: block; margin-top: 28px; }
  .page-head .btn { margin-top: 14px; }
  .error-card, .notice-card { display: block; }
  .notice-icon, .result-icon { margin-bottom: 12px; }
  .actions .btn { flex: 1; }
}

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

/* ---------- account / admin ---------- */

.text-link { color: var(--primary); }
.text-link:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tiny { font-size: 11.5px; line-height: 1.5; }
.nav { flex-wrap: wrap; }
.nav-user {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-cta { color: var(--primary); font-weight: 700; }
.inline-form { display: inline; margin: 0; }
.nav-link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: inherit;
  cursor: pointer;
}
.nav-link-btn:hover { color: var(--primary); }
.actions-top { margin: 0; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.account-logout { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-claim { margin-top: 18px; }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; }
.code-btn { flex: none; min-width: 118px; white-space: nowrap; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; margin-top: 16px; font-size: 13px; }
code { padding: 1px 5px; border-radius: 5px; background: #f1f5f9; font-size: 12px; }
.admin-settings { margin-bottom: 18px; }
.switch-row { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: 14px; }
.switch-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.settings-form { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.settings-form .switch-row { margin: 0; }
.inline-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plain-list { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.plain-list li + li { margin-top: 8px; }
.inline-details { margin-top: 8px; font-size: 12px; }
.inline-details summary { color: var(--primary); cursor: pointer; }
.inline-details form { display: grid; gap: 6px; margin-top: 8px; }
.inline-details textarea {
  width: 100%;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  resize: vertical;
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 20px; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; }
.stat-foot { color: var(--muted); font-size: 12px; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.card-head h2 { margin: 0; }
.bar-list { display: grid; gap: 14px; }
.bar-row { display: grid; gap: 6px; }
.bar-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.bar-track { height: 8px; overflow: hidden; border-radius: 999px; background: #eef2f7; }
.bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--violet));
}
.admin-recent { margin-bottom: 18px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.table-title {
  display: block;
  max-width: 280px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.table-actions form { margin: 0; }
.result-cell { max-width: 220px; }
.error-text {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--danger);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-card { margin-bottom: 18px; padding: 18px 20px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filter-bar .field { min-width: 130px; margin: 0; }
.filter-search { flex: 1; min-width: 220px; }
.filter-actions { display: flex; gap: 8px; }
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--text);
  background: var(--surface-soft);
}
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid, .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-inner {
    height: auto;
    min-height: 60px;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav { width: 100%; gap: 12px; }
  .nav a[href="/"] { display: none; }
  .nav-user { max-width: 92px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 24px; }
  .filter-bar .field { min-width: 100%; }
  .filter-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }
  .table-title, .error-text { max-width: 180px; }
  .page-head .actions-top { margin-top: 12px; }
}

/* ---------- admin sessions / bilibili QR ---------- */

.session-keeper { margin-bottom: 18px; }
.session-keeper .notice { margin: 10px 0; }
.session-keeper .table-actions { margin-top: 10px; }
.session-notice { margin-bottom: 16px; }
.session-table { min-width: 860px; }
.session-state-cell { min-width: 150px; }
.session-error { max-width: 220px; }
.storage-session {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
.storage-session .card-head { margin-bottom: 10px; }
.storage-session h3 { margin: 0; font-size: 15px; }
.storage-session .session-error { max-width: none; white-space: normal; margin-bottom: 10px; }
.storage-session .hint { margin: 8px 0; }
.storage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.storage-card { padding: 20px; }
.storage-card .card-head { margin-bottom: 12px; }
.storage-card .inline-badges { margin-bottom: 12px; }
.storage-card .session-error { max-width: none; white-space: normal; }
.bell-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 10.5px;
  font-weight: 800;
  vertical-align: middle;
}
.qr-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}
.qr-panel[hidden] { display: none; }
.qr-panel-card {
  width: min(430px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.qr-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.qr-panel-head h2 { margin: 0; }
.qr-close {
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.qr-close:hover { color: var(--text); }
.qr-status { min-height: 22px; margin: 14px 0 0; font-size: 13px; }
.qr-panel .qr-box { width: 220px; height: 220px; margin: 14px auto 0; }

@media (max-width: 900px) {
  .storage-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .qr-panel { padding: 12px; }
  .qr-panel-card { padding: 20px; }
  .qr-panel .qr-box { width: 190px; height: 190px; }
  .session-actions .btn { flex: 1; }
}

/* ---------- admin inbox / nav bell ---------- */

.nav-bell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  line-height: 1;
}
.nav-bell:hover { color: var(--primary); }

.inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.inbox-list { display: grid; gap: 12px; }
.inbox-item { padding: 20px 24px; border-left: 4px solid var(--line); }
.inbox-item-unread {
  border-left-color: var(--primary);
  background: linear-gradient(180deg, #fff, var(--primary-soft));
}
.inbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}
.inbox-title { min-width: 0; }
.inbox-title .inline-badges { margin-bottom: 6px; }
.inbox-title h2 { margin: 0; font-size: 17px; }
.inbox-body {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13.5px;
  white-space: pre-line;
  word-break: break-word;
}
.inbox-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 640px) {
  .inbox-item { padding: 18px; }
  .inbox-head { display: block; }
  .inbox-head .tiny { display: block; margin-top: 6px; }
}

