:root{
  --bg:#f4f6fb;--card:#fff;--text:#111827;--muted:#8b95a7;--line:#e9edf5;
  --blue:#6b7df0;--purple:#7b50c8;--green:#21c182;--red:#ef4444;--orange:#f59e0b;--deepred:#8b0000;
  --shadow:0 18px 45px rgba(31,41,55,.10);--radius:24px;
}
*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",Arial,sans-serif;color:var(--text);background:linear-gradient(135deg,#eef2ff 0%,#f8fafc 100%)}
button,input,select,textarea{font-family:inherit;font-size:15px}button{cursor:pointer;border:0}textarea{resize:vertical}.hide{display:none!important}
.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px}.auth-card{width:min(460px,100%);background:#fff;border-radius:32px;padding:34px;box-shadow:var(--shadow)}.auth-title{text-align:center}.logo-mark{width:58px;height:58px;border-radius:20px;margin:0 auto 14px;background:linear-gradient(135deg,var(--blue),var(--purple));display:grid;place-items:center;color:#fff;font-size:28px;font-weight:800}.logo-mark.small{width:42px;height:42px;border-radius:14px;margin:0}.auth-title h1{margin:0 0 8px}.auth-title p,.page-note{color:var(--muted);margin:0}.role-tabs,.auth-mode-tabs,.seg-tabs{display:flex;gap:10px;background:#f1f3f8;border-radius:18px;padding:6px;margin:22px 0}.role-tab,.mode-tab,.seg-tabs button{flex:1;padding:12px;border-radius:14px;background:transparent;color:#667085;font-weight:700}.role-tab.active,.mode-tab.active,.seg-tabs button.active{background:linear-gradient(135deg,var(--blue),var(--purple));color:#fff;box-shadow:0 10px 20px rgba(107,125,240,.25)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid.one{grid-template-columns:1fr}.form-grid label{font-weight:700;color:#344054}.form-grid input,.form-grid select,.form-grid textarea,.input{width:100%;margin-top:8px;padding:13px 14px;border:1px solid #d9deeb;border-radius:14px;background:#fff;outline:none}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(107,125,240,.12)}.primary-btn,.secondary-btn,.danger-btn,.ghost-btn,.green-btn{border-radius:15px;padding:12px 18px;font-weight:800}.primary-btn{background:linear-gradient(135deg,var(--blue),var(--purple));color:white}.green-btn{background:linear-gradient(135deg,#12b981,#22c55e);color:#fff}.secondary-btn{background:#eef2ff;color:#4f46e5}.danger-btn{background:#fff1f2;color:#ef4444}.ghost-btn{background:#f4f6fb;color:#475467}.wide{width:100%;margin-top:18px}.demo-box{margin-top:18px;padding:14px;border-radius:16px;background:#f8fafc;color:#667085;display:grid;gap:5px;font-size:13px}.demo-box b{color:#101828}
.app-page{display:grid;grid-template-columns:280px 1fr;min-height:100vh}.sidebar{height:100vh;position:sticky;top:0;background:linear-gradient(180deg,#161a32,#1e2548);color:#fff;padding:22px;display:flex;flex-direction:column}.side-head{display:flex;gap:12px;align-items:center;padding-bottom:20px;border-bottom:1px solid rgba(255,255,255,.1)}.side-head h2{margin:0}.side-head p{margin:4px 0 0;color:#adb5cf}#navList{display:grid;gap:8px;margin-top:22px}.nav-item{padding:14px 16px;border-radius:16px;color:#dce2ff;background:transparent;text-align:left;font-weight:800;display:flex;gap:10px;align-items:center}.nav-item.active,.nav-item:hover{background:linear-gradient(135deg,var(--blue),var(--purple));color:#fff}.logout-btn{margin-top:auto;background:rgba(239,68,68,.16);color:#fecaca;border-radius:16px;padding:13px;font-weight:800}.main{padding:30px;min-width:0}.topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:22px}.topbar h1{font-size:34px;margin:0 0 6px}.top-actions{display:flex;gap:10px;flex-wrap:wrap}.grid{display:grid;gap:18px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:#fff;border-radius:var(--radius);padding:22px;box-shadow:var(--shadow);border:1px solid rgba(226,232,240,.8)}.card h3{margin:0 0 16px;font-size:22px}.muted{color:var(--muted)}.divider{height:1px;background:var(--line);margin:18px 0}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.between{display:flex;justify-content:space-between;align-items:center;gap:16px}.bp-slot{padding:20px;border-radius:22px;background:#f8fafc;border:2px solid transparent;cursor:pointer}.bp-slot.normal{border-color:#34c0c8}.bp-slot.high{border-color:#f59e0b}.bp-slot.danger{border-color:#ef4444}.slot-title{display:flex;justify-content:space-between;color:#667085;font-weight:800}.slot-value{font-size:34px;font-weight:900;margin:12px 0 4px}.slot-value span{font-size:15px}.camera-panel{background:linear-gradient(135deg,#f0fdf4,#eef2ff);border-radius:28px;padding:26px;text-align:center}.camera-btn{font-size:18px;padding:18px 34px;border-radius:999px;background:linear-gradient(135deg,#10b981,#22c55e);color:#fff;font-weight:900;box-shadow:0 14px 28px rgba(16,185,129,.25)}.history-link{font-size:17px;padding:16px 24px}.summary-number{font-size:38px;font-weight:900}.summary-label{color:#9aa3b2;margin-top:4px}.pill{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;font-size:13px;font-weight:800;background:#eef2ff;color:#5865f2}.pill.urgent{background:#fee2e2;color:#b91c1c;animation:pulse 1s infinite}.source-tag{background:#f3f0ff;color:#6d5dfc;border-radius:999px;padding:4px 8px;font-size:12px}.chart-wrap{position:relative;height:360px;width:100%;overflow-x:auto;overflow-y:hidden;padding-bottom:8px;scrollbar-color:#c7d2fe #f1f5f9}.chart-canvas{height:340px;display:block;min-width:760px}.chart-toolbar{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin:10px 0}.chart-toolbar button{width:38px;height:38px;border-radius:999px;background:#eef2ff;color:#5b5fef;font-size:22px;font-weight:900}.chart-hint{font-size:13px;color:#98a2b3;margin-right:auto}.legend{display:flex;justify-content:center;gap:18px;color:#667085;margin-top:10px}.dot{width:12px;height:12px;border-radius:50%;display:inline-block;margin-right:6px}.red{color:var(--red)}.light-red{color:#f87171}.deep-red{color:#8b0000}.bp-row{border-top:1px solid var(--line);padding:16px 0;cursor:pointer}.bp-row:first-child{border-top:0}.bp-values{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.metric{background:#f8fafc;border-radius:16px;text-align:center;padding:16px}.metric b{font-size:32px}.metric small{display:block;color:#8b95a7}.record-l2{border:1px solid #fecaca;background:#fff7f7}.record-l2 .metric{background:#fff1f2}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:12px;border-bottom:1px solid var(--line);text-align:left}.patient-card{border:2px solid #dbe2ff;border-radius:22px;padding:18px;background:#fff;box-shadow:var(--shadow)}.patient-card.urgent{border-color:#ef4444;background:#fff7f7;animation:pulse 1s infinite}.avatar{width:54px;height:54px;border-radius:16px;background:linear-gradient(135deg,#7c75ff,#6e43bf);color:white;font-weight:900;display:grid;place-items:center;font-size:24px}.patient-card-head{display:flex;gap:12px;align-items:center}.patient-card h3{margin:0}.patient-meta{color:#667085;margin-top:4px}.info-box{background:#f8fafc;border-radius:16px;padding:12px}.message-box{background:#f7f4ff;border-radius:14px;padding:10px;color:#6d5dfc;cursor:pointer;margin:12px 0}.chat-box{height:420px;overflow:auto;background:#f8fafc;border-radius:18px;padding:16px}.msg{display:flex;margin:10px 0}.msg.me{justify-content:flex-end}.bubble{max-width:72%;padding:12px 14px;border-radius:18px;background:#fff;color:#344054}.msg.me .bubble{background:linear-gradient(135deg,var(--blue),var(--purple));color:#fff}.msg-time-sep{text-align:center;font-size:11px;color:#98a2b3;margin:12px 0 6px}.chat-input{display:flex;gap:10px;margin-top:12px}.chat-input input{flex:1;padding:13px 14px;border:1px solid #d9deeb;border-radius:16px}.modal-mask{position:fixed;inset:0;background:rgba(17,24,39,.45);display:flex;align-items:center;justify-content:center;padding:22px;z-index:50}.modal{background:#fff;border-radius:28px;box-shadow:var(--shadow);width:min(780px,100%);max-height:90vh;overflow:auto;padding:24px}.modal.small{width:min(520px,100%)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.modal-head h2{margin:0}.close-btn{background:#f2f4f7;border-radius:12px;padding:8px 12px}.toast{position:fixed;left:50%;top:22px;transform:translateX(-50%) translateY(-80px);background:#111827;color:#fff;padding:12px 18px;border-radius:14px;z-index:100;transition:.25s;box-shadow:var(--shadow)}.toast.show{transform:translateX(-50%) translateY(0)}.bp-scale{height:18px;border-radius:999px;background:linear-gradient(90deg,#35c0c9 0 25%,#67c23a 25% 50%,#f6c550 50% 75%,#ff6846 75% 100%);margin:16px 0}.notice{padding:14px;border-radius:16px;background:#fffbeb;color:#92400e}.collapsible-head{cursor:pointer}.bottom-actions{display:flex;gap:14px;position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,.4),#fff 45%);padding-top:18px}.bottom-actions button{flex:1}
@keyframes pulse{0%,100%{box-shadow:0 0 0 rgba(239,68,68,.0)}50%{box-shadow:0 0 0 6px rgba(239,68,68,.16)}}
@media(max-width:900px){.app-page{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.main{padding:18px}.grid.two,.grid.three,.grid.four{grid-template-columns:1fr}.topbar{display:block}.top-actions{margin-top:12px}.bp-values{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}}
.daily-toggle.active{background:#fff7ed!important;color:#ea580c!important;border:1px solid #fb923c!important;box-shadow:0 8px 18px rgba(251,146,60,.18)}
.table tbody tr:hover{background:#f8fafc}
.card .notice + .form-grid{margin-top:16px}

.diet-web-card { background: linear-gradient(180deg,#ffffff 0%,#f8fffb 100%); border:1px solid #dcfce7; }
.food-result { margin-top:18px; padding:18px; border-radius:18px; background:#f8fafc; border:1px solid #e5e7eb; }
.food-tags { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.food-tag { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; font-size:13px; font-weight:700; }
.food-tag.bad { background:#fff1f2; color:#e11d48; }
.food-tag.good { background:#f0fdf4; color:#15803d; }
.food-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; margin-top:14px; }
.food-card { border:1px solid #e5e7eb; background:#fff; border-radius:18px; padding:14px; }
.food-card.high { border-color:#fecaca; background:#fff1f2; }
.food-card.medium { border-color:#fde68a; background:#fffbeb; }
.food-card.safe { border-color:#bbf7d0; background:#f0fdf4; }

/* Web diary dashboard layout: large-screen two-column style */
.diary-web-layout{display:grid;grid-template-columns:minmax(320px,0.95fr) minmax(420px,1.15fr);gap:18px;align-items:stretch}.today-slots-card,.diary-right-column{min-height:520px}.today-slots-card{display:flex;flex-direction:column}.today-slots-column{display:grid;gap:14px;flex:1}.today-slots-column .bp-slot{display:flex;flex-direction:column;justify-content:center}.diary-right-column{display:flex;flex-direction:column;gap:18px}.diary-camera-card{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.recent-bp-card{flex:1.05;display:flex;flex-direction:column}.recent-bp-list{
    display:grid;
    gap:10px;
    overflow:hidden;
    padding-right:4px;
    max-height:none;
}.recent-bp-item{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:12px 14px}.recent-bp-item b{font-size:22px}.recent-bp-item.normal{border-left:5px solid #34c0c8}.recent-bp-item.pre{border-left:5px solid #f6c550}.recent-bp-item.l1{border-left:5px solid #ef4444}.recent-bp-item.l2{border-left:5px solid #8b0000;background:#fff7f7}

/* Web settings page */
.settings-web-layout{display:grid;grid-template-columns:300px 1fr;gap:20px;align-items:start}.settings-summary{position:sticky;top:24px}.settings-avatar{width:68px;height:68px;border-radius:22px;font-size:30px;margin-bottom:12px}.summary-line{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #eef2f7}.summary-line:last-child{border-bottom:0}.settings-main .card{overflow:hidden}

@media(max-width:1100px){.diary-web-layout,.settings-web-layout{grid-template-columns:1fr}.today-slots-card,.diary-right-column{min-height:auto}.settings-summary{position:static}}

/* Settings aligned actions */
.settings-action-stack{display:grid;gap:12px;margin-top:8px}.settings-action-stack .wide{margin-top:0}.action-align{display:block;text-align:center}

/* Doctor dashboard clickable grade stats */
.grade-stat-card{cursor:pointer;transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease}.grade-stat-card:hover,.grade-stat-card.active{transform:translateY(-2px);border-color:#c7d2fe;box-shadow:0 20px 48px rgba(79,70,229,.16)}.grade-dot{display:inline-block;width:12px;height:12px;border-radius:999px;margin-right:8px;vertical-align:-1px}.grade-dot.total{background:#64748b}.grade-dot.grade1{background:#facc15}.grade-dot.grade2{background:#fb923c}.grade-dot.grade3{background:#ef4444}

/* Patient diary homepage: desktop dashboard layout aligned to the reference UI */
.diary-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(340px,.9fr) minmax(420px,1.1fr);
  gap:16px;
  align-items:stretch;
}
.diary-main-card{
  min-height:480px;
  display:flex;
  flex-direction:column;
  padding:22px;
}
.diary-main-card .today-slots-column{
  display:grid;
  grid-template-rows:repeat(3,minmax(0,1fr));
  gap:16px;
  flex:1;
  margin-top:16px;
}
.diary-main-card .bp-slot{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:145px;
  border-radius:22px;
  background:linear-gradient(180deg,#fbfcff 0%,#f6f8fc 100%);
}
.diary-side-stack{
  min-height:480px;
  display:grid;
  grid-template-rows:220px 1fr;
  gap:16px;
}
.diary-camera-card{
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#f1fff7 0%,#eef4ff 100%);
}
.diary-camera-card h3,
.diary-food-action-card h3{
  margin-bottom:10px;
}
.diary-food-action-card{
  min-height:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  padding:26px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fffb 100%);
}
.diary-food-actions{
  margin-top:18px;
  gap:16px;
}
.diary-food-action-card #foodResultBox{
  margin-top:8px;
  max-height:330px;
  overflow:auto;
}
.diary-bottom-grid{
  display:grid;
  grid-template-columns:minmax(340px,.9fr) minmax(420px,1.1fr);
  gap:16px;
  align-items:stretch;
  margin-top:16px;
}
.diary-list-card{
  min-height:260px;
  padding:20px 22px;
}
.diary-list-card .between{
  margin-bottom:10px;
}
.diet-records-card .diary-food-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:12px;
}
.diet-records-card .food-card{
  min-height:74px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
@media(max-width:1280px){
  .diary-dashboard-grid,
  .diary-bottom-grid{
    grid-template-columns:1fr;
  }
  .diary-main-card,
  .diary-side-stack{
    min-height:auto;
  }
  .diary-side-stack{
    grid-template-rows:auto auto;
  }
  .diary-main-card .today-slots-column{
    grid-template-rows:auto;
  }
  .diary-main-card .bp-slot{
    min-height:auto;
  }
}

/* Compact diet record list: timestamp auto maps to 早饭 / 午饭 / 晚饭 */
.food-grid{grid-template-columns:1fr;gap:12px}
.food-card.food-log-item{
  border:1px solid #e8edf5;
  background:rgba(255,255,255,.92);
  border-radius:20px;
  padding:14px 16px;
  min-height:88px;
}
.food-card.food-log-item.high{border-color:#fecaca;background:#fff7f7}
.food-card.food-log-item.medium{border-color:#fde7b0;background:#fffdf7}
.food-card.food-log-item.safe{border-color:#d1fae5;background:#fbfffd}
.food-log-content{display:flex;align-items:center;justify-content:space-between;gap:18px}
.food-log-copy{min-width:0;display:grid;gap:6px}
.food-log-name{font-size:17px;font-weight:900;color:#101828;line-height:1.35}
.food-log-time{font-size:13px;color:#7b8798}
.food-log-tags{display:flex;gap:8px;flex-wrap:wrap}
.food-compact-tag{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:900}
.food-compact-tag.good{background:#ecfdf5;color:#15803d}
.food-compact-tag.info{background:#eef2ff;color:#5164e5}
.food-compact-tag.warn{background:#fff7ed;color:#d97706}
.food-log-status{flex:none;padding:9px 14px;border-radius:999px;font-size:13px;font-weight:900;white-space:nowrap}
.food-log-status.safe{background:#e8f7ee;color:#16a34a}
.food-log-status.medium{background:#fff3d8;color:#d97706}
.food-log-status.high{background:#fee2e2;color:#dc2626}
.food-log-status.unknown{background:#f3f4f6;color:#667085}
@media(max-width:760px){
  .food-log-content{align-items:flex-start;flex-direction:column}
}
/* 2026-05-14 auth separation, web polish, red-dot navigation */
.auth-panel{margin-top:20px}.panel-title h3{margin:0 0 6px;font-size:22px}.password-inline{display:flex;gap:10px;align-items:center;margin-top:8px}.password-inline input{margin-top:0!important;flex:1}.mini-btn{padding:10px 12px;white-space:nowrap}.auth-link-btn{margin-top:10px}.nav-red-dot{width:10px;height:10px;border-radius:50%;background:#ef4444;display:inline-block;margin-left:8px;box-shadow:0 0 0 5px rgba(239,68,68,.16);vertical-align:middle}
.main{background:linear-gradient(135deg,#f3f5ff 0%,#f7fbff 48%,#f7fff9 100%)}
.diary-dashboard-grid{align-items:stretch}.diary-camera-card,.diary-food-action-card,.diary-main-card,.diary-list-card{backdrop-filter:blur(8px)}
.food-card.food-log-item{padding:12px 14px;min-height:78px;border-radius:16px}.food-log-name{font-size:16px}.food-log-status{padding:8px 12px}
@media(min-width:1281px){.diary-dashboard-grid{grid-template-columns:minmax(420px,.9fr) minmax(500px,1.1fr)}.diary-bottom-grid{grid-template-columns:minmax(420px,.9fr) minmax(500px,1.1fr)}}
/* 1. 让两个拍照模块高度完全一致 */
.diary-side-stack {
    display: grid;
    grid-template-rows: 1fr 1fr; /* 上下两个模块平分高度 */
    gap: 20px;
    min-height: 560px; /* 可根据需要调整整体高度 */
}

/* 2. 强制两个模块内部内容居中 */
.diary-camera-card,
.diary-food-action-card {
    height: 100%;
    min-height: unset;
    padding: 26px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中 */
    text-align: center; /* 文字居中 */
}

/* 3. 让食物模块的按钮组居中 */
.diary-food-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* 4. 统一两个模块的背景和内边距 */
.diary-camera-card,
.diary-food-action-card {
    background: linear-gradient(135deg,#f1fff7 0%,#eef4ff 100%);
    border: 1px solid rgba(226,232,240,.6);
    box-shadow: var(--shadow);
}
/* 强制删除 AI识别 + 患者确认 标签 */
/* 隐藏饮食拍照模块中“AI识别 / 患者确认”这类小标签，不影响其他页面的风险分级标签 */
.diary-food-action-card > .between .pill,
.diary-food-action-card .food-result > .pill,
#foodResultBox > .pill {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
}
.recent-bp-list .recent-bp-item:nth-child(n+4){
    display:none !important;
}

/* =========================================================
   2026-05 医疗 SaaS 风格网页 UI 重构（基于 4.7）
   目标：白色医生后台、深色选中态、简洁大屏卡片布局
   ========================================================= */
:root{
  --bg:#fbfbfc;
  --card:#ffffff;
  --text:#0a0a0f;
  --muted:#667085;
  --line:#e5e7eb;
  --ink:#050513;
  --pink:#ec1461;
  --blue:#4f7cff;
  --soft:#f7f7f8;
  --soft-2:#f3f4f6;
  --shadow:0 1px 2px rgba(15,23,42,.05),0 10px 30px rgba(15,23,42,.04);
  --radius:18px;
}
body{background:linear-gradient(180deg,#fbfbff 0%,#ffffff 100%);color:var(--text)}
.auth-page{background:linear-gradient(180deg,#eef3ff 0%,#f6f2ff 100%);padding:36px}
.auth-card{width:min(560px,100%);border:1px solid #dfe4ee;border-radius:18px;padding:34px 38px;box-shadow:0 4px 12px rgba(15,23,42,.08);background:#fff}
.auth-title h1{font-size:38px;font-weight:500;letter-spacing:-.03em;color:#111827}
.auth-title p{font-size:16px;margin-top:8px}
.logo-mark{background:var(--pink);width:74px;height:74px;border-radius:999px;font-size:38px;margin-bottom:18px}
.logo-mark.small{background:var(--pink);width:54px;height:54px;border-radius:12px;font-size:28px}
.role-tabs{background:#f5f6f8;border:1px solid #e5e7eb;border-radius:14px;margin:22px 0}
.role-tab.active,.mode-tab.active,.seg-tabs button.active{background:var(--ink);box-shadow:none;color:#fff}
.form-grid input,.form-grid select,.form-grid textarea,.input,.chat-input input{background:#f6f6f7;border-color:#d9dde5;border-radius:12px}
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.input:focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}
.primary-btn{background:var(--ink);border-radius:12px}
.secondary-btn{background:#f4f5f7;color:#111827;border:1px solid #e5e7eb}
.ghost-btn{background:#fff;border:1px solid #e5e7eb;color:#374151}
.green-btn{background:#10b981}
.danger-btn{background:#fff1f2;color:#dc2626}
.demo-box{background:#fff;border-top:1px solid #e5e7eb;border-radius:0;padding:18px 0 0;margin-top:26px}
.app-page{grid-template-columns:286px 1fr;background:#fff}
.sidebar{background:#fff;color:#111827;border-right:1px solid #e5e7eb;padding:30px 18px 18px}
.side-head{border-bottom:1px solid #e5e7eb;padding:0 8px 28px;align-items:center}
.side-head h2{font-size:28px;line-height:1.1;color:#111827;letter-spacing:-.03em}
.side-head p{color:#667085;font-size:14px}
#navList{margin-top:30px;gap:10px}
.nav-item{color:#667085;padding:16px 18px;border-radius:12px;font-size:17px;gap:14px;background:transparent;font-weight:700;display:flex;align-items:center}
.nav-item span{font-size:20px;min-width:20px;display:flex;align-items:center}
.nav-item.active,.nav-item:hover{background:var(--ink);color:#fff}
.sidebar-footer{margin-top:auto;border-top:1px solid #e5e7eb;padding:18px 0 0;display:grid;gap:14px}
.staff-card{display:flex;align-items:center;gap:14px;padding:0 0 4px}
.staff-avatar{width:46px;height:46px;border-radius:999px;background:#4f7cff;color:#fff;font-size:20px;font-weight:900;display:grid;place-items:center}
.staff-copy{display:grid;gap:2px}
.staff-copy strong{font-size:17px}
.staff-copy span{font-size:13px;color:#667085}
.logout-btn{margin-top:0;background:#fff;border:1px solid #e5e7eb;color:#111827;border-radius:12px;padding:12px 14px;font-size:15px}
.main{padding:0;background:#fff}
.workspace-topbar{height:72px;border-bottom:1px solid #e5e7eb;padding:12px 28px;display:flex;align-items:center;gap:18px;justify-content:flex-start;background:#fff}
.global-search{width:min(760px,calc(100vw - 470px));height:48px;border-radius:12px;background:#f5f5f6;border:1px solid #e5e7eb;display:flex;align-items:center;gap:12px;padding:0 16px;color:#667085;font-size:17px;position:relative}
.global-search:focus-within{background:#fff;border-color:var(--ink);box-shadow:0 0 0 3px rgba(79,124,255,.12)}
.search-icon{font-size:18px;flex-shrink:0}
.global-search-input{flex:1;border:0;outline:none;background:transparent;font-size:16px;color:#111827;font-family:inherit}
.global-search-input::placeholder{color:#9ca3af}
.search-dropdown{position:absolute;top:52px;left:0;right:0;background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.12);max-height:420px;overflow-y:auto;z-index:200;padding:8px}
.search-dropdown.hide{display:none}
.search-group-title{font-size:13px;font-weight:700;color:#9ca3af;padding:10px 12px 4px;text-transform:uppercase;letter-spacing:.04em}
.search-result-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;cursor:pointer}
.search-result-item:hover{background:#f3f4f6}
.search-result-icon{font-size:18px;flex-shrink:0}
.search-result-copy{display:grid;gap:2px;min-width:0}
.search-result-copy b{font-size:15px;color:#111827}
.search-result-copy span{font-size:13px;color:#667085;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.search-result-copy small{font-size:12px;color:#9ca3af}
.search-dropdown-empty{padding:18px;text-align:center;color:#9ca3af;font-size:14px}
.bell-btn{width:48px;height:48px;border-radius:999px;background:#fff;color:#667085;position:relative;font-size:22px;display:grid;place-items:center}
.bell-btn i{position:absolute;width:10px;height:10px;background:#ef4444;border-radius:999px;top:8px;right:8px;border:2px solid #fff}
.page-shell{padding:28px 28px 40px}
.topbar{margin-bottom:26px;align-items:flex-start;position:sticky;top:0;z-index:10;background:#fff;padding:12px 20px;border-radius:14px;border:1.5px solid #e5e7eb;box-shadow:none}
.topbar h1{font-size:38px;line-height:1.1;letter-spacing:-.04em;color:#0b0b12}
.topbar p{font-size:16px;color:#667085}
.top-actions .secondary-btn,.top-actions .primary-btn{height:44px;display:inline-flex;align-items:center}
.card{border-radius:14px;border:1px solid #e5e7eb;box-shadow:var(--shadow);padding:22px;background:#fff}
.card h3{font-size:22px;letter-spacing:-.02em}
.grid{gap:18px}
.summary-number{font-size:38px;line-height:1.05;color:#111827}
.summary-label{font-size:14px;color:#667085}
.pill{background:#eef2ff;color:#334155;border-radius:999px;padding:4px 10px;font-size:12px}
.pill.urgent{background:#fee2e2;color:#b91c1c}
.notice{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.bp-slot,.metric,.info-box,.food-result{background:#f8fafc;border-color:#e5e7eb}
.patient-card{border:1px solid #e5e7eb;border-radius:14px;box-shadow:none;padding:16px;transition:.18s ease;background:#fff}
.patient-card:hover{transform:translateY(-1px);border-color:#111827;box-shadow:0 8px 22px rgba(15,23,42,.08)}
.patient-card.urgent{background:#fff7f7;border-color:#fca5a5}
.avatar{width:46px;height:46px;border-radius:999px;background:#4f7cff;font-size:19px}
.patient-card h3{font-size:18px}
.patient-meta{font-size:13px}
.message-box{background:#f7f7f8;color:#374151;border:1px solid #e5e7eb}
.chat-box{height:420px;overflow:auto;background:#fff;border:1px solid #e5e7eb;border-radius:14px}
.bubble{background:#f3f4f6;color:#111827;border-radius:12px}
.msg.me .bubble{background:var(--ink);color:#fff}
.chart-wrap{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:12px}
.chart-toolbar button{background:#f5f5f6;color:#111827;border:1px solid #e5e7eb}
.table th{color:#667085;font-weight:700}
.doctor-manage-shell{display:grid;grid-template-columns:minmax(340px,380px) 1fr;gap:22px;align-items:start}
.patient-list-panel{padding:20px}
.patient-stack{display:grid;grid-template-columns:1fr;gap:12px;margin-top:16px}
.patient-detail-empty{min-height:160px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:36px}
.patient-detail-empty h3{margin:8px 0 8px;font-size:22px;font-weight:700}
.empty-kicker{font-size:13px;color:#667085;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.grade-stat-card{border-radius:14px;box-shadow:none}
.grade-stat-card:hover,.grade-stat-card.active{border-color:#111827;box-shadow:0 10px 24px rgba(15,23,42,.06);transform:translateY(-1px)}
.bottom-actions{background:linear-gradient(180deg,rgba(255,255,255,.3),#fff 40%)}
@media(max-width:1180px){
  .doctor-manage-shell{grid-template-columns:1fr}
  .global-search{width:100%}
}
@media(max-width:900px){
  .app-page{grid-template-columns:1fr}
  .sidebar{height:auto;position:relative}
  .workspace-topbar{padding:12px 18px}
  .global-search{width:100%}
  .page-shell{padding:18px}
  .topbar h1{font-size:30px}
}


/* 2026-05-19 doctor SaaS dashboard strict layout */
.workspace-topbar{height:72px;display:flex;align-items:center;gap:28px;border-bottom:1px solid #edf0f4;padding:0 26px;background:#fff;position:sticky;top:0;z-index:15}.global-search{width:min(720px,66vw);height:46px;border:1px solid #dde2ea;background:#f5f6f8;border-radius:12px;display:flex;align-items:center;gap:14px;padding:0 18px;color:#667085;font-size:16px}.bell-btn{width:42px;height:42px;background:transparent;position:relative;color:#475467;font-size:20px}.bell-btn i{position:absolute;width:10px;height:10px;border-radius:50%;background:#ef4444;top:9px;right:8px}.page-shell{padding:28px 28px 48px}.topbar{margin-bottom:24px}.topbar h1{font-size:34px;line-height:1.15}.topbar p{font-size:16px}.sidebar{background:#fff;color:#111827;border-right:1px solid #edf0f4;padding:20px 18px;width:280px}.side-head{border-bottom:1px solid #edf0f4;padding:10px 0 26px}.side-head h2{font-size:26px;color:#0f172a;font-weight:700;letter-spacing:-.02em}.side-head p{color:#667085}.logo-mark{background:linear-gradient(135deg,#ff1d63,#e50054)}.nav-item{color:#667085;background:#fff;border-radius:14px;font-size:16px;padding:16px 18px}.nav-item.active,.nav-item:hover{background:#040414;color:#fff;box-shadow:none}.sidebar-footer{border-top:1px solid #edf0f4;padding-top:18px}.staff-card{display:flex;align-items:center;gap:12px;margin-bottom:12px}.staff-avatar{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#486cff;color:#fff;font-size:20px;font-weight:800}.staff-copy{display:grid;gap:3px}.staff-copy span{color:#667085;font-size:13px}.logout-btn{width:100%;border:1px solid #e5e7eb;background:#fff;color:#111827}.main{background:#fff;padding:0;min-height:100vh}.card,.dashboard-card{border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 2px 8px rgba(15,23,42,.06);background:#fff}.overview-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.overview-stat-card{height:168px;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 2px 8px rgba(15,23,42,.06);background:#fff;padding:24px 26px;display:flex;align-items:flex-start;justify-content:space-between}.stat-copy{display:grid;gap:12px}.stat-copy span{font-size:15px;color:#111827}.stat-copy b{font-size:32px}.stat-copy small{color:#667085;font-size:14px}.danger-number{color:#dc2626}.warn-number{color:#d98a00}.ok-number{color:#059669}.stat-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-style:normal;font-size:21px;font-weight:900}.stat-icon.blue{color:#2563eb;background:#eaf2ff}.stat-icon.red{color:#ef4444;background:#ffe8e8}.stat-icon.yellow{color:#d98a00;background:#fff6cf}.stat-icon.green{color:#16a34a;background:#e6fbef}.overview-chart-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-top:18px}.overview-chart-grid .dashboard-card{display:flex;flex-direction:column}.dashboard-card{padding:24px}.dashboard-card h3{font-size:22px;margin:0 0 18px}.dashboard-canvas-wrap{height:320px}.overview-chart-grid .dashboard-canvas-wrap{flex:1;min-height:0;height:auto}.dashboard-canvas-wrap canvas{display:block;width:100%;height:100%}.recent-monitor-card{display:flex;flex-direction:column}.recent-monitor-card .recent-monitor-list{flex:1;min-height:0;overflow-y:auto}.ghost-link{border:0;background:transparent;color:#111827;font-size:15px;font-weight:700}.recent-monitor-list{display:grid;gap:14px}.recent-monitor-item{display:grid;grid-template-columns:50px 1fr auto auto;gap:16px;align-items:center;border:1px solid #eef1f5;border-radius:14px;padding:16px 18px;cursor:pointer}.recent-monitor-item:hover{background:#fafbff}.small-avatar{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#4f7cff;color:#fff;font-weight:800;font-size:20px}.monitor-copy{display:grid;gap:4px}.monitor-copy span,.monitor-value small{font-size:13px;color:#667085}.monitor-value{display:grid;gap:4px;text-align:right}.monitor-value strong{font-size:20px}.risk-chip{display:inline-flex;align-items:center;justify-content:center;min-width:56px;padding:6px 10px;border-radius:999px;font-size:13px;font-style:normal;font-weight:800}.risk-chip.normal{background:#dcfce7;color:#15803d}.risk-chip.mild{background:#fff4cf;color:#b77900}.risk-chip.warn{background:#fee2e2;color:#ef4444}.risk-chip.danger{background:#ffd7d7;color:#dc2626}.patient-management-layout{display:grid;grid-template-columns:430px 1fr;gap:28px;align-items:start}.patient-directory{min-height:680px}.patient-directory-head h3{margin:0}.patient-searchbox{height:54px;border:1px solid #e1e5ee;background:#f5f6f8;border-radius:12px;display:flex;align-items:center;gap:12px;padding:0 16px;margin:18px 0}.patient-searchbox input{border:0;background:transparent;width:100%;outline:0;color:#111827;font-size:15px}.pending-strip{padding:10px 12px;border-radius:10px;background:#fff7ed;color:#c2410c;font-size:14px;margin-bottom:12px}.doctor-patient-list{display:grid;gap:12px}.doctor-patient-item{display:grid;grid-template-columns:48px 1fr auto;gap:14px;align-items:center;border:1px solid #e5e7eb;border-radius:14px;padding:15px 16px;cursor:pointer;background:#fff}.doctor-patient-item.active{background:#eef0f4;border-color:#d5d9e2;box-shadow:inset 4px 0 0 #050513}.doctor-patient-item:hover{background:#f8fafc}.patient-item-copy{display:grid;gap:4px}.patient-item-copy b{font-size:18px}.patient-item-copy span,.patient-item-copy small{color:#667085}.doctor-patient-pane{min-height:680px;padding:0;border:0;box-shadow:none;background:transparent;display:grid;gap:18px}.patient-empty-state{height:148px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;display:flex;align-items:flex-start;justify-content:center;padding-top:14px;color:#667085;box-shadow:0 2px 8px rgba(15,23,42,.06)}.patient-info-card{border:1px solid #e5e7eb;border-radius:16px;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.06);padding:24px}.patient-info-card h3{margin:0 0 22px;font-size:22px}.patient-info-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px}.patient-info-grid span{display:block;color:#667085;margin-bottom:8px}.patient-info-grid b{font-size:18px}.detail-switch{display:grid;grid-template-columns:1fr 1fr;gap:10px}.detail-switch button{height:48px;border:1px solid #e5e7eb;background:#fff;border-radius:12px;font-weight:800;font-size:16px}.detail-switch button.active{background:#050513;color:#fff}.embedded-card{padding:24px}.patient-vitals-wrap{height:340px}.compact-legend{justify-content:center}.compact-measure-list{display:grid;gap:12px}.compact-measure{display:grid;grid-template-columns:1fr auto auto;gap:16px;align-items:center;border:1px solid #eef1f5;border-radius:14px;padding:16px 18px}.compact-measure div{display:grid;gap:4px}.compact-measure span{color:#667085}.compact-measure strong{font-size:20px}.message-layout{display:grid;grid-template-columns:440px 1fr;gap:28px;height:calc(100vh - 240px);min-height:0}.message-list-pane{padding:24px;display:flex;flex-direction:column;overflow:hidden}.conversation-list{display:grid;gap:6px;margin-top:18px;flex:1;overflow:auto;align-content:start}.conversation-item{position:relative;display:grid;grid-template-columns:48px 1fr 14px;gap:14px;align-items:start;padding:16px 18px;border-left:4px solid transparent;cursor:pointer}.conversation-item.active{background:#eef0f4;border-left-color:#050513}.conversation-copy{display:grid;gap:4px}.conversation-copy b{font-size:18px}.conversation-copy span,.conversation-copy p,.conversation-copy small{margin:0;color:#667085}.conversation-copy p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}.unread-dot{width:10px;height:10px;border-radius:50%;background:#050513;display:block;margin-top:16px}.chat-pane{display:flex;flex-direction:column;padding:0;overflow:hidden}.conversation-head{display:flex;align-items:center;gap:14px;padding:16px 28px;border-bottom:1px solid #e5e7eb;background:#fafbfc}.conversation-head div{display:grid;gap:4px}.conversation-head span{color:#667085;font-size:14px}.conversation-head i{margin-left:auto;font-style:normal;font-size:24px;color:#9ca3af}.medical-chat{flex:1;min-height:0;overflow:auto;border-radius:0;background:#fff;padding:22px 28px}.medical-chat-input{padding:18px 28px;border-top:1px solid #edf0f4;margin-top:0}.medical-chat-input input{background:#f5f6f8}.attach{font-size:20px}.send-pill{width:56px;border-radius:14px;background:#8b8f9a;color:#fff;font-size:20px}.chat-security{text-align:center;color:#98a2b3;font-size:13px;margin:0 0 12px}.monitor-table{display:grid;gap:12px}.monitor-row{display:grid;grid-template-columns:1fr auto auto;gap:18px;align-items:center;border:1px solid #eef1f5;border-radius:14px;padding:18px;cursor:pointer}.monitor-row div{display:grid;gap:4px}.monitor-row span{color:#667085}.settings-simple-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0}.settings-simple-grid div{border:1px solid #eef1f5;border-radius:14px;padding:18px;display:grid;gap:8px}.settings-simple-grid span{color:#667085}.settings-simple-grid b{font-size:18px}
@media(max-width:1280px){.overview-stat-grid{grid-template-columns:repeat(2,1fr)}.overview-chart-grid,.patient-management-layout,.message-layout{grid-template-columns:1fr}.patient-directory{min-height:auto}.doctor-patient-pane{min-height:auto}.patient-info-grid{grid-template-columns:repeat(2,1fr)}.workspace-topbar{position:relative}.dashboard-canvas-wrap{overflow-x:auto}.global-search{width:100%}}

/* --- 患者概览血压折线图卡片 --- */
.patient-chart-card{display:flex;flex-direction:column}
.patient-chart-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.patient-chart-nav h3{font-size:20px;font-weight:700;color:#111827;margin:0;text-align:center;min-width:200px}
.chart-nav-btn{width:40px;height:40px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;color:#374151;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .18s ease;flex-shrink:0}
.chart-nav-btn:hover{background:#f0f4ff;border-color:#2563eb;color:#2563eb;box-shadow:0 2px 8px rgba(37,99,235,.12)}
.chart-nav-btn:active{transform:scale(.95)}
.patient-chart-card .chart-wrap{flex:1;min-height:240px}
.patient-chart-card .chart-canvas{display:block;width:100%!important;height:240px!important}

/* --- 底部最近监测记录横条 --- */
.recent-bar-card{padding:24px}
.recent-monitor-bar{display:flex;gap:16px;overflow-x:auto;padding:4px 0;scroll-behavior:smooth}
.recent-monitor-bar .recent-monitor-item{flex:0 0 340px;display:grid;grid-template-columns:50px 1fr auto auto;gap:16px;align-items:center;border:1px solid #eef1f5;border-radius:14px;padding:16px 18px;cursor:pointer}
.recent-monitor-bar .recent-monitor-item:hover{background:#fafbff}
.recent-monitor-bar::-webkit-scrollbar{height:6px}
.recent-monitor-bar::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:999px}

/* =========================================================
   2026-05-20 现代医疗 SaaS 蓝色视觉主题
   仅统一颜色、质感与组件状态；不改变页面结构与业务逻辑
   ========================================================= */
:root{
  --bg:#f7f9fc;
  --card:#ffffff;
  --text:#111827;
  --muted:#667085;
  --line:#e5eaf2;
  --blue:#2563eb;
  --blue-strong:#1d4ed8;
  --blue-deep:#1746b8;
  --blue-soft:#eaf2ff;
  --blue-soft-2:#f4f8ff;
  --blue-border:#cfe0ff;
  --purple:#2563eb;
  --ink:#2563eb;
  --soft:#f7f9fc;
  --soft-2:#f2f5f9;
  --green:#12b76a;
  --red:#ef4444;
  --orange:#f59e0b;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.06);
  --shadow-hover:0 1px 2px rgba(16,24,40,.05),0 14px 34px rgba(37,99,235,.10);
  --radius:16px;
}
html{background:var(--bg)}
body{
  color:var(--text);
  background:linear-gradient(180deg,#f8fbff 0%,#f7f9fc 100%);
}
button,
input,
select,
textarea{
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease,color .18s ease,transform .18s ease;
}

/* 登录 / 注册：蓝色医疗 SaaS 氛围 */
.auth-page{
  background:
    radial-gradient(circle at 14% 10%,rgba(37,99,235,.16),transparent 34%),
    radial-gradient(circle at 88% 86%,rgba(96,165,250,.18),transparent 31%),
    linear-gradient(180deg,#f4f8ff 0%,#f8fbff 100%);
}
.auth-card{
  border:1px solid rgba(207,224,255,.92);
  background:rgba(255,255,255,.96);
  box-shadow:0 24px 60px rgba(37,99,235,.12),0 2px 10px rgba(15,23,42,.05);
}
.logo-mark,
.logo-mark.small{
  background:linear-gradient(135deg,#3b82f6 0%,#2563eb 60%,#1d4ed8 100%);
  box-shadow:0 14px 30px rgba(37,99,235,.22);
}
.auth-title h1,
.side-head h2{
  color:#0f172a;
}
.auth-title p,
.page-note{
  color:var(--muted);
}
.role-tabs,
.auth-mode-tabs,
.seg-tabs{
  background:#f3f6fb;
  border:1px solid #e5eaf2;
}
.role-tab,
.mode-tab,
.seg-tabs button{
  color:#667085;
}
.role-tab.active,
.mode-tab.active,
.seg-tabs button.active{
  color:#fff;
  background:linear-gradient(135deg,#3b82f6 0%,#2563eb 100%);
  box-shadow:0 10px 22px rgba(37,99,235,.20);
}
.form-grid label{
  color:#344054;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.input,
.chat-input input,
.medical-chat-input input{
  background:#f6f8fc;
  border:1px solid #dbe4f0;
  color:#111827;
}
.form-grid input:hover,
.form-grid select:hover,
.form-grid textarea:hover,
.input:hover,
.chat-input input:hover,
.medical-chat-input input:hover{
  border-color:#bfd4fb;
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.input:focus,
.chat-input input:focus,
.medical-chat-input input:focus,
.patient-searchbox:focus-within,
.global-search:focus-within{
  border-color:var(--blue);
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
  background:#fff;
}
.primary-btn,
.camera-btn,
.send-pill{
  background:linear-gradient(135deg,#3b82f6 0%,#2563eb 100%);
  color:#fff;
  box-shadow:0 10px 22px rgba(37,99,235,.18);
}
.primary-btn:hover,
.camera-btn:hover,
.send-pill:hover{
  background:linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%);
  box-shadow:0 14px 28px rgba(37,99,235,.22);
  transform:translateY(-1px);
}
.secondary-btn{
  background:var(--blue-soft);
  color:var(--blue-strong);
  border:1px solid var(--blue-border);
}
.secondary-btn:hover{
  background:#dfeaff;
  border-color:#b8d0ff;
}
.ghost-btn,
.close-btn,
.logout-btn{
  background:#fff;
  border:1px solid #dbe4f0;
  color:#475467;
}
.ghost-btn:hover,
.close-btn:hover,
.logout-btn:hover{
  background:#f8fbff;
  border-color:#bfd4fb;
  color:var(--blue-strong);
}
.danger-btn{
  background:#fff1f2;
  color:#dc2626;
  border:1px solid #fecdd3;
}
.danger-btn:hover{
  background:#ffe4e6;
  border-color:#fda4af;
}
.green-btn{
  background:linear-gradient(135deg,#22c55e,#12b76a);
  box-shadow:0 10px 22px rgba(18,183,106,.16);
}
.demo-box{
  background:#f7faff;
  border:1px solid #e5efff;
  color:#667085;
  border-radius:14px;
  padding:16px;
}

/* 桌面后台骨架 */
.app-page{
  background:var(--bg);
}
.sidebar{
  background:#fff;
  color:#111827;
  border-right:1px solid var(--line);
}
.side-head{
  border-bottom:1px solid var(--line);
}
.side-head p,
.staff-copy span{
  color:#667085;
}
.side-tagline{
  font-size:13px;
  color:#94a3b8;
  letter-spacing:.05em;
  margin-bottom:4px;
}
#navList{
  gap:8px;
}
.nav-item{
  background:transparent;
  color:#475467;
  border:1px solid transparent;
}
.nav-item:hover{
  background:#f4f8ff;
  color:var(--blue-strong);
  border-color:#e2ecff;
}
.nav-item.active,
.nav-item.active:hover{
  background:var(--blue-soft);
  color:var(--blue);
  border-color:#d7e6ff;
  box-shadow:none;
}
.staff-avatar,
.avatar,
.small-avatar{
  background:linear-gradient(135deg,#60a5fa 0%,#2563eb 100%);
  color:#fff;
  box-shadow:0 10px 20px rgba(37,99,235,.14);
}
.sidebar-footer{
  border-top:1px solid var(--line);
}
.main{
  background:var(--bg);
}
.workspace-topbar{
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(12px);
}
.global-search,
.patient-searchbox{
  background:#f3f5f9;
  border-color:#e2e8f0;
  color:#667085;
}
.global-search-input,
.patient-searchbox input{
  color:#111827;
}
.global-search-input::placeholder,
.patient-searchbox input::placeholder,
.chat-input input::placeholder,
.medical-chat-input input::placeholder{
  color:#98a2b3;
}
.bell-btn{
  color:#344054;
  border:1px solid transparent;
}
.bell-btn:hover{
  background:#f4f8ff;
  border-color:#e2ecff;
  color:var(--blue);
}
.bell-btn i{
  background:#f04438;
  box-shadow:0 0 0 2px #fff;
}
.page-shell{
  background:transparent;
}
.topbar h1{
  color:#0f172a;
}
.topbar p{
  color:#667085;
}

/* 卡片、信息块、列表统一质感 */
.card,
.dashboard-card,
.overview-stat-card,
.patient-empty-state,
.patient-info-card,
.food-card,
.settings-simple-grid div,
.bp-slot,
.metric,
.info-box,
.food-result{
  background:#fff;
  border-color:var(--line);
  box-shadow:var(--shadow);
}
.card,
.dashboard-card,
.overview-stat-card,
.patient-empty-state,
.patient-info-card{
  border-radius:16px;
}
.overview-stat-card{cursor:pointer}
.card:hover,
.dashboard-card:hover,
.overview-stat-card:hover,
.patient-info-card:hover{
  box-shadow:var(--shadow-hover);
}
.divider,
.table th,
.table td{
  border-color:var(--line);
}
.summary-label,
.patient-item-copy span,
.patient-item-copy small,
.monitor-copy span,
.monitor-value small,
.compact-measure span,
.monitor-row span,
.settings-simple-grid span,
.conversation-copy span,
.conversation-copy p,
.conversation-copy small,
.chat-security{
  color:#667085;
}
.summary-number,
.stat-copy b,
.monitor-value strong,
.compact-measure strong,
.settings-simple-grid b{
  color:#0f172a;
}
.ghost-link{
  color:var(--blue);
}
.ghost-link:hover{
  color:var(--blue-strong);
}
.conv-more-btn{
  font-style:normal;
  font-size:20px;
  color:#98a2b3;
  cursor:pointer;
  padding:4px 8px;
  border-radius:8px;
  transition:background .15s, color .15s;
  line-height:1;
}
.conv-more-btn:hover{
  background:#f0f2f5;
  color:#475467;
}
.pill,
.source-tag{
  background:var(--blue-soft);
  color:var(--blue-strong);
  border:1px solid #dbe9ff;
}
.pill.urgent{
  background:#fee2e2;
  color:#b91c1c;
  border-color:#fecaca;
}
.notice,
.pending-strip{
  background:#fff7ed;
  color:#b45309;
  border:1px solid #fed7aa;
  cursor:pointer;
  transition:background .2s;
}
.pending-strip:hover{
  background:#ffedd5;
}

/* 患者、监测、消息列表 */
.patient-card,
.doctor-patient-item,
.recent-monitor-item,
.compact-measure,
.monitor-row{
  background:#fff;
  border-color:var(--line);
}
.patient-card:hover,
.doctor-patient-item:hover,
.recent-monitor-item:hover,
.compact-measure:hover,
.monitor-row:hover{
  background:#f8fbff;
  border-color:#cfe0ff;
  box-shadow:0 10px 24px rgba(37,99,235,.08);
}
.doctor-patient-item.active{
  background:var(--blue-soft);
  border-color:#cfe0ff;
  box-shadow:inset 4px 0 0 var(--blue);
}
.patient-card.urgent{
  background:#fff7f7;
  border-color:#fca5a5;
}
.detail-switch button{
  background:#fff;
  color:#475467;
  border-color:#dbe4f0;
}
.detail-switch button:hover{
  background:#f4f8ff;
  color:var(--blue);
  border-color:#cfe0ff;
}
.detail-switch button.active{
  background:linear-gradient(135deg,#3b82f6,#2563eb);
  color:#fff;
  border-color:#2563eb;
  box-shadow:0 10px 20px rgba(37,99,235,.16);
}
.conversation-item{
  border:1.5px solid #e5e7eb;
  border-radius:14px;
  margin-bottom:8px;
  box-shadow:0 1px 3px rgba(15,23,42,.04);
  padding:14px 16px;
  grid-template-columns:48px 1fr auto;
}
.conversation-item:hover{
  background:#f8fbff;
  border-color:#c7cdd8;
  box-shadow:0 2px 8px rgba(15,23,42,.08);
}
.conversation-item.active{
  background:var(--blue-soft);
  border-color:var(--blue);
  box-shadow:0 2px 10px rgba(37,99,235,.12);
}
.unread-badge{
  min-width:22px;
  height:22px;
  border-radius:11px;
  background:#ef4444;
  color:#fff;
  font-size:12px;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 6px;
  margin-top:14px;
  line-height:1;
  box-shadow:0 0 0 3px rgba(239,68,68,.18);
}
.nav-item.has-unread{
  background:#fef2f2;
}
.nav-item.has-unread:hover{
  background:#fee2e2;
}
@keyframes msgPulse{
  0%,100%{ background:#fef2f2; }
  50%{ background:#fff; }
}
.nav-item.msg-flash{
  animation:msgPulse .8s ease-in-out 6;
  background:#fef2f2;
}
.nav-item.msg-flash:hover{
  background:#fee2e2;
}
.conversation-head{
  background:#fbfcff;
  border-bottom-color:var(--line);
}
.message-box{
  background:var(--blue-soft-2);
  color:var(--blue-strong);
  border:1px solid #dbe9ff;
}
.chat-box,
.medical-chat{
  background:#fff;
  border-color:var(--line);
}
.bubble{
  background:#f2f4f7;
  color:#344054;
  border:1px solid #eaecf0;
}
.msg.me .bubble{
  background:linear-gradient(135deg,#3b82f6 0%,#2563eb 100%);
  color:#fff;
  border-color:#2563eb;
}
.medical-chat-input{
  border-top-color:var(--line);
  background:#fff;
}
.attach{
  color:#667085;
}
.send-pill{
  border:0;
}

/* 图表与业务状态 */
.chart-wrap,
.dashboard-canvas-wrap{
  background:#fff;
  border-color:var(--line);
}
.chart-toolbar button{
  background:#f4f8ff;
  color:var(--blue);
  border:1px solid #dbe9ff;
}
.chart-toolbar button:hover{
  background:var(--blue-soft);
  border-color:#bfd4fb;
}
.stat-icon.blue{
  color:var(--blue);
  background:var(--blue-soft);
}
.stat-icon.red{
  color:#ef4444;
  background:#fff1f2;
}
.stat-icon.yellow{
  color:#d97706;
  background:#fff7ed;
}
.stat-icon.green{
  color:#16a34a;
  background:#ecfdf3;
}
.risk-chip.normal{
  background:#ecfdf3;
  color:#15803d;
}
.risk-chip.mild{
  background:#fff7ed;
  color:#b45309;
}
.risk-chip.warn{
  background:#fff1f2;
  color:#dc2626;
}
.risk-chip.danger{
  background:#ffe4e6;
  color:#b91c1c;
}
.bp-slot.normal{
  border-color:#86efac;
}
.bp-slot.high{
  border-color:#fcd34d;
}
.bp-slot.danger{
  border-color:#fda4af;
}
.camera-panel,
.diary-camera-card,
.diary-food-action-card{
  background:linear-gradient(135deg,#f4f8ff 0%,#eef5ff 100%);
  border:1px solid #dbe9ff;
}
.food-card.high{
  background:#fff1f2;
  border-color:#fecdd3;
}
.food-card.medium{
  background:#fff7ed;
  border-color:#fed7aa;
}
.food-card.safe{
  background:#ecfdf3;
  border-color:#bbf7d0;
}

/* 弹窗、搜索下拉、提示 */
.search-dropdown{
  background:#fff;
  border-color:#dbe4f0;
  box-shadow:0 18px 42px rgba(15,23,42,.12);
}
.search-result-item:hover{
  background:#f4f8ff;
}
.modal-mask{
  background:rgba(15,23,42,.38);
  backdrop-filter:blur(4px);
}
.modal{
  border:1px solid #e5eaf2;
  border-radius:20px;
  box-shadow:0 28px 72px rgba(15,23,42,.22);
}
.modal-head h2{
  color:#0f172a;
}
.toast{
  background:#0f172a;
  color:#fff;
  box-shadow:0 18px 36px rgba(15,23,42,.22);
}
.table tbody tr:hover{
  background:#f8fbff;
}

/* 细节修正：让主要标题、选中态更接近示例图片 */
.card h3,
.dashboard-card h3,
.patient-info-card h3{
  color:#111827;
}
.nav-red-dot{
  background:#ef4444;
}
.bottom-actions{
  background:linear-gradient(180deg,rgba(247,249,252,.42),#f7f9fc 42%);
}
@media(max-width:900px){
  .main{background:var(--bg)}
}

/* 患者管理 v2 — 横向卡片布局 */
.patient-management-v2{
  display:flex;
  flex-direction:column;
}
.doctor-patient-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:18px;
}
.doctor-patient-card{
  display:flex;
  align-items:center;
  gap:20px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:14px 22px;
  cursor:pointer;
  background:#fff;
  transition:box-shadow .2s, border-color .2s;
}
.doctor-patient-card:hover{
  background:#f8fafc;
  border-color:#cfe0ff;
  box-shadow:0 4px 12px rgba(37,99,235,.06);
}
.doctor-patient-card.active{
  background:#eef0f4;
  border-color:#d5d9e2;
  box-shadow:inset 4px 0 0 #050513;
}
.patient-card-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:130px;
}
.patient-card-copy b{
  font-size:16px;
  color:#1d2939;
}
.patient-card-copy span{
  font-size:13px;
  color:#667085;
}
.patient-row-stat{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:70px;
}
.patient-row-stat .stat-label{
  font-size:11px;
  color:#98a2b3;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.patient-row-stat .stat-value{
  font-size:15px;
  font-weight:600;
  color:#1d2939;
}
.patient-row-stat .stat-sub{
  font-size:12px;
  color:#667085;
}
.patient-card-phone{
  font-size:14px;
  color:#667085;
  min-width:130px;
  white-space:nowrap;
}
@media(max-width:900px){
  .doctor-patient-card{
    flex-wrap:wrap;
    gap:12px;
    padding:14px 16px;
  }
  .patient-card-phone{min-width:auto}
  .patient-row-stat{min-width:auto}
}
/* Custom select dropdown — top square, bottom round, with shadow */
.custom-select-trigger{
  transition:border-color .18s, box-shadow .18s;
}
.custom-select-trigger:hover{
  border-color:#c0c8d6;
  background:#fff;
}
.custom-select-dropdown{
  position:absolute;
  top:100%;
  left:0;
  min-width:100%;
  z-index:30;
  margin-top:4px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:0 0 14px 14px;
  box-shadow:0 12px 28px rgba(16,24,40,.12);
  overflow:hidden;
}
.custom-select-opt{
  padding:12px 16px;
  cursor:pointer;
  font-size:15px;
  font-weight:600;
  color:#1d2939;
  transition:background .15s, color .15s;
  white-space:nowrap;
}
.custom-select-opt:hover{
  background:var(--blue-soft);
  color:var(--blue);
}
.custom-select-opt.selected{
  background:#eef2ff;
  color:#4f46e5;
}
.modal-body{
  padding:4px 0;
}
.modal-body .dashboard-card{
  box-shadow:none;
  border-color:#edf0f4;
}
.modal-body .patient-info-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
@media(max-width:768px){
  .modal-body .patient-info-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

/* 医生设置页 */
.doctor-settings-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  align-items:start;
}
.doctor-settings-layout .card{
  padding:24px;
}
.settings-toggle-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:18px 0;
  border-top:1px solid #e5e7eb;
  margin-top:12px;
}
.settings-toggle-row b{
  font-size:16px;
  color:#1d2939;
}
.settings-toggle-row .muted{
  margin:4px 0 0;
  font-size:14px;
}
.toggle-switch{
  position:relative;
  display:inline-flex;
  align-items:center;
  cursor:pointer;
  flex-shrink:0;
}
.toggle-switch input{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
}
.toggle-slider{
  width:52px;
  height:28px;
  background:#d1d5db;
  border-radius:999px;
  position:relative;
  transition:background .22s ease;
}
.toggle-slider::after{
  content:'';
  position:absolute;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  top:3px;
  left:3px;
  transition:transform .22s ease;
  box-shadow:0 1px 3px rgba(0,0,0,.18);
}
.toggle-switch input:checked + .toggle-slider{
  background:linear-gradient(135deg,#3b82f6,#2563eb);
}
.toggle-switch input:checked + .toggle-slider::after{
  transform:translateX(24px);
}
@media(max-width:900px){
  .doctor-settings-layout{
    grid-template-columns:1fr;
  }
}

/* --- 医嘱模板选择 & AI 生成工具栏 --- */
.advice-field-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
  gap:10px;
  flex-wrap:wrap;
}
.advice-field-header > span{
  font-weight:700;
  font-size:15px;
  color:#344054;
  white-space:nowrap;
}
.advice-template-select{
  padding:8px 12px;
  border:1px solid #dbe4f0;
  border-radius:10px;
  background:#f6f8fc;
  font-size:13px;
  font-weight:600;
  color:#1d2939;
  min-width:140px;
  cursor:pointer;
  outline:none;
  transition:border-color .18s, box-shadow .18s;
}
.advice-template-select:focus{
  border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}
.ai-gen-btn{
  font-size:13px;
  padding:8px 14px;
  border-radius:10px;
  white-space:nowrap;
  transition:all .18s ease;
}
.ai-gen-btn:disabled{
  opacity:0.65;
  cursor:not-allowed;
  pointer-events:none;
}

/* --- 医嘱 AI 按钮行 --- */
.advice-field-footer{
  display:flex;
  justify-content:flex-end;
  margin-top:8px;
}

/* --- 模板管理弹窗列表项 --- */
.template-item{
  transition:box-shadow .18s, border-color .18s;
}
.template-item:hover{
  border-color:#cfe0ff;
  box-shadow:0 2px 8px rgba(37,99,235,.06);
}

@media(max-width:600px){
  .advice-field-header{
    flex-direction:column;
    align-items:flex-start;
  }
  .advice-template-select{
    flex:1;
  }
}
