/* WEB 管理后台主题：布局与视觉集中维护，业务控件沿用原实现。 */
:root {
  --bg: #ffffff; --card: #ffffff; --screen-border: #e5e7eb; --line: #eff0f3;
  --text: #202126; --text-2: #464951; --text-3: #646973; --text-4: #6b707a; --text-5: #707580;
  --primary: #2851d8; --primary-tint: #eef2ff; --primary-soft: #e4ebff; --primary-border: #cbd7fa;
  --fill: #f7f7f8; --navy: #454650; --navy-tint: #f1f1f3;
  --amber: #955c1f; --amber-tint: #fff8eb; --amber-text: #88551d;
  --green: #33735a; --green-tint: #edf6f0; --red: #b63847; --gray-tint: #f3f3f5;
  --shadow-panel: 0 1px 3px #18181b05, 0 4px 16px #18181b05;
  --sidebar-w: 232px; --header-h: 78px; --page-inset: 36px;
}
* { letter-spacing: 0 !important; }
html, body {
  width: 100%; height: 100%; min-width: 0; background: var(--bg); color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, .topbar-title, .panel-title, .modal-title, .login-title { text-wrap: balance; }
p, .page-desc, .today-meta, .panel-note, .dashboard-import-empty span { text-wrap: pretty; }
#stage {
  position: fixed; inset: 0; width: 100%; height: 100%; left: 0; top: 0;
  transform: none; transform-origin: top left; border: 0; border-radius: 0; box-shadow: none;
}
#shell.active { display: grid; grid-template-columns: var(--sidebar-w) minmax(0,1fr); grid-template-rows: var(--header-h) minmax(0,1fr); }
.sidebar {
  position: relative; inset: auto; grid-column: 1; grid-row: 1/-1; width: auto; height: auto; min-height: 0;
  display: flex; flex-direction: column; padding: 0 14px; background: #202126;
  color: #e5e6eb; border-radius: 0; box-shadow: none;
}
.sidebar-logo { height: var(--header-h); flex: none; gap: 11px; padding: 0 10px; border: 0; border-bottom: 1px solid #ffffff0c; }
.sidebar-logo-mark { width: 34px; height: 34px; background: #345ee8; color: #fff; border-radius: 8px; }
.sidebar-logo-mark svg [stroke] { stroke: #fff; }
.sidebar-logo-t1 { font-size: 18px; color: #f5f5f7; font-weight: 600; }
.sidebar-logo-t2 { font-size: 11px; color: #a4a6b1; margin-top: 3px; }
.nav-list { position: relative; isolation: isolate; padding: 22px 0; gap: 5px; flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #50525c transparent; }
.nav-item { position: relative; z-index: 1; height: 43px; min-height: 43px; padding: 0 14px; gap: 12px; border-radius: 6px; color: #b4b7c2; font-size: 14px; flex: none; font-weight: 500; transition: color 120ms ease; }
.nav-item:hover, .nav-item.active { background: transparent; color: #fff; font-weight: 500; box-shadow: none; }
.nav-item.active::after { content: none; }
.nav-item:focus-visible { outline: 2px solid #6082ff; outline-offset: -2px; }
.nav-label { white-space: nowrap; }
/* 只移动这一块底色；菜单文字和整行点击范围始终不动。 */
.nav-highlight { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; background: #2e3038; border-radius: 6px; }
.nav-highlight[hidden] { display: none; }
.nav-highlight::before { content: ''; position: absolute; width: 3px; height: 19px; background: #6082ff; border-radius: 2px; left: 0; top: calc(50% - 9.5px); }
.nav-item svg { opacity: .85; }
.nav-item:nth-child(3), .nav-item:nth-child(9) { margin-top: 13px; }
/* 姓名与账号操作分行，避免超级管理员逐字换行。 */
.sidebar-user {
  position: relative; inset: auto; width: 100%; height: auto; min-height: 112px; flex: none;
  display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 8px 10px;
  margin: 8px 0 12px; padding: 16px 10px 10px; background: transparent; border: 0; border-top: 1px solid #ffffff0d; border-radius: 0;
}
.sidebar-user>.avatar { grid-column: 1; grid-row: 1; background: #3c3f48; color: #f5f5f7; border-radius: 8px; }
.sidebar-user>div:nth-child(2) { grid-column: 2/-1; grid-row: 1; }
.sidebar-user-t1 { font-size: 14px; line-height: 22px; color: #ececf0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-t2 { color: #a5a8b4; font-size: 12px; line-height: 20px; }
.sidebar-user>.access-link { grid-row: 2; grid-column: 1/3; justify-content: flex-start; padding: 0; min-height: 26px; color: #aeb2c0; }
.sidebar-user>#ownAccountSetupButton:not([hidden]) { grid-row: 3; }
.sidebar-user>span { grid-column: 3; grid-row: 2; color: #aeb2c0!important; min-height: 26px; display: flex; align-items: center; }
.topbar { position: relative; inset: auto; grid-column: 2; grid-row: 1; width: auto; height: auto; background: #fff; padding: 0 var(--page-inset); gap: 20px; border-bottom: 1px solid #f0f0f2; }
.topbar-title { font-size: 22px; font-weight: 600; white-space: nowrap; }
.topbar-right { gap: 18px; min-width: 0; }
.topbar-date { font-size: 12px; color: #72737b; white-space: nowrap; }
.topbar-div, .sidebar-div { display: none; }
.avatar { background: #f0f2f7; color: #465267; border-radius: 8px; }
.line-picker-trigger { background: #fafbfc; border-color: #e5e7ed; color: #3f4c65; height: 36px; border-radius: 6px; }
.line-picker-label { color: #767780; }
.line-picker-list { background: #fff; border-color: #e5e5e9; border-radius: 8px; box-shadow: 0 4px 6px -1px #18181b19,0 2px 4px -2px #18181b19; }
.line-option[aria-selected=true] { background: var(--primary-tint); }
.content { position: relative; inset: auto; grid-column: 2; grid-row: 2; width: auto; height: auto; min-width: 0; min-height: 0; padding: 26px var(--page-inset) 24px; overflow: hidden; }
.page { min-width: 0; }
.page.active { padding-right: 4px; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #d5d5dc transparent; }
.page-desc { color: #71727c; font-size: 13px; line-height: 1.8; margin-bottom: 22px; }
/* 用执行版本、统计数据和待办三种层级建立焦点，避免重复的大色块。 */
.today-card { padding: 12px 0 30px; min-height: 200px; border: 0; border-bottom: 1px solid #eff0f4; border-radius: 0; background: transparent; color: var(--text); box-shadow: none; margin-bottom: 25px; gap: 30px; }
.today-left { min-width: 0; border-left: 3px solid #2851d8; padding-left: 20px; }
.today-lb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4e5d79; margin-bottom: 13px; }
.today-lb::before { display: none; }
.today-tt { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.today-code { font-size: 44px; font-weight: 600; line-height: 1.15; color: #22242c; }
.today-ver { font-size: 12px; color: #5a6680; padding: 5px 9px; background: #f3f5fa; border-radius: 5px; }
.today-meta { font-size: 12px; color: #697383; margin-top: 14px; }
.today-right { text-align: right; padding-right: 4px; }
.today-date { font-size: 13px; color: #6d6e78; }
.today-time { font-size: 34px; font-weight: 450; color: #3c4352; margin: 4px 0; }
.today-dow { font-size: 12px; color: #6d7480; }
.stat-row { gap: 18px; margin: 0 0 22px; padding: 0; }
.stat-card { flex: 1; min-width: 0; height: 150px; border: 0; border-radius: 8px; box-shadow: none; background: #f6f7f9; padding: 20px 24px; gap: 10px; }
.stat-label { color: #656d7b; font-size: 13px; }
.stat-value { font-size: 38px; font-weight: 550; line-height: 1.05; color: #252a34; }
.stat-card:nth-child(3) { background: #2851d8; }
.stat-card:nth-child(3) .stat-label, .stat-card:nth-child(3) .stat-sub { color: #e3eaff; }
.stat-card:nth-child(3) .stat-value { color: #fff; }
.stat-sub { color: #707888; font-size: 12px; }
.alert-bar { min-height: 58px; height: auto; padding: 14px 17px; gap: 12px; background: #fafbfc; border: 1px solid #eceff4; border-radius: 7px; margin-bottom: 30px; }
.alert-bar svg [stroke] { stroke: #67738a; }
.alert-bar svg [fill]:not([fill=none]) { fill: #67738a; }
.alert-txt { font-size: 13px; line-height: 1.7; font-weight: 400; color: #5c6679; }
.btn-amber { background: #2d3038; border-radius: 6px; height: 32px; }
.btn-amber:hover { background: #1e2027; }
.panel-row { gap: 36px; }
.panel-row>.panel { flex: 1!important; width: auto!important; min-width: 0; }
.panel { border: 0; border-radius: 0; box-shadow: none; padding: 0; background: transparent; }
.panel-head { height: 42px; padding-bottom: 14px; border-bottom: 1px solid #ededf0; margin-bottom: 13px; gap: 12px; }
.panel-title { font-size: 16px; font-weight: 600; color: #303640; }
.panel-link { font-size: 12px; }
.status-row { height: 54px; border-bottom: 1px solid #f2f3f6; }
.status-row:last-of-type { border-bottom: 0; }
.status-name { font-size: 13px; color: #555660; }
.status-meta { font-size: 12px; color: #6b7280; }
.panel-note { font-size: 12px; color: #6d7480; line-height: 1.7; }
.dashboard-import-empty { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 20px 0; gap: 11px; }
.dashboard-import-empty svg { width: 29px; height: 29px; color: #a3a3ad; margin-bottom: 3px; }
.dashboard-import-empty strong { color: #62636e; font-weight: 450; font-size: 14px; }
.dashboard-import-empty span { color: #6b7280; font-size: 12px; }
.dashboard-import-empty-action { min-height: 32px; padding: 2px 0; color: #2851d8; font-size: 13px; text-align: left; }
.dashboard-import-empty-action:hover { color: #2143b5; text-decoration: underline; text-underline-offset: 4px; }
/* 密集页面沿用原表格和按钮，不改变筛选或授权行为。 */
.table-card, .board-card, .org-card, .perm-table, .oe-tree, .oe-detail, .oe-arc, .up-bar { border: 1px solid #e9e9ed; border-radius: 8px; box-shadow: var(--shadow-panel); }
.table-card { overflow: auto; }
.table-card>.tr { min-width: 960px; }
.tr-head { background: #f5f6f9; color: #626a7b; font-size: 12px; height: 46px; }
.tr-body { border-color: #f0f0f3; }
.tr-body:hover { background: #fafafa; }
.tr-foot { color: #777882; }
.list-scroll { scrollbar-width: thin; scrollbar-color: #d7d7de transparent; }
.access-dir-grid { grid-template-columns: 28px minmax(108px,.7fr) minmax(180px,1.4fr) 100px 132px 222px; gap: 16px; min-width: 940px; min-height: 68px; padding: 12px 20px; }
.access-dir-grid.tr-head { min-height: 46px; }
.access-cell small { color: #74757e; font-size: 12px; }
.access-cell b { font-weight: 550; color: #3e3f48; }
.access-ops { gap: 12px; }
.access-link { color: #53627f; font-size: 12px; }
.access-link:hover { color: #2851d8; }
.access-link.danger { color: #b63847; }
.access-grant-grid { grid-template-columns: 130px 100px minmax(200px,1fr) 148px; padding: 18px 22px; gap: 16px; min-width: 620px; }
.grant-page-tag { background: #eff3fc; color: #536587; border: 0; font-size: 12px; line-height: 22px; border-radius: 4px; }
.grant-summary-group+.grant-summary-group { border-color: var(--line); }
.grant-summary-scope { color: #74757f!important; }
.toolbar { height: auto; min-height: 44px; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar-left { flex-wrap: wrap; }
.org-bar { height: auto; min-height: 50px; gap: 12px; flex-wrap: wrap; }
.search-box, .org-select, .sel-box, .cal-select, .cal-date, .fld-input, .oe-input { border-color: #dedee4; border-radius: 6px; color: #555660; background-color: #fff; }
.search-box { height: 38px; }
.search-box input { min-width: 0; }
.search-box:focus-within, .fld-input:focus { border-color: #a1b5ef; }
.btn-primary, .btn-solid, .btn-blue-sm, .confirm-ok { background: var(--primary); border-radius: 6px; }
.btn-primary:hover, .btn-solid:hover, .btn-blue-sm:hover, .confirm-ok:hover { background: #2143b5; }
.btn-blue-sm { height: 38px; padding: 0 16px; font-weight: 550; white-space: nowrap; }
.btn-ghost { border-color: #dedee4; border-radius: 6px; background: #fff; color: #64656f; }
.btn-ghost:hover { background: #f6f6f8; }
.btn-danger, .confirm-ok.danger { background: var(--red); }
.perm-tabs { display: inline-grid; padding: 3px; gap: 3px; grid-template-columns: repeat(2,minmax(0,160px)); background: #f0f0f3; border-radius: 8px; }
.perm-tab { height: 37px; border-radius: 5px; border: 1px solid transparent; background: transparent; color: #74757f; }
.perm-tab.active { background: #30343e; color: #fff; border-color: #30343e; box-shadow: 0 1px 2px #18181b08; }
.perm-cols { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 24px; }
.perm-cols>* { min-width: 0; }
.oe-cols { grid-template-columns: minmax(300px,.8fr) minmax(0,1.2fr); gap: 24px; }
.oe-btns>button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: auto; min-width: 80px; height: 32px; padding: 0 14px; font-size: 12px; border-radius: 6px; box-sizing: border-box; }
.oe-btns>.oe-delete-button { color: #c43838; border-color: #edcccc; }
.permission-org-toggle, .oe-node .oe-twist { border-color: #d6dce9; background: #f5f7fc; color: #4d5f84; border-radius: 5px; }
.permission-org-name[aria-pressed=true], .permission-org-all[aria-pressed=true], .oe-node.sel { background: #eef2ff; color: #2851d8; border-color: #d1dcfa; }
.permission-org-search { border-color: #e0e0e6; }
.line-settings-toolbar>* { height: 38px!important; border-radius: 6px; }
.up-bar { padding: 18px 20px; gap: 14px; }
.up-flow { font-size: 12px; }
.up-inner, .up-main { flex-wrap: wrap; }
.up-actions { flex-shrink: 0; }
.up-dzbtn { background: #f8f8fa; border-color: #d7d7df; color: #676873; border-radius: 6px; }
.up-note { background: #f6f6f8; }
.modal-mask { background: #181b2466; backdrop-filter: none; }
.modal-card { border: 1px solid #e7e7ec; border-radius: 8px; box-shadow: 0 20px 25px -5px #18181b19,0 8px 10px -6px #18181b19; max-width: calc(100vw - 48px); max-height: calc(100dvh - 48px); overflow: auto; }
.modal-title { font-size: 20px; line-height: 1.5; color: #3b3c45; font-weight: 600; }
.access-pages-modal { height: min(720px,calc(100dvh - 64px)); padding: 26px; }
.grant-workspace { border-color: #e7e7ed; border-radius: 6px; }
.grant-page-section { background: #fafafa; }
.grant-page-active { background: #eef2ff; border-left-color: var(--primary); }
.grant-edit-scope, .grant-page-summary { color: #5b6e9e; }
.access-page-row { min-height: 48px; }
input[type=checkbox], .access-check input { accent-color: var(--primary); width: 16px; height: 16px; }
:is(button,a,input,select,textarea,[tabindex]):focus-visible { outline: 2px solid #4567d5!important; outline-offset: 3px; }
button:disabled { opacity: .48; cursor: not-allowed; }
button, a { transition: background-color 120ms ease-out, color 120ms ease-out; }



/* 原动态渲染中少量硬编码色在主题内映射，业务脚本不改。 */
[style*="color:#2B6DEF"], [style*="color: #2B6DEF"], [style*="color:#1E3A8A"], [style*="color:#2869db"] { color: var(--primary)!important; }
[style*="background:#F0F5FE"], [style*="background:#E8EFFD"], [style*="background:#EAF0F9"], [style*="background:#F2F6FE"] { background: var(--primary-tint)!important; border-color: var(--primary-border)!important; }
[style*="background:#2B6DEF"] { background: var(--primary)!important; }
[style*="color:#9AA3B2"], [style*="color:#8A93A6"], [style*="color:#96A0B0"], [style*="color:#7A8496"] { color: var(--text-3)!important; }
[stroke="#2B6DEF"] { stroke: var(--primary); }
[fill="#2B6DEF"] { fill: var(--primary); }
.brand-panel { width: 44%; border-radius: 0; padding: 64px; background: #202126; }
.brand-panel::before, .brand-panel::after { display: none; }
.brand-logo { background: var(--primary); border-radius: 8px; }
.brand-logo svg [stroke] { stroke: #fff; }
.brand-name { font-size: 34px; }
.brand-sub, .brand-bullet, .brand-foot { color: #cbccd3; }
.brand-foot { border-color: #ffffff20; }
.login-card { left: 72%; width: 420px; max-width: calc(56% - 64px); transform: translate(-50%,-50%); border: 0; box-shadow: none; border-radius: 0; padding: 36px; }
.login-title { font-size: 24px; }
.login-tabs { background: #f2f2f5; }
.login-tab.active { color: #2548b5; }
.login-hint { background: #f7f7f9; color: #74757f; }
.login-foot { color: #74757f; }
/* 工作台收紧卡片与留白，常见笔记本窗口可完整看完，不裁切内容。 */
#page-dashboard .today-card { min-height: 138px; padding: 8px 0 18px; margin-bottom: 16px; gap: 20px; }
#page-dashboard .today-code { font-size: 36px; }
#page-dashboard .today-time { font-size: 28px; }
#page-dashboard .today-lb { margin-bottom: 8px; }
#page-dashboard .today-meta { margin-top: 8px; }
#page-dashboard .today-ver { padding: 3px 7px; }
#page-dashboard .stat-row { gap: 14px; margin-bottom: 16px; }
#page-dashboard .stat-card { height: 112px; padding: 14px 18px; gap: 6px; }
#page-dashboard .stat-value { font-size: 30px; }
#page-dashboard .alert-bar { min-height: 46px; padding: 9px 14px; margin-bottom: 18px; }
#page-dashboard .panel-row { gap: 28px; }
#page-dashboard .panel { height: auto!important; min-height: 212px; }
#page-dashboard .panel-head { height: 34px; margin-bottom: 6px; padding-bottom: 8px; flex-wrap: wrap; }
#page-dashboard .panel-title { font-size: 14px; }
#page-dashboard .status-row { height: 40px; }
#page-dashboard .chip-ok { height: 22px; padding: 0 8px; border-radius: 5px; }
#page-dashboard .dashboard-import-empty { padding: 12px 0; gap: 8px; }
#page-schedule.active { display: flex; flex-direction: column; }
.schedule-layout { display: grid; flex: 1; min-height: 0; grid-template-columns: 300px minmax(0,1fr); gap: 20px; align-items: stretch; }
.schedule-layout:has(>#calendarEditing[style*="display: none"]) { grid-template-columns: minmax(0,1fr); }
.schedule-layout>div { min-width: 0; }
.schedule-calendar, .cal-actions { display: flex; flex-direction: column; gap: 12px; }
.schedule-calendar { min-height: 0; }
.calendar-card { flex: 0 0 auto; min-height: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.calendar-card>div:not(#calScroll) { flex-shrink: 0; }
.cal-actions { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
.cal-actions>* { flex-shrink: 0; }
.cal-action-card>div>span:first-child { flex: 0 0 96px; width: 96px!important; white-space: nowrap; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.calendar-head>span:first-child { font-size: 14px!important; }
#lineCtxSchedule { flex: none; padding: 7px 12px!important; margin-bottom: 10px!important; border-radius: 6px!important; }
.cal-actions .cal-action-card { display: flex; flex-direction: column; gap: 10px; padding: 0 0 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.cal-action-card>span:first-child { font-size: 14px!important; }
.cal-actions .cal-select { height: 32px; font-size: 12px; min-width: 0; }
.cal-actions .btn-primary { align-self: flex-start; width: auto; height: 32px; padding: 0 14px; font-size: 12px; white-space: nowrap; }
.cal-workflow { padding: 0; }
.cal-workflow>summary { cursor: pointer; padding: 8px 0; font-size: 12px; font-weight: 600; }
.cal-workflow-body { display: flex; flex-direction: column; gap: 12px; padding: 0 0 14px; }
.cal-workflow-body>div { gap: 8px!important; }
.cal-workflow-body>div>div:first-child { width: 24px!important; height: 24px!important; border-radius: 12px!important; font-size: 12px!important; }
.cal-workflow-body>div>div:last-child>div:first-child { font-size: 12px!important; }
.cal-actions .note-amber { padding: 10px 12px; font-size: 11px; line-height: 1.6; border-radius: 6px; }
/* 查询按钮不随日历拉伸；日期与两个操作保持相同高度，窄屏允许换行。 */
.cal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.cal-query-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cal-query-bar .cal-date { max-width: 100%; }
.cal-query-bar input.cal-date { width: 128px!important; padding: 0 6px; }
.cal-query-button, .cal-query-reset { flex: 0 0 auto; width: auto; min-width: 64px; height: 32px; padding: 0 14px; font-size: 12px; white-space: nowrap; }
.cal-query-reset { min-width: 56px; padding: 0 12px; }
.holiday-update-status { font-size: 12px; line-height: 1.7; color: var(--text-3); }
.holiday-update-status:empty { display: none; }
.holiday-year-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; }
.holiday-year-row #holCustomYear { width: 100px; height: 34px; }
.holiday-year-row label { flex: none; }
.holiday-year-row .cal-select { min-width: 0; height: 34px; }
.cal-legends { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.cal-kind-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--text-3); }
#ttLegend { padding: 0!important; gap: 10px!important; border: 0!important; }
.cal-month-nav { display: flex; align-items: center; gap: 6px; }
.cal-month-nav .cal-select { flex: 0 1 126px; width: 126px; height: 32px; font-size: 12px; }
.cal-month-nav .btn-ghost { height: 32px; padding: 0 10px; font-size: 12px; }
/* 每月保留六周、48px 日期格；剩余空间用来多排月份，不再放大格子。 */
#calScroll { display: grid; grid-template-columns: repeat(var(--cal-columns,1),minmax(0,1fr)); align-content: start; gap: 14px; flex: 0 0 auto; min-height: 0; padding: 10px 14px; overflow: auto; overscroll-behavior: contain; }
#calScroll>.cal-month { min-width: 0; height: 352px; gap: 6px!important; }
.cal-month-title { display: block; height: 20px; flex: none; font-size: 13px; font-weight: 600; line-height: 20px; }
.cal-selection-bar { display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); background: #fafbfc; }
.cal-selection-bar #calSelRange { font-size: 12px!important; min-width: 0; overflow-wrap: anywhere; }
.cal-selection-bar .btn-ghost { height: 28px!important; padding: 0 10px; flex: none; }
/* 解除画布缩放后，日历仍然必须是一周七列。 */
#calScroll>div>div:nth-child(2), #calScroll>div>div:nth-child(3) { display: grid!important; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px!important; }
#calScroll>div>div:nth-child(2) { flex: none; height: 16px; }
#calScroll>div>div:nth-child(3) { flex: none; grid-template-rows: repeat(6,48px); }
#calScroll>div>div:nth-child(2)>span, #calScroll>div>div:nth-child(3)>* { width: auto!important; min-width: 0; }
#calScroll>div>div:nth-child(3)>* { height: auto!important; }
#calScroll [data-date] { min-height: 48px; padding: 3px 4px!important; align-items: flex-start; text-align: left; font-family: inherit; }
#calScroll [data-date]>span { max-width: 100%; line-height: 12px!important; flex-shrink: 0; }
#calScroll [data-date]>span:first-child { font-size: 13px!important; line-height: 14px!important; font-weight: 600; }
#boardTabs { flex: 0 1 330px!important; min-width: 240px!important; }
#boardTabs .board-tab { height: 32px; font-size: 12px; padding: 0 10px; }
/* 未选日期保留属性配色；选区统一优先显示，周末和已指定日期也不能覆盖它。 */
#calScroll [style*="background: rgb(232, 239, 253)"]:not([aria-pressed="true"]) { background: #edf2ff!important; border-color: #aabded!important; }
#calScroll [style*="background: rgb(254, 249, 195)"]:not([aria-pressed="true"]) { background: #faf3e6!important; border-color: #d9c6a4!important; }
#calScroll [style*="background: rgb(234, 241, 254)"]:not([aria-pressed="true"]) { background: #f6f6f8!important; border-color: #dedee5!important; }
#calScroll [data-date][aria-pressed="true"] { background: #edf2ff!important; border-color: var(--primary)!important; box-shadow: inset 0 0 0 1px var(--primary); }
#calScroll [data-date][data-range-edge="true"] { background: #dce7ff!important; border-color: var(--primary)!important; }
#stationList, #stationDetail { height: calc(100dvh - 295px)!important; min-height: 360px; }
.page-fill .list-scroll { min-height: 180px; }
@media(min-width:1800px) { :root { --page-inset: 44px; } .today-card { min-height: 212px; } .stat-card { height: 152px; } .panel-row { gap: 48px; } }
@media(max-width:1250px) {
  :root { --sidebar-w: 208px; --page-inset: 24px; --header-h: 70px; }
  .topbar-right { gap: 12px; } .topbar-date { display: none; } 
  .panel-row { flex-wrap: wrap; gap: 28px; } .panel-row>.panel { min-width: 300px; }
  .perm-cols { grid-template-columns: 240px minmax(0,1fr); }
  .access-grant-grid { grid-template-columns: 100px 82px minmax(160px,1fr) 120px; gap: 10px; padding: 16px; min-width: 510px; }
}
@media(max-width:1120px) {
  #page-schedule.active { display: block; }
  .schedule-layout { grid-template-columns: 260px minmax(0,1fr); gap: 16px; }
  .schedule-calendar { min-height: 0; }
  .calendar-head { flex-wrap: wrap; }
  .cal-selection-bar { flex-wrap: wrap; }
}
@media(min-width:1121px) and (max-height:800px) {
  .calendar-head { min-height: 32px; padding-top: 2px; padding-bottom: 2px; }
  .cal-toolbar { padding-top: 4px; padding-bottom: 4px; row-gap: 4px; }
  .cal-legends { padding-top: 4px; padding-bottom: 4px; row-gap: 4px; }
  .cal-selection-bar { padding-top: 4px; padding-bottom: 4px; }
}
@media(max-width:900px) {
  .schedule-layout { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .cal-actions { overflow: visible; padding-right: 0; }
  :root { --sidebar-w: 184px; --page-inset: 18px; } .topbar-title { font-size: 18px; }
   .topbar-right { gap: 8px; } .topbar-right>#topIdentity { display: none!important; }
  .sidebar-logo { padding: 0 4px; gap: 8px; } .sidebar-logo-t1 { font-size: 15px; } .sidebar-logo-mark { width: 30px; height: 30px; }
  .sidebar-user { padding: 12px 8px; } .nav-item { padding: 0 10px; }
  .today-card { min-height: 185px; padding-top: 10px; gap: 16px; } .today-code { font-size: 38px; } .today-time { font-size: 27px; } .today-ver { font-size: 12px; }
  .stat-row { gap: 12px; } .stat-card { padding: 18px 16px; height: 142px; } .stat-label { font-size: 12px; } .stat-value { font-size: 34px; }
  .perm-cols, .oe-cols { grid-template-columns: 1fr; } .toolbar-left, .table-card { max-width: 100%; }
  .access-pages-modal { padding: 20px; } .grant-person-row { grid-template-columns: 1fr; gap: 6px; }
  .grant-workspace { grid-template-columns: 250px minmax(0,1fr); }
  .login-card { padding: 24px; max-width: calc(56% - 40px); } .brand-panel { padding: 36px; }
  #page-dashboard .panel-row>.panel { flex-basis: 100%!important; min-width: 0; }
}
@media(max-width:650px) {
  :root { --sidebar-w: 148px; --page-inset: 12px; --header-h: 64px; }
  .sidebar { padding: 0 8px; } .sidebar-logo { gap: 7px; } .sidebar-logo-mark { width: 26px; height: 26px; }
  .sidebar-logo-t1 { font-size: 12px; } .sidebar-logo-t2 { font-size: 10px; }
  .nav-item { font-size: 12px; gap: 8px; padding: 0 8px; }
  .sidebar-user { grid-template-columns: 25px minmax(0,1fr); gap: 5px; }
  .sidebar-user>.avatar { width: 25px; height: 25px; font-size: 11px; } .sidebar-user-t1 { font-size: 12px; }
  .sidebar-user>span { grid-column: 2; grid-row: 3; } .sidebar-user>.access-link { grid-column: 1/-1; }
  .topbar-title { font-size: 16px; } .topbar-right>.avatar, 
  .line-picker-label { display: none; } .line-picker-trigger { padding: 0 8px; min-width: 70px; }
  .today-right { display: none; } .today-code { font-size: 32px; }
  .stat-row { flex-direction: column; padding: 0; } .stat-card { height: 130px; flex: none; padding: 18px; }
  .panel-row>.panel { min-width: 0; flex-basis: 100%!important; }
  .perm-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); display: grid; } .perm-tab { font-size: 12px; padding: 0 6px; }
  .access-pages-modal { height: calc(100dvh - 24px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 16px; }
  .grant-workspace { display: flex; flex-direction: column; overflow: auto; }
  .grant-page-section { min-height: 220px; max-height: 240px; } .grant-scope-section { min-height: 300px; } .grant-footer { flex-wrap: wrap; }
  .brand-panel { width: 100%; height: 160px; padding: 24px; gap: 10px; } .brand-logo, .brand-foot { display: none; }
  .brand-name { font-size: 24px; } .brand-sub { margin-top: 0; }
  .login-card { left: 50%; top: 190px; transform: translateX(-50%); max-width: calc(100% - 32px); width: 420px; }
  #page-dashboard .stat-row { flex-direction: column; }
  #page-dashboard .stat-card { flex: none; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition: none!important; animation: none!important; scroll-behavior: auto!important; } }
