:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #2563eb;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f1f5f9;
  color: var(--ink);
}

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--bg);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 12px #38bdf8; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: #94a3b8; }

.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: block; padding: 9px 12px; border-radius: 8px;
  color: #cbd5e1; text-decoration: none; font-size: 14px;
}
.nav-item:hover { background: rgba(148, 163, 184, .15); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; font-weight: 600; }

.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(148,163,184,.2); }
.user-line { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }

.main { flex: 1; padding: 22px 28px 48px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.topbar h1 { font-size: 21px; margin: 0; font-weight: 700; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.card-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.card-kpi .label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.card-kpi .value { font-size: 24px; font-weight: 700; }
.card-kpi .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.panel h2 { font-size: 15px; margin: 0 0 14px; font-weight: 700; }

table.table { margin-bottom: 0; font-size: 14px; }
.table thead th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table td, .table th { vertical-align: middle; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-on { background: var(--ok); box-shadow: 0 0 8px rgba(22,163,74,.7); }
.dot-off { background: #94a3b8; }

.inline-form { display: inline; }
.row-actions form { display: inline; }
.row-actions .btn { margin-right: 4px; }

.bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #2563eb); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 20%, #1e293b, #0f172a 60%); }
.login-card { width: 380px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 20px 60px rgba(2,6,23,.45); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

.hint-inline { font-size: 12px; color: var(--muted); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #e0e7ff; color: #3730a3; }
.tag-off { background: #f1f5f9; color: #64748b; }

/* ==========================================================================
   公开下载页（模仿微信下载页结构：顶部导航 + 左文右图 + 平台切换 + 特性区）
   ========================================================================== */
.landing { background: #fff; min-height: 100vh; }

.landing-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #eef2f7;
}
.landing-nav-inner {
  max-width: 1120px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 24px; padding: 0 24px;
}
.landing-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #0f172a; }
.landing-brand img { width: 30px; height: 30px; border-radius: 7px; }
.landing-brand span { font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.landing-links { margin-left: auto; display: flex; gap: 24px; }
.landing-links a { color: #475569; font-size: 14px; text-decoration: none; }
.landing-links a:hover { color: #2563eb; }
.landing-login { border-radius: 999px; padding: 8px 22px; font-size: 14px; }

.hero { background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%); padding: 64px 0 56px; }
.hero-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.hero-badge {
  display: inline-block; margin-bottom: 14px;
  background: #dbeafe; color: #1d4ed8; border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; font-weight: 600;
}
.hero-title { font-size: 44px; line-height: 1.18; font-weight: 800; margin: 0 0 14px; letter-spacing: -.5px; }
.hero-sub { color: #64748b; font-size: 16px; margin: 0 0 28px; }

.platform-tabs { display: inline-flex; background: #eef2f7; border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 22px; }
.platform-tab {
  border: 0; background: transparent; padding: 8px 22px; border-radius: 999px;
  color: #475569; font-size: 14px; cursor: pointer; transition: all .15s ease;
}
.platform-tab:hover { color: #0f172a; }
.platform-tab.active { background: #fff; color: #0f172a; font-weight: 600; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }

.platform-pane { display: none; }
.platform-pane.active { display: block; }

.dl-main {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  background: #2563eb; color: #fff; border-radius: 12px; padding: 14px 30px;
  text-decoration: none; box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
  transition: transform .12s ease, background .12s ease;
}
.dl-main:hover { background: #1d4ed8; color: #fff; transform: translateY(-1px); }
.dl-main-text { font-size: 17px; font-weight: 700; }
.dl-main-meta { font-size: 12px; opacity: .85; margin-top: 3px; }

.dl-hint { color: #64748b; font-size: 13px; margin: 14px 0 0; }
.dl-others { font-size: 13px; color: #64748b; margin: 8px 0 0; }
.dl-others a { color: #2563eb; margin-left: 8px; text-decoration: none; }
.dl-empty {
  background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa;
  padding: 12px 16px; border-radius: 10px; font-size: 14px;
}
.hero-note { margin-top: 26px; color: #94a3b8; font-size: 12.5px; line-height: 1.75; max-width: 540px; }

.hero-shot .shot-frame {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 10px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .14);
}
.hero-shot img { width: 100%; display: block; border-radius: 10px; }

.features { padding: 56px 0 40px; background: #fff; }
.features-title { text-align: center; font-size: 26px; font-weight: 800; margin: 0 0 34px; }
.feature-grid { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 16px; padding: 22px; }
.feature-icon {
  width: 38px; height: 38px; border-radius: 10px; background: #dbeafe; color: #1d4ed8;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px;
}
.feature h3 { font-size: 15px; margin: 0 0 8px; font-weight: 700; }
.feature p { font-size: 13px; color: #64748b; line-height: 1.75; margin: 0; }

.landing-footer { background: #0f172a; color: #cbd5e1; padding: 28px 0; margin-top: 24px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; }
.footer-brand img { width: 22px; height: 22px; border-radius: 6px; }
.footer-links { margin-left: auto; display: flex; gap: 18px; }
.footer-links a { color: #cbd5e1; font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-copy { width: 100%; margin-top: 12px; font-size: 12px; color: #94a3b8; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-title { font-size: 34px; }
  .hero-shot { order: -1; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .landing-links { display: none; }
}

.usage { padding: 20px 0 8px; background: #fff; }
.steps { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px 22px 20px; }
.step-no {
  position: absolute; top: -14px; left: 22px; width: 28px; height: 28px; border-radius: 50%;
  background: #2563eb; color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
}
.step h3 { font-size: 15px; margin: 8px 0 8px; font-weight: 700; }
.step p { font-size: 13px; color: #64748b; line-height: 1.75; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 仪表盘：图表布局 ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr);
  gap: 18px;
}
@media (max-width: 980px) {
  .dash-grid { grid-template-columns: 1fr; }
}
.chart-wrap { width: 100%; }
.chart { width: 100%; height: auto; display: block; }
.chart-axis { font-size: 11px; fill: #94a3b8; }
.donut-wrap { display: flex; justify-content: center; padding: 4px 0 6px; }
.donut { width: 168px; height: 168px; }
.donut-value { font-size: 30px; font-weight: 700; fill: var(--ink); }
.donut-label { font-size: 11px; fill: var(--muted); }

/* ---------- 客户端下载：卡片 ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.dl-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .16s ease, transform .16s ease;
}
.dl-card:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.dl-head { display: flex; align-items: center; gap: 12px; }
.dl-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  background: rgba(37, 99, 235, .08);
}
.dl-name { font-weight: 600; font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.dl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.dl-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
}
.dl-tag.alt { background: #f1f5f9; color: var(--muted); }
.dl-meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.dl-actions { margin-top: auto; display: flex; gap: 8px; align-items: center; padding-top: 4px; }

/* ---------- 落地页：服务端部署 ---------- */
.deploy { padding: 56px 0 40px; background: #f8fafc; border-top: 1px solid #eef2f7; }
.deploy-lead { text-align: center; color: #64748b; font-size: 14px; margin: -16px auto 26px; max-width: 760px; padding: 0 24px; }
.deploy-grid { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.deploy-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; }
.deploy-card h3 { font-size: 15px; margin: 0 0 6px; font-weight: 700; }
.deploy-card p { font-size: 13px; color: #64748b; line-height: 1.7; margin: 0 0 12px; }
.deploy-card pre {
  background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 14px 16px;
  font-size: 12px; line-height: 1.8; margin: 0; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.deploy-card pre .c { color: #94a3b8; }
.deploy-note { max-width: 1120px; margin: 18px auto 0; padding: 0 24px; color: #94a3b8; font-size: 12.5px; line-height: 1.75; }
@media (max-width: 760px) {
  .deploy { padding: 40px 0 24px; }
  .deploy-grid { grid-template-columns: 1fr; }
}
