:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: #20383c;
  background: #f4f7f8;
  font-size: 14px;
  --brand-green: #00b38f;
  --brand-red: #ed2e38;
  --brand-ink: #007d69;
  --brand-soft: #eaf7f3;
  --danger-ink: #bc1726;
  --teal: var(--brand-ink);
  --muted: #687d81;
  --line: #dfe8e9;
}
.report-table .qp-changed-cell{background:#e7f5ee}
.legend .metric-scope-department{color:#087d79}
.legend .metric-scope-hospital{color:#467eb9}
.legend .metric-scope-province{color:#b18745}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--teal);
  color: white;
  font-weight: 600;
}
button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.secondary {
  background: white;
  color: #3b565a;
  border-color: var(--line);
}
button.danger {
  background: var(--danger-ink);
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
input,
select,
textarea {
  border: 1px solid #cbdadc;
  border-radius: 7px;
  padding: 10px;
  background: white;
  color: #20383c;
  min-width: 0;
}
input[type="checkbox"] {
  width: auto;
}
textarea {
  width: 100%;
  min-height: 90px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  color: #526c70;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.7px;
  margin: 0 0 9px;
}
h2 {
  font-size: 17px;
  margin: 0 0 18px;
}
h3 {
  font-size: 15px;
  margin: 0 0 12px;
}
p {
  line-height: 1.7;
}
.muted,
small {
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
}
.rail {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 22px;
  letter-spacing: -1px;
  font-weight: 750;
  color: var(--brand-ink);
  margin-bottom: 8px;
}
.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 50%;
}
.brand small {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 500;
  display: block;
  margin-top: 8px;
}
.brand-mark {
  display: inline-grid;
  place-content: center;
  background: var(--teal);
  color: white;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  margin-right: 8px;
}
nav {
  display: grid;
  gap: 7px;
  margin-top: 42px;
  overflow-y: auto;
  min-height: 0;
  align-content: start;
}
nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 13px;
  color: #5a7377;
}
nav a.active {
  color: var(--brand-ink);
  background: var(--brand-soft);
  font-weight: 650;
}
.nav-group {
  min-width: 0;
}
.nav-group summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px;
  border-radius: 8px;
  color: #36595d;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.nav-group summary::-webkit-details-marker {
  display: none;
}
.nav-group summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-left: auto;
  flex-shrink: 0;
}
.nav-group[open] summary::after {
  transform: rotate(45deg);
}
.nav-group.selected summary {
  color: var(--brand-ink);
  background: #f3f9f8;
}
.nav-group summary:hover {
  background: #f3f9f8;
}
.nav-group summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.nav-children {
  display: grid;
  gap: 3px;
  margin: 5px 0 9px 12px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.nav-children a {
  font-size: 13px;
  padding: 10px;
}
.badge {
  display: inline-block;
  border-radius: 12px;
  background: #f9e6e4;
  color: #b24339;
  padding: 2px 7px;
  font-size: 11px;
  margin-left: auto;
}
.rail-note {
  position: static;
  margin-top: auto;
  padding-top: 18px;
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.8;
  color: #829396;
}
.main {
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: #ffffffb8;
  gap: 12px;
}
.topbar .actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.online {
  color: #17846f;
}
.online:before {
  content: "●";
  font-size: 9px;
  margin-right: 6px;
}
main {
  padding: 32px 36px;
  max-width: 1600px;
  margin: auto;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 26px;
}
.eyebrow {
  color: var(--teal);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
}
.page-head p {
  margin: 0;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.card .number {
  font-size: 32px;
  font-weight: 650;
  margin: 12px 0;
  color: #173c40;
}
.card .number.danger-text {
  color: #bd5749;
}
.card p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.panel {
  margin-bottom: 20px;
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.panel-head h2 {
  margin: 0;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 20px;
}
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  margin: 16px 0;
}
.toolbar label {
  min-width: 140px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.stack {
  display: grid;
  gap: 16px;
}
.note {
  background: #edf6f5;
  border: 1px solid #d2e9e5;
  border-radius: 9px;
  padding: 13px 16px;
  color: #366863;
  font-size: 12px;
  line-height: 1.8;
}
.alert {
  background: #fff3e9;
  border-color: #f3d9be;
  color: #926233;
}
.empty {
  text-align: center;
  padding: 32px 12px;
  color: var(--muted);
  line-height: 1.9;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  white-space: nowrap;
  font-size: 12px;
}
th {
  background: #f6f9f9;
  color: #6d8386;
  text-align: left;
  font-weight: 500;
  padding: 13px 12px;
}
td {
  padding: 13px 12px;
  border-top: 1px solid #eaf0f0;
  max-width: 400px;
}
/* 2026-11-05 上线前走查：长路径（如NAS备份目录）在手机宽度撑破页面，允许任意处换行 */
p.wrap{overflow-wrap:anywhere}
td.wrap {
  white-space: normal;
  min-width: 150px;
}
.schedule-table th:first-child,
.schedule-table td:first-child {
  position: sticky;
  left: 0;
  background: white;
  z-index: 1;
  min-width: 100px;
}
.schedule-table th:first-child {
  background: #f6f9f9;
}
.schedule-table select {
  min-width: 125px;
  width: 100%;
  font-size: 12px;
  padding: 8px;
}
.schedule-table td {
  vertical-align: top;
}
.schedule-cell {
  display: grid;
  gap: 4px;
  min-width: 125px;
}
.pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  background: #e9f5f3;
  color: #24756e;
  font-size: 11px;
  white-space: nowrap;
}
.pill.warning {
  background: #fff0df;
  color: #9f6d35;
}
.pill.red {
  background: #fbeae7;
  color: #b44a40;
}
.pill.gray {
  background: #edf1f2;
  color: #6d8084;
}
.task {
  padding: 15px 0;
  border-bottom: 1px solid #edf1f2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.task:last-child {
  border: 0;
}
.task-body {
  flex: 1;
  min-width: 0;
}
.task-title {
  font-weight: 600;
  margin-bottom: 7px;
}
.task small {
  font-size: 11px;
}
.dot {
  height: 9px;
  width: 9px;
  border-radius: 50%;
  background: #d39c62;
  flex: none;
}
.dot.red {
  background: #ce7164;
}
.chart {
  width: 100%;
  height: auto;
  display: block;
  max-height: 340px;
}
.chart text {
  font: 11px sans-serif;
  fill: #839497;
}
.chart .grid {
  stroke: #e9eff0;
  stroke-width: 1;
}
.chart .current {
  stroke: var(--brand-green);
  fill: none;
  stroke-width: 3;
}
.chart .previous {
  stroke: #9aaabd;
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 5 5;
}
.legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.legend i {
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--brand-green);
  vertical-align: middle;
  margin-right: 6px;
}
.legend i.previous {
  background: #9aaabd;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: #06483e;
  border-top: 6px solid var(--brand-green);
  color: #e0f0ec;
  padding: 12vh 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-story .eyebrow {
  color: #77e2cc;
}
.login-story h1 {
  font-size: 42px;
  line-height: 1.4;
  color: white;
  margin: 32px 0 22px;
}
.login-story p {
  color: #a7c9c4;
  max-width: 360px;
}
.login-story .login-copy span {
  display: block;
  white-space: nowrap;
}
.login-story .login-copy span:nth-child(3) {
  margin-top: .7em;
}
.login-form {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}
.login-form form {
  width: 100%;
  max-width: 360px;
}
.login-form h2 {
  font-size: 25px;
  margin-bottom: 8px;
}
.login-form label {
  margin: 24px 0;
}
.login-form button {
  width: 100%;
  margin-top: 10px;
}
.login-form .brand {
  margin-bottom: 36px;
}
.login-form .brand-logo {
  width: 60px;
  height: 60px;
}
.error {
  color: var(--danger-ink);
  white-space: pre-wrap;
  line-height: 1.7;
}
.quality-fields {display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:16px 0}
.quality-fields>div {min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:7px}
.quality-fields dt {color:var(--muted);font-size:12px;margin-bottom:5px}
.quality-fields dd {margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.quality-prewrap {white-space:pre-wrap;overflow-wrap:anywhere}
.quality-detail-section {margin:24px 0}
.quality-issue-detail {padding:16px 0;border-top:1px solid var(--line)}
.quality-history {margin:18px 0;padding:12px;border:1px solid var(--line);border-radius:8px}
.quality-history>summary {cursor:pointer;font-weight:600}
.quality-history-row {padding:14px 0;border-bottom:1px solid var(--line)}
.quality-history-row:last-child {border-bottom:0}
.quality-project-group {margin:20px 0}
.quality-project-group h2 {padding:12px 14px;margin:0;border-radius:8px 8px 0 0}
.quality-project-pending h2 {background:#fff3df;color:#815619}
.quality-project-pending tbody tr {background:#fffaf1}
.quality-project-completed h2 {background:var(--brand-soft);color:var(--brand-ink)}
.quality-project-completed tbody tr {background:#f6fbf8}
.quality-project-group table {min-width:820px}
.quality-project-group td:first-child {min-width:200px}
.quality-project-group td {vertical-align:top}
.quality-project-group td button {margin-top:7px}
.quality-assign-link {font-size:12px;padding:4px 8px;min-height:30px}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  background: #173f42;
  color: white;
  border-radius: 10px;
  box-shadow: 0 8px 30px #173f4230;
  z-index: 30;
  display: none;
  max-width: 90vw;
}
#toast.show {
  display: block;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 760px;
  width: 92vw;
  max-height: 90vh;
  padding: 26px;
  color: #20383c;
}
dialog::backdrop {
  background: #183a3e66;
}
dialog > form.dialog-close {
  position: sticky;
  top: 0;
  z-index: 20;
  float: right;
  margin: 0 0 12px 18px;
  padding: 0;
  text-align: right;
  background: #fff;
}
#dialog-content > h2:first-child { padding-right: 82px; }
#dialog-content { clear: none; }

.loading {
  padding: 50px;
}
.check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.question {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.question strong {
  display: block;
  line-height: 1.7;
  margin-bottom: 9px;
}
.question select {
  min-width: 120px;
  margin-bottom: 8px;
}
.question textarea {
  min-height: 60px;
}
.trend-controls {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.trend-controls label {
  font-size: 12px;
}
.trend-controls input,
.trend-controls select {
  padding: 8px;
}
.tiny {
  font-size: 11px;
}
.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 1100px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  main {
    padding: 25px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .rail {
    padding: 28px 14px;
  }
  .brand {
    font-size: 19px;
  }
}
@media (max-width: 700px) {
  .layout {
    display: block;
  }
  .rail {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: block;
    overflow: visible;
  }
  .rail .brand small,
  .rail-note {
    display: none;
  }
  .brand {
    margin: 0;
  }
  nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    overflow: visible;
    margin-top: 16px;
    gap: 4px;
  }
  nav a {
    padding: 10px;
    white-space: nowrap;
    font-size: 12px;
  }
  .topbar {
    height: auto;
    padding: 12px 16px;
    align-items: start;
  }
  .topbar .actions {
    gap: 7px;
    flex-wrap: wrap;
    justify-content: end;
  }
  .topbar .actions button {
    padding: 5px 7px;
    font-size: 11px;
  }
  .topbar .online {
    display: none;
  }
  main {
    padding: 22px 14px;
  }
  .page-head {
    display: block;
  }
  h1 {
    font-size: 24px;
  }
  .card,
  .panel {
    padding: 17px;
  }
  .cards {
    gap: 10px;
  }
  .card .number {
    font-size: 28px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-story {
    display: none;
  }
  .login-form {
    padding: 38px 24px;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .toolbar label {
    min-width: 115px;
  }
  .task {
    align-items: start;
  }
  .chart text {
    font-size: 10px;
  }
  .trend-controls input {
    width: 140px;
  }
  .page-head .actions-row {
    margin-top: 16px;
  }
}
.card .number small {
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}
.note + .two-col {
  margin-top: 18px;
}
details {
  margin-top: 18px;
}
summary {
  cursor: pointer;
  color: #477578;
  padding: 10px 0;
}
.profile-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin: 22px 0;
}
.profile-section legend {
  padding: 0 9px;
  font-weight: 650;
  color: #28615f;
}
.profile-section input[readonly] {
  background: #f3f7f7;
  color: #57777a;
}
.profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.profile-details div {
  min-width: 0;
}
.profile-details dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.profile-details dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.profile-preview {
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.profile-import-list > .check-row {
  margin: 10px 0 20px;
}
@media (max-width: 600px) {
  .profile-details {
    grid-template-columns: 1fr;
  }
  .profile-section {
    padding: 14px;
  }
}

.metric-high {
  color: #dc3545;
  font-weight: 600;
}
.metric-low {
  color: #0284c7;
  font-weight: 600;
}
.metric-svg {
  width: 100%;
  min-height: 240px;
  max-height: 380px;
}
.metric-svg text {
  font-size: 12px;
  fill: #475569;
}
.schedule-group td {
  background: #e3e9eb !important;
  font-weight: 700;
  text-align: left !important;
}
.schedule-table {
  min-width: 1500px;
}
.schedule-table th,
.schedule-table td {
  white-space: nowrap;
}
.schedule-table th.weekend {
  background: #52616b;
  color: #ffdf65;
}
#display-form input {
  min-width: 90px;
  max-width: 130px;
}
#schedule-notes {
  width: 100%;
}
@media print {
  .rail,
  .topbar,
  .toolbar,
  button,
  #schedule-notes {
    display: none !important;
  }
  .main {
    margin: 0 !important;
  }
  .layout {
    display: block;
  }
  .panel {
    box-shadow: none;
    border: 0;
  }
  .table-wrap {
    overflow: visible;
  }
  table {
    font-size: 9px;
  }
  .schedule-table {
    min-width: 0;
  }
  select {
    appearance: none;
    border: 0;
    background: none;
    min-width: 0;
    padding: 0;
  }
  .schedule-cell select:last-child {
    display: none;
  }
  body {
    background: white;
  }
}
.metric-comparison-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.metric-comparison-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}
.metric-comparison-card h3 {
  font-size: 14px;
}
.metric-comparison-card svg {
  width: 100%;
  font-size: 11px;
  fill: #475569;
}
.schedule-table td {
  padding: 8px 6px;
}
.schedule-table th {
  padding: 12px 6px;
}
.schedule-table select {
  padding: 5px;
  min-width: 90px;
}
.schedule-table {
  min-width: 1400px;
}
.segment-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin: 8px 0;
}
.segment-row label {
  flex: 1;
  min-width: 100px;
}
.segment-row > span {
  padding-bottom: 10px;
}
.schedule-table tr:not(.schedule-group) > :first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 40px;
}
.schedule-table tr:not(.schedule-group) > :nth-child(2) {
  position: sticky;
  left: 52px;
  background: #fff;
  z-index: 1;
  min-width: 85px;
}
.report-grid {
  max-height: 65vh;
  border: 1px solid #dce5e8;
  border-radius: 8px;
}
.report-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-size: 12px;
}
.report-table th,
.report-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  min-width: 100px;
  max-width: 360px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.report-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e4ecee;
  text-align: center;
  min-width: 100px;
}
.report-table tbody th {
  position: sticky;
  left: 0;
  background: #edf2f4;
  text-align: center;
  min-width: 48px;
  z-index: 1;
}
.report-table .report-corner {
  left: 0;
  z-index: 3;
  min-width: 48px;
}
.report-table td:focus {
  outline: 2px solid #087e8b;
  outline-offset: -2px;
}
.report-table td {
  cursor: cell;
}
.report-cell-error {
  background: #fff0f0 !important;
  color: #b42318;
}
.report-detail {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.report-detail p {
  margin: 6px 0;
}
.report-detail code {
  white-space: pre-wrap;
}
#report-book {
  max-width: 100%;
}
#report-sheet {
  max-width: 300px;
}
.report-table mark {
  background: #ffe796;
  color: #1e293b;
}
@media print {
  .report-grid {
    max-height: none;
    overflow: visible;
  }
  .report-table th {
    position: static !important;
  }
  .report-table {
    font-size: 8px;
  }
  .report-detail {
    display: none;
  }
}

.administration-tabs { display:flex; flex-wrap:wrap; gap:12px; }
.administration-tabs a { padding:10px 18px; border:1px solid #d8e4e5; border-radius:8px; text-decoration:none; min-height:44px; }
.administration-tabs a[aria-selected="true"] { background:var(--teal); color:white; border-color:var(--teal); }
/* 2026-11-06：共享表格“正在编辑”提醒（颜色只作标记） */
.presence-note{margin:0 0 10px;padding:6px 12px;border-left:4px solid #d08a1e;background:#fff7e8;color:#3d2b0f;font-size:14px;border-radius:6px}
.presence-note[hidden]{display:none}
@media print{.presence-note{display:none}}
