:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-2: #20203a;
  --border: #2a2a4a;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --accent-blue: #6366f1;
  --accent-cyan: #22d3ee;
  --accent-purple: #a855f7;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --gradient-primary: linear-gradient(135deg, #6366f1, #22d3ee);
  --gradient-hero: linear-gradient(135deg, #0a0a0f 0%, #1a1a3e 50%, #0a0a0f 100%);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a4a; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--gradient-primary);
  display: grid; place-items: center; font-weight: 800; color: #fff; box-shadow: 0 0 18px rgba(99,102,241,.5);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.brand-name span { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-secondary); font-weight: 500; transition: .18s; font-size: 13.5px;
}
.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-item.active { background: var(--bg-card-2); color: #fff; box-shadow: inset 3px 0 0 var(--accent-cyan); }
.nav-item .ico { font-size: 16px; width: 20px; text-align: center; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-primary); display: grid; place-items: center; font-weight: 700; color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; border-bottom: 1px solid var(--border); display: flex; align-items: center;
  justify-content: space-between; padding: 0 26px; background: rgba(10,10,15,.7); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 18px; font-weight: 700; }
.content { padding: 26px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* 卡片 */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-4 { grid-template-columns: repeat(4,1fr); }
@media (max-width: 1000px){ .g-3,.g-4{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 680px){ .g-2,.g-3,.g-4{ grid-template-columns: 1fr;} .sidebar{ display:none;} }

/* 统计卡 */
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.stat::after { content:''; position:absolute; right:-20px; top:-20px; width:90px; height:90px; background: var(--gradient-primary); opacity:.12; border-radius:50%; }
.stat .label { color: var(--text-secondary); font-size: 12.5px; }
.stat .value { font-size: 26px; font-weight: 800; margin-top: 6px; }
.stat .value.grad { background: var(--gradient-primary); -webkit-background-clip:text; background-clip:text; color:transparent; }

/* 按钮 */
.btn { border: 1px solid var(--border); background: var(--bg-card-2); color: var(--text-primary); padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; transition: .16s; display: inline-flex; align-items: center; gap: 7px; }
.btn:hover { border-color: var(--accent-cyan); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--gradient-primary); border: none; color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,.35); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(99,102,241,.5); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-danger { color: var(--accent-red); border-color: rgba(239,68,68,.4); }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-primary);
  padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-family: inherit; transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.15); }
.textarea { min-height: 96px; resize: vertical; }

/* 徽章 */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--border); color: var(--text-secondary); }
.badge.green { color: var(--accent-green); border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.08); }
.badge.blue { color: var(--accent-cyan); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.08); }
.badge.orange { color: var(--accent-orange); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.08); }
.badge.red { color: var(--accent-red); border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.08); }
.badge.purple { color: var(--accent-purple); border-color: rgba(168,85,247,.4); background: rgba(168,85,247,.08); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--text-secondary); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.table tr:hover td { background: rgba(255,255,255,.02); }

/* 进度 */
.progress { height: 9px; background: var(--bg-secondary); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gradient-primary); width: 0; transition: width .3s; box-shadow: 0 0 12px rgba(34,211,238,.6); }

/* 模态 */
.modal-mask { position: fixed; inset: 0; background: rgba(5,5,10,.7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 480px; padding: 24px; box-shadow: var(--shadow); animation: pop .2s ease; max-height: 88vh; overflow: auto; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 17px; margin-bottom: 16px; }

/* 杂项 */
.hero { background: var(--gradient-hero); border: 1px solid var(--border); border-radius: 18px; padding: 40px; position: relative; overflow: hidden; }
.hero h2 { font-size: 30px; font-weight: 800; line-height: 1.25; }
.hero p { color: var(--text-secondary); margin-top: 12px; max-width: 620px; }
.glow-text { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-secondary); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 16px; } .mt-2 { margin-top: 24px; } .mb { margin-bottom: 16px; }
.pill-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--bg-secondary); transition: .16s; cursor: pointer; }
.pill-card:hover { border-color: var(--accent-cyan); transform: translateY(-2px); }
.product { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: .16s; display: flex; flex-direction: column; }
.product:hover { border-color: var(--accent-purple); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(168,85,247,.15); }
.product .emoji { font-size: 30px; }
.price { font-size: 20px; font-weight: 800; color: var(--accent-cyan); }
.price small { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.section-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: .15s; }
.tab.active { background: var(--gradient-primary); color: #fff; border: none; }
.steps { display: flex; gap: 8px; margin-bottom: 20px; }
.step { flex: 1; text-align: center; padding: 10px; border-radius: 10px; border: 1px solid var(--border); font-size: 12.5px; color: var(--text-secondary); }
.step.active { border-color: var(--accent-cyan); color: var(--accent-cyan); background: rgba(34,211,238,.06); }
.step.done { border-color: var(--accent-green); color: var(--accent-green); }
.toast { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast .t { background: var(--bg-card-2); border: 1px solid var(--border); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); animation: pop .2s; max-width: 320px; }
.toast .t.ok { border-color: rgba(16,185,129,.5); }
.toast .t.err { border-color: rgba(239,68,68,.5); }
.empty { text-align: center; padding: 50px; color: var(--text-secondary); }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv:last-child { border: none; }
.section-head { display:flex; align-items:center; justify-content: space-between; margin-bottom: 16px; }
.section-head h3 { font-size: 16px; }
.palette-dot { width: 16px; height: 16px; border-radius: 4px; display: inline-block; margin-right: 5px; vertical-align: middle; border: 1px solid rgba(255,255,255,.2); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--bg-card-2); border: 1px solid var(--border); font-size: 11.5px; color: var(--text-secondary); margin: 2px; }
.ring { --p: 0; width: 110px; height: 110px; border-radius: 50%; background: conic-gradient(var(--accent-cyan) calc(var(--p)*1%), var(--bg-secondary) 0); display: grid; place-items: center; }
.ring > div { width: 84px; height: 84px; border-radius: 50%; background: var(--bg-card); display: grid; place-items: center; text-align: center; }
.hero-badges { display:flex; gap:10px; margin-top:18px; flex-wrap: wrap; }
.footer-note { text-align: center; color: var(--text-secondary); font-size: 12px; padding: 24px; }
