#view:has(#ptPatientDashboardHost),
#view.patient-view-active {
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100vh / 0.9 - 50px) !important;
  padding: 12px 18px 10px !important;
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  overflow-x: hidden !important;
}

#ptPatientDashboardHost {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-height: calc(100vh / 0.9 - 68px) !important;
  min-height: max(580px, calc(100vh / 0.9 - 68px)) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

#ptPatientDashboard {
  color: #1b2a4a;
  margin: 0 !important;
  font-family: inherit;
  background: #f8fafb;
  border-radius: 20px;
  padding: 16px 18px !important;
  min-height: calc(100vh / 0.9 - 68px) !important;
  min-height: max(580px, calc(100vh / 0.9 - 68px)) !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}
#ptPatientDashboard .pd-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
#ptPatientDashboard .pd-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  padding: 17px 19px;
  min-width: 0;
}
#ptPatientDashboard .pd-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
#ptPatientDashboard .pd-avatar{width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center;border-radius:50%;background:#eaf3ff;color:#4a8bc9;font-size:14px;font-weight:700}
#ptPatientDashboard h2{margin:0;font-size:20px;line-height:1.4;overflow-wrap:anywhere}
#ptPatientDashboard h3{margin:0;font-size:13px;font-weight:600;line-height:1.5}
#ptPatientDashboard .pd-header p,#ptPatientDashboard .pd-sub{margin:4px 0 0;color:#8b9aab;font-size:11px}
#ptPatientDashboard .pd-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px;margin:0}
#ptPatientDashboard .pd-field{min-width:0}
#ptPatientDashboard dt{margin:0;color:#8b9aab;font-size:10px;line-height:1.5}
#ptPatientDashboard dd{margin:3px 0 0;font-size:12px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}
#ptPatientDashboard .pd-lower{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
#ptPatientDashboard .pd-list{display:grid;gap:12px;margin:14px 0 0}
#ptPatientDashboard .pd-list .pd-field{padding-bottom:10px;border-bottom:1px dashed #edf1f5}
#ptPatientDashboard .pd-list .pd-field:last-child{border-bottom:0;padding-bottom:0}
#ptPatientDashboard .pd-stack{display:grid;gap:12px}
#ptPatientDashboard .pd-notes{font-size:11px;line-height:1.65;color:#75879c;margin:10px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:120px;overflow-y:auto}
#ptPatientDashboard .pd-visual{min-width:0}
#ptPatientDashboard .pd-art{height:420px;position:relative;overflow:hidden}
#ptPatientDashboard .pd-art img{width:118%;max-width:470px;position:absolute;top:-10px;left:50%;transform:translateX(-50%);transform-origin:center;user-select:none}
#ptPatientDashboard .pd-zoom{position:absolute;left:4px;top:175px;display:grid;gap:8px}
#ptPatientDashboard .pd-zoom button{width:33px;height:33px;border:0;border-radius:50%;background:#fff;color:#70869b;font-size:19px;cursor:pointer}
#ptPatientDashboard .pd-callout{position:absolute;left:37%;bottom:25px;right:0;background:#fff;border:1px solid #eef2f5;border-radius:16px;padding:12px 14px;box-shadow:0 8px 22px #63839e0c}
#ptPatientDashboard .pd-callout strong{display:block;font-size:12px;margin-bottom:4px}
#ptPatientDashboard .pd-callout span{font-size:10px;color:#8496a8;overflow-wrap:anywhere}
#ptPatientDashboard .pd-options{display:flex;justify-content:center;gap:10px;margin:5px 0 0}
#ptPatientDashboard .pd-options button{background:#fff;border:1px solid #e6edf5;border-radius:16px;width:88px;padding:9px 12px;color:#6f849b;font:inherit;font-size:11px;cursor:pointer}
#ptPatientDashboard .pd-options span{display:block;font-size:29px;color:#4a8bc9;margin-bottom:5px}
#ptPatientDashboard .pd-options button.active{background:#edf5ff;border-color:#c2daf5}
#ptPatientDashboard .pd-caption{text-align:center;font-size:9px;color:#99a8b5;margin:10px 0 0}
#ptPatientDashboard .pd-highlight{outline:2px solid #c2daf5}
#ptPatientDashboard button:focus-visible{outline:3px solid #9ec1ef;outline-offset:3px}

@media(max-width:1000px){#ptPatientDashboard .pd-layout{grid-template-columns:1fr}#ptPatientDashboard .pd-visual{max-width:440px;width:100%;margin:auto}#ptPatientDashboard .pd-art{height:430px}}
@media(max-width:600px){#ptPatientDashboard{padding:12px}#ptPatientDashboard .pd-card{padding:15px}#ptPatientDashboard .pd-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#ptPatientDashboard .pd-lower{grid-template-columns:1fr}#ptPatientDashboard h2{font-size:18px}}

#ptPatientDashboard .pd-test-label{display:block;font-size:10px;color:#72849a;margin-bottom:5px}
#ptPatientDashboard .pd-test-select{width:100%;border:1px solid #dce7f2;background:#fff;color:#1b2a4a;border-radius:10px;padding:9px;font:inherit;font-size:12px;margin-bottom:8px}
#ptPatientDashboard .pd-body-frame{position:absolute;width:216px;height:310px;left:50%;margin-left:-108px;top:0;transform-origin:center}
#ptPatientDashboard .pd-body-frame img{position:static;width:100%;height:100%;max-width:none;transform:none;object-fit:contain;border-radius:12px}
#ptPatientDashboard .pd-body-markers{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#ptPatientDashboard .pd-body-markers ellipse{fill:rgba(59, 130, 246, 0.18);stroke:#60a5fa;stroke-width:0.8}
#ptPatientDashboard .pd-body-markers.pd-abnormal ellipse{fill:rgba(239, 68, 68, 0.18);stroke:#f87171;stroke-width:0.8}
#ptPatientDashboard .pd-callout{left:8%;right:8%;bottom:0;padding:9px 12px;max-height:120px;overflow:auto;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 4px 12px rgba(15,23,42,0.04)}
#ptPatientDashboard .pd-callout.pd-abnormal{border-color:#fecaca;background:#fff}
#ptPatientDashboard .pd-callout.pd-abnormal strong{color:#991b1b}
#ptPatientDashboard .pd-callout p{font-size:10.5px;line-height:1.5;margin:5px 0 0;color:#991b1b}
#ptPatientDashboard .pd-caption{line-height:1.6}
#ptPatientDashboard select:focus-visible{outline:3px solid #9ec1ef;outline-offset:2px}

/* Recorded details and labels must stay legible on the pale cards. */
#ptPatientDashboard dt,#ptPatientDashboard .pd-header p,#ptPatientDashboard .pd-sub{color:#4b5d74;font-size:11px}
#ptPatientDashboard dd{color:#172b45;font-weight:500}
#ptPatientDashboard .pd-notes{color:#40546c;font-size:12px}
#ptPatientDashboard .pd-test-label{color:#40546c;font-size:11px}
#ptPatientDashboard .pd-callout span{color:#40546c;font-size:11px}
#ptPatientDashboard .pd-caption{color:#52647a;font-size:11px}
#ptPatientDashboard .pd-options button{color:#354d68;font-size:12px}

#ptPatientDashboard .pd-profile-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
#ptPatientDashboard .pd-patient-menu {
  background: #ffffff;
  border: 1.5px solid #edf2f7;
  border-radius: 16px;
  padding: 8px 16px;
  position: sticky;
  top: 10px;
  z-index: 30;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}
#ptPatientDashboard .pd-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
#ptPatientDashboard .pd-header-vsep {
  width: 1.5px;
  height: 28px;
  background: #edf2f7;
  flex-shrink: 0;
}
#ptPatientDashboard .pd-menu-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1.5px solid #edf2f7;
  border-radius: 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
#ptPatientDashboard .pd-menu-back:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #dbeafe;
}
#ptPatientDashboard .pd-menu-patient {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 12px;
  padding: 0;
  border: 0;
  min-width: 0;
}
#ptPatientDashboard .pd-menu-patient .pd-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  border: 1.5px solid #dbeafe;
  display: grid;
  place-items: center;
}
#ptPatientDashboard .pd-menu-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#ptPatientDashboard .pd-menu-patient strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
#ptPatientDashboard .pd-menu-patient small {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2px;
}
#ptPatientDashboard .pd-patient-menu nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  flex-wrap: wrap;
}
#ptPatientDashboard .pd-patient-menu nav .pd-nav-vsep {
  width: 1.5px;
  height: 22px;
  background: #cbd5e1;
  margin: 0 3px;
  flex-shrink: 0;
  border-radius: 2px;
}
#ptPatientDashboard .pd-patient-menu nav button,
#ptPatientDashboard .pd-ai-quick-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f7ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 9px;
  padding: 0;
  min-width: 33px;
  width: 33px;
  height: 33px;
  color: #1d4ed8;
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.05);
  white-space: nowrap;
  position: relative;
  box-sizing: border-box;
}
#ptPatientDashboard .pd-patient-menu nav button span:first-child,
#ptPatientDashboard .pd-ai-quick-icon-btn span:first-child {
  font-size: 15.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.2s ease;
}
#ptPatientDashboard .pd-patient-menu nav button:hover:not(.active),
#ptPatientDashboard .pd-ai-quick-icon-btn:hover:not(.active) {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.16);
}
#ptPatientDashboard .pd-patient-menu nav button:hover:not(.active) span:first-child,
#ptPatientDashboard .pd-ai-quick-icon-btn:hover:not(.active) span:first-child {
  transform: scale(1.1);
}
#ptPatientDashboard .pd-patient-menu nav button:active,
#ptPatientDashboard .pd-ai-quick-icon-btn:active {
  transform: translateY(0);
}
#ptPatientDashboard .pd-patient-menu nav button.active,
#ptPatientDashboard .pd-ai-quick-icon-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35), 0 0 0 2px rgba(59, 130, 246, 0.25);
}
#ptPatientDashboard .pd-patient-menu nav button[title]:hover::after,
#ptPatientDashboard .pd-ai-quick-icon-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 120;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}


#ptPatientDashboard .pd-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
#ptPatientDashboard .pd-header-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 0 14px;
  height: 36px;
  width: auto;
  min-width: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
}
#ptPatientDashboard .pd-header-actions #pt-edit {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}
#ptPatientDashboard .pd-header-actions #pt-edit:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  transform: translateY(-1px);
}
#ptPatientDashboard .pd-header-actions #pt-del {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  color: #e11d48;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.04);
}
#ptPatientDashboard .pd-header-actions #pt-del:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
  transform: translateY(-1px);
}
@media (max-width: 1140px) {
  #ptPatientDashboard .pd-patient-menu {
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 14px;
  }
  #ptPatientDashboard .pd-patient-menu nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-top: 8px;
    border-top: 1px dashed #edf2f7;
  }
  #ptPatientDashboard .pd-patient-menu nav button {
    flex-shrink: 0;
  }
  #ptPatientDashboard .pd-header-actions {
    margin-left: auto;
  }
}
@media (max-width: 640px) {
  #ptPatientDashboard .pd-patient-menu {
    position: static;
  }
  #ptPatientDashboard .pd-header-left {
    flex-wrap: wrap;
    gap: 10px;
  }
  #ptPatientDashboard .pd-header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
@media print {
  #ptPatientDashboard .pd-patient-menu {
    display: none;
  }
}

/* ==========================================================================
   Nexura Care Vitals Overview & Interactive Organ Visualizer Layout
   ========================================================================== */
#ptPatientDashboard .pd-layout-vitals {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  flex: 1;
  min-height: 0;
}

#ptPatientDashboard .vitals-breadcrumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
#ptPatientDashboard .vitals-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}
#ptPatientDashboard .vitals-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
#ptPatientDashboard .vitals-nav-arrow:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
#ptPatientDashboard .vitals-bc-item {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
}
#ptPatientDashboard .vitals-bc-item:hover {
  color: #2563eb;
}
#ptPatientDashboard .vitals-bc-sep {
  color: #94a3b8;
  font-size: 11px;
}
#ptPatientDashboard .vitals-bc-curr {
  color: #1e293b;
  font-weight: 600;
}

#ptPatientDashboard .vitals-header-title-block {
  margin-bottom: 8px;
}
#ptPatientDashboard .vitals-header-title-block h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}
#ptPatientDashboard .vitals-header-title-block p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

#ptPatientDashboard .vitals-main-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  gap: 14px !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  min-height: calc(100vh / 0.9 - 135px) !important;
  min-height: max(540px, calc(100vh / 0.9 - 135px)) !important;
  height: 100% !important;
}
@media (max-width: 850px) {
  #ptPatientDashboard .vitals-main-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
}

#ptPatientDashboard .vitals-left-col,
#ptPatientDashboard .vitals-right-col {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#ptPatientDashboard .vitals-left-col > .vitals-card,
#ptPatientDashboard #pdStressPatternsCard {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: unset !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
#ptPatientDashboard .vitals-right-col > .vitals-stage-card {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: calc(100vh / 0.9 - 135px) !important;
  min-height: max(540px, calc(100vh / 0.9 - 135px)) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#ptPatientDashboard .vitals-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.03);
  position: relative;
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

#ptPatientDashboard .vitals-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
#ptPatientDashboard .vitals-card-head h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
#ptPatientDashboard .vitals-card-head .card-action-btn {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
}
#ptPatientDashboard .vitals-card-head .card-action-btn:hover {
  color: #475569;
  background: #f1f5f9;
}

#ptPatientDashboard .vitals-month-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
}

#ptPatientDashboard .vitals-timeline-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  gap: 6px;
  overflow-x: auto;
}
#ptPatientDashboard .vitals-timeline-arrow {
  background: transparent;
  border: 0;
  color: #64748b;
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
#ptPatientDashboard .vitals-timeline-arrow:hover {
  background: #f1f5f9;
  color: #0f172a;
}
#ptPatientDashboard .vitals-day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-width: 42px;
}
#ptPatientDashboard .vitals-day-pill .day-num {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}
#ptPatientDashboard .vitals-day-pill .day-name {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 1px;
}
#ptPatientDashboard .vitals-day-pill:hover:not(.active) {
  background: #f8fafc;
}
#ptPatientDashboard .vitals-day-pill.active {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(37,99,235,0.28);
}
#ptPatientDashboard .vitals-day-pill.active .day-num {
  color: #ffffff;
}
#ptPatientDashboard .vitals-day-pill.active .day-name {
  color: #dbeafe;
}

#ptPatientDashboard .vitals-stress-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 0;
}
@media (max-width: 600px) {
  #ptPatientDashboard .vitals-stress-row {
    grid-template-columns: 1fr;
  }
}
#ptPatientDashboard .vitals-radial-gauge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 105px;
  height: 105px;
  margin: 0 auto;
}
#ptPatientDashboard .vitals-gauge-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#ptPatientDashboard .vitals-gauge-inner .gauge-pct {
  font-size: 21px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}
#ptPatientDashboard .vitals-gauge-inner .gauge-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
  text-align: center;
  max-width: 80px;
}

#ptPatientDashboard .vitals-stress-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}
#ptPatientDashboard .vitals-stress-info p {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
  margin: 0 0 8px;
}
#ptPatientDashboard .vitals-peak-stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#ptPatientDashboard .vitals-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
}
#ptPatientDashboard .vitals-stat-lbl {
  font-weight: 700;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 100px;
}
#ptPatientDashboard .vitals-stat-val {
  color: #475569;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#ptPatientDashboard .vitals-stat-sep {
  color: #cbd5e1;
}

#ptPatientDashboard .vitals-subcards-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  gap: 12px !important;
  margin-top: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  align-items: stretch !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
@media (max-width: 768px) {
  #ptPatientDashboard .vitals-subcards-row {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
  }
}
#ptPatientDashboard .vitals-stacked-cards {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  box-sizing: border-box !important;
  justify-content: space-between !important;
  overflow: hidden !important;
}
#ptPatientDashboard .vitals-stacked-cards > #pdCapacityCard {
  flex: 0 0 auto !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
#ptPatientDashboard .vitals-stacked-cards > #pdMedicationAdherenceCard {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
#ptPatientDashboard .vitals-stacked-cards > .vitals-card {
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
#ptPatientDashboard .vitals-subcards-row > #pdRehabCard {
  flex: 1 1 0% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
#ptPatientDashboard .vitals-subcards-row > .vitals-card {
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
#ptPatientDashboard .pd-tests-scroll-list {
  max-height: none !important;
  overflow-y: visible !important;
}

#ptPatientDashboard .vitals-subcard-subtitle {
  font-size: 11px;
  color: #64748b;
  margin: -4px 0 8px;
}
#ptPatientDashboard .vitals-rehab-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex: 1 !important;
  justify-content: space-between !important;
  min-height: 0 !important;
}
#ptPatientDashboard .vitals-rehab-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
#ptPatientDashboard .vitals-rehab-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
#ptPatientDashboard .vitals-rehab-text .rehab-item-title {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}
#ptPatientDashboard .vitals-rehab-text .rehab-item-desc {
  font-size: 9.5px;
  color: #64748b;
  line-height: 1.25;
  margin-top: 1px;
}

#ptPatientDashboard .vitals-efficiency-section {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
}
#ptPatientDashboard .vitals-risk-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #0284c7;
  margin-bottom: 2px;
}
#ptPatientDashboard .vitals-risk-tag.moderate {
  color: #d97706;
}
#ptPatientDashboard .vitals-risk-tag.critical {
  color: #dc2626;
}
#ptPatientDashboard .vitals-risk-tag.normal {
  color: #059669;
}
#ptPatientDashboard .vitals-big-score {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
  margin: 1px 0 4px;
}
#ptPatientDashboard .vitals-progress-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
#ptPatientDashboard .vitals-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);
  transition: width 0.4s ease;
}
#ptPatientDashboard .vitals-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
}

#ptPatientDashboard .vitals-med-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex: 1 !important;
  justify-content: space-between !important;
  min-height: 0 !important;
  margin-top: 4px !important;
}
#ptPatientDashboard .vitals-med-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  flex: 1 !important;
  min-height: 44px !important;
}
#ptPatientDashboard .vitals-med-icon-box {
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
  background: #eff6ff !important;
  border: 1px solid #dbeafe !important;
  box-shadow: none !important;
  color: #2563eb !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  flex-shrink: 0 !important;
}
#ptPatientDashboard .vitals-med-details .med-name {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}
#ptPatientDashboard .vitals-med-details .med-dosage {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}
#ptPatientDashboard .vitals-med-item:hover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}
#ptPatientDashboard .vitals-med-item .med-generic-pill {
  font-size: 9.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
}
#ptPatientDashboard .vitals-med-item .med-indication-line {
  font-size: 9.5px;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border-radius: 4px;
  padding: 1px 5px;
  display: inline-block;
}
#ptPatientDashboard .vitals-med-item .med-info-pill:hover {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

#ptPatientDashboard .vitals-stage-card {
  background: radial-gradient(ellipse at 50% 40%, rgba(238,246,255,0.85) 0%, rgba(248,250,252,0.95) 60%, #ffffff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  position: relative;
  min-height: 580px;
  height: 100% !important;
  flex: 1 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 18px 22px 14px !important;
  box-shadow: 0 4px 16px rgba(15,23,42,0.04);
  overflow: hidden;
  box-sizing: border-box !important;
}

#ptPatientDashboard .vitals-stage-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#ptPatientDashboard .stage-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(15,23,42,0.06);
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
#ptPatientDashboard .stage-ctrl-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

#ptPatientDashboard .vitals-organ-canvas-wrap {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  min-height: 420px !important;
  user-select: none !important;
}
#ptPatientDashboard .vitals-organ-interactive-box {
  width: 100% !important;
  max-width: 500px !important;
  height: 100% !important;
  min-height: 420px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  will-change: transform !important;
}
#ptPatientDashboard #stage3DOrganView,
#ptPatientDashboard #stage3DBodyView {
  width: 100% !important;
  max-width: 480px !important;
  min-height: 400px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
  position: relative !important;
}
#ptPatientDashboard .vitals-stage-organ-model {
  width: 100% !important;
  max-width: 480px !important;
  min-height: 400px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}
#ptPatientDashboard .vitals-organ-3d-img {
  width: 100% !important;
  max-width: 460px !important;
  max-height: 460px !important;
  height: auto !important;
  min-height: 350px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 20px 42px rgba(14,165,233,0.45)) !important;
  user-select: none !important;
  pointer-events: none !important;
}
#ptPatientDashboard .vitals-organ-svg {
  width: 100% !important;
  max-width: 460px !important;
  max-height: 460px !important;
  min-height: 350px !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
  overflow: visible !important;
  filter: drop-shadow(0 16px 36px rgba(15,23,42,0.08)) !important;
}
#ptPatientDashboard .vitals-lung-fallback {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ptPatientDashboard .vitals-floating-warning {
  position: absolute;
  bottom: 72px;
  right: 14px;
  z-index: 25;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.06);
  max-width: 175px;
  transition: all 0.3s ease;
}
#ptPatientDashboard .vitals-warning-badge-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 2px;
}
#ptPatientDashboard .vitals-warning-desc {
  font-size: 9px;
  color: #475569;
  line-height: 1.3;
  margin: 0;
}

#ptPatientDashboard .vitals-organ-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  z-index: 20;
}
#ptPatientDashboard .vitals-carousel-nav {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
#ptPatientDashboard .vitals-carousel-nav:hover {
  background: #f8fafc;
  color: #0f172a;
}
#ptPatientDashboard .vitals-carousel-track {
  display: flex;
  align-items: center;
  gap: 8px;
}
#ptPatientDashboard .vitals-organ-pill {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 54px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
#ptPatientDashboard .vitals-organ-pill .organ-thumb-svg {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ptPatientDashboard .vitals-organ-pill .organ-pill-label {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
}
#ptPatientDashboard .vitals-organ-pill:hover:not(.active) {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
}
#ptPatientDashboard .vitals-organ-pill.active {
  border-color: #2563eb;
  box-shadow: 0 4px 16px rgba(37,99,235,0.2);
  transform: translateY(-2px);
  background: #ffffff;
}
#ptPatientDashboard .vitals-organ-pill.active .organ-pill-label {
  color: #2563eb;
  font-weight: 700;
}

/* --- Longitudinal Lab Comparison Table Styles --- */
#ptPatientDashboard .vitals-comparison-card {
  margin-top: 16px;
}
#ptPatientDashboard .vitals-comp-summary-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#ptPatientDashboard .vitals-sum-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#ptPatientDashboard .vitals-sum-pill.improved {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
#ptPatientDashboard .vitals-sum-pill.deteriorated {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
#ptPatientDashboard .vitals-sum-pill.stable {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
#ptPatientDashboard .vitals-comp-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
#ptPatientDashboard .vitals-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}
#ptPatientDashboard .vitals-comp-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}
#ptPatientDashboard .vitals-comp-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}
#ptPatientDashboard .vitals-comp-table tr:last-child td {
  border-bottom: none;
}
#ptPatientDashboard .vitals-comp-table tr:hover td {
  background: #fafafa;
}
#ptPatientDashboard .vitals-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
#ptPatientDashboard .vitals-trend-badge.improved {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
#ptPatientDashboard .vitals-trend-badge.deteriorated {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
#ptPatientDashboard .vitals-trend-badge.stable {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
#ptPatientDashboard .vitals-trend-badge.baseline {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
#ptPatientDashboard .vitals-diff-val {
  font-weight: 700;
  font-size: 12px;
}
#ptPatientDashboard .vitals-diff-val.up {
  color: #dc2626;
}
#ptPatientDashboard .vitals-diff-val.down {
  color: #16a34a;
}
#ptPatientDashboard .vitals-diff-val.same {
  color: #64748b;
}

/* --- Doctor Decision Support Matrix Styles --- */
#ptPatientDashboard .vitals-doctor-matrix {
  margin-top: 16px;
}
#ptPatientDashboard .doctor-matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 14px;
}
#ptPatientDashboard .doctor-matrix-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
#ptPatientDashboard .doctor-matrix-box.etiology-box {
  border-left: 4px solid #3b82f6;
  background: #f8fafc;
}
#ptPatientDashboard .doctor-matrix-box.panic-box {
  border-left: 4px solid #10b981;
  background: #f8fafc;
}
#ptPatientDashboard .doctor-matrix-box.panic-box.has-panic {
  border-left: 4px solid #ef4444;
  background: #fff5f5;
  border-color: #fecaca;
}
#ptPatientDashboard .doctor-matrix-box.safety-box {
  border-left: 4px solid #f59e0b;
  background: #f8fafc;
}
#ptPatientDashboard .doctor-matrix-box.action-box {
  border-left: 4px solid #8b5cf6;
  background: #f8fafc;
}
#ptPatientDashboard .matrix-box-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}
#ptPatientDashboard .matrix-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
}
#ptPatientDashboard .matrix-list li {
  margin-bottom: 4px;
}

/* --- 3D Stage View Switcher & Silhouette --- */
#ptPatientDashboard .vitals-3d-toggle-bar {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 12px;
  position: relative;
  z-index: 30;
}
#ptPatientDashboard .vitals-3d-toggle-btn {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#ptPatientDashboard .vitals-3d-toggle-btn:hover:not(.active) {
  color: #0f172a;
}
#ptPatientDashboard .vitals-3d-toggle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 700;
}
#ptPatientDashboard .vitals-body-silhouette-wrap {
  position: relative;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
}
#ptPatientDashboard .vitals-organ-beacon-svg {
  cursor: pointer;
  transition: transform 0.2s ease;
}
#ptPatientDashboard .vitals-organ-beacon-svg:hover {
  transform: scale(1.08);
}

@media (max-width: 900px) {
  #ptPatientDashboard .doctor-matrix-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Dedicated Biomarker Trends & Longitudinal Graphs Page Styles (#pdTrends)
   ========================================================================== */
#ptPatientDashboard .pd-layout-trends {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#ptPatientDashboard .pd-trends-page-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#ptPatientDashboard .pd-trends-header-card {
  background: #ffffff;
  border: 1.5px solid #edf2f7;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

#ptPatientDashboard .pd-trends-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

#ptPatientDashboard .pd-trends-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* KPI Summary Cards Grid */
#ptPatientDashboard .pd-trends-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
  align-items: stretch;
}

#ptPatientDashboard .pd-trends-kpi-card {
  background: #ffffff !important;
  border-radius: 20px !important;
  border: none !important;
  box-shadow: 0 2px 14px rgba(27, 42, 74, 0.08) !important;
  padding: 18px 20px 16px !important;
  min-height: 130px !important;
  height: auto !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

#ptPatientDashboard .pd-trends-kpi-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 34px -16px rgba(27, 42, 74, 0.25) !important;
  border: none !important;
}

#ptPatientDashboard .pd-trends-kpi-card::before,
#ptPatientDashboard .pd-trends-kpi-card::after {
  display: none !important;
}

#ptPatientDashboard .pd-trends-kpi-card .stat-ico,
#ptPatientDashboard .pd-trends-kpi-card .kpi-icon {
  position: relative !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin-bottom: 8px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #2563eb !important;
  flex: none !important;
}

#ptPatientDashboard .pd-trends-kpi-card .stat-ico svg,
#ptPatientDashboard .pd-trends-kpi-card .kpi-icon svg {
  width: 28px !important;
  height: 28px !important;
  stroke-width: 2.2 !important;
  color: #2563eb !important;
  stroke: #2563eb !important;
  display: block !important;
}

#ptPatientDashboard .pd-trends-kpi-card .lb,
#ptPatientDashboard .pd-trends-kpi-card .kpi-label {
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #8a94a6 !important;
  margin-bottom: 4px !important;
  line-height: 1.3 !important;
}

#ptPatientDashboard .pd-trends-kpi-card .vl,
#ptPatientDashboard .pd-trends-kpi-card .kpi-value {
  font-size: 28px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  color: #1b2a4a !important;
  line-height: 1.1 !important;
  font-variant-numeric: tabular-nums !important;
  margin: 0 0 6px 0 !important;
  white-space: nowrap !important;
}

#ptPatientDashboard .pd-trends-kpi-card .dl,
#ptPatientDashboard .pd-trends-kpi-card .kpi-sub {
  font-size: 12px !important;
  color: #8a94a6 !important;
  font-weight: 500 !important;
  margin-top: auto !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.35 !important;
}



/* Trajectory Graph Card */
#ptPatientDashboard .pd-trends-graph-card {
  background: #ffffff;
  border: 1.5px solid #edf2f7;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

#ptPatientDashboard .pd-trends-svg-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#ptPatientDashboard .pd-trajectory-vector {
  transition: opacity 0.2s ease;
  cursor: pointer;
}

#ptPatientDashboard .pd-trajectory-vector:hover {
  opacity: 1;
}

/* Delta Velocity Bars List */
#ptPatientDashboard .pd-delta-list,
#ptPatientDashboard .pd-delta-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

#ptPatientDashboard .pd-delta-list-head {
  display: grid;
  grid-template-columns: 240px minmax(210px, 240px) 1fr 130px;
  gap: 16px;
  padding: 8px 18px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 12px;
}

#ptPatientDashboard .pd-delta-card,
#ptPatientDashboard .pd-delta-list-row {
  background: #ffffff;
  border: 1.5px solid #edf2f7;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
  display: grid;
  grid-template-columns: 240px minmax(210px, 240px) 1fr 130px;
  align-items: center;
  gap: 16px;
  transition: all 0.15s ease;
}

#ptPatientDashboard .pd-delta-card:hover,
#ptPatientDashboard .pd-delta-list-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
  background: #fbfcfe;
}

#ptPatientDashboard .pd-delta-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

#ptPatientDashboard .pd-delta-values-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
}

#ptPatientDashboard .pd-delta-val-box small {
  display: block;
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

#ptPatientDashboard .pd-delta-val-box strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

#ptPatientDashboard .pd-delta-shift-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  text-align: center;
  white-space: nowrap;
}

#ptPatientDashboard .pd-delta-shift-pill.improved {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

#ptPatientDashboard .pd-delta-shift-pill.deteriorated {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

#ptPatientDashboard .pd-delta-shift-pill.stable {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

#ptPatientDashboard .pd-delta-range-track {
  position: relative;
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: visible;
  margin: 4px 0 2px;
}

#ptPatientDashboard .pd-delta-normal-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #bbf7d0;
  border-radius: 9999px;
}

#ptPatientDashboard .pd-delta-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

#ptPatientDashboard .pd-delta-marker.prev {
  width: 10px;
  height: 10px;
  background: #94a3b8;
  border: 2px solid #ffffff;
  z-index: 2;
}

#ptPatientDashboard .pd-delta-marker.cur {
  width: 14px;
  height: 14px;
  border: 2.5px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  z-index: 3;
}

#ptPatientDashboard .pd-delta-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

#ptPatientDashboard .vitals-trends-preview-card {
  transition: all 0.2s ease;
}

#ptPatientDashboard .vitals-trends-preview-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

@media (max-width: 960px) {
  #ptPatientDashboard .pd-trends-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #ptPatientDashboard .pd-delta-list-head {
    display: none;
  }
  #ptPatientDashboard .pd-delta-card,
  #ptPatientDashboard .pd-delta-list-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #ptPatientDashboard .pd-delta-col-badge {
    text-align: left !important;
  }
}

@media (max-width: 580px) {
  #ptPatientDashboard .pd-trends-kpi-grid {
    grid-template-columns: 1fr;
  }
  #ptPatientDashboard .pd-trends-header-main {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Elite Clinical Telemetry & Triage Strip Styles
   ========================================================================== */
#ptPatientDashboard .pd-telemetry-strip {
  background: #ffffff;
  border: 1.5px solid #edf2f7;
  border-radius: 16px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  flex-wrap: wrap;
}

#ptPatientDashboard .pd-telemetry-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#ptPatientDashboard .pd-telemetry-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

#ptPatientDashboard .pd-telemetry-status-chip.normal {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

#ptPatientDashboard .pd-telemetry-status-chip.warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

#ptPatientDashboard .pd-telemetry-status-chip.critical {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  animation: pulseCrit 2s infinite ease-in-out;
}

@keyframes pulseCrit {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

#ptPatientDashboard .pd-live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

#ptPatientDashboard .pd-acuity-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
}

#ptPatientDashboard .pd-telemetry-vitals {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#ptPatientDashboard .pd-vital-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
}

#ptPatientDashboard .vital-icon {
  font-size: 18px;
}

#ptPatientDashboard .vital-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  display: block;
  line-height: 1.1;
}

#ptPatientDashboard .vital-val small {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}

#ptPatientDashboard .vital-tag {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

#ptPatientDashboard .pd-vital-sep {
  width: 1px;
  height: 22px;
  background: #e2e8f0;
  flex-shrink: 0;
}

#ptPatientDashboard .pd-telemetry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#ptPatientDashboard .pd-btn-telemetry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

#ptPatientDashboard .pd-btn-telemetry.whatsapp {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

#ptPatientDashboard .pd-btn-telemetry.whatsapp:hover {
  background: #d1fae5;
  transform: translateY(-1px);
}

#ptPatientDashboard .pd-btn-telemetry.print {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

#ptPatientDashboard .pd-btn-telemetry.print:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

/* 3D Stage Cyber HUD Overlay - cleaned up to avoid cluttered overlays */
#ptPatientDashboard .vitals-hud-overlay {
  display: none !important;
}

/* Interactive Checklist & Medication Buttons */
#ptPatientDashboard .rehab-check-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: transparent;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#ptPatientDashboard .rehab-check-btn.active {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

#ptPatientDashboard .med-timing-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

#ptPatientDashboard .med-taken-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: transparent;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#ptPatientDashboard .med-taken-btn.active {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

/* Print Sheet Styling for Hospital Ward Rounds */
@media print {
  #ptPatientDashboard .pd-patient-menu,
  #ptPatientDashboard .pd-telemetry-actions,
  #ptPatientDashboard .pd-trends-header-actions,
  #ptPatientDashboard .vitals-stage-controls,
  #ptPatientDashboard .vitals-3d-toggle-bar,
  #ptPatientDashboard .vitals-organ-carousel,
  #ptPatientDashboard .pd-zoom {
    display: none !important;
  }
  #ptPatientDashboard {
    background: #ffffff !important;
    padding: 0 !important;
  }
  #ptPatientDashboard .vitals-card {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   Patient Details Overview - Ultra-Clear Dark & Bold High-Contrast Styling
   ========================================================================== */
#ptPatientDashboard #pdPatientCardTop .pd-header h3 {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.3;
}

#ptPatientDashboard #pdPatientCardTop .pd-header .pd-sub {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 450 !important;
  margin: 3px 0 0;
}

#ptPatientDashboard #pdPatientCardTop .pd-avatar {
  background: #0284c7;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3);
}

/* Primary Demographic Grid */
#ptPatientDashboard #pdPatientCardTop .pd-grid {
  gap: 12px 14px;
}

#ptPatientDashboard #pdPatientCardTop .pd-grid .pd-field {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.15s ease;
}

#ptPatientDashboard #pdPatientCardTop .pd-grid .pd-field:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

#ptPatientDashboard #pdPatientCardTop dt {
  color: #0f172a !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  margin: 0 0 4px;
}

#ptPatientDashboard #pdPatientCardTop dd {
  color: #475569 !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  line-height: 1.45;
  margin: 0;
}

/* Lower Section Sub-Cards (Contact, Identity, Notes) */
#ptPatientDashboard #pdPatientCardTop .pd-lower .pd-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 15px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

#ptPatientDashboard #pdPatientCardTop .pd-lower h3 {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 2px;
}

#ptPatientDashboard #pdPatientCardTop .pd-lower .pd-sub {
  color: #64748b !important;
  font-size: 11.5px !important;
  font-weight: 450 !important;
  margin: 0 0 10px;
}

#ptPatientDashboard #pdPatientCardTop .pd-list .pd-field {
  padding: 8px 0;
  border-bottom: 1px dashed #e2e8f0;
}

#ptPatientDashboard #pdPatientCardTop .pd-list .pd-field:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

#ptPatientDashboard #pdPatientCardTop .pd-list dt {
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  margin-bottom: 3px;
}

#ptPatientDashboard #pdPatientCardTop .pd-list dd {
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.45;
  margin: 0;
}

/* Patient Notes text */
#ptPatientDashboard #pdPatientCardTop .pd-notes {
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.6;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 11px 14px;
  margin-top: 10px;
}

/* Dedicated Visual Test Anatomy Page */
#ptPatientDashboard .pd-layout-anatomy {
  width: 100%;
}

/* Dedicated Biomarker Variance & Delta Velocity Visualizer Page */
#ptPatientDashboard .pd-layout-variance {
  width: 100%;
}

/* Dedicated Longitudinal Trajectory & Biomarker Graphs Pages */
#ptPatientDashboard .pd-layout-graphs,
#ptPatientDashboard .pd-layout-trajectory {
  width: 100%;
}

/* Dedicated Diagnostic Tests Dashboard Page */
#ptPatientDashboard .pd-layout-tests {
  width: 100%;
}
#ptPatientDashboard .pd-test-card {
  transition: all 0.15s ease;
}
#ptPatientDashboard .pd-test-card:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08) !important;
  transform: translateY(-2px);
}
#ptPatientDashboard .pd-tests-chip {
  transition: all 0.15s ease;
}
#ptPatientDashboard .pd-tests-chip:hover:not(.active) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* Dedicated Diagnostic Reports Page */
#ptPatientDashboard .pd-layout-reports {
  width: 100%;
}
#ptPatientDashboard .pd-report-row:hover {
  background: #f8fafc;
}



#ptPatientDashboard .pd-anatomy-grid {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 992px) {
  #ptPatientDashboard .pd-anatomy-grid {
    grid-template-columns: 1fr;
  }
}

#ptPatientDashboard .pd-anatomy-test-card:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

/* Target Organ Systems Breakdown - 1 Row Subtle Clean Cards */
#ptPatientDashboard .pd-organ-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 900px) {
  #ptPatientDashboard .pd-organ-breakdown-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 500px) {
  #ptPatientDashboard .pd-organ-breakdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#ptPatientDashboard .pd-organ-breakdown-item {
  padding: 10px 6px;
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}
#ptPatientDashboard .pd-organ-breakdown-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
#ptPatientDashboard .pd-organ-breakdown-item .organ-icon {
  font-size: 18px;
  margin-bottom: 3px;
  display: block;
}
#ptPatientDashboard .pd-organ-breakdown-item strong {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
#ptPatientDashboard .pd-organ-breakdown-item span {
  font-size: 10.5px;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

/* ---- Table Row & Modal Action Buttons ---- */
.act-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  line-height: 1 !important;
  text-decoration: none !important;
}
.act-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.1) !important;
}
.act-btn:active {
  transform: translateY(0) !important;
}
.act-btn-ai,
.act-btn-view,
.act-btn-print,
.act-btn-pdf,
.act-btn-edit {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
.act-btn-ai:hover,
.act-btn-view:hover,
.act-btn-print:hover,
.act-btn-pdf:hover,
.act-btn-edit:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}
.act-btn-del {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
.act-btn-del:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

/* Diagnostic Tests Interactive Items */
.pd-diag-test-item {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.pd-diag-test-item:hover {
  background: #f8fafc !important;
  border-color: #3b82f6 !important;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08) !important;
}
.pd-diag-test-item:active {
  transform: translateY(0);
}

.pd-anatomy-test-card {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.pd-anatomy-test-card:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06) !important;
}
.pd-anatomy-detail-btn:hover {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
}



