/* ============================================================
   暖夕云 · 智慧养老管理平台 样式表
   浅色主题 / 暖橙主色 / 中后台布局
   ============================================================ */

:root{
  --orange:#E8734A;
  --orange-d:#C2410C;
  --amber:#F0A868;
  --amber-l:#FDF0E6;
  --teal:#4FA895;
  --teal-l:#E8F5F1;
  --blue:#6C8EA4;
  --red:#DC2626;
  --green:#16A34A;
  --amber-warn:#B45309;

  --ink:#221A15;
  --ink2:#4A3B32;
  --muted:#8C7A6E;
  --line:#EFE3D9;
  --line2:#E3D3C6;
  --bg:#F7F3EF;
  --card:#FFFFFF;

  --sb-w:224px;
  --r:12px;
  --r-s:8px;
  --sh:0 1px 2px rgba(34,26,21,.05),0 4px 16px rgba(34,26,21,.05);
  --sh-l:0 8px 32px rgba(34,26,21,.12);
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:"PingFang SC","Microsoft YaHei","Hiragino Sans GB","Source Han Sans SC",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);color:var(--ink);
  font-size:14px;line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
ul,ol{list-style:none}
table{border-collapse:collapse;width:100%}
svg{display:block}

/* ==================== 布局 ==================== */
.app{display:flex;min-height:100vh}

.sidebar{
  width:var(--sb-w);flex:0 0 var(--sb-w);
  background:linear-gradient(180deg,#2A211C 0%,#241C17 100%);
  color:#E8DCD3;position:sticky;top:0;height:100vh;overflow-y:auto;
  display:flex;flex-direction:column;
}
.sidebar::-webkit-scrollbar{width:5px}
.sidebar::-webkit-scrollbar-thumb{background:#4A3B32;border-radius:3px}

.sb-brand{display:flex;align-items:center;gap:10px;padding:18px 16px 16px;border-bottom:1px solid rgba(255,255,255,.07)}
.sb-logo{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:rgba(232,115,74,.16)}
.sb-name{font-size:16px;font-weight:800;letter-spacing:.5px;display:flex;flex-direction:column;line-height:1.2}
.sb-name small{font-size:10px;font-weight:500;color:#9C8A7D;letter-spacing:1.4px;text-transform:uppercase}

.sb-group{padding:16px 18px 6px;font-size:11px;font-weight:700;color:#7D6C61;letter-spacing:1.5px}
.sb-list li a{
  display:flex;align-items:center;gap:10px;padding:9px 16px 9px 18px;
  font-size:13.5px;color:#CFC1B7;position:relative;transition:background .16s,color .16s;
}
.sb-list li a i{font-style:normal;font-size:14px;width:18px;text-align:center;opacity:.85}
.sb-list li a:hover{background:rgba(255,255,255,.05);color:#FFF}
.sb-list li a.on{background:linear-gradient(90deg,rgba(232,115,74,.22),rgba(232,115,74,.04));color:#FFC49A;font-weight:600}
.sb-list li a.on::before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:3px;background:var(--orange);border-radius:0 3px 3px 0}
.sb-badge{
  margin-left:auto;font-style:normal;font-size:11px;font-weight:700;min-width:18px;height:18px;
  padding:0 5px;border-radius:9px;background:var(--orange);color:#fff;display:inline-flex;align-items:center;justify-content:center;
}
.sb-badge.gray{background:#5C4A3F;color:#D8C9BF}

.main-wrap{flex:1;min-width:0;display:flex;flex-direction:column}

.topbar{
  height:58px;flex:0 0 58px;background:rgba(255,255,255,.9);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;
  padding:0 22px;position:sticky;top:0;z-index:30;
}
.tb-left{display:flex;align-items:center;gap:12px}
.tb-title{font-size:15px;font-weight:700;letter-spacing:.3px}
.icon-btn{width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink2);font-size:16px}
.icon-btn:hover{background:var(--amber-l);color:var(--orange)}
.sb-toggle{display:none}

.tb-right{display:flex;align-items:center;gap:18px}
.tb-date{display:flex;flex-direction:column;align-items:flex-end;line-height:1.3}
.tb-date b{font-size:13px;font-weight:600}
.tb-date span{font-size:11px;color:var(--muted)}
.tb-user{display:flex;align-items:center;gap:9px;padding-left:18px;border-left:1px solid var(--line)}
.tb-user>div{display:flex;flex-direction:column;line-height:1.35}
.tb-user b{font-size:13px;font-weight:600}
.tb-user small{font-size:11px;color:var(--muted)}

.avatar{
  width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:700;flex:0 0 auto;
}
.avatar.m{background:linear-gradient(135deg,#F0A868,#E8734A);color:#fff}
.avatar.f{background:linear-gradient(135deg,#8FB8C9,#6C8EA4);color:#fff}
.ava.xs{width:28px;height:28px;font-size:12px}
.ava.sm{width:26px;height:26px;font-size:12px}
.ava.xl{width:60px;height:60px;font-size:24px}

/* 角色切换 */
.role-switch{position:relative;cursor:pointer}
.rs-cur{
  display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;
  padding:6px 12px;border-radius:20px;background:var(--amber-l);color:var(--orange-d);
  border:1px solid #F3DCC9;
}
.rs-cur::after{content:"▾";font-size:10px;opacity:.7}
.rs-menu{
  position:absolute;top:calc(100% + 6px);right:0;min-width:180px;background:#fff;
  border:1px solid var(--line);border-radius:10px;box-shadow:var(--sh-l);padding:5px;
  opacity:0;visibility:hidden;transform:translateY(-4px);transition:.16s;z-index:40;
}
.role-switch.open .rs-menu{opacity:1;visibility:visible;transform:translateY(0)}
.rs-menu button{display:block;width:100%;text-align:left;padding:8px 10px;border-radius:7px;font-size:13px}
.rs-menu button:hover{background:var(--amber-l)}
.rs-menu button.on{background:var(--orange);color:#fff;font-weight:600}

.main{flex:1;padding:22px;max-width:1560px;width:100%;margin:0 auto}

.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px;flex-wrap:wrap}
.page-head h2{font-size:21px;font-weight:800;letter-spacing:-.3px}
.page-head p{font-size:13px;color:var(--muted);margin-top:3px}
.page-actions{display:flex;gap:8px;flex-wrap:wrap}

/* ==================== 基础组件 ==================== */
.btn{
  display:inline-flex;align-items:center;gap:5px;padding:8px 15px;border-radius:9px;
  background:var(--orange);color:#fff;font-size:13px;font-weight:600;
  box-shadow:0 2px 8px rgba(232,115,74,.28);transition:.16s;white-space:nowrap;
}
.btn:hover{background:var(--orange-d);box-shadow:0 4px 14px rgba(232,115,74,.34);transform:translateY(-1px)}
.btn.ghost{background:#fff;color:var(--ink2);border:1px solid var(--line2);box-shadow:none}
.btn.ghost:hover{background:var(--amber-l);color:var(--orange-d);border-color:#F0CFB4;box-shadow:none}
.btn.danger{background:#fff;color:var(--red);border:1px solid #F3C6C6;box-shadow:none}
.btn.danger:hover{background:#FEF2F2;border-color:var(--red)}
.btn-mini{
  padding:4px 10px;border-radius:6px;font-size:12px;font-weight:600;
  background:var(--amber-l);color:var(--orange-d);border:1px solid #F3DCC9;transition:.14s;
}
.btn-mini:hover{background:var(--orange);color:#fff;border-color:var(--orange)}
.btn-mini.ghost{background:#fff;color:var(--ink2);border-color:var(--line2)}
.btn-mini.ghost:hover{background:var(--amber-l);color:var(--orange-d)}
.btn-row{display:flex;gap:8px;flex-wrap:wrap}

.bd{
  display:inline-flex;align-items:center;padding:2px 8px;border-radius:20px;
  font-size:11.5px;font-weight:600;line-height:1.6;white-space:nowrap;
}
.bd-ok{background:var(--teal-l);color:#2E7D66}
.bd-warn{background:#FEF3E2;color:var(--amber-warn)}
.bd-err{background:#FDECEC;color:#B91C1C}
.bd-run{background:#EAF1FB;color:#3B6EA5}
.bd-gray{background:#F1ECE7;color:var(--muted)}

.c-ok{color:var(--green)}.c-err{color:var(--red)}.c-warn{color:var(--amber-warn)}
.c-gray{color:var(--muted)}.c-gray2{color:var(--ink2)}.c-amber{color:var(--orange)}
.c-run{color:#3B6EA5}.c-teal{color:var(--teal)}.c-red{color:var(--red)}

.inp{
  padding:7px 11px;border:1px solid var(--line2);border-radius:8px;background:#fff;
  font-size:13px;outline:none;transition:.14s;min-width:0;
}
.inp:focus{border-color:var(--amber);box-shadow:0 0 0 3px rgba(240,168,104,.16)}
select.inp{cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238C7A6E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:26px}
textarea.inp{resize:vertical;min-height:70px}

.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}
.lbl-block{display:flex;flex-direction:column;gap:5px;font-size:12.5px;color:var(--ink2);font-weight:600}
.lbl-block.full{grid-column:1/-1}
.inp-row{display:flex;gap:8px}
.ck{display:flex;align-items:center;gap:7px;cursor:pointer;font-size:13px;font-weight:400}
.ck input{width:15px;height:15px;accent-color:var(--orange);cursor:pointer;flex:0 0 auto}
.ck.inline{display:inline-flex}
.check-row{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:10px}
.check-row.col{flex-direction:column}
.radio-row{display:flex;gap:16px;flex-wrap:wrap}
.radio{display:flex;align-items:center;gap:6px;cursor:pointer;font-size:13px}
.radio input{accent-color:var(--orange)}

.muted{color:var(--muted)}
.txt-sm{font-size:12px}
.mt{margin-top:14px}.mb{margin-top:0;margin-bottom:10px}
.block{display:block}.full{width:100%}.inline{display:inline-flex}
.center{text-align:center}
.gap-lg{margin-top:18px}

/* 面板 */
.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh);overflow:hidden}
.panel-h{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:13px 18px;border-bottom:1px solid var(--line);background:#FDFBF9;
}
.panel-h h3{font-size:14.5px;font-weight:700}
.panel-x{font-size:12px;color:var(--muted)}
.panel-b{padding:16px 18px}

.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}

/* 表格 */
.tbl-scroll{overflow-x:auto}
.tbl{font-size:13px;min-width:100%}
.tbl th{
  text-align:left;padding:10px 12px;background:#FAF6F2;color:var(--muted);
  font-size:12px;font-weight:600;white-space:nowrap;border-bottom:1px solid var(--line);position:sticky;top:0;
}
.tbl td{padding:11px 12px;border-bottom:1px solid #F5EDE7;vertical-align:middle}
.tbl tbody tr:hover{background:#FDF9F5}
.tbl tbody tr:last-child td{border-bottom:none}
.tbl td.r,.tbl th.r{text-align:right}
.tbl .total td{background:#FDF6F0;font-size:14px}
.tbl small{display:block}
.tbl.sm td,.tbl.sm th{padding:7px 10px;font-size:12.5px}
.tbl-scroll+.pager{padding:14px 0 2px}
tr.warn-row{background:#FFFBF5}

.cell-user{display:flex;align-items:center;gap:9px}
.cell-user small{font-size:11.5px;color:var(--muted)}

.pager{display:flex;align-items:center;gap:5px;justify-content:center;flex-wrap:wrap}
.pager button{
  min-width:30px;height:30px;padding:0 9px;border-radius:7px;border:1px solid var(--line2);
  background:#fff;font-size:12.5px;transition:.14s;
}
.pager button:hover:not(:disabled){border-color:var(--amber);color:var(--orange-d)}
.pager button.on{background:var(--orange);color:#fff;border-color:var(--orange);font-weight:600}
.pager button:disabled{opacity:.4;cursor:not-allowed}
.pager .gap{color:var(--muted);padding:0 3px}
.pager-info{font-size:12px;color:var(--muted);margin-left:9px}

.empty{padding:44px 20px;text-align:center;color:var(--muted)}
.empty.sm{padding:24px 14px}
.empty-ico{font-size:30px;opacity:.35;margin-bottom:8px}
.empty p{font-size:13px}

.filter-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:13px}
.filter-count{font-size:12.5px;color:var(--muted);margin-left:auto}
.stat-line{
  display:flex;align-items:center;gap:22px;flex-wrap:wrap;
  padding:11px 16px;background:linear-gradient(135deg,#FDF3EC,#FAF6F2);
  border:1px solid #F6E3D5;border-radius:var(--r-s);margin-bottom:13px;
}
.stat-line>div{display:flex;flex-direction:column;line-height:1.35}
.stat-line span{font-size:11.5px;color:var(--muted)}
.stat-line b{font-size:16px;font-weight:800}

.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:16px;flex-wrap:wrap}
.tabs button{
  padding:9px 16px;font-size:13.5px;font-weight:600;color:var(--muted);
  border-bottom:2px solid transparent;margin-bottom:-1px;transition:.14s;
}
.tabs button:hover{color:var(--orange-d)}
.tabs button.on{color:var(--orange-d);border-bottom-color:var(--orange)}

.tag-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}
.tag{display:inline-block;padding:2px 8px;border-radius:6px;font-size:11.5px;font-weight:600}
.t-amber{background:var(--amber-l);color:var(--orange-d)}
.t-gray{background:#F1ECE7;color:var(--ink2)}
.t-red{background:#FDECEC;color:#B91C1C}
.t-teal{background:var(--teal-l);color:#2E7D66}
.link{color:var(--orange-d);font-weight:600;cursor:pointer}
.link:hover{text-decoration:underline}
.diag-tags{display:flex;gap:5px;flex-wrap:wrap}
.due{font-size:11.5px;color:var(--muted)}
.dc{text-align:center}
.danger{color:var(--red)}

/* 迷你条 */
.mini-bar{width:100%;height:6px;background:#F1EAE4;border-radius:3px;overflow:hidden}
.mini-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--amber),var(--orange));border-radius:3px;transition:width .6s}
.mini-bar i.over{background:linear-gradient(90deg,#F87171,var(--red))}
.mini-bar i.ok{background:linear-gradient(90deg,#7CC4A4,var(--teal))}

/* 进度条 */
.sr-bar{height:6px;background:#F1EAE4;border-radius:3px;overflow:hidden}
.sr-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--amber),var(--orange))}

/* ==================== KPI ==================== */
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.kpi{
  background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:15px 17px;
  box-shadow:var(--sh);display:flex;flex-direction:column;gap:3px;position:relative;overflow:hidden;
}
.kpi::after{content:"";position:absolute;right:-18px;top:-18px;width:70px;height:70px;border-radius:50%;background:var(--amber-l);opacity:.5}
.kpi>*{position:relative;z-index:1}
.kpi-l{font-size:12px;color:var(--muted);font-weight:600}
.kpi-v{font-size:23px;font-weight:800;letter-spacing:-.6px;font-variant-numeric:tabular-nums}
.kpi-s{font-size:11.5px;color:var(--muted)}
.big-score{font-size:34px;font-weight:800;letter-spacing:-1px;line-height:1.1}

/* ==================== 弹层 ==================== */
.modal-wrap{position:fixed;inset:0;z-index:100;display:none}
.modal-wrap.show{display:block}
.mask{position:absolute;inset:0;background:rgba(34,26,21,.45);backdrop-filter:blur(2px);animation:fade .18s}
.modal{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 60px);
  background:#fff;border-radius:14px;box-shadow:var(--sh-l);
  display:flex;flex-direction:column;animation:pop .2s cubic-bezier(.2,.9,.3,1.1);
}
.modal.lg{width:min(880px,calc(100vw - 32px))}
.modal.sm{width:min(420px,calc(100vw - 32px))}
.modal-h{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line)}
.modal-h h3{font-size:16px;font-weight:700}
.modal-x{width:28px;height:28px;border-radius:7px;font-size:19px;color:var(--muted);line-height:1}
.modal-x:hover{background:#F1ECE7;color:var(--ink)}
.modal-b{padding:20px;overflow-y:auto;flex:1}
.modal-f{display:flex;justify-content:flex-end;gap:9px;padding:14px 20px;border-top:1px solid var(--line);background:#FDFBF9}
.confirm-txt{font-size:14px;line-height:1.75;color:var(--ink2)}
.confirm-txt b{color:var(--orange-d)}
@keyframes fade{from{opacity:0}}
@keyframes pop{from{opacity:0;transform:translate(-50%,-46%) scale(.96)}}

/* Toast */
.toast-box{position:fixed;top:70px;left:50%;transform:translateX(-50%);z-index:200;pointer-events:none}
.toast{
  display:flex;align-items:center;gap:9px;padding:11px 18px;border-radius:11px;
  background:#fff;box-shadow:var(--sh-l);font-size:13.5px;font-weight:600;
  animation:drop .24s cubic-bezier(.2,.9,.3,1.1);
}
.toast i{width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-style:normal;font-size:12px;font-weight:800;color:#fff}
.t-ok i{background:var(--teal)}.t-warn i{background:var(--amber)}.t-err i{background:var(--red)}.t-info i{background:var(--blue)}
.toast-box:not(.show) .toast{display:none}
@keyframes drop{from{opacity:0;transform:translateY(-14px)}}

/* ==================== 图表 ==================== */
.lc{width:100%;height:190px}
.lc .gl{stroke:#EFE3D9;stroke-width:1}
.lc .gl.warn{stroke:#FCA5A5;stroke-dasharray:4 3}
.lc .gy{fill:var(--muted);font-size:10px;text-anchor:end}
.lc .gx{fill:var(--muted);font-size:10px;text-anchor:middle}
.lc .dot{fill:#fff;stroke:var(--orange);stroke-width:2.4}
.lc .dot.bad{fill:var(--red);stroke:var(--red);r:5.5}

.donut{width:150px;height:150px;margin:0 auto 14px}
.donut-seg{transition:stroke-dasharray .8s,stroke-dashoffset .8s}
.donut-hole{fill:#fff}
.dn-v{fill:var(--ink);font-size:16px;font-weight:800;text-anchor:middle}
.dn-l{fill:var(--muted);font-size:10px;text-anchor:middle}

.legend{list-style:none;display:flex;flex-direction:column;gap:8px;text-align:left;max-width:320px;margin:0 auto}
.legend li{display:flex;align-items:center;gap:8px;font-size:12.5px}
.legend i{width:9px;height:9px;border-radius:3px;flex:0 0 auto}
.legend span{color:var(--ink2);flex:1}
.legend b{font-weight:700;font-variant-numeric:tabular-nums}
.legend em{font-style:normal;color:var(--muted);font-size:11.5px;width:44px;text-align:right}

.cbar{display:flex;align-items:flex-end;justify-content:space-around;gap:14px;height:200px;padding:0 8px}
.cb{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;justify-content:flex-end;gap:0}
.cb-track{width:100%;max-width:56px;flex:1;display:flex;align-items:flex-end;background:#FAF6F2;border-radius:8px 8px 0 0;overflow:hidden}
.cb-track i{display:block;width:100%;border-radius:8px 8px 0 0;animation:grow .8s cubic-bezier(.2,.8,.2,1) backwards}
.cb b{font-size:13.5px;font-weight:800;margin-top:7px;font-variant-numeric:tabular-nums}
.cb span{font-size:11.5px;color:var(--muted)}
@keyframes grow{from{height:0}}

.tr{height:5px;background:#F1EAE4;border-radius:3px;overflow:hidden;margin-top:4px}
.tr-bar{height:100%;background:var(--orange)}
.trend{flex:1}

/* ==================== 业务模块 ==================== */

/* 工作台 */
.todo-list{display:flex;flex-direction:column;gap:11px}
.todo{background:#FDFAF7;border:1px solid var(--line);border-radius:var(--r-s);padding:12px 14px}
.td-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
.td-h b{font-size:13.5px;font-weight:700}
.todo p{font-size:12.5px;color:var(--muted);margin-bottom:7px}
.todo .mini-bar{margin-top:2px}

.alert-list{display:flex;flex-direction:column;gap:9px;max-height:340px;overflow-y:auto}
.alert-list>div{
  display:flex;flex-direction:column;gap:5px;padding:11px 13px;border-radius:var(--r-s);
  background:#FDFAF7;border:1px solid var(--line);border-left:3px solid var(--amber);
}
.alert-list>div:hover{background:#FDF6F0}
.al-main{display:flex;flex-direction:column;gap:4px}
.al-main p{font-size:13px;color:var(--ink2)}
.al-time{font-size:11.5px;color:var(--muted)}
.exec-h{display:flex;gap:7px;flex-wrap:wrap;margin-top:4px}

/* 档案详情 */
.detail-hero{
  display:flex;align-items:center;gap:16px;padding:18px;border-radius:11px;
  background:linear-gradient(135deg,#FDF2EA,#FAF6F2);border:1px solid #F6E3D5;margin-bottom:16px;flex-wrap:wrap;
}
.detail-hero h3{font-size:19px;font-weight:800}
.detail-hero p{font-size:12.5px;color:var(--ink2);margin-top:2px}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.detail-kv{background:#FDFAF7;border:1px solid var(--line);border-radius:var(--r-s);padding:13px 15px}
.detail-kv h4{font-size:13px;font-weight:700;color:var(--orange-d);margin-bottom:8px;display:flex;align-items:center;gap:6px}
.detail-kv li{font-size:13px;color:var(--ink2);padding:4px 0;display:flex;gap:7px}
.detail-kv li::before{content:"·";color:var(--amber);font-weight:800}

.kv{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 18px}
.kv-i{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px dashed var(--line);font-size:13px}
.kv-i span{color:var(--muted);flex:0 0 auto}
.kv-i b{text-align:right;font-weight:600;word-break:break-all}

/* 评估 */
.scale-item{border:1px solid var(--line);border-radius:11px;padding:14px;margin-bottom:12px;background:#FDFAF7}
.scale-item>div:first-child{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;gap:10px}
.scale-item b{font-size:14px;font-weight:700}
.scale-dim{display:flex;flex-direction:column;gap:7px}
.scale-dim label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}
.scale-dim label>span:first-child{color:var(--ink2)}
.pick-list{display:flex;gap:6px;flex-wrap:wrap}
.pick-list button{
  padding:4px 11px;border-radius:7px;border:1px solid var(--line2);background:#fff;
  font-size:12.5px;transition:.14s;
}
.pick-list button:hover{border-color:var(--amber)}
.pick-list button.on{background:var(--orange);color:#fff;border-color:var(--orange);font-weight:600}
.scale-result{display:flex;align-items:center;gap:18px;padding:15px 18px;border-radius:11px;background:linear-gradient(135deg,#FDF2EA,#FAF6F2);border:1px solid #F6E3D5;flex-wrap:wrap}
.sr-score{display:flex;flex-direction:column;line-height:1.15}
.sr-score b{font-size:32px;font-weight:800;color:var(--orange-d)}
.sr-grade{font-size:15px;font-weight:700}
.sr-care{font-size:12.5px;color:var(--muted)}
.sr-info{font-size:12.5px;color:var(--ink2)}
.sr-box{display:flex;flex-direction:column;gap:8px}
.sr-tip{font-size:12px;color:var(--muted);padding:8px 11px;background:#fff;border-radius:8px;border-left:3px solid var(--amber)}
.score-cell{display:flex;align-items:center;gap:8px}
.pick{padding:3px 10px;border-radius:7px;font-size:12px;font-weight:600}

/* 排班 */
.sch th{text-align:center}
.sch td{text-align:center}
.sch-name{text-align:left!important}
.sch-name b{display:block;font-size:13px}
.sch-name small{font-size:11px;color:var(--muted)}
.sch-cell{
  display:flex;flex-direction:column;gap:3px;align-items:center;padding:5px;border-radius:7px;
  cursor:pointer;transition:.14s;min-height:44px;justify-content:center;
}
.sch-cell:hover{background:var(--amber-l)}
.sch-p{font-size:11.5px;padding:2px 7px;border-radius:5px;background:var(--teal-l);color:#2E7D66;font-weight:600}
.sch-empty{font-size:11.5px;color:var(--muted)}

/* 健康 / 体征 */
.vital-row{display:flex;flex-direction:column;gap:9px}
.vital{padding:11px 13px;border-radius:var(--r-s);background:#FDFAF7;border:1px solid var(--line)}
.vital.warn{background:#FFFAF5;border-color:#F6DFCE}
.vt{font-size:11.5px;color:var(--muted);font-weight:600}
.vitems{display:flex;gap:18px;flex-wrap:wrap;margin-top:7px}
.vi{display:flex;flex-direction:column;line-height:1.25;min-width:62px}
.vi span{font-size:11px;color:var(--muted)}
.vi b{font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
.vi small{font-size:10.5px;color:var(--muted)}
.vi.bad b{color:var(--red)}
.vcell{min-width:78px}
.vcell.bad{color:var(--red);font-weight:700}

.med-list{display:flex;flex-direction:column;gap:11px}
.med{display:flex;gap:11px}
.mi{
  width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:800;flex:0 0 auto;margin-top:1px;
}
.mi.ok{background:var(--teal-l);color:#2E7D66}
.mi.err{background:#FDECEC;color:#B91C1C}
.mi.gray{background:#F1ECE7;color:var(--muted)}
.md{flex:1;border-bottom:1px dashed var(--line);padding-bottom:10px}
.md b{font-size:13.5px;font-weight:600;display:block}
.md small{font-size:11.5px;color:var(--muted)}
.md p{font-size:12.5px;margin-top:4px}
.warn-note{color:var(--amber-warn)}
.ev{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
.ev span{font-size:11px;padding:2px 7px;border-radius:5px;background:var(--teal-l);color:#2E7D66;font-weight:600}

.todo-list .todo ul li{font-size:12.5px;color:var(--ink2);padding:3px 0}

/* 通知 */
.notice{
  padding:11px 14px;border-radius:var(--r-s);background:#FEF7EC;border:1px solid #F6E3C9;
  font-size:12.5px;color:var(--amber-warn);
}

/* ==================== 财务 / 合同 / 监管 ==================== */
.price-card{--pc:var(--orange);border-top:3px solid var(--pc)}
.pc-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.pc-head b{font-size:24px;font-weight:800;color:var(--pc);letter-spacing:-.5px}
.pc-head small{font-size:12px;color:var(--muted)}
.pc-list{display:flex;flex-direction:column;gap:6px;margin-bottom:13px}
.pc-list li{font-size:12.5px;color:var(--ink2);padding-left:16px;position:relative}
.pc-list li::before{content:"✓";position:absolute;left:0;color:var(--pc);font-weight:800;font-size:11px}
.pc-total{
  display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:var(--r-s);
  background:#FDFAF7;border:1px dashed var(--line2);margin-bottom:8px;
}
.pc-total span{font-size:11.5px;color:var(--muted)}
.pc-total b{font-size:15px;font-weight:800}
.pc-foot{font-size:12px;color:var(--muted)}
.pc-foot b{color:var(--ink)}

.bill-sheet .bs-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.bill-sheet .bs-head b{font-size:16px;font-weight:700;display:block}
.bill-sheet .bs-head small{font-size:12px;color:var(--muted)}

.tip-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.tip{background:#FDFAF7;border:1px solid var(--line);border-left:3px solid var(--amber);border-radius:var(--r-s);padding:12px 14px}
.tip b{font-size:13.5px;font-weight:700;display:block;margin-bottom:4px}
.tip p{font-size:12.5px;color:var(--muted)}

.ol-list{padding-left:20px;list-style:decimal;display:flex;flex-direction:column;gap:6px}
.ol-list li{font-size:12.5px;color:var(--ink2);line-height:1.7}
.file-list{display:flex;flex-direction:column;gap:7px}
.file-item{display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:8px;background:#FDFAF7;border:1px solid var(--line);font-size:13px}
.file-item>span:nth-child(2){flex:1}
.fi-ico{width:24px;height:24px;border-radius:6px;background:var(--amber-l);color:var(--orange-d);display:inline-flex;align-items:center;justify-content:center;font-size:12px}

/* 报送日历 */
.cal-head,.cal-week{display:grid;grid-template-columns:56px repeat(7,1fr);gap:5px}
.cal-head{margin-bottom:6px}
.cal-head span{text-align:center;font-size:11.5px;color:var(--muted);font-weight:600;padding:4px 0}
.cal-head span:first-child{text-align:left}
.cal-body{display:flex;flex-direction:column;gap:5px}
.cal-week{align-items:stretch}
.cal-week>b{font-size:11.5px;color:var(--muted);display:flex;align-items:center;font-weight:600}
.cal-day{
  border:1px solid var(--line);border-radius:7px;padding:5px 4px;text-align:center;
  background:#FDFAF7;min-height:46px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
}
.cal-day span{font-size:11px;color:var(--ink2);font-variant-numeric:tabular-nums}
.cal-day.on{border-color:var(--orange);background:var(--amber-l)}
.cal-day.on span{color:var(--orange-d);font-weight:700}
.cd-dot{width:5px;height:5px;border-radius:50%;display:block;background:var(--amber)}
.cd-dot.n2{background:var(--orange)}
.cd-dot.n3{background:var(--red)}

.rule-list{display:flex;flex-direction:column;gap:10px}
.rule-i{background:#FDFAF7;border:1px solid var(--line);border-radius:var(--r-s);padding:11px 13px}
.rule-i p{font-size:12.5px;color:var(--muted)}

.switch-list{display:flex;flex-direction:column;gap:13px}
.switch{display:flex;align-items:center;gap:11px;cursor:pointer}
.switch input{display:none}
.sw-track{width:40px;height:22px;border-radius:11px;background:#DED4CC;position:relative;transition:.2s;flex:0 0 auto}
.sw-track i{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.switch input:checked+.sw-track{background:var(--teal)}
.switch input:checked+.sw-track i{left:21px}
.switch>div{display:flex;flex-direction:column;line-height:1.4}
.switch b{font-size:13.5px;font-weight:600}
.switch small{font-size:11.5px;color:var(--muted)}

.data-stat{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.data-stat>div{
  background:#FDFAF7;border:1px solid var(--line);border-radius:var(--r-s);
  padding:11px;text-align:center;display:flex;flex-direction:column;line-height:1.3;
}
.data-stat b{font-size:19px;font-weight:800;color:var(--orange-d)}
.data-stat span{font-size:11.5px;color:var(--muted)}

.report-box h4{font-size:14px;font-weight:700;margin-bottom:10px}

/* ==================== 家属端 ==================== */
.fb-label{font-size:13px;color:var(--muted)}
.fam-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.fh-left{display:flex;align-items:center;gap:15px}
.fh-left h2{font-size:20px;font-weight:800}
.fh-left p{font-size:12.5px;color:var(--ink2)}
.fh-right{display:flex;gap:26px}
.fh-stat{display:flex;flex-direction:column;align-items:center;line-height:1.25}
.fh-stat b{font-size:21px;font-weight:800;font-variant-numeric:tabular-nums}
.fh-stat span{font-size:11.5px;color:var(--muted)}

.chat{display:flex;flex-direction:column;gap:12px;max-height:280px;overflow-y:auto;padding:4px 2px}
.msg{display:flex;gap:9px;max-width:88%}
.msg>div{background:#FDFAF7;border:1px solid var(--line);border-radius:11px;padding:10px 13px}
.msg b{font-size:12px;color:var(--orange-d);display:block;margin-bottom:3px}
.msg p{font-size:13px;color:var(--ink2);line-height:1.65}
.msg small{font-size:10.5px;color:var(--muted);display:block;margin-top:5px}
.msg.to{margin-left:auto;justify-content:flex-end}
.msg.to>div{background:var(--orange);border-color:var(--orange)}
.msg.to b,.msg.to p{color:#fff}
.msg.to small{color:rgba(255,255,255,.75)}
.chat-in{display:flex;gap:8px;margin-top:12px}
.chat-in .inp{flex:1}

/* ==================== 响应式 ==================== */
@media (max-width:1180px){
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-2,.detail-grid,.tip-grid{grid-template-columns:1fr}
  .kv{grid-template-columns:1fr}
}
@media (max-width:900px){
  .sidebar{
    position:fixed;left:0;top:0;z-index:60;transform:translateX(-100%);
    transition:transform .22s;box-shadow:var(--sh-l);
  }
  .app.sb-open .sidebar{transform:translateX(0)}
  .sb-toggle{display:inline-flex}
  .main{padding:16px}
  .tb-user>div,.tb-date{display:none}
  .page-head h2{font-size:18px}
}
@media (max-width:620px){
  .kpi-grid{grid-template-columns:1fr 1fr;gap:10px}
  .kpi{padding:12px 13px}
  .kpi-v{font-size:19px}
  .form-grid{grid-template-columns:1fr}
  .cal-head,.cal-week{grid-template-columns:40px repeat(7,1fr);gap:3px}
  .cal-day{padding:3px 2px;min-height:38px}
  .cal-day span{font-size:10px}
  .fh-right{gap:16px;width:100%;justify-content:space-between}
  .data-stat{grid-template-columns:repeat(2,1fr)}
  .topbar{padding:0 14px}
}

/* ==================== 打印 ==================== */
@media print{
  .sidebar,.topbar,.page-actions,.no-print{display:none!important}
  .main{padding:0;max-width:none}
  .panel{box-shadow:none;border-color:#ddd;break-inside:avoid}
  body{background:#fff}
}
.print-body h2{font-size:20px;font-weight:800;margin-bottom:6px;text-align:center}
.print-body p{margin:10px 0;line-height:1.9}
.print-body .tbl th{background:#f4f4f4!important}
