/* ============ 设计系统（对齐主流在线培训平台） ============ */
:root {
  --brand: #1d4ed8;
  --brand-dark: #1e40af;
  --brand-darker: #172554;
  --brand-soft: #e0e7ff;
  --accent: #f59e0b;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --card-border: #e2e8f0;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06), 0 1px 3px rgb(15 23 42 / .08);
  --shadow-md: 0 6px 16px rgb(15 23 42 / .10);
  --shadow-lg: 0 16px 40px rgb(15 23 42 / .16);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* ---- 导航 ---- */
.site-nav { background: #fff; box-shadow: var(--shadow-sm); }
.site-nav .navbar-brand { font-weight: 800; color: var(--brand-dark); font-size: 1.15rem; }
.site-nav .navbar-brand i { color: var(--brand); }
.site-nav .nav-link { color: #334155; font-weight: 500; border-radius: 8px; padding-inline: .75rem; }
.site-nav .nav-link:hover { color: var(--brand); background: #f1f5f9; }
.site-nav .nav-link.active { color: var(--brand); background: var(--brand-soft); }

/* ---- 按钮 ---- */
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-accent:hover { background: #d97706; border-color: #d97706; color: #fff; }

/* ---- 卡片 ---- */
.card { border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-hover { transition: transform .18s ease, box-shadow .18s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-header { background: #fff; border-bottom: 1px solid var(--card-border); font-weight: 600; }

/* ---- Hero 首屏 ---- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #172554 0%, #1e3a8a 45%, #1d4ed8 100%);
  border-radius: var(--radius-lg); padding: 3.2rem 2.2rem;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero .hero-body { position: relative; z-index: 1; }
.hero h1 { font-weight: 800; letter-spacing: .5px; }
.hero .lead { color: #dbeafe; max-width: 640px; }
.hero-stat { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: .6rem 1rem; }
.hero-stat .num { font-size: 1.4rem; font-weight: 800; }
.hero-stat .lbl { font-size: .8rem; color: #bfdbfe; }

/* ---- 期次卡片封面 ---- */
.sess-cover {
  height: 108px; border-radius: 12px 12px 0 0; color: #fff;
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  font-weight: 800; font-size: 1.35rem; letter-spacing: 2px;
}
.sess-cover::after {
  content: ""; position: absolute; inset: 0; opacity: .3;
  background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 16px 16px;
}
.sess-cover span { position: relative; z-index: 1; }
.grad-blue { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.grad-teal { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.grad-violet { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.grad-slate { background: linear-gradient(135deg, #334155, #64748b); }
.grad-amber { background: linear-gradient(135deg, #b45309, #f59e0b); }

/* ---- 徽章 ---- */
.badge-soft { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.badge-soft-green { background: #dcfce7; color: #15803d; font-weight: 600; }
.badge-soft-amber { background: #fef3c7; color: #b45309; font-weight: 600; }
.badge-soft-gray { background: #e2e8f0; color: #475569; font-weight: 600; }

/* ---- 步骤 ---- */
.step-circle {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; flex: none;
}

/* ---- 表格 ---- */
.table th { font-weight: 600; color: #334155; white-space: nowrap; }
.table td { vertical-align: middle; }

/* ---- 表单 ---- */
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgb(29 78 216 / .15); }
.form-label { font-weight: 600; color: #334155; }

/* ---- 页脚 ---- */
.site-footer { background: #0f172a; color: #cbd5e1; }
.site-footer h6 { color: #fff; font-weight: 700; }
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-brand { font-weight: 800; color: #fff; }

/* ---- 学员中心 ---- */
.pill-nav .nav-link { border-radius: 999px; padding-inline: 1rem; color: #475569; font-weight: 500; }
.pill-nav .nav-link.active { background: var(--brand); color: #fff; }
.todo-item { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 1rem; border: 1px solid var(--card-border); border-radius: 12px; background: #fff; }
.todo-item i { color: var(--brand); margin-top: .2rem; }

/* ---- 后台 ---- */
.stat-card { border-radius: var(--radius); }
.stat-card .icon-chip { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.admin-side .nav-link { border-radius: 8px; color: #334155; font-weight: 500; margin-bottom: 2px; }
.admin-side .nav-link:hover { background: #f1f5f9; color: var(--brand-dark); }
.admin-side .nav-link.active { background: var(--brand); color: #fff; font-weight: 600; }

/* ---- 其他 ---- */
.student-row .form-text { min-height: 1.4rem; }
.page-title { font-weight: 700; }
.text-muted-2 { color: var(--muted); }
a { color: var(--brand); }
.link-plain { text-decoration: none; }

.flex-none { flex: none; }

/* ---- 学员登记表页面 ---- */
.reg-doc { border: 1px solid var(--card-border); border-radius: var(--radius); }
.reg-doc .card-body { padding: 28px; }
.reg-title { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 14px; letter-spacing: 1px; }
.reg-sub { text-align: center; font-size: 13px; color: #475569; margin-bottom: 2px; }
.reg-sub strong { color: #0d6efd; }
.reg-table { width: 100%; border-collapse: collapse; font-size: 14px; color: #1e293b; }
.reg-table td { border: 1px solid #000; padding: 6px 10px; vertical-align: middle; }
.reg-table .lb { background: #f4f5f7; font-weight: 600; width: 100px; text-align: center; }
.reg-note { white-space: pre-line; margin: 0; }
.reg-photo { max-width: 110px; max-height: 150px; border: 1px solid #ccc; display: block; }
.reg-foot { text-align: right; margin-top: 10px; color: #555; font-size: 13px; }
.reg-check { white-space: nowrap; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
  main.container { max-width: 100% !important; padding: 0 !important; }
  .reg-doc { border: none !important; border-radius: 0 !important; box-shadow: none !important; }
  .reg-doc .card-body { padding: 0 !important; }
  .reg-table { font-size: 13px; }
  .reg-table td { padding: 4px 8px; }
}

/* 在线课程 */
.course-card { transition: transform .15s ease, box-shadow .15s ease; }
.course-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,23,42,.08); }
.course-cover-link { display: block; }
.course-cover { width: 100%; height: 150px; object-fit: cover; }
.course-cover-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#0d6efd,#6610f2); color: rgba(255,255,255,.85); font-size: 44px; }
.course-lesson { transition: background .12s ease; }
.course-lesson.active-lesson { background: #eef4ff; }
.lesson-done .lesson-title { color: #198754; }


/* ---- 移动端优化 ---- */
.todo-item a { display: inline-block; padding: .5rem .75rem; border-radius: 8px; }
@media (max-width: 767.98px) {
  .site-footer ul li a { display: inline-block; padding: .45rem 0; }
  .btn-sm { padding: .55rem 1rem; font-size: .95rem; }
  .btn { padding: .6rem 1.1rem; }
  .site-nav .nav-link { padding-block: .55rem; }
  .reg-doc { overflow-x: auto; }
  .reg-table { min-width: 620px; }
}

/* 姓名历史联想 */
.name-wrap { position: relative; }
.name-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1060;
  background: #fff; border: 1px solid var(--card-border); border-radius: 10px;
  box-shadow: var(--shadow-md); max-height: 260px; overflow-y: auto; display: none;
}
.name-suggest-item { padding: .55rem .8rem; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.name-suggest-item:last-child { border-bottom: none; }
.name-suggest-item:hover { background: var(--brand-soft); }
.name-suggest-item .sug-title { font-weight: 600; color: var(--ink); }
.name-suggest-item .sug-sub { font-size: .8rem; color: var(--muted); }
