:root {
  --teal: var(--brand-ink);
  --muted: #6c7f83;
  --line: #e0e8e9;
  color: #233c40;
  background: #f5f7f8;
}
.page-head {
  margin-bottom: 24px;
  align-items: center;
}
h1 {
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0;
  color: #203e42;
}
h2 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
  color: #29484c;
}
h3 {
  font-weight: 650;
  color: #29484c;
}
.rail {
  padding: 28px 16px 20px;
}
.brand {
  font-size: 23px;
  letter-spacing: 0;
}
nav {
  margin-top: 28px;
  gap: 6px;
}
nav > a,
.nav-group summary {
  font-size: 14px;
  font-weight: 650;
  color: #36595d;
  padding: 12px 14px;
  min-height: 46px;
  border-radius: 8px;
}
nav > a:hover,
.nav-group summary:hover {
  background: #f1f7f7;
  text-decoration: none;
}
nav > a.active,
.nav-group.selected summary {
  color: var(--brand-ink);
  background: var(--brand-soft);
}
.nav-children {
  margin: 5px 0 10px 12px;
  gap: 2px;
}
.nav-children a {
  font-weight: 500;
  color: #536d72;
  line-height: 1.55;
  min-height: 40px;
}
.nav-children a.active {
  font-weight: 650;
  color: var(--brand-ink);
  background: var(--brand-soft);
}
.rail-note {
  font-size: 12px;
  color: #819195;
}
.topbar {
  min-height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.app-title {
  font-weight: 600;
  color: #36595d;
}
.panel,
.card,
.stat-cards article {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: none;
}
.panel {
  margin-bottom: 20px;
}
button {
  min-height: 40px;
  border-radius: 7px;
  line-height: 1.4;
}
button:disabled {
  cursor: not-allowed;
}
.toolbar {
  gap: 12px;
  align-items: end;
}
.toolbar > a,
.actions-row > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  font-weight: 550;
  white-space: normal;
}
th {
  background: #f2f6f6;
  color: #617a7e;
  font-weight: 600;
}
td {
  line-height: 1.65;
}
.pill {
  font-weight: 550;
}
.note {
  font-size: 13px;
  line-height: 1.7;
  border-radius: 8px;
}
.guidance {
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fafcfc;
}
.guidance > summary {
  cursor: pointer;
  color: #607b7f;
  font-size: 13px;
  font-weight: 550;
}
.guidance .note {
  border: 0;
  margin: 8px 0 0;
  background: transparent;
  padding: 0;
}
.guidance p {
  margin: 8px 0 0;
}
.administration-shell {
  margin-bottom: 24px;
}
.administration-shell h1 {
  margin-bottom: 16px;
}
#administration-content .page-head {
  margin-bottom: 16px;
}
#administration-content .page-head h1 {
  font-size: 20px;
}
.page-unavailable {
  padding: 28px;
  max-width: 680px;
}
@media (min-width: 1000px) {
  .layout {
    grid-template-columns: 232px minmax(0, 1fr);
  }
  .main main {
    padding: 28px 32px;
  }
}
@media (max-width: 700px) {
  h1 {
    font-size: 23px;
  }
  .page-head {
    margin-bottom: 18px;
  }
  .toolbar > a,
  .actions-row > a,
  button {
    min-height: 44px;
  }
  .panel {
    border-radius: 10px;
  }
  .topbar {
    min-height: 60px;
  }
}

[hidden] {
  display: none !important;
}

/* 2026-10-20 批注：等距导航与状态颜色 */
.nav-group { margin:0; }
nav > a { margin:0; }
.dashboard-cards .card { border-top:3px solid #83b8b3; }
.dashboard-cards .status-pending { background:#f0f8fa; border-top-color:#3d92aa; }
.dashboard-cards .status-overdue { background:#fff3f2; border-top-color:#cf625b; }
.dashboard-cards .status-clear { background:#f0f8f4; border-top-color:#5f9c80; }
.dashboard-cards .status-due { background:#fff9ed; border-top-color:#c7a04e; }
.dashboard-cards .status-review { background:#f3f3fb; border-top-color:#8b85b2; }
.dashboard-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.sensitive-summary { display:grid; gap:8px; padding:14px; border:1px solid var(--line); border-radius:8px; color:inherit; }
.sensitive-summary span { font-size:13px; }.sensitive-summary strong {font-size:21px;color:var(--teal);}.sensitive-summary small {color:var(--muted);}
/* 周表参照原班表：紧凑网格、灰表头与周末黄色 */
.schedule-table { border-collapse:collapse; min-width:1300px; font-size:13px; }
.schedule-table th {background:#77858c;color:#fff; text-align:center; border:1px solid #c2c9cc;padding:8px 5px;}
.schedule-table thead tr > :first-child,.schedule-table thead tr > :nth-child(2) {background:#77858c;}
.schedule-table th.weekend,.schedule-table th.calendar-holiday {background:#4d5c65;color:#ffe178;}
.schedule-table td {border:1px solid #ccd1d3;padding:5px;text-align:center;}
.schedule-table tbody tr:not(.schedule-group):nth-child(even) td {background:#f3f4f5;}
.schedule-table .schedule-group td {background:#dcdee0!important;padding:5px 8px;color:#4b5358;}
.schedule-cell {gap:2px;min-height:30px;}
.schedule-cell select {border:0; background:transparent;padding:3px;min-width:76px;font-size:13px;}
.schedule-cell select:last-of-type:not(:first-of-type) {display:none;}
@media(max-width:700px){.dashboard-metrics{grid-template-columns:1fr}}

/* 业务页面的阅读层次；不进入原表打印与独立预览。 */
@media screen {
  #view { --muted:#536b70; --teal:#006d61; }
  :where(#view:not([data-page="dashboard"])) .page-head { gap:20px 28px; }
  :where(#view:not([data-page="dashboard"])) .page-head p { max-width:76ch; line-height:1.75; }
  :where(#view:not([data-page="dashboard"])) .panel-head { flex-wrap:wrap; gap:12px 24px; }
  :where(#view:not([data-page="dashboard"])) .panel-head h2 { line-height:1.5; }
  :where(#view:not([data-page="dashboard"])) .toolbar { gap:12px 18px; }
  :where(#view:not([data-page="dashboard"])) .note { padding:14px 16px; line-height:1.8; }
  :where(#view:not([data-page="dashboard"])) .pill.warning { color:#855415; background:#fff1dd; }
  :where(#view:not([data-page="dashboard"])) .pill.gray { color:#536b70; background:#edf2f2; }
  #view :is(a,button,input,select,textarea):focus-visible { outline:2px solid #087563; outline-offset:3px; }

  /* 人员档案以身份和实际在岗为主，履历及维护操作为辅。 */
  #view:is([data-page="staff"],[data-page="staff-history"],[data-page="technical-archive"]) .panel-head small { font-size:13px; font-weight:400; color:#536b70; }
  #view:is([data-page="staff"],[data-page="staff-history"],[data-page="technical-archive"]) .table-wrap { margin-top:20px; }
  #view:is([data-page="staff"],[data-page="staff-history"],[data-page="technical-archive"]) th,
  #view:is([data-page="staff"],[data-page="staff-history"],[data-page="technical-archive"]) td { padding:14px 16px; }
  #view[data-page="staff"] td:nth-child(2),
  #view:is([data-page="staff-history"],[data-page="technical-archive"]) td:first-child { font-weight:600; }
  #view[data-page="staff"] td:nth-child(2) small { font-weight:400; font-size:12px; color:#536b70; }
  .staffing-summary { margin:20px 0; background:#f5faf7; border-color:#d3e4db; }
  .staffing-summary>strong { color:#254e43; font-size:14px; }
  .staffing-summary>p:first-of-type { font-size:15px; line-height:2; margin:12px 0; }
  .staffing-summary>p:first-of-type b { color:#244f43; font-size:18px; font-variant-numeric:tabular-nums; }
  .staffing-summary .tiny { font-size:12px; color:#536b63; }
  #profile-month { width:180px; max-width:100%; }
  #dialog-content .profile-section .form-grid { gap:20px 24px; }
  #dialog-content .profile-section legend { font-size:15px; }

  /* 日期、操作、班表分层；保留原来的表格几何和特殊日期颜色。 */
  .panel.schedule-workspace .schedule-heading-row { margin-bottom:22px; }
  .panel.schedule-workspace .schedule-period-toolbar { gap:14px 20px; padding:14px 16px; background:#f3f7f7; border:1px solid #dce7e6; border-radius:10px; }
  .panel.schedule-workspace .schedule-operations-toolbar { gap:14px; padding:16px 0; margin-bottom:16px; border-bottom-color:#dce7e6; }
  .panel.schedule-workspace .schedule-more-heading { padding:7px 10px 5px; color:#536b70; font-size:12px; font-weight:600; }
  .panel.schedule-workspace .schedule-view-switch [aria-pressed="true"] { background:#e4f2ed; color:#006a59; font-weight:650; box-shadow:inset 0 -2px #00816d; }
  .panel.schedule-workspace .schedule-table thead th:not(.weekend):not(.calendar-holiday):not(.calendar-workday):not(.schedule-statutory-day):not(.schedule-reference-date) { background:#526970; color:#fff; }
  .panel.schedule-workspace .schedule-savebar { gap:10px; margin-top:18px; padding:16px 0 4px; border-top-color:#d5e3df; }
  #stats-table .statistics-summary { grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; margin:20px 0 16px; }
  #stats-table .statistics-summary article { padding:18px 20px; background:#f8fbfa; border-color:#dbe7e2; }
  #stats-table .statistics-summary span { color:#536b70; line-height:1.6; }
  #stats-table .statistics-summary strong { color:#234b47; font-size:25px; font-variant-numeric:tabular-nums; }
  #stats-table>.toolbar { gap:12px 20px; padding:14px 16px; margin:20px 0 12px; background:#f4f7f7; border:1px solid #dce7e6; border-radius:8px; }
  #stats-table>.toolbar>span { flex:1 1 280px; color:#3f5c61; line-height:1.7; }
  #stats-table td.wrap>strong { display:block; color:#8a5518; margin-bottom:5px; }
  #stats-table td.wrap>details { margin:10px 0; padding:9px 11px; background:#fff9ef; border:1px solid #ecdfc9; border-radius:7px; }
  #stats-table td.wrap>details>summary { color:#79521d; line-height:1.6; }
  #stats-table td.wrap>details li { margin:7px 0; line-height:1.7; }
  #stats-table [data-night-fee-action] { margin-top:10px; }
  #stats-table table th,#stats-table table td { text-align:center; vertical-align:middle; }
  #stats-table table td { font-variant-numeric:tabular-nums; }
  #stats-table td.wrap>details { text-align:left; }
  #stats-table .night-fee-table { min-width:980px; }
  #stats-table .night-fee-cell { min-width:280px; width:34%; max-width:420px; line-height:1.7; }
  #stats-table .night-fee-cell>.tiny { margin:5px 0; }
  #stats-table .night-fee-cell>details { margin:10px 0; padding:10px 12px; }
  #stats-table .night-fee-cell details ul { margin:10px 0; padding-left:18px; }
  #stats-table .night-fee-cell button { max-width:100%; white-space:normal; line-height:1.6; }

  /* 长期分工按工作内容分行，选中人员保持明确可见。 */
  #duties-form>label { max-width:240px; margin:20px 0; }
  #duties-form .duties-people { gap:8px; max-width:560px; }
  #duties-form .duties-people label { gap:7px; min-height:36px; padding:6px 10px; border:1px solid #dce6e3; border-radius:7px; background:#fafcfc; color:#425e62; }
  #duties-form .duties-people label:has(input:checked) { border-color:#8ab9a8; background:#edf7f1; color:#215e48; font-weight:600; }
  #duties-form .duties-people label:has(input:disabled) { background:#f5f6f6; color:#75817e; }
  #duties-form .duties-people label:focus-within { outline:2px solid #167866; outline-offset:2px; }
  #duties-form .duties-people input { accent-color:#08785e; margin:0; }
  #duties-form>.actions-row { gap:14px; padding-top:18px; margin-top:20px; border-top:1px solid #dce7e3; }
  #duties-feedback { color:#536b70; line-height:1.7; }
  #dialog-content .schedule-analysis .schedule-analysis-source { padding:11px 14px; margin:16px 0; border:1px solid #dce7e2; border-radius:8px; background:#f7faf8; color:#536b63; }
  #dialog-content .schedule-analysis>.toolbar { gap:8px; padding:10px; margin:18px 0 12px; background:#f2f7f5; border-radius:8px; }
  #dialog-content .schedule-analysis [aria-pressed="true"] { background:#e1f1e8; border-color:#8bb8a1; color:#225b42; font-weight:650; }
  #dialog-content .schedule-analysis .schedule-analysis-scroll { margin:16px 0; border-radius:8px; }
  .schedule-wishes .wish-heading { gap:24px; margin-bottom:16px; }
  .schedule-wishes .toolbar { gap:12px 20px; padding:12px 14px; border:1px solid #dce7e3; border-radius:8px; background:#f5f9f7; }
  .schedule-wishes [data-wish-message]:empty { display:none; }
  .schedule-wishes .wish-management { padding:20px; margin-top:24px; background:#f8faf9; }
  .schedule-wishes .wish-stats { grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr)); gap:10px; margin:18px 0; }
  .schedule-wishes .wish-stats>div { padding:14px; background:#fff; color:#536b63; line-height:1.6; }
  .schedule-wishes .wish-stats strong { margin-top:10px; color:#234e42; font-size:18px; font-variant-numeric:tabular-nums; white-space:nowrap; }

  /* 指标以本科室本期值为重点，比较图保持足够的阅读宽度。 */
  #metric-comparison>.table-wrap table { min-width:1080px; }
  #metric-comparison th,#metric-comparison td { padding:15px 18px; }
  #metric-comparison td:first-child { min-width:210px; white-space:normal; }
  #metric-comparison td:nth-child(2) { background:#f0f7f6; font-weight:650; font-variant-numeric:tabular-nums; }
  #metric-comparison .metric-low { color:#036999; }
  #metric-comparison .metric-comparison-charts { grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr)); gap:22px; margin-top:28px; }
  #metric-comparison .metric-comparison-card { padding:22px; }
  #metric-comparison .metric-comparison-card h3 { margin:0 0 18px; line-height:1.65; color:#294c49; }
  #metric-chart { margin-top:24px; }
  #metric-chart .legend { gap:20px; margin-bottom:16px; }
  #metric-chart .legend .metric-scope-province { color:#896127; }
}
@media screen and (max-width:760px) {
  .panel.schedule-workspace .schedule-period-toolbar { padding:12px; gap:10px; }
  .panel.schedule-workspace .schedule-operations-toolbar { gap:10px; padding:12px 0; }
  #stats-table .statistics-summary { grid-template-columns:1fr; gap:10px; }
  #stats-table .statistics-summary article { padding:15px 16px; }
  #duties-form .duties-people label { min-height:44px; }
  .schedule-wishes .wish-management { padding:16px; }
  .schedule-wishes .wish-stats { grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr)); }
  #view:is([data-page="staff"],[data-page="staff-history"],[data-page="technical-archive"]) th,
  #view:is([data-page="staff"],[data-page="staff-history"],[data-page="technical-archive"]) td { padding:12px; }
}
/* 2026-11-01 批注：图表下方标注科室与时间；额度规则作为工具栏按钮，点击展开 */
.metric-card-caption{margin:6px 0 0;text-align:center;font-size:13px;color:#333}
.toolbar-rule{position:relative;align-self:center}
.toolbar-rule>summary{cursor:pointer;padding:6px 12px;border:1px solid var(--line,#cfd8d4);border-radius:8px;list-style:none;font-weight:600}
.toolbar-rule>summary::-webkit-details-marker{display:none}
.toolbar-rule[open]>p{position:absolute;z-index:20;right:0;top:calc(100% + 6px);width:min(520px,80vw);margin:0;padding:12px 14px;background:#fff;border:1px solid var(--line,#cfd8d4);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.12);font-size:13px;line-height:1.6}

/* 2026-11-03 岗位与长期分工：个人入口及护士长授权预览 */
.workspace-duty-panel { margin-top:24px; }
.workspace-duty-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.workspace-duty-link { display:block; padding:18px 20px; border:1px solid var(--border,#dce7e7); border-radius:10px; color:inherit; text-decoration:none; background:#fff; overflow-wrap:anywhere; }
.workspace-duty-link:hover,.workspace-duty-link:focus-visible { border-color:#008776; background:#f3faf8; }
.workspace-duty-link strong { display:flex; justify-content:space-between; align-items:start; gap:16px; color:#006f63; }
.workspace-duty-link small { display:block; margin-top:8px; line-height:1.65; color:#526d75; }
.workspace-duty-note { margin-top:18px; line-height:1.7; }
.duties-access-table { min-width:650px; }
.duties-access-table td { vertical-align:top; }
.duties-access-table ul { padding-left:18px; margin:0; line-height:1.8; }
@media(max-width:640px) { .workspace-duty-links { grid-template-columns:1fr; } .workspace-duty-panel .panel-head { flex-wrap:wrap; gap:10px; } }
