/* ==========================================================================
   AI 招生获客中台 · 管理端 样式表
   风格基准：《UI风格参考》—— 专业可信 SaaS 风格
   浅灰底 + 白卡片 + 科技蓝渐变 + 大数字统计 + 数据驱动卡片 + 吸顶导航
   适配：PC 端宽屏 / 移动端单列堆叠
   ========================================================================== */

:root {
  /* 配色（严格对齐参考文档 2.1） */
  --bg: #F4F5F9;            /* 页面浅灰白底 */
  --card: #FFFFFF;          /* 卡片纯白 */
  --line: #E8EAF0;          /* 分隔线 */
  --pri: #0A84FF;           /* 主色 科技蓝 */
  --pri-d: #0064D2;         /* 主色 hover */
  --acc: #5856D6;           /* 辅色 靛蓝紫 */
  --danger: #FF3B30;        /* 警示红 */
  --ok: #34C759;            /* 成功绿 */
  --warn: #FF9500;
  --txt: #18181B;           /* 正文深灰 */
  --sub: #71717A;           /* 次级中灰 */

  /* 渐变 */
  --grad: linear-gradient(to right, #0A84FF, #5856D6);
  --grad-text: linear-gradient(135deg, #0A84FF, #5856D6);
  --divider: linear-gradient(to right, transparent, #0A84FF, transparent);

  /* 圆角与阴影 */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 16px;
  --r-pill: 9999px;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 132, 255, 0.08);
  --shadow-lg: 0 8px 24px rgba(10, 132, 255, 0.12);

  --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--txt);
  font: 14px/1.65 "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ==========================================================================
   1. 顶部提示条（浅色背景）
   ========================================================================== */
.notice {
  background: linear-gradient(to right, #EAF4FF, #F2F0FF);
  color: var(--sub);
  font-size: 12.5px;
  text-align: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.notice b { color: var(--pri); }

/* ==========================================================================
   2. 导航栏（白色 sticky 64px）
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--sub); white-space: nowrap; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who {
  font-size: 13px; color: var(--sub);
  background: #F1F5FB; border: 1px solid var(--line);
  padding: 5px 12px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.who b { color: var(--txt); }

/* ==========================================================================
   3. 按钮
   ========================================================================== */
button { cursor: pointer; border: none; font-family: inherit; transition: all .2s; }

.primary {
  background: var(--grad); color: #fff;
  padding: 10px 20px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; width: 100%;
}
.primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-sm {
  background: var(--grad); color: #fff;
  padding: 7px 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
}
.btn-sm:hover { filter: brightness(1.08); transform: translateY(-1px); }

.ghost {
  background: var(--card); color: var(--txt);
  border: 1px solid var(--line); padding: 7px 14px;
  border-radius: var(--r-sm); font-size: 13px;
}
.ghost:hover { border-color: var(--pri); color: var(--pri); }

/* ==========================================================================
   4. 主容器与卡片
   ========================================================================== */
main { max-width: 1200px; margin: 24px auto 56px; padding: 0 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  transition: all .3s;
}
.card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* 发光分隔线 */
.divider { height: 1px; background: var(--divider); margin: 28px 0; border: 0; }

/* ==========================================================================
   5. 登录页
   ========================================================================== */
/*修正：原写作 `.login .login-head`，而 HTML 用的是 `.login-wrap`（无 .login 类），
   导致登录页渐变大标题样式完全未生效。此处对齐真实类名。 */
.login-wrap { max-width: 440px; margin: 56px auto; }
.login-wrap .login-head { text-align: center; margin-bottom: 22px; }
.login-wrap .login-head h1 {
  font-size: 28px; font-weight: 700; margin-bottom: 6px;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-wrap .login-head p { font-size: 13px; color: var(--sub); }
.hint {
  color: var(--sub); font-size: 12.5px;
  background: #F7F9FC; border-left: 3px solid var(--pri);
  padding: 10px 12px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 18px;
}
.hint code {
  background: #EDF2F9; color: var(--pri);
  padding: 1px 5px; border-radius: 4px; font-size: 12px;
}

/* ==========================================================================
   6. 表单
   ========================================================================== */
label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--sub); }
input, select {
  display: block; width: 100%; margin-top: 6px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #FBFCFE; color: var(--txt);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus {
  outline: none; border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}
.err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 20px; }

/* ==========================================================================
   7. 标签导航（胶囊）
   ========================================================================== */
.tabs {
  display: flex; gap: 8px; margin-bottom: 20px;
  overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: var(--card); color: var(--sub);
  border: 1px solid var(--line);
  padding: 9px 18px; border-radius: var(--r-pill);
  font-size: 13.5px; white-space: nowrap; flex: none;
}
.tab:hover { color: var(--pri); border-color: var(--pri); }
.tab.active {
  background: var(--grad); color: #fff;
  border-color: transparent; font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   8. 统计卡（大数字 + 渐变）
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat { position: relative; overflow: hidden; }
.stat .k {
  color: var(--sub); font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.stat .v {
  font-size: 32px; font-weight: 700; line-height: 1.25; margin-top: 8px;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-all;
}
.stat .v.sm { font-size: 20px; }
.stat .foot { font-size: 12px; color: var(--sub); margin-top: 6px; }
.stat .ico {
  position: absolute; right: 14px; top: 14px;
  font-size: 20px; opacity: .5;
}

/* 区块标题 */
.sec-title {
  font-size: 18px; font-weight: 700; margin: 4px 0 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.sec-title .count {
  font-size: 12px; font-weight: 500; color: var(--sub);
  background: #F1F5FB; border-radius: var(--r-pill); padding: 2px 10px;
}

/* ==========================================================================
   9. 徽章 / 状态点
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--r-pill);
  padding: 3px 11px; font-size: 12px; font-weight: 500;
  background: #F1F5FB; color: var(--sub); white-space: nowrap;
}
.badge.ok { background: #F0FFF4; color: #1B7F3B; }
.badge.bad { background: #FFF1F0; color: #C62A20; }
.badge.warn { background: #FFF7ED; color: #B45309; }
.badge.info { background: #EAF4FF; color: var(--pri-d); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); flex: none;
  animation: pulse 1.5s infinite;
}
.status-dot.bad { background: var(--danger); animation: none; }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52, 199, 89, .5); }
  50% { opacity: .75; box-shadow: 0 0 0 5px rgba(52, 199, 89, 0); }
}

/* ==========================================================================
   10. 表格
   ========================================================================== */
.table-wrap {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
th {
  background: #F7F9FC; color: var(--sub);
  font-weight: 600; white-space: nowrap;
}
tbody tr { transition: background .15s; }
tbody tr:hover { background: #FAFCFF; }
tr:last-child td { border-bottom: none; }

.link {
  background: var(--grad); color: #fff;
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
}
.link:hover { filter: brightness(1.08); }
.link.danger { background: #FFF1F0; color: #C62A20; }
.link.danger:hover { background: var(--danger); color: #fff; }
.link-row { display: flex; gap: 6px; flex-wrap: wrap; }

.row { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin: 18px 0 0; }
.empty { text-align: center; color: var(--sub); padding: 40px 16px; font-size: 13px; }

/* ==========================================================================
   11. 弹窗
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 24, 27, .38);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-card {
  background: var(--card); border-radius: var(--r-lg);
  padding: 26px; width: 440px; max-width: 100%;
  max-height: 88vh; overflow-y: auto;
  animation: fadeUp .25s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}
.modal-card h3 { margin-bottom: 16px; font-size: 17px; font-weight: 700; }
.modal-card .primary, .modal-card .btn-sm { width: auto; }
.modal-card .btn-sm { padding: 8px 20px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%);
  z-index: 200; max-width: 88vw;
  background: #18181B; color: #fff;
  padding: 11px 20px; border-radius: var(--r-sm);
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  animation: fadeUp .2s ease;
}
.toast.err { background: var(--danger); }
.toast.ok { background: #1B7F3B; }

/* ==========================================================================
   12. 骨架屏 / 加载
   ========================================================================== */
.skeleton {
  height: 14px; border-radius: 6px;
  background: linear-gradient(90deg, #EEF1F6 25%, #F7F9FC 37%, #EEF1F6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ==========================================================================
   13.5 HERO 区（Canvas 粒子动效 + 渐变大标题）
   参考《UI风格参考》2.4 / 3.6：HERO 用 Canvas 绘制粒子动态背景
   ========================================================================== */
.hero {
  position: relative;
  border-radius: var(--r-lg);
  padding: 34px 28px 30px;
  margin-bottom: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #0A84FF 0%, #4A6CF0 45%, #5856D6 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(10, 132, 255, .22);
}
/* Canvas 铺底：绝对定位不占布局 */
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;   /* 不挡点击 */
  opacity: .55;
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 1.6px; font-weight: 600;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: 30px; font-weight: 700; line-height: 1.3;
  margin-bottom: 8px;
}
.hero .sub {
  font-size: 13.5px; line-height: 1.7;
  color: rgba(255, 255, 255, .88);
  max-width: 640px;
}
.hero-cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
/* 主CTA：白底蓝字（在蓝紫底上做反差，参考 3.2 次按钮规范） */
.hero-cta .btn-hero-primary {
  background: #fff; color: var(--pri-d);
  padding: 10px 22px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}
.hero-cta .btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.hero-cta .btn-hero-ghost {
  background: rgba(255, 255, 255, .14); color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  padding: 10px 22px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600;
}
.hero-cta .btn-hero-ghost:hover { background: rgba(255, 255, 255, .24); }

/* ==========================================================================
   13.6 流程步骤条（横向步骤，参考 2.4 流程步骤区）
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.step {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px;
  position: relative; transition: all .3s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #D6E4FF; }
.step .no {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  margin-bottom: 10px;
}
.step .t { font-size: 14.5px; font-weight: 600; margin-bottom: 5px; }
.step .d { font-size: 12px; color: var(--sub); line-height: 1.6; }

/* ==========================================================================
   13.7 CTA 转化区 + 页脚
   ========================================================================== */
.cta-band {
  background: linear-gradient(135deg, #0A84FF, #5856D6);
  border-radius: var(--r-lg);
  padding: 26px 24px; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  margin: 26px 0 18px;
}
.cta-band .cta-txt h3 { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.cta-band .cta-txt p { font-size: 13px; color: rgba(255, 255, 255, .86); }

.footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--sub);
}
.footer .f-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--sub); text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--pri); }

/* ==========================================================================
   14. 移动端适配（单列堆叠）
   ========================================================================== */
@media (max-width: 720px) {
  .notice { font-size: 11.5px; padding: 7px 12px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 14px; }
  .who { padding: 4px 10px; font-size: 12px; }
  main { padding: 0 14px; margin-top: 16px; }
  .card { padding: 18px; border-radius: var(--r-md); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat .v { font-size: 26px; }
  .stat .v.sm { font-size: 16px; }
  .login-wrap { margin: 28px auto; }

  /* 表格转卡片：避免移动端横向滚动 */
  .table-wrap { border: none; background: transparent; overflow: visible; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 12px;
  }
  tbody tr:hover { background: var(--card); }
  td {
    border: none; padding: 5px 0;
    display: flex; justify-content: space-between; gap: 14px;
    text-align: right;
  }
  td::before {
    content: attr(data-l);
    color: var(--sub); font-size: 12.5px; text-align: left; flex: none;
  }
  .link-row { justify-content: flex-end; }
  .modal-card { padding: 20px; }

  /* HERO 移动端：缩小标题与内边距 */
  .hero { padding: 26px 18px 24px; border-radius: var(--r-md); }
  .hero h1 { font-size: 22px; }
  .hero .sub { font-size: 12.5px; }
  .hero-cta .btn-hero-primary,
  .hero-cta .btn-hero-ghost { padding: 9px 16px; font-size: 12.5px; }

  /* 流程步骤：移动端纵向单列 */
  .steps { grid-template-columns: 1fr; gap: 10px; }

  .cta-band { padding: 20px 18px; }
  .cta-band .cta-txt h3 { font-size: 16px; }
  .footer { flex-direction: column; text-align: center; gap: 10px; }
  .footer .f-links { justify-content: center; gap: 14px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 20px; }
}