/*
  DoseTrack - Professional Clinical Design System
  Optimized for accessible elder care, public presentation, separate login,
  and a full sidebar-driven dashboard layout.
  Strictly no emojis. Clean typography and SVG indicators.
*/

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;

  --accent-rose: #f43f5e;
  --accent-rose-light: #ffe4e6;
  
  --success: #059669;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;

  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8fafc;
  color: var(--slate-800);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

/* App Container for Public Views */
.public-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 60px 20px;
}

/* Global Public Header */
.main-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 26px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-symbol {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.brand-symbol img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(79, 70, 229, 0.28));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-block:hover .brand-symbol img,
.sidebar-brand-block:hover .brand-symbol img {
  transform: scale(1.08) rotate(1deg);
}

.brand-text-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.public-nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

.public-nav-link:hover {
  color: var(--primary);
}

/* View States */
.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

/* ========================================================================= */
/* VIEW 1: PUBLIC HOMEPAGE */
/* ========================================================================= */
.landing-hero-card {
  background: linear-gradient(135deg, #eef2ff 0%, #fdf2f8 50%, #f8fafc 100%);
  border: 1px solid #e0e7ff;
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.landing-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid var(--primary-border);
  margin-bottom: 22px;
}

.landing-hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
}

.landing-hero-sub {
  font-size: 1.15rem;
  color: var(--slate-600);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.landing-cta-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -5px rgba(79, 70, 229, 0.5);
}

.landing-demo-btn {
  background: #ffffff;
  color: var(--slate-800);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 30px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--slate-300);
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.landing-demo-btn:hover {
  background: var(--slate-50);
}

.section-headline {
  text-align: center;
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-sub {
  font-size: 1rem;
  color: var(--slate-500);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.feature-box {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--slate-100);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--slate-500);
  line-height: 1.5;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.step-number {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 12px;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.86rem;
  color: var(--slate-500);
}

.story-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.story-content {
  max-width: 650px;
}

.story-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.story-desc {
  font-size: 0.95rem;
  color: var(--slate-300);
  line-height: 1.6;
}

/* Public Footer */
.site-footer {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-link {
  color: var(--slate-600);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--primary);
}

/* ========================================================================= */
/* VIEW 2: DEDICATED SEPARATE LOGIN PAGE */
/* ========================================================================= */
.login-page-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 20px 60px 20px;
}

.login-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}

.login-page-headline {
  text-align: center;
  margin-bottom: 30px;
}

.login-grid-dual {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px;
  margin-bottom: 40px;
}

.login-card-panel {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 32px 26px;
  box-shadow: var(--shadow-md);
}

.login-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.login-card-sub {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-bottom: 18px;
}

.member-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.member-select-card {
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease;
}

.member-select-card:hover {
  border-color: var(--primary);
}

.member-select-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.member-select-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px auto;
}

.member-select-card.active .member-select-avatar {
  background: var(--primary);
  color: #ffffff;
}

.member-select-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-900);
}

.member-select-role {
  font-size: 0.7rem;
  color: var(--slate-500);
}

.pin-input-field {
  width: 100%;
  padding: 12px;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
  font-weight: 800;
  color: var(--slate-900);
  border: 2px solid var(--slate-300);
  border-radius: var(--radius-md);
  outline: none;
  margin-bottom: 14px;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 260px;
  margin: 0 auto 16px auto;
}

.keypad-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-800);
  cursor: pointer;
  transition: background 0.15s ease;
}

.keypad-btn:hover {
  background: var(--slate-200);
}

.demo-pin-hint {
  font-size: 0.8rem;
  color: var(--slate-500);
  text-align: center;
  background: var(--slate-100);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.demo-quick-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-demo-quick {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.btn-demo-quick:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.demo-quick-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-900);
}

.demo-quick-role {
  font-size: 0.78rem;
  color: var(--slate-500);
}

.demo-quick-pin {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  background: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
}

/* ========================================================================= */
/* VIEW 3: AUTHENTICATED DASHBOARD (SIDEBAR + HEADER + BODY + FOOTER) */
/* ========================================================================= */
.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f8fafc;
}

/* Side-left Bar (Sidebar): Screen height, fixed/sticky, does not move on scroll */
.dashboard-sidebar {
  width: 280px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border-right: 1.5px solid var(--slate-200);
  padding: 22px 18px;
  z-index: 50;
}

.sidebar-header {
  margin-bottom: 24px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 14px;
  margin-bottom: 16px;
  transition: all 0.15s ease;
}

.sidebar-user-card:hover {
  background: #ffffff;
  border-color: var(--slate-300);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--slate-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sidebar-user-role-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.sidebar-user-role {
  font-size: 0.74rem;
  color: var(--slate-500);
  font-weight: 600;
}

.sidebar-admin-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

/* Navigation Links in Sidebar */
.sidebar-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--slate-600);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.sidebar-nav-item:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.sidebar-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid var(--slate-200);
  padding-top: 16px;
}

.sidebar-bio-summary {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-bottom: 12px;
  line-height: 1.4;
}

.btn-sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-sidebar-logout:hover {
  background: #fee2e2;
}

/* Main Dashboard Content Area */
.dashboard-main-area {
  flex: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Dashboard Top Header */
.dashboard-top-header {
  background: #ffffff;
  border-bottom: 1.5px solid var(--slate-200);
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-header-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}

.dashboard-header-sub {
  font-size: 0.82rem;
  color: var(--slate-500);
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Dashboard Body Container */
.dashboard-body-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 26px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Dashboard Pages */
.dash-page {
  display: none;
}

.dash-page.active {
  display: block;
}

.member-greeting-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  color: #ffffff;
  margin-bottom: 22px;
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.greeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.greeting-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.greeting-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.greeting-text-title {
  font-size: 0.85rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.greeting-text-name {
  font-size: 1.45rem;
  font-weight: 800;
}

.greeting-action-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.schedule-action-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.btn-start-schedule {
  background: #ffffff;
  color: #e11d48;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 8px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease;
}

.btn-start-schedule:hover {
  transform: scale(1.04);
}

/* Calendar Days Ribbon */
.calendar-ribbon {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.calendar-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.calendar-day-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
}

.calendar-date-number {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-700);
}

.calendar-day-item.active .calendar-date-number {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

/* Personal Timeline Cards */
.timeline-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.timeline-card.taken {
  background: var(--success-light);
  border-color: var(--success-border);
}

.timeline-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.med-icon-pill {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--slate-100);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timeline-card.taken .med-icon-pill {
  background: var(--success);
  color: #ffffff;
}

.timeline-med-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
}

.timeline-med-dosage {
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 600;
}

.timeline-med-instruction {
  font-size: 0.82rem;
  color: var(--slate-700);
  margin-top: 2px;
}

.timeline-med-caution {
  font-size: 0.78rem;
  color: var(--warning);
  background: var(--warning-light);
  border: 1px solid var(--warning-border);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 4px;
}

.timeline-time-badge {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--slate-700);
  background: var(--slate-100);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Biometrics Profile Card */
.profile-biometrics-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

.bio-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.biometrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.bio-item {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.bio-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-400);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.bio-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-800);
}

/* All Family Members Grid */
.all-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.family-member-overview-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.family-member-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 10px;
}

.family-member-initials {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--slate-100);
  color: var(--slate-800);
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.family-member-title-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
}

.family-member-title-role {
  font-size: 0.78rem;
  color: var(--slate-500);
}

.sublist-med-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  margin-bottom: 6px;
}

.sublist-med-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-900);
}

.sublist-med-sub {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.sublist-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.sublist-status-pill.taken {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.sublist-status-pill.pending {
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-300);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.faq-question {
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.faq-answer {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.55;
}

/* Dashboard Footer */
.dashboard-footer {
  background: #ffffff;
  border-top: 1.5px solid var(--slate-200);
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--slate-500);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
}

/* ========================================================================= */
/* ALARM TRIGGER & MATH CHALLENGE MODAL */
/* ========================================================================= */
.alarm-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.alarm-overlay.active {
  display: flex;
}

.alarm-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 92%;
  padding: 34px 28px;
  box-shadow: 0 25px 50px -12px rgba(225, 29, 72, 0.4);
  text-align: center;
  border-top: 8px solid #e11d48;
}

.alarm-bell-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: #ffe4e6;
  color: #e11d48;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.alarm-box-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.alarm-box-sub {
  font-size: 0.9rem;
  color: var(--slate-600);
  margin-bottom: 22px;
}

.math-challenge-card {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  text-align: left;
}

.math-prompt-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.math-input-field {
  width: 100%;
  padding: 10px 14px;
  font-size: 1.1rem;
  font-weight: 700;
  border: 2px solid var(--slate-300);
  border-radius: var(--radius-sm);
  outline: none;
}

.math-input-field:focus {
  border-color: var(--primary);
}

.math-error-notice {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--danger);
  margin-top: 8px;
  display: none;
}

.btn-dismiss-alarm {
  width: 100%;
  background: #e11d48;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
}

/* Modals & Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--slate-700);
  border-color: var(--slate-300);
}

.btn-secondary:hover {
  background: var(--slate-50);
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger-border);
  padding: 6px 12px;
  font-size: 0.8rem;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 30px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--slate-400);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--slate-900);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--slate-900);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 10000;
}

/* Auth Tabs Navigation */
.auth-tabs-nav {
  display: flex;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 6px;
  margin-bottom: 24px;
  gap: 8px;
}

.auth-tab-btn {
  flex: 1;
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--slate-600);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-tab-btn:hover {
  color: var(--slate-900);
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-tab-panel {
  display: none;
}

.auth-tab-panel.active {
  display: block;
}

/* Registration Layout */
.register-card-panel {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 34px 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.form-section-divider {
  border-top: 1px solid var(--slate-200);
  margin: 22px 0 18px 0;
  padding-top: 16px;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.form-section-sub {
  font-size: 0.82rem;
  color: var(--slate-500);
  margin-bottom: 14px;
}

.form-row-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row-triple {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

@media (max-width: 680px) {
  .form-row-dual, .form-row-triple {
    grid-template-columns: 1fr;
  }
}

/* Admin Role Designation Card */
.admin-designation-card {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  cursor: pointer;
}

.admin-checkbox-custom {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.admin-card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #166534;
}

.admin-card-desc {
  font-size: 0.8rem;
  color: #15803d;
  line-height: 1.4;
  margin-top: 2px;
}

/* Badges */
.badge-admin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-role-tag {
  display: inline-block;
  background: var(--slate-100);
  color: var(--slate-700);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Collapsible FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.faq-accordion-item {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-accordion-item:hover {
  border-color: var(--slate-300);
}

.faq-accordion-item.open {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-accordion-header {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-800);
  font-family: inherit;
  transition: color 0.15s ease;
}

.faq-accordion-header:hover {
  color: var(--primary);
}

.faq-accordion-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-accordion-item.open .faq-accordion-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.2s ease;
  padding: 0 20px;
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.6;
  background: #fafafa;
}

.faq-accordion-item.open .faq-accordion-body {
  max-height: 600px;
  padding: 14px 20px 18px 20px;
  border-top: 1px solid var(--slate-100);
}

/* Multi-Column Modern Footer */
.site-footer-v2 {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 44px 36px 24px 36px;
  margin-top: 50px;
  box-shadow: var(--shadow-sm);
}

.footer-grid-v2 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (max-width: 860px) {
  .footer-grid-v2 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .footer-grid-v2 {
    grid-template-columns: 1fr;
  }
}

.footer-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.5;
  margin-bottom: 12px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--slate-900);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-nav-link {
  font-size: 0.86rem;
  color: var(--slate-600);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.footer-nav-link:hover {
  color: var(--primary);
}

.footer-bottom-bar-v2 {
  border-top: 1px solid var(--slate-200);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--slate-400);
}

/* About Page Specific Styles */
.about-hero-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 50%, #ffffff 100%);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-xl);
  padding: 56px 36px;
  text-align: center;
  margin-bottom: 36px;
}

.about-headline {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 12px;
  line-height: 1.25;
}

.about-sub {
  font-size: 1.05rem;
  color: var(--slate-600);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.6;
}

.about-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.about-card-box {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.about-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.about-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.about-card-desc {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.6;
}

.about-highlight-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 24px 0 36px 0;
}

.about-highlight-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.about-highlight-text {
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.6;
}

/* ========================================================================= */
/* FULL-WIDTH SYSTEM HEADERS & FOOTERS (EDGE-TO-EDGE)                        */
/* ========================================================================= */

.site-header-full {
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  border-bottom: 1.5px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
}

.header-inner-full {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.site-footer-full {
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  border-top: 1.5px solid var(--slate-200);
  padding: 40px 24px 28px 24px;
  box-sizing: border-box;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-inner-full {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Page content wrappers */
.public-page-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.public-content-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 20px 24px;
  box-sizing: border-box;
  flex: 1 0 auto;
}

/* Dashboard Top Header & Popovers */
.header-popover-wrapper {
  position: relative;
  display: inline-block;
}

.header-icon-btn {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-700);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.header-icon-btn:hover {
  background: var(--slate-100);
  border-color: var(--slate-300);
  color: var(--primary);
}

.header-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-rose);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  text-align: center;
  border: 2px solid #ffffff;
}

.header-profile-btn {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  padding: 4px 14px 4px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-profile-btn:hover {
  background: var(--slate-50);
  border-color: var(--primary-border);
}

.header-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-profile-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.header-profile-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.2;
}

.header-profile-role {
  font-size: 0.72rem;
  color: var(--slate-500);
}

.header-chevron {
  color: var(--slate-400);
  transition: transform 0.2s ease;
}

.header-dropdown-holder {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 35px -5px rgba(15, 23, 42, 0.18);
  z-index: 1100;
}

.header-dropdown-holder.active {
  display: block;
  animation: holderFadeIn 0.18s ease-out;
}

@keyframes holderFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.notifications-holder {
  width: 380px;
  max-width: calc(100vw - 32px);
}

.profile-holder {
  width: 360px;
  max-width: calc(100vw - 32px);
}

.holder-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.holder-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
}

.holder-close-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--slate-400);
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.holder-close-btn:hover {
  color: var(--slate-700);
}

.holder-list-content {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px;
}

.holder-notif-item {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-100);
  background: var(--slate-50);
  margin-bottom: 8px;
  font-size: 0.83rem;
}

.holder-notif-item.urgent {
  background: #fff1f2;
  border-color: #fecdd3;
}

.holder-notif-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.holder-notif-title {
  font-weight: 700;
  color: var(--slate-900);
}

.holder-notif-time {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.holder-notif-body {
  color: var(--slate-600);
}

.holder-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: flex-end;
}

.holder-profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.holder-big-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.holder-user-fullname {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
}

.holder-user-username {
  font-size: 0.82rem;
  color: var(--slate-500);
}

.holder-body {
  padding: 18px 20px;
}

.holder-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.holder-bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.holder-bio-item {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.holder-notes-box {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.holder-notes-text {
  font-size: 0.8rem;
  color: var(--slate-600);
  line-height: 1.4;
  margin-top: 4px;
}

.holder-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--slate-50);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Post-Registration Onboarding Modal */
.modal-onboarding-card {
  max-width: 680px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.onboarding-intro-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.onboarding-intro-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.onboarding-intro-text {
  font-size: 0.85rem;
  color: var(--slate-600);
  line-height: 1.5;
}

.onboarding-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
  margin: 18px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--slate-200);
}

/* ========================================================================= */
/* PUBLIC LAYOUT & NAVIGATION STYLES                                         */
/* ========================================================================= */

.nav-links-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-item {
  color: var(--slate-600);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 4px;
  position: relative;
  transition: color 0.15s ease;
}

.nav-item:hover {
  color: var(--primary);
}

.nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.nav-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-text-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.2;
}

.brand-subtext {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 600;
}

/* ========================================================================= */
/* HERO SECTION & STATS CARDS                                                */
/* ========================================================================= */

.public-hero-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 50%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  margin-bottom: 32px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.06);
}

.hero-split-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-split-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-title {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: #e0e7ff;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  margin-right: 8px;
  animation: pulseDot 2s infinite ease-in-out;
}

.hero-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 14px;
  line-height: 1.25;
}

.hero-description {
  font-size: 1.02rem;
  color: var(--slate-600);
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-interactive-card {
  background: #ffffff;
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 10px 30px -5px rgba(79, 70, 229, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.hero-interactive-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px -5px rgba(79, 70, 229, 0.22);
  border-color: var(--primary);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 10px;
}

.hero-card-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--slate-900);
}

.hero-live-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-light);
  border: 1px solid var(--success-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.hero-dose-sample {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.hero-dose-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.hero-time-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.hero-member-tag {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 600;
}

.hero-med-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 3px;
}

.hero-instructions {
  font-size: 0.76rem;
  color: var(--slate-600);
}

.hero-math-preview {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.hero-math-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 8px;
}

.hero-math-equation {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.math-solution {
  background: #ffffff;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1.5px solid #22c55e;
  color: #15803d;
}

.math-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-math-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: #166534;
}

.hero-family-live-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2px;
}

.hero-avatars-cluster {
  display: flex;
  align-items: center;
}

.cluster-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
  border: 2px solid #ffffff;
  margin-left: -6px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.cluster-avatar:first-child {
  margin-left: 0;
}

.cluster-avatar:hover {
  transform: translateY(-3px) scale(1.15);
  z-index: 10;
}

.cluster-avatar.mo { background: #ec4899; }
.cluster-avatar.fa { background: #3b82f6; }
.cluster-avatar.gf { background: #10b981; }
.cluster-avatar.gm { background: #f59e0b; }

.hero-adherence-stat {
  font-size: 0.78rem;
  color: var(--slate-600);
}

.hero-adherence-stat strong {
  color: var(--success);
  font-weight: 800;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 0.95rem;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #dc2626;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-text-action {
  background: none;
  border: none;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

@media (max-width: 860px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

.stat-pill-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.stat-pill-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-pill-card:hover .stat-icon-wrapper {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.stat-num {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-600);
  line-height: 1.35;
}

/* ========================================================================= */
/* FEATURES GRID & WORKFLOW                                                  */
/* ========================================================================= */

.section-header-center {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px auto;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 10px;
  line-height: 1.25;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.55;
}

.features-section {
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-item-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
}

.feature-item-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-item-card:hover .feature-icon-wrapper {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.12) rotate(-4deg);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.feature-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.feature-card-desc {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.6;
}

.workflow-section {
  margin-bottom: 56px;
}

.workflow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.step-card:hover .step-badge {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.step-badge {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.step-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--slate-600);
  line-height: 1.5;
}

/* ========================================================================= */
/* CAREGIVER STORY & FAQS                                                    */
/* ========================================================================= */

.family-story-card {
  background: radial-gradient(120% 120% at 50% 0%, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-xl);
  padding: 44px 36px 36px 36px;
  color: #ffffff;
  margin-bottom: 50px;
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.35);
  position: relative;
  overflow: hidden;
}

.family-story-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), transparent);
}

.story-header-block {
  margin-bottom: 32px;
}

.story-tag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.story-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.story-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 2s infinite ease-in-out;
}

.story-badge-pill {
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.story-heading {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.story-body {
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.65;
  max-width: 960px;
}

/* 4-Elder Member Grid */
.elder-safeguard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 820px) {
  .elder-safeguard-grid {
    grid-template-columns: 1fr;
  }
}

.elder-member-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.elder-member-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.2);
}

.elder-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.elder-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}

.elder-member-card:hover .elder-avatar {
  transform: scale(1.06);
}

.elder-avatar-mother {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.elder-avatar-father {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.elder-avatar-gf {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.elder-avatar-gm {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

.elder-meta {
  flex: 1;
  min-width: 0;
}

.elder-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.elder-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.elder-admin-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.35);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.elder-role-age {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
}

.elder-condition-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.elder-meds-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  flex: 1;
}

.elder-med-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  gap: 8px;
}

.elder-med-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.elder-med-dot.taken {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.elder-med-dot.scheduled {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

.elder-med-name {
  font-weight: 700;
  color: #f8fafc;
  flex: 1;
}

.elder-med-time {
  font-size: 0.74rem;
  color: #94a3b8;
}

.elder-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  margin-top: auto;
  font-size: 0.78rem;
}

.elder-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.elder-status-pill.verified {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.elder-status-pill.on-track {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.3);
}

.elder-status-pill.protected {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(216, 180, 254, 0.3);
}

.elder-math-hint {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Bottom Caregiver Assurance Strip */
.elder-safeguard-strip {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.elder-strip-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.elder-strip-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(165, 180, 252, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  flex-shrink: 0;
}

.elder-strip-text {
  display: flex;
  flex-direction: column;
}

.elder-strip-text strong {
  font-size: 0.84rem;
  color: #ffffff;
  font-weight: 700;
}

.elder-strip-text span {
  font-size: 0.74rem;
  color: #94a3b8;
}

.elder-strip-action .btn {
  white-space: nowrap;
}

.faq-section-wrapper {
  margin-bottom: 0px;
}

.faq-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.faq-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

.faq-accordion-container {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-accordion-item {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-left: 4px solid transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-accordion-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.faq-accordion-item.active {
  border-color: #e2e8f0;
  border-left: 4px solid var(--primary);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.09);
  background: #ffffff;
}

.faq-accordion-btn {
  width: 100%;
  padding: 18px 22px;
  background: #ffffff;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.faq-accordion-btn:hover {
  background: #f8fafc;
}

.faq-accordion-item.active .faq-accordion-btn {
  background: #fbfcfe;
}

.faq-question-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.faq-cat-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-cat-math {
  background: #eff6ff;
  color: #2563eb;
}

.faq-cat-family {
  background: #f5f3ff;
  color: #7c3aed;
}

.faq-cat-admin {
  background: #fffbeb;
  color: #d97706;
}

.faq-cat-security {
  background: #ecfdf5;
  color: #059669;
}

.faq-cat-vitals {
  background: #fef2f2;
  color: #dc2626;
}

.faq-accordion-item:hover .faq-cat-badge {
  transform: scale(1.08);
}

.faq-question-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.45;
}

.faq-chevron-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
  color: var(--slate-500);
}

.faq-accordion-item:hover .faq-chevron-circle {
  background: #e2e8f0;
  color: var(--slate-800);
}

.faq-accordion-item.active .faq-chevron-circle {
  background: var(--primary);
  color: #ffffff;
  transform: rotate(180deg);
}

.faq-chevron {
  transition: transform 0.25s ease;
}

.faq-accordion-body {
  display: none;
  padding: 4px 24px 22px 74px;
  font-size: 0.92rem;
  color: var(--slate-600);
  line-height: 1.65;
  animation: faqBodyFade 0.25s ease;
}

@keyframes faqBodyFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-accordion-item.active .faq-accordion-body {
  display: block;
}

.faq-highlight-pill {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-700);
}

.faq-highlight-pill strong {
  color: var(--primary);
}

@media (max-width: 640px) {
  .faq-accordion-btn {
    padding: 14px 16px;
  }
  .faq-accordion-body {
    padding: 4px 16px 18px 16px;
  }
  .faq-question-wrap {
    gap: 10px;
  }
  .faq-question-text {
    font-size: 0.92rem;
  }
  .faq-cat-badge {
    width: 32px;
    height: 32px;
  }
}


/* ========================================================================= */
/* CARDS, MODALS, ALERTS, & FORMS                                            */
/* ========================================================================= */

.card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.login-card-box {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.auth-tabs-row {
  display: flex;
  gap: 8px;
}

.demo-account-btn {
  font-size: 0.78rem;
  padding: 6px 12px;
}

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
  max-width: 580px;
  width: 90%;
  overflow: hidden;
  animation: modalSlideUp 0.2s ease-out;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}

.modal-body {
  padding: 24px;
}

.adherence-progress-box {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 14px;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #ffffff;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-badge {
  padding: 3px 10px;
  background: #fef3c7;
  color: #b45309;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--slate-200);
}

.sidebar-brand-block .brand-symbol {
  width: 56px;
  height: 56px;
}

.sidebar-brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 600;
}

.sidebar-nav-list {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.bio-display-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.sample-rx-btn {
  font-size: 0.78rem;
  padding: 5px 10px;
}

/* ========================================================================= */
/* IMPROVED FULL-WIDTH FOOTER                                                */
/* ========================================================================= */

.footer-grid-improved {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

@media (max-width: 860px) {
  .footer-grid-improved {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 580px) {
  .footer-grid-improved {
    grid-template-columns: 1fr;
  }
}

.footer-desc-column {
  max-width: 620px;
}

.footer-caregiver-assurance {
  font-size: 0.82rem;
  color: var(--slate-500);
  line-height: 1.5;
  margin-top: 10px;
}

/* ========================================================================= */
/* DASHBOARD LAYOUT CENTERING & SIDEBAR BOTTOM NAV                           */
/* ========================================================================= */

.dash-centered-container {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
}

.sidebar-bottom-block {
  border-top: 1px solid var(--slate-200);
  padding-top: 14px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-bottom-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-400);
  padding: 4px 14px 6px 14px;
}

/* ========================================================================= */
/* DASHBOARD ANALYTICS & VISUALIZATIONS                                      */
/* ========================================================================= */

.schedule-analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 860px) {
  .schedule-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.chart-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
}

.chart-card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--success-light);
  color: var(--success);
}

/* 7-Day Weekly Bar Graph */
.weekly-bar-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 140px;
  padding-top: 16px;
  gap: 12px;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-600);
}

.chart-bar-track {
  width: 100%;
  max-width: 32px;
  height: 90px;
  background: var(--slate-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.chart-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, #6366f1 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.4s ease;
}

.chart-bar-fill.perfect {
  background: linear-gradient(180deg, var(--success) 0%, #34d399 100%);
}

.chart-bar-fill.missed {
  background: linear-gradient(180deg, var(--warning) 0%, #fbbf24 100%);
}

.chart-bar-day {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-500);
}

/* Time of Day Donut / Distribution */
.donut-chart-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  padding: 10px 0;
}

.donut-svg-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.donut-inner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-center-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.1;
}

.donut-center-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
}

.donut-legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--slate-700);
}

.donut-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-right: 8px;
}

.streak-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 680px) {
  .streak-metrics-row {
    grid-template-columns: 1fr;
  }
}

.streak-metric-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.streak-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.streak-metric-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.1;
}

.streak-metric-label {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 600;
}

/* Family Adherence Analytics */
.family-analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 860px) {
  .family-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.family-comp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.family-comp-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.family-comp-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-800);
}

.family-comp-track {
  width: 100%;
  height: 10px;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.family-comp-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--primary);
  transition: width 0.4s ease;
}

.category-dist-bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 16px 0 14px 0;
}

.cat-segment {
  height: 100%;
}

/* ========================================================================= */
/* HOUSEHOLD MEDICATION ADHERENCE CALENDAR STYLES */
/* ========================================================================= */
.calendar-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.calendar-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-title-box h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 2px;
}

.calendar-title-box p {
  font-size: 0.82rem;
  color: var(--slate-500);
}

.calendar-legend-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  font-weight: 700;
}

.calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  text-align: center;
}

.cal-col-header {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--slate-400);
  padding: 4px 0;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-day-cell {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
  position: relative;
}

.cal-day-cell:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.cal-day-cell.perfect {
  background: #f0fdf4;
  border-color: #86efac;
}

.cal-day-cell.missed {
  background: #fef2f2;
  border-color: #fca5a5;
}

.cal-day-cell.today {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.cal-day-cell.future {
  opacity: 0.75;
  background: #ffffff;
}

.cal-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.cal-day-number {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--slate-800);
}

.cal-day-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.cal-day-badge.perfect {
  background: var(--success-light);
  color: var(--success);
}

.cal-day-badge.missed {
  background: #fee2e2;
  color: #b91c1c;
}

.cal-day-badge.future {
  background: var(--slate-100);
  color: var(--slate-500);
}

.cal-day-meta {
  font-size: 0.72rem;
  color: var(--slate-500);
  line-height: 1.2;
}

.cal-day-meta strong {
  color: var(--slate-700);
}

@media (max-width: 768px) {
  .calendar-days-grid, .calendar-grid-header {
    gap: 4px;
  }
  .cal-day-cell {
    padding: 6px 4px;
    min-height: 60px;
  }
  .cal-day-number {
    font-size: 0.75rem;
  }
  .cal-day-meta {
    font-size: 0.65rem;
  }
}

/* Family Admin Connection Banner */
.family-admin-connection-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  box-shadow: 0 4px 14px rgba(30, 27, 75, 0.16);
  flex-wrap: wrap;
  gap: 12px;
}

.family-admin-connection-banner .admin-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.family-admin-connection-banner .admin-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: #0284c7;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.family-admin-connection-banner .admin-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.family-admin-connection-banner .admin-sub {
  font-size: 0.82rem;
  color: #c7d2fe;
  margin-top: 2px;
}

.family-admin-connection-banner .admin-network-tag {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* Master Family Medications Table */
.family-meds-table-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.family-meds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.family-meds-table th {
  background: var(--slate-50);
  color: var(--slate-700);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--slate-200);
  white-space: nowrap;
}

.family-meds-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}

.family-meds-table tr:hover td {
  background: #f8fafc;
}

.family-member-pill-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-pill-btn {
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill-btn:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.filter-pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.card-admin-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  margin-top: 4px;
}

/* ========================================================================= */
/* COMPACT ADHERENCE CALENDAR CONTAINER (SCHEDULE & FAMILY PAGES) */
/* ========================================================================= */
.compact-calendar-container {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.compact-calendar-container:hover {
  border-color: var(--slate-300);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.compact-calendar-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.compact-cal-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.compact-cal-highlight-badge .pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
  animation: pulse-ring 2s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.compact-cal-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 2px;
}

.compact-cal-subheading {
  font-size: 0.78rem;
  color: var(--slate-500);
}

.compact-cal-legend-group {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--slate-600);
  padding: 5px 10px;
  background: var(--slate-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
}

.compact-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.compact-cal-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.compact-cal-dot.taken { background: #059669; }
.compact-cal-dot.missed { background: #e11d48; }
.compact-cal-dot.scheduled { background: #cbd5e1; }
.compact-cal-dot.today-ring {
  background: #ffffff;
  border: 2px solid #2563eb;
}

.compact-calendar-wrapper {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.compact-cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.compact-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

/* Individual Small Calendar Cell */
.compact-day-cell {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  padding: 6px 4px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.compact-day-cell:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
  background: #ffffff;
  z-index: 5;
}

.compact-day-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700);
  line-height: 1;
}

.compact-day-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}

.compact-day-cell.taken .compact-day-dot {
  background: #059669;
  box-shadow: 0 0 4px rgba(5, 150, 105, 0.5);
}

.compact-day-cell.missed .compact-day-dot {
  background: #e11d48;
  box-shadow: 0 0 4px rgba(225, 29, 72, 0.5);
}

.compact-day-cell.future .compact-day-dot {
  background: #cbd5e1;
}

.compact-day-cell.today {
  border: 2px solid #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.compact-day-cell.today .compact-day-num {
  color: #1d4ed8 !important;
  font-weight: 900 !important;
}

.compact-day-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--slate-500);
  line-height: 1;
}

.compact-day-cell.taken .compact-day-label {
  color: #059669;
}

.compact-day-cell.missed .compact-day-label {
  color: #e11d48;
}

/* Tooltip on cell hover */
.compact-day-cell .compact-day-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  padding: 5px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.compact-day-cell:hover .compact-day-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================================================================= */
/* HOVER EFFECTS ACROSS ALL VISUALIZATIONS */
/* ========================================================================= */
/* 1. Bar Charts Hover */
.chart-bar-col {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.chart-bar-col:hover {
  transform: translateY(-4px);
}

.chart-bar-col:hover .chart-bar-fill {
  filter: brightness(1.12);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.chart-bar-col:hover .chart-bar-val {
  color: var(--primary);
  font-weight: 900;
  transform: scale(1.12);
  transition: transform 0.15s ease, color 0.15s ease;
}

/* 2. Donut SVG Chart Hover */
.donut-svg-wrapper circle {
  transition: stroke-width 0.25s ease, opacity 0.2s ease, filter 0.25s ease;
  cursor: pointer;
}

.donut-svg-wrapper circle:hover {
  stroke-width: 4.6;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
  opacity: 0.95;
}

.donut-legend-item {
  cursor: pointer;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, transform 0.15s ease;
}

.donut-legend-item:hover {
  background: var(--slate-100);
  transform: translateX(4px);
}

/* 3. Multi-segment Category Distribution Bar */
.category-dist-bar {
  overflow: hidden;
  border-radius: var(--radius-full);
}

.cat-segment {
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.cat-segment:hover {
  filter: brightness(1.18);
  transform: scaleY(1.3);
  position: relative;
  z-index: 2;
}

/* 4. Family Member Comparative Compliance Items */
.family-comp-item {
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.family-comp-item:hover {
  background: var(--slate-50);
  transform: translateX(4px);
  border-left: 3px solid var(--primary);
}

.family-comp-item:hover .family-comp-fill {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* 5. SVG Vitals Graphs (BP & Sugar) Interactive Hover */
.vitals-chart-svg {
  overflow: visible;
}

.vitals-chart-svg circle {
  cursor: pointer;
  transition: r 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease, stroke-width 0.2s ease;
}

.vitals-chart-svg circle:hover {
  r: 7.5 !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  stroke-width: 3.5 !important;
}

.vitals-chart-svg polyline {
  transition: stroke-width 0.2s ease, filter 0.2s ease;
}

.vitals-chart-svg:hover polyline {
  stroke-width: 3.2;
}

/* 6. Metric Cards & Statistical Cards Hover */
.streak-metric-card, .vitals-stat-card, .chart-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.streak-metric-card:hover, .vitals-stat-card:hover, .chart-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
  border-color: var(--slate-300);
}


