/* ══════════════════════════════════════════
   CONCEPT — Chat-First Healthcare
   Extends ../healthcare-md.css
   All new chat-specific components only.
   No inline styles — class-based only.
══════════════════════════════════════════ */

/* ══════════════════════════════════════════
   CHAT THREAD
══════════════════════════════════════════ */
.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--bg);
  list-style: none;
}
.chat-thread::-webkit-scrollbar { display: none; }
.chat-thread > li { list-style: none; }

.chat-date {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--on-surface-3);
  font-weight: var(--fw-medium);
  letter-spacing: 0.5px;
  padding: var(--space-1) 0;
}

/* ── Bubble wrappers ── */
.bw { display: flex; flex-direction: column; gap: 2px; }
.bw.ai   { align-items: flex-start; }
.bw.user { align-items: flex-end; }

.bubble-lbl {
  font-size: var(--text-xs);
  color: var(--on-surface-3);
  padding: 0 var(--space-1);
  display: flex;
  align-items: center;
  gap: 3px;
}
.bubble-lbl .material-icons { font-size: 12px; color: var(--secondary); }

/* ── Bubbles ── */
.bubble {
  max-width: 80%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.bubble.ai {
  background: var(--surface);
  color: var(--on-surface);
  border: 1px solid var(--divider);
  border-bottom-left-radius: var(--radius-sm);
}
.bubble.user {
  background: var(--primary);
  color: var(--on-primary);
  border-bottom-right-radius: var(--radius-sm);
}
.bubble-ts {
  font-size: 10px;
  color: var(--on-surface-3);
  padding: 0 var(--space-1);
}
.bw.user .bubble-ts { text-align: right; }

/* ── Typing indicator ── */
.bubble-typing {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tdot {
  width: 6px;
  height: 6px;
  background: var(--on-surface-3);
  border-radius: 50%;
  animation: tdot-bounce 1.2s ease-in-out infinite;
}
.tdot:nth-child(2) { animation-delay: 0.2s; }
.tdot:nth-child(3) { animation-delay: 0.4s; }
@keyframes tdot-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-4px); }
}

/* ── Card embedded inside an AI turn ── */
.bubble-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 88%;
}

/* ══════════════════════════════════════════
   QUICK REPLIES
══════════════════════════════════════════ */
.qr-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-3);
  background: var(--bg);
  flex-shrink: 0;
}
.qr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.qr:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.qr .material-icons { font-size: 14px; }

/* ══════════════════════════════════════════
   CHAT INPUT BAR
══════════════════════════════════════════ */
.chat-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border-top: 1px solid var(--divider);
  flex-shrink: 0;
}
.chat-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px var(--space-3);
  gap: var(--space-2);
}
.chat-ph {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--on-surface-3);
}
.icon-btn-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-btn-sm .material-icons { font-size: 18px; color: var(--on-surface-2); }
.icon-btn-sm:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.send-btn .material-icons { font-size: 18px; color: white; }
.send-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ══════════════════════════════════════════
   APP BAR VARIANTS
══════════════════════════════════════════ */
.app-bar-title-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.app-bar-subtitle {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  line-height: 1;
}
.ai-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: var(--fw-bold);
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  border-radius: var(--radius-full);
  padding: 2px 7px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.ai-online-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #69F0AE;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   WELCOME SCREEN
══════════════════════════════════════════ */
.welcome-screen {
  flex: 1;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-5);
  gap: var(--space-4);
  text-align: center;
}
.brand-mark {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark .material-icons { font-size: 34px; color: white; }
.welcome-name { font-size: var(--text-2xl); font-weight: var(--fw-bold); color: white; }
.welcome-tag  {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  line-height: var(--leading-relaxed);
  max-width: 200px;
}
.welcome-btns {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  padding: 0 var(--space-2);
  margin-top: var(--space-2);
}
.btn-white {
  background: white;
  color: var(--primary);
  border: none;
  height: 44px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  letter-spacing: 0.3px;
}
.btn-white:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.btn-ghost {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.5);
  height: 44px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}
.btn-ghost:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.welcome-tos {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  line-height: var(--leading-normal);
}

/* ══════════════════════════════════════════
   SIGN-IN SCREEN
══════════════════════════════════════════ */
.signin-body {
  flex: 1;
  background: var(--surface);
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
}
.signin-body::-webkit-scrollbar { display: none; }
.signin-logo-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.signin-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.signin-mark .material-icons { font-size: 18px; color: white; }
.signin-brand-name { font-size: var(--text-lg); font-weight: var(--fw-bold); color: var(--primary); }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--on-surface);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.social-btn .material-icons { font-size: 18px; color: var(--on-surface-2); }

/* ══════════════════════════════════════════
   ONBOARDING PROGRESS
══════════════════════════════════════════ */
.ob-progress {
  height: 3px;
  display: flex;
  background: var(--primary);
  flex-shrink: 0;
}
.ob-seg         { flex: 1; height: 3px; }
.ob-seg.on      { background: rgba(255,255,255,0.9); }
.ob-seg.dim     { background: rgba(255,255,255,0.25); }
.ob-skip-bar {
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--space-2);
  height: 36px;
  flex-shrink: 0;
}
.ob-skip-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  cursor: pointer;
  font-family: inherit;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}
.ob-skip-btn:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }

/* ══════════════════════════════════════════
   HOME SUGGESTION GRID
══════════════════════════════════════════ */
.suggest-section {
  padding: var(--space-2) var(--space-3) var(--space-3);
  flex-shrink: 0;
}
.suggest-lbl {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--on-surface-3);
  margin-bottom: var(--space-2);
  padding: 0 var(--space-1);
}
.suggest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.suggest-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.suggest-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.suggest-card .material-icons { font-size: 20px; color: var(--primary); }
.sg-label { font-size: var(--text-xs); font-weight: var(--fw-bold); color: var(--on-surface); line-height: 1.3; }
.sg-sub   { font-size: 10px; color: var(--on-surface-3); }

/* ══════════════════════════════════════════
   SYMPTOM SEVERITY GRID
══════════════════════════════════════════ */
.sev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  padding: var(--space-2);
}
.sev-btn {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: var(--space-2) var(--space-1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.sev-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sev-dot { width: 10px; height: 10px; border-radius: 50%; }
.sev-lbl   { font-size: var(--text-xs); font-weight: var(--fw-bold); color: var(--on-surface); }
.sev-range { font-size: 10px; color: var(--on-surface-3); }
.sev-btn.mild   { border-color: var(--success); }
.sev-dot.mild   { background: var(--success); }
.sev-btn.mod    { border-color: var(--warning); }
.sev-dot.mod    { background: var(--warning); }
.sev-btn.severe { border-color: var(--error); }
.sev-dot.severe { background: var(--error); }
.sev-btn.emerg  { border-color: var(--error); background: var(--error-light); }
.sev-dot.emerg  { background: var(--error); }

/* ══════════════════════════════════════════
   CARE OPTIONS IN CHAT
══════════════════════════════════════════ */
.care-opts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2);
}
.care-opt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.care-opt:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.care-opt.rec { border-color: var(--primary); background: var(--primary-light); }
.care-opt .material-icons { font-size: 20px; color: var(--primary); flex-shrink: 0; }
.care-opt-body { flex: 1; min-width: 0; }
.care-opt-name { font-size: var(--text-xs); font-weight: var(--fw-bold); color: var(--on-surface); }
.care-opt-meta { font-size: 10px; color: var(--on-surface-2); }
.rec-badge {
  font-size: 9px;
  font-weight: var(--fw-bold);
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  padding: 2px 5px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PROVIDER CARD IN CHAT
══════════════════════════════════════════ */
.provider-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
}
.provider-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--primary);
}
.provider-name     { font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--on-surface); }
.provider-specialty { font-size: var(--text-xs); color: var(--on-surface-2); margin-top: 1px; }
.provider-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
}
.provider-rating .material-icons { font-size: 13px; color: #F57C00; }
.provider-rating-val { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--on-surface-2); }
.provider-divider { height: 1px; background: var(--divider); margin: 0 var(--space-3); }

/* ══════════════════════════════════════════
   APPOINTMENT SLOTS
══════════════════════════════════════════ */
.slot-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
}
.slot-card {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
}
.slot-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.slot-card.sel { border-color: var(--primary); background: var(--primary-light); }
.slot-time { font-size: var(--text-xs); font-weight: var(--fw-bold); color: var(--on-surface); flex: 1; }
.slot-type { font-size: 10px; color: var(--on-surface-2); }
.slot-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }

/* ══════════════════════════════════════════
   APPOINTMENT CONFIRMATION
══════════════════════════════════════════ */
.appt-confirm {
  padding: var(--space-3);
  background: var(--success-light);
}
.appt-confirm-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.appt-confirm-top .material-icons { font-size: 20px; color: var(--success); }
.appt-confirm-title { font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--success); }
.appt-detail-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 3px;
}
.appt-detail-row .material-icons { font-size: 13px; color: var(--on-surface-2); }
.appt-detail-text { font-size: var(--text-xs); color: var(--on-surface); }

/* ══════════════════════════════════════════
   LAB RESULTS CARD
══════════════════════════════════════════ */
.lab-card { padding: var(--space-3); }
.lab-card-title {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--on-surface);
  margin-bottom: var(--space-2);
}
.lab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--divider);
  gap: var(--space-2);
}
.lab-row:last-child { border-bottom: none; }
.lab-name  { font-size: var(--text-xs); color: var(--on-surface-2); flex: 1; }
.lab-val   { font-size: var(--text-xs); font-weight: var(--fw-bold); }
.lab-normal { color: var(--success); }
.lab-high   { color: var(--error); }
.lab-range  { font-size: 10px; color: var(--on-surface-3); text-align: right; min-width: 60px; }

/* ══════════════════════════════════════════
   MEDICATION INFO CARD
══════════════════════════════════════════ */
.med-card { padding: var(--space-3); }
.med-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.med-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.med-icon .material-icons { font-size: 18px; color: var(--primary); }
.med-name  { font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--on-surface); }
.med-class { font-size: var(--text-xs); color: var(--on-surface-2); }
.med-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--divider);
}
.med-row:last-child { border-bottom: none; }
.med-row-lbl { font-size: var(--text-xs); color: var(--on-surface-3); }
.med-row-val { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--on-surface); }

/* ══════════════════════════════════════════
   CONVERSATION HISTORY
══════════════════════════════════════════ */
.convo-list { list-style: none; }
.convo-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
  cursor: pointer;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.convo-item:last-child { border-bottom: none; }
.convo-item.unread { background: var(--bg); }
.convo-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.convo-icon .material-icons { font-size: 18px; color: var(--primary); }
.convo-body { flex: 1; min-width: 0; }
.convo-topic {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.convo-item.unread .convo-topic { font-weight: var(--fw-bold); }
.convo-preview {
  font-size: var(--text-xs);
  color: var(--on-surface-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.convo-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.convo-time  { font-size: 10px; color: var(--on-surface-3); }
.convo-badge {
  background: var(--primary);
  color: white;
  font-size: 9px;
  font-weight: var(--fw-bold);
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════
   FAB
══════════════════════════════════════════ */
.fab {
  position: absolute;
  bottom: 64px;
  right: var(--space-4);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 5;
}
.fab .material-icons { font-size: 22px; color: white; }
.fab:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ══════════════════════════════════════════
   INFO BANNER (used in lab/med screens)
══════════════════════════════════════════ */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--warning-light);
  border-left: 3px solid var(--warning);
  margin: var(--space-2) 0 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.info-banner .material-icons { font-size: 16px; color: var(--warning); flex-shrink: 0; margin-top: 1px; }
.info-banner-text { font-size: var(--text-xs); color: var(--on-surface); line-height: var(--leading-relaxed); }

/* ══════════════════════════════════════════
   DRAWER — RIGHT SIDE OVERRIDE
   Slides in from the right instead of left
══════════════════════════════════════════ */
.drawer {
  left: auto;
  right: 0;
  box-shadow: -4px 0 20px rgba(0,0,0,0.18);
}

/* ══════════════════════════════════════════
   DRAWER HEADER EXTRAS
══════════════════════════════════════════ */
.drawer-header { position: relative; }

.drawer-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.drawer-close:hover { background: rgba(255,255,255,0.25); }
.drawer-close .material-icons { font-size: 20px; }

.drawer-edit-link {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  text-align: left;
  margin-top: var(--space-1);
}

/* ══════════════════════════════════════════
   HEALTH SCORE RING
══════════════════════════════════════════ */
.health-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) var(--space-4) var(--space-3);
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}
.health-score-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--success) 0% 78%, var(--divider) 78% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}
.health-score-inner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.health-score-num {
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--on-surface);
  line-height: 1;
}
.health-score-lbl {
  font-size: 9px;
  font-weight: var(--fw-medium);
  color: var(--on-surface-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.health-score-grade {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--success);
}
.health-score-sub {
  font-size: var(--text-xs);
  color: var(--on-surface-3);
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   VITALS GRID
══════════════════════════════════════════ */
.vitals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  padding: var(--space-3);
  flex-shrink: 0;
}
.vital-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.vital-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-1);
}
.vital-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vital-icon-wrap .material-icons { font-size: 16px; color: var(--primary); }
.vital-icon-wrap.teal  { background: #E0F7FA; }
.vital-icon-wrap.teal .material-icons  { color: var(--secondary); }
.vital-icon-wrap.green { background: var(--success-light); }
.vital-icon-wrap.green .material-icons { color: var(--success); }
.vital-icon-wrap.warn  { background: var(--warning-light); }
.vital-icon-wrap.warn .material-icons  { color: var(--warning); }
.vital-value-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.vital-value { font-size: var(--text-xl); font-weight: var(--fw-bold); color: var(--on-surface); line-height: 1; }
.vital-unit  { font-size: var(--text-xs); color: var(--on-surface-3); }
.vital-name  { font-size: 10px; color: var(--on-surface-2); font-weight: var(--fw-medium); }

/* ══════════════════════════════════════════
   ACTIVITY TIMELINE
══════════════════════════════════════════ */
.activity-list { list-style: none; }
.activity-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--divider);
}
.activity-row:last-child { border-bottom: none; }
.activity-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
  flex-shrink: 0;
}
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.activity-dot.ok   { background: var(--success); }
.activity-dot.info { background: var(--primary); }
.activity-dot.warn { background: var(--warning); }
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--on-surface); }
.activity-sub   { font-size: 10px; color: var(--on-surface-3); margin-top: 1px; }

/* ══════════════════════════════════════════
   SETTINGS LIST ROWS
   (supplements .list-item from parent CSS)
══════════════════════════════════════════ */
.settings-list { list-style: none; }
.settings-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 13px var(--space-4);
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
  cursor: pointer;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.settings-item-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-item-icon .material-icons { font-size: 18px; }
.si-blue   { background: var(--primary-light); }
.si-blue .material-icons   { color: var(--primary); }
.si-teal   { background: #E0F7FA; }
.si-teal .material-icons   { color: var(--secondary); }
.si-green  { background: var(--success-light); }
.si-green .material-icons  { color: var(--success); }
.si-orange { background: var(--warning-light); }
.si-orange .material-icons { color: var(--warning); }
.si-purple { background: #F3E5F5; }
.si-purple .material-icons { color: #7B1FA2; }
.si-grey   { background: var(--surface-var); }
.si-grey .material-icons   { color: var(--on-surface-2); }
.si-red    { background: var(--error-light); }
.si-red .material-icons    { color: var(--error); }
.settings-item-body { flex: 1; min-width: 0; }
.settings-item-label    { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--on-surface); }
.settings-item-sub      { font-size: var(--text-xs); color: var(--on-surface-3); margin-top: 1px; }
.settings-item-label.danger { color: var(--error); }
.settings-group-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--on-surface-3);
  padding: var(--space-3) var(--space-4) 6px;
  background: var(--bg);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 700px) {
  body { padding: 24px 16px 40px; padding-right: 16px; }
  #ctrl-panel { display: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   EDIT PROFILE FORM
══════════════════════════════════════════ */
.profile-avatar-edit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) var(--space-4) var(--space-2);
  gap: var(--space-1);
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
}
.avatar-edit-wrap { position: relative; display: inline-block; }
.avatar-cam-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid white;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.avatar-cam-btn .material-icons { font-size: 13px; }
.avatar-edit-name {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--on-surface);
  margin-top: var(--space-1);
}
.avatar-edit-hint { font-size: var(--text-xs); color: var(--primary); cursor: pointer; }

.profile-form {
  padding: var(--space-3) var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ══════════════════════════════════════════
   PROFILE SAVED SUCCESS
══════════════════════════════════════════ */
.profile-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) var(--space-4) var(--space-4);
  gap: var(--space-3);
}
.profile-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-success-icon .material-icons { font-size: 30px; color: var(--success); }
.profile-success h2 { font-size: var(--text-lg); font-weight: var(--fw-bold); color: var(--on-surface); }
.profile-success p { font-size: var(--text-sm); color: var(--on-surface-3); line-height: var(--leading-relaxed); }
.profile-change-summary {
  width: 100%;
  background: var(--surface-variant);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}
.profile-change-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.profile-change-row .material-icons { font-size: 16px; color: var(--success); margin-top: 1px; flex-shrink: 0; }
.profile-change-text { font-size: var(--text-xs); color: var(--on-surface); line-height: var(--leading-relaxed); }
.profile-change-text strong { font-weight: var(--fw-medium); }

/* ══════════════════════════════════════════
   AVATAR SIZE EXTENSION
══════════════════════════════════════════ */
.avatar-36 { width: 36px; height: 36px; font-size: var(--text-xs); font-weight: var(--fw-bold); }

/* ══════════════════════════════════════════
   ACCOUNT SWITCHER — BOTTOM SHEET
══════════════════════════════════════════ */
.bottom-sheet-overlay {
  position: absolute;
  inset: 0;
  z-index: 190;
  background: rgba(0,0,0,0.4);
}
.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.16);
  padding-bottom: var(--space-2);
}
.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--divider);
  margin: 10px auto var(--space-1);
}
.bottom-sheet-title {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--on-surface-3);
  padding: var(--space-2) var(--space-4) var(--space-1);
}
.account-list { list-style: none; }
.account-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
}
.account-item-info { flex: 1; min-width: 0; }
.account-item-name {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--on-surface);
  line-height: 1.3;
}
.account-item-role {
  font-size: var(--text-xs);
  color: var(--on-surface-3);
  margin-top: 1px;
}
.account-item-check { font-size: 20px; color: var(--primary); }
.account-sheet-divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: var(--space-1) 0;
}
.account-add-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.account-add-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.account-add-icon .material-icons { font-size: 20px; color: var(--on-surface-2); }
.account-add-label {
  font-size: var(--text-sm);
  color: var(--on-surface);
  font-weight: var(--fw-medium);
}

/* ══════════════════════════════════════════
   ACCOUNT SWITCHING TRANSITION
══════════════════════════════════════════ */
.switching-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: 100%;
  text-align: center;
  padding: var(--space-4);
}
.switching-avatar-wrap { position: relative; display: inline-block; }
.switching-spinner {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.switching-into {
  font-size: var(--text-xs);
  color: var(--on-surface-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.switching-name {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--on-surface);
}
.switching-sub { font-size: var(--text-sm); color: var(--on-surface-3); }

/* ══════════════════════════════════════════
   ACCESS DENIED ERROR SCREEN
══════════════════════════════════════════ */
.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-5) var(--space-4) var(--space-4);
  gap: var(--space-3);
}
.access-denied-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fdecea;
  display: flex;
  align-items: center;
  justify-content: center;
}
.access-denied-icon .material-icons { font-size: 32px; color: var(--error); }
.access-denied h2 {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--on-surface);
}
.access-denied p {
  font-size: var(--text-sm);
  color: var(--on-surface-3);
  line-height: var(--leading-relaxed);
}
.support-card {
  width: 100%;
  background: var(--surface-variant);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}
.support-card-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--on-surface-3);
}
.support-number-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.support-number-row .material-icons { font-size: 18px; color: var(--primary); flex-shrink: 0; }
.support-number {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--primary);
  letter-spacing: 0.5px;
}
.support-hours {
  font-size: var(--text-xs);
  color: var(--on-surface-3);
}
