/* ========== 公司管理系统 全局样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2e7dff;
  --primary-dark: #1b5fd9;
  --primary-light: #13264d;
  --sidebar-bg: #0b1526;
  --sidebar-active: #2e7dff;
  --bg: #0a0f1c;
  --card-bg: #101a2e;
  --text: #e6edf7;
  --text-light: #8b9bb8;
  --border: #1e2d4a;
  --danger: #ff5c5c;
  --success: #2fd28a;
  --warning: #ffb020;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .35), 0 0 24px rgba(46, 125, 255, .07);
}
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ========== 布局 ========== */
/* 顶部品牌信息条 */
.brand-bar {
  height: 56px; background: #ffffff; border-bottom: 1px solid #e4e9f0;
  box-shadow: 0 1px 4px rgba(16,24,40,.06);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 60;
}
.brand-left { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.brand-name { font-size: 16px; font-weight: 700; color: #1f2733; letter-spacing: .5px; }
.brand-ver { font-size: 12px; color: #8a93a5; border-left: 1px solid #dbe2ec; padding-left: 10px; }
.brand-right { display: flex; align-items: center; gap: 16px; }
.brand-right .user-item { font-size: 13px; color: #667085; display: flex; align-items: center; gap: 4px; }
.brand-right .user-item b { color: #1f2733; font-weight: 600; }
.brand-right .msg-svr { font-size: 12px; color: #667085; display: flex; align-items: center; gap: 6px; }
.brand-right .msg-svr::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #079455; }

.layout-body { display: flex; min-height: calc(100vh - 56px); }
.sidebar {
  width: 200px; background: var(--sidebar-bg); color: #cbd2e0;
  display: flex; flex-direction: column; position: sticky; top: 56px; height: calc(100vh - 56px);
  left: 0; z-index: 50; flex-shrink: 0;
}
.sidebar .logo {
  padding: 18px 20px; font-size: 16px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .logo .logo-icon {
  width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #1e6fff, #5a9bff);
  display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff;
}
.sidebar .logo .logo-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sidebar nav { flex: 1; padding: 6px 0; overflow-y: auto; }
.sidebar nav .nav-group { padding: 10px 20px 4px; font-size: 11px; color: #7c8798; letter-spacing: 1px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 20px; color: #cbd2e0;
  border-left: 3px solid transparent; font-size: 13px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(30,111,255,.16); color: #fff; border-left-color: var(--sidebar-active); }
.sidebar nav a .icon { width: 16px; height: 16px; flex-shrink: 0; text-align: center; }
.sidebar nav a svg.icon { display: block; margin: 0 auto; }
/* 员工管理-部门子菜单（树状图） */
.nav-sub { display: none; overflow: hidden; margin-left: 22px; border-left: 1px solid rgba(46,125,255,.28); }
.nav-sub.open { display: block; animation: navSubIn .18s ease; }
@keyframes navSubIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nav-arrow { margin-left: auto; font-size: 11px; color: #7c8798; transition: transform .2s; }
a[data-view="employees"].active .nav-arrow { color: #cfe0ff; }
.nav-sub a {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 18px;
  font-size: 12px; color: #aab4c4;
}
.nav-sub a::before {
  content: ''; position: absolute; left: -10px; top: 50%;
  width: 9px; height: 1px; background: rgba(46,125,255,.35);
}
.nav-sub a::after {
  content: ''; position: absolute; left: -13px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #2e7dff; opacity: .55;
}
.nav-sub a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-sub a:hover::before, .nav-sub a:hover::after { opacity: 1; }
.nav-sub a.active { background: rgba(30,111,255,.16); color: #fff; }
.nav-sub a.active::before { background: #6ea8ff; }
.nav-sub a.active::after { background: #6ea8ff; opacity: 1; box-shadow: 0 0 8px rgba(46,125,255,.8); }
.nav-sub-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub-count { font-size: 10px; color: #7c8798; flex-shrink: 0; }
.nav-sub a.active .nav-sub-count { color: #cfe0ff; }
.sidebar .sidebar-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #7c8798; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 24px; flex: 1; }

/* ========== 通用组件 ========== */
.card {
  background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 20px;
}
.card .card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.card .card-title .sub { font-size: 12px; color: var(--text-light); font-weight: 400; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 13px; transition: all .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { background: #fff; border-color: #f1b6b8; color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-light); font-weight: 500; font-size: 12px; background: #fafbfd; }
tr:hover td { background: #f8fafc; }
td .actions { display: flex; gap: 6px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.badge-blue { background: #e8f0ff; color: var(--primary); }
.badge-green { background: #e6f6ee; color: var(--success); }
.badge-red { background: #fdecec; color: var(--danger); }
.badge-orange { background: #fef4e4; color: var(--warning); }
.badge-purple { background: #f0e8ff; color: #7c3aed; }
.badge-gray { background: #f0f1f4; color: var(--text-light); }

.empty { text-align: center; color: var(--text-light); padding: 40px 0; }
.empty .icon { font-size: 40px; margin-bottom: 8px; }

/* ========== 表单 ========== */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.form-item label .req { color: var(--danger); }
input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,111,255,.12); }
textarea { resize: vertical; min-height: 80px; }

/* ========== 弹窗 ========== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff; border-radius: 14px; width: 560px; max-width: 94vw; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(15,23,42,.25);
}
.modal.wide { width: 780px; }
.modal .modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal .modal-head h3 { font-size: 16px; }
.modal .modal-head .close { background: none; border: none; font-size: 20px; color: var(--text-light); }
.modal .modal-body { padding: 20px 22px; overflow-y: auto; }
.modal .modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ========== 统计卡片 ========== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden;
}
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.stat-card .stat-num { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.ic-blue { background: #e8f0ff; color: var(--primary); }
.ic-green { background: #e6f6ee; color: var(--success); }
.ic-orange { background: #fef4e4; color: var(--warning); }
.ic-red { background: #fdecec; color: var(--danger); }
.ic-purple { background: #f0eafc; color: #7c5cd6; }

/* ========== 简单柱状图 ========== */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding: 0 8px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bars .bar-col .bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bars .bar-col .bar { width: 60%; max-width: 46px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #5a9bff, #1e6fff); min-height: 3px; transition: height .3s; }
.bars .bar-col .bar-label { font-size: 12px; color: var(--text-light); }
.bars .bar-col .bar-val { font-size: 11px; color: var(--text-light); }

/* ========== 排班表 ========== */
.schedule-table th, .schedule-table td { text-align: center; }
.schedule-table td { min-width: 110px; }
.schedule-table .shift-cell { padding: 4px 6px; border-radius: 6px; background: #e8f0ff; color: var(--primary); font-size: 13px; }
.schedule-table .shift-none { color: #c3c9d4; font-size: 12px; }
.week-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

/* ========== 安全十字 ========== */
.safety-cross { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.safety-dim {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-align: center; position: relative;
  border-top: 4px solid var(--primary);
}
.safety-dim .dim-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.safety-dim .dim-desc { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }
.safety-dim .dim-nums { display: flex; justify-content: center; gap: 16px; }
.safety-dim .dim-nums .num { font-size: 18px; font-weight: 700; }
.safety-dim .dim-nums .ok { color: var(--success); }
.safety-dim .dim-nums .bad { color: var(--danger); }

/* ========== 二维码 ========== */
.qr-box { text-align: center; padding: 10px; }
.qr-box img { width: 240px; height: 240px; border-radius: 10px; border: 1px solid var(--border); }
.qr-box .qr-title { font-size: 15px; font-weight: 600; margin: 12px 0 4px; }
.qr-box .qr-url { font-size: 12px; color: var(--text-light); word-break: break-all; }

/* ========== 通知公告条 ========== */
.ann-strip { padding: 12px 18px; }
.ann-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--border); cursor: pointer; flex-wrap: wrap; }
.ann-item:last-child { border-bottom: none; }
.ann-item:hover .ann-title { color: var(--primary); }
.ann-item .ann-cat { font-size: 12px; color: var(--success); font-weight: 600; }
.ann-item .ann-cat.cat-blue { color: var(--primary); }
.ann-item .ann-title { flex: 1; font-size: 14px; }
.ann-item .ann-time { font-size: 12px; color: var(--text-light); }

/* ========== 提示 ========== */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border-radius: 10px; box-shadow: 0 8px 30px rgba(15,23,42,.18); padding: 12px 18px;
  display: flex; align-items: center; gap: 10px; min-width: 220px; animation: slideIn .25s ease;
  border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warning); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ========== 工具 ========== */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.toolbar .left, .toolbar .right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; }
/* 排班筛选行 */
.sched-filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.sched-filter-row select { width: 220px; }
.sched-filter-row input { width: 150px; }
.sched-filter-row .btn { padding: 4px 10px; font-size: 12px; }
/* 排班本周概览 */
.sched-summary { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sched-sum-day { flex: 1; min-width: 110px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.sched-sum-week { font-weight: 700; font-size: 14px; }
.sched-sum-date { font-size: 11px; color: var(--text-light); margin: 2px 0 6px; }
.sched-sum-nums { display: flex; justify-content: center; gap: 8px; font-size: 12px; }
.c-day { color: var(--primary); font-weight: 600; }
.c-night { color: #7c3aed; font-weight: 600; }
.c-rest { color: var(--text-light); }
.sched-group-card { margin-bottom: 16px; }
.sched-group-card .card-title { font-size: 15px; }
.sched-week-st { white-space: nowrap; font-size: 12px; }
.flex { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
.muted { color: var(--text-light); }
.mt16 { margin-top: 16px; }
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ========== 登录页 ========== */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f1e3d 0%, #1e6fff 130%);
}
.login-box {
  width: 400px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 40px 36px; box-shadow: 0 24px 80px rgba(0,0,0,.25);
}
.login-box .login-logo { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.login-box .login-logo .logo-icon {
  width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #1e6fff, #5a9bff);
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff;
}
.login-box .login-logo-img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.login-box h1 { font-size: 24px; margin-bottom: 24px; }
.login-box .form-item { margin-bottom: 16px; }
.login-box .login-btn { width: 100%; padding: 11px; font-size: 15px; }

/* ========== 科技风主题覆盖 ========== */
/* 顶部品牌条：深色玻璃 */
.brand-bar { background: rgba(13, 23, 43, .85); border-bottom: 1px solid rgba(46,125,255,.25); box-shadow: 0 2px 16px rgba(0,0,0,.4); }
.brand-name { color: #ffffff; text-shadow: 0 0 14px rgba(46,125,255,.5); }
.brand-ver { color: #6d81a6; border-left-color: #24344f; }
.brand-right .user-item { color: #8b9bb8; }
.brand-right .user-item b { color: #e6edf7; }
.brand-right .msg-svr { color: #8b9bb8; }
.brand-right .msg-svr::before { background: #2fd28a; box-shadow: 0 0 8px rgba(47,210,138,.8); }
.brand-right .role-tag { font-size: 11px; color: #6ea8ff; background: rgba(46,125,255,.18); padding: 2px 8px; border-radius: 20px; }

/* 侧边栏：深色渐变科技风 */
.sidebar { background: linear-gradient(180deg, #0e1c3a 0%, #091225 100%); border-right: 1px solid rgba(46,125,255,.3); color: #a5b6d4; }
.sidebar nav .nav-group { color: #5d7196; }
.sidebar nav a { color: #a5b6d4; }
.sidebar nav a:hover { background: rgba(46,125,255,.12); color: #fff; }
.sidebar nav a.active { background: linear-gradient(90deg, rgba(46,125,255,.28), rgba(46,125,255,.06)); color: #fff; border-left: 3px solid #2e7dff; font-weight: 600; box-shadow: inset 0 0 18px rgba(46,125,255,.12); }
.sidebar nav a .nav-arrow { color: #5d7196; }
.sidebar nav a.active .nav-arrow { color: #6ea8ff; }
.nav-sub a { color: #8ba0c2; }
.nav-sub a:hover { background: rgba(46,125,255,.12); color: #fff; }
.nav-sub a.active { background: linear-gradient(90deg, rgba(46,125,255,.28), rgba(46,125,255,.06)); color: #fff; border-left-color: #2e7dff; }
.nav-sub a.active .nav-sub-count { color: #6ea8ff; }
a[data-view="employees"].active .nav-arrow { color: #6ea8ff; }
.sidebar .sidebar-foot { color: #5d7196; border-top: 1px solid rgba(46,125,255,.15); }

/* 卡片：深色玻璃 + 微光 */
.card { background: rgba(16, 26, 46, .75); border: 1px solid rgba(46,125,255,.14); box-shadow: 0 2px 14px rgba(0,0,0,.3), 0 0 20px rgba(46,125,255,.05); }
.card .card-title { color: #e6edf7; }

/* 按钮 */
.btn { background: rgba(16,26,46,.6); border-color: #2a3b5c; color: #c7d3e8; }
.btn:hover { border-color: #2e7dff; color: #6ea8ff; }
.btn-primary { background: linear-gradient(135deg, #2e7dff, #1a6cff); border-color: #2e7dff; color: #fff; box-shadow: 0 2px 10px rgba(46,125,255,.35); }
.btn-primary:hover { background: linear-gradient(135deg, #3d8bff, #2e7dff); color: #fff; box-shadow: 0 4px 16px rgba(46,125,255,.45); }
.btn-danger { background: rgba(16,26,46,.6); border-color: #7a3a44; color: #ff8080; }
.btn-danger:hover { background: #ff5c5c; border-color: #ff5c5c; color: #fff; }
.btn-success { background: #2fd28a; border-color: #2fd28a; color: #0a1f16; }

/* 表格 */
table th { background: #14223f; color: #93a7cc; font-weight: 600; font-size: 12px; }
th, td { border-bottom-color: #1e2d4a; }
tr:hover td { background: rgba(46,125,255,.08); }
td { color: #c7d3e8; }

/* 徽标：深底亮字 */
.badge-blue { background: rgba(46,125,255,.18); color: #6ea8ff; }
.badge-green { background: rgba(47,210,138,.15); color: #4adea0; }
.badge-red { background: rgba(255,92,92,.15); color: #ff8a8a; }
.badge-orange { background: rgba(255,176,32,.15); color: #ffc85c; }
.badge-purple { background: rgba(140,100,255,.18); color: #b49aff; }
.badge-gray { background: rgba(139,155,184,.15); color: #a5b6d4; }

/* 表单输入 */
input, select, textarea { background: #0d1730; border-color: #2a3b5c; color: #e6edf7; }
input:focus, select:focus, textarea:focus { border-color: #2e7dff; box-shadow: 0 0 0 3px rgba(46,125,255,.18), 0 0 12px rgba(46,125,255,.25); }
input::placeholder, textarea::placeholder { color: #5d7196; }
select option { background: #101a2e; color: #e6edf7; }

/* 弹窗 */
.modal-mask { background: rgba(4, 8, 18, .6); }
.modal { background: #101a2e; border: 1px solid rgba(46,125,255,.22); box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 40px rgba(46,125,255,.08); }
.modal .modal-head, .modal .modal-foot { border-color: #1e2d4a; }

/* 统计卡片 */
.stat-card { background: rgba(16, 26, 46, .75); border: 1px solid rgba(46,125,255,.12); box-shadow: 0 2px 14px rgba(0,0,0,.3); }
.stat-card .stat-num { color: #fff; }
.ic-blue { background: rgba(46,125,255,.18); color: #6ea8ff; }
.ic-green { background: rgba(47,210,138,.15); color: #4adea0; }
.ic-orange { background: rgba(255,176,32,.15); color: #ffc85c; }
.ic-red { background: rgba(255,92,92,.15); color: #ff8a8a; }
.ic-purple { background: rgba(140,100,255,.18); color: #b49aff; }

/* 柱状图 */
.bars .bar-col .bar { background: linear-gradient(180deg, #6ea8ff, #2e7dff); box-shadow: 0 0 12px rgba(46,125,255,.5); }

/* 排班 */
.schedule-table .shift-cell { background: rgba(46,125,255,.18); color: #6ea8ff; }
.schedule-table .shift-none { color: #4a5a7a; }
.sched-sum-day { background: rgba(16,26,46,.6); border-color: #24344f; }
.c-night { color: #b49aff; }

/* 安全十字 */
.safety-dim { background: rgba(16,26,46,.75); border-top-color: #2e7dff; box-shadow: 0 2px 14px rgba(0,0,0,.3); }

/* 二维码 */
.qr-box img { border-color: #2a3b5c; }

/* 通知公告 */
.ann-item { border-bottom-color: #1e2d4a; }

/* Toast */
.toast { background: #101a2e; border: 1px solid #24344f; box-shadow: 0 8px 30px rgba(0,0,0,.5); }

/* 登录页：深空科技渐变 */
.login-body { background: radial-gradient(ellipse at 50% -20%, #123a75 0%, #0a1630 55%, #050a18 100%); }
.login-box { background: rgba(16, 26, 46, .85); border: 1px solid rgba(46,125,255,.25); box-shadow: 0 24px 80px rgba(0,0,0,.5), 0 0 50px rgba(46,125,255,.1); }
.login-box h1 { color: #fff; }
.login-box .login-logo .logo-icon { background: linear-gradient(135deg, #2e7dff, #00b4ff); box-shadow: 0 0 18px rgba(46,125,255,.55); }

/* ========== 响应式 ========== */
.swipe-hint { display: none; }
/* 汉堡菜单按钮（窄屏显示） */
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,.05); color: var(--text); font-size: 18px; cursor: pointer; flex-shrink: 0;
}
.menu-btn:hover { border-color: var(--primary); color: #fff; }
/* 抽屉遮罩 */
.sidebar-mask {
  display: none; position: fixed; inset: 56px 0 0 0; background: rgba(5,10,24,.6);
  z-index: 49; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sidebar-mask.show { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  /* 侧边栏改为抽屉：默认收起，点汉堡按钮滑出完整导航 */
  .sidebar {
    width: 220px;
    position: fixed; top: 56px; bottom: 0; left: 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: none; z-index: 60;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
  .sidebar-mask { display: block; }
  .brand-right .msg-svr, .brand-right .user-item:nth-of-type(3) { display: none; }
  .form-grid, .grid-2 { grid-template-columns: 1fr; }
  .safety-cross { grid-template-columns: repeat(2, 1fr); }
}

/* ========== 手机端适配（<768px） ========== */
@media (max-width: 768px) {
  .content { padding: 12px; }
  .brand-bar { padding: 0 12px; gap: 8px; }
  .brand-name { font-size: 14px; }
  .brand-ver { display: none; }
  .brand-right { gap: 8px; }
  .brand-right .msg-svr { display: none; }
  .brand-right .user-item { font-size: 12px; }
  /* 手机端品牌条精简：只保留用户名 + 改密 + 退出 */
  .brand-right .user-item:not(#userItem) { display: none; }
  .brand-right #userItem .user-label { display: none; }
  .brand-right .user-item:last-of-type { display: none; }
  .brand-right .btn { padding: 5px 9px; font-size: 12px; }
  .card { padding: 14px; margin-bottom: 14px; }
  .card-title { font-size: 14px; }
  .card-title .sub { display: block; margin-top: 2px; }

  /* 统计卡：手机单列全宽，铺满屏幕 */
  .stat-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-num { font-size: 28px; }
  .stat-card .stat-label { font-size: 13px; }
  .stat-card .stat-icon { width: 48px; height: 48px; font-size: 22px; }

  /* 工具栏/按钮紧凑换行 */
  .toolbar { gap: 8px; margin-bottom: 12px; }
  .toolbar .btn { padding: 7px 12px; font-size: 13px; }
  .toolbar select, .toolbar input { max-width: 46%; font-size: 13px; }

  /* 表格：保持完整宽度，容器触摸横向滚动，不压缩截断 */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 480px; }
  .actions { flex-wrap: wrap; }
  .btn.btn-sm { padding: 5px 9px; font-size: 12px; }

  /* 表格滑动提示 */
  .swipe-hint { display: block; text-align: center; color: #9aa1ad; font-size: 11px; padding: 6px 0 2px; }

  /* 弹窗全屏展示，内容不截断 */
  .modal, .modal.wide { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .modal .modal-head, .modal .modal-foot { padding: 14px; }
  .modal .modal-body { padding: 14px; }

  /* 隐藏次要列（页面 JS 给 th/td 加 class="hide-sm"） */
  .hide-sm { display: none; }

  /* 防手机横向溢出兜底 */
  .layout-body, .main, .content, .grid-2 { overflow-x: hidden; }
}
