/* 听课记录系统 · 修订版 —— 界面样式 */
:root {
  --primary: #1F4E79;
  --primary-2: #2E6DA4;
  --accent: #2E8B57;
  --warn: #E0922F;
  --danger: #D64545;
  --bg: #F2F5F9;
  --card: #FFFFFF;
  --line: #E3E9F0;
  --text: #1F2937;
  --text-2: #64748B;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(31, 78, 121, 0.07), 0 1px 3px rgba(31, 78, 121, 0.06);
  --shadow-lg: 0 10px 40px rgba(15, 40, 80, 0.18);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
svg { max-width: 100%; height: auto; }
.donut-svg { width: 260px; max-width: 100%; height: auto; margin: 0 auto; display: block; }
.donut-svg + .legend { justify-content: center; }
.tbl td, .tbl th { overflow-wrap: anywhere; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 0.92rem; color: var(--text); }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr;
  background: linear-gradient(135deg, #122A43 0%, #1F4E79 48%, #2E6DA4 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.login-wrap::before {
  width: 520px; height: 520px; left: -140px; bottom: -180px;
  background: radial-gradient(circle, rgba(224,146,47,0.22) 0%, transparent 68%);
}
.login-wrap::after {
  width: 640px; height: 640px; right: 30%; top: -260px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 65%);
}
.uni-row { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.uni-plate {
  width: 68px; height: 68px; background: #fff; border-radius: 50%;
  padding: 5px; flex: none; display: flex;
  box-shadow: 0 6px 20px rgba(0,0,0,0.30), 0 0 0 1px rgba(255,255,255,0.35);
}
.uni-plate img { width: 100%; height: 100%; object-fit: contain; }
.uni-name b { display: block; font-size: 1.5rem; letter-spacing: 5px; color: #fff; font-weight: 700; }
.uni-name i { font-style: normal; display: block; font-size: 0.72rem; letter-spacing: 2.5px; opacity: 0.65; margin-top: 3px; }
.card-uni {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.88rem; letter-spacing: 3px; color: var(--primary); font-weight: 600;
  margin-bottom: 14px;
}
.card-uni img { width: 24px; height: 24px; object-fit: contain; }
.login-hero { color: #EAF2FA; padding: 9vh 6vw; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.login-badge {
  display: inline-block; width: fit-content; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25); padding: 7px 16px; border-radius: 999px;
  font-size: 0.82rem; letter-spacing: 1.5px; margin-bottom: 30px; backdrop-filter: blur(3px);
}
.login-hero h1 { font-size: 3rem; letter-spacing: 6px; margin-bottom: 20px; font-weight: 800; }
.login-hero h1 em {
  font-style: normal; display: block; font-size: 1rem; letter-spacing: 2px; font-weight: 400;
  opacity: 0.75; margin-top: 10px;
}
.login-hero p { font-size: 1rem; opacity: 0.88; line-height: 2.1; margin-bottom: 6px; }
.login-rule {
  display: flex; gap: 0; margin: 26px 0 30px; border-radius: 14px; overflow: hidden;
  max-width: 430px; box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.login-rule div {
  flex: 1; background: rgba(255,255,255,0.12); backdrop-filter: blur(3px);
  padding: 14px 6px; text-align: center; border-right: 1px solid rgba(255,255,255,0.18);
}
.login-rule div:last-child { border-right: none; }
.login-rule b { display: block; font-size: 1.45rem; font-weight: 800; color: #FFD9A0; }
.login-rule i { font-style: normal; font-size: 0.76rem; opacity: 0.85; }
.login-feats { display: flex; flex-wrap: wrap; gap: 10px; }
.login-feats span {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px; border-radius: 10px; font-size: 0.88rem; letter-spacing: 1px;
}
.login-card {
  background: #fff; margin: 7vh 5vw 7vh 0; border-radius: 22px; box-shadow: var(--shadow-lg);
  padding: 40px 44px; align-self: center; position: relative; z-index: 1;
  width: min(480px, 92%);
}
.login-card h2 { font-size: 1.35rem; margin-bottom: 6px; color: var(--primary); letter-spacing: 2px; }
.login-sub { color: var(--text-2); font-size: 0.86rem; margin-bottom: 22px; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.role-card {
  --rc: #1F4E79;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  border: 1.5px solid var(--line); background: #FAFBFD; border-radius: 14px;
  padding: 16px 6px 14px; transition: all .16s; min-height: 86px;
}
.role-dot {
  width: 30px; height: 30px; border-radius: 10px; background: var(--rc);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--rc) 45%, transparent);
  position: relative;
}
.role-dot::after {
  content: ""; position: absolute; inset: 7px; border-radius: 5px;
  background: rgba(255,255,255,0.85); clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
}
.role-card b { color: var(--text); font-size: 0.98rem; letter-spacing: 1px; white-space: nowrap; }
.role-card:hover { border-color: var(--rc); transform: translateY(-3px); box-shadow: 0 8px 20px color-mix(in srgb, var(--rc) 22%, transparent); }
.role-card.active {
  border-color: var(--rc); background: color-mix(in srgb, var(--rc) 7%, white);
  box-shadow: inset 0 0 0 1.5px var(--rc);
}
.role-card.active b { color: var(--rc); }
.role-card.role-admin { --rc: #5B4B8A; }
.login-form label { display: block; font-size: 0.85rem; color: var(--text-2); margin: 14px 0 6px; }
.login-form input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 14px; outline: none;
  transition: all .15s;
}
.login-form input:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(46,109,164,0.12); }
.login-tip { margin-top: 14px; font-size: 0.78rem; color: var(--text-2); text-align: center; }

/* ============ 主框架 ============ */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #16324F 0%, #1F4E79 100%);
  color: #DCE7F2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.brand .logo {
  width: 42px; height: 42px; background: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 3px; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.brand .logo img { width: 100%; height: 100%; object-fit: contain; }
.brand b { display: block; font-size: 1rem; color: #fff; letter-spacing: 1px; }
.brand i { font-style: normal; font-size: 0.7rem; opacity: 0.65; }
.sidebar nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; color: #C6D6E6; padding: 11px 14px;
  border-radius: 10px; font-size: 0.95rem; text-align: left; transition: all .15s;
}
.nav-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-btn.active { background: rgba(255,255,255,0.16); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #E0922F; }
.nav-ic { width: 20px; text-align: center; opacity: 0.9; }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,0.12); }
.user-chip { --uc: #E0922F; background: rgba(255,255,255,0.08); border-left: 3px solid var(--uc); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.user-chip b { color: #fff; display: block; font-size: 0.95rem; }
.user-chip i { font-style: normal; font-size: 0.74rem; opacity: 0.7; display: block; margin-top: 2px; }

.content { padding: 26px 32px 60px; max-width: 1280px; min-width: 0; }
.sidebar { min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; color: var(--primary); letter-spacing: 1px; }
.page-head p { color: var(--text-2); font-size: 0.84rem; margin-top: 4px; }
.head-actions { display: flex; gap: 10px; align-items: center; }

/* ============ 通用组件 ============ */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; margin-bottom: 18px;
}
.card h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: 14px; }
.card h3 small { color: var(--text-2); font-weight: 400; font-size: 0.8rem; }
.card h4 { font-size: 0.98rem; color: var(--primary); margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 18px; }

.btn {
  border: 1.5px solid var(--line); background: #fff; color: var(--text);
  padding: 9px 18px; border-radius: 10px; font-size: 0.92rem; transition: all .15s;
}
.btn:hover { border-color: var(--primary-2); color: var(--primary-2); }
.btn.primary { background: linear-gradient(135deg, #1F4E79, #2E6DA4); border: none; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: #DCE7F2; }
.btn.ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn.danger { background: var(--danger); border: none; color: #fff; }
.btn.block { display: block; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; white-space: nowrap;
}
.score-chip { font-weight: 700; font-size: 0.85rem; }
.score-chip small { font-weight: 400; opacity: 0.7; font-size: 0.7rem; }

.kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-row-4 { grid-template-columns: repeat(4, 1fr); }
.kpi {
  --kc: #1F4E79;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; border-top: 3px solid var(--kc);
}
.kpi b { font-size: 1.7rem; color: var(--kc); font-weight: 800; }
.kpi b small { font-size: 0.8rem; font-weight: 400; color: var(--text-2); margin-left: 3px; }
.kpi i { font-style: normal; display: block; color: var(--text-2); font-size: 0.8rem; margin-top: 2px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tbl th { text-align: left; color: var(--text-2); font-weight: 600; padding: 9px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: #F6F9FC; }
.tbl td i { font-style: normal; display: block; color: var(--text-2); font-size: 0.76rem; }
.tbl .empty { text-align: center; color: var(--text-2); padding: 30px; }
.tbl .mono { font-family: Consolas, monospace; color: var(--primary-2); white-space: nowrap; }
.tbl .ops { white-space: nowrap; }
.tbl .row-n { background: #F4F6FA; }
.tbl .row-low { background: #FDF3F3; }
.table-wrap { overflow-x: auto; }
.guide-cell { color: var(--text-2); font-size: 0.8rem; max-width: 420px; }
.dim-row td { background: #E9F0F7; font-weight: 700; color: var(--primary); }
.sub-row td { background: #F5F8FB; font-weight: 600; color: #33475C; font-size: 0.84rem; }

.mini {
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 4px 10px; font-size: 0.78rem; color: var(--primary-2);
}
.mini:hover { background: #EEF4FA; }
.mini.danger { color: var(--danger); }
.mini.danger:hover { background: #FDF0F0; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 18px; }
.filter-bar select, .filter-bar input {
  border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 12px; outline: none; background: #fff;
}
.filter-bar input { flex: 1; min-width: 180px; }
.big-select { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 14px; min-width: 220px; background: #fff; }

.muted { color: var(--text-2); font-size: 0.88rem; margin-bottom: 10px; }
.empty-card { text-align: center; color: var(--text-2); padding: 40px; }

/* ============ 录入页 ============ */
.entry-layout { display: grid; grid-template-columns: 1fr 292px; gap: 18px; align-items: start; }
.entry-main .card { margin-bottom: 16px; }
.frm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 14px; }
.frm-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 0.8rem; color: var(--text-2); }
.frm-grid .wide { grid-column: 1 / -1; }
.frm-grid input, .frm-grid select, .frm-grid textarea {
  border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 11px; outline: none; width: 100%;
  background: #fff; resize: vertical;
}
.frm-grid input:focus, .frm-grid select:focus, .frm-grid textarea:focus {
  border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(46,109,164,0.12);
}
.frm-grid input[readonly] { background: #F3F6FA; color: var(--text-2); }

.dim-block { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.dim-head {
  display: flex; justify-content: space-between; padding: 10px 16px;
  background: linear-gradient(90deg, #1F4E79, #2E6DA4); color: #fff; font-size: 0.95rem;
}
.dim-head span { font-weight: 600; opacity: 0.9; }
.sub-head {
  display: flex; justify-content: space-between; padding: 8px 16px;
  background: #EDF3F9; color: #33475C; font-size: 0.85rem; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.sub-head span { font-weight: 400; color: var(--text-2); }
.item-row { padding: 12px 16px; border-bottom: 1px solid #EEF2F6; transition: background .2s; }
.item-row:last-child { border-bottom: none; }
.item-row.need-fact { background: #FFFDF5; }
.item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-code {
  font-family: Consolas, monospace; font-size: 0.78rem; color: var(--primary-2);
  background: #EEF4FA; border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}
.item-name { flex: 1; font-size: 0.92rem; min-width: 240px; }
.n-tag { font-style: normal; font-size: 0.7rem; color: #8A94A6; border: 1px dashed #C4CEDA; border-radius: 6px; padding: 1px 6px; margin-left: 8px; }
.item-score { min-width: 52px; text-align: right; }
.max-mark { color: #B6C0CC; }
.n-mark { color: #8A94A6; font-weight: 800; font-size: 1.05rem; }
.item-guide summary {
  cursor: pointer; font-size: 0.78rem; color: var(--primary-2); margin-top: 6px; user-select: none; width: fit-content;
}
.item-guide p { font-size: 0.8rem; color: var(--text-2); margin-top: 6px; background: #F5F8FB; border-radius: 8px; padding: 8px 12px; }
.score-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.sbtn {
  width: 38px; height: 30px; border: 1.5px solid var(--line); background: #fff; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; color: #475569; transition: all .12s;
}
.sbtn:hover { border-color: var(--primary-2); color: var(--primary-2); }
.sbtn.on { background: #1F4E79; border-color: #1F4E79; color: #fff; }
.sbtn.nbtn { width: auto; padding: 0 12px; border-style: dashed; color: #8A94A6; }
.sbtn.nbtn.on { background: #8A94A6; border-color: #8A94A6; color: #fff; }
.fact-wrap { margin-top: 8px; }
.fact-input {
  width: 100%; border: 1.5px solid #F0C36D; background: #FFFBF0; border-radius: 9px;
  padding: 8px 11px; outline: none; font-size: 0.85rem; resize: vertical;
}
.fact-input:focus { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(224,146,47,0.12); }

.entry-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.score-panel {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; border-top: 3px solid var(--accent);
}
.score-panel h4 { color: var(--primary); margin-bottom: 12px; font-size: 1rem; }
.sp-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 0.88rem; color: var(--text-2); border-bottom: 1px dashed var(--line); }
.sp-row b { color: var(--text); }
.sp-final {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 0 4px;
}
.sp-final span { font-size: 0.88rem; color: var(--text-2); }
.sp-final b { font-size: 2rem; color: var(--accent); }
.sp-note { font-size: 0.72rem; color: #9AA7B5; margin-bottom: 8px; }
.sp-warn { background: #FFF4E5; border: 1px solid #F0C36D; color: #9A6A12; border-radius: 9px; padding: 8px 12px; font-size: 0.8rem; }
.sp-ok { background: #EAF6EF; border: 1px solid #BFDCCE; color: #2E7D53; border-radius: 9px; padding: 8px 12px; font-size: 0.8rem; }

.cond-grid { display: flex; flex-direction: column; gap: 8px; }
.cond-row {
  display: grid; grid-template-columns: 1fr auto 200px; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; transition: all .2s;
}
.cond-row.abn { border-color: #F0C36D; background: #FFFDF5; }
.cond-name { font-size: 0.85rem; }
.cond-name b { color: var(--primary-2); font-family: Consolas, monospace; margin-right: 4px; }
.cond-opts { display: flex; gap: 4px; }
.cond-opt { display: flex; align-items: center; gap: 3px; font-size: 0.8rem; padding: 3px 8px; border-radius: 7px; cursor: pointer; }
.cond-opt input { accent-color: var(--primary-2); }
.cond-note { border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 0.82rem; outline: none; width: 100%; }
.cond-note:focus { border-color: var(--primary-2); }

.transfer-box { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; }
.transfer-box h4 { color: var(--warn); margin-bottom: 10px; }
.transfer-box h4 small { color: var(--text-2); font-weight: 400; }

.redline-card { border-left: 4px solid var(--danger); }
.veto-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; margin-bottom: 12px; cursor: pointer; }
.veto-toggle input { width: 17px; height: 17px; accent-color: var(--danger); }
.redline-list { display: flex; flex-direction: column; gap: 6px; }
.redline-list div {
  background: #FDF3F3; border-radius: 8px; padding: 8px 13px; font-size: 0.85rem; color: #8C3A3A;
}
.redline-list b { margin-right: 8px; color: var(--danger); }
#vetoDescWrap { margin-top: 10px; }

/* ============ 详情弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(12, 28, 48, 0.45); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 30px 16px;
}
.modal {
  background: #F6F8FB; border-radius: 18px; width: min(1020px, 96vw); max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg); padding: 22px 24px;
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.modal-head h3 { color: var(--primary); font-size: 1.2rem; }
.modal-head p { color: var(--text-2); font-size: 0.84rem; margin-top: 3px; }
.rec-id { font-size: 0.75rem; color: var(--text-2); font-weight: 400; font-family: Consolas, monospace; margin-left: 6px; }
.modal-ops { display: flex; gap: 8px; }
.detail-body { display: flex; flex-direction: column; gap: 14px; }
.detail-body .card { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kv { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.kv th { width: 132px; text-align: left; color: var(--text-2); font-weight: 600; padding: 6px 8px; vertical-align: top; background: #F6F8FB; border-radius: 6px; }
.kv td { padding: 6px 8px; }
.dim-bar-block { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.dim-bar { display: grid; grid-template-columns: 200px 1fr 44px; gap: 10px; align-items: center; font-size: 0.8rem; color: var(--text-2); }
.dim-bar .bar { height: 10px; background: #EDF1F6; border-radius: 6px; overflow: hidden; }
.dim-bar .bar i { display: block; height: 100%; border-radius: 6px; }
.dim-bar b { text-align: right; color: var(--text); }
.cond-review { display: flex; flex-direction: column; gap: 6px; }
.cond-line { font-size: 0.85rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cond-line b { color: var(--primary-2); font-family: Consolas, monospace; }
.cond-line i { font-style: normal; color: var(--text-2); font-size: 0.78rem; }
.cond-tag { padding: 1px 9px; border-radius: 999px; font-size: 0.74rem; }
.cond-tag.ok { background: #EAF6EF; color: #2E7D53; }
.cond-tag.abn { background: #FDEEEE; color: var(--danger); }
.cond-tag.na { background: #F1F3F6; color: #8A94A6; }
.transfer-mini, .veto-box { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.veto-box b { color: var(--danger); }
.veto-box p { font-size: 0.86rem; color: #8C3A3A; margin-top: 6px; }
.fact-cell { color: #9A6A12; font-size: 0.8rem; max-width: 280px; }

/* ============ 说明页 ============ */
.guide-top { align-items: stretch; }
.rule-list { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.86rem; }
.rule-list li { background: #F6F9FC; border-radius: 9px; padding: 9px 13px; }
.rule-list b { color: var(--primary); }

}

/* ============ Toast ============ */
.toast {
  position: fixed; top: 26px; left: 50%; transform: translate(-50%, -80px);
  background: #1F2937; color: #fff; padding: 11px 22px; border-radius: 12px;
  font-size: 0.9rem; box-shadow: var(--shadow-lg); z-index: 200; transition: transform .25s; max-width: 80vw;
}
.toast.show { transform: translate(-50%, 0); }
.toast.warn { background: #9A6A12; }
.toast.error { background: var(--danger); }


/* ============ 科技风数据大屏（总览看板） ============ */
.tech-board {
  --tb-line: rgba(90, 150, 220, 0.16);
  background:
    linear-gradient(rgba(120,170,230,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,170,230,0.05) 1px, transparent 1px),
    radial-gradient(1200px 500px at 80% -10%, rgba(33,208,224,0.12), transparent 60%),
    linear-gradient(160deg, #0A1B30 0%, #0D2540 55%, #0A1E36 100%);
  background-size: 36px 36px, 36px 36px, auto, auto;
  border: 1px solid rgba(33,208,224,0.22);
  border-radius: 18px; padding: 22px 24px 26px; margin-bottom: 18px;
  color: #D7E7F7; box-shadow: 0 12px 40px rgba(4,16,32,0.45);
  position: relative; overflow: hidden;
}
.tech-board::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(33,208,224,0.06), transparent 18%);
}
.tb-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tb-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tb-title h1 { font-size: 1.4rem; letter-spacing: 3px; color: #EAF6FF; font-weight: 800; text-shadow: 0 0 18px rgba(33,208,224,0.5); }
.tb-title small { color: #7FA0C4; font-size: 0.8rem; letter-spacing: 1px; }
.tb-pulse {
  width: 10px; height: 10px; border-radius: 50%; background: #21D0E0; align-self: center;
  box-shadow: 0 0 0 4px rgba(33,208,224,0.18), 0 0 12px #21D0E0;
  animation: tbPulse 2s infinite;
}
@keyframes tbPulse { 50% { opacity: 0.45; } }
.tb-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-chip {
  border: 1px solid rgba(120,168,220,0.35); border-radius: 999px;
  padding: 4px 13px; font-size: 0.76rem; color: #9FB8D4; background: rgba(20,44,74,0.6);
}
.tb-chip.ok { color: #4ADE80; border-color: rgba(74,222,128,0.4); }
.tb-chip.warn { color: #FBBF24; border-color: rgba(251,191,36,0.45); }
.tb-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.tb-kpi {
  --kc: #21D0E0;
  position: relative; border-radius: 14px; padding: 14px 16px 12px;
  background: linear-gradient(150deg, rgba(23,52,88,0.85), rgba(13,32,56,0.9));
  border: 1px solid rgba(120,168,220,0.2); overflow: hidden;
}
.tb-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kc); box-shadow: 0 0 10px var(--kc); }
.tb-kpi::after {
  content: ""; position: absolute; right: -22px; top: -22px; width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--kc) 28%, transparent), transparent 70%);
}
.tb-kpi b { font-size: 1.9rem; font-weight: 800; color: var(--kc); text-shadow: 0 0 16px color-mix(in srgb, var(--kc) 55%, transparent); }
.tb-kpi b small { font-size: 0.78rem; font-weight: 400; color: #9FB8D4; margin-left: 3px; }
.tb-kpi i { font-style: normal; display: block; font-size: 0.82rem; color: #C9DCF0; margin-top: 2px; letter-spacing: 1px; }
.tb-kpi em { font-style: normal; display: block; font-size: 0.7rem; color: #6E8CAD; margin-top: 3px; }
.tb-delta { display: inline-block; text-decoration: none; margin-top: 6px; font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; }
.tb-delta.up { color: #4ADE80; background: rgba(74,222,128,0.12); }
.tb-delta.down { color: #F87171; background: rgba(248,113,113,0.12); }
.tb-delta.flat { color: #9FB8D4; background: rgba(120,168,220,0.12); }
.tb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.tb-card {
  position: relative; border-radius: 14px; padding: 15px 16px 13px;
  background: linear-gradient(150deg, rgba(20,46,78,0.72), rgba(12,30,54,0.85));
  border: 1px solid rgba(120,168,220,0.2);
}
.tb-card::before, .tb-card::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
}
.tb-card::before { left: -1px; top: -1px; border-left: 2px solid rgba(33,208,224,0.75); border-top: 2px solid rgba(33,208,224,0.75); border-top-left-radius: 10px; }
.tb-card::after { right: -1px; bottom: -1px; border-right: 2px solid rgba(33,208,224,0.75); border-bottom: 2px solid rgba(33,208,224,0.75); border-bottom-right-radius: 10px; }
.tb-card h3 { font-size: 0.95rem; color: #EAF6FF; margin-bottom: 10px; letter-spacing: 1px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.tb-card h3 i { font-style: normal; color: #21D0E0; text-shadow: 0 0 10px rgba(33,208,224,0.6); }
.tb-card h3 small { color: #6E8CAD; font-weight: 400; font-size: 0.72rem; }
.tb-radar { grid-column: span 1; }
.tb-empty { color: #6E8CAD; text-align: center; padding: 40px 0; font-size: 0.85rem; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-2); }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tech-board .legend { margin-top: 8px; }
.tech-board .legend span { color: #AFC9E4; }
.tb-table { overflow-x: auto; }
.tb-tbl { color: #C9DCF0; font-size: 0.85rem; min-width: 640px; }
.tb-tbl th { color: #7FA0C4; border-bottom: 1px solid rgba(120,168,220,0.3); }
.tb-tbl td { border-bottom: 1px solid rgba(120,168,220,0.14); }
.tb-tbl tbody tr:hover { background: rgba(33,208,224,0.06); }
.tb-tbl td i { color: #6E8CAD; }
.tb-tbl .mono { color: #7FE7F2; }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 200px 1fr; }
  .content { padding: 22px 18px 50px; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .kpi-row-4 { grid-template-columns: repeat(2, 1fr); }
  .tb-kpis { grid-template-columns: repeat(3, 1fr); }
  .tb-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .detail-grid { grid-template-columns: 1fr; }
  .entry-layout { grid-template-columns: 1fr; }
  .entry-side { position: static; }
  .frm-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  html { font-size: 14px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 24px 12px; }
  .login-hero h1 { font-size: 2rem; letter-spacing: 3px; }
  .login-rule { max-width: none; }
  .uni-name b { font-size: 1.15rem; letter-spacing: 3px; }
  .uni-plate { width: 54px; height: 54px; }
  .login-card { margin: 14px 14px 30px; padding: 24px 20px; }
  .role-grid { grid-template-columns: 1fr 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding-bottom: 4px; }
  .brand { padding: 14px 14px 12px; }
  .brand .logo { width: 34px; height: 34px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
  .nav-btn { padding: 8px 12px; font-size: 0.86rem; width: auto; }
  .sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 8px 12px 12px; }
  .user-chip { flex: 1; margin-bottom: 0; padding: 8px 10px; min-width: 0; }
  .user-chip b, .user-chip i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-foot .btn { width: auto; white-space: nowrap; padding: 8px 14px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tb-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tb-grid { grid-template-columns: 1fr; }
  .tb-kpi b { font-size: 1.5rem; }
  .cond-row { grid-template-columns: 1fr; }
  .content { padding: 16px 12px 46px; }
  .page-head h1 { font-size: 1.25rem; }
  .tb-title h1 { font-size: 1.15rem; letter-spacing: 1px; }
  .tb-head { flex-direction: column; align-items: flex-start; }
  .filter-bar { padding: 12px 14px; }
  .filter-bar select { flex: 1; min-width: 0; }
  .modal { padding: 16px 14px; }
  .modal-ops { flex-wrap: wrap; }
  .detail-grid { gap: 12px; }
  .login-form input { padding: 10px 12px; }
  .entry-layout { display: block; }
}

@media (max-width: 560px) {
  .frm-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr 1fr; }
  .role-card b { font-size: 0.86rem; letter-spacing: 0; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .tb-kpis { grid-template-columns: 1fr 1fr; }
  .item-top { flex-wrap: wrap; }
  .item-name { min-width: 0; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .big-select { min-width: 0; width: 100%; }
