/* ============================================
   MEDISENSE AI — Main Stylesheet
   Organized by section for easy editing
   ============================================ */

/* ===== CSS VARIABLES (colors, sizes, effects) ===== */
:root {
  --primary: #0a4f6e;
  --primary-light: #1a7fa8;
  --primary-dark: #062f42;
  --accent: #00d4aa;
  --accent-dark: #00a882;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
  --bg: #eef6fa;
  --bg2: #f8fcff;
  --dark: #0d1b2a;
  --card: #ffffff;
  --text: #1a2c3d;
  --text-muted: #5b7a8a;
  --border: #cde4ef;
  --shadow-sm: 0 2px 12px rgba(10, 79, 110, 0.08);
  --shadow: 0 8px 40px rgba(10, 79, 110, 0.14);
  --shadow-lg: 0 20px 60px rgba(10, 79, 110, 0.18);
  --gradient: linear-gradient(135deg, #0a4f6e 0%, #1a7fa8 60%, #00d4aa 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --nav-height: 68px;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

input,
textarea,
select {
  font-family: 'DM Sans', sans-serif;
}


/* ============================================
   AUTH PAGE
   ============================================ */
#auth-page {
  display: none;
  min-height: 100vh;
  background: linear-gradient(135deg, #062f42 0%, #0a4f6e 40%, #1a7fa8 70%, #00d4aa 100%);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

#auth-page.active {
  display: flex;
}

#auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.8rem 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 30px 80px rgba(6, 47, 66, 0.45);
  position: relative;
  z-index: 1;
  animation: authFadeIn 0.45s ease;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Logo on auth page */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  box-shadow: 0 6px 20px rgba(10, 79, 110, 0.35);
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.1);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.06);
  }

  70% {
    transform: scale(1);
  }
}

.auth-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
}

.auth-logo-text span {
  color: var(--accent);
}

/* Sign In / Register tab switch */
.auth-tab-wrap {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.8rem;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition);
}

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

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  text-align: center;
  margin-bottom: 0.3rem;
}

.auth-sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

/* Form inputs */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrap {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.75rem 2.8rem 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(10, 79, 110, 0.1);
}

.form-input::placeholder {
  color: #aac0cc;
}

.input-icon {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
}

/* Auth action button */
.auth-btn {
  width: 100%;
  padding: 0.88rem;
  border: none;
  border-radius: 50px;
  background: var(--gradient);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
  box-shadow: 0 4px 18px rgba(10, 79, 110, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(10, 79, 110, 0.38);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Divider (OR) */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.2rem 0;
}

.auth-divider span {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Google button */
.auth-google {
  width: 100%;
  padding: 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: white;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}

.auth-google:hover {
  border-color: var(--primary-light);
  background: var(--bg);
}

/* Error / Success messages */
.auth-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: var(--danger);
  font-size: 0.82rem;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: 8px;
}

.auth-success-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: #166534;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: 8px;
}

.auth-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
}

.auth-note a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}


/* ============================================
   PROFILE DROPDOWN (top nav)
   ============================================ */
.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.profile-btn:hover {
  border-color: var(--primary-light);
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 200px;
  z-index: 9999;
  display: none;
  padding: 0.5rem 0;
  animation: dropFade 0.2s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-dropdown.open {
  display: block;
}

.dropdown-header {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}

.dropdown-email {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.dropdown-username {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--bg);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
}

.dropdown-item.danger i {
  color: var(--danger);
}


/* ============================================
   NAVIGATION BAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(205, 228, 239, 0.8);
  box-shadow: 0 2px 20px rgba(10, 79, 110, 0.06);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(10, 79, 110, 0.3);
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.logo-text span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-links a,
.nav-link {
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover,
.nav-link:hover {
  color: var(--primary);
  background: var(--bg);
}

.nav-links a.active,
.nav-link.active {
  color: var(--primary);
  background: var(--bg);
  font-weight: 600;
}

/* "Start Diagnosis" CTA button in nav */
.nav-cta {
  margin-left: auto;
  background: var(--gradient) !important;
  color: white !important;
  padding: 9px 22px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(10, 79, 110, 0.25);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 79, 110, 0.35) !important;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}


/* ============================================
   PAGE SYSTEM
   ============================================ */
.page-wrapper {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.page {
  display: none;
  min-height: calc(100vh - var(--nav-height));
  animation: pageFadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat page is flex, not block */
.page.chat-page {
  display: none;
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
}

.page.chat-page.active {
  display: flex;
  flex-direction: column;
}


/* ============================================
   SHARED COMPONENTS (buttons, badges, etc.)
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 18px rgba(10, 79, 110, 0.28);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(10, 79, 110, 0.36);
}

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

.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
}

.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-full {
  padding: 5rem 2rem;
}

.section-center {
  text-align: center;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 79, 110, 0.07);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.6rem;
  line-height: 1.15;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef9c3;
  color: #854d0e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(10, 79, 110, 0.08);
  color: var(--primary);
  border: 1px solid var(--border);
}

.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.disclaimer i {
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 2px;
}

.disclaimer p {
  font-size: 0.82rem;
  color: #78350f;
  line-height: 1.6;
}


/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: var(--gradient);
  color: white;
  padding: 5.5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  pointer-events: none;
}

.hero-shape:nth-child(1) {
  width: 500px;
  height: 500px;
  top: -150px;
  right: -100px;
  background: white;
}

.hero-shape:nth-child(2) {
  width: 300px;
  height: 300px;
  bottom: -100px;
  left: -60px;
  background: rgba(255, 255, 255, 0.6);
}

.hero-shape:nth-child(3) {
  width: 200px;
  height: 200px;
  top: 30%;
  left: 30%;
  background: rgba(255, 255, 255, 0.4);
}

.hero-dots {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0/28px 28px;
  pointer-events: none;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 7px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.8rem;
}

.hero-badge i {
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

.accent {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.08rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 2.2rem;
  line-height: 1.72;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
}

.hero-stats>div {
  text-align: center;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  font-size: 0.76rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}


/* ============================================
   FEATURES GRID
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.feature-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}


/* HOW IT WORKS */
.how-bg {
  background: linear-gradient(135deg, #f0f9ff, #e0f5f0);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.step-item {
  text-align: center;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 6px 20px rgba(10, 79, 110, 0.28);
}

.step-item h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.step-item p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}


/* TESTIMONIALS */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow);
}

.testimonial-stars {
  color: var(--warning);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.2rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.author-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.author-role {
  font-size: 0.76rem;
  color: var(--text-muted);
}


/* CTA SECTION */
.cta-section {
  background: var(--gradient);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.8rem;
}

.cta-section p {
  opacity: 0.88;
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2.2rem;
}


/* FOOTER */
footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 2rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  opacity: 0.65;
  margin: 0.8rem 0 1.2rem;
}

.footer-col h4 {
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 1rem;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 1.2rem auto 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  opacity: 0.45;
}

.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
}

.social-icons a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: var(--transition);
}

.social-icons a:hover {
  background: rgba(255, 255, 255, 0.18);
  opacity: 1;
}


/* ============================================
   CHAT PAGE
   ============================================ */
.chat-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.chat-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0.8rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Symptom chips */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 0.3rem;
}

.chip {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(10, 79, 110, 0.05);
}

.chip.selected {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(10, 79, 110, 0.35);
}

/* "Send Selected Symptoms" button */
.send-chips-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 50px;
  background: var(--gradient);
  color: white;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(10, 79, 110, 0.2);
}

.send-chips-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(10, 79, 110, 0.3);
}

/* Patient info fields */
.patient-field {
  margin-bottom: 0.7rem;
}

.patient-field label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.3rem;
}

.patient-field input,
.patient-field select {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.83rem;
  outline: none;
  transition: var(--transition);
}

.patient-field input:focus,
.patient-field select:focus {
  border-color: var(--primary-light);
  background: white;
}

/* Emergency quick call panel */
.emergency-panel {
  background: linear-gradient(135deg, #fff5f5, #fff1f1);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
}

.emergency-panel h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 0.4rem;
}

.emergency-panel p {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.emr-call-btn {
  display: block;
  background: var(--danger);
  color: white;
  text-align: center;
  padding: 7px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.76rem;
  margin-bottom: 5px;
  transition: var(--transition);
  text-decoration: none;
}

.emr-call-btn:hover {
  background: #b91c1c;
}

/* Chat main area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.chat-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.ai-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(10, 79, 110, 0.25);
}

.online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.6;
    transform: scale(0.85)
  }
}

.ai-info h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

.clear-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 50px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.clear-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

/* Messages */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.msg {
  display: flex;
  gap: 10px;
  max-width: 90%;
  animation: msgIn 0.25s ease;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg.bot-msg {
  align-self: flex-start;
}

.msg.user-msg {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.msg-avatar-sm.bot {
  background: var(--gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(10, 79, 110, 0.2);
}

.msg-avatar-sm.usr {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
}

.bubble {
  padding: 0.88rem 1.1rem;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 100%;
}

.bot-msg .bubble {
  background: white;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.user-msg .bubble {
  background: var(--gradient);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(10, 79, 110, 0.25);
}

.bubble strong {
  font-weight: 700;
}

.bubble hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.6rem 0;
}

/* Typing indicator animation */
.typing-bubble {
  display: flex;
  gap: 5px;
  padding: 0.9rem 1.1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-light);
  animation: typBounce 1.2s ease infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typBounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: .4
  }

  40% {
    transform: translateY(-6px);
    opacity: 1
  }
}

.ai-thinking {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Input zone */
.input-zone {
  background: white;
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.quick-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.quick-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.76rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.quick-pill:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(10, 79, 110, 0.04);
}

.input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.msg-textarea {
  flex: 1;
  resize: none;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  line-height: 1.5;
  max-height: 140px;
  min-height: 48px;
  transition: var(--transition);
}

.msg-textarea:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(10, 79, 110, 0.08);
}

.msg-textarea::placeholder {
  color: #aac0cc;
}

/* Send button — round with paper-plane icon */
.send-btn-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(10, 79, 110, 0.3);
  flex-shrink: 0;
}

.send-btn-round:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(10, 79, 110, 0.4);
}

.send-btn-round:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


/* ============================================
   HOSPITALS PAGE
   ============================================ */
.hospitals-hero {
  background: var(--gradient);
  color: white;
  padding: 3.5rem 2rem;
}

.hospitals-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hospitals-hero h2 {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
}

.hospitals-hero p {
  opacity: 0.88;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Hospital search bar */
.search-bar {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 8px;
  backdrop-filter: blur(10px);
  align-items: center;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  outline: none;
  font-size: 0.9rem;
  padding: 4px 8px;
  min-width: 0;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.search-btn {
  padding: 8px 18px;
  border-radius: 50px;
  background: white;
  color: var(--primary);
  border: none;
  font-weight: 700;
  font-size: 0.83rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-btn:hover {
  transform: scale(1.02);
}

.map-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(10, 79, 110, 0.2);
}

/* Hospital cards grid */
.hosp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}

.hosp-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.hosp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.hosp-card-top {
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hosp-card-top.govt {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.hosp-card-top.pvt {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.hosp-card-top.clinic {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
}

.hosp-top-icon {
  font-size: 1.6rem;
}

.hosp-top-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
  padding: 3px 10px;
  border-radius: 20px;
}

.hosp-open-badge {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.hosp-open-badge.open {
  background: #dcfce7;
  color: #166534;
}

.hosp-open-badge.closed {
  background: #fee2e2;
  color: #991b1b;
}

.hosp-dist-badge {
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--primary);
  margin-left: auto;
}

.hosp-body {
  padding: 1.2rem;
}

.hosp-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.hosp-addr {
  display: flex;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  align-items: flex-start;
}

.hosp-addr i {
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 2px;
}

.hosp-meta-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.hosp-rating {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--warning);
}

.hosp-spec {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hosp-actions {
  display: flex;
  gap: 8px;
  margin-top: 1rem;
}

.hosp-btn {
  flex: 1;
  padding: 9px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hosp-btn-dir {
  background: var(--gradient);
  color: white;
  box-shadow: 0 3px 10px rgba(10, 79, 110, 0.2);
}

.hosp-btn-dir:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(10, 79, 110, 0.3);
}

.hosp-btn-call {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
}

.hosp-btn-call:hover {
  background: #dcfce7;
  border-color: var(--success);
  color: #166534;
}


/* ============================================
   SYMPTOMS PAGE
   ============================================ */
.symptoms-page-hero {
  background: var(--gradient);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.symptoms-page-hero h2 {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
}

.sym-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin: 1.5rem auto 0;
  background: white;
  border-radius: 50px;
  padding: 8px 8px 8px 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.sym-search-bar i {
  color: var(--text-muted);
}

.sym-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
}

.sym-search-btn {
  padding: 8px 18px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.sym-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.sym-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}

.sym-cat-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sym-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.sym-cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.sym-cat-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
}

.sym-cat-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sym-list {
  padding: 0.5rem;
}

.sym-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.sym-row:hover {
  background: var(--bg);
}

.sym-name {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

.sym-severity {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}


/* ============================================
   EMERGENCY PAGE
   ============================================ */
.emergency-hero {
  background: linear-gradient(135deg, #7f1d1d, #ef4444);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.emergency-hero h2 {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
}

.emergency-hero p {
  opacity: 0.88;
  max-width: 520px;
  margin: 0 auto;
}

.emr-numbers {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.emr-numbers h3 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.emr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.emr-num-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.8rem 1.2rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.emr-num-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.emr-num-icon {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
}

.emr-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--danger);
  line-height: 1;
}

.emr-num-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.3rem 0 1rem;
}

.emr-call-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--danger);
  color: white;
  padding: 9px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
  text-align: center;
}

.emr-call-link:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.emr-guide {
  background: white;
  padding: 3rem 2rem;
}

.emr-guide-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.emr-guide h3 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.guide-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--danger);
}

.guide-card h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.guide-card ul {
  list-style: none;
}

.guide-card ul li {
  font-size: 0.83rem;
  color: var(--text-muted);
  padding: 5px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.guide-card ul li:last-child {
  border-bottom: none;
}

.guide-card ul li::before {
  content: '⚠';
  flex-shrink: 0;
}

.first-aid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.first-aid h3 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.first-aid-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.fa-step {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
}

.fa-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.fa-step h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.fa-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}


/* ============================================
   ABOUT PAGE
   ============================================ */
.about-hero {
  background: var(--gradient);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
}

.about-hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.about-hero p {
  max-width: 580px;
  margin: 0 auto;
  opacity: 0.88;
  font-size: 1.08rem;
  line-height: 1.75;
}

.about-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.about-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.about-visual {
  border-radius: var(--radius-lg);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5.5rem;
  position: relative;
  overflow: hidden;
}

.about-visual.v1 {
  background: linear-gradient(135deg, #e0f5f0, #b2ead9);
}

.about-visual.v2 {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.about-visual.v3 {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.about-block h3 {
  font-size: 1.9rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.about-block p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.team-section {
  background: var(--bg2);
  padding: 4rem 2rem;
}

.team-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.tech-card {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.tech-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.tech-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}


/* ============================================
   MODALS (Profile + Chat History)
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 47, 66, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.2s ease;
}

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

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.25s ease;
  overflow: hidden;
}

.modal-wide {
  max-width: 640px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.modal-header h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg2);
  color: var(--danger);
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* Profile modal content */
.profile-info-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-big-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(10, 79, 110, 0.25);
}

.profile-info-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
}

.profile-info-email {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-info-since {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.profile-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: var(--bg);
  border-radius: 10px;
}

.profile-detail-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.profile-detail-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

.profile-actions-row {
  display: flex;
  gap: 10px;
}

.profile-action-btn {
  flex: 1;
  padding: 0.75rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: var(--transition);
}

.profile-action-btn:hover {
  background: var(--bg);
  border-color: var(--primary-light);
}

.profile-action-btn.danger {
  color: var(--danger);
  border-color: #fecaca;
}

.profile-action-btn.danger:hover {
  background: #fef2f2;
}

/* Chat history modal content */
.history-session {
  background: var(--bg);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
}

.history-session-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.history-session-msg {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 3px;
  display: flex;
  gap: 5px;
}

.history-session-msg.user {
  color: var(--primary);
}

.history-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.history-empty i {
  font-size: 2.5rem;
  opacity: 0.2;
  display: block;
  margin-bottom: 0.8rem;
}


/* ============================================
   RESPONSIVE (Mobile & Tablet)
   ============================================ */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .about-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .steps-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 4px;
    box-shadow: var(--shadow);
    z-index: 999;
  }

  .chat-layout {
    flex-direction: column;
  }

  .chat-sidebar {
    width: 100%;
    max-height: 200px;
  }

  .sidebar-scroll {
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 0.5rem 1rem;
  }

  .hosp-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .emr-cards {
    grid-template-columns: 1fr 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .about-block {
    grid-template-columns: 1fr;
  }

  .profile-actions-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .emr-cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 1rem;
  }

  .steps-row {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }
}

/* ============================================
   CHAT BOT RESPONSE FORMATTING — FIXED
   ============================================ */
.bot-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 5px 0;
}

.bot-list-num {
  display: flex;
  gap: 8px;
  margin: 4px 0;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.6;
}

.bot-num {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  min-width: 18px;
}

.bot-list-item {
  display: flex;
  gap: 8px;
  margin: 3px 0;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.6;
}

.bot-bullet {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.bot-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

/* Chip selected state — stronger highlight */
.chip.selected {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(10, 79, 110, 0.3);
}

.chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(10, 79, 110, 0.06);
}

/* ===== CHAT HISTORY ===== */
.chat-history {
  width: 220px;
  max-height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #eee;
  padding: 10px;
  background: #fafafa;
}

.chat-item {
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 8px;
  font-size: 0.9rem;
  background: #f1f1f1;
  transition: 0.2s;
}

.chat-item:hover {
  background: #e0e0e0;
}

/* STAR RATING */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

.star-rating i {
  font-size: 2rem;
  color: #ccc;
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
}

.star-rating i:hover {
  transform: scale(1.2);
}

.star-rating i.hover,
.star-rating i.active {
  color: #FFD700;
}

.modal-card.mini {
  max-width: 400px;
  width: 90%;
}

/* CONTACT PAGE */
.contact-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2rem 2rem;
}

.contact-header {
  margin-top: 0;
}

#page-contact {
  margin-top: 0;
  padding-top: 0;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-header h1 {
  font-size: 2.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  height: 100%;
}

.contact-form-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.info-item i {
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.info-item a,
.info-item span {
  font-size: 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.info-item a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.info-item:hover i {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(10, 79, 110, 0.2);
}

.contact-form-card textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  resize: none;
  margin-bottom: 1rem;
  outline: none;
}

.star-rating.big i {
  font-size: 2.5rem;
}

.social-links a {
  font-size: 1.5rem;
  margin-right: 1.5rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--primary);
}

.page {
  margin-top: 10px !important;
}

* {
  margin-top: 0;
}

#page-contact {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

#page-contact {
  top: 70px;
  /* navbar height */
}

#main-app {
  margin: 0 !important;
  padding: 0 !important;
}