/* ===== 灵创AI智学堂 · 平台样式 ===== */
:root {
  --navy: #29344e;
  --navy-2: #34405e;
  --brand: #2f5bd7;
  --brand-soft: #eaf0ff;
  --accent: #ff8c1a;
  --accent-soft: #fff4e6;
  --ok: #12b76a;
  --ok-soft: #e7f8f0;
  --warn: #f79009;
  --warn-soft: #fff6e8;
  --danger: #e5484d;
  --danger-soft: #fdeeee;
  --text: #1d2939;
  --text-2: #475467;
  --text-3: #98a2b3;
  --line: #e6eaf1;
  --line-2: #eef1f6;
  --bg: #f4f6fa;
  --white: #fff;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 8px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.ic { flex: none; vertical-align: -3px; }
.muted { color: var(--text-3); font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.no-scroll { overflow: hidden; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d3dae6; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c4d6; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 顶栏 ===== */
.topbar {
  height: 58px; background: linear-gradient(90deg, #232d45 0%, #33405e 100%);
  display: flex; align-items: center; padding: 0 20px; gap: 26px;
  position: sticky; top: 0; z-index: 60; color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-badge {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, #ff9d3c, #ff7a00); font-weight: 700; font-size: 16px;
  box-shadow: 0 2px 8px rgba(255, 138, 26, .38); color: #fff;
}
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: .4px; white-space: nowrap; }
.brand-name b { color: #ffb057; font-weight: 700; }
.brand-name small { font-size: 10px; opacity: .55; display: block; font-weight: 400; letter-spacing: 1.4px; line-height: 1; }

.mod-switch { display: flex; gap: 4px; }
.mod-switch a {
  padding: 7px 16px; border-radius: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .72);
  transition: .18s; white-space: nowrap;
}
.mod-switch a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.mod-switch a.active { color: #fff; background: rgba(255, 255, 255, .16); font-weight: 600; }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tb-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: rgba(255, 255, 255, .78);
  display: grid; place-items: center; cursor: pointer; position: relative; transition: .15s;
}
.tb-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.tb-btn .dot-badge { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; background: #ff6a3d; border-radius: 50%; border: 1.5px solid #2b3550; }
.tb-user { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 20px; cursor: pointer; }
.tb-user:hover { background: rgba(255, 255, 255, .1); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff9d3c, #ff7a00);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff;
}
.tb-user span { font-size: 13px; }

/* ===== 布局 ===== */
.shell { display: flex; min-height: calc(100vh - 58px); align-items: stretch; }
.sidebar {
  width: 208px; flex: none; background: #fff; border-right: 1px solid var(--line);
  padding: 16px 12px 24px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto;
}
.side-group { margin-bottom: 18px; }
.side-title { font-size: 11px; color: var(--text-3); padding: 6px 10px; letter-spacing: .8px; font-weight: 600; }
.sidebar li a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--text-2); font-size: 13.5px; margin-bottom: 2px; transition: .15s; cursor: pointer;
}
.sidebar li a:hover { background: #f4f7fc; color: var(--text); }
.sidebar li a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sidebar li a .ic { opacity: .85; }
.sidebar li a.active .ic { opacity: 1; }
.side-foot { margin-top: 24px; padding: 12px 10px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--text-3); }

.main { flex: 1; min-width: 0; padding: 22px 26px 44px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 650; letter-spacing: -.2px; }
.page-head .sub { color: var(--text-3); font-size: 13px; margin-top: 3px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ===== 按钮 ===== */
.btn {
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #cfd8e6; color: var(--text); background: #fbfcfe; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.btn.primary:hover { background: #2549b8; border-color: #2549b8; }
.btn.accent { background: linear-gradient(135deg, #ff9d3c, #ff7a00); border-color: #ff8c1a; color: #fff; font-weight: 500; box-shadow: 0 2px 8px rgba(255, 138, 26, .25); }
.btn.accent:hover { filter: brightness(1.04); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: #f2f5fa; }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #cf3b40; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.btn.lg { height: 42px; padding: 0 22px; font-size: 14.5px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; justify-content: center; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--text-3);
  display: grid; place-items: center; cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: #f2f5fa; color: var(--text); }

/* ===== 卡片 / 网格 ===== */
.card { background: #fff; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 14.5px; font-weight: 600; }
.card-head .hint { font-size: 12px; color: var(--text-3); }
.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)); }

/* ===== 指标卡 ===== */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .k-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.kpi .k-val { font-size: 25px; font-weight: 680; letter-spacing: -.6px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.kpi .k-val small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.kpi .k-foot { font-size: 11.5px; color: var(--text-3); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.kpi .k-trend { font-weight: 600; }
.up { color: #e5484d; }   /* 涨用红 */
.down { color: #12b76a; } /* 跌用绿 */
.kpi::after { content: ""; position: absolute; right: -24px; top: -24px; width: 70px; height: 70px; border-radius: 50%; background: var(--brand-soft); opacity: .55; }
.kpi.acc::after { background: var(--accent-soft); }

/* ===== 筛选栏 ===== */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.field { display: flex; align-items: center; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.input, .select {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 13px; outline: none; transition: .15s; min-width: 0;
}
.input:focus, .select:focus { border-color: #9db4ec; box-shadow: 0 0 0 3px rgba(47, 91, 215, .1); }
.input.search { padding-left: 32px; }
.search-wrap { position: relative; }
.search-wrap .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.select { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%2398a2b3' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.toolbar .spacer { flex: 1; }

/* ===== 表格 ===== */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: auto; }
table.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 760px; }
table.tb thead th {
  background: #f8fafc; color: var(--text-2); font-weight: 600; font-size: 12.5px; text-align: left;
  padding: 11px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.tb tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb tbody tr:hover { background: #f9fbff; }
table.tb tbody tr:last-child td { border-bottom: 0; }
table.tb tfoot td { padding: 11px 14px; background: #f8fafc; font-weight: 600; border-top: 1px solid var(--line); }
table.tb .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tb .center { text-align: center; }
table.tb th.sortable { cursor: pointer; user-select: none; }
table.tb th.sortable:hover { color: var(--brand); }
.tb-title { font-weight: 550; color: var(--text); }
.tb-sub { font-size: 11.5px; color: var(--text-3); }
.tb-actions { display: flex; gap: 2px; }

/* ===== 标签 ===== */
.tag {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 5px;
  font-size: 11.5px; font-weight: 500; background: #f2f4f7; color: var(--text-2); white-space: nowrap;
}
.tag.ok { background: var(--ok-soft); color: #087443; }
.tag.warn { background: var(--warn-soft); color: #b54708; }
.tag.danger { background: var(--danger-soft); color: #b42318; }
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.tag.gray { background: #f2f4f7; color: #667085; }
.tag.live { background: #fee4e2; color: #d92d20; }
.tag.live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #d92d20; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.tag.accent { background: var(--accent-soft); color: #b45309; }

/* ===== 课程卡 ===== */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }
.course-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; transition: .2s; display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16, 24, 40, .1); border-color: #d3ddec; }
.cc-cover { position: relative; aspect-ratio: 16/9; display: flex; align-items: flex-end; padding: 12px; }
.cc-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.42) 100%); }
.cc-badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.cc-cat { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(255,255,255,.92); color: #34405e; font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.cc-play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; opacity: 0; transition: .2s; }
.course-card:hover .cc-play { opacity: 1; }
.cc-play span { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; color: #29344e; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.cc-cover h4 { position: relative; z-index: 2; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.45; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.cc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-sub { font-size: 12.5px; color: var(--text-3); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.cc-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.cc-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: #d0d5dd; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.price { color: #e5484d; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { font-size: 12px; font-weight: 500; }
.price-old { color: var(--text-3); font-size: 12px; text-decoration: line-through; margin-left: 5px; }
.progress-line { height: 5px; border-radius: 3px; background: #eef1f6; overflow: hidden; }
.progress-line i { display: block; height: 100%; background: linear-gradient(90deg, #4f7fe0, #2f5bd7); border-radius: 3px; }

/* ===== 课程详情 ===== */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 18px; align-items: start; }
.player { position: relative; background: #0b1220; border-radius: var(--r); overflow: hidden; aspect-ratio: 16/9; }
.player video { width: 100%; height: 100%; display: block; background: #0b1220; object-fit: contain; }
.vp-cover { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; transition: .3s; }
.vp-cover.hide { opacity: 0; pointer-events: none; }
.vp-bigplay { width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: #1d2939; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.28); transition: .2s; padding-left: 4px; }
.vp-bigplay:hover { transform: scale(1.06); }
.vp-cover-title { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.9); font-size: 15px; font-weight: 600; padding: 0 20px; }
.vp-error { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #0b1220; color: #fff; text-align: center; padding: 20px; }
.vp-error.show { display: flex; }
.vp-error span { font-size: 12px; color: rgba(255,255,255,.6); max-width: 340px; }
.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px 8px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.72)); opacity: 1; }
.vp-seek { width: 100%; height: 16px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
.vp-seek::-webkit-slider-runnable-track { height: 4px; background: rgba(255,255,255,.28); border-radius: 3px; }
.vp-seek::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #ff8c1a; margin-top: -4px; box-shadow: 0 0 0 3px rgba(255,140,26,.24); }
.vp-ctrl { display: flex; align-items: center; gap: 6px; color: #fff; }
.vp-btn { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; border-radius: 4px; display: grid; place-items: center; }
.vp-btn:hover { background: rgba(255,255,255,.14); }
.vp-btn.vp-text { font-size: 12px; width: 42px; }
.vp-time { font-size: 11.5px; color: rgba(255,255,255,.82); font-variant-numeric: tabular-nums; }
.vp-spacer { flex: 1; }
.vp-vol { display: flex; align-items: center; gap: 2px; }
.vp-vol input { width: 64px; height: 3px; appearance: none; background: rgba(255,255,255,.3); border-radius: 2px; }
.vp-vol input::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.vp-title-bar { position: absolute; top: 0; left: 0; right: 0; padding: 10px 14px; color: #fff; font-size: 13px; display: flex; align-items: center; gap: 8px; background: linear-gradient(180deg, rgba(0,0,0,.5), transparent); pointer-events: none; }
.vp-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #ff8c1a; box-shadow: 0 0 0 3px rgba(255,140,26,.24); }
.player.buffering::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.lesson-list { max-height: 520px; overflow-y: auto; }
.lesson-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: .15s; }
.lesson-item:hover { background: #f8faff; }
.lesson-item.active { background: var(--brand-soft); }
.lesson-item.active .l-title { color: var(--brand); font-weight: 600; }
.l-idx { width: 20px; font-size: 12px; color: var(--text-3); text-align: center; flex: none; }
.l-body { flex: 1; min-width: 0; }
.l-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-meta { font-size: 11px; color: var(--text-3); display: flex; gap: 8px; margin-top: 1px; }
.l-state { font-size: 11px; color: var(--text-3); }
.buy-card { position: sticky; top: 78px; }
.buy-price { display: flex; align-items: baseline; gap: 8px; }
.buy-price .price { font-size: 30px; }
.buy-list { display: flex; flex-direction: column; gap: 9px; margin: 14px 0; }
.buy-list li { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.buy-list .ic { color: var(--ok); margin-top: 2px; }
.buy-teacher { display: flex; gap: 10px; padding: 12px; background: #f8fafc; border-radius: 10px; margin-top: 12px; }
.buy-teacher .avatar { width: 38px; height: 38px; font-size: 15px; }

/* ===== 直播 ===== */
.live-hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; }
.live-stage { position: relative; background: #0b1220; border-radius: var(--r); overflow: hidden; aspect-ratio: 16/9; }
.live-stage video { width: 100%; height: 100%; object-fit: contain; background: #0b1220; }
.live-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); z-index: 2; }
.live-badge { background: #e5484d; color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; display: flex; align-items: center; gap: 5px; }
.live-badge::before { content: ""; width: 5px; height: 5px; background: #fff; border-radius: 50%; animation: pulse 1.2s infinite; }
.live-top .viewer { margin-left: auto; color: #fff; font-size: 12px; background: rgba(0,0,0,.4); padding: 3px 9px; border-radius: 20px; }
.chat-box { display: flex; flex-direction: column; height: 100%; max-height: 420px; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.chat-item { font-size: 12.5px; line-height: 1.5; }
.chat-item b { color: var(--brand); font-weight: 500; }
.chat-item.sys { color: var(--text-3); font-size: 11.5px; text-align: center; background: #f8fafc; padding: 4px 8px; border-radius: 4px; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); }
.chat-input input { flex: 1; }

.live-card { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); transition: .15s; cursor: pointer; }
.live-card:hover { background: #f9fbff; }
.live-date { flex: none; width: 52px; text-align: center; border-radius: 8px; background: #f5f7fb; padding: 6px 0; }
.live-date b { display: block; font-size: 18px; line-height: 1.2; }
.live-date span { font-size: 11px; color: var(--text-3); }
.live-info { flex: 1; min-width: 0; }
.live-info h4 { font-size: 13.5px; font-weight: 550; margin-bottom: 3px; }
.live-info .m { font-size: 11.5px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 复盘时间轴 ===== */
.review-timeline { position: relative; padding-left: 22px; }
.review-timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.rt-item { position: relative; padding-bottom: 18px; }
.rt-item:last-child { padding-bottom: 0; }
.rt-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--brand); }
.rt-item.ok::before { border-color: var(--ok); }
.rt-item.warn::before { border-color: var(--warn); }
.rt-time { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rt-title { font-size: 13px; font-weight: 550; margin: 1px 0 2px; }
.rt-text { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }

/* ===== 看板 ===== */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kb-col { flex: none; width: 236px; background: #f7f9fc; border-radius: 10px; padding: 10px; min-height: 120px; border: 1px solid transparent; transition: .15s; }
.kb-col.drag-over { background: var(--brand-soft); border-color: #b9cdf7; }
.kb-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 9px; }
.kb-head span { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kb-head .cnt { font-size: 11px; background: #e8ecf3; color: var(--text-2); border-radius: 10px; padding: 0 7px; font-weight: 500; }
.kb-head .bar { width: 6px; height: 6px; border-radius: 50%; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: grab; transition: .15s; }
.kb-card:hover { border-color: #c9d6ea; box-shadow: 0 4px 12px rgba(16,24,40,.08); }
.kb-card.dragging { opacity: .45; }
.kb-card h5 { font-size: 13px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.kb-card .kc-meta { font-size: 11.5px; color: var(--text-3); display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }
.kb-amt { font-size: 13px; font-weight: 650; color: #b54708; }

/* ===== 时间线（跟进） ===== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -26px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); display: grid; place-items: center; color: var(--brand); }
.tl-dot.gray { border-color: #d0d5dd; color: var(--text-3); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-type { font-size: 12px; font-weight: 600; color: var(--text); }
.tl-time { font-size: 11.5px; color: var(--text-3); }
.tl-body { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.65; }
.tl-next { margin-top: 7px; background: #f8fafc; border-left: 2px solid var(--brand); padding: 6px 10px; border-radius: 0 6px 6px 0; font-size: 12px; color: var(--text-2); }

/* ===== 弹层 ===== */
.modal-mask, .drawer-mask { position: fixed; inset: 0; background: rgba(16, 24, 40, .46); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .16s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 14px; width: 520px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal.wide { width: 760px; }
.modal.slim { width: 400px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
.drawer-mask { justify-content: flex-end; padding: 0; }
.drawer { background: #fff; width: 480px; max-width: 94vw; height: 100%; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(16,24,40,.14); animation: slideIn .22s ease-out; }
.drawer.wide { width: 620px; }
@keyframes slideIn { from { transform: translateX(30px); opacity: .6; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.drawer-head h3 { font-size: 16px; font-weight: 600; }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-item { display: flex; flex-direction: column; gap: 5px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.form-item label .req { color: var(--danger); }
.form-item .input, .form-item .select, .form-item textarea { width: 100%; }
.form-item textarea { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 13px; outline: none; resize: vertical; min-height: 78px; }
.form-item textarea:focus { border-color: #9db4ec; box-shadow: 0 0 0 3px rgba(47,91,215,.1); }
.form-tip { font-size: 11.5px; color: var(--text-3); }

/* ===== Toast ===== */
.toast-box { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1d2939; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-8px); transition: .22s; max-width: 80vw; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { background: #087443; }
.toast.warn { background: #b54708; }

/* ===== 空状态 ===== */
.empty { padding: 46px 20px; text-align: center; color: var(--text-3); }
.empty-ic { width: 56px; height: 56px; border-radius: 50%; background: #f4f6fa; display: grid; place-items: center; margin: 0 auto 10px; color: #b9c2d0; }
.empty p { font-size: 13.5px; color: var(--text-2); }
.empty span { font-size: 12px; }

/* ===== 收银台 ===== */
.pay-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 18px; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: .15s; }
.pay-method:hover { border-color: #c3d2ee; }
.pay-method.active { border-color: var(--brand); background: #f7faff; }
.pm-logo { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #fff; flex: none; }
.pm-wx { background: #07c160; }
.pm-ali { background: #1677ff; }
.pm-balance { background: #ff8c1a; }
.pay-method .pm-name { font-size: 13.5px; font-weight: 500; }
.pay-method .pm-desc { font-size: 11.5px; color: var(--text-3); }
.qr-panel { text-align: center; padding: 10px; }
.qr-box { width: 180px; height: 180px; margin: 0 auto 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; }
.qr-box img, .qr-box canvas { width: 100%; height: 100%; display: block; }
.pay-amount { font-size: 30px; font-weight: 700; color: #e5484d; font-variant-numeric: tabular-nums; }
.pay-timer { font-size: 12px; color: var(--text-3); }

/* ===== 图表容器 ===== */
.chart-card { padding: 4px 6px 8px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend-row .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.legend-row .lg-label { color: var(--text-2); }
.legend-row .lg-val { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ===== 列表行 ===== */
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #fafcff; }
.rank-no { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: #f2f4f7; color: var(--text-3); flex: none; }
.rank-no.top { background: #fff1e3; color: #b45309; }
.rank-no.t2 { background: #f2f4f7; color: #475467; }
.rank-no.t3 { background: #fdf1e7; color: #9a5b13; }
.row-main { flex: 1; min-width: 0; }
.row-main .t { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main .s { font-size: 11.5px; color: var(--text-3); }
.row-val { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===== 分页 ===== */
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; gap: 8px; }
.pager-btns { display: flex; gap: 4px; align-items: center; }
.pg { min-width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 12.5px; cursor: pointer; padding: 0 8px; }
.pg:hover:not(:disabled) { border-color: #c3d2ee; color: var(--brand); }
.pg.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 分段控件 ===== */
.seg { display: inline-flex; background: #f2f4f7; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.seg button.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }

/* ===== 头像组 ===== */
.avatar-sm { width: 24px; height: 24px; border-radius: 50%; background: #eaf0ff; color: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.owner-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }

/* ===== 收款账户 ===== */
.acc-card { border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; background: #fff; }
.acc-card .acc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.acc-card .acc-name { font-size: 13.5px; font-weight: 600; }
.acc-card .acc-id { font-size: 11.5px; color: var(--text-3); }
.acc-balance { font-size: 22px; font-weight: 680; font-variant-numeric: tabular-nums; }
.acc-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ===== 笔记/富文本 ===== */
.note-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #92400e; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--line-2); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-3); }
.kv .v { font-weight: 550; }

/* ===== 响应式 ===== */
@media (max-width: 1180px) {
  .detail-grid { grid-template-columns: 1fr; }
  .buy-card { position: static; }
  .live-hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 16px 14px 40px; }
  .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod-switch a { padding: 6px 10px; font-size: 12.5px; }
  .brand-name small { display: none; }
  .pay-wrap { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-name { font-size: 14px; }
  .mod-switch { gap: 0; }
  .mod-switch a { padding: 6px 8px; font-size: 12px; }
  .tb-user span { display: none; }
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 18px; }
  table.tb { min-width: 680px; }
  .modal, .drawer { max-width: 100%; }
}

/* ================= 上传课程 ================= */
.dropzone {
  border: 2px dashed #cbd5e1; border-radius: 12px;
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  background: #fafbfc;
}
.dropzone:hover { border-color: #94a3b8; background: #f5f7fa; }
.dropzone.drag { border-color: #ff8c1a; background: #fff7ef; transform: scale(1.005); }
.dropzone .dz-ic { color: #ff8c1a; margin-bottom: 8px; }
.dropzone .dz-t { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.dropzone .dz-tip { font-size: 11.5px; color: var(--text-3); margin-top: 14px; }
.up-queue, .up-assets { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.up-file {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1px solid #eef1f5; border-radius: 9px;
  padding: 9px 12px;
}
.up-file .uf-ic {
  width: 34px; height: 34px; flex: none; border-radius: 8px;
  background: #fff1e3; color: #ff8c1a;
  display: grid; place-items: center;
}
.up-file .row-main { flex: 1; min-width: 0; }
.up-file .row-main .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-file .row-main .s { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.up-file code.uf-key {
  font-size: 10.5px; color: #64748b; background: #eef1f5;
  border-radius: 5px; padding: 3px 7px; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none;
}
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.chk input { accent-color: #ff8c1a; width: 15px; height: 15px; }
.chk.sm { font-size: 12px; flex: none; }
.url-import { margin-top: 14px; }
