/* ============================================================
   启行未来学校管理系统 - 全局样式
   视觉体系：金色（品牌主色）+ 墨蓝黑（侧边栏）+ 浅灰底
   ============================================================ */
:root {
  --gold: #C9A227;
  --gold-deep: #A8861D;
  --gold-light: #E8D28A;
  --gold-grad: linear-gradient(135deg, #D9B645 0%, #B18E1E 100%);
  --ink: #182130;
  --ink-deep: #111826;
  --bg: #F2F4F8;
  --card: #FFFFFF;
  --border: #E6EAF0;
  --text: #1F2733;
  --text-2: #66707F;
  --text-3: #9AA3B2;
  --success: #2E9E5B;
  --warning: #D9822B;
  --danger: #D64545;
  --info: #3A7BD5;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(23, 32, 48, .06);
  --shadow-lg: 0 12px 40px rgba(17, 24, 38, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
/* 视图互斥兜底：ID 级特异性，确保手机端 .main-layout/.login-view 在隐藏态
   不被媒体查询里的 display:flex|block !important 顶掉（修复退出登录后下方仍残留主页面） */
#login-view.hidden, #main-layout.hidden { display: none !important; }
a { color: var(--gold-deep); text-decoration: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C9D1DE; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #AEB9CA; }
::-webkit-scrollbar-track { background: transparent; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-family: inherit; cursor: pointer; transition: all .18s ease;
  white-space: nowrap; user-select: none; line-height: 1.5;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-gold { background: var(--gold-grad); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(185, 150, 30, .28); }
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 6px 16px rgba(185, 150, 30, .36); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: #D5DCE6; color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-deep); background: #FDFBF4; }
.btn-danger { background: #fff; border-color: #E5C9C9; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #FDF3F3; border-color: var(--danger); }
.btn-plain { background: transparent; color: var(--text-2); }
.btn-plain:hover:not(:disabled) { color: var(--gold-deep); background: #F6F1E0; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; letter-spacing: 6px; border-radius: 10px; }
.btn-icon { padding: 5px 8px; background: transparent; color: var(--text-3); }
.btn-icon:hover { color: var(--gold-deep); background: #F6F1E0; }

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.form-group .req { color: var(--danger); margin-left: 2px; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="tel"],
select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #D5DCE6; border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--text); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .15);
}
input::placeholder, textarea::placeholder { color: #B3BCCB; }
textarea { resize: vertical; min-height: 64px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }

/* ==================== 卡片 ==================== */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(230, 234, 240, .7);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.card-body { padding: 20px; }

/* ==================== 工具栏（搜索/操作区） ==================== */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--border); background: #FBFCFE;
}
.toolbar .search-box { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.toolbar .search-box input { padding-left: 34px; }
.toolbar .search-box .search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-3); pointer-events: none;
}
.toolbar .spacer { flex: 1; }

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  background: #F7F9FC; color: var(--text-2); font-weight: 600; text-align: left;
  padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 10px 14px; border-bottom: 1px solid #F0F2F6; vertical-align: middle; }
.table tbody tr:hover { background: #FBF9F1; }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .ops { white-space: nowrap; text-align: right; }
.table .ops .btn { margin-left: 4px; }

/* ==================== 徽章 ==================== */
.badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500; line-height: 1.7; white-space: nowrap;
}
.badge-gold { background: #F7EFD8; color: #9A7B12; }
.badge-green { background: #E4F4EA; color: #1E7A46; }
.badge-red { background: #FBE7E7; color: #B23434; }
.badge-orange { background: #FDEDDC; color: #B45E14; }
.badge-blue { background: #E3EDFC; color: #2C62B8; }
.badge-gray { background: #EEF1F5; color: #66707F; }

/* ==================== 统计卡片 ==================== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  display: flex; align-items: center; gap: 14px; padding: 20px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(230, 234, 240, .7);
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-info { min-width: 0; }
.stat-label { font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.stat-num { font-size: 26px; font-weight: 700; letter-spacing: .5px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-num .unit { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
.stat-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 统计行（多卡片横向排列） */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stats-row .stat-card { display: block; padding: 18px 16px; text-align: center; }
.stats-row .stat-label { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.stats-row .stat-value { font-size: 26px; font-weight: 700; letter-spacing: .5px; font-variant-numeric: tabular-nums; line-height: 1.2; color: var(--text); }
.stats-row .stat-sub { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* ==================== 弹窗 ==================== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 38, .45); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .18s ease;
}
.modal {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%;
  max-width: 620px; max-height: 88vh; display: flex; flex-direction: column;
  animation: slideUp .22s ease;
}
.modal-lg { max-width: 860px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  border: none; background: transparent; cursor: pointer; color: var(--text-3);
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #F2F4F8; color: var(--text); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== Toast ==================== */
#toast-root {
  position: fixed; top: 20px; right: 20px; z-index: 2000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 12px 18px; font-size: 14px; min-width: 220px; max-width: 380px;
  display: flex; align-items: center; gap: 10px; border-left: 4px solid var(--info);
  animation: slideLeft .25s ease;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast .toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.toast-success .toast-dot { background: var(--success); }
.toast-error .toast-dot { background: var(--danger); }
.toast-warning .toast-dot { background: var(--warning); }
.toast-info .toast-dot { background: var(--info); }
@keyframes slideLeft { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ==================== 登录页 ==================== */
.login-view { display: flex; min-height: 100vh; }
.login-brand {
  flex: 1.15; background:
    radial-gradient(ellipse at 20% 10%, rgba(201, 162, 39, .22), transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(201, 162, 39, .14), transparent 45%),
    linear-gradient(150deg, #1B2434 0%, #141C2B 55%, #0F1521 100%);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; padding: 40px; overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 44px 44px;
}
.login-brand-inner { position: relative; z-index: 1; text-align: center; max-width: 460px; }
.login-logo { width: 132px; height: auto; border-radius: 18px; background: #fff; padding: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.login-school-name { font-size: 32px; font-weight: 700; margin-top: 22px; letter-spacing: 2px; }
.login-slogan { margin-top: 10px; font-size: 16px; color: var(--gold-light); letter-spacing: 6px; }
.login-brand-line { width: 64px; height: 2px; background: var(--gold-grad); margin: 26px auto; border-radius: 2px; }
.login-brand-desc { font-size: 14px; color: #AEB8C8; line-height: 2; }
.login-brand-copyright {
  position: absolute; bottom: 26px; z-index: 1; font-size: 12px; color: #5E6A7E; letter-spacing: 1px;
}
.login-panel { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 40px; }
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 40px 38px; border: 1px solid rgba(230,234,240,.8);
}
.login-card-logo { width: 56px; height: auto; display: block; margin: 0 auto 14px; border-radius: 10px; }
.login-title { text-align: center; font-size: 22px; font-weight: 700; }
.login-sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 6px 0 26px; }
.login-error { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 12px; text-align: center; }
.login-tip { margin-top: 18px; padding: 10px 14px; background: #F8F5EA; border-radius: 8px; font-size: 12px; color: #8A7A45; line-height: 1.7; }

/* ==================== 主布局 ==================== */
.main-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; background: linear-gradient(180deg, var(--ink) 0%, var(--ink-deep) 100%);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-logo { width: 42px; height: 42px; border-radius: 10px; background: #fff; padding: 4px; object-fit: contain; }
.sidebar-brand-text { min-width: 0; }
.sidebar-school { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.sidebar-sub { color: #7C879B; font-size: 11px; margin-top: 1px; letter-spacing: .5px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.menu-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px; margin-bottom: 2px;
  color: #A6B0C2; border-radius: 9px; cursor: pointer; font-size: 14px;
  transition: all .16s ease; border: none; background: transparent; width: 100%; font-family: inherit; text-align: left;
}
.menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.menu-item:hover { background: rgba(255,255,255,.06); color: #E8EDF5; }
.menu-item.active {
  background: var(--gold-grad); color: #fff; font-weight: 600;
  box-shadow: 0 6px 16px rgba(185, 150, 30, .35);
}
.menu-item.active:hover { color: #fff; }
.menu-group-title {
  font-size: 11px; color: #58637A; padding: 14px 13px 6px; letter-spacing: 2px; font-weight: 600;
}
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-user { display: flex; align-items: center; gap: 8px; padding: 12px 16px 8px 16px; }
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--gold-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.sidebar-user-name { color: #E8EDF5; font-size: 13px; font-weight: 500; }
.sidebar-user-role { color: #7C879B; font-size: 11px; }

.main-area { flex: 1; margin-left: 236px; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--border); padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50;
}
.page-title { font-size: 18px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.content { padding: 24px; max-width: 1600px; width: 100%; margin: 0 auto; min-width: 0; }

/* ==================== 图表容器 ==================== */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-box { height: 320px; }
.chart-box-sm { height: 280px; }
.chart-full { grid-column: 1 / -1; }

/* ==================== 待办提醒 ==================== */
.todo-list { list-style: none; }
.todo-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  border-bottom: 1px dashed #EDF0F5; font-size: 13.5px;
}
.todo-list li:last-child { border-bottom: none; }
.todo-list .todo-tag {
  width: 6px; height: 6px; border-radius: 50%; background: var(--warning); flex-shrink: 0;
}
.todo-list li.urgent .todo-tag { background: var(--danger); }
.todo-list .todo-info { flex: 1; min-width: 0; }
.todo-list .todo-info b { font-weight: 600; }
.todo-list .todo-meta { color: var(--text-3); font-size: 12px; }

/* ==================== 宿舍床位 ==================== */
.dorm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.dorm-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(230,234,240,.7); overflow: hidden; }
.dorm-head { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #FAFBFD; }
.dorm-name { font-size: 15px; font-weight: 700; }
.dorm-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.bed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px 16px; }
.bed {
  border: 1px solid #DFE4EC; border-radius: 9px; padding: 9px 6px; text-align: center;
  font-size: 12px; cursor: pointer; transition: all .15s ease; position: relative; background: #FAFBFD;
}
.bed .bed-no { color: var(--text-3); font-size: 11px; display: block; }
.bed .bed-stu { font-weight: 600; color: var(--text); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bed.empty { border-style: dashed; }
.bed.empty:hover { border-color: var(--gold); background: #FDFAF0; }
.bed.occupied { background: #F6F8FB; border-color: #D5DCE6; }
.bed.occupied.has-student { background: #FBF6E3; border-color: #E4D49A; }
.bed.occupied.has-student .bed-no { color: #9A7B12; }

/* ==================== 课表 ==================== */
.schedule-table th, .schedule-table td { text-align: center; }
.schedule-table td.cell { min-width: 110px; padding: 6px; }
.schedule-cell {
  background: #FBF6E3; border: 1px solid #E8DBA8; border-radius: 8px; padding: 8px 6px; font-size: 12.5px;
}
.schedule-cell .sc-subject { font-weight: 700; color: #8A6D1B; }
.schedule-cell .sc-info { color: var(--text-2); font-size: 11.5px; margin-top: 2px; }
.schedule-empty-cell { color: #C3CBD8; font-size: 12px; }

/* ==================== 分页 ==================== */
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--border); }
.pagination .page-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #DCE2EB; border-radius: 7px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--text-2); display: flex; align-items: center; justify-content: center;
}
.pagination .page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-deep); }
.pagination .page-btn.active { background: var(--gold-grad); color: #fff; border-color: transparent; font-weight: 600; }
.pagination .page-btn:disabled { opacity: .4; cursor: not-allowed; }
.pagination .page-info { font-size: 13px; color: var(--text-3); margin: 0 10px; }

/* ==================== 模糊搜索选择器 ==================== */
.search-select { position: relative; width: 100%; }
.search-select .ss-input {
  width: 100%; padding: 9px 12px; border: 1px solid #D5DCE6; border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--text); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease; outline: none;
}
.search-select .ss-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .15); }
.search-select .ss-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1200;
  background: #fff; border: 1px solid #E0E5ED; border-radius: 10px; box-shadow: var(--shadow-lg);
  max-height: 260px; overflow-y: auto; display: none;
}
.search-select .ss-item {
  padding: 9px 14px; font-size: 13.5px; cursor: pointer; color: var(--text);
  border-bottom: 1px solid #F3F5F9;
}
.search-select .ss-item:hover { background: #FBF6E3; color: var(--gold-deep); }
.search-select .ss-item:last-child { border-bottom: none; }
.search-select .ss-empty { padding: 12px 14px; font-size: 13px; color: var(--text-3); }

/* ==================== 宿舍床位悬浮详情 ==================== */
.bed { position: relative; }
.bed .bed-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  min-width: 180px;
  background: #1A2233;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.9;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  pointer-events: none;
}
.bed .bed-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1A2233;
}
.bed:hover .bed-tooltip { display: block; }
.bed-tooltip .bt-name { font-size: 13.5px; margin-bottom: 2px; }

/* ==================== 开关 Switch ==================== */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 24px;
  background: #CBD3DE; transition: background .2s ease;
}
.switch .slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: linear-gradient(135deg, #D9B645, #A8861D); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ==================== 空状态 ==================== */
.empty {
  padding: 60px 20px; text-align: center; color: var(--text-3);
}
.empty svg { width: 52px; height: 52px; opacity: .35; margin-bottom: 10px; }
.empty .empty-text { font-size: 14px; }

/* ==================== 其他工具类 ==================== */
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-3); }
.text-danger { color: var(--danger); }
.text-gold { color: var(--gold-deep); }
.text-success { color: var(--success); }
.fw-600 { font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; }
.w-120 { width: 120px; }
.w-160 { width: 160px; }
.w-200 { width: 200px; }

/* 学生详情面板 */
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 20px; }
.detail-item .d-label { font-size: 12px; color: var(--text-3); }
.detail-item .d-value { font-size: 14px; font-weight: 500; margin-top: 1px; }

/* 响应式 */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .form-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 72px; }
  .sidebar-brand-text, .sidebar-sub, .menu-item span, .sidebar-user-name, .sidebar-user-role { display: none; }
  .sidebar-brand { justify-content: center; padding: 16px 8px; }
  .menu-item { justify-content: center; padding: 12px; }
  .main-area { margin-left: 72px; }
  .login-view { flex-direction: column; }
  .login-brand { flex: none; padding: 40px 20px; min-height: 300px; }
  .login-panel { padding: 24px; }
  .form-grid, .form-grid-3, .form-grid-4, .detail-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* Tab切换 */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); }
.tab-btn { padding: 10px 24px; background: none; border: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab-btn:hover { color: var(--gold-deep); }
.tab-btn.active { color: var(--gold-deep); border-bottom-color: var(--gold); font-weight: 600; }

/* 表头排序 */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #F7F4E8; }
.sort-icon { font-size: 10px; margin-left: 4px; color: #ccc; }

/* 表格表头固定 */
.table-sticky thead th { position: sticky; top: 0; background: #FAF8F0; z-index: 1; }

/* 宿舍管理 - 男女分行 */
.dorm-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-left: 4px;
}
.dorm-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.dorm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.dorm-row .dorm-card {
  flex: 0 0 calc(33.333% - 11px);
  min-width: 280px;
  max-width: calc(33.333% - 11px);
}
@media (max-width: 1400px) {
  .dorm-row .dorm-card {
    flex: 0 0 calc(50% - 8px);
    max-width: calc(50% - 8px);
  }
}
@media (max-width: 900px) {
  .dorm-row .dorm-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* 男生寝室 - 浅蓝色背景 */
.dorm-card-male {
  background: linear-gradient(135deg, #F0F7FF 0%, #E8F2FB 100%);
  border: 1px solid #B8D4EE;
}
.dorm-card-male .dorm-head {
  background: rgba(74, 144, 217, 0.08);
  border-bottom: 1px solid #B8D4EE;
}
.dorm-card-male .dorm-name {
  color: #2C6BA8;
}

/* 女生寝室 - 浅粉红色背景 */
.dorm-card-female {
  background: linear-gradient(135deg, #FFF5F8 0%, #FCE8EE 100%);
  border: 1px solid #F0B8C8;
}
.dorm-card-female .dorm-head {
  background: rgba(232, 107, 142, 0.08);
  border-bottom: 1px solid #F0B8C8;
}
.dorm-card-female .dorm-name {
  color: #C24A6E;
}

/* ============================================================
   学生信息总表 - 卡片式布局
   ============================================================ */
.stu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08) !important;
  border-color: #D4C07A !important;
}

.stu-card .info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stu-card .info-item label {
  font-size: 11px;
  color: #999;
  font-weight: 500;
}

.stu-card .info-item span {
  color: #333;
  font-size: 13px;
  word-break: break-all;
  line-height: 1.4;
}

/* 响应式：小屏幕单列 */
@media (max-width: 900px) {
  #stu-total-cards {
    grid-template-columns: 1fr !important;
  }
}

/* 滚动文字动画 */
@keyframes scrollText {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============================================================
   打印样式 - 导出PDF专业版面
   ============================================================ */
@media print {
  /* 隐藏侧边栏 */
  .sidebar, #sidebar {
    display: none !important;
  }

  /* 隐藏顶部导航栏 */
  .topbar, #topbar, .header {
    display: none !important;
  }

  /* 隐藏所有按钮 */
  .btn, button, .toolbar, .ops {
    display: none !important;
  }

  /* 隐藏Tab切换栏 */
  .tabs {
    display: none !important;
  }

  /* 隐藏返回按钮 */
  #btn-back-list {
    display: none !important;
  }

  /* 隐藏AI标识 */
  .ai-badge, .ai-badge-print {
    display: none !important;
  }

  /* 主内容区域占满宽度 */
  .main, #content, .content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* 页面主体 */
  body {
    background: #fff !important;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 卡片样式优化 */
  .card {
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    margin-bottom: 16px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* 考试信息条 */
  .exam-info-bar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    color: #fff !important;
    padding: 20px !important;
    border-radius: 8px !important;
    margin-bottom: 16px !important;
    break-inside: avoid !important;
  }

  /* 统计卡片 */
  .stat-card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    break-inside: avoid !important;
  }

  /* 表格打印优化 */
  .table {
    font-size: 11px !important;
    border-collapse: collapse !important;
    width: 100% !important;
  }

  .table th {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    color: #E8C95A !important;
    font-weight: 600 !important;
    padding: 10px 8px !important;
    text-align: left !important;
    border: 1px solid #ddd !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .table td {
    padding: 8px !important;
    border: 1px solid #e0e0e0 !important;
    vertical-align: middle !important;
  }

  .table tr:nth-child(even) td {
    background: #f9f9f9 !important;
  }

  /* 图表容器固定高度 */
  [id*="chart"] {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin-bottom: 16px !important;
  }

  /* 标题样式 */
  h1, h2, h3, h4 {
    color: #1a1a2e !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
  }

  /* 徽章样式 */
  .badge {
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
  }

  /* 页面设置 - A4纵向 */
  @page {
    size: A4 portrait;
    margin: 18mm 15mm 18mm 15mm;

    /* 页眉 */
    @top-center {
      content: "启行未来单招培训学校";
      font-family: "Microsoft YaHei", sans-serif;
      font-size: 10px;
      color: #999;
    }

    /* 页脚 - 页码 */
    @bottom-center {
      content: "第 " counter(page) " 页 / 共 " counter(pages) " 页";
      font-family: "Microsoft YaHei", sans-serif;
      font-size: 10px;
      color: #999;
    }

    /* 页脚左侧 - 日期 */
    @bottom-left {
      content: "打印日期：" attr(data-print-date);
      font-family: "Microsoft YaHei", sans-serif;
      font-size: 9px;
      color: #bbb;
    }
  }

  /* 第一页页眉 */
  @page :first {
    @top-center {
      content: "";
    }
  }

  /* 隐藏滚动条 */
  ::-webkit-scrollbar {
    display: none !important;
  }

  /* 链接颜色 */
  a {
    color: #333 !important;
    text-decoration: none !important;
  }

  /* 避免在标题后分页 */
  h1, h2, h3 {
    page-break-after: avoid !important;
  }

  /* 避免表格行跨页 */
  tr {
    page-break-inside: avoid !important;
  }

  /* 图片不跨页 */
  img {
    page-break-inside: avoid !important;
  }
}

/* 打印预览时的专业标题 */
.print-header {
  display: none;
}

@media print {
  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #C9A227;
  }

  .print-header .school-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
  }

  .print-header .report-title {
    font-size: 14px;
    color: #666;
  }

  .print-header .report-subtitle {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
  }
}

/* 专门的打印容器 */
.print-container {
  display: none;
}

/* 打印时给body添加printing类 */
@media print {
  /* 隐藏body下除打印容器外的所有直接子元素 */
  body.printing > *:not(.print-container) {
    display: none !important;
  }
  
  /* 显示打印容器 */
  body.printing .print-container {
    display: block !important;
    position: static !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* A4页面设置 */
  @page {
    size: A4 portrait;
    margin: 15mm 12mm;
  }
  
  /* 打印页眉 */
  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #C9A227;
  }
  
  .print-header .school-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
    letter-spacing: 2px;
  }
  
  .print-header .report-title {
    font-size: 15px;
    font-weight: 600;
    color: #C9A227;
    margin-bottom: 2px;
  }
  
  .print-header .report-subtitle {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
  }
  
  /* 打印内容区域 */
  .print-content {
    font-size: 12px;
    line-height: 1.6;
    color: #333;
  }
  
  /* 打印表格 */
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 11px;
  }
  
  .print-table th {
    background: #1a1a2e !important;
    color: #E8C95A !important;
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #ddd;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .print-table td {
    padding: 6px 10px;
    border: 1px solid #ddd;
    text-align: center;
  }
  
  .print-table tr:nth-child(even) {
    background: #f9f9f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  /* 打印统计卡片 */
  .print-stats {
    display: flex;
    gap: 12px;
    margin: 12px 0;
    flex-wrap: wrap;
  }
  
  .print-stat-card {
    flex: 1;
    min-width: 100px;
    background: #f8f9fa !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .print-stat-card .label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
  }
  
  .print-stat-card .value {
    font-size: 20px;
    font-weight: 700;
    color: #C9A227;
  }
  
  /* 打印页脚 */
  .print-footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 10px;
    color: #999;
  }
  
  /* 避免分页截断 */
  .print-table, .print-stat-card, .print-section {
    page-break-inside: avoid;
  }
}

/* =====================================================================
   启行未来学校管理系统 —— 移动端 / 平板响应式补充
   说明：桌面基础样式不在此改动；以下除菜单按钮/遮罩的桌面默认隐藏外，
   全部规则包在媒体查询内，保证电脑端零回归。
   ===================================================================== */

/* ---- 桌面默认：移动端菜单按钮与遮罩隐藏（JS 在窄屏切换显示） ---- */
.mobile-menu-btn { display: none; }
.sidebar-overlay { display: none; }

/* =====================================================================
   手机（≤768px）
   ===================================================================== */
@media (max-width: 768px) {
  /* ---------- 汉堡菜单按钮 ---------- */
  .mobile-menu-btn {
    display: flex !important;
    position: fixed; top: 8px; left: 12px; z-index: 1300;
    width: 40px; height: 40px; align-items: center; justify-content: center;
    border: none; border-radius: 10px;
    background: linear-gradient(135deg,#C9A227,#B18E1E);
    color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.25); padding: 0;
  }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1100; }
  .sidebar-overlay.show { display: block; }

  /* ---------- 布局骨架：消除 flex 子项被宽内容撑大导致的横向裁切 ---------- */
  .main-layout:not(.hidden) { display: block !important; width: 100%; max-width: 100%; }
  .main-area { margin-left: 0 !important; width: 100%; max-width: 100%; min-width: 0; }
  .content {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    margin: 0 !important; padding: 14px 12px 28px !important; box-sizing: border-box;
  }
  .main-area *, .main-area *::before, .main-area *::after { min-width: 0; }
  img, svg, video, iframe, canvas { max-width: 100%; }

  /* ---------- 侧边栏抽屉（覆盖原生 900px 的 72px 图标条） ---------- */
  .sidebar {
    position: fixed !important; top: 0; left: 0; bottom: 0;
    width: 264px !important; margin-left: 0 !important;
    transform: translateX(-100%); transition: transform .25s ease;
    z-index: 1200; overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.45); }
  .sidebar-brand { justify-content: flex-start !important; padding: 18px !important; }
  .sidebar-brand-text, .sidebar-sub, .menu-item span,
  .sidebar-user-name, .sidebar-user-role { display: block !important; }
  .menu-item { justify-content: flex-start !important; padding: 11px 14px !important; font-size: 14px !important; }

  /* ---------- 顶栏 ---------- */
  .topbar { height: 56px !important; padding: 0 12px 0 62px !important; min-width: 0; gap: 8px; }
  .page-title { font-size: 17px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .topbar-user { font-size: 12px !important; gap: 6px !important; }
  .topbar-user .avatar, .topbar-user img { width: 30px !important; height: 30px !important; }

  /* ---------- 卡片 ---------- */
  .card { margin-bottom: 12px; border-radius: 12px; }
  .card-head { padding: 13px 14px !important; flex-wrap: wrap; gap: 8px; }
  .card-title { font-size: 15px !important; }
  .card-body { padding: 14px !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* 财务页缴费记录表格无 .table-wrap 包裹，让其容器自身横滑，避免撑宽整页 */
  #fin-body, #pay-stats { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ---------- 统计卡 / 图表 ---------- */
  .stat-grid, .stats-row { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .stat-card { padding: 14px !important; }
  .stat-icon { width: 40px !important; height: 40px !important; font-size: 20px !important; }
  .stat-num { font-size: 21px !important; }
  .chart-grid { grid-template-columns: 1fr !important; }
  .chart-box { height: 260px !important; }
  .chart-box-sm { height: 230px !important; }

  /* ---------- 表单 ---------- */
  .form-grid, .form-grid-3, .form-grid-4, .detail-grid, .dorm-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
  /* 仅统一字号（防 iOS 聚焦缩放）与盒模型；不覆盖内联 padding/width，避免破坏带左图标的输入框 */
  input, select, textarea {
    font-size: 16px !important; max-width: 100%; box-sizing: border-box;
  }
  /* 深色筛选卡内的 select 保持深底白字，不被全局配色影响 */
  .course-filter-bar select { color: #fff; }
  .course-filter-bar select option { color: #333; }

  /* ---------- 按钮（修复被拉伸的巨型 SVG / 按钮） ---------- */
  .btn { max-width: 100%; gap: 6px; }
  .btn svg, button svg, .btn-icon svg, .tab-btn svg { width: 18px !important; height: 18px !important; flex-shrink: 0; }
  .btn-sm { padding: 7px 12px !important; font-size: 13px !important; }
  .btn-icon { width: 38px !important; height: 38px !important; padding: 0 !important; }

  /* ---------- 工具栏 ---------- */
  .toolbar { flex-wrap: wrap !important; gap: 8px !important; padding: 12px 14px !important; }
  .toolbar .search-box { flex: 1 1 100% !important; min-width: 0 !important; max-width: 100% !important; order: -1; }
  .toolbar > .btn, .toolbar > button { flex: 1 1 calc(50% - 4px) !important; }
  .toolbar .spacer { display: none; }

  /* ---------- 选项卡：横向滑动 ---------- */
  .tabs, [class*="tab-bar"], .cs-tabs {
    display: flex; flex-wrap: nowrap !important; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none;
  }
  .tabs::-webkit-scrollbar, [class*="tab-bar"]::-webkit-scrollbar, .cs-tabs::-webkit-scrollbar { display: none; }
  .tab-btn, .cs-tab { white-space: nowrap; flex-shrink: 0; padding: 10px 16px !important; }

  /* ---------- 表格：容器内横滑，数据完整 ---------- */
  .table-wrap, .table-container, .data-table-wrapper { overflow-x: auto !important; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .table { min-width: 560px !important; font-size: 12.5px !important; }
  /* 专业搜索结果的 7 列裸表格：同样允许横滑，列不被挤压、数据完整 */
  #cs-major-result table { min-width: 640px !important; font-size: 12.5px !important; }
  .table th { padding: 9px 11px !important; white-space: nowrap; }
  .table td { padding: 8px 11px !important; }

  /* ---------- 财务页 ---------- */
  /* 7 个统计柱手机端改 2 列网格，金额/标签完整可见，不靠横滑 */
  [style*="grid-template-columns:repeat(7,1fr)"] { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  /* 子功能按钮组（缴费管理/退学管理/招生统计等）换行完整显示，首项不被裁切 */
  .card-head .flex.gap-8 { flex-wrap: wrap !important; row-gap: 8px; min-width: 0; }
  .card-head .flex.gap-8 .btn { white-space: nowrap; flex-shrink: 0; }

  /* ---------- 模考成绩：考试列表 hero 卡 ---------- */
  /* 图标 + 标题同行（标题横排，不逐字竖排） */
  .me-hero-row { flex-wrap: wrap !important; row-gap: 12px !important; }
  .me-hero-title { flex: 1 1 calc(100% - 68px) !important; min-width: 0 !important; }
  .me-hero-title > div:first-child { font-size: 19px !important; letter-spacing: 1px !important; white-space: nowrap; }
  /* 新增考试按钮 + 参考学生 + 平均总分 换到下一行三等分 */
  .me-hero-stats { flex: 1 1 100% !important; width: 100% !important; gap: 8px !important; }
  .me-hero-stats .btn { flex: 1 1 auto !important; min-width: 0 !important; padding-left: 8px !important; padding-right: 8px !important; }
  .me-hero-stats > div { flex: 1 1 0 !important; min-width: 0 !important; padding-left: 8px !important; padding-right: 8px !important; }

  /* ---------- 徽章 / 模态 / 提示 ---------- */
  .badge { font-size: 11px !important; }
  .modal-mask { padding: 10px !important; }
  .modal, .modal-lg { max-width: 100% !important; width: calc(100% - 20px) !important; max-height: 94vh !important; }
  .modal-header { padding: 13px 16px !important; }
  .modal-header h3 { font-size: 15px !important; line-height: 1.4; word-break: break-word; }
  .modal-body { padding: 16px !important; -webkit-overflow-scrolling: touch; min-height: 0 !important; }
  /* 弹窗内部所有内联 flex/grid 子项允许收缩，防止长标签、固定列把弹窗撑破导致右侧裁切 */
  .modal-body *, .exam-outline-overlay * { min-width: 0 !important; }
  /* 院校详情“2026单招数据概览”等内联 3 列网格，手机降 2 列，数字与长标签完整可见 */
  .modal-body [style*="grid-template-columns:repeat(3"],
  .modal-body [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 10px !important;
  }
  /* 弹窗内招生明细宽表：横向滑动查看，数据不丢失（不撑破弹窗） */
  .modal-body .table { min-width: 720px !important; }

  /* ===== 考试大纲自定义全屏弹窗（.exam-outline-overlay，内层无 class、全内联） ===== */
  .exam-outline-overlay { padding: 0 !important; }
  .exam-outline-overlay > div {
    width: 100% !important; max-width: 100% !important; height: 100vh !important; max-height: 100vh !important; border-radius: 0 !important;
  }
  .exam-outline-overlay [style*="padding:20px 28px"] { padding: 14px 16px !important; }
  .exam-outline-overlay [style*="padding:0 28px"] { padding: 0 8px !important; }
  .exam-outline-overlay [style*="font-size:20px"] { font-size: 16px !important; line-height: 1.35; }
  .exam-outline-overlay [style*="minmax(280px"] { grid-template-columns: minmax(0,1fr) !important; }
  .exam-outline-overlay .outline-type-btn { font-size: 13px !important; line-height: 1.3 !important; white-space: normal !important; padding: 12px 4px !important; }
  .modal-footer { display: flex; flex-wrap: wrap; gap: 8px; }
  .modal-footer .btn { flex: 1 1 auto; }
  .bed-grid { grid-template-columns: repeat(3,1fr) !important; }
  #toast-root { left: 12px !important; right: 12px !important; top: 12px !important; width: auto !important; }
  #toast-root .toast { width: 100% !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box; }

  /* ---------- 登录页 ---------- */
  .login-view { flex-direction: column !important; min-height: 100vh; }
  .login-brand { flex: none !important; min-height: 0 !important; padding: 30px 20px 24px !important; }
  .login-logo, .login-card-logo { width: 84px !important; height: 84px !important; object-fit: contain; }
  .login-school-name { font-size: 23px !important; }
  .login-brand-copyright { position: static !important; margin-top: 18px !important; }
  .login-panel { padding: 22px 16px !important; flex: 1 !important; }
  .login-card { padding: 26px 22px !important; width: 100%; max-width: 420px; }

  /* =====================================================================
     数据看板 dashboard 深色大卡
     ===================================================================== */
  .dash-hero-row { flex-direction: column !important; gap: 22px !important; align-items: stretch !important; }
  .dash-hero-divider { display: none !important; }
  .dash-hero-side { width: 100% !important; flex: none !important; }
  #school-total { font-size: 64px !important; }
  #today-should { font-size: 60px !important; }
  [style*="padding:32px 40px"] { padding: 20px 18px !important; }

  /* =====================================================================
     单招搜索 collegeSearch
     ===================================================================== */
  /* 深色推荐外卡 / 白色内卡收紧内边距；白色大标题缩字号防末字孤行 */
  [style*="padding:24px 28px"] { padding: 18px 16px !important; }
  [style*="padding:20px 24px"] { padding: 16px !important; }
  [style*="font-size:24px;font-weight:800;color:#fff"] { font-size: 18px !important; line-height: 1.35 !important; }

  /* 顶部统计卡：logo+标题第一行，6 个统计块 3 列 × 2 行 */
  .cs-hero-head { flex-wrap: wrap !important; gap: 12px !important; }
  .cs-hero-spacer { display: none !important; }
  .cs-hero-stats { flex: 1 1 100% !important; display: grid !important; grid-template-columns: repeat(3,1fr) !important; gap: 8px !important; min-width: 0; }
  .cs-hero-stats > div { min-width: 0 !important; padding: 10px 6px !important; }
  .cs-hero-stats > div > div:first-child { font-size: 20px !important; }
  /* 主标题/副标题：手机端允许换行，消除省略号截断（仅手机，桌面内联 nowrap 不变） */
  .cs-hero-head > div:nth-child(2) { flex: 1 1 calc(100% - 68px) !important; min-width: 0 !important; }
  .cs-hero-head > div:nth-child(2) > div:nth-child(1) { white-space: normal !important; font-size: 16px !important; line-height: 1.35 !important; }
  .cs-hero-head > div:nth-child(2) > div:nth-child(2) { white-space: normal !important; font-size: 11px !important; line-height: 1.5 !important; margin-top: 6px !important; }

  /* 蓝/绿推荐卡：输入框整行，搜索/重置按钮第二行并排 */
  .cs-score-row { flex-wrap: wrap !important; gap: 10px !important; }
  .cs-score-row > div:first-child { flex: 1 1 100% !important; min-width: 0; }
  #sq-search-btn, #ts-search-btn { flex: 1 1 auto !important; padding: 12px 14px !important; font-size: 15px !important; white-space: nowrap; }
  #sq-reset-btn, #ts-reset-btn { flex: 0 0 auto !important; padding: 12px 22px !important; white-space: nowrap; }

  /* 考生类型行：标签+A/B 切换一行，说明换行 */
  .cs-type-row { flex-wrap: wrap !important; gap: 8px 10px !important; }
  .cs-type-row > span:first-child { flex: 0 0 auto; }
  .cs-type-switch { flex: 1 1 180px !important; min-width: 0; }
  .cs-type-switch button { flex: 1 !important; padding: 8px 6px !important; font-size: 12px !important; white-space: nowrap; }
  .cs-type-note { flex: 1 1 100% !important; margin-left: 0 !important; }

  /* 总成绩筛选 3 列、冲稳保 3 列 → 单列 */
  .cs-filter-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .cs-strategy-grid { grid-template-columns: 1fr !important; gap: 10px !important; }

  /* 专业搜索筛选栏：手机端分行 —— 专业名整行；A/B类·预估分·性别·地区一行；搜索·重置一行 */
  .cs-major-filter-bar { flex-wrap: wrap !important; row-gap: 8px !important; }
  .cs-major-filter-bar > :nth-child(1) { flex: 1 1 100% !important; min-width: 0 !important; }
  /* 行2：A/B 类固定 + 预估分占满剩余 */
  .cs-major-filter-bar > :nth-child(3) { flex: 0 0 auto !important; }
  .cs-major-filter-bar > :nth-child(4) { flex: 1 1 120px !important; min-width: 0 !important; }
  #cs-major-score { width: 100% !important; min-width: 0 !important; }
  /* 行3：性别、地区各半行 */
  #cs-major-gender, #cs-major-region { flex: 1 1 calc(50% - 4px) !important; width: auto !important; min-width: 0 !important; }
  /* 行4：搜索占满 + 重置 */
  #cs-major-search { flex: 1 1 auto !important; }
  #cs-major-reset { flex: 0 0 auto !important; }
  #cs-major-suggest { width: 100% !important; min-width: 0 !important; left: 0 !important; right: 0 !important; }

  /* 内联 auto-fill 网格：最小列宽超过手机内容宽度的统一降单列 */
  [style*="minmax(330px"], [style*="minmax(380px"], [style*="minmax(400px"] { grid-template-columns: 1fr !important; }
  /* 内联三等列网格降单列（全屏看板/说明卡等） */
  [style*="grid-template-columns:1fr 1fr 1fr"], [style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* =====================================================================
     院校搜索 / 学考分 / 总成绩 结果卡片（.sq-college-card / .ts-college-card）
     桌面为内联横向 flex（色条|logo区|竖线|统计grid|按钮列），手机端纵向重排，
     用 !important + 结构选择器覆盖内联样式，保证统计块与按钮完整不被裁切。
     ===================================================================== */
  .sq-college-card, .ts-college-card { flex-direction: column !important; }
  /* 左侧渐变竖条 → 卡片顶部横条 */
  .sq-college-card > div:first-child,
  .ts-college-card > div:first-child { width: 100% !important; height: 6px !important; flex-shrink: 0; }
  /* 内容容器：横向 flex → 纵向排列 */
  .sq-college-card > div:last-child,
  .ts-college-card > div:last-child {
    flex-direction: column !important; align-items: stretch !important;
    gap: 14px !important; padding: 16px !important; width: 100% !important; box-sizing: border-box;
  }
  /* logo + 校名区：解除 260/270/280px 固定宽，整行 */
  .sq-college-card > div:last-child > div:nth-child(1),
  .ts-college-card > div:last-child > div:nth-child(1) {
    min-width: 0 !important; width: 100% !important; flex-shrink: 1 !important; gap: 12px !important;
  }
  /* 竖分隔线：手机端隐藏 */
  .sq-college-card > div:last-child > div:nth-child(2),
  .ts-college-card > div:last-child > div:nth-child(2) { display: none !important; }
  /* 统计块 grid：4/5 列 → 3 列（3+2 或 3+1），数字完整可见 */
  .sq-college-card > div:last-child > div:nth-child(3),
  .ts-college-card > div:last-child > div:nth-child(3) {
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    width: 100% !important; gap: 8px !important; min-width: 0 !important;
  }
  /* 总成绩·未填总分(综合排名 .ts-card-all)：第4格“推荐分 A/B两行”手机端通栏，完整不裁切 */
  .ts-college-card.ts-card-all > div:last-child > div:nth-child(3) > div:nth-child(4) {
    grid-column: 1 / -1 !important;
  }
  /* 按钮列：纵向 → 横向并排均分 */
  .sq-college-card > div:last-child > div:nth-child(4),
  .ts-college-card > div:last-child > div:nth-child(4) {
    flex-direction: row !important; width: 100% !important; gap: 10px !important; align-items: stretch !important;
  }
  .sq-college-card > div:last-child > div:nth-child(4) > div,
  .ts-college-card > div:last-child > div:nth-child(4) > div {
    flex: 1 1 0 !important; text-align: center !important; padding: 11px 8px !important;
    display: flex !important; align-items: center; justify-content: center; line-height: 1.3;
  }
  /* 推荐名单 / 区间院校小卡内部允许收缩 */
  .rec-college, .score-quick-college, .ts-range-college { min-width: 0; }
  /* 内联 4/5 列网格（区间院校 chip、静态说明/统计区）手机降 2 列，防挤压裁切；
     结果卡片统计 grid 因选择器特异性更高仍保持 3 列 */
  [style*="grid-template-columns:repeat(4"], [style*="grid-template-columns:repeat(5"],
  [style*="grid-template-columns: repeat(4"], [style*="grid-template-columns: repeat(5"] {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 10px !important;
  }

  /* =====================================================================
     课程安排 courses 顶部深色筛选卡
     ===================================================================== */
  .course-filter-bar { gap: 8px !important; }
  .course-filter-bar > div[style*="display:flex"] { flex: 1 1 100% !important; }
  .course-filter-bar > div[style*="display:flex"] > select { flex: 1; min-width: 0 !important; width: 100%; }
  .course-filter-bar > div[style="flex:1"] { display: none !important; }
  .course-filter-bar button { flex: 1 1 auto !important; }
  #cs-range { flex: 1 1 100% !important; text-align: center; margin-left: 0 !important; }
}

/* =====================================================================
   小屏手机（≤480px）
   ===================================================================== */
@media (max-width: 480px) {
  .content { padding: 12px 10px 24px !important; }
  .stat-grid, .stats-row { gap: 8px !important; }
  .stat-card { padding: 12px !important; }
  .stat-icon { width: 36px !important; height: 36px !important; }
  .stat-num { font-size: 19px !important; }
  .chart-box { height: 230px !important; }
  .table { min-width: 520px !important; font-size: 12px !important; }
  .toolbar > .btn, .toolbar > button { flex: 1 1 100% !important; }
  .bed-grid { grid-template-columns: repeat(2,1fr) !important; }
  #school-total { font-size: 56px !important; }
  #today-should { font-size: 52px !important; }
  .cs-hero-stats { grid-template-columns: repeat(3,1fr) !important; }
}

/* =====================================================================
   平板竖屏（769–1024px）：仅修溢出，保留侧边栏
   ===================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-area, .content { min-width: 0; }
  .content { padding: 20px 16px !important; }
  .stat-grid { grid-template-columns: repeat(2,1fr) !important; }
  .chart-grid { grid-template-columns: 1fr !important; }
  .card-body, .table-wrap, #fin-body, #pay-stats { overflow-x: auto; }
  [style*="minmax(380px"], [style*="minmax(400px"] { grid-template-columns: 1fr 1fr !important; }
}

/* =====================================================================
   手机横屏（矮屏）：登录页隐藏左侧品牌区，优先显示登录表单
   ===================================================================== */
@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .login-brand { display: none !important; }
  .login-panel { padding: 20px !important; }
  .login-card { padding: 20px !important; }
}

/* 全站手机端适配 */
@media (max-width: 768px) {
  /* 整体布局调整 */
  .main-content {
    padding: 10px !important;
    margin: 0 !important;
  }
  /* 导航栏调整 */
  .nav-tabs {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .nav-tab {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
  /* 卡片调整 */
  .college-card {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }
  /* 详情页头部调整 */
  .college-detail-header {
    padding: 15px 10px !important;
  }
  .college-detail-header h1 {
    font-size: 18px !important;
  }
  /* 按钮调整 */
  .btn {
    padding: 8px 16px !important;
    font-size: 13px !important;
  }
  /* 表格调整 */
  table {
    font-size: 12px !important;
  }
  th, td {
    padding: 6px 8px !important;
  }
  /* 统计卡片调整 */
  .stat-card {
    padding: 10px !important;
  }
  .stat-number {
    font-size: 20px !important;
  }
}

/* ============================================================
 * 手机端整站响应式增强  20260919 m2
 * 仅在 <=768px 生效，配合 mobile-enhance.js 使用；桌面端不受影响。
 * ============================================================ */
@media (max-width: 768px) {
  /* 主区域高度随内容，避免短页面（班级/备份等）下方大片空白 */
  .main-area { min-height: auto !important; }
  #content { padding: 12px !important; }
  .card { overflow: visible !important; }
  .card-body { overflow: visible !important; }

  /* —— 数据表：统一横向滚动，杜绝窄列逐字竖排 —— */
  .qx-scroll { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  table.qx-data-table {
    width: 100% !important;
    min-width: max-content !important;
    border-collapse: collapse !important;
    font-size: 12.5px !important;
    margin: 0 !important;
  }
  table.qx-data-table th,
  table.qx-data-table td { padding: 7px 9px !important; vertical-align: middle !important; }
  table.qx-data-table th { white-space: nowrap !important; }
  table.qx-data-table .qx-nowrap { white-space: nowrap !important; }
  table.qx-data-table .qx-wrapcell {
    white-space: normal !important;
    word-break: break-word !important;
    min-width: 120px;
    max-width: 220px;
    vertical-align: top !important;
  }
  table.qx-data-table .qx-wrapcell .badge,
  table.qx-data-table .qx-wrapcell .tag { white-space: nowrap !important; }

  /* —— 图表：不横向溢出，轴标签由 mobile-enhance.js 留边 —— */
  .qx-chartbox { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
  .qx-chartbox canvas { max-width: 100% !important; height: auto !important; }

  /* —— 溢出/多按钮的内联 flex 行自动换行，按钮不被压成竖排 —— */
  .qx-flexwrap { flex-wrap: wrap !important; row-gap: 8px; }
  .qx-flexwrap > * { min-width: 0; }
  .qx-flexwrap > button,
  .qx-flexwrap > .btn { white-space: nowrap !important; flex-shrink: 0 !important; }

  /* —— 宿舍筛选：图例单独成行并可换成两行，文字横排 —— */
  .qx-legend {
    flex: 0 0 100% !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-left: none !important;
    justify-content: flex-start !important;
    gap: 8px 14px !important;
    margin-top: 8px !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .qx-legend > div { flex: 0 0 auto !important; white-space: nowrap !important; }

  /* —— 单招报考首页 hero —— */
  .cs-hero { padding: 18px 16px !important; }
  .cs-hero-head { flex-wrap: wrap !important; gap: 10px !important; align-items: center !important; }
  .cs-hero-head > div:first-child { width: 44px !important; height: 44px !important; border-radius: 12px !important; }
  .cs-hero-head > div:nth-child(2) { flex: 1 1 calc(100% - 54px) !important; min-width: 0 !important; }
  .cs-hero-head .cs-hero-spacer { display: none !important; }
  .cs-hero-head [style*="white-space:nowrap"] {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
  .cs-hero-head > div:nth-child(2) > div:first-child {
    font-size: 15px !important; line-height: 1.35 !important; letter-spacing: 0 !important;
  }
  .cs-hero-head > div:nth-child(2) > div:nth-child(2) {
    font-size: 11px !important; line-height: 1.5 !important; margin-top: 3px !important;
  }
  .cs-hero-stats { flex: 0 0 100% !important; width: 100% !important; margin-top: 12px !important; }

  /* 学考分/总成绩速查输入行：输入框与按钮纵向排列、按钮全宽 */
  .cs-score-row { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .cs-score-row > button {
    width: 100% !important; margin: 0 !important;
    padding-left: 0 !important; padding-right: 0 !important;
  }

  /* —— 弹窗安全边距 —— */
  .modal-content, .exam-outline-modal {
    max-width: calc(100vw - 24px) !important;
    max-height: 88vh !important;
  }

  /* \u6a2a\u6ed1\u5bbd\u8868\uff1a\u53ef\u89c1\u7ec6\u6eda\u52a8\u6761 + \u63d0\u793a\u6587\u5b57\uff0c\u6570\u636e\u53ef\u5de6\u53f3\u6ed1\u52a8\u4e0d\u201c\u6d88\u5931\u201d */
  .qx-scroll { position: relative; scrollbar-width: thin; scrollbar-color: #C9A227 #f2f2f2; }
  .qx-scroll::-webkit-scrollbar { height: 5px; width: 5px; }
  .qx-scroll::-webkit-scrollbar-thumb { background: linear-gradient(90deg,#C9A227,#E8C96A); border-radius: 3px; }
  .qx-scroll::-webkit-scrollbar-track { background: #f3f3f3; border-radius: 3px; }
  .qx-scroll-hint { display: block; text-align: right; font-size: 11px; font-weight: 600; color: #C9A227; padding: 3px 2px 0; user-select: none; }

  /* \u603b\u6210\u7ee9\u00b7\u51b2\u7a33\u4fdd\u5206\u6bb5\u5361\uff1a\u7b2c4\u683c A/B\u7c7b\u5206\u6570\u624b\u673a\u7aef\u901a\u680f\uff0c\u907f\u514d\u53ea\u53601/3\u3001\u53f3\u4fa7\u7559\u767d */
  .ts-college-card:not(.ts-card-all) > div:last-child > div:nth-child(3) > div:nth-child(4) {
    grid-column: 1 / -1 !important;
  }

  /* \u62a5\u8003\u6307\u5357 tab\uff1a\u5185\u8054\u4e24\u5217\u6587\u5b57\u5361\u624b\u673a\u7aef\u964d\u5355\u5217\uff08\u4ec5\u6307\u5357\u9762\u677f\uff0c\u4e0d\u5f71\u54cd\u8be6\u60c5\u5f39\u7a97\u4e24\u5217\u5206\u6570\uff09 */
  .cs-tab-guide [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important; gap: 14px !important;
  }

  /* \u4e0b\u62c9\u6846\uff1a\u53f3\u4fa7\u4e3a\u7bad\u5934\u9884\u7559\u7a7a\u95f4\uff0c\u907f\u514d\u9009\u4e2d\u6587\u5b57\u88ab\u88c1\u5207 */
  .content select, .modal select, #modal-root select { padding-right: 30px !important; }
}

/* \u624b\u673a\u7aef\u6a2a\u6ed1\u63d0\u793a\uff1a\u684c\u9762\u7aef\u9690\u85cf */
.qx-scroll-hint { display: none; }

@media (max-width: 480px) {
  table.qx-data-table { font-size: 12px !important; }
  table.qx-data-table th,
  table.qx-data-table td { padding: 6px 8px !important; }
  .cs-hero-head > div:nth-child(2) > div:first-child { font-size: 14px !important; }
}

/* =====================================================================
   院校搜索 · 分数段梯队卡片 手机端排版修复（仅窄屏生效，桌面端零影响）
   ===================================================================== */
@media (max-width: 768px) {
  #sq-tier-container { grid-template-columns: minmax(0,1fr) !important; gap: 14px !important; }
  #sq-tier-container .sq-tier-card { border-radius: 14px !important; }
  /* 头部：左侧信息 + 右侧计数胶囊，垂直居中、不换行不溢出 */
  #sq-tier-container .sq-tier-head {
    padding: 15px 16px !important; gap: 10px !important;
    align-items: center !important; flex-wrap: nowrap !important;
  }
  /* 隐藏右上角大号序号水印，避免与计数胶囊重叠 */
  #sq-tier-container .sq-tier-watermark { display: none !important; }
  #sq-tier-container .sq-tier-head-left { flex: 1 1 auto !important; min-width: 0 !important; }
  #sq-tier-container .sq-tier-rangeline {
    flex-wrap: wrap !important; gap: 6px 8px !important;
    margin-bottom: 6px !important; align-items: center !important;
  }
  #sq-tier-container .sq-tier-icon { font-size: 21px !important; line-height: 1 !important; }
  #sq-tier-container .sq-range {
    font-size: 21px !important; letter-spacing: .5px !important;
    white-space: nowrap !important; line-height: 1.1 !important;
  }
  #sq-tier-container .sq-tier-tag {
    font-size: 11px !important; padding: 3px 10px !important;
    border-radius: 14px !important; white-space: nowrap !important; line-height: 1.4 !important;
  }
  #sq-tier-container .sq-tier-desc { font-size: 12px !important; line-height: 1.4 !important; }
  /* 计数胶囊：固定不被压缩，数字与“所院校”严格居中对齐 */
  #sq-tier-container .sq-tier-count {
    flex: 0 0 auto !important; align-self: center !important;
    min-width: 54px !important; padding: 8px 10px !important; border-radius: 12px !important;
    box-sizing: border-box !important; display: flex !important; flex-direction: column !important;
    align-items: center !important; justify-content: center !important;
  }
  #sq-tier-container .sq-tier-count-num { font-size: 22px !important; line-height: 1 !important; }
  #sq-tier-container .sq-tier-count-label {
    font-size: 10px !important; margin-top: 3px !important;
    line-height: 1 !important; white-space: nowrap !important;
  }
  /* 名单区收紧，保持两列 */
  #sq-tier-container .sq-tier-list-wrap { padding: 13px 14px !important; }
  #sq-tier-container .sq-tier-col { gap: 6px !important; }
  #sq-tier-container .sq-tier-col-l { padding-right: 8px !important; }
  #sq-tier-container .sq-tier-col-r { padding-left: 8px !important; }
  #sq-tier-container .score-quick-college {
    font-size: 12px !important; padding: 6px 8px !important;
    gap: 6px !important; border-radius: 7px !important;
  }
}
@media (max-width: 380px) {
  #sq-tier-container .sq-tier-head { padding: 13px !important; gap: 8px !important; }
  #sq-tier-container .sq-range { font-size: 19px !important; }
  #sq-tier-container .sq-tier-icon { font-size: 19px !important; }
  #sq-tier-container .sq-tier-count { min-width: 48px !important; padding: 7px 8px !important; }
  #sq-tier-container .sq-tier-count-num { font-size: 20px !important; }
  #sq-tier-container .score-quick-college { font-size: 11px !important; padding: 6px !important; }
}


/* ============================================================
   右上角用户菜单（退出 / 切换账号） 20260921ui1
   ============================================================ */
.electron-extra { display: inline-flex; align-items: center; }
.electron-refresh {
  background: rgba(201,162,39,.1); border: 1px solid var(--gold); border-radius: 7px;
  cursor: pointer; padding: 6px 12px; color: var(--gold-deep); font-size: 13px;
  font-weight: 600; font-family: inherit; transition: background .15s;
}
.electron-refresh:hover { background: rgba(201,162,39,.18); }
.user-menu { position: relative; }
.user-menu-btn {
  display: inline-flex; align-items: center; gap: 7px; background: #F7F8FB;
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px 4px 4px;
  cursor: pointer; font-family: inherit; transition: border-color .15s, box-shadow .15s, background .15s;
}
.user-menu-btn:hover { border-color: var(--gold); background: #FDFBF4; box-shadow: 0 2px 8px rgba(185,150,30,.15); }
.user-menu-btn .topbar-user { gap: 7px; }
.user-menu-logo {
  width: 28px; height: 28px; object-fit: contain; background: #fff; border-radius: 50%;
  border: 2px solid var(--gold); box-shadow: 0 1px 4px rgba(201,162,39,.3);
}
.user-menu-name { font-size: 14px; font-weight: 600; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-caret { width: 15px; height: 15px; color: var(--text-3); transition: transform .18s ease; flex-shrink: 0; }
.user-menu.open .user-menu-caret { transform: rotate(180deg); }
.user-menu-pop {
  position: absolute; right: 0; top: calc(100% + 10px); width: 232px; background: #fff;
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; display: none; z-index: 100; transform-origin: top right;
  animation: umPop .16s ease;
}
.user-menu.open .user-menu-pop { display: block; }
@keyframes umPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.user-menu-head { display: flex; align-items: center; gap: 11px; padding: 11px 10px; }
.user-menu-avatar {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--gold-grad);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; box-shadow: 0 3px 8px rgba(185,150,30,.3);
}
.user-menu-meta { min-width: 0; }
.user-menu-meta-name { font-size: 14.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-meta-role { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.user-menu-sep { height: 1px; background: var(--border); margin: 2px 4px 6px; }
.user-menu-item {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  border: none; background: transparent; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; font-family: inherit; color: var(--danger); font-weight: 600; transition: background .15s;
}
.user-menu-item svg { width: 17px; height: 17px; }
.user-menu-item:hover { background: #FBEDED; }

/* ============================================================
   考勤管理美化（仅作用于 #att-page） 20260921att27
   ============================================================ */
.att-page .stats-row { gap: 14px; }
.att-page .stat-card {
  border-radius: 14px; box-shadow: 0 3px 14px rgba(23,32,48,.06);
  transition: transform .18s ease, box-shadow .18s ease; position: relative; overflow: hidden;
}
.att-page .stat-card::before {
  content: ""; position: absolute; right: -20px; top: -20px; width: 60px; height: 60px;
  border-radius: 50%; background: rgba(255,255,255,.5); pointer-events: none;
}
.att-page .stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23,32,48,.12); }
.att-page .stat-card > div:first-child > span:first-child {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9);
}
.att-page .stat-card > div:last-child { font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.att-page .card { border-radius: 16px; overflow: hidden; }
.att-page .card .card-head { background: linear-gradient(180deg,#FFFCF4 0%,#FFFFFF 100%); }
.att-page #at-title {
  font-size: 16px; font-weight: 700; color: var(--ink); padding-left: 11px;
  border-left: 4px solid var(--gold); line-height: 1.25;
}
.att-page #at-count { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.att-page .toolbar { background: linear-gradient(180deg,#FCFDFE,#F7F9FD); }
.att-page .toolbar select, .att-page .toolbar input {
  height: 38px; padding: 0 12px; border: 1px solid #DCE2EA; border-radius: 9px;
  font-size: 13.5px; font-family: inherit; color: var(--text); background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.att-page .toolbar select:focus, .att-page .toolbar input:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.15); background: #FFFEFA;
}
.att-page .toolbar .btn { height: 38px; }
.att-page .table thead th { padding: 12px 14px; font-size: 13px; font-weight: 700; letter-spacing: .3px; border-bottom: 2px solid #ECE3C6; }
.att-page .table tbody td { padding: 11px 14px; }
.att-page #at-tbody tr { transition: background .15s; }
.att-page #at-tbody tr:hover td { background: #FBF6E4 !important; }
.att-page #at-tbody td:nth-child(2) b { color: var(--ink); font-weight: 700; font-size: 14px; }
.at-status-btn { font-family: inherit; transition: transform .12s, box-shadow .12s, filter .12s; box-shadow: 0 1px 3px rgba(23,32,48,.06); }
.at-status-btn:not(:disabled) { cursor: pointer; }
.at-status-btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 4px 11px rgba(23,32,48,.16); filter: saturate(1.06); }
.at-status-btn:not(:disabled):active { transform: translateY(0); box-shadow: 0 1px 3px rgba(23,32,48,.1); }
.at-detail-link { transition: color .12s; }
.at-detail-link:hover { text-decoration: underline; }
.at-remark {
  border: 1px solid #E2E7EF; border-radius: 7px; padding: 6px 10px; font-size: 12.5px;
  font-family: inherit; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.at-remark:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.13); }
.att-page [id$="-list"] .table thead th { background: transparent; border-bottom: 0; font-weight: 700; }
.att-page [id$="-list"] .table tbody td { background-clip: padding-box; }
.lsn-btn { font-family: inherit; transition: transform .12s, box-shadow .12s, filter .12s; }
.lsn-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(23,32,48,.16); }

@media (max-width: 768px) {
  .user-menu-btn { padding: 3px 9px 3px 3px; gap: 5px; }
  .user-menu-btn .user-menu-name { font-size: 12px; max-width: 84px; }
  .user-menu-pop { width: 210px; }
  .att-page .stat-card { border-radius: 12px; }
  .att-page .toolbar select, .att-page .toolbar input[type="date"] { flex: 1 1 140px; }
}

/* cs-hero-desktop-narrow：单招搜索 hero 桌面窄窗(769-1560px，含Electron客户端默认窗)适配——统计卡紧凑横排、主副标题允许换行以完整显示；宽屏(>1560)保持原nowrap一行样式 */
@media (min-width:769px) and (max-width:1560px){
  .cs-hero-head{gap:12px !important;align-items:flex-start !important;}
  .cs-hero-stats{gap:8px !important;}
  .cs-hero-stats > div{padding:8px 10px !important;min-width:56px !important;}
  .cs-hero-stats > div > div:first-child{font-size:19px !important;}
  .cs-hero-stats > div > div:last-child{font-size:10px !important;}
  .cs-hero-title{white-space:normal !important;overflow:visible !important;text-overflow:clip !important;line-height:1.3 !important;}
  .cs-hero-subtitle{white-space:normal !important;overflow:visible !important;text-overflow:clip !important;line-height:1.4 !important;}
}

/* ==================== 桌面窄窗口表格防压碎（追加，仅桌面） ==================== */
@media (min-width: 769px) {
  .table td { white-space: nowrap; }
  .table td.cell-wrap { white-space: normal; word-break: break-word; min-width: 140px; max-width: 260px; }
}
