@font-face {
  font-family: "Source Han Sans SC VF";
  src: url("assets/fonts/source-han-sans-sc-vf.otf") format("opentype");
  font-weight: 250 900;
  font-style: normal;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 1440px; height: 900px; }
body {
  font-family: "Source Han Sans SC VF", sans-serif;
  background: #F4F6F9;
  color: #0F172A;
}
button, input, select, textarea, svg text { font-family: "Source Han Sans SC VF", sans-serif; }
#root { width: 1440px; height: 900px; display: flex; flex-direction: column; overflow: hidden; }
.app-body { flex: 1; min-height: 0; display: flex; }

/* ===== 侧栏 ===== */
aside { width: 248px; background: #FFFFFF; border-right: 1px solid #E8EDF2; display: flex; flex-direction: column; flex-shrink: 0; }
.user-card { padding: 16px 20px 12px; border-bottom: 1px solid #EEF2F6; }
.user-meta { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: #E2E8F0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #94A3B8; font-size: 22px; }
.user-name { font-size: 17px; font-weight: 800; }
.user-org { font-size: 12.5px; color: #64748B; margin-top: 2px; }
.user-role { display: inline-block; margin-top: 6px; font-size: 12px; color: #15803D; background: #ECFDF5; padding: 2px 10px; border-radius: 999px; }

.menu { flex: 1; overflow-y: auto; padding: 10px 12px; }
.menu-group > .g-title { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; font-size: 14px; font-weight: 700; color: #334155; }
.menu-group > .g-title .arrow { color: #94A3B8; font-size: 12px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 22px; font-size: 14px; color: #475569; border-radius: 8px; cursor: pointer; margin: 1px 0; }
.menu-item .mi-icon { width: 16px; text-align: center; color: #94A3B8; }
.menu-item:hover { background: #F1F5F9; }
.menu-item.active { background: #ECFDF5; color: #15803D; font-weight: 700; }
.menu-item.active .mi-icon { color: #16A34A; }
.menu-badge { margin-left: auto; background: #EF4444; color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; }
.menu-sub { margin: 2px 0 6px 0; }
.menu-sub .menu-item { padding-left: 36px; }
.menu-foot { padding: 10px 20px; border-top: 1px solid #EEF2F6; font-size: 13px; color: #64748B; }
.menu-foot div { padding: 5px 0; cursor: pointer; }

/* ===== 主内容 ===== */
main { flex: 1; overflow-y: auto; padding: 24px 28px; }
.page { display: none; }
.page.active { display: block; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-size: 24px; font-weight: 800; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.search-box { width: 380px; padding: 9px 14px; border: 1px solid #E2E8F0; border-radius: 10px; background: #fff; font-size: 14px; color: #94A3B8; }
.btn { border: 1px solid #E2E8F0; background: #fff; border-radius: 10px; padding: 9px 16px; font-size: 14px; cursor: pointer; color: #334155; }
.btn-primary { background: #16A34A; border-color: #16A34A; color: #fff; font-weight: 700; }

/* 岗位与职责：三栏 */
.org-layout { display: flex; gap: 18px; }
.org-tree { width: 280px; background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; padding: 14px; flex-shrink: 0; }
.org-tree .ot-title { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.org-node { padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.org-node .on-name { font-size: 14px; font-weight: 700; }
.org-node .on-meta { font-size: 12px; color: #64748B; margin-top: 3px; }
.org-node.sel { background: #F1F5F9; }
.org-node.child { margin-left: 14px; }

.role-panel { flex: 1; background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; padding: 16px; }
.role-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.role-toolbar .rt-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #475569; }
.role-list { display: flex; flex-direction: column; gap: 10px; }
.role-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #EEF2F6; border-radius: 12px; }
.role-card.sel { border-color: #86EFAC; background: #F7FEFA; }
.role-card input[type=checkbox] { width: 16px; height: 16px; accent-color: #16A34A; }
.role-main { flex: 1; }
.role-name { font-size: 15px; font-weight: 700; }
.role-meta { font-size: 12.5px; color: #64748B; margin-top: 3px; }
.tag-admin { background: #FEF3C2; color: #B45309; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.role-more { color: #94A3B8; font-size: 18px; }

/* SOP 抽屉 */
.sop-panel { width: 350px; background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; padding: 16px; flex-shrink: 0; }
.sop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sop-title { font-size: 17px; font-weight: 800; }
.sop-sub { font-size: 12.5px; color: #64748B; margin: 4px 0 14px; }
.sop-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.sop-actions .btn { padding: 7px 12px; font-size: 13px; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #E2E8F0; }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #16A34A; border: 2px solid #DCFCE7; }
.tl-time { font-size: 12.5px; color: #16A34A; font-weight: 700; }
.tl-title { font-size: 14px; font-weight: 700; margin-top: 3px; }
.tl-desc { font-size: 12.5px; color: #64748B; margin-top: 3px; line-height: 1.6; }

/* 报表页 */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid #E8EDF2; margin-bottom: 20px; }
.tab { padding: 10px 2px; font-size: 15px; color: #64748B; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: #15803D; font-weight: 800; border-bottom-color: #16A34A; }
.report-filter { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: #64748B; margin-bottom: 20px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.metric-card { background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; padding: 20px; }
.metric-label { font-size: 13px; color: #64748B; }
.metric-value { font-size: 30px; font-weight: 800; margin-top: 8px; }
.metric-value small { font-size: 13px; font-weight: 500; color: #64748B; }
.metric-sub { font-size: 12px; color: #94A3B8; margin-top: 6px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; padding: 18px; }
.chart-title { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.chart-sub { font-size: 12.5px; color: #64748B; margin-bottom: 12px; }

/* 全貌页 */
.overview-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.overview-title { font-size: 24px; font-weight: 800; }
.overview-filter { font-size: 13.5px; color: #64748B; }
.std-card { background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; padding: 24px; }
.std-title { font-size: 17px; font-weight: 800; }
.std-desc { font-size: 13px; color: #64748B; margin: 6px 0 20px; }
.std-metrics { display: flex; gap: 40px; }
.std-metric .num { font-size: 30px; font-weight: 800; }
.std-metric .lab { font-size: 13px; color: #64748B; margin-top: 4px; }

/* 占位空态 */
.empty-box { background: #fff; border: 1px dashed #CBD5E1; border-radius: 16px; height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #94A3B8; }
.empty-box .eb-icon { font-size: 40px; }
.empty-box .eb-title { font-size: 17px; font-weight: 700; color: #64748B; }
.empty-box .eb-desc { font-size: 13px; }

/* ===== 通用：筛选 chips ===== */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 7px 15px; border: 1px solid #E2E8F0; background: #fff; border-radius: 999px; font-size: 13px; color: #475569; cursor: pointer; }
.chip.active { background: #ECFDF5; border-color: #86EFAC; color: #15803D; font-weight: 700; }

/* ===== 通用：状态徽章 ===== */
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-blue { background: #EFF4FF; color: #1D4ED8; }
.b-green { background: #ECFDF5; color: #15803D; }
.b-orange { background: #FFF7ED; color: #C2410C; }
.b-purple { background: #F5F3FF; color: #6D28D9; }
.b-teal { background: #F0FDFA; color: #0F766E; }
.b-red { background: #FEF2F2; color: #DC2626; }
.b-gray { background: #F1F5F9; color: #475569; }

/* ===== 通用：数据表格 ===== */
.table-card { background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; padding: 13px 16px; color: #64748B; font-weight: 700; background: #F8FAFC; border-bottom: 1px solid #EEF2F6; font-size: 12.5px; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid #F1F5F9; color: #334155; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .cell-main { font-weight: 700; }
.data-table .cell-sub { font-size: 12px; color: #94A3B8; margin-top: 2px; }
.link { color: #16A34A; cursor: pointer; }

/* ===== 通用：卡片网格 ===== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info-card { background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; padding: 18px; }
.info-card .ic-title { font-size: 16px; font-weight: 800; }
.info-card .ic-meta { font-size: 12.5px; color: #64748B; margin-top: 5px; line-height: 1.7; }
.info-card .ic-stats { display: flex; gap: 26px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #F1F5F9; }
.info-card .ic-stats .num { font-size: 20px; font-weight: 800; }
.info-card .ic-stats .lab { font-size: 12px; color: #64748B; margin-top: 2px; }
.info-card .ic-foot { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; }

/* ===== 消息列表 ===== */
.msg-list { background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; overflow: hidden; }
.msg-item { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #F1F5F9; align-items: flex-start; }
.msg-item:last-child { border-bottom: none; }
.msg-dot { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.msg-body { flex: 1; }
.msg-title { font-size: 14.5px; font-weight: 700; }
.msg-title .unread { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #EF4444; margin-left: 6px; }
.msg-desc { font-size: 12.5px; color: #64748B; margin-top: 4px; line-height: 1.6; }
.msg-time { font-size: 12px; color: #94A3B8; flex-shrink: 0; }

/* ===== 排班网格 ===== */
.sched-card { background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; overflow: hidden; }
.sched-grid { display: grid; grid-template-columns: 200px repeat(7, 1fr); }
.sched-cell { padding: 14px 12px; border-right: 1px solid #F1F5F9; border-bottom: 1px solid #F1F5F9; font-size: 12.5px; }
.sched-head { background: #F8FAFC; font-weight: 700; color: #64748B; font-size: 12.5px; }
.sched-role { font-weight: 700; background: #FCFDFE; }
.sched-role .sr-sub { font-weight: 400; color: #94A3B8; font-size: 11.5px; margin-top: 2px; }
.sched-cell.on { color: #15803D; }
.sched-cell.off { color: #CBD5E1; }
.shift-pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px; margin-top: 3px; }
.shift-day { background: #EFF4FF; color: #1D4ED8; }
.shift-night { background: #F5F3FF; color: #6D28D9; }

/* ===== 时间线（更新记录） ===== */
.ver-timeline { position: relative; padding-left: 24px; }
.ver-timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: #E2E8F0; }
.ver-item { position: relative; padding-bottom: 22px; }
.ver-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #16A34A; border: 2px solid #DCFCE7; }
.ver-tag { font-size: 13px; font-weight: 800; color: #16A34A; }
.ver-date { font-size: 12px; color: #94A3B8; margin-left: 8px; }
.ver-desc { font-size: 13px; color: #334155; margin-top: 5px; line-height: 1.7; }

/* 帮助步骤 */
.help-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.help-step { background: #fff; border: 1px solid #E8EDF2; border-radius: 14px; padding: 22px; }
.help-step .hs-no { width: 32px; height: 32px; border-radius: 10px; background: #ECFDF5; color: #15803D; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.help-step .hs-title { font-size: 15px; font-weight: 800; }
.help-step .hs-desc { font-size: 12.5px; color: #64748B; margin-top: 6px; line-height: 1.7; }

/* ===== 交互补充（保持原型视觉语言） ===== */
input.search-box { outline: none; }
input.search-box::placeholder { color: #94A3B8; }
input.search-box:focus { border-color: #86EFAC; box-shadow: 0 0 0 3px rgba(22,163,74,.08); }
.menu-sub.collapsed { display: none; }
.menu-item, .menu-foot div, .org-node, .role-card, .chip, .tab, .btn, .sched-cell.on, .sched-cell.off { user-select: none; }
.role-card { cursor: pointer; }
.sched-cell.on, .sched-cell.off { cursor: pointer; }
.sched-cell.on:hover, .sched-cell.off:hover { background: #F7FEFA; }

/* 报表面板 */
.report-panel { display: block; }
.report-panel + .report-panel { margin-top: 0; }

/* 遮罩与弹窗 */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.38); z-index: 100; display: flex; align-items: center; justify-content: center; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 520px; max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 22px 24px; box-shadow: 0 24px 60px rgba(15,23,42,.24); animation: popIn .18s ease; }
@keyframes popIn { from { transform: translateY(8px) scale(.99); opacity: .8; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.modal-head h3 { font-size: 19px; font-weight: 800; }
.modal-head p { font-size: 12.5px; color: #64748B; margin-top: 5px; line-height: 1.6; }
.icon-btn { border: none; background: transparent; width: 30px; height: 30px; border-radius: 8px; color: #94A3B8; font-size: 22px; line-height: 1; cursor: pointer; }
.icon-btn:hover { background: #F1F5F9; color: #475569; }
.form-field { display: block; margin-bottom: 13px; }
.form-field > span { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid #E2E8F0; border-radius: 10px; padding: 9px 12px; font-size: 14px; color: #0F172A; background: #fff; outline: none; }
.form-field textarea { resize: vertical; line-height: 1.6; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #86EFAC; box-shadow: 0 0 0 3px rgba(22,163,74,.08); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 工单详情抽屉 */
.ticket-drawer { margin-left: auto; height: 100%; width: 440px; background: #fff; box-shadow: -18px 0 50px rgba(15,23,42,.16); padding: 22px 24px; overflow-y: auto; animation: slideIn .2s ease; }
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-kicker { font-size: 12px; color: #94A3B8; font-weight: 700; letter-spacing: .04em; }
.drawer-head h3 { font-size: 22px; font-weight: 800; margin-top: 4px; }
.drawer-status { display: flex; align-items: center; gap: 10px; margin: 12px 0 18px; }
.drawer-updated { font-size: 12px; color: #94A3B8; }
.detail-list { border: 1px solid #EEF2F6; border-radius: 12px; padding: 4px 14px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid #F1F5F9; font-size: 13px; }
.detail-list > div:last-child { border-bottom: none; }
.detail-list span { color: #64748B; flex-shrink: 0; }
.detail-list b { font-weight: 700; text-align: right; }
.drawer-section-title { font-size: 14px; font-weight: 800; margin: 20px 0 12px; }
.timeline.compact .tl-item { padding-bottom: 12px; }
.timeline .tl-item:not(.done)::before { background: #CBD5E1; border-color: #F1F5F9; }
.timeline .tl-item:not(.done) .tl-time { color: #94A3B8; }
.drawer-actions { position: sticky; bottom: 0; background: #fff; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.drawer-actions .btn { flex: 1; min-width: 120px; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #FAFCFD; }

/* 提示 */
#toast-root { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #0F172A; color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(15,23,42,.25); opacity: 0; transform: translateY(8px); transition: all .18s ease; }
.toast.show { opacity: 1; transform: none; }
.msg-item.clickable-row:hover { background: #FAFCFD; }
