/* ============ 高校智慧校园管理系统 - 样式 ============ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --sidebar-bg: #ffffff;
  --sidebar-active: #2563eb;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --text-sub: #64748b;
  --border: #e2e8f0;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #ea580c;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 30, 61, .08), 0 4px 14px rgba(15, 30, 61, .06);
  /* ---- V4.3 多主题扩展变量（默认经典浅色；深色科技风见文件末尾 html[data-theme] 主题块） ---- */
  --card-2: #f8fafc;            /* 表头 / 悬停行 / 次级面板 */
  --line: #f1f5f9;              /* 表格行分隔线 / 进度条轨道 */
  --input-bg: #ffffff;          /* 输入控件背景 */
  --chip-bg: #eff6ff;           /* 角色标签等浅色小底 */
  --sidebar-text: #334155;
  --sidebar-item: #3b4a5f;
  --sidebar-title: #0f172a;
  --sidebar-sub: #94a3b8;
  --sidebar-group: #64748b;
  --sidebar-line: #edf1f7;
  --sidebar-group-line: #eef2f8;
  --sidebar-hover: #f4f7fb;
  --sidebar-hover-text: #0f172a;
  --sidebar-active-bg: #eef4ff;
  --sidebar-active-text: #1d4ed8;
  --sidebar-border: #e5eaf2;
  --sidebar-thumb: #d3dce8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--primary); text-decoration: none; }

/* ---------- 登录页（轮播大图 + 右侧登录模块） ---------- */
.login-wrap {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: flex-end;
  background: #0f1e3d;
}
.carousel { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 7s linear;
}
.slide.active { opacity: 1; transform: scale(1); }
.carousel-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,22,48,.55) 0%, rgba(10,22,48,.15) 45%, rgba(10,22,48,.62) 100%);
}
.carousel-caption {
  position: absolute; left: 6vw; top: 50%; transform: translateY(-50%);
  color: #fff; max-width: 520px; z-index: 2; user-select: none;
}
.carousel-caption h2 { font-size: 40px; letter-spacing: 4px; text-shadow: 0 2px 18px rgba(0,0,0,.45); line-height: 1.35; }
.carousel-caption p { margin-top: 14px; font-size: 15px; opacity: .88; letter-spacing: 2px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.carousel-caption .sub-line { margin-top: 26px; display: inline-block; padding: 6px 18px; border: 1px solid rgba(255,255,255,.45); border-radius: 22px; font-size: 12px; letter-spacing: 3px; }
.dots { position: absolute; left: 6vw; bottom: 6vh; display: flex; gap: 10px; z-index: 2; }
.dots span { width: 26px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.4); cursor: pointer; transition: background .3s; }
.dots span.on { background: #fff; }
.login-card {
  position: relative; z-index: 3; width: 400px; margin-right: 8vw;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-radius: 16px; padding: 40px 36px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  color: #1e293b;
}
/* 登录卡固定白底：内部控件强制浅色配色，不随后台主题切换变化（防深色主题下白底浅字） */
.login-card .form-item label { color: #475569; }
.login-card .form-item input, .login-card .form-item select, .login-card .form-item textarea { background: #fff; color: #1e293b; border-color: #e2e8f0; }
.login-card .form-item input::placeholder { color: #94a3b8; }
.login-card .sub { color: #64748b; }
.login-card .btn.ghost { background: #fff; color: #1e293b; border-color: #e2e8f0; }
.login-logo { text-align: center; margin-bottom: 8px; color: var(--primary); }
.login-card h1 { text-align: center; font-size: 20px; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--text-sub); font-size: 12px; margin-bottom: 26px; }
.login-tip { margin-top: 18px; padding: 10px 14px; background: #eff6ff; border-radius: 8px; font-size: 12px; color: #1e40af; line-height: 1.8; }
.slide, .slide * { -webkit-user-drag: none; user-select: none; }
@media (max-width: 900px) {
  .carousel-caption, .dots { display: none; }
  .login-card { margin: 0 auto; }
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 288px; background: var(--sidebar-bg); color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; }
.sidebar::-webkit-scrollbar { width: 4px; } .sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }
.brand { padding: 20px 20px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand .logo { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, #2563eb, #06b6d4); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.brand b { font-size: 16px; color: #fff; line-height: 1.3; }
.brand small { display: block; font-size: 10px; color: #64748b; font-weight: normal; }
.menu-group { padding: 14px 18px 6px; font-size: 12px; color: #64748b; letter-spacing: 1px; }
.menu-group.toggle { cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.menu-group.toggle:hover { color: #94a3b8; }
.menu-sub { overflow: hidden; max-height: 1200px; transition: max-height .3s ease, opacity .25s; opacity: 1; }
.menu-sub.closed { max-height: 0; opacity: 0; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 11px 18px; cursor: pointer; font-size: 14px; border-left: 3px solid transparent; transition: background .15s; }
.menu-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.menu-item.active { background: rgba(37,99,235,.18); border-left-color: var(--sidebar-active); color: #fff; }
.main { flex: 1; margin-left: 288px; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: var(--card); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; gap: 12px; position: sticky; top: 0; z-index: 50; }
.topbar .crumb { font-size: 15px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #06b6d4); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.user-chip .name { font-size: 13px; }
.role-tag { font-size: 10px; padding: 2px 7px; border-radius: 20px; background: #eff6ff; color: var(--primary); }
.content { padding: 20px 24px 40px; flex: 1; }

/* ---------- 卡片 / 统计 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.stat .icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat .num { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat .lbl { font-size: 12px; color: var(--text-sub); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
.card h3 { font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ""; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }

/* ---------- 表格 ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.search-input { flex: 0 0 260px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; outline: none; }
.search-input:focus { border-color: var(--primary); }
.filter-select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); background: var(--input-bg); outline: none; max-width: 170px; }
.filter-select:focus { border-color: var(--primary); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 10px 12px; background: var(--card-2); color: var(--text-sub); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl tr:hover td { background: var(--card-2); }
.tbl .actions { white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 12px; font-size: 13px; color: var(--text-sub); }

/* ---------- 按钮 / 表单 ---------- */
.btn { padding: 8px 15px; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; background: var(--primary); color: #fff; transition: background .15s; }
.btn:hover { background: var(--primary-dark); }
.btn.ghost { background: var(--input-bg); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--card-2); }
.btn.danger { background: #fee2e2; color: var(--red); }
.btn.danger:hover { background: #fecaca; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; padding: 2px 4px; }
.link-btn.danger { color: var(--red); }

.modal-mask { position: fixed; inset: 0; background: rgba(15,30,61,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 14px; width: 560px; max-width: 94vw; max-height: 88vh; overflow-y: auto; padding: 22px 24px; }
.modal h2 { font-size: 16px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-item { display: flex; flex-direction: column; gap: 5px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12px; color: var(--text-sub); }
.form-item label .req { color: var(--red); margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; outline: none; font-family: inherit; background: var(--input-bg); color: var(--text); }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); }
.form-item textarea { min-height: 70px; resize: vertical; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; }
.b-green { background: #dcfce7; color: #15803d; }
.b-blue { background: #dbeafe; color: #1d4ed8; }
.b-orange { background: #ffedd5; color: #c2410c; }
.b-red { background: #fee2e2; color: #b91c1c; }
.b-gray { background: #f1f5f9; color: #475569; }

/* ---------- 课表 ---------- */
.tt { width: 100%; border-collapse: collapse; font-size: 12px; }
.tt th, .tt td { border: 1px solid var(--border); padding: 8px 6px; text-align: center; }
.tt th { background: var(--card-2); color: var(--text-sub); }
.tt td .course { background: #dbeafe; border-radius: 6px; padding: 6px 4px; color: #1e40af; line-height: 1.5; }
.tt td .course small { display: block; color: #64748b; }

/* ---------- Toast ---------- */
#toast-box { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 20px; border-radius: 8px; color: #fff; font-size: 13px; box-shadow: var(--shadow); animation: fadein .2s; }
.toast.ok { background: #16a34a; } .toast.err { background: #dc2626; } .toast.info { background: #0f1e3d; }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; } }

/* ---------- 智慧教室卡片 ---------- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.room-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.room-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.room-card .name { font-weight: 700; font-size: 15px; }
.env { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.env div { background: var(--card-2); border-radius: 8px; padding: 8px 4px; text-align: center; }
.env b { display: block; font-size: 15px; } .env span { font-size: 10px; color: var(--text-sub); }
.switches { display: flex; gap: 8px; margin-top: 10px; }
.toggle { flex: 1; padding: 7px 0; border: none; border-radius: 8px; font-size: 12px; cursor: pointer; }
.toggle.on { background: #fef3c7; color: #b45309; } .toggle.off { background: var(--card-2); color: var(--text-sub); }

/* ---------- 时间轴/列表 ---------- */
.notice-item { padding: 10px 4px; border-bottom: 1px dashed var(--border); display: flex; gap: 10px; align-items: baseline; }
.notice-item:last-child { border-bottom: none; }
.notice-item .t { color: var(--primary); font-weight: 600; }
.notice-item .d { margin-left: auto; font-size: 11px; color: var(--text-sub); white-space: nowrap; }
.notice-item .pin { font-size: 10px; background: #fee2e2; color: #b91c1c; border-radius: 4px; padding: 1px 5px; }
.empty { text-align: center; color: var(--text-sub); padding: 40px 0; font-size: 13px; }

/* ====================== 公开门户（访客首页） ====================== */
.pub-page { min-height: 100vh; background: #f4f7fb; }
.pub-nav { display: flex; align-items: center; padding: 14px 4vw; background: #fff; box-shadow: 0 1px 6px rgba(15,23,42,.06); position: sticky; top: 0; z-index: 20; }
.pub-brand { display: flex; align-items: center; gap: 10px; color: #1e3a8a; }
.pub-brand b { font-size: 18px; }
.pub-brand small { color: #64748b; font-size: 12px; margin-left: 4px; }
.pub-nav .btn { margin-left: auto; display: flex; align-items: center; }
.pub-hero { min-height: 320px; background-size: cover; background-position: center; position: relative; display: flex; align-items: center; }
.pub-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,.72), rgba(15,23,42,.25)); }
.pub-hero-inner { position: relative; z-index: 1; color: #fff; padding: 48px 5vw; max-width: 720px; }
.pub-hero-inner h1 { font-size: 30px; margin-bottom: 10px; }
.pub-hero-inner p { opacity: .92; margin-bottom: 22px; }
.pub-stats { display: flex; gap: 12px; flex-wrap: wrap; padding: 22px 4vw; }
.pub-stat { flex: 1; min-width: 130px; background: #fff; border-radius: 12px; text-align: center; padding: 18px 8px; box-shadow: 0 1px 5px rgba(15,23,42,.05); }
.pub-stat b { display: block; font-size: 26px; color: #1d4ed8; }
.pub-stat span { font-size: 12px; color: #64748b; }
.pub-sec { padding: 8px 4vw 18px; }
.pub-sec h2 { font-size: 19px; margin: 14px 0 6px; color: #0f172a; }
.pub-tip { font-size: 12px; color: #94a3b8; margin-bottom: 12px; }
.pub-svc .svc-card { cursor: default; }
.pub-svc-links { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
.pub-svc-links a { font-size: 12px; color: #475569; background: #f1f5f9; border-radius: 20px; padding: 3px 10px; cursor: pointer; transition: all .15s; }
.pub-svc-links a:hover { color: #fff; background: #2563eb; }
.pub-notice { cursor: pointer; }
.pub-foot { text-align: center; color: #94a3b8; font-size: 12px; padding: 26px 0 34px; }
/* 登录页返回门户 */
.login-back { display: inline-block; font-size: 12px; color: #94a3b8; margin-bottom: 10px; cursor: pointer; }
.login-back:hover { color: #2563eb; }

/* ====================== 登录方式切换 / 扫码 ====================== */
.login-tabs { display: flex; gap: 6px; margin: 14px 0 16px; }
.login-tabs .lt { flex: 1; padding: 8px 0; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 8px; font-size: 12px; cursor: pointer; color: #475569; }
.login-tabs .lt.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.qr-mock { width: 132px; height: 132px; margin: 4px auto 10px; border: 1px dashed #cbd5e1; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #94a3b8; background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 0 0/16px 16px; }
/* ====================== 移动校园：多端适配（<=900px） ====================== */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 100; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .sidebar-mask { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 90; }
  .sidebar-mask.show { display: block; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: var(--card-2); color: var(--text); cursor: pointer; margin-right: 10px; }
  .main { min-width: 0; margin-left: 0 !important; }
  .content { padding: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .svc-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .app-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .login-wrap { flex-direction: column-reverse !important; }
  .login-card { width: 92% !important; margin: 16px auto !important; }
  .carousel { height: 180px !important; }
  .topbar { padding: 10px 12px !important; }
  .user-chip .name { display: none; }
  .pub-hero-inner h1 { font-size: 22px; }
  .pub-stats { padding: 14px 4vw; }
}
@media (max-width: 480px) {
  .svc-grid { grid-template-columns: 1fr !important; }
  .app-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ====================== SVC-CARD BASE（服务平台卡片） ====================== */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.svc-card { background: #fff; border: 1px solid #e8eef6; border-radius: 14px; padding: 18px 20px 16px; box-shadow: 0 1px 4px rgba(15, 23, 42, .04); transition: box-shadow .2s, transform .2s; }
.svc-card:hover { box-shadow: 0 6px 18px rgba(37, 99, 235, .12); transform: translateY(-2px); }
.svc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.svc-head .icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.svc-head .icon svg { width: 20px; height: 20px; }
.svc-head b { font-size: 16px; letter-spacing: .5px; }
.pub-svc-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pub-svc-links a { display: flex; align-items: center; justify-content: center; font-size: 14px; color: #334155; background: #f4f7fb; border: 1px solid #e6edf5; border-radius: 8px; padding: 9px 6px; cursor: pointer; transition: all .15s; text-align: center; line-height: 1.3; }
.pub-svc-links a:hover { color: #fff; background: #2563eb; border-color: #2563eb; }
/* ====================== 校内新闻（门户） ====================== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.news-card { background: #fff; border: 1px solid #e8eef6; border-radius: 12px; padding: 16px 18px; cursor: pointer; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; gap: 8px; }
.news-card:hover { box-shadow: 0 6px 18px rgba(37, 99, 235, .12); transform: translateY(-2px); }
.news-card.lead { grid-column: span 2; }
.news-cat { align-self: flex-start; font-size: 12px; padding: 2px 10px; border-radius: 20px; background: #eff6ff; color: #2563eb; }
.news-cat[data-c='校园动态'] { background: #f0fdfa; color: #0d9488; }
.news-cat[data-c='通知'] { background: #fff7ed; color: #ea580c; }
.news-cat[data-c='媒体关注'] { background: #f5f3ff; color: #7c3aed; }
.news-title { font-size: 15px; font-weight: 600; color: #0f172a; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card.lead .news-title { font-size: 17px; }
.news-meta { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; margin-top: auto; }
@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr !important; }
  .news-card.lead { grid-column: span 1; }
  .pub-svc-links { grid-template-columns: repeat(2, 1fr); }
}

/* ====================== SIDEBAR LIGHT REDESIGN v2（标准后台布局：通栏行式 + 左高亮条；V4.3 变量化支持多主题） ====================== */
.sidebar { background: var(--sidebar-bg) !important; color: var(--sidebar-text) !important; border-right: 1px solid var(--sidebar-border); box-shadow: 2px 0 12px rgba(15, 23, 42, .04); }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sidebar-thumb); border-radius: 3px; }
.brand { padding: 18px 20px; border-bottom: 1px solid var(--sidebar-line); }
.brand b { color: var(--sidebar-title) !important; font-size: 16px; }
.brand small { color: var(--sidebar-sub) !important; font-size: 11px; }

/* 分组标题：灰字说明 + 右侧延伸细线，段落感清晰 */
.menu-group { display: flex; align-items: center; gap: 10px; padding: 18px 20px 8px !important; font-size: 14px; font-weight: 700; letter-spacing: 1px; color: var(--sidebar-group) !important; }
.menu-group::after { content: ''; flex: 1; height: 1px; background: var(--sidebar-group-line); }
.menu-group.toggle { cursor: pointer; user-select: none; }
.menu-group.toggle:hover { color: var(--sidebar-text) !important; }
.menu-group.toggle:hover::after { background: var(--sidebar-border); }

/* 菜单项：通栏行式，固定 44px 行高，激活项左侧 4px 高亮条 */
.menu-item { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 20px 0 26px !important; margin: 1px 0 !important; font-size: 16px; color: var(--sidebar-item) !important; border-left: none !important; border-radius: 0 !important; box-shadow: none !important; transition: background .15s, color .15s; }
.menu-item svg { width: 19px; height: 19px; flex: none; opacity: .8; }
.menu-item:hover { background: var(--sidebar-hover) !important; color: var(--sidebar-hover-text) !important; }
.menu-item.active { background: var(--sidebar-active-bg) !important; color: var(--sidebar-active-text) !important; font-weight: 600; }
.menu-item.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
.menu-item.active svg { opacity: 1; color: var(--primary); }
/* ====================== PORTAL HERO REDESIGN（参考首页 Banner：渐变主视觉 + 焦点卡片） ====================== */
.pub-hero { min-height: 380px; background: linear-gradient(120deg, #1d4ed8 0%, #2563eb 45%, #3b82f6 100%) !important; display: flex; align-items: center; position: relative; overflow: hidden; }
.pub-hero::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.08); top: -160px; right: -80px; }
.pub-hero::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.06); bottom: -140px; left: 16%; }
.pub-hero-inner { position: relative; z-index: 2; display: flex; align-items: center; gap: 40px; width: 100%; max-width: 1200px; margin: 0 auto; padding: 56px 4vw; color: #fff; }
.pub-hero-text { flex: 1.2; min-width: 0; }
.pub-hero-text h1 { font-size: 34px; line-height: 1.3; margin-bottom: 14px; }
.pub-hero-text p { font-size: 15px; opacity: .92; margin-bottom: 8px; }
.pub-hero-text .sub { font-size: 13px; opacity: .75; margin-bottom: 24px; }
.pub-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.pub-hero-btns .btn { padding: 11px 28px; font-size: 15px; }
.pub-hero-btns .btn.ghost { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.5); }
.pub-hero-card { flex: 1; max-width: 420px; background: linear-gradient(135deg, #0ea5e9, #10b981); border-radius: 18px; padding: 34px 30px; color: #fff; box-shadow: 0 18px 40px rgba(2, 6, 23, .35); position: relative; z-index: 2; }
.pub-hero-card h3 { font-size: 24px; margin-bottom: 10px; }
.pub-hero-card p { font-size: 14px; opacity: .95; margin-bottom: 18px; }
.pub-hero-card .dots { display: flex; gap: 6px; }
.pub-hero-card .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); }
.pub-hero-card .dots i.on { background: #fff; width: 18px; border-radius: 6px; }
@media (max-width: 900px) {
  .pub-hero { min-height: 0 !important; }
  .pub-hero-inner { flex-direction: column; align-items: flex-start; gap: 24px; padding: 36px 5vw; }
  .pub-hero-text h1 { font-size: 24px; }
  .pub-hero-card { max-width: 100%; width: 100%; padding: 24px 20px; }
}

/* ====================== PUB TWO-COL（新闻/公告左右分栏） ====================== */
.pub-cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; align-items: start; }
.pub-cols h2 { margin-top: 0; }
.pub-notice-card { padding: 6px 16px; }
.pub-cols .news-grid { grid-template-columns: repeat(2, 1fr); }
.pub-cols .news-card.lead { grid-column: span 2; }
@media (max-width: 1100px) {
  .pub-cols { grid-template-columns: 1fr; }
}

.pub-foot .ver { margin-left: 12px; padding: 1px 8px; border: 1px solid #e2e8f0; border-radius: 12px; font-size: 11px; color: #94a3b8; }

/* ====================== PUB CENTERED（门户整体居中，不通栏） ====================== */
.pub-sec { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.pub-foot { max-width: 1200px; margin: 0 auto; }
.pub-nav { padding-left: max(4vw, calc((100% - 1200px) / 2)); padding-right: max(4vw, calc((100% - 1200px) / 2)); }

/* ====================== CHART INTERACTIVE（图表动效 + 悬停提示） ====================== */
.chart-box { position: relative; }
.chart-box svg { display: block; }
.chart-box .bar { transform-box: fill-box; transform-origin: bottom; animation: bar-grow .7s cubic-bezier(.22, 1, .36, 1) backwards; transition: opacity .15s, filter .15s; cursor: pointer; }
.chart-box .bar:hover { opacity: 1 !important; filter: brightness(1.18) saturate(1.1); }
@keyframes bar-grow { from { transform: scaleY(0); } }
.chart-box .dot { transition: all .15s; cursor: pointer; }
.chart-box .dot:hover { r: 7; stroke-width: 3; filter: drop-shadow(0 0 5px rgba(37, 99, 235, .5)); }
.chart-box .cline { stroke-dasharray: 2200; stroke-dashoffset: 2200; animation: line-draw 1.3s cubic-bezier(.4, 0, .2, 1) .15s forwards; }
@keyframes line-draw { to { stroke-dashoffset: 0; } }
.chart-box path.slice { transition: transform .18s; transform-box: fill-box; transform-origin: center; cursor: pointer; }
.chart-box path.slice:hover { transform: scale(1.05); opacity: 1 !important; }
.chart-tip { position: absolute; left: 0; top: 0; pointer-events: none; background: rgba(15, 23, 42, .92); color: #fff; font-size: 12px; line-height: 1; padding: 6px 10px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .12s; z-index: 30; box-shadow: 0 4px 12px rgba(2, 6, 23, .25); }
.chart-tip.show { opacity: 1; }
.chart-tip::after { content: ''; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); border: 4px solid transparent; border-top-color: rgba(15, 23, 42, .92); border-bottom: none; }

/* ====================== DATA COCKPIT（校园画像 · 科技大数据驾驶舱） ====================== */
.cockpit { position: relative; background: radial-gradient(1200px 500px at 50% -60px, #0b2a6b 0%, transparent 60%), linear-gradient(160deg, #040e2b 0%, #061636 55%, #041029 100%); border-radius: 14px; padding: 18px 18px 22px; color: #cfe6ff; min-height: calc(100vh - 130px); overflow: hidden; }
/* V4.4.1: 已移除驾驶舱网格纹理背景（用户要求无网格主题） */
.ck-head { position: relative; display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.ck-title { flex: 0 0 auto; font-size: 26px; font-weight: 800; letter-spacing: 6px; color: #eaf6ff; text-shadow: 0 0 22px rgba(64, 170, 255, .75), 0 2px 0 rgba(6, 30, 80, .9); white-space: nowrap; }
.ck-head-side { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #7fa3d8; min-width: 0; }
.ck-head-side.left::before { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, rgba(64, 170, 255, .55)); }
.ck-head-side.right { justify-content: flex-end; }
.ck-head-side.right::after { content: ''; flex: 1; height: 2px; background: linear-gradient(270deg, transparent, rgba(64, 170, 255, .55)); }
.ck-head-side #ck-time { font-family: Consolas, monospace; font-size: 13px; color: #7de6ff; letter-spacing: 1px; }
.ck-fs { border: 1px solid rgba(88, 180, 255, .45); background: rgba(14, 50, 110, .55); color: #9fd8ff; font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.ck-fs:hover { background: rgba(30, 80, 160, .7); color: #fff; }
.ck-grid { position: relative; display: grid; grid-template-columns: 300px 1fr 330px; gap: 14px; align-items: start; }
.ck-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ck-panel { position: relative; background: linear-gradient(180deg, rgba(13, 42, 94, .55), rgba(8, 26, 64, .65)); border: 1px solid rgba(64, 140, 255, .28); border-radius: 8px; padding: 12px 14px 14px; box-shadow: inset 0 0 30px rgba(24, 90, 200, .12); }
.ck-panel::before, .ck-panel::after { content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none; }
.ck-panel::before { left: -1px; top: -1px; border-left: 2px solid #37d5ff; border-top: 2px solid #37d5ff; border-top-left-radius: 8px; }
.ck-panel::after { right: -1px; bottom: -1px; border-right: 2px solid #37d5ff; border-bottom: 2px solid #37d5ff; border-bottom-right-radius: 8px; }
.ck-panel h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #bfe0ff; letter-spacing: 2px; display: flex; align-items: center; gap: 8px; }
.ck-panel h3::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #37d5ff, #2563eb); box-shadow: 0 0 8px rgba(55, 213, 255, .8); }
.ck-digits { display: flex; gap: 7px; flex-wrap: wrap; margin: 6px 0 8px; }
.ck-digits span { display: inline-flex; width: 40px; height: 54px; align-items: center; justify-content: center; background: linear-gradient(180deg, #0d3070, #071c4c); border: 1px solid rgba(77, 180, 255, .4); border-radius: 7px; font-family: Consolas, monospace; font-size: 34px; font-weight: 800; color: #5ee2ff; text-shadow: 0 0 16px rgba(94, 226, 255, .75); animation: ck-pop .5s backwards; }
.ck-digits span:nth-child(2n) { animation-delay: .08s; } .ck-digits span:nth-child(3n) { animation-delay: .16s; }
@keyframes ck-pop { from { transform: translateY(10px); opacity: 0; } }
.ck-sub { font-size: 12px; color: #7fa3d8; letter-spacing: 1px; }
.ck-rings { display: flex; justify-content: space-around; gap: 8px; background: linear-gradient(180deg, rgba(13, 42, 94, .55), rgba(8, 26, 64, .65)); border: 1px solid rgba(64, 140, 255, .28); border-radius: 8px; padding: 14px 10px 10px; }
.ck-ring { position: relative; width: 148px; max-width: 24%; }
.ck-ring svg { width: 100%; display: block; }
.ck-ring-on { transition: stroke-dashoffset 1.1s cubic-bezier(.22, 1, .36, 1); animation: ck-ring-in 1.2s cubic-bezier(.22, 1, .36, 1) backwards; }
@keyframes ck-ring-in { from { stroke-dashoffset: 327; } }
.ck-ring-c { position: absolute; inset: 0 0 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ck-ring-c b { font-family: Consolas, monospace; font-size: 22px; font-weight: 800; color: #7de6ff; text-shadow: 0 0 12px rgba(94, 226, 255, .6); }
.ck-ring-c span { font-size: 12px; color: #b8d4ff; }
.ck-ring-c i { font-style: normal; font-size: 11px; color: #4de2ff; opacity: .85; }
.ck-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ck-kpi { background: linear-gradient(180deg, rgba(13, 42, 94, .5), rgba(8, 26, 64, .6)); border: 1px solid rgba(64, 140, 255, .24); border-radius: 8px; text-align: center; padding: 10px 6px 9px; }
.ck-kpi b { display: block; font-family: Consolas, monospace; font-size: 22px; font-weight: 800; }
.ck-kpi span { display: block; margin-top: 3px; font-size: 12px; color: #9db8e8; }
.chart-box .ck-bar { transform-box: fill-box; transform-origin: bottom; animation: bar-grow .7s cubic-bezier(.22, 1, .36, 1) backwards; transition: filter .15s; cursor: pointer; }
.chart-box .ck-bar:hover { filter: brightness(1.35) drop-shadow(0 0 6px rgba(55, 213, 255, .8)); }
.ck-rank { display: flex; flex-direction: column; gap: 9px; }
.ck-rank-row { display: grid; grid-template-columns: 24px 70px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; color: #b8d4ff; }
.ck-rank-row .rk { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; background: rgba(56, 132, 255, .18); color: #7fa3d8; font-size: 12px; font-weight: 700; }
.ck-rank-row .rk.top { background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; box-shadow: 0 0 10px rgba(55, 180, 255, .55); }
.ck-rank-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-rank-row .tr { height: 9px; border-radius: 5px; background: rgba(56, 132, 255, .13); overflow: hidden; }
.ck-rank-row .tr i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #0e4ecf, #37d5ff); box-shadow: 0 0 8px rgba(55, 213, 255, .5); transform-origin: left; animation: ck-grow .9s cubic-bezier(.22, 1, .36, 1) backwards; }
@keyframes ck-grow { from { transform: scaleX(0); } }
.ck-rank-row b { font-family: Consolas, monospace; color: #7de6ff; text-align: right; }
.ck-lg { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #b8d4ff; }
.ck-lg span { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ck-lg b { margin-left: auto; font-family: Consolas, monospace; color: #7de6ff; }
.ck-search .ck-srow { display: flex; gap: 8px; margin-bottom: 8px; }
.ck-search input { flex: 1; background: rgba(7, 24, 60, .8); border: 1px solid rgba(64, 140, 255, .35); border-radius: 6px; color: #cfe6ff; padding: 8px 10px; font-size: 13px; outline: none; }
.ck-search input:focus { border-color: #37d5ff; box-shadow: 0 0 0 2px rgba(55, 213, 255, .18); }
.ck-btn { border: none; border-radius: 6px; background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; font-size: 13px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.ck-btn:hover { filter: brightness(1.15); }
.ck-li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #b8d4ff; padding: 7px 2px; border-bottom: 1px dashed rgba(88, 140, 255, .2); }
.ck-li b { color: #7de6ff; font-weight: 600; text-align: right; }
.ck-empty { font-size: 12.5px; color: #7fa3d8; padding: 8px 2px; }
@media (max-width: 1200px) { .ck-grid { grid-template-columns: 1fr 1fr; } .ck-mid { grid-column: span 2; order: -1; } }
@media (max-width: 760px) { .ck-grid { grid-template-columns: 1fr; } .ck-mid { grid-column: span 1; } .ck-title { font-size: 19px; letter-spacing: 3px; } .ck-rings { flex-wrap: wrap; } .ck-ring { max-width: 45%; } }

/* ================= V4.2 高校级业务升级样式 ================= */
.muted { color: var(--text-sub); font-size: 12.5px; }
.b-yellow { background: #fef9c3; color: #a16207; }

/* 统计卡组（学生学籍 / 成绩分析 / 就业看板 / 成绩单） */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-left: 4px solid #cbd5e1; }
.stat-card b { display: block; font-size: 22px; font-weight: 700; line-height: 1.25; }
.stat-card span { font-size: 12px; color: var(--text-sub); }
.stat-card.c-blue { border-left-color: #2563eb; } .stat-card.c-blue b { color: #1d4ed8; }
.stat-card.c-green { border-left-color: #10b981; } .stat-card.c-green b { color: #047857; }
.stat-card.c-orange { border-left-color: #f59e0b; } .stat-card.c-orange b { color: #b45309; }
.stat-card.c-red { border-left-color: #ef4444; } .stat-card.c-red b { color: #b91c1c; }
.stat-card.c-purple { border-left-color: #8b5cf6; } .stat-card.c-purple b { color: #6d28d9; }
.stat-card.c-gray { border-left-color: #94a3b8; } .stat-card.c-gray b { color: #475569; }

/* 学籍页快捷筛选 chips */
.stat-chips .qchip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.qchip-title { font-size: 12.5px; color: var(--text-sub); }
.qchip { border: 1px solid var(--border); background: var(--input-bg); color: var(--text); border-radius: 20px; padding: 5px 14px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.qchip:hover { border-color: var(--primary); color: var(--primary); }
.qchip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 工具栏一键引擎按钮 */
.btn.warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.btn.warn:hover { background: #fef3c7; }

/* 行级业务操作按钮 */
.link-btn.act { color: #047857; font-weight: 600; }
.link-btn.act.danger { color: var(--red); }
.link-btn.act:hover { text-decoration: underline; }

/* 双列仪表行 + 键值行 */
.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 1100px) { .dash-row { grid-template-columns: 1fr; } }
.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv-row span { color: var(--text-sub); }
.kv-row b { text-align: right; }
.kv-row:last-child { border-bottom: none; }

/* GPA / 就业率排名条 */
.rank-list { display: flex; flex-direction: column; gap: 9px; }
.rank-row { display: flex; align-items: center; gap: 10px; }
.rank-no { width: 24px; height: 24px; border-radius: 50%; background: var(--card-2); color: var(--text-sub); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-no.top { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.rank-info { min-width: 150px; }
.rank-info b { font-size: 13px; display: block; }
.rank-info span { font-size: 11.5px; color: var(--text-sub); }
.rank-bar { flex: 1; height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #2563eb); border-radius: 6px; }
.rank-val { font-size: 14px; color: var(--primary); min-width: 40px; text-align: right; }
.pass-bar { display: inline-block; width: 90px; height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.pass-bar i { display: block; height: 100%; background: #10b981; border-radius: 6px; }
.pass-bar i.low { background: #ef4444; }
.fc-fail { color: #b91c1c; font-weight: 600; }

/* 智能课表周网格 */
.tt-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.tt-grid thead th { padding: 8px 4px; background: var(--card-2); border-radius: 6px; font-size: 12.5px; color: var(--text-sub); }
.tt-grid .tt-sec { width: 64px; background: var(--card-2); border-radius: 6px; font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.tt-cell { vertical-align: top; background: var(--card-2); border: 1px dashed var(--border); border-radius: 8px; min-height: 74px; padding: 3px; }
.tt-item { display: block; background: #dbeafe; border-left: 3px solid #2563eb; border-radius: 6px; padding: 6px 8px; margin-bottom: 3px; font-size: 12px; line-height: 1.45; }
.tt-item b { display: block; color: #1e40af; font-size: 12.5px; }
.tt-item span { display: block; color: #3b82f6; }
.tt-item.prac { background: #fef3c7; border-left-color: #d97706; }
.tt-item.prac b { color: #92400e; } .tt-item.prac span { color: #b45309; }
.tt-item.conflict { background: #fee2e2; border-left-color: #dc2626; }
.tt-item.conflict b { color: #b91c1c; } .tt-item.conflict span { color: #dc2626; }
.tt-item em { font-style: normal; color: #dc2626; font-weight: 700; font-size: 11px; }
.tt-conf-badge { background: #fee2e2; color: #b91c1c; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 20px; }
.tt-ok-badge { background: #dcfce7; color: #15803d; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 20px; }
.conf-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.conf-row { background: #fef2f2; border: 1px solid #fecaca; border-left: 3px solid #dc2626; color: #7f1d1d; border-radius: 6px; padding: 8px 12px; font-size: 12.5px; }

/* 成绩单中心 */
.tr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tr-avatar { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, #38bdf8, #2563eb); color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tr-stu b { font-size: 17px; display: block; }
.tr-stu span { font-size: 12.5px; color: var(--text-sub); }
.gr-inline { display: flex; gap: 8px; align-items: center; }

/* ====================== V4.3 多主题系统（html[data-theme] 变量覆盖） ======================
 * V4.4.1 重设计：① 移除全部网格纹理背景（body::before / 驾驶舱网格）与毛玻璃、发光特效；
 * ② 每个主题完整覆盖变量集，文字/背景对比度逐项校准（浅底深字、深底浅字）；
 * ③ 基础组件硬编码浅色（表头/ghost 按钮/hover 行等）已改为 var(--card-2)/var(--line)/var(--input-bg)。
 * classic 经典学院蓝（浅色·基准） / tech-blue 深空科技蓝（深色） / emerald 翡翠青 /
 * violet 紫气东来 / sunset 落日暖橙 / ink 墨韵深灰（深色）
 * 主题由前端 applyTheme() 写入 <html data-theme>，全局默认值存 sys_params.ui_theme */
html[data-theme="classic"] {
  /* 与 :root 默认一致（经典学院蓝浅色），显式占位便于阅读 */
}

/* ---- tech-blue 深空科技蓝（深色·纯色无纹理） ---- */
html[data-theme="tech-blue"] {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg: #060f28;
  --card: #0d1d42;
  --card-2: #132754;
  --line: #1c3467;
  --text: #e6eeff;
  --text-sub: #9db8e6;
  --border: #24406f;
  --input-bg: #0a1834;
  --chip-bg: rgba(59, 130, 246, .18);
  --sidebar-bg: #04102a;
  --sidebar-text: #a9c3ee;
  --sidebar-item: #b3cbf1;
  --sidebar-title: #f0f6ff;
  --sidebar-sub: #6d8fc7;
  --sidebar-group: #7fa0d4;
  --sidebar-line: rgba(120, 165, 255, .16);
  --sidebar-group-line: rgba(120, 165, 255, .18);
  --sidebar-hover: rgba(80, 140, 255, .16);
  --sidebar-hover-text: #f0f6ff;
  --sidebar-active-bg: rgba(70, 140, 255, .28);
  --sidebar-active-text: #8fc6ff;
  --sidebar-border: rgba(120, 165, 255, .22);
  --sidebar-thumb: rgba(120, 165, 255, .38);
  --shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 8px 22px rgba(0, 0, 0, .38);
  color-scheme: dark;
}
html[data-theme="tech-blue"] .batch-bar { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
html[data-theme="tech-blue"] .chart-box text { fill: #b3cbf1; }
html[data-theme="tech-blue"] input, html[data-theme="tech-blue"] select, html[data-theme="tech-blue"] textarea { background: var(--input-bg); color: var(--text); }
/* 深色底统计卡数字提亮（基础深色数字在深底不可读） */
html[data-theme="tech-blue"] .stat-card.c-blue b { color: #7db2ff; }
html[data-theme="tech-blue"] .stat-card.c-green b { color: #4ade80; }
html[data-theme="tech-blue"] .stat-card.c-orange b { color: #fbbf24; }
html[data-theme="tech-blue"] .stat-card.c-red b { color: #f87171; }
html[data-theme="tech-blue"] .stat-card.c-purple b { color: #c4b5fd; }
html[data-theme="tech-blue"] .stat-card.c-gray b { color: #cbd5e1; }
html[data-theme="tech-blue"] .fc-fail { color: #f87171; }
html[data-theme="tech-blue"] .toggle.on { background: rgba(251, 191, 36, .2); color: #fbbf24; }
html[data-theme="tech-blue"] .notice-item .pin { background: rgba(248, 113, 113, .18); color: #fca5a5; }

/* ---- emerald 翡翠青（浅色·深绿侧栏） ---- */
html[data-theme="emerald"] {
  --primary: #059669;
  --primary-dark: #047857;
  --bg: #eef6f1;
  --card: #ffffff;
  --card-2: #f1f8f4;
  --line: #e6f0ea;
  --text: #1b2b24;
  --text-sub: #5c7268;
  --border: #d8e7de;
  --input-bg: #ffffff;
  --chip-bg: #d1fae5;
  --sidebar-bg: #06382b;
  --sidebar-text: #c6e6d8;
  --sidebar-item: #d0ecdf;
  --sidebar-title: #ffffff;
  --sidebar-sub: #7fb8a1;
  --sidebar-group: #93ccb8;
  --sidebar-line: rgba(255, 255, 255, .14);
  --sidebar-group-line: rgba(255, 255, 255, .16);
  --sidebar-hover: rgba(255, 255, 255, .09);
  --sidebar-hover-text: #ffffff;
  --sidebar-active-bg: rgba(16, 185, 129, .32);
  --sidebar-active-text: #d1fae5;
  --sidebar-border: rgba(255, 255, 255, .14);
  --sidebar-thumb: rgba(255, 255, 255, .3);
  --shadow: 0 1px 3px rgba(6, 56, 43, .08), 0 4px 14px rgba(6, 56, 43, .06);
}

/* ---- violet 紫气东来（浅色·深紫侧栏） ---- */
html[data-theme="violet"] {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --bg: #f6f4fb;
  --card: #ffffff;
  --card-2: #f7f5fd;
  --line: #edeaf6;
  --text: #251f36;
  --text-sub: #6b6484;
  --border: #e2dcf1;
  --input-bg: #ffffff;
  --chip-bg: #ede9fe;
  --sidebar-bg: #26124c;
  --sidebar-text: #dcd0f6;
  --sidebar-item: #e3d8f8;
  --sidebar-title: #ffffff;
  --sidebar-sub: #9d86cf;
  --sidebar-group: #ae9adc;
  --sidebar-line: rgba(255, 255, 255, .14);
  --sidebar-group-line: rgba(255, 255, 255, .16);
  --sidebar-hover: rgba(255, 255, 255, .09);
  --sidebar-hover-text: #ffffff;
  --sidebar-active-bg: rgba(139, 92, 246, .34);
  --sidebar-active-text: #ede9fe;
  --sidebar-border: rgba(255, 255, 255, .14);
  --sidebar-thumb: rgba(255, 255, 255, .3);
  --shadow: 0 1px 3px rgba(38, 18, 76, .08), 0 4px 14px rgba(38, 18, 76, .06);
}

/* ---- sunset 落日暖橙（浅色·深赭侧栏） ---- */
html[data-theme="sunset"] {
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --bg: #fbf5ee;
  --card: #ffffff;
  --card-2: #fdf7f0;
  --line: #f5ecdf;
  --text: #322115;
  --text-sub: #7d6a58;
  --border: #ecdbc6;
  --input-bg: #ffffff;
  --chip-bg: #ffedd5;
  --sidebar-bg: #472006;
  --sidebar-text: #f5dcc2;
  --sidebar-item: #f9e4cd;
  --sidebar-title: #ffffff;
  --sidebar-sub: #c29468;
  --sidebar-group: #d4a97c;
  --sidebar-line: rgba(255, 255, 255, .14);
  --sidebar-group-line: rgba(255, 255, 255, .16);
  --sidebar-hover: rgba(255, 255, 255, .09);
  --sidebar-hover-text: #ffffff;
  --sidebar-active-bg: rgba(249, 115, 22, .32);
  --sidebar-active-text: #ffedd5;
  --sidebar-border: rgba(255, 255, 255, .14);
  --sidebar-thumb: rgba(255, 255, 255, .3);
  --shadow: 0 1px 3px rgba(71, 32, 6, .08), 0 4px 14px rgba(71, 32, 6, .06);
}

/* ---- ink 墨韵深灰（深色·中性蓝紫·纯色无纹理） ---- */
html[data-theme="ink"] {
  --primary: #8aa4f8;
  --primary-dark: #6d8ee8;
  --bg: #0f1118;
  --card: #171a24;
  --card-2: #1e2231;
  --line: #293048;
  --text: #e3e7f0;
  --text-sub: #9aa3ba;
  --border: #303854;
  --input-bg: #131620;
  --chip-bg: rgba(138, 164, 248, .16);
  --sidebar-bg: #12141d;
  --sidebar-text: #a2abc0;
  --sidebar-item: #adb6ca;
  --sidebar-title: #e9edf5;
  --sidebar-sub: #5d6579;
  --sidebar-group: #727b91;
  --sidebar-line: rgba(138, 164, 248, .14);
  --sidebar-group-line: rgba(138, 164, 248, .16);
  --sidebar-hover: rgba(138, 164, 248, .13);
  --sidebar-hover-text: #e9edf5;
  --sidebar-active-bg: rgba(138, 164, 248, .2);
  --sidebar-active-text: #b0c6ff;
  --sidebar-border: rgba(138, 164, 248, .2);
  --sidebar-thumb: rgba(138, 164, 248, .32);
  --shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 8px 22px rgba(0, 0, 0, .36);
  color-scheme: dark;
}
html[data-theme="ink"] .batch-bar { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
html[data-theme="ink"] .chart-box text { fill: #a8b2ca; }
html[data-theme="ink"] input, html[data-theme="ink"] select, html[data-theme="ink"] textarea { background: var(--input-bg); color: var(--text); }
/* 深色底统计卡数字提亮（基础深色数字在深底不可读） */
html[data-theme="ink"] .stat-card.c-blue b { color: #8ab4ff; }
html[data-theme="ink"] .stat-card.c-green b { color: #4ade80; }
html[data-theme="ink"] .stat-card.c-orange b { color: #fbbf24; }
html[data-theme="ink"] .stat-card.c-red b { color: #f87171; }
html[data-theme="ink"] .stat-card.c-purple b { color: #c4b5fd; }
html[data-theme="ink"] .stat-card.c-gray b { color: #cbd5e1; }
html[data-theme="ink"] .fc-fail { color: #f87171; }
html[data-theme="ink"] .toggle.on { background: rgba(251, 191, 36, .2); color: #fbbf24; }
html[data-theme="ink"] .notice-item .pin { background: rgba(248, 113, 113, .18); color: #fca5a5; }

/* ---- V4.3 主题选择器 / 角色权限页组件（双主题安全） ---- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.theme-card { border: 2px solid var(--border); border-radius: 12px; padding: 8px; cursor: pointer; text-align: center; transition: border-color .15s, box-shadow .15s; background: var(--card); }
.theme-card:hover { border-color: var(--primary); }
.theme-card.on { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, .18); }
.theme-prev { height: 64px; border-radius: 8px; position: relative; overflow: hidden; margin-bottom: 6px; }
.theme-prev::after { content: ''; position: absolute; left: 0; bottom: 0; top: 26px; right: 55%; background: rgba(255, 255, 255, .12); }
.theme-prev i { position: absolute; width: 38%; height: 10px; border-radius: 5px; right: 8px; }
.theme-prev i:first-child { top: 12px; }
.theme-prev i:last-child { top: 30px; width: 24%; }
.theme-name { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }
.role-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: background .12s; }
.role-row:hover { background: var(--card-2); }
.role-row.on { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); }
.role-row small { color: var(--text-sub); margin-left: auto; font-size: 11px; }
.role-row .role-row-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.perm-groups h4 { margin: 14px 0 4px; font-size: 13px; color: var(--text-sub); letter-spacing: 1px; }
.perm-row { display: flex; align-items: center; gap: 14px; padding: 6px 8px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.perm-row .perm-name { flex: 1; min-width: 0; }
.perm-row label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 12.5px; color: var(--text-sub); }
.perm-head { display: flex; gap: 14px; padding: 4px 8px 8px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-sub); }
.perm-head span { flex: 1; }
.perm-head .perm-ck { width: 168px; display: flex; gap: 14px; flex: none; }

/* ====================== V4.4 H5 自适应重设计（移动端全面适配） ====================== */
/* 页面头（通用）：标题 + 说明 + 操作区 */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; margin: 0; }

/* 断点一：≤900px（平板竖屏 / 手机，与侧边栏抽屉同断点） */
@media (max-width: 900px) {
  /* —— 模块列表：表格 → 卡片列表（td 的 data-label 由 mobilizeTables 自动填充） —— */
  .tbl-wrap { overflow-x: visible; }
  table.tbl, table.tbl tbody { display: block; width: 100%; }
  table.tbl thead { display: none; }
  table.tbl tr { display: block; position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 6px 14px; margin-bottom: 10px; background: var(--card); box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
  table.tbl td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border); white-space: normal; word-break: break-all; font-size: 13px; background: transparent !important; }
  table.tbl td:last-child { border-bottom: none; }
  table.tbl td[data-label]::before { content: attr(data-label); flex: none; max-width: 42%; font-size: 12px; color: var(--text-sub); font-weight: 600; text-align: left; }
  table.tbl td.actions { flex-wrap: wrap; justify-content: flex-start; gap: 2px 6px; }
  table.tbl td.actions::before { width: 100%; flex-basis: 100%; }
  table.tbl td[colspan] { justify-content: center; color: var(--text-sub); padding: 16px 0; border-bottom: none; }
  .ck-row { transform: scale(1.2); }
  /* —— 工具栏：搜索框整行、筛选/按钮自动换行 —— */
  .toolbar .search-input { flex: 1 1 100%; order: -1; padding: 10px 12px; }
  .filter-select { flex: 1 1 auto; max-width: none; min-width: 0; padding: 10px; }
  /* —— 触控友好：按钮 / 行内操作加大 —— */
  .btn { padding: 10px 16px; font-size: 14px; }
  .btn.sm { padding: 8px 12px; }
  .link-btn { font-size: 13px; padding: 6px 8px; }
  .pager { justify-content: center; flex-wrap: wrap; }
  .pager .btn { padding: 8px 14px; }
  .batch-bar { flex-wrap: wrap; gap: 8px; }
  /* —— 模态：底部抽屉式 + 表单单列 + 16px 防 iOS 聚焦缩放 —— */
  .modal-mask { align-items: flex-end; }
  .modal { width: 100vw; max-width: 100vw; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .form-grid { grid-template-columns: 1fr !important; }
  .form-item input, .form-item select, .form-item textarea { padding: 11px 12px; font-size: 16px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
  /* —— 布局细节 —— */
  .page-head h1 { font-size: 18px; }
  .content { padding: 12px 12px 32px; }
  .topbar { height: 50px; }
  .topbar .crumb { font-size: 14px; }
  .stat { padding: 12px 14px; }
  .stat .num { font-size: 19px; }
  .chart-box svg { max-width: 100%; }
  .card { padding: 14px; }
}
/* 断点二：≤480px（小屏手机） */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .stat .icon { width: 38px; height: 38px; font-size: 17px; }
  .stat .num { font-size: 17px; }
  .pub-hero-text h1 { font-size: 21px !important; }
  .pub-hero-btns .btn { flex: 1 1 100%; text-align: center; }
  .login-tabs .lt { padding: 10px 0; }
  .sidebar { width: 80vw; max-width: 300px; }
  .menu-item { font-size: 15px; }
  .app-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

