/* ═══════════════════════════════════════════════════════════════
   软件发布平台 — 现代UI系统 v4.1 (Logo优先)
   ───────────────────────────────────────────────────────────
   品牌色: 翡翠绿 (#059669) | 强调色: 琥珀 (#f59e0b)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --primary: #059669; --primary-50: #ecfdf5; --primary-100: #d1fae5;
  --primary-200: #a7f3d0; --primary-600: #059669; --primary-700: #047857;
  --primary-800: #065f46; --primary-900: #022c22;
  --accent: #f59e0b; --accent-50: #fffbeb; --accent-100: #fef3c7;
  --blue: #2563eb; --blue-50: #eff6ff; --red: #dc2626; --red-50: #fef2f2;
  --purple: #7c3aed; --purple-50: #f5f3ff;
  --ink: #0f172a; --ink-2: #1e293b; --ink-3: #334155; --ink-4: #475569;
  --muted: #64748b; --muted-2: #94a3b8; --line: #e2e8f0; --line-2: #cbd5e1;
  --soft: #f8fafc; --soft-2: #f1f5f9; --white: #fff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 1px rgb(0 0 0 / 0.02);
  --shadow-card-hover: 0 8px 24px rgb(0 0 0 / 0.10), 0 2px 6px rgb(0 0 0 / 0.04);
  --shadow-btn: 0 1px 2px rgb(5 150 105 / 0.20);
  --shadow-btn-hover: 0 4px 12px rgb(5 150 105 / 0.30);
  --radius: 8px; --radius-sm: 6px; --radius-md: 10px;
  --radius-lg: 14px; --radius-xl: 18px; --radius-2xl: 24px; --radius-full: 9999px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --fast: 0.15s var(--ease); --base: 0.2s var(--ease);
}

/* ══════════════════════════════════════════════
   基础
   ══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0; color: var(--ink-3);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.6; background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
h1, h2, h3, p { margin: 0; }

/* ══════════════════════════════════════════════
   导航
   ══════════════════════════════════════════════ */

.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 60px); height: 60px;
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.4);
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.brand-mark {
  display: grid; width: 32px; height: 32px; place-items: center;
  color: #fff; font-weight: 800; font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  border-radius: var(--radius); box-shadow: 0 2px 8px rgba(5,150,105,0.25);
}

.brand strong { display: block; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.brand span { display: block; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.top-nav { display: flex; align-items: center; gap: 2px; }

.top-nav a, .top-nav .nav-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; color: var(--ink-4); font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm); transition: all var(--fast);
  white-space: nowrap;
}

.top-nav a:hover, .top-nav .nav-btn:hover { color: var(--primary); background: var(--primary-50); }

.top-nav a.primary-button {
  color: #fff; background: var(--primary); height: 32px; padding: 0 14px; font-size: 12px; border-radius: var(--radius);
}
.top-nav a.primary-button:hover { background: var(--primary-700); }

.user-menu { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: var(--radius-full); cursor: pointer; transition: background var(--fast); }
.user-menu:hover { background: var(--soft-2); }

.user-avatar {
  display: grid; width: 26px; height: 26px; place-items: center;
  color: #fff; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-700)); border-radius: 50%;
}

.user-name { font-size: 13px; font-weight: 600; color: var(--ink-3); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-dropdown {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 200;
  min-width: 170px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-3px);
  transition: all var(--base);
}
.user-menu:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a, .user-dropdown button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; color: var(--ink-4); font-size: 13px;
  border-radius: var(--radius-sm); transition: all var(--fast);
}
.user-dropdown a:hover, .user-dropdown button:hover { color: var(--ink-2); background: var(--soft-2); }
.user-dropdown hr { border: none; height: 1px; margin: 3px 0; background: var(--line); }

/* ══════════════════════════════════════════════
   Hero
   ══════════════════════════════════════════════ */

.hero {
  display: grid; grid-template-columns: 1fr minmax(340px, 420px);
  gap: clamp(40px, 6vw, 80px); align-items: center;
  min-height: calc(100vh - 60px);
  padding: clamp(48px, 6vw, 80px) clamp(20px, 4vw, 60px);
  background:
    radial-gradient(ellipse 80% 60% at 0% 30%, rgba(5,150,105,0.06) 0%, transparent 100%),
    radial-gradient(ellipse 60% 50% at 100% 70%, rgba(245,158,11,0.04) 0%, transparent 100%),
    linear-gradient(180deg, var(--white) 0%, var(--soft) 100%);
  position: relative; overflow: hidden;
}

.hero-content { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 20px; padding: 6px 14px;
  color: var(--primary-700); font-size: 12px; font-weight: 700; letter-spacing: .5px;
  background: var(--primary-50); border: 1px solid var(--primary-100);
  border-radius: var(--radius-full);
}

.hero h1 {
  font-size: clamp(34px, 4.8vw, 56px);
  font-weight: 800; line-height: 1.05; letter-spacing: -.03em;
  color: var(--ink); margin-bottom: 18px;
}

.hero h1 .hl {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-copy {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.7; color: var(--ink-4);
  max-width: 520px; margin-bottom: 30px;
}

.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.hero-panel {
  position: relative; z-index: 2;
  min-height: 400px; padding: 18px;
  background: #0b1120;
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 30px 60px rgba(0,0,0,0.15), 0 10px 20px rgba(0,0,0,0.10);
  overflow: hidden;
}

.hero-panel::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(5,150,105,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.panel-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.panel-dot { width: 9px; height: 9px; border-radius: 50%; }
.panel-dot:nth-child(1) { background: #ef4444; }
.panel-dot:nth-child(2) { background: #f59e0b; }
.panel-dot:nth-child(3) { background: #10b981; }

.panel-label { margin-left: auto; font-size: 10px; color: rgba(255,255,255,0.2); letter-spacing: .5px; text-transform: uppercase; font-weight: 600; }

.release-stack {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.release-tile {
  display: grid; align-content: center; justify-items: center; gap: 6px;
  padding: 10px 6px; color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); transition: all var(--base);
}

.release-tile:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); border-color: rgba(255,255,255,0.12); }

.release-tile .icon {
  display: grid; width: 34px; height: 34px; place-items: center;
  font-size: 14px; font-weight: 800; border-radius: var(--radius-sm);
  overflow: hidden; position: relative;
}

.release-tile .icon img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.release-tile.green .icon { background: #059669; }
.release-tile.blue .icon { background: #2563eb; }
.release-tile.red .icon { background: #dc2626; }
.release-tile.gold .icon { background: #d97706; }

.release-tile strong { font-size: 11px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-tile span { font-size: 9px; color: rgba(255,255,255,0.35); }

/* ══════════════════════════════════════════════
   筛选栏
   ══════════════════════════════════════════════ */

.controls-bar {
  padding: 16px clamp(20px, 4vw, 60px);
  background: var(--white); border-bottom: 1px solid var(--line);
  position: sticky; top: 60px; z-index: 40;
}

.controls { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(120px, 1fr)); gap: 12px; }

label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; color: var(--ink-4); text-transform: uppercase; letter-spacing: .4px; }

input, select, textarea {
  width: 100%; height: 40px; padding: 0 14px;
  color: var(--ink-3); font-size: 14px; font-family: inherit;
  background: var(--soft); border: 1px solid var(--line);
  border-radius: var(--radius); outline: none; transition: all var(--fast);
  -webkit-appearance: none;
}
input::placeholder { color: var(--muted-2); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; cursor: pointer;
}

textarea { min-height: 100px; padding: 12px 14px; resize: vertical; line-height: 1.5; }

input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,0.10);
  background: var(--white);
}

/* ══════════════════════════════════════════════
   卡片 — Logo 优先设计 (核心组件)
   ══════════════════════════════════════════════ */

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.system-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--base);
  cursor: pointer;
}

.system-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

/* ── 头部: Logo + 标题 ── */

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 0;
}

.card-logo {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
}

.card-logo.green { background: linear-gradient(135deg, #059669, #34d399); }
.card-logo.blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.card-logo.red { background: linear-gradient(135deg, #dc2626, #f87171); }
.card-logo.gold { background: linear-gradient(135deg, #d97706, #fbbf24); }
.card-logo.purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.card-title {
  flex: 1;
  min-width: 0;
}

.card-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 3px;
}

.card-title .sub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.source-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.source-badge.curated { background: var(--primary-50); color: var(--primary-700); }
.source-badge.self { background: var(--blue-50); color: #1e40af; }

/* ── 描述 ── */

.card-desc {
  padding: 10px 16px 0;
  color: var(--ink-4);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 平台标签 ── */

.card-platforms {
  padding: 8px 16px 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.card-platforms .pt {
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 600;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}

/* ── 底部元信息 ── */

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.card-footer strong { font-weight: 600; color: var(--ink-3); }
.card-footer .dl-count { display: flex; align-items: center; gap: 3px; }

/* ── 操作按钮区 ── */

.card-actions {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
}

.card-actions .action-btn {
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--base);
}

.card-actions .action-btn.primary {
  color: #fff;
  background: var(--primary);
}

.card-actions .action-btn.primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}

.card-actions .action-btn.outline {
  color: var(--ink-3);
  background: var(--white);
  border: 1px solid var(--line);
}

.card-actions .action-btn.outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── 空状态 ── */

.empty-state {
  grid-column: 1 / -1;
  padding: 60px 20px; text-align: center;
  color: var(--muted);
  background: var(--white); border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}

.empty-state p { margin-bottom: 16px; font-size: 15px; }

/* ══════════════════════════════════════════════
   标题区域
   ══════════════════════════════════════════════ */

.section-heading { margin-bottom: 24px; }
.section-heading h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: 4px; }
.section-heading p { color: var(--ink-4); font-size: 14px; }

/* ══════════════════════════════════════════════
   分页
   ══════════════════════════════════════════════ */

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; }

.pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-4);
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); transition: all var(--fast);
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination a.active { color: #fff; background: var(--primary); border-color: var(--primary); }

/* ══════════════════════════════════════════════
   公告
   ══════════════════════════════════════════════ */

.announcement-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
  color: #fff; font-size: 13px; font-weight: 500; text-align: center;
}
.announcement-bar .sep { opacity: .3; margin: 0 8px; }

/* ══════════════════════════════════════════════
   按钮系统
   ══════════════════════════════════════════════ */

.btn, .primary-button, .secondary-button, .download-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px;
  font-size: 13px; font-weight: 600;
  border-radius: var(--radius); border: none;
  cursor: pointer; font-family: inherit;
  transition: all var(--base); white-space: nowrap; line-height: 1;
}

.primary-button, .download-link { color: #fff; background: var(--primary); box-shadow: var(--shadow-btn); }
.primary-button:hover, .download-link:hover { background: var(--primary-700); box-shadow: var(--shadow-btn-hover); transform: translateY(-1px); }

.secondary-button { color: var(--ink-3); background: var(--white); border: 1px solid var(--line); }
.secondary-button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.btn-lg { height: 44px; padding: 0 24px; font-size: 14px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }

/* ══════════════════════════════════════════════
   认证页面
   ══════════════════════════════════════════════ */

.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px); padding: 40px 20px;
  background: linear-gradient(135deg, var(--soft) 0%, var(--primary-50) 100%);
  position: relative; overflow: hidden;
}

.auth-page::before {
  content: ''; position: absolute;
  top: -30%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(5,150,105,0.06) 0%, transparent 60%);
  border-radius: 50%;
}

.auth-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 400px;
  padding: 32px 28px 24px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.8);
}

.auth-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.auth-card .subtitle { color: var(--ink-4); font-size: 14px; margin-bottom: 24px; }
.auth-card form { display: grid; gap: 14px; }

.auth-card .auth-link { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.auth-card .auth-link a { color: var(--primary); font-weight: 700; }

/* ══════════════════════════════════════════════
   详情页
   ══════════════════════════════════════════════ */

.detail-page { max-width: 1040px; margin: 0 auto; padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 60px); }

.detail-header {
  display: grid; grid-template-columns: 120px 1fr;
  gap: 28px; margin-bottom: 28px;
}

.detail-logo {
  width: 120px; height: 120px;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  border-radius: var(--radius-2xl);
  display: grid; place-items: center;
  color: #fff; font-size: 42px; font-weight: 800;
  overflow: hidden; position: relative;
  box-shadow: 0 8px 24px rgba(5,150,105,0.20);
}

.detail-logo img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }

.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--ink-4); margin: 8px 0; }
.detail-meta strong { color: var(--ink-3); font-weight: 600; }

.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.detail-tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--line); overflow-x: auto; }

.detail-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  color: var(--ink-4);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--fast); white-space: nowrap;
  background: none; cursor: pointer;
}
.detail-tab:hover { color: var(--ink-2); }
.detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.detail-tab-content { display: none; padding: 24px 0; }
.detail-tab-content.active { display: block; }

.version-item { display: flex; gap: 16px; padding: 14px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.version-item + .version-item { margin-top: -1px; border-radius: 0 0 var(--radius) var(--radius); }

.version-dot { width: 12px; height: 12px; margin-top: 5px; background: var(--primary-100); border: 2px solid var(--primary); border-radius: 50%; flex-shrink: 0; }

.review-card { padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.review-card + .review-card { margin-top: -1px; border-radius: 0 0 var(--radius) var(--radius); }

.review-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-card .author { display: flex; align-items: center; gap: 8px; }
.review-card .avatar { width: 28px; height: 28px; display: grid; place-items: center; background: var(--soft-2); color: var(--ink-4); font-weight: 600; font-size: 12px; border-radius: 50%; }

.stars { color: var(--accent); font-size: 14px; }

.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.screenshot-grid img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); transition: all var(--base); }
.screenshot-grid img:hover { box-shadow: var(--shadow-md); transform: scale(1.02); }

/* ══════════════════════════════════════════════
   管理后台
   ══════════════════════════════════════════════ */

.admin-hero { padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 60px) 20px; background: linear-gradient(135deg, var(--white), var(--soft)); border-bottom: 1px solid var(--line); }
.admin-hero h1 { font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; margin-bottom: 6px; }
.admin-hero p { color: var(--ink-4); font-size: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); text-align: center; }
.stat-card .num { font-size: 30px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-card .label { font-size: 13px; font-weight: 500; color: var(--muted); }

.manage-list { display: grid; gap: 8px; }
.manage-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: all var(--fast); }
.manage-item:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }

.editor-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); display: grid; gap: 16px; padding: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
fieldset { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
legend { padding: 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-4); }
fieldset label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; font-size: 14px; text-transform: none; color: var(--ink-3); cursor: pointer; }
fieldset input[type="checkbox"], fieldset input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════
   徽标 & 标签
   ══════════════════════════════════════════════ */

.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; font-size: 11px; font-weight: 700; border-radius: var(--radius-full); white-space: nowrap; }
.badge-approved, .badge-curated { background: var(--primary-50); color: var(--primary-700); }
.badge-pending { background: var(--accent-100); color: #92400e; }
.badge-rejected { background: var(--red-50); color: #991b1b; }
.badge-self { background: var(--blue-50); color: #1e40af; }
.badge-disabled { background: var(--soft-2); color: var(--muted); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; font-size: 12px; font-weight: 500; color: var(--ink-4); background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--radius-full); transition: all var(--fast); }
.tag:hover { border-color: var(--primary-200); color: var(--primary); background: var(--primary-50); }

.platform-badge { display: inline-flex; padding: 4px 12px; font-size: 12px; font-weight: 500; background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* ══════════════════════════════════════════════
   Footer & 工具类
   ══════════════════════════════════════════════ */

.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px clamp(20px, 4vw, 60px); color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: var(--white); }

.text-muted { color: var(--muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-center { text-align: center !important; }

.error-msg { color: var(--red); font-size: 14px; padding: 6px 0; display: none; }

code { padding: 2px 6px; font-size: 13px; background: var(--soft-2); border: 1px solid var(--line); border-radius: 4px; }

.section-wrap { padding: clamp(40px, 5vw, 64px) clamp(20px, 4vw, 60px); }

/* ══════════════════════════════════════════════
   响应式
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-panel { min-height: 300px; }
  .detail-header { grid-template-columns: 1fr; text-align: center; }
  .detail-logo { margin: 0 auto; }
}

@media (max-width: 720px) {
  .site-header { height: auto; padding: 10px 16px; gap: 8px; flex-wrap: wrap; }
  .top-nav { gap: 2px; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .top-nav a, .top-nav .nav-btn { font-size: 12px; padding: 4px 8px; }
  .brand span, .user-name { display: none; }
  .system-grid { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .manage-item { flex-direction: column; align-items: flex-start; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { flex-direction: column; gap: 6px; text-align: center; }
}

/* ── 角色选择卡片 ── */

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

.role-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px 14px;
  text-align: center;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--base);
}

.role-card:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
}

.role-card.selected {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.10);
}

.role-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-card .icon {
  font-size: 28px;
  line-height: 1;
}

.role-card .label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.role-card .desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.role-card .check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line);
  transition: all var(--base);
  font-size: 11px;
  color: transparent;
}

.role-card.selected .check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
