/* ============================================================
   视界矩阵 · 设计系统
   淡蓝灰底 + 白色大圆角卡片 / 主色 #2563EB / 强调 #8B5CF6
   ============================================================ */

:root {
  --bg: #edf3fd;
  --bg-soft: #f5f8ff;
  --card: #ffffff;
  --line: #e6edf9;
  --line-strong: #d8e3f4;

  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff5ff;
  --primary-100: #dbe9ff;
  --purple: #8b5cf6;
  --purple-50: #f4f0ff;

  --success: #10b981;
  --success-50: #e7f9f1;
  --warning: #f59e0b;
  --warning-50: #fef6e6;
  --danger: #ef4444;
  --danger-50: #fdecec;
  --cyan: #0ea5e9;

  /* tone 别名（供内联样式 var(--tone-50) 使用） */
  --blue: #2563eb;  --blue-50: #eff5ff;
  --green: #10b981; --green-50: #e7f9f1;
  --amber: #f59e0b; --amber-50: #fef6e6;
  --red: #ef4444;   --red-50: #fdecec;
  --cyan-50: #e5f6fe;

  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --shadow-1: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-2: 0 4px 16px rgba(37, 99, 235, .06);
  --shadow-3: 0 12px 40px rgba(37, 99, 235, .12);
  --shadow-blue: 0 6px 16px rgba(37, 99, 235, .28);

  --sidebar-w: 232px;
  --topbar-h: 66px;

  --font: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "Inter", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 13px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfdbee; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6c7e2; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.num { font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.muted { color: var(--ink-3); }
.tiny { font-size: 12px; }
.strong { font-weight: 600; color: var(--ink); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== 应用外壳 ===================== */
.app {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: var(--bg);
}

/* --------- 侧边栏 --------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 20px;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .32);
  flex: 0 0 32px;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.brand-sub { font-size: 11px; color: var(--ink-4); letter-spacing: .5px; }

.nav-group { margin-bottom: 14px; }
.nav-label {
  font-size: 11px;
  color: var(--ink-4);
  padding: 6px 12px;
  letter-spacing: .8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 13.5px;
  margin-bottom: 2px;
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-item svg { flex: 0 0 18px; opacity: .85; }
.nav-item:hover { background: var(--primary-50); color: var(--primary); }
.nav-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-blue);
}
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: grid; place-items: center;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .26); }

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(140deg, #eef4ff, #f6f1ff);
  border: 1px solid #e3ecff;
}
.sidebar-foot .t { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.sidebar-foot .d { font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }
.sidebar-foot .bar {
  height: 5px; border-radius: 3px; background: #dbe7ff; margin: 9px 0 6px; overflow: hidden;
}
.sidebar-foot .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #2563eb, #8b5cf6); }

/* --------- 深色侧边栏（管理端） --------- */
.sidebar.dark {
  background: #0f172a;
  border-right-color: #16233c;
}
.sidebar.dark .brand-name { color: #f8fafc; }
.sidebar.dark .brand-sub { color: #64748b; }
.sidebar.dark .brand-mark { background: linear-gradient(135deg, #38bdf8, #8b5cf6); box-shadow: 0 4px 14px rgba(56, 189, 248, .3); }
.sidebar.dark .nav-label { color: #475569; }
.sidebar.dark .nav-item { color: #94a3b8; }
.sidebar.dark .nav-item:hover { background: rgba(56, 189, 248, .08); color: #e2e8f0; }
.sidebar.dark .nav-item.active {
  background: linear-gradient(100deg, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .42);
}
.sidebar.dark .sidebar-foot {
  background: rgba(56, 189, 248, .07);
  border-color: rgba(56, 189, 248, .14);
}
.sidebar.dark .sidebar-foot .t { color: #e2e8f0; }
.sidebar.dark .sidebar-foot .d { color: #7f8ea8; }
.sidebar.dark .sidebar-foot .bar { background: rgba(56, 189, 248, .16); }

/* --------- 右侧列 --------- */
.main-col {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* --------- 顶栏 --------- */
.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
}
.topbar h1 { font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -.2px; }
.topbar .sub { font-size: 12px; color: var(--ink-4); margin-top: 1px; }
.topbar-spacer { flex: 1 1 auto; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  width: 260px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-4);
  font-size: 13px;
}
.search input { border: 0; background: transparent; outline: none; width: 100%; color: var(--ink); }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-3);
  display: grid; place-items: center;
  cursor: pointer;
  position: relative;
  transition: .15s;
}
.icon-btn:hover { background: var(--primary-50); color: var(--primary); border-color: #dbe7ff; }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px #fff;
}

.userchip {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: .15s;
}
.userchip:hover { border-color: #dbe7ff; background: var(--primary-50); }
.userchip .meta { line-height: 1.2; }
.userchip .meta .n { font-size: 12.5px; font-weight: 600; }
.userchip .meta .r { font-size: 11px; color: var(--ink-4); }

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  color: #fff;
  flex: 0 0 auto;
  letter-spacing: 0;
}

/* --------- 内容区 --------- */
.content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 26px 30px;
}
.content.flush { padding: 0; }

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.page-head .grow { flex: 1 1 auto; min-width: 0; }
.page-head h2 { font-size: 20px; font-weight: 700; margin: 0 0 3px; letter-spacing: -.3px; }
.page-head p { margin: 0; font-size: 12.5px; color: var(--ink-3); }

/* ===================== 卡片 ===================== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card.pad { padding: 18px 20px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
}
.card-head .t { font-size: 14px; font-weight: 650; }
.card-head .s { font-size: 12px; color: var(--ink-4); }
.card-head .spacer { flex: 1 1 auto; }
.card-body { padding: 0 20px 18px; }
.card-body.flush { padding: 0 0 4px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

/* ===================== KPI ===================== */
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.kpi .lab { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 700; letter-spacing: -.8px; margin: 8px 0 6px; }
.kpi .val small { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.kpi .foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-4); }
.kpi .ico {
  position: absolute; right: 14px; top: 14px;
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
}
.kpi.hl {
  background: linear-gradient(135deg, #2563eb, #4f46e5 55%, #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .28);
}
.kpi.hl .lab { color: rgba(255, 255, 255, .78); }
.kpi.hl .foot { color: rgba(255, 255, 255, .8); }
.kpi.hl .val small { color: rgba(255, 255, 255, .72); }
.kpi.hl .ico { background: rgba(255, 255, 255, .16); color: #fff; }

.delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 999px;
}
.delta.up { color: #059669; background: var(--success-50); }
.delta.down { color: #dc2626; background: var(--danger-50); }
.kpi.hl .delta.up { color: #eafff6; background: rgba(255, 255, 255, .2); }

/* ===================== 徽章 ===================== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 500;
  white-space: nowrap;
}
.badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: .85;
}
.badge.plain::before { display: none; }
.badge.gray { color: #475569; background: #f1f5f9; }
.badge.blue { color: #1d4ed8; background: #e8f0ff; }
.badge.green { color: #047857; background: #e7f9f1; }
.badge.amber { color: #b45309; background: #fef6e6; }
.badge.red { color: #b91c1c; background: #fdecec; }
.badge.purple { color: #6d28d9; background: #f2ecff; }
.badge.cyan { color: #0369a1; background: #e5f6fe; }

/* ===================== 按钮 ===================== */
.btn {
  height: 34px; padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #c3d6f5; background: #f8fbff; }
.btn.primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .26);
}
.btn.primary:hover { background: var(--primary-600); }
.btn.purple { background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: 0 4px 12px rgba(139, 92, 246, .26); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn.ghost:hover { background: var(--primary-50); color: var(--primary); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.lg { height: 44px; padding: 0 22px; font-size: 14.5px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===================== 表格 ===================== */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  background: #f7fafd;
  padding: 11px 12px;
  white-space: nowrap;
}
.tbl th:first-child { border-radius: 8px 0 0 8px; padding-left: 14px; }
.tbl th:last-child { border-radius: 0 8px 8px 0; }
.tbl td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5fb;
  vertical-align: middle;
}
.tbl td:first-child { padding-left: 14px; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: #fafcff; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }

.cellmain { font-weight: 550; color: var(--ink); }
.cellsub { font-size: 11.5px; color: var(--ink-4); margin-top: 1px; }

/* ===================== 其他小组件 ===================== */
.progress { height: 6px; border-radius: 4px; background: #eaf1fd; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.progress.green i { background: var(--success); }
.progress.amber i { background: var(--warning); }
.progress.purple i { background: var(--purple); }

.tabs { display: flex; gap: 4px; background: #f4f8fe; padding: 4px; border-radius: 10px; }
.tab {
  padding: 6px 13px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-3);
  cursor: pointer; white-space: nowrap; border: 0; background: transparent;
}
.tab:hover { color: var(--primary); }
.tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-1); }

.pill-list { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff;
  font-size: 12.5px; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.pill.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f1f5fb; }
.li:last-child { border-bottom: 0; }
.li .t { font-size: 13px; }
.li .s { font-size: 11.5px; color: var(--ink-4); }

.chip-ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; flex: 0 0 34px;
}

.dotline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.dotline i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

.statline { display: flex; align-items: baseline; gap: 6px; }
.statline .v { font-size: 22px; font-weight: 700; letter-spacing: -.6px; }

.empty { padding: 40px; text-align: center; color: var(--ink-4); font-size: 13px; }

/* 输入控件 */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.input, .select, .textarea {
  height: 38px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; color: var(--ink); outline: none;
  transition: .15s; width: 100%;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.hint { font-size: 11.5px; color: var(--ink-4); }

.switch {
  width: 38px; height: 22px; border-radius: 999px; background: #dbe4f2;
  position: relative; cursor: pointer; flex: 0 0 38px; transition: .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .2); transition: .2s;
}
.switch.on { background: var(--primary); }
.switch.on::after { left: 19px; }

/* ===================== 图表 ===================== */
.chart { width: 100%; display: block; overflow: visible; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #7aa7ff, #2563eb); }
.bars .b span { font-size: 11px; color: var(--ink-4); }

.donut-wrap { display: flex; align-items: center; gap: 18px; }

/* ===================== 登录页 ===================== */
.auth {
  min-height: 100vh; width: 100vw;
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: #fff; overflow: hidden;
}
.auth-hero {
  position: relative;
  background: radial-gradient(1200px 600px at 10% 10%, #1e40af 0%, transparent 55%),
              radial-gradient(900px 700px at 90% 90%, #7c3aed 0%, transparent 55%),
              #0b1224;
  color: #fff;
  padding: 54px 56px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.auth-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 30% 20%, #000, transparent 72%);
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h2 { font-size: 34px; line-height: 1.28; letter-spacing: -1px; margin: 0 0 14px; font-weight: 700; }
.auth-hero p { color: rgba(255,255,255,.7); font-size: 14px; max-width: 420px; line-height: 1.75; }
.auth-hero .feats { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.auth-hero .feat { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: rgba(255,255,255,.86); }
.auth-hero .feat .k { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.1); display: grid; place-items: center; flex: 0 0 26px; }
.auth-hero .glass {
  margin-top: auto;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 16px 18px;
  backdrop-filter: blur(8px);
  display: flex; gap: 26px;
}
.auth-hero .glass .n { font-size: 20px; font-weight: 700; }
.auth-hero .glass .l { font-size: 11.5px; color: rgba(255,255,255,.6); }

.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px; background: #fff;
}
.auth-form { width: 100%; max-width: 356px; }
.auth-form h3 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.4px; }
.auth-form .lead { font-size: 13px; color: var(--ink-3); margin: 0 0 26px; }

.otp { display: flex; gap: 10px; }
.otp input {
  width: 100%; height: 54px; text-align: center;
  font-size: 22px; font-weight: 600;
  border: 1px solid var(--line-strong); border-radius: 12px; outline: none;
  color: var(--ink); background: #fff;
}
.otp input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* ===================== 官网 ===================== */
.site {
  height: 100vh; overflow-y: auto; background: #fff; color: var(--ink);
}
.site-nav {
  position: sticky; top: 0; z-index: 50;
  height: 68px;
  display: flex; align-items: center; gap: 32px;
  padding: 0 48px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 237, 249, .9);
}
.site-nav .links { display: flex; gap: 26px; }
.site-nav .links a { font-size: 13.5px; color: var(--ink-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav .links a:hover, .site-nav .links a.on { color: var(--primary); border-bottom-color: var(--primary); }
.site-nav .spacer { flex: 1 1 auto; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 48px; }
.wrap.narrow { max-width: 860px; }

.hero {
  position: relative;
  padding: 84px 0 96px;
  overflow: hidden;
  background: radial-gradient(900px 420px at 12% 0%, #e8f0ff 0%, transparent 60%),
              radial-gradient(800px 420px at 88% 12%, #f2ecff 0%, transparent 58%),
              #fff;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(37, 99, 235, .055) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(37, 99, 235, .055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 24%, #000, transparent 74%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: #fff; border: 1px solid #dbe7ff;
  font-size: 12px; color: var(--primary); font-weight: 500;
  box-shadow: var(--shadow-1);
}
.hero h1 {
  font-size: 54px; line-height: 1.15; letter-spacing: -1.6px;
  margin: 22px 0 18px; font-weight: 700; max-width: 780px;
}
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #2563eb, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 16px; color: var(--ink-3); line-height: 1.8; max-width: 600px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-note { font-size: 12px; color: var(--ink-4); }

.hero-shot {
  margin-top: 56px;
  border-radius: 20px;
  border: 1px solid #e2ecfb;
  background: #fff;
  box-shadow: 0 30px 80px rgba(37, 99, 235, .16), 0 2px 8px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.hero-shot .bar {
  height: 38px; background: #f8fbff; border-bottom: 1px solid #eef4fd;
  display: flex; align-items: center; gap: 6px; padding: 0 14px;
}
.hero-shot .bar i { width: 9px; height: 9px; border-radius: 50%; background: #dbe4f2; }
.hero-shot .body { display: flex; height: 380px; }
.hero-shot .sb { width: 176px; border-right: 1px solid #eef4fd; background: #fbfdff; padding: 14px 10px; }
.hero-shot .sb div { height: 30px; border-radius: 8px; background: #eff4fc; margin-bottom: 6px; }
.hero-shot .sb div:first-child { background: #2563eb; opacity: .9; width: 100%; }
.hero-shot .mn { flex: 1; padding: 18px; background: #edf3fd; }
.hero-shot .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.hero-shot .kpis i { display: block; height: 62px; background: #fff; border-radius: 12px; border: 1px solid #e6edf9; }
.hero-shot .kpis i:first-child { background: linear-gradient(135deg, #2563eb, #8b5cf6); border: 0; }
.hero-shot .panel { height: 190px; background: #fff; border-radius: 12px; border: 1px solid #e6edf9; }

.section { padding: 88px 0; }
.section.soft { background: var(--bg-soft); }
.section.dark { background: #0b1224; color: #fff; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .tag { font-size: 12px; font-weight: 600; color: var(--primary); letter-spacing: 1.4px; text-transform: uppercase; }
.section-head h2 { font-size: 34px; letter-spacing: -1px; margin: 10px 0 12px; font-weight: 700; }
.section-head p { color: var(--ink-3); font-size: 14.5px; line-height: 1.8; margin: 0; }
.section.dark .section-head p { color: rgba(255,255,255,.62); }
.section.dark .section-head h2 { color: #fff; }

.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; transition: .2s; height: 100%;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); border-color: #d8e7ff; }
.feature .fi {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--primary-50); color: var(--primary);
}
.feature .fi.purple { background: var(--purple-50); color: var(--purple); }
.feature .fi.green { background: var(--success-50); color: #059669; }
.feature .fi.amber { background: var(--warning-50); color: #b45309; }
.feature h3 { font-size: 15.5px; margin: 0 0 8px; }
.feature p { font-size: 13px; color: var(--ink-3); line-height: 1.75; margin: 0; }

.price {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 28px 26px; display: flex; flex-direction: column; height: 100%;
  position: relative;
}
.price.hot { border-color: transparent; box-shadow: 0 20px 48px rgba(37, 99, 235, .18); }
.price.hot::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 2px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.price .taghot {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(100deg, #2563eb, #8b5cf6); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 3px 12px; border-radius: 999px;
  white-space: nowrap;
}
.price h3 { font-size: 16px; margin: 0 0 4px; }
.price .desc { font-size: 12.5px; color: var(--ink-4); min-height: 36px; }
.price .amount { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 4px; }
.price .amount .cur { font-size: 18px; font-weight: 600; }
.price .amount .n { font-size: 40px; font-weight: 700; letter-spacing: -1.6px; line-height: 1; }
.price .amount .per { font-size: 12.5px; color: var(--ink-4); }
.price ul { list-style: none; padding: 0; margin: 18px 0 22px; display: flex; flex-direction: column; gap: 10px; }
.price li { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.price li svg { flex: 0 0 15px; margin-top: 2px; color: var(--success); }
.price .btn { margin-top: auto; }

.site-foot { background: #0b1224; color: rgba(255,255,255,.6); padding: 56px 0 28px; }
.site-foot .cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.site-foot h4 { color: #fff; font-size: 13px; margin: 0 0 14px; }
.site-foot a { display: block; font-size: 12.5px; padding: 5px 0; color: rgba(255,255,255,.56); }
.site-foot a:hover { color: #fff; }
.site-foot .bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; gap: 16px; font-size: 12px; color: rgba(255,255,255,.4); flex-wrap: wrap;
}

.post {
  display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.post:hover .pt { color: var(--primary); }
.post .thumb {
  width: 168px; height: 104px; border-radius: 12px; flex: 0 0 168px;
  background: linear-gradient(135deg, #dbe9ff, #efe7ff);
  display: grid; place-items: center; color: #7c9ade; font-size: 11px;
}
.post .pt { font-size: 15.5px; font-weight: 600; margin: 2px 0 6px; transition: .15s; }
.post .pd { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

.legal h3 { font-size: 16px; margin: 30px 0 10px; }
.legal p, .legal li { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; }
.legal ul { padding-left: 20px; }

.faq { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; }
.faq .q { font-size: 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.faq .a { font-size: 13px; color: var(--ink-3); line-height: 1.8; margin-top: 8px; padding-left: 26px; }

/* ===================== 收件箱三栏 ===================== */
.inbox { display: grid; grid-template-columns: 300px 1fr 300px; height: calc(100vh - var(--topbar-h)); }
.inbox .lcol, .inbox .rcol { background: #fff; overflow-y: auto; }
.inbox .lcol { border-right: 1px solid var(--line); }
.inbox .rcol { border-left: 1px solid var(--line); }
.inbox .mid { background: var(--bg); display: flex; flex-direction: column; min-width: 0; }
.conv-item {
  display: flex; gap: 10px; padding: 12px 14px; cursor: pointer;
  border-bottom: 1px solid #f4f8fd;
}
.conv-item:hover { background: #f8fbff; }
.conv-item.on { background: #eff5ff; box-shadow: inset 3px 0 0 var(--primary); }
.conv-item .cbody { flex: 1; min-width: 0; }
.conv-item .ct { display: flex; gap: 6px; align-items: center; }
.conv-item .ct b { font-size: 13px; font-weight: 550; }
.conv-item .msg { font-size: 12px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

.bubbles { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 74%; display: flex; gap: 8px; }
.bubble .bwrap { background: #fff; border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 10px 13px; font-size: 13px; line-height: 1.65; }
.bubble.me { margin-left: auto; flex-direction: row-reverse; }
.bubble.me .bwrap { background: var(--primary); color: #fff; border-color: var(--primary); border-radius: 12px 4px 12px 12px; }
.bubble .who { font-size: 11px; color: var(--ink-4); margin-bottom: 3px; }
.composer { border-top: 1px solid var(--line); background: #fff; padding: 12px 16px; display: flex; gap: 10px; align-items: flex-end; }

/* ===================== 响应式 ===================== */
@media (max-width: 1400px) {
  .g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1360px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2, .g-3-2 { grid-template-columns: minmax(0, 1fr); }
  .inbox { grid-template-columns: 260px 1fr; }
  .inbox .rcol { display: none; }
}
@media (max-width: 1080px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 40px; }
  .site-nav { padding: 0 24px; gap: 16px; }
  .site-nav .links { display: none; }
  .wrap { padding: 0 24px; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
