/* ============================================================
   公益项目管理系统 · 设计令牌（完全复用工作计划管理系统风格）
   主蓝 #2563EB / 琥珀 #F59E0B / 浅灰底 #F3F4F6 / 白卡 / 细边框
   ============================================================ */
:root {
  --primary: #2563EB;
  --primary-soft: #EFF6FF;
  --accent: #F59E0B;
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --text: #1F2937;
  --muted: #6B7280;
  --sidebar-w: 220px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 10px 30px rgba(16,24,40,.12);
  --green: #16A34A;
  --green-soft: #DCFCE7;
  --red: #DC2626;
  --red-soft: #FEE2E2;
  --amber-soft: #FEF3C7;
  --purple: #7C3AED;
  --purple-soft: #EDE9FE;
}

/* 暗色主题：仅重映射令牌，组件样式不变 → 保持一致性 */
[data-theme="dark"] {
  --primary: #3B82F6;
  --primary-soft: #1E293B;
  --accent: #F59E0B;
  --bg: #0F172A;
  --card: #1E293B;
  --border: #334155;
  --text: #E2E8F0;
  --muted: #94A3B8;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
  --green-soft: #14331f; --red-soft: #3a1717; --amber-soft: #3a2c0c; --purple-soft: #251a3a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

/* ============ 布局 ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: #FFFFFF;
  border-right: 1px solid #E5E7EB;
  display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0;
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #F9FAFB; }

/* ============ Material Icons（单色扁平，与讲师管理端一致） ============ */
.mi {
  font-family: 'Material Icons Outlined';
  font-weight: normal; font-style: normal;
  font-size: 20px; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal;
  direction: ltr; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  color: inherit;
}
.mi-nav { font-size: 20px; width: 20px; text-align: center; opacity: .85; }
.sidebar-nav a.active .mi-nav { color: var(--primary); opacity: 1; }

/* ============ 右侧详情页顶部：图标 + 模块名称（与讲师管理端一致） ============ */
.detail-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.detail-header .mi { font-size: 28px; color: var(--primary); }
.detail-header .detail-title { font-size: 18px; font-weight: 700; color: var(--text); }
.detail-header .detail-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============ 侧边栏（对齐讲师管理端：14px/10px20px/6px圆角/hover灰底） ============ */
.brand {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 14px 18px 12px; border-bottom: 1px solid #E5E7EB;
}
.brand .name { font-weight: 600; font-size: 16px; line-height: 1.3; color: #111827; }
.brand .sub { font-weight: 600; font-size: 16px; line-height: 1.3; color: #111827; margin-top: 2px; }
.brand .version, .brand .update-time { font-size: 12px; color: #9CA3AF; margin-top: 4px; }

.nav-section { padding: 8px 0 6px; }
.nav-section .ttl { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .04em; padding: 0 8px 6px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; margin: 2px 8px; border-radius: 6px;
  color: #4B5563; font-size: 14px; cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover { background: #F3F4F6; color: #111827; }
.sidebar-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar-nav a .ico { width: 18px; text-align: center; opacity: .9; }
.sidebar-nav a .badge { margin-left: auto; font-size: 11px; background: var(--border); color: var(--muted); border-radius: 10px; padding: 1px 7px; }
.sidebar-spacer { flex: 1; }

/* ============ 侧边栏底部用户信息（对齐讲师管理端：姓名+职位+整宽退出按钮） ============ */
.sidebar-footer { padding: 14px 16px; border-top: 1px solid #E5E7EB; background: #F9FAFB; }
.user-info { margin-bottom: 10px; }
.btn-logout2 {
  width: 100%; padding: 8px 12px; font-size: 13px; border-radius: 6px;
  border: 1px solid #DC2626; background: #FFFFFF; color: #DC2626; cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.btn-logout2:hover { background: #FEF2F2; }

/* ============ 页面规范：图标+标题 → 分割线 → 内容（与讲师管理端一致） ============ */
.page-header-std {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 0 14px; margin-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}
.page-header-std .mi { font-size: 20px; color: #1f2937; vertical-align: -4px; }
.page-header-std h2 { margin: 0; font-size: 20px; font-weight: 700; color: #1f2937; }
.page-header-std .spacer { flex: 1; }
/* 统一工具栏：分割线之下的搜索/筛选/操作按钮行（高度统一 36px） */
.toolbar-std {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px;
}
.toolbar-std .input { height: 36px; box-sizing: border-box; }
.toolbar-std .btn { height: 36px; box-sizing: border-box; padding: 0 16px; }
/* v1.6.1 统一列表规范：td 单行+省略+容器横向滚动（页面本身不横向滚动） */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 3px; }
.table th, .table td { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.table td[title] { cursor: help; }
.card-table { padding: 0; overflow-x: auto; }

/* ============ 顶栏 ============ */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px; background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 700; }
.topbar .crumb { font-size: 12px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); cursor: pointer; font-size: 16px;
  display: grid; place-items: center; transition: .15s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 9px; }
.user-chip:hover { background: var(--bg); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.user-chip .un { font-size: 13px; }
.user-chip .ur { font-size: 11px; color: var(--muted); }

.content { padding: 22px; width: 100%; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 16px; border-radius: 6px; border: 1px solid #E5E7EB;
  background: #FFFFFF; color: #374151; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all .15s ease;
}
.btn:hover { background: #F9FAFB; border-color: #D1D5DB; }
.btn:active { background: #F3F4F6; }
.btn-primary { background: #2563EB; color: #FFFFFF; border-color: #2563EB; }
.btn-primary:hover { background: #1D4ED8; border-color: #1D4ED8; }
.btn-outline { background: transparent; border: 1px solid #E5E7EB; color: #374151; }
.btn-outline:hover { background: #F9FAFB; border-color: #D1D5DB; }
.btn-danger { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }
.btn-danger:hover { background: #FEE2E2; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 5px; }
.btn-ghost { background: transparent; border: none; color: #6B7280; }
.btn-ghost:hover { background: #F3F4F6; }
.btn-ghost:hover { background: #F3F4F6; color: #111827; }
.back-row { margin-bottom: 12px; }
.btn-back {
  background: none; border: none; color: #6B7280; font-size: 13px; cursor: pointer; padding: 4px 0;
  display: inline-flex; align-items: center; gap: 4px;
}
.btn-back:hover { color: #2563EB; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============ 卡片 ============ */
.card {
  background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 8px;
  padding: 16px;
}
.card-title { font-size: 16px; font-weight: 600; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; color: #111827; }
.card-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }

/* ============ 表单 ============ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid #E5E7EB; border-radius: 8px;
  background: #fff; color: #111827; font-size: 14px; transition: all .2s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.textarea { resize: vertical; min-height: 80px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ============ 表格 ============ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #FFFFFF; }
.table th {
  text-align: left; font-size: 12px; color: #6B7280; font-weight: 500;
  padding: 10px 12px; border-bottom: 1px solid #E5E7EB; background: #F9FAFB;
}
.table td { padding: 10px 12px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; color: #374151; }
.table tbody tr:hover { background: #F9FAFB; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ============ 标签 / 徽章 ============ */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 400; white-space: nowrap; }
.tag-pri-高 { background: #FEE2E2; color: #DC2626; }
.tag-pri-中 { background: #FEF3C7; color: #B45309; }
.tag-pri-低 { background: #DCFCE7; color: #16A34A; }
.tag-status-进行中 { background: #EFF6FF; color: #2563EB; }
.tag-status-未开始 { background: #F3F4F6; color: #6B7280; }
.tag-status-已完成 { background: #DCFCE7; color: #16A34A; }
.tag-ms { background: #EDE9FE; color: #7C3AED; }
.tag-soft { background: #F3F4F6; color: #6B7280; }

.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { width: 24px; height: 24px; font-size: 11px; border: 2px solid var(--card); margin-left: -6px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ============ 进度条 ============ */
.progress { height: 10px; background: #E5E7EB; border-radius: 6px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #2563EB, #60A5FA); border-radius: 6px; transition: width .4s ease; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .pct { font-size: 13px; color: #6B7280; min-width: 38px; text-align: right; }

/* ============ 统计卡 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; }
.stat {
  background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 6px;
  padding: 14px 16px;
}
.stat .label { font-size: 12px; color: #6B7280; }
.stat .value { font-size: 20px; font-weight: 600; margin-top: 4px; color: #111827; }
.stat .value .unit { font-size: 12px; font-weight: 400; color: #9CA3AF; margin-left: 2px; }

/* ============ 空状态 ============ */
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .em-icon { font-size: 34px; opacity: .6; }
.empty .em-text { font-size: 14px; margin: 8px 0 14px; }

/* ============ 模态框 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px);
  display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 16px; overflow-y: auto;
}
.modal-mask.open { display: flex; }
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.x-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; }

/* ============ 标签页 ============ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab-btn { padding: 9px 14px; border: none; background: none; cursor: pointer; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ============ 工具条 ============ */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.muted { color: #9CA3AF; }
.text-sm { font-size: 13px; }
h2 { font-size: 20px; font-weight: 600; color: #111827; margin: 0 0 16px; }
.right { text-align: right; }

/* ============ Toast ============ */
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--primary); padding: 11px 15px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; min-width: 220px; animation: slidein .2s ease; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ 甘特图 ============ */
.gantt { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gantt-head, .gantt-row { display: grid; }
.gantt-head { background: #F9FAFB; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
[data-theme="dark"] .gantt-head { background: #0f172a; }
.gantt-row { border-bottom: 1px solid var(--border); align-items: center; transition: background .12s; }
.gantt-row:hover { background: var(--primary-soft); }
.gantt-row:last-child { border-bottom: none; }
.gantt-label { padding: 10px 12px; border-right: 1px solid var(--border); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-label .sub { font-size: 11px; color: var(--muted); }
.gantt-chart-scroll { overflow-x: auto; }
.gantt-timeline { position: relative; min-width: 100%; }
.gantt-month { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--border); font-size: 11px; color: var(--muted); padding: 4px 6px; pointer-events: none; }
.gantt-track { position: relative; height: 44px; }
.gantt-bar {
  position: absolute; top: 8px; height: 28px; border-radius: 7px; cursor: grab;
  background: linear-gradient(135deg, var(--primary), #60A5FA); color: #fff;
  display: flex; align-items: center; padding: 0 8px; font-size: 11.5px; white-space: nowrap; overflow: hidden;
  box-shadow: var(--shadow); user-select: none; transition: box-shadow .15s;
}
.gantt-bar:hover { box-shadow: var(--shadow-lg); }
.gantt-bar.dragging { cursor: grabbing; opacity: .92; z-index: 5; }
.gantt-bar .bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.28); border-radius: 7px 0 0 7px; }
.gantt-bar .bar-txt { position: relative; z-index: 2; }
.gantt-bar.ms { background: linear-gradient(135deg, var(--purple), #A78BFA); border-radius: 6px; }
.gantt-handle-r { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; border-radius: 0 7px 7px 0; }
.gantt-ms-diamond { position: absolute; top: 12px; width: 20px; height: 20px; background: var(--purple); transform: rotate(45deg); border-radius: 4px; box-shadow: var(--shadow); cursor: grab; }
.gantt-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.gantt-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.gantt-legend .sw { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* ============ 树（目标分层） ============ */
.goal-tree { list-style: none; margin: 0; padding: 0; }
.goal-tree .goal-tree { padding-left: 24px; border-left: 2px dashed #E5E7EB; margin-left: 8px; }
.goal-node { background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 6px; padding: 12px 14px; margin: 8px 0; }
.goal-node .gn-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.goal-node .gn-title { font-weight: 500; font-size: 14px; color: #374151; }
.goal-node .gn-meta { font-size: 12px; color: #9CA3AF; margin-top: 4px; }
.goal-node .gn-actions { margin-left: auto; display: flex; gap: 4px; }

/* ============ 登录 ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg,#EFF6FF 0%,#DBEAFE 45%,#BFDBFE 100%); }
[data-theme="dark"] .login-wrap { background: #0f172a; }
.login-card { width: 400px; max-width: 100%; background: #fff; border: none; border-radius: 16px; box-shadow: 0 20px 50px rgba(37,99,235,.15), 0 4px 12px rgba(0,0,0,0.08); padding: 40px 36px; }
.login-card .brand { border: none; padding: 0; margin-bottom: 24px; justify-content: center; align-items: center; text-align: center; }
.login-card .brand-logo { max-width: 150px; max-height: 60px; width: auto; height: auto; object-fit: contain; margin: 0 auto 16px; display: block; }
.login-card .name { font-size: 20px !important; font-weight: 700 !important; color: #111827 !important; }
.login-card .sub { font-size: 13px !important; color: #6B7280 !important; }
.login-err { color: #DC2626; font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ============ 响应式 ============ */
.hamburger { display: none; }
@media (max-width: 860px) {
  :root { --sidebar-w: 240px; }
  .sidebar { position: fixed; z-index: 60; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: grid; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
  .scrim.show { display: block; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}

/* ============ 工作计划页面专用样式 ============ */
.goal-node {
  transition: all 0.2s ease;
}
.goal-node:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.goal-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.tag-soft {
  background: #EFF6FF;
  color: #3730A3;
}
.tag-status-未开始 { background: #F3F4F6; color: #6B7280; }
.tag-status-进行中 { background: #EFF6FF; color: #2563EB; }
.tag-status-已完成 { background: #DCFCE7; color: #16A34A; }

/* 表格优化 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  background: #F9FAFB;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #E5E7EB;
  font-size: 12px;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F0F0F0;
  vertical-align: middle;
}
.table tr:hover td {
  background: #FAFBFC;
}

/* 进度条 */
.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.progress {
  flex: 1;
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
  max-width: 200px;
}
.progress span {
  display: block;
  height: 100%;
  background: #2563EB;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.pct {
  font-size: 11px;
  color: #6B7280;
  min-width: 32px;
}

/* 按钮组 */
.cell-actions {
  display: flex;
  gap: 4px;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: #9CA3AF;
}
.empty .em-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.empty .em-text {
  font-size: 14px;
}

/* 卡片标题 */
.card-title {
  font-size: 15px;
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid #F0F0F0;
  background: #FAFBFC;
}

/* 字段标签 */
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

/* 输入框 */
.input, .select, .textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.textarea {
  resize: vertical;
  min-height: 80px;
}

/* 模态框 */
#modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}
#modal-mask.open {
  display: flex;
}
#modal {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E5E7EB;
}
.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.x-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #6B7280;
}
.x-btn:hover {
  background: #F3F4F6;
}
.modal-body {
  padding: 20px;
}
.modal-foot {
  padding: 16px 20px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast 提示 */
#toast-wrap {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  background: #374151;
  color: #FFFFFF;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease;
}
.toast.err {
  background: #DC2626;
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 甘特图 */
.gantt-wrap {
  font-size: 12px;
}
.gantt-bar {
  position: absolute;
  height: 20px;
  background: #2563EB;
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: rgba(255,255,255,0.3);
}
.gantt-ms-diamond {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #F59E0B;
  transform: rotate(45deg);
  border-radius: 3px;
}

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.stat {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #2563EB;
}
.stat .label {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 4px;
}
.stat .value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}
.stat .unit {
  font-size: 14px;
  font-weight: 400;
  color: #6B7280;
}

/* 头像 */
.avatar-stack {
  display: flex;
}
.avatar-stack .avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
  margin-left: -6px;
  border: 2px solid #FFFFFF;
}
.avatar-stack .avatar:first-child {
  margin-left: 0;
}

/* 文字工具类 */
.muted { color: #9CA3AF; }
.text-sm { font-size: 12px; }
.right { text-align: right; }

/* 网格布局 */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.spacer { flex: 1; }

/* 工具栏 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ============ 讲师管理模块样式 ============ */
/* 数据表格（与 .table 一致风格） */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.data-table th { padding: 10px 12px; text-align: left; background: #F9FAFB; color: #6B7280; font-weight: 600; border-bottom: 2px solid #E5E7EB; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #F3F4F6; color: #374151; }
.data-table tbody tr:hover { background: #F9FAFB; }

/* 表单网格 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row { margin-bottom: 0; }
.form-row label { display: block; font-size: 12px; color: #6B7280; margin-bottom: 4px; font-weight: 500; }
.form-row .input { width: 100%; }

/* 详情网格 */
.detail-grid { display: grid; gap: 0; margin-bottom: 20px; }
.detail-row { display: flex; padding: 8px 0; border-bottom: 1px solid #F3F4F6; }
.detail-row .dl { width: 120px; color: #6B7280; font-size: 13px; flex-shrink: 0; }
.detail-row .dv { color: #111827; font-size: 13px; flex: 1; }
.detail-section { margin-bottom: 20px; }
.detail-section h4 { margin: 0 0 12px; font-size: 14px; color: #374151; }

/* 统计卡片 */
.stat-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-card { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 8px; padding: 16px 24px; text-align: center; min-width: 120px; }
.stat-card .stat-num { font-size: 24px; font-weight: 700; color: #2563EB; }
.stat-card .stat-label { font-size: 12px; color: #6B7280; margin-top: 4px; }

/* 跟进记录 */
.followup-item { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; }
.followup-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.followup-date { font-size: 12px; color: #6B7280; font-weight: 600; }
.followup-by { font-size: 12px; color: #9CA3AF; }
.followup-content { font-size: 13px; color: #374151; line-height: 1.6; }

/* 自动获取标记 */
.auto-tag { display: inline-block; padding: 1px 6px; font-size: 10px; color: #6B7280; background: #F3F4F6; border-radius: 3px; margin-left: 4px; }

/* 弹窗扩展（讲师详情 Tab） */
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #E5E7EB; }
.modal-header h3 { margin: 0; font-size: 16px; color: #111827; }
.modal-close { background: none; border: none; font-size: 20px; color: #9CA3AF; cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: #374151; }
.modal-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid #E5E7EB; }
.modal-tab { padding: 10px 14px; border: none; background: none; cursor: pointer; font-size: 13px; color: #6B7280; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.modal-tab.active { color: #2563EB; border-bottom-color: #2563EB; font-weight: 600; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid #E5E7EB; }

/* 标签颜色 */
.tag-green { background: #D1FAE5; color: #065F46; }
.tag-yellow { background: #FEF3C7; color: #92400E; }
.tag-gray { background: #F3F4F6; color: #6B7280; }

/* 导入指南 */
.import-guide h4 { margin: 0 0 10px; font-size: 14px; color: #374151; }
.import-guide p { margin: 0 0 10px; font-size: 13px; color: #6B7280; }

/* 暗色主题适配 */
[data-theme="dark"] .data-table { background: #1F2937; }
[data-theme="dark"] .data-table th { background: #111827; color: #9CA3AF; border-bottom-color: #374151; }
[data-theme="dark"] .data-table td { border-bottom-color: #374151; color: #E5E7EB; }
[data-theme="dark"] .data-table tbody tr:hover { background: #111827; }
[data-theme="dark"] .detail-row { border-bottom-color: #374151; }
[data-theme="dark"] .detail-row .dl { color: #9CA3AF; }
[data-theme="dark"] .detail-row .dv { color: #F9FAFB; }
[data-theme="dark"] .stat-card { background: #111827; border-color: #374151; }
[data-theme="dark"] .stat-card .stat-label { color: #9CA3AF; }
[data-theme="dark"] .followup-item { background: #111827; border-color: #374151; }
[data-theme="dark"] .followup-content { color: #E5E7EB; }
[data-theme="dark"] .modal-header { border-bottom-color: #374151; }
[data-theme="dark"] .modal-header h3 { color: #F9FAFB; }
[data-theme="dark"] .modal-tab { color: #9CA3AF; }
[data-theme="dark"] .modal-footer { border-top-color: #374151; }

/* ============ 系统管理模块样式 ============ */
.sys-tabs { display: flex; gap: 4px; border-bottom: 2px solid #E5E7EB; }
.sys-tab { padding: 10px 16px; border: none; background: none; cursor: pointer; font-size: 13px; color: #6B7280; border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 500; }
.sys-tab:hover { color: #374151; }
.sys-tab.active { color: #2563EB; border-bottom-color: #2563EB; font-weight: 600; }
.sys-report-wrap { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; }
.sys-report-item { display: flex; align-items: center; gap: 2px; font-size: 11px; cursor: pointer; }
.sys-report-item input { width: 12px; height: 12px; }
.table-wrap { overflow-x: auto; }
.tag-blue { background: #DBEAFE; color: #1D4ED8; }
.tag-purple { background: #EDE9FE; color: #7C3AED; }
.tag-soft { background: #F3F4F6; color: #6B7280; }
.items-center { display: flex; align-items: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.mt-3 { margin-top: 12px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.inline-block { display: inline-block; }
.w-4 { width: 16px; }
.h-4 { height: 16px; }
.h-10 { height: 40px; }
.w-10 { width: 40px; }
.rounded-full { border-radius: 50%; }
.bg-green-500 { background: #10B981; }
.bg-gray-300 { background: #D1D5DB; }
.bg-red-100 { background: #FEE2E2; }
.bg-red-700 { color: #B91C1C; }
.bg-blue-100 { background: #DBEAFE; }
.bg-blue-700 { color: #1D4ED8; }
.bg-green-100 { background: #D1FAE5; }
.bg-green-700 { color: #065F46; }
.bg-yellow-100 { background: #FEF3C7; }
.bg-yellow-700 { color: #92400E; }
.bg-purple-100 { background: #EDE9FE; }
.px-1-5 { padding-left: 6px; padding-right: 6px; }
.py-0-5 { padding-top: 2px; padding-bottom: 2px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.mt-0-5 { margin-top: 2px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-1 { margin-top: 4px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-800 { max-width: 800px; }
.min-w-1000 { min-width: 1000px; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.cursor-pointer { cursor: pointer; }
.justify-center { justify-content: center; }
.grid-cols-2 { grid-template-columns: 1fr 1fr; }

/* 暗色主题 */
[data-theme="dark"] .sys-tabs { border-bottom-color: #374151; }
[data-theme="dark"] .sys-tab { color: #9CA3AF; }
[data-theme="dark"] .sys-tab:hover { color: #E5E7EB; }
[data-theme="dark"] .sys-tab.active { color: #60A5FA; border-bottom-color: #60A5FA; }
[data-theme="dark"] .data-table th { background: #111827; color: #9CA3AF; border-bottom-color: #374151; }
[data-theme="dark"] .data-table td { border-bottom-color: #374151; color: #E5E7EB; }
[data-theme="dark"] .data-table tbody tr:hover { background: #111827; }
[data-theme="dark"] .tag-blue { background: #1E3A5F; color: #93C5FD; }
[data-theme="dark"] .tag-purple { background: #2D1B69; color: #C4B5FD; }
[data-theme="dark"] .tag-soft { background: #374151; color: #9CA3AF; }
[data-theme="dark"] .bg-green-500 { background: #10B981; }
[data-theme="dark"] .bg-gray-300 { background: #4B5563; }
