/* ============================================================
   TC 图床 - 前台样式（v1.0）
   品牌主色 #0B6BCB · 辅色 #12B886
   ============================================================ */

:root {
  color-scheme: light;
  --primary: #0b6bcb;
  --primary-600: #0857a6;
  --primary-050: #eaf2fd;
  --accent: #12b886;
  --accent-050: #e6f9f1;
  --danger: #e03131;
  --danger-050: #fdecec;
  --warn: #f08c00;
  --warn-050: #fff4e0;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --text: #15233c;
  --text-2: #465777;
  --muted: #7c8aa5;
  --border: #e2e8f2;
  --border-strong: #cfd8e8;
  --shadow-sm: 0 1px 2px rgba(16, 34, 64, .06);
  --shadow: 0 10px 30px rgba(16, 34, 64, .09);
  --shadow-lg: 0 26px 64px rgba(16, 34, 64, .17);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;
  --topbar-h: 64px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --primary: #4c9cf5;
  --primary-600: #2e7fe0;
  --primary-050: #14253c;
  --accent: #2fd6a0;
  --accent-050: #10291f;
  --danger: #ff6b6b;
  --danger-050: #2a1414;
  --warn: #ffb84d;
  --warn-050: #2a2110;
  --bg: #0e1522;
  --surface: #161f2f;
  --surface-2: #1d2839;
  --text: #e8eef9;
  --text-2: #b7c4d9;
  --muted: #8595ad;
  --border: #263248;
  --border-strong: #34435c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 26px 64px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }

.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.small { font-size: 13.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.inline { display: inline-block; margin: 0; }
.link { color: var(--primary); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.link svg { width: 14px; height: 14px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.section { padding-top: 38px; padding-bottom: 60px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  border: 1px solid transparent; background: var(--primary); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .16s, box-shadow .16s, transform .08s, border-color .16s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--primary-600); box-shadow: 0 7px 18px rgba(11, 107, 203, .2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); box-shadow: none; }
.btn-light { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c92a2a; box-shadow: 0 7px 18px rgba(224, 49, 49, .22); }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: var(--danger-050); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 70; height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, #0b6bcb, #12b886);
  box-shadow: 0 5px 14px rgba(11, 107, 203, .28); letter-spacing: .02em;
}
.brand-mark.sm { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.brand-text { letter-spacing: -.01em; }

.nav { display: flex; align-items: center; gap: 3px; }
.nav-item {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { color: var(--primary); background: var(--primary-050); font-weight: 600; }
.login-link { margin-left: 2px; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.theme-toggle { border-color: transparent; background: transparent; }
.theme-toggle:hover { background: var(--surface-2); }
.nav-toggle { display: none; border-color: transparent; background: transparent; }

.user-menu { position: relative; }
.avatar-btn {
  width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; overflow: hidden;
}
.avatar-btn:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-letter {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0b6bcb, #12b886); color: #fff; font-weight: 700; font-size: 14px;
}
.avatar-btn .avatar-letter { width: 100%; height: 100%; display: flex; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 224px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.user-menu.open .menu-panel { opacity: 1; visibility: visible; transform: none; }
.menu-head { padding: 9px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.menu-head strong { display: block; font-size: 13px; }
.menu-head span { display: block; font-size: 11.5px; color: var(--muted); word-break: break-all; }
.menu-panel > a {
  display: flex; align-items: center; gap: 9px; height: 37px; padding: 0 10px; border-radius: 8px;
  font-size: 13px; color: var(--text-2);
}
.menu-panel > a svg { width: 15px; height: 15px; }
.menu-panel > a:hover { background: var(--surface-2); color: var(--text); }
.menu-panel > a.danger { color: var(--danger); }
.menu-panel > a.danger:hover { background: var(--danger-050); }

/* ---------- 提示 ---------- */
.flash-wrap { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 15px; border-radius: 10px; font-size: 13.5px;
  border: 1px solid transparent;
}
.flash svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; }
.flash-ok { background: var(--accent-050); color: #0b7a56; border-color: color-mix(in srgb, var(--accent) 26%, transparent); }
.flash-error, .flash-danger { background: var(--danger-050); color: #b42318; border-color: color-mix(in srgb, var(--danger) 26%, transparent); }

.alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 10px;
  font-size: 13.5px; margin-bottom: 16px; border: 1px solid transparent;
}
.alert svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; }
.alert-error { background: var(--danger-050); color: #b42318; border-color: color-mix(in srgb, var(--danger) 24%, transparent); }
.alert-ok { background: var(--accent-050); color: #0b7a56; }
.alert-warn { background: var(--warn-050); color: #a35a00; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.pill svg { width: 15px; height: 15px; color: var(--primary); }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; }
.badge-ok { background: var(--accent-050); color: #0b7a56; }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-warn { background: var(--warn-050); color: #a35a00; }
.badge-private { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(12, 22, 38, .72); color: #fff; font-size: 11px; font-weight: 600; backdrop-filter: blur(4px); }
.badge-private svg { width: 12px; height: 12px; }
.badge-expire { position: absolute; left: auto; right: 8px; bottom: 8px; display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(180, 83, 9, .82); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(4px); }
.badge-review { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(240, 140, 0, .9); color: #fff; font-size: 11px; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-glow {
  position: absolute; inset: -30% -10% auto -10%; height: 620px; pointer-events: none;
  background:
    radial-gradient(620px 340px at 18% 34%, rgba(11, 107, 203, .20), transparent 62%),
    radial-gradient(560px 320px at 82% 18%, rgba(18, 184, 134, .16), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .42;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(72% 62% at 50% 0%, #000, transparent 78%);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.02fr .98fr; gap: 44px; align-items: center; padding: 58px 0 54px; }
.hero-copy h1 { font-size: 43px; line-height: 1.16; margin: 18px 0 16px; letter-spacing: -.035em; }
.grad { background: linear-gradient(115deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 15.5px; color: var(--text-2); max-width: 540px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-metrics { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-metrics strong { display: block; font-size: 23px; letter-spacing: -.02em; }
.hero-metrics span { font-size: 12.5px; color: var(--muted); }

.hero-panel {
  position: relative; padding: 18px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.panel-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.panel-title svg { width: 17px; height: 17px; color: var(--primary); }
.panel-badge { height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 6px; background: var(--primary-050); color: var(--primary); font-size: 11.5px; font-weight: 700; }
.upload-guest { text-align: center; padding: 22px 8px 10px; }
.guest-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--primary-050); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.guest-icon svg { width: 26px; height: 26px; }
.upload-guest h3 { font-size: 17px; }
.upload-guest p { color: var(--muted); font-size: 13px; margin: 6px 0 18px; }
.guest-actions { display: flex; gap: 9px; justify-content: center; }

.upload-form { display: flex; flex-direction: column; gap: 12px; }
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  padding: 30px 18px; text-align: center; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s;
}
.dropzone.compact { padding: 24px 18px; }
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-050); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 26%, transparent); }
.drop-icon { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.drop-icon svg { width: 24px; height: 24px; }
.drop-title { font-weight: 700; font-size: 15px; }
.drop-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.drop-hint { font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.drop-actions { display: flex; gap: 9px; justify-content: center; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.drop-actions .select { width: auto; min-width: 150px; }

.url-import { padding-top: 10px; border-top: 1px dashed var(--border); }
.url-import-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.url-import-head span { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.url-import-head small { font-size: 11px; color: var(--muted); }
.url-import-row { display: flex; gap: 8px; align-items: flex-start; }
.url-import-row input,
.url-import-row textarea {
  flex: 1; min-width: 0; height: 36px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); color: var(--text);
  padding: 0 11px; font-size: 12.5px; outline: none;
}
.url-import-row textarea { height: 48px; padding: 8px 11px; line-height: 1.5; resize: vertical; font-family: inherit; }
.url-import-row input:focus,
.url-import-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-050); }
.url-import-row .btn { flex: 0 0 auto; height: 36px; margin-top: 6px; }

.upload-progress { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.upload-progress[hidden] { display: none; }
.bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .2s; }
.upload-results { display: flex; flex-direction: column; gap: 8px; }
.upload-results:empty { display: none; }
.panel-foot { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; margin-top: 14px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }

.announce {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 12px 16px;
  border-radius: 12px; background: var(--warn-050); color: #a35a00; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--warn) 22%, transparent);
}
.announce svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; }

/* ---------- 首页特性 ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 30px; }
.section-head h2 { font-size: 27px; letter-spacing: -.025em; }
.section-head p { color: var(--muted); font-size: 14px; margin: 9px 0 0; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { padding: 22px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .18s, box-shadow .18s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature-icon svg { width: 20px; height: 20px; }
.feature-icon.blue { background: var(--primary-050); color: var(--primary); }
.feature-icon.teal { background: var(--accent-050); color: var(--accent); }
.feature-icon.amber { background: var(--warn-050); color: var(--warn); }
.feature-icon.rose { background: var(--danger-050); color: var(--danger); }
.feature h3 { font-size: 15.5px; margin-bottom: 7px; }
.feature p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.75; }

.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
.split-copy h2 { font-size: 27px; letter-spacing: -.025em; }
.split-copy p { color: var(--text-2); font-size: 14px; line-height: 1.8; }
.api-points { display: flex; flex-direction: column; gap: 9px; margin: 18px 0 22px; font-size: 13.5px; color: var(--text-2); }
.api-points > div { display: flex; align-items: center; gap: 8px; }
.api-points svg { width: 16px; height: 16px; color: var(--accent); }
.code-card { border-radius: var(--radius); overflow: hidden; background: #0f1a2b; border: 1px solid #1d2b40; box-shadow: var(--shadow-lg); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: #131f31; border-bottom: 1px solid #1d2b40; font-size: 11px; color: #8aa0bd; font-family: var(--mono); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #3a4c66; }
.code-card pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code-card pre code { font-family: var(--mono); font-size: 12.5px; line-height: 1.85; color: #d7e3f4; white-space: pre; }

/* ---------- 套餐 ---------- */
.plans-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 16px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 16px; align-items: stretch; }
.plan-card {
  position: relative; display: flex; flex-direction: column; padding: 26px 22px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform .18s, box-shadow .18s;
}
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.plan-card.popular { border-color: var(--primary); box-shadow: 0 14px 36px rgba(11, 107, 203, .15); }
.plan-tag { position: absolute; top: -11px; left: 20px; height: 23px; padding: 0 10px; border-radius: 6px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; }
.plan-tag.current { left: auto; right: 16px; background: var(--accent); }
.plan-card h3 { font-size: 17px; }
.plan-price { margin: 12px 0 4px; display: flex; align-items: baseline; gap: 2px; min-height: 44px; }
.plan-price .cur { font-size: 15px; color: var(--muted); }
.plan-price strong { font-size: 31px; font-weight: 800; letter-spacing: -.035em; }
.plan-price .per { font-size: 12px; color: var(--muted); margin-left: 3px; }
.plan-price .free { font-size: 22px; font-weight: 800; color: var(--accent); }
.plan-spec { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.plan-spec > div { display: flex; align-items: baseline; gap: 4px; }
.plan-spec b { font-size: 14px; color: var(--text); }
.plan-features { list-style: none; margin: 14px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.plan-features li { display: flex; align-items: flex-start; gap: 7px; }
.plan-features svg { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; margin-top: 3px; }
.plan-card > .btn, .plan-card form { margin-top: auto; }

.faq-card { margin-top: 22px; padding: 24px; }
.faq-card h2 { font-size: 18px; margin-bottom: 16px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
.faq-grid h4 { font-size: 13.5px; margin-bottom: 4px; }
.faq-grid p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.75; }

/* ---------- 通用卡片/表格 ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.card-head h2 svg { width: 16px; height: 16px; color: var(--primary); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 10px 14px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: 8px 10px; }

/* ---------- 页面头 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; letter-spacing: -.025em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------- 上传区（图库页） ---------- */
.upload-panel { padding: 16px; }
.upload-panel .upload-form { gap: 10px; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.search-box svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 auto; }
.search-box input { width: 200px; flex: 1 1 auto; min-width: 0; height: 30px; padding: 0; border: 0; background: transparent; font-size: 12.5px; }
.search-box input:focus { box-shadow: none; }
.search-box button { flex: 0 0 auto; height: 26px; padding: 0 9px; border: 0; border-radius: 6px; background: var(--primary-050); color: var(--primary); font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.toolbar select.select { width: auto; min-width: 120px; height: 36px; font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }

/* ---------- 图片网格 ---------- */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.image-card { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); transition: transform .16s, box-shadow .16s, border-color .16s; }
.image-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-check { position: absolute; left: 8px; top: 8px; z-index: 4; }
.card-check input { width: 18px; height: 18px; }
.card-check span { display: none; }
.image-thumb { display: block; aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; overflow: hidden; }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.image-card:hover .image-thumb img { transform: scale(1.04); }
.image-thumb .badge-private, .image-thumb .badge-review { position: absolute; left: 8px; bottom: 8px; }
.image-thumb .badge-review { left: auto; right: 8px; bottom: 8px; }
.image-meta { padding: 10px 12px 6px; }
.image-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-stats { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.image-stats svg { width: 13px; height: 13px; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); display: inline-block; }
.image-actions { display: flex; gap: 5px; padding: 0 10px 10px; }
.image-actions .icon-btn { flex: 1; height: 30px; }
.image-actions .icon-btn svg { width: 14px; height: 14px; }

/* ---------- 相册 ---------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.album-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); transition: box-shadow .18s, transform .18s; }
.album-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.album-cover { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.album-placeholder svg { width: 30px; height: 30px; }
.album-count { position: absolute; right: 9px; top: 9px; height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(12, 22, 38, .7); color: #fff; font-size: 11px; display: inline-flex; align-items: center; backdrop-filter: blur(4px); }
.album-body { padding: 12px 14px 14px; }
.album-title { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13.5px; }
.album-title .badge-private { position: static; height: 20px; background: var(--surface-2); color: var(--muted); }
.album-title .badge-private svg { color: var(--muted); }
.album-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.album-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.album-actions .btn { flex: 1; }
.album-actions .icon-btn { width: 32px; height: 32px; }

/* ---------- 控制台 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { position: relative; padding: 17px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-icon.blue { background: var(--primary-050); color: var(--primary); }
.stat-icon.teal { background: var(--accent-050); color: var(--accent); }
.stat-icon.amber { background: var(--warn-050); color: var(--warn); }
.stat-icon.rose { background: var(--danger-050); color: var(--danger); }
.stat-body span { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-body strong { display: block; font-size: 24px; letter-spacing: -.025em; line-height: 1.25; }
.stat-body strong em { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-sub { font-size: 11.5px; color: var(--muted); }

.dash-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; margin: 16px 0; }
.chart-card { overflow: hidden; }
.chart-box { padding: 6px 16px 14px; }
canvas { max-width: 100%; }

.quota-card { padding-bottom: 6px; }
.quota-item { padding: 0 20px; margin-bottom: 14px; }
.quota-label { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 6px; }
.quota-label span { color: var(--muted); }
.quota-label b { font-weight: 600; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #4c9cf5); }
.progress.teal i { background: linear-gradient(90deg, var(--accent), #43d9a3); }
.progress.amber i { background: linear-gradient(90deg, var(--warn), #ffc078); }
.quota-note { padding: 4px 20px 16px; font-size: 11.5px; color: var(--muted); }
.settings-main .progress { margin: 0 20px 20px; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; padding: 16px 20px; }
.mini-item { border-radius: 9px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.mini-item img { aspect-ratio: 1; width: 100%; object-fit: cover; }
.mini-name { display: block; padding: 5px 7px; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-grid + .empty-mini { padding: 30px; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; padding: 16px 20px; }
.quick { display: flex; flex-direction: column; gap: 2px; padding: 14px 15px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface); transition: border-color .16s, background .16s; }
.quick:hover { border-color: var(--primary); background: var(--primary-050); }
.quick svg { width: 18px; height: 18px; color: var(--primary); margin-bottom: 6px; }
.quick span { font-size: 13px; font-weight: 600; }
.quick small { font-size: 11px; color: var(--muted); }

.empty-mini { padding: 26px 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
.empty-state { text-align: center; padding: 46px 20px; }
.empty-icon { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 18px; background: var(--surface-2); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.empty-icon svg { width: 27px; height: 27px; }
.empty-state h2 { font-size: 17px; }
.empty-state p { margin: 6px 0 16px; color: var(--muted); font-size: 13px; }

/* ---------- 充值/支付 ---------- */
.recharge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.recharge-grid .card p { padding: 0 20px; margin: 14px 0; }
.recharge-form { display: flex; gap: 9px; padding: 0 20px 16px; }
.recharge-form input { flex: 1; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.recharge-grid .btn-block { margin: 0 20px 20px; width: calc(100% - 40px); }

.pay-wrap { display: flex; justify-content: center; }
.pay-card { width: 100%; max-width: 620px; padding: 26px; text-align: center; }
.pay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; text-align: left; padding-bottom: 18px; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.pay-amount { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--primary); }
.pay-meta { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.pay-meta b { color: var(--text); font-weight: 600; }
.pay-qr { padding: 20px 0 8px; }
.pay-qr img { width: 210px; height: 210px; object-fit: contain; margin: 0 auto 12px; border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: var(--surface); }
.pay-qr p { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.pay-mock, .pay-empty { padding: 20px 0 6px; }
.pay-mock p, .pay-empty p { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.pay-success, .pay-warn { width: 62px; height: 62px; margin: 6px auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.pay-success { background: var(--accent-050); color: var(--accent); }
.pay-warn { background: var(--danger-050); color: var(--danger); }
.pay-success svg, .pay-warn svg { width: 28px; height: 28px; }
.pay-card h1 { font-size: 22px; }
.pay-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pay-btn { display: inline-flex; align-items: center; gap: 8px; }
.pay-btn svg { width: 17px; height: 17px; }
.pay-btn-alipay, .pay-btn.pay-btn-alipay { background: #1677ff; background-image: none; border-color: #1677ff; }
.pay-btn.pay-btn-alipay:hover { background: #0f67e6; background-image: none; border-color: #0f67e6; }
.pay-btn-wechat, .pay-btn.pay-btn-wechat { background: #07c160; background-image: none; border-color: #07c160; }
.pay-btn.pay-btn-wechat:hover { background: #06ad56; background-image: none; border-color: #06ad56; }
.pay-status { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px; border-radius: 999px; background: var(--warn-050); color: #a35a00; font-size: 12.5px; font-weight: 600; margin-top: 18px; }
.dot-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 140, 0, .5); } 70% { box-shadow: 0 0 0 7px rgba(240, 140, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(240, 140, 0, 0); } }

/* ---------- 设置 ---------- */
.settings-layout { display: grid; grid-template-columns: 216px 1fr; gap: 18px; align-items: start; }
.settings-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 11px; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.settings-nav a svg { width: 16px; height: 16px; }
.settings-nav a:hover { background: var(--surface-2); }
.settings-nav a.active { background: var(--primary-050); color: var(--primary); font-weight: 600; }
.settings-main { display: flex; flex-direction: column; gap: 16px; }
.tab-panel[hidden] { display: none; }
.avatar-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.avatar-big { width: 66px; height: 66px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #0b6bcb, #12b886); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex: 0 0 auto; }
.avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.avatar-form { display: flex; flex-direction: column; gap: 7px; }
.avatar-form .btn { align-self: flex-start; }
.form-grid { padding: 18px 20px; }
.form-grid.narrow { max-width: 460px; }
.field { display: block; margin-bottom: 15px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input:not([type]), textarea, select, .select {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 13.5px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 9px 12px; line-height: 1.65; resize: vertical; }
select, .select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237c8aa5' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input:focus, textarea:focus, select:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.select.sm, .sm { height: 32px; font-size: 12.5px; }
.form-actions { display: flex; gap: 9px; margin-top: 4px; }
.security-tips { border-top: 1px solid var(--border); padding: 16px 20px 20px; }
.security-tips h4 { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.security-tips ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.9; }
.token-box { padding: 18px 20px 6px; }
.token-box label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.token-value { display: flex; gap: 8px; }
.token-value input { flex: 1; font-family: var(--mono); font-size: 12px; }
.token-box p { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.api-example { margin: 12px 20px; border-radius: 10px; background: #0f1a2b; overflow-x: auto; }
.api-example pre { margin: 0; padding: 14px 16px; }
.api-example code { font-family: var(--mono); font-size: 12px; color: #d7e3f4; white-space: pre; }
.tab-panel > form:not(.form-grid):not(.avatar-form) { padding: 0 20px 20px; }
.plan-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 20px; }
.plan-info-grid > div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; }
.plan-info-grid span { display: block; font-size: 11.5px; color: var(--muted); }
.plan-info-grid b { font-size: 14px; }

/* ---------- 文档 ---------- */
.docs-layout { display: grid; grid-template-columns: 208px 1fr; gap: 20px; align-items: start; }
.docs-layout > *, .docs-nav, .docs-body, .docs-body .card { min-width: 0; }
.docs-nav { position: sticky; top: calc(var(--topbar-h) + 16px); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.docs-nav h4 { font-size: 11.5px; color: var(--muted); padding: 4px 9px 8px; }
.docs-nav a { padding: 8px 10px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); }
.docs-nav a:hover { background: var(--surface-2); color: var(--text); }
.docs-body { display: flex; flex-direction: column; gap: 14px; }
.docs-body .card { padding: 20px 22px; }
.docs-body h2 { font-size: 18px; margin-bottom: 10px; }
.docs-body h4 { font-size: 13px; margin: 16px 0 8px; color: var(--text-2); }
.docs-body p { font-size: 13.5px; color: var(--text-2); line-height: 1.8; }
.docs-body pre { margin: 10px 0; padding: 14px 16px; border-radius: 9px; background: #0f1a2b; overflow-x: auto; }
.docs-body pre code { font-family: var(--mono); font-size: 12px; line-height: 1.85; color: #d7e3f4; white-space: pre; }
.docs-body .table code { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.endpoint { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.endpoint:last-child { border-bottom: 0; }
.method { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; height: 23px; padding: 0 7px; border-radius: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.method.get { background: var(--accent-050); color: #0b7a56; }
.method.post { background: var(--primary-050); color: var(--primary); }
.method.patch { background: var(--warn-050); color: #a35a00; }
.method.delete { background: var(--danger-050); color: #b42318; }
.endpoint code { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.endpoint .desc { font-size: 11.5px; color: var(--muted); margin-left: auto; }

/* ---------- 图片详情 ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 352px; gap: 18px; align-items: start; }
.preview-stage {
  display: flex; align-items: center; justify-content: center; min-height: 360px; padding: 22px;
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 22px 22px;
}
.preview-stage img { max-height: 68vh; width: auto; border-radius: 6px; box-shadow: var(--shadow); }
.detail-bar { padding: 14px 20px; border-top: 1px solid var(--border); }
.detail-title { font-weight: 700; font-size: 14.5px; word-break: break-all; }
.detail-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.detail-side { display: flex; flex-direction: column; gap: 14px; }
.detail-side > .card > .btn-block { margin: 0 20px 20px; width: calc(100% - 40px); }
.info-list { margin: 0; padding: 6px 20px 16px; }
.info-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; text-align: right; word-break: break-all; }
.copy-row { padding: 0 20px 10px; }
.copy-row:first-of-type { padding-top: 14px; }
.copy-row label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.copy-input { display: flex; gap: 6px; }
.copy-input input { height: 34px; font-family: var(--mono); font-size: 11.5px; }
.cta-card { padding: 22px; text-align: center; }
.cta-card h3 { font-size: 15px; }
.cta-card p { font-size: 12.5px; color: var(--muted); margin: 5px 0 14px; }

/* ---------- 登录/注册 ---------- */
.auth-page { background: var(--bg); }
.auth-wrap { display: grid; grid-template-columns: 460px 1fr; gap: 0; max-width: 1080px; margin: 34px auto; padding: 0 22px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 30px; box-shadow: var(--shadow); }
.auth-head .brand { margin-bottom: 18px; }
.auth-head h1 { font-size: 23px; letter-spacing: -.025em; }
.auth-head p { color: var(--muted); font-size: 13px; margin: 6px 0 18px; }
.auth-form { display: flex; flex-direction: column; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 12.5px; }
.auth-row a { color: var(--primary); }
.auth-form .btn-block { width: 100%; }
.auth-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-side { position: relative; margin-left: 18px; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(145deg, #0d2340, #0a3a50 55%, #0a4d3f); color: #e6f0ff; display: flex; align-items: center; padding: 34px; }
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(420px 220px at 20% 0%, rgba(76, 156, 245, .28), transparent 65%), radial-gradient(380px 240px at 90% 100%, rgba(47, 214, 160, .22), transparent 60%); }
.auth-side-inner { position: relative; z-index: 1; }
.auth-side .pill { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #d6e4f7; }
.auth-side .pill svg { color: #7ee2b8; }
.auth-side h2 { font-size: 30px; line-height: 1.25; margin: 16px 0 20px; letter-spacing: -.03em; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; color: #b9cbe4; }
.auth-side li { display: flex; align-items: center; gap: 9px; }
.auth-side li svg { width: 16px; height: 16px; color: #7ee2b8; }

/* ---------- 自定义页面 ---------- */
.prose { padding: 28px 30px; }
.prose h1 { font-size: 24px; margin-bottom: 14px; }
.prose p, .prose li { font-size: 14px; color: var(--text-2); line-height: 1.9; }
.prose h2 { font-size: 18px; margin: 20px 0 8px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-info { margin-left: 6px; font-size: 12px; color: var(--muted); }

/* ---------- 模态 ---------- */
.modal { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(8, 16, 28, .56); backdrop-filter: blur(3px); }
.modal-panel { position: relative; width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 19px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 17px 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 26px; padding: 26px 22px; flex-wrap: wrap; }
.footer-brand { max-width: 360px; }
.footer-brand .brand { font-size: 15px; }
.footer-brand p { margin: 9px 0 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(120px, auto)); gap: 26px; }
.footer-links h4 { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.footer-links a { display: block; font-size: 12.5px; color: var(--text-2); padding: 3px 0; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding: 12px 0; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 18px; border-radius: 999px; background: #15233c; color: #fff; font-size: 13px; box-shadow: var(--shadow-lg); transition: all .22s; white-space: nowrap; }
.toast.ok { background: #0b7a56; }
.toast.error { background: #b42318; }

/* ---------- 相册分享 ---------- */
.share-page { max-width: 1180px; }
.share-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 28px; margin-bottom: 18px; background: linear-gradient(135deg, rgba(11, 107, 203, .08), rgba(18, 184, 134, .05)); }
.share-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--primary); text-transform: uppercase; margin-bottom: 6px; }
.share-hero h1 { font-size: 28px; margin: 0 0 6px; }
.share-hero p { margin: 0; color: var(--muted); max-width: 680px; }
.share-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.share-meta span { display: inline-flex; align-items: center; gap: 5px; }
.share-hero-actions { display: flex; gap: 8px; flex-shrink: 0; }
.share-image-grid { margin-top: 4px; }
.share-powered { margin: 22px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.share-powered a { color: var(--primary); text-decoration: none; }
.share-locked { max-width: 560px; }
.share-lock-card { padding: 34px 30px; text-align: center; }
.share-lock-icon { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--primary); }
.share-lock-icon svg { width: 24px; height: 24px; }
.share-lock-card h1 { font-size: 24px; margin: 0 0 8px; }
.share-lock-card p { color: var(--muted); margin: 0 0 18px; }
.share-lock-form { text-align: left; }
.share-lock-form .field { margin-bottom: 12px; }
.share-active-box { padding: 12px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.share-active-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.share-form-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.share-image-tip { margin: 0 0 12px; font-size: 12px; line-height: 1.65; }
.share-image-card .badge { flex: 0 0 auto; }

/* ---------- v1.1.5 UI refresh：层次、留白与品牌光感 ---------- */
::selection { background: color-mix(in srgb, var(--primary) 24%, transparent); color: var(--text); }
html { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 42%, var(--bg)); border: 3px solid var(--bg); border-radius: 999px; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1050px 560px at 6% -12%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 68%),
    radial-gradient(860px 480px at 100% 6%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%);
  background-attachment: fixed;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(1050px 560px at 6% -12%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 68%),
    radial-gradient(860px 480px at 100% 6%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
}

:where(a, button):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 70%, white);
  outline-offset: 3px;
  border-radius: 6px;
}

.topbar {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 70%, transparent), 0 10px 30px -28px rgba(10, 32, 62, .35);
}
.brand-mark { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 7px 18px rgba(11, 107, 203, .3); }
.nav-item { border-radius: 9px; }
.nav-item.active { background: linear-gradient(135deg, var(--primary-050), color-mix(in srgb, var(--accent-050) 55%, var(--primary-050))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 12%, transparent); }

.btn-primary {
  background-image: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 82%, var(--accent)) 100%);
  border-color: color-mix(in srgb, var(--primary) 70%, var(--accent));
  box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--primary) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { background-image: linear-gradient(135deg, var(--primary-600) 0%, color-mix(in srgb, var(--primary-600) 82%, var(--accent)) 100%); filter: saturate(1.05); }
.btn-ghost { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.btn-lg { border-radius: 13px; }

.hero-inner { padding: 64px 0 58px; }
.hero-copy h1 { font-size: 46px; line-height: 1.12; text-wrap: balance; }
.hero-sub { max-width: 560px; font-size: 16px; }
.hero-metrics strong { font-size: 25px; }
.hero-panel {
  background: linear-gradient(168deg, color-mix(in srgb, var(--surface) 92%, var(--primary) 8%), var(--surface) 62%);
  border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
  box-shadow: 0 34px 80px -44px rgba(10, 42, 82, .55), 0 1px 0 rgba(255, 255, 255, .6) inset;
}
.panel-head { padding-bottom: 15px; margin-bottom: 18px; }
.panel-badge { background: linear-gradient(135deg, var(--primary-050), var(--accent-050)); color: var(--primary); }
.dropzone { border-radius: 15px; background: linear-gradient(180deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 82%, var(--surface))); }
.dropzone:hover, .dropzone.dragover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent), 0 12px 28px -24px var(--primary); }
.drop-icon { border-radius: 16px; box-shadow: 0 6px 16px -12px rgba(11, 107, 203, .5); }

.features { gap: 16px; }
.feature {
  position: relative; overflow: hidden; padding: 25px 24px; border-radius: 16px;
  background: linear-gradient(168deg, color-mix(in srgb, var(--surface) 94%, var(--primary) 6%), var(--surface) 64%);
}
.feature::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 72%, transparent), transparent 72%);
  opacity: .55;
}
.feature:hover { transform: translateY(-5px); box-shadow: 0 24px 52px -34px rgba(10, 34, 70, .45); border-color: color-mix(in srgb, var(--primary) 24%, var(--border)); }
.feature-icon { width: 46px; height: 46px; border-radius: 13px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 60%, transparent); }
.feature h3 { font-size: 16px; }
.feature p { font-size: 13px; }

.plan-card { border-radius: 16px; }
.plan-card.popular { background: linear-gradient(168deg, color-mix(in srgb, var(--surface) 92%, var(--primary) 8%), var(--surface) 64%); }
.plan-card.popular::after {
  content: ""; position: absolute; inset: auto 24px 0 24px; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 45%, transparent), transparent);
}

.card { border-radius: 16px; box-shadow: 0 1px 2px rgba(16, 34, 64, .04), 0 18px 46px -38px rgba(16, 34, 64, .32); }
.card-head { padding: 16px 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, var(--primary) 10%), var(--surface)); }
.card-head h2 { font-size: 15px; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 28px; letter-spacing: -.035em; }
.page-head p { font-size: 13.5px; }

.stat-grid { gap: 16px; }
.stat-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px;
  padding: 18px 19px 16px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(158deg, color-mix(in srgb, var(--surface) 94%, var(--primary) 6%), var(--surface) 68%);
  box-shadow: 0 1px 2px rgba(16, 34, 64, .04), 0 20px 46px -40px rgba(16, 34, 64, .38);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.stat-card::after {
  content: ""; position: absolute; width: 110px; height: 110px; right: -44px; top: -48px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%); pointer-events: none;
}
.stat-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 18%, var(--border)); box-shadow: 0 22px 52px -36px rgba(16, 34, 64, .4); }
.stat-icon { grid-column: 2; grid-row: 1; width: 40px; height: 40px; margin: 0; border-radius: 12px; }
.stat-body { grid-column: 1; grid-row: 1; min-width: 0; }
.stat-body span { font-size: 12px; }
.stat-body strong { font-size: 28px; margin-top: 2px; }
.stat-sub {
  grid-column: 1 / -1; grid-row: 2; margin-top: 13px; padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent); font-size: 11.5px;
}

.dash-grid { gap: 18px; }
.chart-box { padding: 10px 18px 16px; }
.quick-grid { gap: 11px; }
.quick { border-radius: 12px; background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 94%, var(--primary) 6%), var(--surface) 68%); transition: transform .16s, border-color .16s, box-shadow .16s; }
.quick:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -28px rgba(16, 34, 64, .35); }
.quick svg { width: 35px; height: 35px; padding: 8px; border-radius: 9px; background: var(--primary-050); color: var(--primary); }

.image-grid { gap: 16px; }
.image-card { border-radius: 14px; }
.image-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px -30px rgba(16, 34, 64, .42); }
.image-thumb::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 34%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(8, 16, 28, .42)); opacity: 0; transition: opacity .2s;
}
.image-card:hover .image-thumb::after { opacity: 1; }
.image-thumb .badge-private, .image-thumb .badge-review, .card-check { z-index: 3; }
.image-meta { padding: 12px 13px 7px; }
.image-name { font-size: 13px; }
.image-actions { padding: 0 11px 11px; gap: 6px; }
.image-actions .icon-btn { border-radius: 8px; }

.album-card { border-radius: 16px; }
.album-cover img { transition: transform .45s ease; }
.album-card:hover .album-cover img { transform: scale(1.035); }
.album-body { padding: 14px 16px 16px; }
.album-count { border-radius: 8px; }

.auth-card { border-radius: 24px; box-shadow: 0 30px 80px -42px rgba(10, 34, 70, .55); }
.auth-side { border-radius: 24px; }
.auth-side::after {
  content: ""; position: absolute; width: 380px; height: 380px; right: -150px; bottom: -160px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 34px rgba(255, 255, 255, .025), 0 0 0 72px rgba(255, 255, 255, .018); pointer-events: none;
}
.auth-head h1 { font-size: 25px; }

.footer { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--primary) 8%), var(--surface)); }

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


@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding: 42px 0; }
  .hero-copy h1 { font-size: 34px; }
  .features { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 26px; }
  .dash-grid, .detail-layout, .docs-layout, .settings-layout, .recharge-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .docs-nav { position: static; flex-flow: row wrap; }
  .docs-nav h4 { width: 100%; }
  .auth-wrap { grid-template-columns: 1fr; max-width: 520px; }
  .auth-side { display: none; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 14px; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .nav.mobile-open { display: flex; }
  .nav-item { height: 42px; }
  .nav-toggle { display: inline-flex; }
  .only-desktop { display: none; }
}
@media (max-width: 480px) {
  .topbar-inner { gap: 12px; }
  .brand { flex: 0 0 auto; white-space: nowrap; }
  .brand-text { display: none; }
  .topbar-actions { gap: 6px; }
  .login-link { flex: 0 0 auto; padding: 0 6px; white-space: nowrap; }
  .hero-panel { border-radius: 16px; }
  .hero-panel .panel-head { padding-bottom: 12px; margin-bottom: 14px; }
  .hero-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
  .guest-actions { flex-wrap: wrap; }
  .guest-actions .btn { flex: 1 1 130px; }
  .stat-card { padding: 15px 16px 14px; column-gap: 9px; }
  .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .stat-body strong { font-size: 17px; white-space: nowrap; }
  .drop-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .drop-actions .btn, .drop-actions .select { width: 100%; min-width: 0; }
  .drop-actions .select:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .wrap { padding: 0 15px; }
  .section { padding-top: 24px; padding-bottom: 40px; }
  .hero-copy h1 { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-metrics { gap: 20px; }
  .hero-metrics strong { font-size: 18px; }
  .hero-panel { padding: 14px; }
  .features { grid-template-columns: 1fr; }
  .section-head h2, .split-copy h2 { font-size: 22px; }
  .stat-grid { gap: 10px; }
  .stat-body strong { font-size: 19px; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .image-actions .icon-btn { height: 28px; }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .plans-preview { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; }
  .toolbar-left { flex-direction: column; align-items: stretch; }
  .search-box input { width: auto; }
  .search-box { width: 100%; }
  .toolbar select.select { width: 100%; }
  .toolbar-right { justify-content: space-between; }
  .page-head h1 { font-size: 21px; }
  .page-head { align-items: flex-start; }
  .recharge-form { flex-direction: column; }
  .recharge-form .btn { width: 100%; }
  .pay-head { flex-direction: column; }
  .faq-grid, .plan-info-grid { grid-template-columns: 1fr; }
  .modal-panel { max-height: 92vh; }
  .footer-links { gap: 18px; }
  .auth-card { padding: 24px 20px; }
  .table th:nth-child(n+5), .table td:nth-child(n+5) { display: none; }
}

/* ============================================================
   v1.2.2 交易运营组件
   ============================================================ */
.plan-buy-form { display: flex; flex-direction: column; gap: 8px; }
.coupon-input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 13px; outline: none;
}
.coupon-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-050); }
.pay-discount { display: block; margin-top: 4px; color: var(--accent); font-size: 12px; font-weight: 600; }
.sub-title { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.ticket-thread { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 8px; }
.ticket-msg { max-width: 86%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.ticket-msg.user { align-self: flex-end; background: var(--primary-050); border-color: transparent; }
.ticket-msg.admin { align-self: flex-start; background: var(--surface-2); }
.ticket-msg-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.ticket-msg-body { font-size: 14px; line-height: 1.75; word-break: break-word; }
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.ticket-item:hover { border-color: var(--primary); background: var(--primary-050); }
.ticket-item b { display: block; font-size: 14px; }
.ticket-item span { color: var(--muted); font-size: 12px; }
.tickets-grid { align-items: start; }
.narrow-section { max-width: 760px; }
@media (max-width: 720px) {
  .ticket-msg { max-width: 94%; }
  .tickets-grid { grid-template-columns: 1fr; }
  .ticket-item { align-items: flex-start; }
}
.badge-danger { background: var(--danger-050); color: var(--danger); }
/* 前台表单栅格（复用后台类名，保证充值/工单页布局一致） */
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.settings-form { padding: 0; }
@media (max-width: 720px) {
  .admin-grid-2, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
