/* ===== 益新中学危化品管理系统 - 行政教育风格 ===== */

:root {
  --primary: #1e6fff;
  --primary-light: #eaf2ff;
  --primary-dark: #145ccc;
  --accent: #ffd04b;
  --accent-light: #fff8e6;
  --success: #2d7a4f;
  --success-light: #ecf5ef;
  --warning: #c4862a;
  --warning-light: #fdf6e8;
  --danger: #b03a2e;
  --danger-light: #fdf0ee;
  --bg: #f5f7fa;
  --card-bg: #fff;
  --text: #2c3e50;
  --text-secondary: #6b7d8e;
  --border: #dce1e8;
  --sidebar-bg: #1e6fff;
  --sidebar-text: rgba(255,255,255,0.85);
  --sidebar-active: rgba(255,255,255,0.18);
  --sidebar-hover: rgba(255,255,255,0.1);
  --header-bg: #1e6fff;
  --header-text: #fff;
  --radius: 4px;
  --radius-lg: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 2px 12px rgba(0,0,0,0.08);
  --font-heading: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: var(--font-heading); background: var(--bg); color: var(--text); font-size: 14px; display: flex; min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ===== Sidebar ===== */
.sidebar { width: 220px; background: var(--sidebar-bg); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
.sidebar-logo { display: none; }

.sidebar-user { display: flex; align-items: center; gap: 12px; padding: 22px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.sidebar-user .avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.18); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; flex-shrink: 0; }
.sidebar-user .user-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sidebar-user .user-name { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 18px; cursor: pointer; transition: all 0.15s; font-size: 13px; color: var(--sidebar-text); border-left: 3px solid transparent; text-decoration: none; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; border-left-color: #fff; font-weight: 500; }
.nav-item .nav-ico { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; filter: brightness(0) invert(1); opacity: 0.85; }
.nav-item:hover .nav-ico, .nav-item.active .nav-ico { opacity: 1; }
.nav-item .badge { margin-left: auto; }

.menu-group { margin-bottom: 1px; }
.menu-group-header { display: flex; align-items: center; gap: 10px; padding: 10px 18px; cursor: pointer; transition: all 0.15s; font-size: 13px; color: var(--sidebar-text); border-left: 3px solid transparent; user-select: none; }
.menu-group-header:hover { background: var(--sidebar-hover); color: #fff; }
.menu-group-header .nav-ico { width: 18px; height: 18px; flex-shrink: 0; filter: brightness(0) invert(1); opacity: 0.85; }
.menu-group-header:hover .nav-ico { opacity: 1; }
.menu-group-header .label { flex: 1; }
.menu-group-header .caret { font-size: 10px; transition: transform 0.2s; color: var(--sidebar-text); flex-shrink: 0; }
.menu-group.expanded > .menu-group-header .caret { transform: rotate(90deg); }
.menu-group.expanded > .menu-group-header { color: #fff; }
.menu-group.expanded > .menu-group-header .nav-ico { opacity: 1; }

.menu-subitems { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; background: rgba(0,0,0,0.05); }
.menu-group.expanded > .menu-subitems { max-height: 500px; }
.sub-item { display: flex; align-items: center; gap: 8px; padding: 8px 18px 8px 46px; cursor: pointer; transition: all 0.15s; font-size: 12px; color: rgba(255,255,255,0.8); border-left: 3px solid transparent; text-decoration: none; }
.sub-item:hover { background: var(--sidebar-hover); color: #fff; }
.sub-item.active { background: var(--sidebar-active); color: #fff; border-left-color: #fff; font-weight: 500; }
.sub-item .sub-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.6); flex-shrink: 0; }
.sub-item.active .sub-dot { background: #fff; }
.sub-item .badge { margin-left: auto; }

.sidebar-nav { flex: 1; padding: 6px 0; overflow-y: auto; }

/* ===== Main ===== */
.main { margin-left: 220px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.header { background: var(--header-bg); color: var(--header-text); height: 56px; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.header-brand { font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.header-tools { display: flex; align-items: center; gap: 16px; }
.header-search { width: 240px; height: 32px; border: none; border-radius: var(--radius); padding: 0 12px; font-size: 13px; background: rgba(255,255,255,0.95); color: var(--text); outline: none; }
.header-search::placeholder { color: #999; }
.header-search:focus { background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }
.header-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none; color: #fff; font-size: 13px; cursor: pointer; padding: 4px 8px; font-family: inherit; }
.header-btn:hover { opacity: 0.85; }
.header .ico-bell { filter: brightness(0) invert(1); opacity: 0.95; }
.content { padding: 22px 28px; flex: 1; }

/* 岗位切换 */
.role-switch-trigger { position: relative; cursor: pointer; user-select: none; display: inline-block; }
.role-switch-trigger .role-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--radius); font-size: 12px; color: rgba(255,255,255,0.9); transition: all 0.2s; background: rgba(255,255,255,0.12); }
.role-switch-trigger .role-tag:hover { background: rgba(255,255,255,0.22); color: #fff; }
.role-switch-trigger .role-arrow { font-size: 10px; transition: transform 0.2s; }
.role-switch-trigger.open .role-arrow { transform: rotate(180deg); }

/* 岗位下拉菜单 */
.role-dropdown { position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,0.12); z-index: 200; display: none; overflow: hidden; }
.role-dropdown.show { display: block; }
.role-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: all 0.15s; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
.role-dropdown-item:last-child { border-bottom: none; }
.role-dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.role-dropdown-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.role-dropdown-item .role-icon { width: 28px; height: 28px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.role-dropdown-item .role-icon.teacher { background: #eaf0f7; color: #1a4b8c; }
.role-dropdown-item .role-icon.keeper { background: #faf3e6; color: #b7791f; }
.role-dropdown-item .role-icon.labhead { background: #ecf5ef; color: #2d7a4f; }
.role-dropdown-item .role-icon.admin { background: #f5f0f8; color: #6b3fa0; }
.role-dropdown-item .role-icon.sysops { background: #f0f0f0; color: #555; }
.role-dropdown-item .role-icon.labtech { background: #eaf0f7; color: #1a4b8c; }
.role-dropdown-item .role-icon.safeduty { background: #faf3e6; color: #b7791f; }
.role-dropdown-item .role-icon.safedirector { background: #ecf5ef; color: #2d7a4f; }
.role-dropdown-item .role-icon.teachdirector { background: #f5f0f8; color: #6b3fa0; }
.role-dropdown-item .role-icon.principal { background: #fdecea; color: #c0392b; }
.role-dropdown-item .role-label { flex: 1; }
.role-dropdown-item .check-mark { font-size: 12px; color: var(--primary); font-weight: 700; visibility: hidden; }
.role-dropdown-item.active .check-mark { visibility: visible; }
.role-dropdown-header { padding: 10px 14px; font-size: 12px; color: var(--text-secondary); background: #f8f9fb; border-bottom: 1px solid var(--border); }

/* 岗位选择弹窗（保留兼容） */
.role-modal .role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-card { border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 18px; cursor: pointer; transition: all 0.2s; position: relative; }
.role-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(26,75,140,0.1); }
.role-card.active { border-color: var(--primary); background: var(--primary-light); }
.role-card.active::after { content: "✓"; position: absolute; top: 10px; right: 12px; color: var(--primary); font-weight: 700; font-size: 16px; }
.role-card .role-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px; font-weight: 700; }
.role-card .role-icon.teacher { background: #eaf0f7; color: #1a4b8c; }
.role-card .role-icon.keeper { background: #faf3e6; color: #b7791f; }
.role-card .role-icon.labhead { background: #ecf5ef; color: #2d7a4f; }
.role-card .role-icon.admin { background: #f5f0f8; color: #6b3fa0; }
.role-card .role-icon.labtech { background: #eaf0f7; color: #1a4b8c; }
.role-card .role-icon.safeduty { background: #faf3e6; color: #b7791f; }
.role-card .role-icon.safedirector { background: #ecf5ef; color: #2d7a4f; }
.role-card .role-icon.teachdirector { background: #f5f0f8; color: #6b3fa0; }
.role-card .role-icon.principal { background: #fdecea; color: #c0392b; }
.role-card .role-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.role-card .role-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.role-card .role-scope { margin-top: 8px; font-size: 11px; color: var(--text-secondary); background: #f8f9fb; padding: 6px 8px; border-radius: 3px; line-height: 1.4; }

/* 菜单项 - 角色过滤 */
.nav-item.hidden-by-role,
.menu-group.hidden-by-role,
.sub-item.hidden-by-role { display: none !important; }

/* ===== Cards ===== */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; cursor: default; border: 1px solid var(--border); }
.stat-card.clickable { cursor: pointer; transition: all 0.15s; }
.stat-card.clickable:hover { box-shadow: var(--shadow-lg); border-color: var(--primary); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-card .stat-icon svg { width: 20px; height: 20px; }
.stat-card .stat-num { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-card .stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.stat-card.danger .stat-icon { background: var(--danger-light); }
.stat-card.danger .stat-icon svg { color: var(--danger); }
.stat-card.warning .stat-icon { background: var(--warning-light); }
.stat-card.warning .stat-icon svg { color: var(--warning); }
.stat-card.primary .stat-icon { background: var(--primary-light); }
.stat-card.primary .stat-icon svg { color: var(--primary); }
.stat-card.success .stat-icon { background: var(--success-light); }
.stat-card.success .stat-icon svg { color: var(--success); }

/* ===== Panel ===== */
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; border: 1px solid var(--border); }
.panel-header { padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #fafbfc; border-radius: var(--radius) var(--radius) 0 0; }
.panel-header h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.panel-body { padding: 18px 20px; }

.section-block { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; border: 1px solid var(--border); }

/* ===== Toolbar ===== */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }

/* ===== Buttons ===== */
.btn { padding: 7px 16px; border-radius: var(--radius); border: 1px solid var(--border); cursor: pointer; font-size: 13px; background: #fff; color: var(--text); display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s; white-space: nowrap; font-family: inherit; text-decoration: none; }
.btn:hover { background: #f8fafc; border-color: var(--text-secondary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { color: var(--danger); border-color: #e8c5c0; }
.btn-danger:hover { background: var(--danger-light); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #246a40; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 11px; border-radius: 3px; }
.btn-text { padding: 4px 8px; border: none; background: none; color: var(--primary); cursor: pointer; font-size: 12px; font-family: inherit; }
.btn-text:hover { text-decoration: underline; }
.btn-text.danger { color: var(--danger); }

/* ===== Inputs ===== */
input, select, textarea { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: inherit; color: var(--text); outline: none; transition: border-color 0.15s; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26,75,140,0.1); }
input[readonly] { background: #f8fafc; color: var(--text-secondary); }
.input-group { display: flex; gap: 8px; align-items: center; }
textarea { resize: vertical; min-height: 60px; }

/* ===== Checkbox ===== */
.check-group { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check-group input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

/* ===== Tables ===== */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th { background: #fafbfc; font-weight: 600; color: var(--text-secondary); font-size: 12px; white-space: nowrap; border-bottom: 2px solid var(--border); }
tr:hover td { background: #f8fafc; }

/* ===== Tags ===== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.tag-danger { background: var(--danger-light); color: var(--danger); }
.tag-warning { background: var(--warning-light); color: var(--warning); }
.tag-info { background: var(--primary-light); color: var(--primary); }
.tag-success { background: var(--success-light); color: var(--success); }
.tag-gray { background: #eef1f4; color: var(--text-secondary); }

/* ===== Tabs ===== */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 14px; }
.tab { padding: 8px 18px; cursor: pointer; font-size: 13px; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 200; display: none; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 90%; max-width: 680px; max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-lg { max-width: 900px; }
.modal-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #fafbfc; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: #fafbfc; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.form-row.single { grid-template-columns: 1fr; }
.form-row.col2 { grid-template-columns: 1fr 1fr; }
.form-row.col3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.form-group small { color: var(--text-secondary); font-size: 11px; }

/* ===== Alert ===== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px; display: flex; align-items: flex-start; gap: 8px; border-left: 3px solid; }
.alert-warning { background: var(--warning-light); border-left-color: var(--warning); color: #8a5e15; }
.alert-danger { background: var(--danger-light); border-left-color: var(--danger); color: #7a2a20; }
.alert-info { background: var(--primary-light); border-left-color: var(--primary); color: var(--primary-dark); }
.alert-success { background: var(--success-light); border-left-color: var(--success); color: #1e5538; }

/* ===== Badge ===== */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 10px; font-size: 11px; font-weight: 600; padding: 0 6px; }
.badge-danger { background: var(--danger); color: #fff; }

/* ===== Progress ===== */
.progress-bar { height: 6px; background: #eef1f4; border-radius: 3px; margin-top: 4px; width: 100%; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--primary); transition: width 0.3s; }
.progress-fill.danger { background: var(--danger); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.success { background: var(--success); }

/* ===== Dual lock ===== */
.dual-lock { text-align: center; padding: 20px; }
.dual-lock h3 { margin-bottom: 16px; }
.dual-lock .lock-users { display: flex; justify-content: center; gap: 40px; margin: 24px 0; }
.dual-lock .lock-user { text-align: center; }
.dual-lock .lock-avatar { width: 56px; height: 56px; border-radius: 4px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin: 0 auto 8px; border: 2px solid var(--primary); }
.dual-lock .lock-status { font-size: 12px; color: var(--text-secondary); }
.dual-lock .lock-status.confirmed { color: var(--success); font-weight: 600; }

/* ===== Approval flow ===== */
.approval-flow { display: flex; align-items: center; gap: 12px; padding: 16px 0; flex-wrap: wrap; }
.approval-node { text-align: center; padding: 10px 16px; border-radius: var(--radius); background: #fafbfc; border: 1px solid var(--border); min-width: 80px; }
.approval-node .node-title { font-size: 12px; color: var(--text-secondary); }
.approval-node .node-name { font-weight: 600; font-size: 13px; margin: 4px 0; }
.approval-node .node-status { font-size: 11px; }
.approval-node.pending { border-color: var(--warning); background: var(--warning-light); }
.approval-node.approved { border-color: var(--success); background: var(--success-light); }
.approval-node.current { border-color: var(--primary); background: var(--primary-light); }
.approval-node.rejected { border-color: var(--danger); background: var(--danger-light); }
.approval-arrow { color: var(--text-secondary); font-size: 18px; }

/* ===== Seal stamp ===== */
.seal-stamp { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 3px solid #c0392b; border-radius: 50%; color: #c0392b; font-size: 10px; font-weight: 700; text-align: center; line-height: 1.2; transform: rotate(-15deg); opacity: 0.85; flex-shrink: 0; flex-direction: column; }

/* ===== Empty ===== */
.empty { text-align: center; padding: 50px; color: var(--text-secondary); }
.empty .empty-icon { font-size: 42px; margin-bottom: 10px; opacity: 0.5; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border-light); }
.pagination-btns { display: flex; gap: 4px; align-items: center; }
.pagination-btns .btn { min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; }

/* ===== Detail Table ===== */
.detail-table { width: 100%; }
.detail-table td { padding: 8px 12px; border: 1px solid var(--border); }
.detail-table td:first-child { background: #fafbfc; font-weight: 500; color: var(--text-secondary); width: 120px; font-size: 12px; }

/* ===== Toast ===== */
.toast { position: fixed; top: 20px; right: 20px; background: var(--success); color: #fff; padding: 12px 20px; border-radius: var(--radius); font-size: 14px; z-index: 300; opacity: 0; transform: translateY(-10px); transition: all 0.3s; pointer-events: none; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* Notification card */
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.notif-item:hover { background: #f8fafc; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--primary-light); }
.notif-item .notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 4px; flex-shrink: 0; }
.notif-item .notif-content { flex: 1; font-size: 13px; }
.notif-item .notif-time { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }

/* Inline detail rows */
.detail-row { display: flex; gap: 20px; margin-bottom: 10px; flex-wrap: wrap; }
.detail-item { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.detail-item .dt-label { font-size: 11px; color: var(--text-secondary); }
.detail-item .dt-value { font-size: 13px; font-weight: 500; }

/* Category stat row */
.cat-stat-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.cat-stat-item:last-child { border-bottom: none; }
.cat-stat-item:hover { background: #f8fafc; margin: 0 -12px; padding: 10px 12px; border-radius: var(--radius); }
.cat-stat-item .cat-name { width: 80px; font-size: 13px; font-weight: 500; flex-shrink: 0; }
.cat-stat-item .cat-count { width: 36px; text-align: right; font-weight: 600; font-size: 14px; flex-shrink: 0; }

/* Quick links */
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-link { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; text-decoration: none; color: var(--text); transition: all 0.15s; }
.quick-link:hover { border-color: var(--primary); box-shadow: var(--shadow); background: var(--primary-light); }
.quick-link .ql-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.quick-link .ql-icon svg { width: 24px; height: 24px; color: var(--primary); }
.quick-link .ql-label { font-size: 12px; font-weight: 500; }

/* ===== SVG Icon System ===== */
.nav-ico { display: inline-block; background-repeat: no-repeat; background-position: center; background-size: contain; opacity: 0.75; }
.nav-item:hover .nav-ico, .menu-group-header:hover .nav-ico { opacity: 1; }
.nav-item.active .nav-ico, .sub-item.active .nav-ico { opacity: 1; }

.ico-home { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238ba3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E"); }
.nav-item.active .ico-home, .nav-item:hover .ico-home { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E"); }

.ico-todo { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238ba3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }
.nav-item.active .ico-todo, .nav-item:hover .ico-todo { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }

.ico-basic { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238ba3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.menu-group.expanded .ico-basic, .menu-group-header:hover .ico-basic { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }

.ico-stock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238ba3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E"); }
.menu-group.expanded .ico-stock, .menu-group-header:hover .ico-stock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E"); }

.ico-inventory { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238ba3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
.menu-group.expanded .ico-inventory, .menu-group-header:hover .ico-inventory { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); }

.ico-lend { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238ba3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }
.menu-group.expanded .ico-lend, .menu-group-header:hover .ico-lend { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }

.ico-waste { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238ba3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E"); }
.menu-group.expanded .ico-waste, .menu-group-header:hover .ico-waste { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E"); }

.ico-search { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238ba3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); }
.menu-group.expanded .ico-search, .menu-group-header:hover .ico-search { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); }

/* Card stat icons (colored) */
.ico-chemical { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231a4b8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6v4l4 8a3 3 0 0 1-3 5H8a3 3 0 0 1-3-5l4-8V3z'/%3E%3Cline x1='9' y1='3' x2='15' y2='3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico-alert { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23b03a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico-clock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23c4862a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico-approve { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231a4b8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; }

/* Quick link icons */
.ico-ql-send { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a4b8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico-ql-edit { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a4b8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico-ql-chart { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a4b8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; }
.ico-ql-lock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a4b8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; }

/* Header bell icon */
.ico-bell { width: 18px; height: 18px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7d8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: contain; display: inline-block; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4ccd6; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8b2bd; }

/* ===== Section header with radio tabs ===== */
.section-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #fafbfc; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text); }
.status-filter { display: flex; align-items: center; gap: 4px; }
.status-filter .filter-item { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius); font-size: 13px; color: var(--text-secondary); cursor: pointer; white-space: nowrap; transition: all 0.15s; border: 1px solid transparent; }
.status-filter .filter-item:hover { background: #f1f5f9; color: var(--text); border-color: var(--border); }
.status-filter .filter-item.active { background: var(--primary-light); color: var(--primary); border-color: rgba(30,111,255,0.25); font-weight: 500; }
.status-filter .filter-item input[type="radio"] { width: 14px; height: 14px; margin: 0; cursor: pointer; accent-color: var(--primary); }
.status-filter .filter-count { font-size: 12px; color: inherit; opacity: 0.85; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 200px; }
  .main { margin-left: 200px; }
  .content { padding: 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* breadcrumb */
.page-breadcrumb{font-size:12px;color:var(--text-secondary);margin-bottom:14px;}
.page-breadcrumb span{margin-right:4px;}
.page-breadcrumb .current{color:var(--text);font-weight:500;}
.pagination-info{font-size:13px;color:var(--text-secondary);}

/* ===== 搜索栏多选控件（供应商/实验室/人 等集合类字段） ===== */
.search-multi { display:inline-flex; align-items:center; height:32px; border:1px solid var(--border); border-radius:4px; background:#fff; overflow:hidden; }
.search-multi .sm-input { flex:1; min-width:96px; width:160px; height:30px; border:none; padding:0 10px; font-size:13px; background:transparent; outline:none; cursor:pointer; color:var(--text); }
.search-multi .sm-input::placeholder { color:#aaa; }
.search-multi .sm-btn { height:32px; padding:0 10px; border:none; border-left:1px solid var(--border); background:#fff; cursor:pointer; color:var(--text-secondary); font-size:13px; }
.search-multi .sm-btn:hover { background:#f8fafc; color:var(--primary); }
.search-multi .sm-clear { width:24px; height:32px; border:none; background:#fff; cursor:pointer; color:var(--text-secondary); font-size:16px; line-height:1; padding:0; }
.search-multi .sm-clear:hover { color:var(--danger); }
.search-multi.has-value { border-color:var(--primary); }
.search-multi.has-value .sm-input { color:var(--primary); font-weight:500; }

/* ===== 通用多选弹窗 ===== */
.multi-picker-modal .mp-toolbar { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.multi-picker-modal .mp-toolbar input { flex:1; height:32px; padding:0 10px; border:1px solid var(--border); border-radius:4px; font-size:13px; box-sizing:border-box; }
.multi-picker-modal .mp-list { max-height:300px; overflow:auto; border:1px solid var(--border); border-radius:4px; }
.mp-item { display:flex; align-items:center; gap:8px; padding:9px 12px; border-bottom:1px solid var(--border); cursor:pointer; font-size:13px; }
.mp-item:last-child { border-bottom:none; }
.mp-item:hover { background:#f7faff; }
.mp-item.checked { background:var(--primary-light); }
.mp-item input[type=checkbox] { width:16px; height:16px; margin:0; accent-color:var(--primary); cursor:pointer; flex-shrink:0; }
.mp-item .mp-name { flex:1; }
.mp-item .mp-sub { color:var(--text-secondary); font-size:12px; }
.mp-empty { padding:24px; text-align:center; color:var(--text-secondary); font-size:13px; }
.multi-picker-modal .mp-count { font-size:12px; color:var(--text-secondary); margin-right:auto; }
