﻿/* 住院管理系统 · 蓝白色界面完整样式 · 与 Default.aspx / app.js 配套 */
:root {
  --blue: #247bfa; --cyan: #16cce0; --navy: #102554; --ink: #172b52;
  --secondary-ink: #60789e; --line: #e1ebf7; --bg: #f5f9fe;
  --mint: #08a778; --orange: #ee9709; --red: #ed365e; --purple: #8062eb;
  --gradient: linear-gradient(105deg, #2b79fb 0%, #20a0ee 56%, #0eced9 100%);
  --shadow: 0 6px 26px rgba(37,87,146,.045);
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--navy); background: var(--bg); font: 15px/1.55 var(--font); }
[hidden] { display: none !important; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; transition: filter .18s, box-shadow .18s, transform .18s; border: 0; }
button:hover { filter: brightness(.97); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible,a:focus-visible { outline: 3px solid rgba(36,123,250,.42); outline-offset: 2px; }
input,select,textarea { color: var(--ink); border: 1px solid #d7e4f4; border-radius: 9px; padding: 12px 17px; outline: none; background: #fff; width: 100%; min-width: 0; }
input::placeholder,textarea::placeholder { color: #9badc6; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #227eff1a; }
textarea { min-height: 100px; resize: vertical; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
label input,label select,label textarea { margin-top: 7px; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: 27px; margin-bottom: 5px; line-height: 1.4; }
h2 { font-size: 22px; line-height: 1.4; }
h3 { font-size: 18px; margin-bottom: 18px; }
small { font-size: 12px; }
.muted { color: var(--secondary-ink); }
.primary { background: var(--gradient); color: #fff; border-radius: 9px; padding: 11px 20px; box-shadow: 0 5px 12px #207cff18; font-weight: 600; }
.primary:hover { box-shadow: 0 7px 20px #1c8cf933; }
.secondary { padding: 8px 13px; border-radius: 8px; color: #1681ed; background: #e9f3ff; font-weight: 600; }
.outline { padding: 8px 14px; border-radius: 8px; border: 1px solid #2586ff; color: #0877f0; background: #fff; font-weight: 600; }
.danger { padding: 8px 13px; border-radius: 8px; color: var(--red); background: #ffecf1; font-weight: 600; }
.link { color: #7a90b0; background: transparent; border: none; }
.link strong { color: var(--blue); }
.wide { width: 100%; }

/* 01 / 登录和注册：参考图中央卡片 */
.auth { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 55%, #ffffff 13%, #f4f9ff 76%, #ecf5ff 100%); }
.auth-panel { width: min(100%, 580px); border: 1px solid #e1ebf8; border-radius: 12px; background: #fff; box-shadow: 0 14px 38px #2a81df0c; padding: 40px 44px 23px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 4px 0 30px; text-align: center; }
.auth-heading h1 { margin: 16px 0 1px; font-size: 29px; }
.auth-heading h2 { margin: 0; font-size: 17px; font-weight: 400; color: #8196b5; }
.brand-icon { flex: none; width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #22d5df 0%, #05a3e9 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 8px; box-shadow: 0 2px 6px #159fc52b; }
.brand-icon i { display: block; border-radius: 3px; background: #f5ffff; }
.auth-logo > .brand-icon { width: 64px; height: 64px; border-radius: 13px; padding: 13px; gap: 5px; }
.auth-panel form label { color: var(--navy); font-size: 15px; margin-bottom: 22px; }
.field { display: flex; align-items: center; border: 1px solid #d6e3f5; border-radius: 10px; margin-top: 9px; overflow: hidden; }
.field:focus-within { border-color: #358dff; box-shadow: 0 0 0 3px #368eff13; }
.field input { height: 57px; margin: 0; border: 0; border-radius: 0; box-shadow: none!important; background: transparent; padding: 10px 15px 10px 5px; }
.field-icon { min-width: 53px; text-align: center; color: #6180af; font-size: 22px; line-height: 1; }
.field-action { background: transparent; color: #7794bc; padding: 8px 16px; font-size: 22px; }
.auth-panel #authSubmit { height: 57px; font-size: 19px; letter-spacing: 2px; }
.auth-panel .link { display: block; margin: 17px auto 15px; font-size: 14px; }
.auth-disclaimer { border-top: 1px solid #edf2fa; text-align: center; padding-top: 14px; color: #8aa0c0; margin: 0; font-size: 12px; }
.register-help { color: #8a9fba; display: block; margin-top: 6px; font-weight: 400; }
.error { color: #d93656; font-size: 13px; min-height: 14px; margin: 0 0 10px; }
/* 注册布局更紧凑 */
.auth:has(#emailLabel:not([hidden])) .auth-logo { flex-direction: row; gap: 16px; margin-bottom: 17px; }
.auth:has(#emailLabel:not([hidden])) .auth-heading h1 { margin: 0; }
.auth:has(#emailLabel:not([hidden])) .auth-heading h2 { font-size: 15px; }
.auth:has(#emailLabel:not([hidden])) .auth-logo > .brand-icon { width: 48px; height: 48px; padding: 10px; }
.auth:has(#emailLabel:not([hidden])) .auth-panel { max-width: 560px; padding-top: 32px; }
.auth:has(#emailLabel:not([hidden])) #authSubmit { margin-top: 6px; }

/* 02 / 侧栏、顶部导航 */
.shell { min-height: 100vh; display: flex; }
aside { width: 255px; background: #fff; border-right: 1px solid #e4ebf5; position: fixed; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; z-index: 4; }
.brand { display: flex; height: 79px; align-items: center; gap: 12px; padding: 0 23px; border-bottom: 1px solid #e8edf6; white-space: nowrap; font-size: 18px; }
.brand b { font-size: 18px; }
nav { padding: 25px 13px; }
nav button { width: 100%; border-radius: 9px; color: #223c6b; display: flex; gap: 20px; align-items: center; font-weight: 600; font-size: 16px; background: transparent; padding: 12px 19px; min-height: 51px; margin-bottom: 7px; text-align: left; }
nav button.active { background: var(--gradient); color: white; box-shadow: 0 5px 13px #247ff12e; }
nav button:hover:not(.active) { background: #f1f7fe; }
.nav-icon { display: inline-flex; width: 32px; align-items: center; justify-content: center; font-size: 26px; line-height: 1; font-weight: 400; }
.sidebar-bottom { margin-top: auto; padding: 18px 20px 22px; }
.sidebar-account { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; color: #455b81; }
.avatar { width: 38px; height: 38px; background: linear-gradient(140deg,#e5f1ff,#cfe7ff); display: grid; place-items: center; color: #2982f4; border-radius: 50%; font-size: 23px; flex: none; }
.sidebar-bottom button { background: none; color: #6b82aa; padding: 7px 4px; font-size: 14px; display: flex; align-items: center; gap: 13px; }
.sidebar-bottom button span { font-size: 21px; }
.workspace { width: calc(100% - 255px); margin-left: 255px; min-width: 0; }
.topbar { height: 63px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; background: #fff; border-bottom: 1px solid #e4ebf5; position: relative; }
#breadcrumb { font-size: 18px; color: #183362; }
.account { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #315075; }
.account .avatar { width: 38px; height: 38px; }
.account .chevron { color: #54749d; font-size: 16px; }
main { padding: 24px 22px 12px; width: 100%; max-width: 1750px; margin: 0 auto; min-height: calc(100vh - 105px); }
footer { display: flex; justify-content: space-between; padding: 12px 24px 20px; color: #a1afc4; font-size: 11px; }

/* 03 / 页面标题卡片、统计 */
.page-title { border: 1px solid #d5e8ff; border-radius: 10px; background: linear-gradient(105deg, #eef6ff, #e8f8fe); padding: 21px 25px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; min-height: 106px; }
.page-title h1 { margin: 0 0 2px; }
.page-title p { color: #62799d; margin: 0; font-size: 15px; }
.page-title .primary { white-space: nowrap; font-size: 15px; padding: 11px 25px; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin: 0 0 18px; }
.stat { display: flex; align-items: center; gap: 24px; min-height: 121px; padding: 20px; border-radius: 10px; border: 1px solid #e1e9f5; background: #fff; box-shadow: var(--shadow); }
.stat-icon { flex: none; width: 72px; height: 72px; display: grid; place-items: center; font-size: 31px; border-radius: 12px; background: #e7f3ff; color: #1c84f7; }
.stat:nth-child(2) .stat-icon { background: #e7faf5; color: #00ac79; }
.stat:nth-child(3) .stat-icon { background: #fff5e1; color: #f19d0b; }
.stat:nth-child(4) .stat-icon { background: #ffeaee; color: #ed4264; }
.stat small { color: #617a9d; font-size: 15px; white-space: nowrap; }
.stat b { display: block; margin-top: 1px; font-size: 34px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.stat b span { font-size: 15px; font-weight: 500; margin-left: 5px; }

/* 04 / 工作台：两列布局 */
.dash-grid { display: grid; grid-template-columns: minmax(0,1.72fr) minmax(360px,1fr); gap: 16px; align-items: start; }
.panel { background: #fff; border: 1px solid #e3ebf6; border-radius: 10px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 17px; min-width: 0; }
.panel h3 { font-size: 18px; margin: 0 0 16px; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.quick button { border: 1px solid #e7eff9; padding: 15px 13px; text-align: left; color: var(--navy); background: linear-gradient(120deg,#f4f9ff,#f8fcff); border-radius: 9px; font-weight: 600; display: flex; align-items: center; gap: 12px; min-height: 93px; }
.quick button:nth-child(2) { background: linear-gradient(120deg,#edfcf8,#f6fffe); }
.quick button:nth-child(3) { background: linear-gradient(120deg,#f3f0ff,#fbfbff); }
.quick-icon { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 12px; color: #2088ff; background: #e4f1ff; font-size: 26px; }
.quick button:nth-child(2) .quick-icon { background: #dff8ef; color: #009f74; }
.quick button:nth-child(3) .quick-icon { background: #ede7ff; color: #8059db; }
.quick small { display: block; color: #7a8eaa; font-size: 12px; font-weight: 400; margin-top: 3px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.legend { display: inline-flex; gap: 15px; align-items: center; font-size: 12px; color: #657b9c; white-space: nowrap; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); vertical-align: middle; margin-right: 5px; }
.legend .dot.free { background: var(--mint); }

/* 05 / 搜索、列表、分页 */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-bottom: 20px; }
.toolbar input { width: min(390px,100%); }
.toolbar select { width: 205px; }
.toolbar .primary { margin-left: auto; }
.page-title .toolbar { margin: 0; justify-content: flex-end; flex: 1; }
.page-title .toolbar input { width: min(325px,35vw); }
.page-title .toolbar select { width: 165px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e7edf6; border-radius: 9px; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 14px; }
th { background: linear-gradient(#f3f8fe,#f6faff); color: #6a7fa2; font-weight: 500; font-size: 13px; }
th,td { padding: 16px 17px; border-bottom: 1px solid #e8eef7; }
tbody tr:last-child td { border-bottom: 0; }
tr.selected { background: #e8f3ff; }
td button { padding: 7px 11px!important; font-size: 12px; margin: 1px 3px 1px 0; }
.empty { color: #8499b8; text-align: center; padding: 44px 15px; }
.pagination { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: #7287a8; }
.pagination button { padding: 6px 13px; border: 1px solid #e1eaf5; background: #fff; color: #6c88b1; border-radius: 7px; }
.pagination .current { background: var(--gradient); color: #fff; font-weight: 700; border: 0; }
.pagination .push { margin-left: auto; }

/* 06 / 病人管理：左表右详情 */
.patient-grid { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(310px,1fr); gap: 16px; align-items: stretch; }
.patient-grid > .panel { display: flex; flex-direction: column; min-height: 535px; }
.patient-grid > .panel .pagination { margin-top: auto; padding-top: 15px; }
.profile-head { display: flex; align-items: center; gap: 22px; padding: 14px 0 18px; border-bottom: 1px solid #e8eef6; }
.profile-avatar { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 13px; flex: none; background: #e7f3ff; font-size: 42px; color: #2585f7; }
.profile-head h3 { margin: 0 0 7px; font-size: 24px; }
.profile-head p { margin: 0; color: #677fa7; }
.details { margin: 6px 0 16px; }
.details div { padding: 12px 0; border-bottom: 1px solid #e9eff7; display: flex; justify-content: space-between; gap: 14px; }
.details dt { color: #7289ac; font-size: 13px; min-width: 85px; }
.details dd { margin: 0; color: #142a56; text-align: right; overflow-wrap: anywhere; }
.profile-buttons { margin-top: auto; }
.profile-buttons .primary { width: 100%; }

/* 07 / 病房床位：3列独立房间卡片 */
.bed-stats { grid-template-columns: repeat(3,minmax(0,1fr)); margin: -2px 0 22px; }
.bed-stats .stat { min-height: 142px; }
.ward-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.ward { border: 1px solid #e3ebf6; border-radius: 10px; padding: 20px; background: #fff; box-shadow: var(--shadow); min-width: 0; }
.ward > header { height: auto; display: flex; gap: 8px; align-items: baseline; background: transparent; border: 0; padding: 0; margin: 0 0 14px; }
.ward h3 { font-size: 19px; margin: 0; }
.ward header small { color: #7087a6; font-size: 12px; }
.ward .bed { margin-bottom: 10px; }
.bed { border-radius: 9px; display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #eafaf5; padding: 15px; min-width: 0; }
.bed.occupied { background: #fff5e3; }
.bed-info { display: flex; align-items: center; min-width: 0; gap: 12px; }
.bed-symbol { display: grid; place-items: center; flex: none; width: 48px; height: 48px; font-size: 25px; border-radius: 11px; color: #00a578; background: #d6f6eb; }
.bed.occupied .bed-symbol { color: #e88d03; background: #ffebc8; }
.bed b { font-size: 14px; }
.bed small { display: block; color: #6d84a2; margin-top: 3px; font-size: 12px; }
.tag { display: inline-flex; align-items: center; padding: 5px 13px; color: #009f77; font-size: 12px; font-weight: 600; border-radius: 8px; background: #d6f8ee; white-space: nowrap; }
.tag.orange { color: #d98500; background: #ffedc6; }
.tag.done { color: #7b61de; background: #eee9ff; }
.dash-grid .ward { padding: 12px; border-radius: 9px; background: #f8fbff; margin-bottom: 10px; }
.dash-grid .ward header { margin-bottom: 8px; }
.dash-grid .ward h3 { font-size: 14px; }
.dash-grid .ward .bed { display: inline-flex; width: calc(50% - 5px); vertical-align: top; min-height: 66px; padding: 8px; margin-bottom: 0; }
.dash-grid .ward .bed + .bed { margin-left: 10px; }
.dash-grid .bed-symbol { width: 37px; height: 37px; font-size: 20px; }
.dash-grid .bed-info { gap: 7px; }
.dash-grid .bed .tag { padding: 3px 6px; }
.dash-grid .bed b { font-size: 12px; }
.dash-grid .bed small { font-size: 11px; }

/* 08 / 住院记录：顶部筛选+详情 */
.admission-table td { padding: 17px 15px; }
.record-card { margin-top: 0; }
.record-heading { display: flex; align-items: center; gap: 17px; margin-bottom: 12px; }
.record-icon { display: grid; place-items: center; background: #e6f3ff; border-radius: 11px; width: 60px; height: 60px; color: var(--blue); font-size: 28px; }
.record-heading h3 { margin: 0; font-size: 21px; }
.record-details { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px 18px; }
.record-item { padding: 4px 17px; border-right: 1px solid #dce8f6; }
.record-item:nth-child(4n) { border-right: 0; }
.record-item small { display: block; color: #758bad; font-size: 13px; margin-bottom: 5px; }
.record-item b { font-size: 15px; font-weight: 500; }

/* 09 / 弹窗及提示 */
dialog { width: min(620px,calc(100vw - 26px)); padding: 27px; border-radius: 13px; background: #fff; color: var(--ink); border: 1px solid #dbe8f7; box-shadow: 0 25px 95px #244b8630; }
dialog::backdrop { background: #122e5578; backdrop-filter: blur(4px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.modal-head h2 { margin: 0; }
.modal-head button { padding: 0 6px; color: #7188aa; background: transparent; font-size: 28px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.full { grid-column: 1/-1; }
#toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 20; background: #164d9c; color: white; padding: 12px 22px; border-radius: 9px; box-shadow: 0 12px 30px #174e8636; }
.error-panel { padding: 25px; background: #fff1ef; border: 1px solid #fed3ce; border-radius: 10px; }

/* 10 / 自适应 */
@media(max-width:1350px) {
  .stat { gap: 12px; padding: 16px; }
  .stat-icon { width: 58px; height: 58px; }
  .dash-grid { grid-template-columns: minmax(0,1.25fr) minmax(330px,1fr); }
  .quick button { gap: 7px; }
  .quick-icon { width: 42px; height: 42px; }
  .ward-grid { gap: 12px; }
  .ward { padding: 14px; }
  .bed { padding: 10px; }
  .bed-symbol { width: 40px; height: 40px; }
}
@media(max-width:1100px) {
  aside { width: 210px; }
  .workspace { width: calc(100% - 210px); margin-left: 210px; }
  .brand { padding: 0 12px; }
  .brand b { font-size: 15px; }
  .dash-grid { grid-template-columns: 1fr; }
  .patient-grid { grid-template-columns: minmax(0,1fr) minmax(250px,.7fr); }
  .ward-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-title { flex-wrap: wrap; }
  .page-title .toolbar { width: 100%; justify-content: flex-start; flex: auto; }
  .page-title .toolbar input { width: 210px; }
}
@media(max-width:720px) {
  .shell { display: block; }
  aside { position: static; width: 100%; padding: 0; }
  .brand { height: 56px; border: 0; }
  nav { display: flex; overflow-x: auto; padding: 7px; }
  nav button { flex: 1; min-width: 85px; flex-direction: column; align-items: center; font-size: 12px; gap: 2px; min-height: 60px; margin: 0; padding: 7px 4px; }
  .nav-icon { font-size: 21px; }
  .sidebar-bottom { display: none; }
  .workspace { width: 100%; margin-left: 0; }
  .topbar { height: 48px; padding: 0 15px; }
  main { padding: 14px; }
  .page-title { padding: 16px; }
  .page-title h1 { font-size: 23px; }
  .stats { gap: 9px; }
  .stat { padding: 12px; min-height: 98px; }
  .stat-icon { width: 44px; height: 44px; font-size: 21px; }
  .stat b { font-size: 26px; }
  .stat small { font-size: 12px; }
  .dash-grid,.patient-grid,.ward-grid { grid-template-columns: 1fr; }
  .quick { gap: 8px; }
  .quick button { display: block; text-align: center; padding: 11px 3px; }
  .quick-icon { margin: 0 auto 6px; }
  .quick small { display: none; }
  .ward { padding: 15px; }
  .toolbar { gap: 8px; }
  .toolbar input { width: 100%; }
  .toolbar select { width: calc(50% - 4px); }
  .toolbar .primary { margin: 0; }
  .page-title .toolbar input { width: 100%; }
  .page-title .toolbar select { width: 100%; }
  .record-details { grid-template-columns: repeat(2,1fr); }
  .record-item:nth-child(2n) { border-right: 0; }
  .auth-panel { padding: 27px 23px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  footer { padding: 12px; }
}

/* 图标及精细排版修正 */
.svg-sprite { position:absolute; width:0; height:0; overflow:hidden; }
.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon .icon { width: 27px; height: 27px; }
.avatar .icon { width: 24px; height: 24px; }
.field-icon .icon, .field-action .icon { width: 24px; height: 24px; }
.stat-icon .icon { width: 36px; height: 36px; }
.quick-icon .icon { width: 28px; height: 28px; }
.profile-avatar .icon { width: 50px; height: 50px; }
.bed-symbol .icon { width: 29px; height: 29px; }
.record-icon .icon { width: 29px; height: 29px; }
.page-title .toolbar { flex: 0 1 auto; margin-left: auto; }
.dash-grid .ward-beds { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.dash-grid .ward .bed { display: flex; width: auto; min-width: 0; margin: 0; }
.dash-grid .ward .bed + .bed { margin-left: 0; }
.dash-grid .bed .tag { display: none; }
@media (max-width: 720px) { .page-title .toolbar { width: 100%; flex: 1 1 100%; margin-left: 0; } }

/* 病房床位统计：橙色 = 已占用，绿色 = 空闲。仅控制顶部图标。 */
#main .bed-stats .stat.stat-occupied .stat-icon {
    background: #FFF5E1;
    color: #F19D0B;
}
#main .bed-stats .stat.stat-free .stat-icon {
    background: #E7FAF5;
    color: #00AC79;
}

/* ========== 第二阶段新增样式：保留原蓝白色主题 ========== */
.ward-admin-actions { margin-left:auto; display:flex; gap:6px; flex-wrap:wrap; }
.ward-admin-actions button { padding:5px 7px; font-size:11px; }
.bed-admin-actions { display:flex; gap:5px; flex-wrap:wrap; }
.bed-admin-actions button { padding:5px 7px; font-size:11px; }
.ward .bed { flex-wrap: wrap; }
.ward .bed.inactive { background:#f0f3f7; color:#70829a; }
.stage2-ward-list { margin-top:24px; }
.stage2-charts { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:stretch; }
.stage2-charts .panel { margin:0; min-width:0; }
.chart-content { min-height:180px; }
.stage2-bar-row { display:grid; grid-template-columns:125px 1fr 50px; gap:10px; align-items:center; margin:18px 0; font-size:13px; }
.stage2-bar-row small { color:#7b8da8; font-size:11px; display:block; }
.stage2-track { border-radius:99px; background:#eaf2fb; height:15px; overflow:hidden; }
.stage2-track div { height:100%; background:linear-gradient(90deg,#2980f2,#16c1d0); border-radius:99px; }
.stage2-linechart { width:100%; height:auto; max-height:205px; }
.stage2-chart-legend { text-align:right; font-size:12px; }
@media(max-width:950px) { .stage2-charts { grid-template-columns:1fr; } }
@media(max-width:650px) { .stage2-bar-row { grid-template-columns:90px 1fr 38px; gap:5px; } .ward-admin-actions { width:100%; } }


/* 第三阶段扩展：保留原蓝白主题，只添加科室分组和新状态 */
.department-tabs { display:flex; gap:9px; overflow-x:auto; flex-wrap:wrap; margin:0 0 17px; padding:0 0 4px; }
.department-tabs button { padding:9px 16px; color:#335780; background:#fff; border:1px solid #dce8f5; border-radius:8px; white-space:nowrap; font-weight:600; }
.department-tabs button.selected { background:linear-gradient(110deg,#247bfb,#10c2d5); color:#fff; border-color:transparent; box-shadow:0 4px 11px #247ff122; }
.department-tabs button:hover:not(.selected) { background:#f0f7ff; }
.bed-status-summary { display:flex; flex-wrap:wrap; gap:16px; justify-content:flex-end; align-items:center; margin:6px 1px 16px; color:#607a9e; font-size:12px; }
.bed-status-summary span { display:inline-flex; align-items:center; gap:6px; }
.dot.clean { background:#52a5e9!important; }
.dot.repair { background:#9781d7!important; }
.bed.cleaning { background:#e8f4ff!important; color:#316eaa!important; }
.bed.repair { background:#f0ebfb!important; color:#7762aa!important; }
.bed.inactive { background:#edf0f4!important; color:#8f9cad!important; }
.bed.cleaning .bed-symbol, .bed.repair .bed-symbol { color:inherit; }
.bed-stats .stat.stat-occupied .stat-icon { background:#fff5e1!important; color:#f19d0b!important; }
.bed-stats .stat.stat-free .stat-icon { background:#e7faf5!important; color:#00ac79!important; }
.account-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 22px; max-width:820px; align-items:end; }
.account-form label { margin:0; }
.account-form button { width:max-content; min-width:150px; align-self:end; }
.account-divider { margin:28px 0; height:1px; background:#e5ebf4; }
@media(max-width:780px){.account-form{grid-template-columns:1fr}.department-tabs{flex-wrap:nowrap}}

.report-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.report-filters label { font-size:13px; margin-bottom:6px; }
.report-toolbar { display:flex; justify-content:flex-end; align-items:center; gap:10px; margin:5px 0 16px; color:#536e96; }
@media(max-width:1000px){.report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.report-filters{grid-template-columns:1fr}}


/* 患者身份校验 */
.identity-duplicate {
    border: 1px solid #ffda99;
    background: #fff8e9;
    border-radius: 10px;
    padding: 13px 15px;
    margin: 8px 0 15px;
    color: #9b5c12;
}

.identity-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #f2dcba;
    padding: 9px 0;
    margin-top: 8px;
    font-size: 13px;
}

    .identity-match span {
        overflow-wrap: anywhere;
    }

    .identity-match button {
        flex-shrink: 0;
    }

.identity-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f2f8ff;
    border: 1px solid #dceaff;
    border-radius: 9px;
    font-weight: 500;
}

    .identity-check input[type=checkbox] {
        width: 17px;
        min-width: 17px;
        height: 17px;
        margin: 0;
        accent-color: #2187f7;
    }

.identity-verify {
    background: #edf6ff;
    border: 1px solid #d8e8fb;
    border-radius: 10px;
    padding: 13px 16px;
    margin-bottom: 18px;
}

.identity-summary {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 14px;
    color: #24416b;
}

    .identity-summary strong {
        color: #102c59;
        font-size: 16px;
    }

#patientDocumentRow[hidden],
#identityReviewedLabel[hidden],
#identityDuplicateResults[hidden] {
    display: none;
}

/* ===== 全站统一加载骨架屏 ===== */

.data-loading {
    animation: data-loading-in .25s ease-out;
}

.data-loading-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 108px;
    margin-bottom: 18px;
    padding: 22px 26px;
    background: linear-gradient(110deg, #edf6ff, #eafaff);
    border: 1px solid #d8e9fb;
    border-radius: 12px;
}

    .data-loading-head h1 {
        font-size: 25px;
        margin: 0 0 5px;
        color: #102554;
    }

    .data-loading-head p {
        margin: 0;
        color: #6c86a9;
        font-size: 14px;
    }

.data-loading-status,
.data-loading-account {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4581c5;
    font-size: 14px;
}

.data-loading-status {
    white-space: nowrap;
}

.data-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 3px solid #cfe4fa;
    border-top-color: #247bfa;
    border-radius: 50%;
    animation: data-spin .8s linear infinite;
}

/* 上方统计卡片 */
.data-loading-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 18px;
}

.data-loading-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    min-height: 112px;
    background: #fff;
    border: 1px solid #e2ebf6;
    border-radius: 11px;
}

.data-loading-icon {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 12px;
}

.data-loading-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* 下方内容区域 */
.data-loading-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
}

.data-loading-panel {
    padding: 22px;
    min-height: 340px;
    background: #fff;
    border: 1px solid #e2ebf6;
    border-radius: 11px;
}

.data-loading-heading {
    width: 35%;
    height: 23px;
    border-radius: 6px;
    margin-bottom: 23px;
}

.data-loading-short {
    width: 65%;
    height: 15px;
    border-radius: 6px;
}

.data-loading-number {
    width: 43%;
    height: 27px;
    border-radius: 6px;
}

.data-loading-row {
    display: block;
    width: 100%;
    height: 38px;
    margin: 14px 0;
    border-radius: 7px;
}

    .data-loading-row:nth-child(3) {
        width: 92%;
    }

    .data-loading-row:nth-child(4) {
        width: 96%;
    }

.data-loading-chart {
    width: 100%;
    height: 200px;
    border-radius: 11px;
    margin-bottom: 18px;
}

.data-loading-account {
    margin-bottom: 25px;
    font-size: 15px;
}

/* 流动光泽动画 */
.data-loading-shimmer {
    display: block;
    background: linear-gradient( 100deg, #eaf2fc 20%, #f8fbff 45%, #eaf2fc 70% );
    background-size: 200% 100%;
    animation: data-shimmer 1.6s ease-in-out infinite;
}

@keyframes data-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes data-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes data-loading-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 小屏幕适配 */
@media (max-width: 950px) {
    .data-loading-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .data-loading-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .data-loading-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-loading-cards {
        gap: 9px;
    }

    .data-loading-card {
        padding: 12px;
    }

    .data-loading-icon {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .data-loading,
    .data-loading-spinner,
    .data-loading-shimmer {
        animation: none;
    }
}

/* 原布局专用骨架屏，仅在加载时生效 */


/* 原布局专用骨架屏：半透明浅蓝流光 */
.original-loading .original-load-block,
.page-loading-skeleton .page-loading-slot {
    display: block;
    flex-shrink: 0;
    max-width: 100%;
    border-radius: 7px;
    background: linear-gradient( 100deg, rgba(173, 199, 233, 0.32) 20%, rgba(246, 251, 255, 0.78) 46%, rgba(173, 199, 233, 0.32) 72% );
    background-size: 200% 100%;
    animation: hospital-skeleton-shimmer 1.8s ease-in-out infinite;
}

.original-loading .original-load-stack,
.page-loading-skeleton .page-loading-stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.original-loading .original-load-quick,
.page-loading-skeleton .page-loading-quick {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 93px;
    padding: 15px 13px;
    border: 1px solid #e7eff9;
    border-radius: 9px;
    background: linear-gradient( 120deg, rgba(244,249,255,.78), rgba(248,252,255,.7) );
}

.original-loading .original-load-bed,
.page-loading-skeleton .page-loading-bed {
    background: rgba(235,244,255,.62) !important;
}

.original-loading .original-load-toolbar {
    margin: 0;
    justify-content: flex-end;
    flex: 1;
}

.page-loading-skeleton .page-loading-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6985aa;
    font-size: 13px;
}

.page-loading-skeleton .page-loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #d6e6f8;
    border-top-color: #247bfa;
    border-radius: 50%;
    animation: hospital-skeleton-spin .8s linear infinite;
}

@keyframes hospital-skeleton-shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@keyframes hospital-skeleton-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .original-loading .original-load-block,
    .page-loading-skeleton .page-loading-slot,
    .page-loading-skeleton .page-loading-spinner {
        animation: none;
    }
}
