/* ===================================================
   MedAssist AI — Main Stylesheet
   =================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-accent: #06b6d4;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;

  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-bg: #f8fafc;
  --color-white: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.10);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
textarea, input, select {
  font-family: inherit;
  font-size: 1rem;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { display: none; }
.section.active { display: block; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 9000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}
.logo-icon { font-size: 1.4rem; color: var(--color-primary); flex-shrink: 0; }
img.logo-icon {
  object-fit: contain;
  flex-shrink: 0;
}
.logo-text { font-weight: 300; letter-spacing: 0.02em; }
.logo-d { font-weight: 800; color: var(--color-primary); letter-spacing: 0; }
.logo-ai {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 5px;
  margin-left: 3px;
  vertical-align: middle;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--color-primary); text-decoration: none; }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
}
.mobile-menu.open { display: flex; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); text-decoration: none; color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-light); text-decoration: none; }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-arrow { font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 3rem 0 3.5rem;
  background:
    linear-gradient(to bottom, rgba(219,234,254,0.30) 0%, rgba(255,255,255,0.85) 100%),
    url('assets/background.png') center top / cover no-repeat;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  border: 1px solid #bfdbfe;
}
.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
  color: var(--color-text);
}
.text-accent { color: var(--color-primary); }
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.hero-trust {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.trust-item {
  font-size: 0.85rem;
  color: var(--color-success);
  font-weight: 500;
}

/* Hero Card (right side visual) */
.hero-visual { display: flex; justify-content: center; }
.hero-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--color-surface-alt);
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.green { background: var(--color-success); }
.hero-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.chat-bubble {
  max-width: 85%;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.chat-bubble.bot {
  background: var(--color-primary-light);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.chat-bubble.user {
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

/* Typing animation */
.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 16px;
}
.typing-dots span {
  width: 7px; height: 7px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ---------- Section Blocks ---------- */
.section-block {
  padding: 5rem 0;
}
.section-alt {
  background: var(--color-surface-alt);
}
.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 1rem;
  margin-bottom: 3rem;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.step-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  position: relative;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-icon { font-size: 2.5rem; margin-bottom: 1rem; margin-top: 0.5rem; }
.step-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.9rem; color: var(--color-text-secondary); }

/* Sources grid */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.source-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}
.source-card:hover { box-shadow: var(--shadow-md); }
.source-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.source-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem; }
.source-card p { font-size: 0.85rem; color: var(--color-text-secondary); }

/* Disclaimer */
.disclaimer-box {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.disclaimer-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.disclaimer-box h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; color: #92400e; }
.disclaimer-box p { font-size: 0.95rem; color: #78350f; margin-bottom: 0.75rem; }
.disclaimer-emergency { color: var(--color-danger) !important; font-weight: 500; }

/* CTA section */
.section-cta {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
}
.section-cta h2 { font-size: 2rem; font-weight: 800; color: #fff; text-align: center; margin-bottom: 0.5rem; }
.section-cta p { color: rgba(255,255,255,0.85); text-align: center; margin-bottom: 1.75rem; }
.text-center { text-align: center; }

/* Footer */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #e2e8f0;
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: #e2e8f0; }
.footer-copy { font-size: 0.8rem; }

/* ---------- Questionnaire ---------- */
.questionnaire-container {
  max-width: 680px;
  padding: 2.5rem 1.5rem 4rem;
}
.q-header {
  margin-bottom: 2.5rem;
}
.btn-back {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition);
}
.btn-back:hover { color: var(--color-primary); }
.q-header h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.75rem; }
.q-progress {
  height: 6px;
  background: var(--color-border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.q-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 100px;
  transition: width 0.4s ease;
}
.q-steps { font-size: 0.8rem; color: var(--color-text-muted); }

/* Steps */
.q-step { display: none; }
.q-step.active { display: block; }
.q-step h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.25rem; }
.q-step-desc { color: var(--color-text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

/* Form elements */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.required { color: var(--color-danger); }
.optional { color: var(--color-text-muted); font-weight: 400; font-size: 0.82rem; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Radio cards */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.radio-card {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}
.radio-card input[type="radio"] { display: none; }
.radio-label {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--color-white);
  color: var(--color-text-secondary);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  user-select: none;
}
.radio-card input:checked + .radio-label {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.radio-card small .radio-label { padding: 0.45rem 0.85rem; font-size: 0.85rem; }

/* Intensity slider */
.intensity-slider { }
.intensity-slider input[type="range"] {
  width: 100%;
  height: 6px;
  accent-color: var(--color-primary);
  cursor: pointer;
  margin-bottom: 0.4rem;
  border: none;
  background: none;
  padding: 0;
}
.intensity-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.intensity-current {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
}

/* Checkbox cards grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.checkbox-card {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}
.checkbox-card input[type="checkbox"] { display: none; }
.checkbox-card span {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--color-white);
  color: var(--color-text-secondary);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  text-align: center;
  user-select: none;
}
.checkbox-card input:checked + span {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Consent box */
.consent-box {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.checkbox-inline {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.checkbox-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--color-primary);
  margin-top: 2px;
  cursor: pointer;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ---------- Loading ---------- */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  gap: 1rem;
}
.loading-spinner {
  width: 56px; height: 56px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-container h2 { font-size: 1.5rem; font-weight: 700; }
.loading-text { color: var(--color-text-secondary); }
.loading-steps {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 260px;
  text-align: left;
}
.loading-step {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 0.4rem 0;
  transition: color 0.3s;
}
.loading-step.active { color: var(--color-success); font-weight: 600; }
.loading-step.done { color: var(--color-success); }

/* ---------- Results ---------- */
.results-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 64px);
}
.results-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.results-summary {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.results-summary h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--color-text); }
.summary-content { font-size: 0.875rem; color: var(--color-text-secondary); }
.summary-row { margin-bottom: 0.4rem; }
.summary-row strong { color: var(--color-text); font-weight: 600; }

.results-sources {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.results-sources h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.75rem; }
.sources-list { display: flex; flex-direction: column; gap: 0.4rem; }
.source-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
}
.source-item-badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.results-actions { display: flex; flex-direction: column; gap: 0.6rem; }

.disclaimer-mini {
  font-size: 0.78rem;
  color: var(--color-warning);
  padding: 0.6rem 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ---------- Chat ---------- */
.chat-container {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: calc(100vh - 100px);
  position: sticky;
  top: 80px;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--color-surface-alt);
}
.chat-badge {
  margin-left: auto;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid #fde68a;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.msg.bot { align-self: flex-start; }
.msg.user { align-self: flex-end; }
.msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}
.msg.bot .msg-bubble {
  background: var(--color-surface-alt);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}
.msg.user .msg-bubble {
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-time {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  padding: 0 0.25rem;
}
.msg.user .msg-time { text-align: right; }

/* Markdown in bot messages */
.msg-bubble p { margin: 0 0 0.3rem; line-height: 1.5; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble ul, .msg-bubble ol { margin: 0.2rem 0 0.3rem 1.1rem; padding: 0; }
.msg-bubble li { margin-bottom: 0.1rem; line-height: 1.4; }
.msg-bubble strong { font-weight: 700; }
.msg-bubble em { font-style: italic; }
.msg-bubble code {
  background: rgba(0,0,0,0.06);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.85em;
  font-family: monospace;
}

/* Sources in bot messages */
.msg-sources {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--color-primary-dark);
  border-left: 3px solid var(--color-primary);
}
.msg-sources strong { display: block; margin-bottom: 0.3rem; }
.msg-sources span {
  display: inline-block;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 1px 6px;
  margin: 2px 2px 0 0;
  font-weight: 600;
}

/* Typing indicator in chat */
.msg-typing .msg-bubble {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
}

/* Chat input */
.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
}
.chat-input-area textarea {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  resize: none;
  outline: none;
  font-size: 0.9rem;
  line-height: 1.5;
  max-height: 120px;
  transition: border-color var(--transition);
  background: var(--color-surface-alt);
}
.chat-input-area textarea:focus {
  border-color: var(--color-primary);
  background: var(--color-white);
}
.btn-send {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.btn-send:hover:not(:disabled) { background: var(--color-primary-dark); }
.btn-send:disabled { background: var(--color-border); cursor: default; }

/* Emergency banner */
.emergency-banner {
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  z-index: 200;
  background: var(--color-danger);
  color: #fff;
  text-align: center;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* ---------- Legal pages ---------- */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.legal-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.legal-page .updated { color: var(--color-text-muted); font-size: 0.875rem; margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--color-text); }
.legal-page p { font-size: 0.95rem; color: var(--color-text-secondary); margin-bottom: 0.75rem; line-height: 1.7; }
.legal-page ul { margin: 0.5rem 0 0.75rem 1.5rem; }
.legal-page li { font-size: 0.95rem; color: var(--color-text-secondary); margin-bottom: 0.3rem; }
.legal-back { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 2rem; font-size: 0.9rem; font-weight: 500; color: var(--color-primary); cursor: pointer; background: none; border: none; }
.legal-back:hover { text-decoration: underline; }

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 300;
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-banner p { font-size: 0.875rem; flex: 1; min-width: 240px; }
.cookie-banner p a { color: #93c5fd; }
.cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-title { font-size: 2.1rem; }
  .steps-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .sources-grid { grid-template-columns: 1fr 1fr; }
  .results-container { grid-template-columns: 1fr; }
  .chat-container { height: 65vh; position: static; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-title { font-size: 1.7rem; }
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
  .section-block { padding: 3rem 0; }
  .section-title { font-size: 1.6rem; }
  .sources-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .btn-group { flex-direction: column-reverse; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .cookie-banner { flex-direction: column; }
}

@media print {
  .header, .cookie-banner, .emergency-banner,
  .results-actions, .chat-header { display: none !important; }
  /* Keep chat-input-area visible — hiding it broke mobile "save as PDF" readers */
  .results-container { grid-template-columns: 1fr; }
  .chat-container { height: auto; border: none; }
  .chat-input-area { display: none !important; } /* only hide on real print, not PDF-view */
}

/* ===================================================
   NEW LANDING PAGE v2 STYLES
   =================================================== */

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.lang-btn {
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.lang-btn.active, .lang-btn:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}
.lang-sep { color: var(--color-border); font-size: 0.8rem; }
.mobile-lang { display: flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0; }

/* Hero v2 */
.hero {
  padding: 3rem 0 3.5rem;
  background:
    linear-gradient(to bottom, rgba(219,234,254,0.30) 0%, rgba(255,255,255,0.85) 100%),
    url('assets/background.png') center top / cover no-repeat;
  overflow: hidden;
  position: relative;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 3rem;
  align-items: center;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.1rem;
}
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.btn-xl {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 2px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-surface-alt); text-decoration: none; }
.btn-white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}
.btn-white:hover { background: #f0f7ff; text-decoration: none; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.trust-check { color: var(--color-success); font-weight: 700; }

/* Doctor card */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.doctor-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 340px;
  border: 1px solid var(--color-border);
}
.doctor-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.avatar-circle {
  width: 72px; height: 72px;
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #bfdbfe;
}
.status-dot {
  position: absolute;
  bottom: 3px; right: 3px;
  width: 14px; height: 14px;
  background: var(--color-success);
  border-radius: 50%;
  border: 2px solid #fff;
}
.doctor-name { font-weight: 700; font-size: 1rem; }
.doctor-role { font-size: 0.82rem; color: var(--color-text-secondary); margin-bottom: 1rem; }

.mini-chat { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.mini-msg {
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  max-width: 90%;
}
.mini-msg.user {
  background: var(--color-primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.mini-msg.bot {
  background: var(--color-surface-alt);
  color: var(--color-text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.hero-bot-answer {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #1f2937;
  animation: fadeInUp 0.4s ease;
}
.hero-bot-answer strong { color: #1e40af; }
.hero-bot-answer em { font-style: normal; font-weight: 600; color: #065f46; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mini-source-row {
  display: flex;
  gap: 0.35rem;
  margin-top: -0.25rem;
}
.mini-src-badge {
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
}

.card-sources-badge {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.card-sources-badge span {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
}

/* Floating stat bubbles */
.stat-bubble {
  position: absolute;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.6rem 1rem;
  text-align: center;
  border: 1px solid var(--color-border);
  min-width: 72px;
}
.stat-1 { top: -20px; right: -10px; }
.stat-2 { bottom: 10px; left: -20px; }
.stat-number { font-size: 1.3rem; font-weight: 800; color: var(--color-primary); line-height: 1; }
.stat-label { font-size: 0.7rem; color: var(--color-text-secondary); line-height: 1.3; }

/* Section header centered */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.section-header p { color: var(--color-text-secondary); font-size: 1rem; }

/* Steps grid new */
.steps-grid-new {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}
.step-card-new {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.step-card-new:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.step-icon-wrap {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}
.step-icon-wrap.blue { background: #dbeafe; color: #2563eb; }
.step-icon-wrap.green { background: #d1fae5; color: #059669; }
.step-icon-wrap.purple { background: #ede9fe; color: #7c3aed; }
.step-icon-wrap.orange { background: #ffedd5; color: #ea580c; }
.step-num { font-size: 0.72rem; font-weight: 700; color: var(--color-text-muted); margin-bottom: 0.5rem; letter-spacing: 0.1em; }
.step-card-new h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.step-card-new p { font-size: 0.85rem; color: var(--color-text-secondary); line-height: 1.5; }
.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  margin-top: 2.5rem;
  color: var(--color-border);
  font-size: 1.5rem;
}
.step-connector::after { content: '→'; color: var(--color-text-muted); font-size: 1.2rem; }

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.features-text h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: 0.75rem; line-height: 1.2; }
.features-text > p { color: var(--color-text-secondary); margin-bottom: 2rem; }
.features-list { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; }
.features-list li { display: flex; gap: 0.85rem; align-items: flex-start; }
.feat-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.features-list strong { display: block; font-weight: 700; margin-bottom: 0.2rem; }
.features-list p { font-size: 0.875rem; color: var(--color-text-secondary); margin: 0; }

/* Feature mockup */
.feature-mockup {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.mockup-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.875rem;
}
.mockup-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid #fde68a;
}
.mockup-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.mockup-msg {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 88%;
}
.mockup-msg.bot {
  background: var(--color-surface-alt);
  color: var(--color-text);
  border-bottom-left-radius: 3px;
}
.mockup-msg.user {
  background: var(--color-primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.mockup-msg ul { margin: 0.4rem 0 0 1rem; }
.mockup-msg li { margin-bottom: 0.2rem; }
.mockup-source-row { display: flex; gap: 0.4rem; }
.mockup-source-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
}

/* Sources grid new */
.sources-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.source-card-new {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}
.source-card-new:hover { box-shadow: var(--shadow-md); }
.source-card-new h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.15rem; }
.source-card-new p { font-size: 0.8rem; color: var(--color-text-secondary); margin: 0; }
.source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.source-badge.who  { background: #dbeafe; color: #1d4ed8; }
.source-badge.ema  { background: #d1fae5; color: #065f46; }
.source-badge.nice { background: #ede9fe; color: #5b21b6; }
.source-badge.ord  { background: #ffedd5; color: #9a3412; }
.source-badge.msd  { background: #fce7f3; color: #9d174d; }
.source-badge.cch  { background: #e0f2fe; color: #0369a1; }

/* Pricing grid */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  border: 1.5px solid var(--color-border);
  position: relative;
}
.pricing-card-featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
}
.plan-popular {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 100px;
  white-space: nowrap;
}
.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-text-secondary); }
.plan-price { display: flex; align-items: baseline; gap: 0.35rem; margin-bottom: 0.6rem; }
.price-amount { font-size: 2.5rem; font-weight: 800; color: var(--color-text); }
.price-period { font-size: 0.9rem; color: var(--color-text-muted); }
.plan-desc { font-size: 0.875rem; color: var(--color-text-secondary); margin-bottom: 1.25rem; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.plan-features li { display: flex; gap: 0.5rem; font-size: 0.875rem; align-items: flex-start; }
.plan-features li.limited { color: var(--color-text-muted); }
.check { color: var(--color-success); font-weight: 700; flex-shrink: 0; }
.limit { color: var(--color-warning); font-weight: 700; flex-shrink: 0; }
.plan-note { font-size: 0.75rem; color: var(--color-text-muted); text-align: center; margin-top: 0.75rem; }

/* Disclaimer new */
.disclaimer-box-new {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  border: 1px solid #fde68a;
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.disclaimer-icon-big { font-size: 3rem; margin-bottom: 1rem; }
.disclaimer-box-new h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1rem; color: #92400e; }
.disclaimer-box-new p { font-size: 0.95rem; color: #78350f; margin-bottom: 0.75rem; line-height: 1.65; }
.disc-emergency { color: var(--color-danger) !important; font-weight: 600 !important; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  padding: 4rem 0;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 1.8rem; font-weight: 800; color: #fff; margin-bottom: 0.35rem; }
.cta-band p { color: rgba(255,255,255,0.8); }

/* ===================================================
   AUTH PAGE STYLES
   =================================================== */
.auth-body { background: #f8fafc; min-height: 100vh; }

.auth-page {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* Left panel */
.auth-left {
  background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 50%, #0891b2 100%);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.auth-logo { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem; font-weight: 700; margin-bottom: 3rem; }
.auth-logo .logo-ai { background: rgba(255,255,255,0.2); }
.auth-left-content { flex: 1; }
.auth-tagline { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.75rem; line-height: 1.2; }
.auth-tagline-sub { color: rgba(255,255,255,0.75); font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.6; }
.auth-benefits { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.auth-benefits li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: rgba(255,255,255,0.9); }
.ab-icon { font-size: 1.1rem; flex-shrink: 0; }
.ab-check {
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.auth-left-footer { margin-top: 2rem; }
.source-badges-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.source-badges-row .source-badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

/* Right panel */
.auth-right {
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}
.auth-lang-row { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }

.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 2rem;
}
.auth-tab {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.auth-tab.active {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.35rem; }
.auth-form-sub { color: var(--color-text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }

.input-eye-wrap { position: relative; }
.input-eye-wrap input { padding-right: 2.5rem; width: 100%; }
.eye-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.eye-btn:hover { color: #4b5563; }
.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}
.auth-switch-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 1.25rem;
}
.auth-switch-text a { color: var(--color-primary); font-weight: 600; }

.form-error {
  background: var(--color-danger-bg);
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.form-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

/* ===================================================
   DASHBOARD STYLES
   =================================================== */
.dashboard-body { background: #f8fafc; min-height: 100vh; }

/* Top bar */
.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 60px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: var(--shadow-sm);
}
.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.plan-badge {
  background: rgba(56,189,248,0.12);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid rgba(56,189,248,0.3);
}
/* Trial = default blue above */
.plan-badge.trial  { background: rgba(56,189,248,0.12); color: #38bdf8; border-color: rgba(56,189,248,0.3); }
/* Pro = gold */
.plan-badge.pro    { background: rgba(251,191,36,0.15); color: #fbbf24; border-color: rgba(251,191,36,0.4); }
/* Pro+ = purple */
.plan-badge.pro-plus { background: rgba(124,58,237,0.18); color: #a78bfa; border-color: rgba(167,139,250,0.45); }
/* Expired = grey */
.plan-badge.expired { background: rgba(100,116,139,0.15); color: #94a3b8; border-color: rgba(100,116,139,0.3); }

/* User menu */
.user-menu { position: relative; }
.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition);
}
.user-btn:hover { border-color: var(--color-primary); }
.user-avatar {
  width: 28px; height: 28px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.chevron { color: var(--color-text-muted); font-size: 0.75rem; }
.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 2000;
  display: none;
  overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition);
}
.user-dropdown a:hover { background: var(--color-surface-alt); }
.user-dropdown hr { border: none; border-top: 1px solid var(--color-border); margin: 0; }
.logout-link { color: var(--color-danger) !important; }

/* Layout */
.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 60px);
}

/* Sidebar */
.dash-sidebar {
  background: var(--color-white);
  border-right: 1px solid var(--color-border);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.dash-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 0.75rem; flex: 1; }
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.dash-nav-item:hover { background: var(--color-surface-alt); color: var(--color-text); text-decoration: none; }
.dash-nav-item.active { background: var(--color-primary-light); color: var(--color-primary); font-weight: 600; }

/* Sidebar upgrade CTA */
.sidebar-upgrade {
  margin: 1rem 0.75rem 0;
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  color: #fff;
}
.upgrade-icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.sidebar-upgrade p { font-size: 0.82rem; color: rgba(255,255,255,0.85); margin-bottom: 0.75rem; }
.sidebar-upgrade .btn-primary {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
}
.sidebar-upgrade .btn-primary:hover { background: rgba(255,255,255,0.25); }

/* Main */
.dash-main { padding: 2rem; overflow-y: auto; }
.dash-view { display: none; }
.dash-view.active { display: block; }
#view-chat.active { display: flex; flex-direction: column; padding: 0; }

.dash-welcome h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 0.25rem; }
.dash-welcome p { color: var(--color-text-secondary); margin-bottom: 1.5rem; }

/* Profile alert */
.profile-alert {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.alert-icon { font-size: 1.8rem; flex-shrink: 0; }
.alert-content { flex: 1; }
.alert-content strong { display: block; font-size: 0.9rem; margin-bottom: 0.2rem; }
.alert-content p { font-size: 0.82rem; color: var(--color-text-secondary); margin: 0; }

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.quick-card {
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
}
.quick-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary); transform: translateY(-2px); }
.quick-card.primary { border-color: var(--color-primary); background: var(--color-primary-light); }
.qc-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.qc-icon-svg {
  width: 44px;
  height: 44px;
  background: #eff6ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: #2563eb;
}
.quick-card.primary .qc-icon-svg { background: #dbeafe; color: #1d4ed8; }
.quick-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.quick-card p { font-size: 0.83rem; color: var(--color-text-secondary); }
.qc-arrow { position: absolute; top: 1.25rem; right: 1.25rem; color: var(--color-text-muted); font-size: 1.1rem; }

/* Plan info card */
.plan-info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.plan-info-icon { font-size: 1.5rem; }
.plan-info-card strong { display: block; font-size: 0.9rem; margin-bottom: 0.1rem; }
.plan-info-card p { font-size: 0.82rem; color: var(--color-text-secondary); margin: 0; flex: 1; }

/* Section header inside dashboard */
.dash-section-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.dash-section-header h2 { font-size: 1.4rem; font-weight: 800; flex: 1; }
.dash-section-header p { width: 100%; color: var(--color-text-secondary); font-size: 0.9rem; margin: 0; }

/* History list */
.history-list { display: flex; flex-direction: column; gap: 0.75rem; }
.history-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: box-shadow var(--transition);
}
.history-item:hover { box-shadow: var(--shadow-sm); }
.history-date { font-size: 0.78rem; color: var(--color-text-muted); white-space: nowrap; }
.history-symptom { flex: 1; font-size: 0.9rem; font-weight: 500; }
.history-badge { font-size: 0.75rem; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-text-secondary);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-text); }
.empty-state p { margin-bottom: 1.5rem; font-size: 0.9rem; }

/* Profile form */
.profile-form { max-width: 720px; }
.profile-section { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.25rem; }
.profile-section h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-border); }
.profile-form .form-row { grid-template-columns: repeat(3, 1fr); }

/* ===================================================
   RESPONSIVE UPDATES
   =================================================== */
@media (max-width: 1100px) {
  .steps-grid-new { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .step-connector { display: none; }
  .features-grid { gap: 2.5rem; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-title { font-size: 2.2rem; }
  .sources-grid-new { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
  .cta-band-inner { flex-direction: column; text-align: center; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 2rem 1.5rem; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .quick-actions { grid-template-columns: 1fr; }
  .profile-form .form-row { grid-template-columns: 1fr; }
  .results-container { grid-template-columns: 1fr; }
  .chat-container { height: 65vh; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .lang-toggle { display: flex; }
  .mobile-menu-btn { display: flex; }
  .hero-title { font-size: 1.8rem; }
  .steps-grid-new { grid-template-columns: 1fr; }
  .sources-grid-new { grid-template-columns: 1fr; }
  .hero-trust { gap: 0.6rem; }
  .section-header h2 { font-size: 1.6rem; }
}

/* =====================================================
   PRICING — 3 PLANS
   ===================================================== */
.pricing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
  align-items: start;
}
.pricing-tech-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.pricing-tech-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
}
.plan-tier {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}
.plan-limits-box {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.plan-limits-light {
  background: rgba(37,99,235,0.07);
  border-color: rgba(37,99,235,0.18);
}
.plan-limits-purple {
  background: #faf5ff;
  border-color: #e9d5ff;
}
.plan-limit-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.plan-limit-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e40af;
  min-width: 36px;
  line-height: 1;
}
.plan-limits-light .plan-limit-num { color: #1d4ed8; }
.plan-limits-purple .plan-limit-num { color: #7c3aed; }
.plan-limit-label { font-size: 0.82rem; color: #6b7280; }
.plan-limits-light .plan-limit-label { color: #374151; }
.plan-limits-purple .plan-limit-label { color: #6d28d9; }
.cross { color: #d1d5db; font-weight: 700; margin-right: 0.4rem; }
.check-purple { color: #7c3aed !important; }
.pricing-card-proplus {
  border: 2px solid #c4b5fd;
  background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%);
}
.btn-proplus {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-proplus:hover { opacity: 0.9; }
.btn-white { background: #fff; color: #1e40af; border: 2px solid #fff; font-weight: 700; }
.btn-white:hover { background: #eff6ff; }
.pricing-tech-explain {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 2.5rem;
  margin-top: 1rem;
}
.pricing-tech-explain h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  text-align: center;
}
.tech-explain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.tech-explain-item { display: flex; gap: 1rem; align-items: flex-start; }
.tech-explain-icon {
  width: 42px; height: 42px;
  background: #eff6ff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tech-explain-item strong { display: block; font-size: 0.92rem; color: #1f2937; margin-bottom: 0.3rem; }
.tech-explain-item p { font-size: 0.82rem; color: #6b7280; line-height: 1.6; margin: 0; }

@media (max-width: 900px) {
  .pricing-grid-3 { grid-template-columns: 1fr; max-width: 420px; }
  .tech-explain-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   STANDALONE CHAT
   ===================================================== */
/* ── Chat Layout with Sessions Sidebar ─────────────────── */
.chat-layout {
  display: flex;
  height: calc(100vh - 70px);
  gap: 0;
  overflow: hidden;
}

/* Sessions sidebar */
.chat-sessions-sidebar {
  width: 240px;
  min-width: 240px;
  background: #f8fafc;
  border-right: 1.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.css-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
.css-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
}
.css-new-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s;
}
.css-new-btn:hover { background: #1d4ed8; }
.css-new-btn-mobile {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #eff6ff;
  color: #2563eb;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s;
}
.css-new-btn-mobile:hover { background: #dbeafe; }
.css-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 6px;
}
.css-session-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
  position: relative;
}
.css-session-item:hover { background: #e8f0fe; }
.css-session-item.active { background: #eff6ff; border: 1.5px solid #bfdbfe; }
.css-session-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.css-session-info {
  flex: 1;
  min-width: 0;
}
.css-session-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.css-session-meta {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 1px;
}
.css-session-delete {
  display: none;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.css-session-item:hover .css-session-delete { display: block; }
.css-session-delete:hover { color: #ef4444; background: #fee2e2; }
.css-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #9ca3af;
  font-size: 0.82rem;
}
.css-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* Active chat panel */
.standalone-chat-wrap {
  display: flex;
  justify-content: center;
  align-items: stretch;   /* was flex-start — children now fill full height */
  padding: 1.5rem;
  height: 100%;
  min-height: 0;          /* allows flex shrink inside parent */
  overflow: hidden;
}
.standalone-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  border-left: none;
}
/* Give the standalone chat a left border radius when standalone */
.chat-layout .standalone-chat {
  border-radius: 0;
  box-shadow: none;
}
.standalone-chat .chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 0;    /* CRITICAL: allows flex shrink so input stays visible */
  padding: 1.5rem;
}
.standalone-chat-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  flex: 1;
}
.chat-intro-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.standalone-chat-intro h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}
.standalone-chat-intro p {
  font-size: 0.95rem;
  color: #6b7280;
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.chat-starter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 560px;
}
.chat-starter-btn {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.chat-starter-btn:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  transform: translateY(-1px);
}

/* =====================================================
   HELP & SUPPORT
   ===================================================== */
.help-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
.help-form-wrap { min-width: 0; }
.help-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2rem;
}
.help-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
}
.help-success-card {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
}
.help-success-icon { font-size: 3rem; margin-bottom: 1rem; }
.help-success-card h3 { font-size: 1.3rem; font-weight: 700; color: #065f46; margin-bottom: 0.5rem; }
.help-success-card p { color: #374151; font-size: 0.95rem; line-height: 1.6; margin-bottom: 0.5rem; }
.help-ticket-id { font-family: monospace; background: #f3f4f6; padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; color: #6b7280; margin: 0.5rem 0 1rem; display: inline-block; }

/* FAQ */
.help-faq { padding: 0; }
.help-faq h3 { font-size: 1.1rem; font-weight: 700; color: #111827; margin-bottom: 1rem; }
.faq-list { display: flex; flex-direction: column; gap: 0; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.faq-item { border-bottom: 1px solid #e5e7eb; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  transition: background 0.15s;
}
.faq-q::after { content: '+'; font-size: 1.2rem; color: #6b7280; transition: transform 0.2s; }
.faq-q.open { background: #f0f9ff; color: #0369a1; }
.faq-q.open::after { content: '−'; color: #0369a1; }
.faq-q:hover { background: #f9fafb; }
.faq-a {
  display: none;
  padding: 0 1.25rem 1rem;
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.65;
  background: #f9fafb;
}

/* New user welcome banner */
.new-user-welcome-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.nuw-icon { font-size: 2rem; flex-shrink: 0; }
.new-user-welcome-banner strong { font-size: 1.05rem; color: #1e3a8a; display: block; margin-bottom: 0.25rem; }
.new-user-welcome-banner p { font-size: 0.9rem; color: #3b82f6; margin: 0; }

/* Stats section on landing */
.stats-band {
  background: transparent;
  padding: 3rem 0;
  color: #1e3a8a;
}
.stats-band .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item-big .stat-number-big {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-item-big .stat-label-big {
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.4;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.testimonial-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem;
}
.testimonial-stars { color: #f59e0b; font-size: 1rem; margin-bottom: 0.75rem; }
.testimonial-text { font-size: 0.93rem; color: #374151; line-height: 1.65; margin-bottom: 1rem; font-style: italic; }
.testimonial-author { font-size: 0.85rem; font-weight: 600; color: #111827; }
.testimonial-role { font-size: 0.8rem; color: #9ca3af; }

/* ---------- Comparison Table ---------- */
.comparison-table-wrap { overflow-x: auto; margin-top: 2rem; }
.comparison-table {
  width: 100%; border-collapse: collapse; font-size: 0.93rem;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.comparison-table th, .comparison-table td {
  padding: 14px 18px; text-align: left; border-bottom: 1px solid #f1f5f9;
}
.comparison-table thead th {
  background: #f8fafc; font-weight: 700; color: #374151; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: .5px;
}
.comparison-table thead th.cmp-highlight {
  background: #eff6ff; color: #2563eb;
}
.comparison-table td.cmp-highlight { background: #f0f7ff; font-weight: 500; }
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: #fafbfd; }
.cmp-yes { color: #10b981; font-weight: 700; margin-right: 4px; }
.cmp-no  { color: #ef4444; font-weight: 700; margin-right: 4px; }
.cmp-partial { color: #f59e0b; font-weight: 700; margin-right: 4px; }

/* ---------- FAQ Section ---------- */
.faq-list { max-width: 740px; margin: 2rem auto 0; }
.faq-item {
  border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 10px;
  background: #fff; overflow: hidden; transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; font-size: 0.95rem; font-weight: 600; color: #1f2937;
  background: none; border: none; cursor: pointer; text-align: left;
  transition: color .2s;
}
.faq-question:hover { color: #2563eb; }
.faq-arrow {
  font-size: 1.3rem; font-weight: 300; color: #9ca3af;
  transition: transform .3s; flex-shrink: 0; margin-left: 12px;
}
.faq-item.open .faq-arrow { transform: rotate(45deg); color: #2563eb; }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease;
  padding: 0 22px;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 22px 18px; }
.faq-answer p {
  font-size: 0.9rem; line-height: 1.7; color: #4b5563; margin: 0;
}

@media (max-width: 768px) {
  .help-layout { grid-template-columns: 1fr; }
  .stats-band .container { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .comparison-table { font-size: 0.82rem; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
  .faq-question { padding: 14px 16px; font-size: 0.9rem; }
  .history-modal-box { padding: 24px 20px; margin: 0; width: 100%; max-width: 100%; }
  .history-modal-overlay { padding: 16px 0; align-items: flex-start; }
}

/* ===== HISTORY — CLICKABLE CARDS ===== */
.history-item-clickable {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .15s, box-shadow .15s, transform .12s;
}
.history-item-clickable:hover {
  background: #f0f9ff;
  box-shadow: 0 2px 12px rgba(37,99,235,.10);
  transform: translateX(2px);
}
.history-item-left { flex: 1; min-width: 0; }
.history-item-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.history-emergency-badge {
  display: inline-block;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 4px;
}
.history-intensity {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 8px;
}
.history-badge-open {
  background: none !important;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

/* ===== HISTORY MODAL ===== */
.history-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.history-modal-box {
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  max-width: 600px;
  width: 100%;
  /* No max-height — overlay scrolls instead */
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: slideUp .22s ease;
  margin: auto;
}
@keyframes slideUp { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.history-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.history-modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}
.history-modal-date { font-size: 13px; color: #64748b; }
.history-modal-close {
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  color: #64748b;
  flex-shrink: 0;
}
.history-modal-close:hover { background: #e2e8f0; color: #0f172a; }
.history-modal-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}
.history-modal-section:last-of-type { border-bottom: none; }
.history-modal-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.history-modal-params { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #475569; }
.history-modal-params strong { color: #0f172a; }
.history-modal-response {
  font-size: 14px;
  color: #334155;
  line-height: 1.7;
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px 16px;
}
.history-modal-sources { font-size: 13px; color: #475569; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.history-modal-emergency {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  padding: 12px 16px;
  color: #dc2626;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}
.history-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

/* ======================================================
   HOW IT WORKS — New layout with video placeholders
   ====================================================== */

.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
}

.hiw-step {
  display: flex;
  flex-direction: column;
}

.hiw-step-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
}

/* Reverse layout alternation */
.hiw-step-reverse .hiw-step-content {
  direction: rtl;
}
.hiw-step-reverse .hiw-step-content > * {
  direction: ltr;
}

/* Left: icon + text */
.hiw-step-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hiw-step-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.hiw-step-icon.blue   { background: #dbeafe; color: #2563eb; }
.hiw-step-icon.green  { background: #d1fae5; color: #059669; }
.hiw-step-icon.purple { background: #ede9fe; color: #7c3aed; }
.hiw-step-icon.orange { background: #ffedd5; color: #ea580c; }

.hiw-step-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 6px;
}

.hiw-step-left h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.hiw-step-left p {
  font-size: 0.93rem;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}

/* Right: video area */
.hiw-step-right {
  /* ensures it takes full width of grid cell */
}

/* Video wrapper — holds both the <video> and the placeholder */
.hiw-video-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.hiw-video-wrap:hover {
  border-color: #94a3b8;
}

/* Actual video element — hidden until a src is provided */
.hiw-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: none; /* shown via JS when src exists */
}

/* Placeholder shown when no video is loaded */
.hiw-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hiw-vp-icon {
  width: 52px; height: 52px;
  background: #e2e8f0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #64748b;
  margin-bottom: 4px;
}

.hiw-vp-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.hiw-vp-hint {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #e2e8f0;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Connector between steps */
.hiw-connector {
  width: 2px;
  height: 48px;
  background: linear-gradient(to bottom, #e2e8f0, #f8fafc);
  align-self: flex-start;
  margin-left: 25px; /* align with icon center */
  position: relative;
}
.hiw-connector::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #cbd5e1;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hiw-step-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0;
  }
  .hiw-step-reverse .hiw-step-content {
    direction: ltr;
  }
  /* On mobile: text always first, video second */
  .hiw-step-reverse .hiw-step-left  { order: 1; }
  .hiw-step-reverse .hiw-step-right { order: 2; }

  .hiw-connector {
    margin-left: 24px;
    height: 32px;
  }
}

/* ======================================================
   LANGUAGE DROPDOWN (replaces old EN|RU toggle)
   ====================================================== */

.lang-dropdown {
  position: relative;
  /* No z-index here — let menu escape via fixed positioning trick */
}

.lang-dropdown-selected {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #334155;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
  letter-spacing: .02em;
}
.lang-dropdown-selected:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* On white/light backgrounds (auth page, dashboard) */
.auth-lang-row .lang-dropdown-selected,
.dash-topbar-right .lang-dropdown-selected {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.auth-lang-row .lang-dropdown-selected:hover,
.dash-topbar-right .lang-dropdown-selected:hover {
  background: #e2e8f0;
}

/* Old inline menu — kept hidden, popup is now #globalLangPopup in <body> */
.lang-dropdown-menu { display: none !important; }

/* Global language popup (appended to body by JS) */
#globalLangPopup {
  animation: dropdownFadeIn .15s ease;
}

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

.lang-dropdown-option {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  color: #334155;
  transition: background .1s;
}
.lang-dropdown-option:hover { background: #f8fafc; }
.lang-dropdown-option.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.ldrop-flag { font-size: 16px; flex-shrink: 0; }
.ldrop-code { font-weight: 700; font-size: 13px; width: 28px; flex-shrink: 0; }
.ldrop-name { font-size: 12px; color: #64748b; }
.lang-dropdown-option.active .ldrop-name { color: #3b82f6; }

/* Mobile: menu is positioned by JS via fixed coords — nothing needed here */

@media (max-width: 768px) {
  .lang-dropdown-selected { font-size: 12px; padding: 5px 9px; }
}

/* ======================================================
   LANGUAGE DROPDOWN — Button label + flag + arrow
   ====================================================== */

.lang-dropdown-selected {
  /* Override: wider to fit "Language" label */
  gap: 6px;
  padding: 5px 12px 5px 10px;
}

.ldrop-sel-label {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-right: 1px solid #cbd5e1;
  padding-right: 7px;
  margin-right: 1px;
  color: #475569;
}

.ldrop-sel-flag { font-size: 15px; }

.ldrop-sel-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ldrop-sel-arrow {
  font-size: 12px;
  opacity: 0.8;
  transition: transform 0.2s;
  margin-left: 1px;
}

.lang-dropdown-menu.open ~ .lang-dropdown-selected .ldrop-sel-arrow,
.lang-dropdown:has(.lang-dropdown-menu.open) .ldrop-sel-arrow {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .ldrop-sel-label { display: none; }
  .lang-dropdown-selected { padding: 5px 9px; }
}

/* ===== FEAT STRIP (replaces full features section on index) ===== */
.feat-strip-section { padding: 48px 0; background: #f8fafc; }
.feat-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feat-strip-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: box-shadow .2s;
}
.feat-strip-item:hover { box-shadow: 0 6px 20px rgba(37,99,235,.10); }
.feat-strip-icon { font-size: 26px; flex-shrink: 0; }
.feat-strip-item strong { display: block; font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.feat-strip-item p { font-size: 13px; color: #64748b; line-height: 1.5; margin: 0; }
@media (max-width: 900px) {
  .feat-strip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .feat-strip-grid { grid-template-columns: 1fr; }
}

/* ===== WHY US TEASER (compact comparison on index, links to why-us.html) ===== */
.why-teaser-section { padding: 72px 0; }
.why-teaser-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.why-teaser-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.why-teaser-text h2 { font-size: 32px; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
.why-teaser-text > p { font-size: 16px; color: #475569; line-height: 1.7; margin-bottom: 20px; }
.why-teaser-points { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.why-tp { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #334155; }
.why-tp-yes {
  width: 22px; height: 22px;
  background: #dcfce7; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #166534; font-weight: 700;
  flex-shrink: 0;
}
/* Mini comparison table */
.mini-compare-table {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.mct-header, .mct-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: center;
}
.mct-header {
  background: #1d4ed8;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
}
.mct-col { text-align: center; }
.mct-col-feat { text-align: left; }
.mct-col-us { color: #93c5fd; }
.mct-row {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  color: #334155;
  transition: background .15s;
}
.mct-row:last-child { border-bottom: none; }
.mct-row:hover { background: #f8fafc; }
.mct-row .mct-col-feat { font-weight: 500; color: #0f172a; }
.mct-yes { color: #16a34a; font-size: 16px; font-weight: 800; }
.mct-no  { color: #dc2626; font-size: 16px; font-weight: 800; }
.mct-partial { color: #d97706; font-size: 16px; font-weight: 800; }
.mct-row .mct-col-us { background: #eff6ff; border-radius: 0; }
@media (max-width: 900px) {
  .why-teaser-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* ===== PRICING TEASER (compact 3 plans on index, links to pricing.html) ===== */
.pricing-teaser-section { padding: 72px 0; background: #f8fafc; }
.pricing-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 12px;
  padding-top: 20px;
}
.pt-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  position: relative;
}
.pt-card-featured {
  border-color: #2563eb;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 8px 32px rgba(37,99,235,.3);
}
.pt-card-proplus {
  border-color: #7c3aed;
}
.pt-popular {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  background: #facc15;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.pt-name { font-size: 18px; font-weight: 800; }
.pt-card-featured .pt-name { color: #fff; }
.pt-price { font-size: 26px; font-weight: 900; color: #0f172a; }
.pt-price span { font-size: 13px; font-weight: 500; color: #64748b; }
.pt-card-featured .pt-price { color: #fff; }
.pt-card-featured .pt-price span { color: rgba(255,255,255,.7); }
.pt-card-proplus .pt-price { color: #7c3aed; }
.pt-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.pt-features li { font-size: 13px; color: #475569; }
.pt-card-featured .pt-features li { color: rgba(255,255,255,.9); }
.pt-features li::marker { content: none; }
.btn-proplus {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  border: none;
}
.btn-proplus:hover { background: linear-gradient(135deg, #6d28d9, #5b21b6); }
@media (max-width: 700px) {
  .pricing-teaser-grid { grid-template-columns: 1fr; }
}

/* ---- Quick Action Cards (dashboard) ---- */
.quick-card {
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.80);
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(37,99,235,0.10), inset 0 1px 0 rgba(255,255,255,0.95);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
}
.quick-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(147,197,253,0.65);
  box-shadow: 0 14px 40px rgba(37,99,235,0.14), inset 0 1px 0 rgba(255,255,255,0.95);
}

/* ---- Step Cards ---- */
.step-card-new {
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.80);
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(37,99,235,0.09), inset 0 1px 0 rgba(255,255,255,0.95);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.step-card-new:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 14px 40px rgba(37,99,235,0.13), inset 0 1px 0 rgba(255,255,255,0.95);
}

/* ---- Plan Info Card (dashboard) ---- */
.plan-info-card {
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.80);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.95);
}

/* ---- Profile sections (dashboard) ---- */
.profile-section {
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.80);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.95);
}

/* ======================================================
   GLOBAL GLASS BACKGROUND — единый стеклянный фон
   Глубокий технологичный glassmorphism для всего сайта
   ====================================================== */

/* Единый фон всего сайта — богатый ультрамариновый с glow */
body {
  background:
    radial-gradient(ellipse at 15% 25%, rgba(37,99,235,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(99,102,241,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 60%, rgba(14,165,233,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 85%, rgba(124,58,237,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 75%, rgba(37,99,235,0.13) 0%, transparent 50%),
    linear-gradient(160deg, #dbeafe 0%, #eff6ff 25%, #e0e7ff 55%, #dbeafe 80%, #e0f2fe 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Все секции — прозрачные, пропускают фон */
.section-block,
.section-alt,
.feat-strip-section,
.why-teaser-section,
.pricing-teaser-section,
.trusted-by-strip,
.disclaimer-banner-wrap,
.cta-band {
  background: transparent !important;
  position: relative;
}

/* ======================================================
   БЛОКИ КАК КНОПКИ — Button-style info blocks
   Применяется ко всем статичным информационным блокам
   ====================================================== */

/* Базовый класс кнопки-блока */
.btn-block {
  display: block;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(226, 232, 240, 0.70);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow:
    0 2px 12px rgba(0,0,0,.06),
    0 1px 3px rgba(0,0,0,.04),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s ease;
  cursor: default;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.btn-block::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 50%);
  pointer-events: none;
}
.btn-block:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow:
    0 10px 36px rgba(37, 99, 235, 0.13),
    0 2px 8px rgba(0,0,0,.06),
    inset 0 1px 0 rgba(255,255,255,0.95);
  border-color: rgba(147, 197, 253, 0.60);
}

/* Применяем стиль кнопки к source cards и step cards */
.source-card-new,
.step-card-new,
.feat-strip-item,
.testimonial-card,
.pt-card:not(.pt-card-featured),
.faq-item,
.hiw-video-wrap,
.plan-info-card,
.profile-section,
.history-item,
.help-card {
  position: relative;
  overflow: hidden;
}
.source-card-new::before,
.step-card-new::before,
.feat-strip-item::before,
.testimonial-card::before,
.faq-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
}

/* ======================================================
   DURATION COUNT INPUT — поле количества периода
   ====================================================== */

.duration-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.duration-count-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(37,99,235,0.25);
  border-radius: 12px;
  padding: 0.4rem 0.85rem 0.4rem 0.6rem;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
  animation: fadeInSlide 0.2s ease;
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.duration-count-input {
  width: 62px;
  border: none;
  background: transparent;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1d4ed8;
  text-align: center;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}
.duration-count-input::-webkit-outer-spin-button,
.duration-count-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.duration-count-unit {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ======================================================
   AI QUESTION CARDS — поля для ответов на ❓ вопросы ИИ
   ====================================================== */

.ai-questions-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 4px;
}

.ai-question-card {
  background: rgba(9, 20, 38, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(56, 189, 248, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-question-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 20px rgba(56,189,248,0.10);
}
.ai-question-card.ai-question-answered {
  background: rgba(16, 40, 28, 0.90);
  border-color: rgba(52, 211, 153, 0.35);
}

.ai-question-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #bae6ff;
  margin-bottom: 8px;
  line-height: 1.45;
}

.ai-question-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-question-input {
  flex: 1;
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.875rem;
  background: rgba(6, 13, 26, 0.85);
  color: #e0f2fe;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.ai-question-input::placeholder { color: rgba(186,230,255,0.35); }
.ai-question-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
.ai-question-input:disabled {
  background: rgba(6, 13, 26, 0.5);
  color: rgba(186,230,255,0.3);
}

/* Hint — shown only for multiple questions */
.ai-questions-hint {
  font-size: 0.78rem;
  color: rgba(186,230,255,0.45);
  text-align: center;
  padding: 2px 0 2px;
  opacity: 0.85;
}

/* Single shared submit button for entire question block */
.ai-questions-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 9px 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.18s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  margin-top: 4px;
}
.ai-questions-submit-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.30);
}
.ai-questions-submit-btn:disabled {
  background: linear-gradient(135deg, #93c5fd, #bfdbfe);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.ai-question-answer-sent {
  font-size: 0.85rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 40, 28, 0.85);
  border: 1px solid rgba(52,211,153,0.25);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

/* ---- Question card top row (text + dismiss button) ---- */
.ai-question-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ai-question-card-top .ai-question-text {
  margin-bottom: 0;
  flex: 1;
}

/* ---- Dismiss (✕) button per question ---- */
.ai-question-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  margin-top: 1px;
}
.ai-question-dismiss:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* ---- Source tag (plain text badge, no hyperlink) ---- */
.msg-source-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: default;
  user-select: none;
}
.msg-source-tag:hover {
  background: rgba(37, 99, 235, 0.15);
}

/* ======================================================
   GLASSMORPHISM CARD SYSTEM — все блоки парят в воздухе
   Единый стиль для всех карточек на всём сайте
   ====================================================== */

/* Базовая стеклянная карточка — миксин */
.glass-card-base {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.90);
  border-radius: 22px;
  box-shadow:
    0 8px 32px rgba(37,99,235,0.10),
    0 2px 8px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(37,99,235,0.04);
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), box-shadow 0.28s ease, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.glass-card-base::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,1) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.glass-card-base:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow:
    0 20px 60px rgba(37,99,235,0.16),
    0 4px 16px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(37,99,235,0.06);
  border-color: rgba(147,197,253,0.70);
}

/* ---- Stats band ---- */
.stats-band {
  background: transparent !important;
  padding: 3rem 0;
}

/* Stats items — стеклянные карточки на фоне */
.glass-stat-card {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 22px;
  padding: 30px 24px;
  box-shadow:
    0 8px 32px rgba(37,99,235,0.13),
    0 2px 6px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.95);
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), box-shadow 0.28s ease;
  position: relative;
  overflow: hidden;
  color: #1e3a8a;
}
.glass-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  pointer-events: none;
}
.glass-stat-card .stat-number-big { color: #1d4ed8; }
.glass-stat-card .stat-label-big { color: #3b82f6; opacity: 1; }
.glass-stat-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow:
    0 24px 64px rgba(37,99,235,0.20),
    inset 0 1px 0 rgba(255,255,255,0.95);
  border-color: rgba(96,165,250,0.70);
}

/* ---- How It Works — шаги ---- */
.glass-hiw-card {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 26px;
  padding: 36px 32px;
  margin-bottom: 24px;
  box-shadow:
    0 10px 40px rgba(37,99,235,0.10),
    0 2px 8px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.95);
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), box-shadow 0.28s ease, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.glass-hiw-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.35), rgba(99,102,241,0.30), transparent);
  pointer-events: none;
}
.glass-hiw-card:hover {
  transform: translateY(-6px);
  border-color: rgba(147,197,253,0.65);
  box-shadow:
    0 20px 60px rgba(37,99,235,0.14),
    0 4px 16px rgba(0,0,0,0.07),
    inset 0 1px 0 rgba(255,255,255,0.95);
}
.glass-hiw-card .hiw-connector { display: none; }

/* ---- Key Features (feat-strip) ---- */
.feat-strip-item {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.92) !important;
  border-radius: 22px !important;
  padding: 28px 22px !important;
  box-shadow:
    0 8px 32px rgba(37,99,235,0.10),
    inset 0 1px 0 rgba(255,255,255,0.95) !important;
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), box-shadow 0.28s ease, border-color 0.2s !important;
  position: relative !important;
  overflow: hidden !important;
}
.feat-strip-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  pointer-events: none;
}
.feat-strip-item:hover {
  transform: translateY(-8px) scale(1.02) !important;
  border-color: rgba(147,197,253,0.65) !important;
  box-shadow: 0 20px 56px rgba(37,99,235,0.14), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ---- Source cards ---- */
.source-card-new {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.92) !important;
  border-radius: 22px !important;
  box-shadow: 0 8px 32px rgba(37,99,235,0.10), inset 0 1px 0 rgba(255,255,255,0.95) !important;
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), box-shadow 0.28s ease, border-color 0.2s !important;
  position: relative !important;
  overflow: hidden !important;
}
.source-card-new::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  pointer-events: none;
}
.source-card-new:hover {
  transform: translateY(-7px) scale(1.02) !important;
  border-color: rgba(147,197,253,0.65) !important;
  box-shadow: 0 20px 56px rgba(37,99,235,0.15), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ---- Testimonial cards ---- */
.testimonial-card {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.92) !important;
  border-radius: 24px !important;
  box-shadow: 0 8px 32px rgba(37,99,235,0.10), inset 0 1px 0 rgba(255,255,255,0.95) !important;
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), box-shadow 0.28s ease !important;
  position: relative !important;
  overflow: hidden !important;
}
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  pointer-events: none;
}
.testimonial-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  border-color: rgba(147,197,253,0.65) !important;
  box-shadow: 0 22px 60px rgba(37,99,235,0.14), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ---- FAQ items ---- */
.faq-item {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.92) !important;
  border-radius: 18px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 6px 24px rgba(37,99,235,0.09), inset 0 1px 0 rgba(255,255,255,0.9) !important;
  overflow: hidden !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s !important;
}
.faq-item:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(147,197,253,0.60) !important;
  box-shadow: 0 12px 36px rgba(37,99,235,0.12), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ---- Pricing cards ---- */
.pt-card {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.92) !important;
  box-shadow: 0 8px 32px rgba(37,99,235,0.10), inset 0 1px 0 rgba(255,255,255,0.95) !important;
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), box-shadow 0.28s ease !important;
  position: relative !important;
  overflow: visible !important;
}
.pt-card:not(.pt-card-featured):not(.pt-card-proplus):hover {
  transform: translateY(-8px) scale(1.02) !important;
  border-color: rgba(147,197,253,0.65) !important;
  box-shadow: 0 22px 60px rgba(37,99,235,0.15), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}
.pt-card-featured {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  border-color: rgba(147,197,253,0.50) !important;
  box-shadow: 0 12px 48px rgba(37,99,235,0.35), inset 0 1px 0 rgba(255,255,255,0.25) !important;
  overflow: visible !important;
}
.pt-card-featured:hover {
  transform: translateY(-10px) scale(1.03) !important;
  box-shadow: 0 28px 72px rgba(37,99,235,0.45), inset 0 1px 0 rgba(255,255,255,0.25) !important;
}
.pt-card-proplus {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  border-color: rgba(196,181,253,0.50) !important;
  box-shadow: 0 12px 48px rgba(124,58,237,0.30), inset 0 1px 0 rgba(255,255,255,0.20) !important;
  color: #fff !important;
}
.pt-card-proplus .pt-name,
.pt-card-proplus .pt-price,
.pt-card-proplus .pt-price span,
.pt-card-proplus .pt-features li,
.pt-card-proplus .pt-features li.limited {
  color: #fff !important;
  opacity: 1 !important;
}
.pt-card-proplus:hover {
  transform: translateY(-10px) scale(1.03) !important;
  box-shadow: 0 28px 72px rgba(124,58,237,0.40), inset 0 1px 0 rgba(255,255,255,0.20) !important;
}

/* ---- Why us — check points ---- */
.glass-why-tp {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 4px 16px rgba(37,99,235,0.09), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s;
}
.glass-why-tp:hover {
  transform: translateX(6px);
  border-color: rgba(147,197,253,0.60);
  box-shadow: 0 8px 24px rgba(37,99,235,0.12), inset 0 1px 0 rgba(255,255,255,0.95);
}

/* ---- Why us teaser wrapper ---- */
.why-teaser-inner {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 30px;
  padding: 48px 40px;
  box-shadow:
    0 16px 60px rgba(37,99,235,0.12),
    0 4px 16px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.95);
}

/* ---- Mini compare table ---- */
.mini-compare-table {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.92) !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 40px rgba(37,99,235,0.12), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ---- Emergency USP ---- */
.emergency-usp {
  background: rgba(255,241,242,0.92) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.92) !important;
  border-radius: 26px !important;
  box-shadow: 0 10px 40px rgba(239,68,68,0.10), inset 0 1px 0 rgba(255,255,255,0.90) !important;
}

/* ---- Disclaimer banner ---- */
.disclaimer-banner {
  background: rgba(255,251,235,0.65) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.75) !important;
  box-shadow: 0 6px 24px rgba(245,158,11,0.10), inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

/* ---- Trusted by logos ---- */
.trusted-source-logo {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255,255,255,0.95) !important;
  box-shadow: 0 4px 14px rgba(37,99,235,0.09) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}
.trusted-source-logo:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(37,99,235,0.14) !important;
}

/* ---- Trusted by strip strip ---- */
.trusted-by-strip {
  background: rgba(255,255,255,0.65) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-top: 1px solid rgba(255,255,255,0.60) !important;
  border-bottom: 1px solid rgba(255,255,255,0.60) !important;
}

/* ---- CTA band ---- */
.cta-band {
  background: linear-gradient(135deg, rgba(37,99,235,0.85) 0%, rgba(29,78,216,0.90) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(147,197,253,0.35) !important;
  border-bottom: 1px solid rgba(147,197,253,0.20) !important;
}

/* ---- Header — стеклянный, без отдельного фона ---- */
.header {
  background: rgba(255,255,255,0.70) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.80) !important;
  box-shadow: 0 2px 12px rgba(37,99,235,0.06) !important;
}

/* ---- Footer — стеклянный футер ---- */
.footer {
  background: rgba(255,255,255,0.80) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(255,255,255,0.92) !important;
}

/* ---- Doctor card (hero) ---- */
.doctor-card {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.95) !important;
  box-shadow: 0 20px 60px rgba(37,99,235,0.15), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ---- Stat bubbles (hero floating) ---- */
.stat-bubble {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.95) !important;
  box-shadow: 0 8px 32px rgba(37,99,235,0.15), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ---- Section headers — glass pill ---- */
.section-header {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 36px;
  box-shadow: 0 4px 20px rgba(37,99,235,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
  display: inline-block;
  width: 100%;
  text-align: center;
}

/* ---- Cookie banner — glass ---- */
.cookie-banner {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(255,255,255,0.95) !important;
  box-shadow: 0 -4px 20px rgba(37,99,235,0.08) !important;
}

/* ---- Exit popup — glass ---- */
.exit-popup {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  border: 1px solid rgba(255,255,255,0.95) !important;
  box-shadow: 0 32px 80px rgba(37,99,235,0.20) !important;
}

/* Mobile */
@media (max-width: 768px) {
  .glass-hiw-card { padding: 24px 18px; border-radius: 20px; margin-bottom: 16px; }
  .glass-stat-card { padding: 22px 16px; border-radius: 18px; }
  .why-teaser-inner { padding: 28px 20px; border-radius: 22px; }
  .section-header { padding: 20px 20px; border-radius: 16px; margin-bottom: 24px; }
  .orb { display: none; }
}

/* ======================================================
   AMBIENT GLOW ORBS — декоративные glow-пятна
   Создают глубину и технологичный эффект
   ====================================================== */
.ambient-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: orbFloat 18s ease-in-out infinite;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.35) 0%, rgba(37,99,235,0) 70%);
  top: -150px; left: -150px;
  animation-delay: 0s;
  animation-duration: 20s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.30) 0%, rgba(99,102,241,0) 70%);
  top: 20%; right: -100px;
  animation-delay: -6s;
  animation-duration: 24s;
}
.orb-3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(14,165,233,0.28) 0%, rgba(14,165,233,0) 70%);
  bottom: 15%; left: 10%;
  animation-delay: -12s;
  animation-duration: 22s;
}
.orb-4 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(124,58,237,0.22) 0%, rgba(124,58,237,0) 70%);
  bottom: -80px; right: 15%;
  animation-delay: -4s;
  animation-duration: 28s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(30px, -40px) scale(1.05); }
  50%       { transform: translate(-20px, 30px) scale(0.95); }
  75%       { transform: translate(40px, 20px) scale(1.03); }
}

/* Убеждаемся что весь контент поверх orbs */
body > *:not(.ambient-orbs):not(header):not(.dash-topbar):not(.dash-bottom-nav):not(.dash-bnav-more-sheet) {
  position: relative;
  z-index: 1;
}
/* Headers keep their own sticky positioning */
header.header, .dash-topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 9000 !important;
}
/* Bottom nav stays fixed to viewport at all times */
.dash-bottom-nav {
  position: fixed !important;
}

/* ======================================================
   HERO TITLE HOVER ANIMATION
   ====================================================== */
.hero-title {
  transition: transform 0.35s cubic-bezier(.22,.68,0,1.2), filter 0.35s ease !important;
  cursor: default;
  display: block;
}
.hero-title:hover {
  transform: translateY(-4px) scale(1.02) !important;
  filter: drop-shadow(0 8px 24px rgba(37,99,235,0.22)) !important;
}
.hero-title .text-gradient {
  transition: filter 0.35s ease;
}
.hero-title:hover .text-gradient {
  filter: brightness(1.15) drop-shadow(0 4px 12px rgba(37,99,235,0.30));
}

/* ── Upgrade Limit Card (chat limit reached) ─────────────── */
.upgrade-limit-card {
  background: linear-gradient(135deg, rgba(37,99,235,0.08) 0%, rgba(124,58,237,0.10) 100%);
  border: 1.5px solid rgba(99,102,241,0.30);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  max-width: 320px;
  backdrop-filter: blur(10px);
}
.upgrade-limit-icon {
  font-size: 32px;
  line-height: 1;
}
.upgrade-limit-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a8a;
}
.upgrade-limit-text {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}
.upgrade-limit-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.upgrade-limit-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}

/* ── Chat Layout Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .chat-layout { flex-direction: column; height: auto; }
  .chat-sessions-sidebar {
    width: 100%;
    min-width: unset;
    border-right: none;
    border-bottom: 1.5px solid #e2e8f0;
    max-height: 220px;
  }
  .css-list { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 6px; gap: 6px; }
  .css-session-item { min-width: 160px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .chat-layout .standalone-chat {
    height: calc(100vh - 340px);
    min-height: 400px;
    display: flex;
    flex-direction: column;
  }
  /* Standalone chat messages fill available space, input sticks to bottom */
  .chat-layout .standalone-chat .chat-messages { flex: 1; overflow-y: auto; }
  .chat-layout .standalone-chat .chat-input-area {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: var(--color-white);
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
  .css-new-btn-mobile { display: flex !important; }
  .css-new-btn { display: none; }
}
@media (max-width: 600px) {
  .chat-sessions-sidebar { max-height: 180px; }
  .css-session-item { min-width: 140px; }
  .chat-layout .standalone-chat { height: calc(100vh - 300px); }
}

/* Delete-all button in chat sidebar */
.css-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  background: #fff;
  color: #9ca3af;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.css-clear-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

/* ===================================================
   MEDASSIST AI — TECH REDESIGN v2
   Medical-tech aesthetic: dark hero, neon accents,
   circuit patterns, animated elements
   =================================================== */

/* ── New CSS variables for tech theme ── */
:root {
  --neon-blue:   #38bdf8;
  --neon-cyan:   #06b6d4;
  --neon-green:  #34d399;
  --neon-purple: #a78bfa;
  --dark-bg:     #060d1a;
  --dark-card:   #0d1b2e;
  --dark-border: rgba(56,189,248,0.18);
  --grid-line:   rgba(56,189,248,0.06);
  --glow-blue:   0 0 40px rgba(56,189,248,0.25);
  --glow-cyan:   0 0 30px rgba(6,182,212,0.30);
}

/* ── Hero dark theme ── */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 60% 0%, rgba(6,182,212,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(56,189,248,0.08) 0%, transparent 60%),
    linear-gradient(165deg, #060d1a 0%, #0a1628 45%, #0d1f3c 100%) !important;
  padding: 4rem 0 5rem !important;
  overflow: hidden;
  position: relative;
}

/* Animated circuit/grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  animation: gridPulse 8s ease-in-out infinite alternate;
}
@keyframes gridPulse {
  0%   { opacity: 0.7; }
  100% { opacity: 1.4; }
}

/* Hero text — white on dark */
.hero .hero-badge {
  background: rgba(56,189,248,0.12) !important;
  color: var(--neon-blue) !important;
  border: 1px solid rgba(56,189,248,0.35) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.hero .hero-title {
  color: #f0f9ff !important;
  font-size: 3.2rem !important;
  text-shadow: 0 0 60px rgba(56,189,248,0.2);
}

.hero .text-gradient {
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-cyan) 50%, var(--neon-green) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 0 20px rgba(56,189,248,0.4));
}

.hero .hero-subtitle {
  color: rgba(186,230,255,0.75) !important;
}

/* Hero CTA buttons */
.hero .btn-primary {
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
  border-color: transparent !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.3), 0 8px 30px rgba(37,99,235,0.5) !important;
  position: relative;
  overflow: hidden;
}
.hero .btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
}
.hero .btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(56,189,248,0.6), 0 12px 40px rgba(37,99,235,0.65) !important;
  transform: translateY(-2px);
}

.hero .btn-ghost {
  background: rgba(255,255,255,0.04) !important;
  color: var(--neon-blue) !important;
  border-color: rgba(56,189,248,0.3) !important;
  backdrop-filter: blur(8px);
}
.hero .btn-ghost:hover {
  background: rgba(56,189,248,0.10) !important;
  border-color: rgba(56,189,248,0.6) !important;
}

/* Hero trust items */
.hero .trust-item {
  color: rgba(186,230,255,0.70) !important;
}
.hero .trust-check {
  color: var(--neon-green) !important;
  filter: drop-shadow(0 0 6px rgba(52,211,153,0.6));
}

/* Security badges on dark bg */
.hero .sec-badge {
  background: rgba(13,27,46,0.8) !important;
  border-color: rgba(56,189,248,0.3) !important;
  color: var(--neon-blue) !important;
  backdrop-filter: blur(8px);
}
.hero .sec-badge svg { color: var(--neon-cyan) !important; }

/* Doctor card — dark glass */
.hero .doctor-card {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.25) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.12), 0 24px 64px rgba(0,0,0,0.6), var(--glow-blue) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
}
.hero .doctor-name { color: #e0f2fe !important; }
.hero .doctor-role { color: rgba(186,230,255,0.6) !important; }
.hero .avatar-circle {
  background: rgba(37,99,235,0.2) !important;
  border-color: rgba(56,189,248,0.4) !important;
  box-shadow: 0 0 20px rgba(56,189,248,0.2);
}
.hero .status-dot {
  background: var(--neon-green) !important;
  box-shadow: 0 0 8px rgba(52,211,153,0.8) !important;
  border-color: #0d1b2e !important;
}
.hero .mini-msg.user {
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
}
.hero .mini-msg.bot {
  background: rgba(255,255,255,0.05) !important;
  color: #bae6ff !important;
  border: 1px solid rgba(56,189,248,0.15);
}
.hero .mini-src-badge {
  background: rgba(37,99,235,0.2) !important;
  color: var(--neon-blue) !important;
  border-color: rgba(56,189,248,0.3) !important;
}

/* Stat bubbles — dark glass */
.hero .stat-bubble {
  background: rgba(13,27,46,0.9) !important;
  border: 1px solid rgba(56,189,248,0.25) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.10), 0 12px 32px rgba(0,0,0,0.4), var(--glow-blue) !important;
  backdrop-filter: blur(12px) !important;
}
.hero .stat-number { color: var(--neon-blue) !important; }
.hero .stat-label  { color: rgba(186,230,255,0.6) !important; }

/* ── Ambient orbs (decorative glows) ── */
.ambient-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  top: -200px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 70%);
  top: 200px; right: -100px;
  animation-delay: -4s;
}
.orb-3 {
  width: 600px; height: 300px;
  background: radial-gradient(circle, rgba(56,189,248,0.08) 0%, transparent 70%);
  bottom: 200px; left: 30%;
  animation-delay: -8s;
}
.orb-4 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(167,139,250,0.10) 0%, transparent 70%);
  bottom: -100px; right: 20%;
  animation-delay: -2s;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

/* ── Header — transparent glass on hero, white elsewhere ── */
.header {
  background: rgba(6,13,26,0.85) !important;
  border-bottom: 1px solid rgba(56,189,248,0.15) !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
}
.header .logo { color: #e0f2fe !important; }
.header .logo-icon { color: var(--neon-blue) !important; }
.header .logo-text { color: #e0f2fe !important; font-weight: 300; }
.header .logo-d { color: #38bdf8 !important; font-weight: 800; }
.header .logo-ai {
  background: linear-gradient(135deg, #10b981, #0891b2) !important;
  box-shadow: 0 0 14px rgba(16,185,129,0.45);
}
.header .nav-link { color: rgba(186,230,255,0.7) !important; }
.header .nav-link:hover { color: var(--neon-blue) !important; }
.header .btn-outline {
  color: var(--neon-blue) !important;
  border-color: rgba(56,189,248,0.4) !important;
  background: transparent !important;
}
.header .btn-outline:hover {
  background: rgba(56,189,248,0.10) !important;
}
.header .btn-primary {
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
  border-color: transparent !important;
  box-shadow: 0 0 16px rgba(37,99,235,0.4) !important;
}
.mobile-menu-btn span { background: #e0f2fe !important; }
.mobile-menu {
  background: rgba(6,13,26,0.95) !important;
  border-top-color: rgba(56,189,248,0.15) !important;
  backdrop-filter: blur(20px);
}
.mobile-menu .nav-link { color: rgba(186,230,255,0.8) !important; }

/* ── Trusted-by strip — dark ── */
.trusted-by-strip {
  background: rgba(6,13,26,0.95) !important;
  border-top-color: rgba(56,189,248,0.12) !important;
  border-bottom-color: rgba(56,189,248,0.12) !important;
}
.trusted-by-label { color: rgba(56,189,248,0.5) !important; }
.trusted-source-logo {
  background: rgba(13,27,46,0.9) !important;
  border-color: rgba(56,189,248,0.20) !important;
  color: #bae6ff !important;
  box-shadow: 0 0 12px rgba(56,189,248,0.08) !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.trusted-source-logo:hover {
  border-color: rgba(56,189,248,0.5) !important;
  box-shadow: 0 0 20px rgba(56,189,248,0.18) !important;
}
.trusted-by-strip span[style] { color: rgba(56,189,248,0.45) !important; }

/* ── Stats band — premium neon cards ── */
.stats-band {
  background: linear-gradient(180deg, rgba(6,13,26,0.98) 0%, rgba(10,22,40,0.98) 100%) !important;
  padding: 4rem 0 !important;
  position: relative;
}
.stats-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}
.stats-band .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.glass-stat-card {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.18) !important;
  border-radius: 20px !important;
  padding: 2rem 1.5rem !important;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.08), 0 8px 32px rgba(0,0,0,0.4) !important;
}
.glass-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-blue), var(--neon-cyan), transparent) !important;
}
.glass-stat-card::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(56,189,248,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.glass-stat-card:hover {
  transform: translateY(-8px) !important;
  border-color: rgba(56,189,248,0.45) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.25), 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(56,189,248,0.15) !important;
}
.stat-number-big {
  font-size: 2.75rem !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 0 12px rgba(56,189,248,0.4));
  line-height: 1 !important;
  margin-bottom: 0.5rem;
}
.stat-label-big {
  color: rgba(186,230,255,0.65) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}

/* ── How It Works section — tech cards ── */
.section-block {
  background: linear-gradient(180deg, rgba(10,22,40,0.98) 0%, rgba(8,18,34,0.98) 100%) !important;
}
.section-header h2 {
  color: #e0f2fe !important;
  text-shadow: 0 0 40px rgba(56,189,248,0.2);
}
.section-header h2 .text-gradient,
.section-header .text-gradient {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
.section-header p { color: rgba(186,230,255,0.55) !important; }

/* Step cards new */
.step-card-new {
  background: rgba(13,27,46,0.8) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.06), 0 8px 24px rgba(0,0,0,0.4) !important;
  position: relative;
  overflow: hidden;
}
.step-card-new::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.step-card-new:hover::before { opacity: 1; }
.step-card-new:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(56,189,248,0.35) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.2), 0 16px 48px rgba(0,0,0,0.5), 0 0 30px rgba(56,189,248,0.12) !important;
}
.step-card-new h3 { color: #e0f2fe !important; }
.step-card-new p  { color: rgba(186,230,255,0.55) !important; }
.step-num { color: var(--neon-blue) !important; opacity: 0.7; }
.step-icon-wrap.blue   { background: rgba(37,99,235,0.2) !important;  color: var(--neon-blue) !important; box-shadow: 0 0 16px rgba(56,189,248,0.2); }
.step-icon-wrap.green  { background: rgba(5,150,105,0.2) !important;  color: var(--neon-green) !important; box-shadow: 0 0 16px rgba(52,211,153,0.2); }
.step-icon-wrap.purple { background: rgba(124,58,237,0.2) !important; color: var(--neon-purple) !important; box-shadow: 0 0 16px rgba(167,139,250,0.2); }
.step-icon-wrap.orange { background: rgba(234,88,12,0.2) !important;  color: #fb923c !important; box-shadow: 0 0 16px rgba(251,146,60,0.15); }
.step-connector::after { color: rgba(56,189,248,0.4) !important; }

/* HiW glass card */
.glass-hiw-card {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.06), 0 12px 40px rgba(0,0,0,0.5) !important;
}
.glass-hiw-card::before {
  background: linear-gradient(90deg, transparent, var(--neon-blue), var(--neon-cyan), transparent) !important;
}
.glass-hiw-card:hover {
  border-color: rgba(56,189,248,0.35) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.2), 0 24px 60px rgba(0,0,0,0.6), 0 0 40px rgba(56,189,248,0.12) !important;
}

/* ── Sources grid ── */
.source-card-new {
  background: rgba(13,27,46,0.85) !important;
  border-color: rgba(56,189,248,0.15) !important;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s !important;
}
.source-card-new:hover {
  border-color: rgba(56,189,248,0.4) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.15), 0 12px 40px rgba(0,0,0,0.4), 0 0 24px rgba(56,189,248,0.10) !important;
  transform: translateY(-3px);
}
.source-card-new h4 { color: #e0f2fe !important; }
.source-card-new p  { color: rgba(186,230,255,0.5) !important; }
.source-badge.who  { background: rgba(37,99,235,0.2) !important;  color: var(--neon-blue) !important; }
.source-badge.ema  { background: rgba(5,150,105,0.2) !important;  color: var(--neon-green) !important; }
.source-badge.nice { background: rgba(124,58,237,0.2) !important; color: var(--neon-purple) !important; }
.source-badge.ord  { background: rgba(234,88,12,0.2) !important;  color: #fb923c !important; }

/* ── Pricing cards ── */
.pricing-card {
  background: rgba(13,27,46,0.85) !important;
  border-color: rgba(56,189,248,0.15) !important;
  backdrop-filter: blur(16px);
}
.pricing-card-featured {
  border-color: rgba(56,189,248,0.5) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.25), 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(56,189,248,0.12) !important;
}
.plan-name { color: rgba(186,230,255,0.6) !important; }
.price-amount { color: #e0f2fe !important; }
.price-period { color: rgba(186,230,255,0.4) !important; }
.plan-desc    { color: rgba(186,230,255,0.5) !important; }
.plan-features li { color: rgba(186,230,255,0.7) !important; font-size: 0.875rem; }
.plan-features li.limited { color: rgba(186,230,255,0.3) !important; }
.check { color: var(--neon-green) !important; filter: drop-shadow(0 0 4px rgba(52,211,153,0.6)); }
.plan-popular {
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
  box-shadow: 0 0 16px rgba(56,189,248,0.4) !important;
}
.plan-note { color: rgba(186,230,255,0.3) !important; }

/* ── Features section ── */
.features-text h2 { color: #e0f2fe !important; }
.features-text > p { color: rgba(186,230,255,0.55) !important; }
.features-list strong { color: #e0f2fe !important; }
.features-list p { color: rgba(186,230,255,0.5) !important; }
.feature-mockup {
  background: rgba(13,27,46,0.9) !important;
  border-color: rgba(56,189,248,0.2) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.10), 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(56,189,248,0.10) !important;
}
.mockup-header {
  background: rgba(6,13,26,0.8) !important;
  border-bottom-color: rgba(56,189,248,0.12) !important;
  color: #bae6ff !important;
}
.mockup-badge { background: rgba(56,189,248,0.12) !important; color: var(--neon-blue) !important; border-color: rgba(56,189,248,0.3) !important; }
.mockup-msg.bot { background: rgba(255,255,255,0.04) !important; color: #bae6ff !important; }
.mockup-msg.user { background: linear-gradient(135deg, #2563eb, #0891b2) !important; }

/* ── Testimonials ── */
.section-alt {
  background: linear-gradient(180deg, rgba(8,18,34,0.98) 0%, rgba(10,22,40,0.98) 100%) !important;
}
/* Testimonial cards */
.testimonial-card,
[class*="testimonial"] {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  color: rgba(186,230,255,0.8) !important;
}
.t-name { color: #e0f2fe !important; }
.t-loc  { color: rgba(56,189,248,0.5) !important; }

/* ── CTA band ── */
.cta-band {
  background: linear-gradient(135deg, #060d1a 0%, #0d1f3c 50%, #061525 100%) !important;
  border-top: 1px solid rgba(56,189,248,0.15);
  border-bottom: 1px solid rgba(56,189,248,0.15);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.cta-band h2 { color: #e0f2fe !important; text-shadow: 0 0 30px rgba(56,189,248,0.3); }
.cta-band p { color: rgba(186,230,255,0.65) !important; }
.cta-band .btn-white {
  background: rgba(56,189,248,0.12) !important;
  color: var(--neon-blue) !important;
  border-color: rgba(56,189,248,0.4) !important;
  box-shadow: 0 0 20px rgba(56,189,248,0.2) !important;
}
.cta-band .btn-white:hover {
  background: rgba(56,189,248,0.22) !important;
  box-shadow: 0 0 30px rgba(56,189,248,0.35) !important;
}

/* ── Disclaimer banner ── */
.disclaimer-banner {
  background: rgba(13,27,46,0.9) !important;
  border-color: rgba(56,189,248,0.2) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 20px rgba(56,189,248,0.06) !important;
}
.disclaimer-banner-text { color: #bae6ff !important; }
.disclaimer-banner-text strong { color: var(--neon-blue) !important; }

/* ── Emergency section ── */
.emergency-usp {
  background: linear-gradient(135deg, rgba(30,0,0,0.9), rgba(50,5,5,0.9)) !important;
  border-color: rgba(239,68,68,0.3) !important;
}

/* ── Footer ── */
.footer {
  background: #020810 !important;
  border-top: 1px solid rgba(56,189,248,0.10);
}
.footer-brand { color: rgba(186,230,255,0.7) !important; }
.footer-links a { color: rgba(186,230,255,0.4) !important; }
.footer-links a:hover { color: var(--neon-blue) !important; }
.footer-copy { color: rgba(186,230,255,0.25) !important; }

/* ── Section-block alt text colors ── */
.section-block h2, .section-block h3 { color: #e0f2fe !important; }

/* ── Body background ── */
body {
  background: linear-gradient(180deg, #060d1a 0%, #08121e 30%, #060d1a 100%) !important;
}

/* ── Glowing primary buttons site-wide ── */
.btn-primary {
  box-shadow: 0 4px 20px rgba(37,99,235,0.35) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(37,99,235,0.55) !important;
}

/* ── Pulse animation for live indicator ── */
@keyframes neonPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(52,211,153,0.6), 0 0 0 0 rgba(52,211,153,0.3); }
  50%       { box-shadow: 0 0 10px rgba(52,211,153,0.9), 0 0 0 6px rgba(52,211,153,0); }
}
.status-dot { animation: neonPulse 2.5s ease-in-out infinite !important; }

/* ── Scroll bar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #060d1a; }
::-webkit-scrollbar-thumb { background: rgba(56,189,248,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(56,189,248,0.45); }

/* ── Loading spinner on dark ── */
.loading-spinner {
  border-color: rgba(56,189,248,0.15) !important;
  border-top-color: var(--neon-blue) !important;
  box-shadow: 0 0 20px rgba(56,189,248,0.2);
}

/* ── Tech redesign: testimonials, features strip, why-teaser, compare ── */

/* Testimonial cards */
.testimonial-card {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s !important;
}
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.testimonial-card:hover::before { opacity: 1; }
.testimonial-card:hover {
  transform: translateY(-5px) !important;
  border-color: rgba(56,189,248,0.35) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.12), 0 16px 48px rgba(0,0,0,0.5), 0 0 30px rgba(56,189,248,0.08) !important;
}
.testimonial-stars { color: #fbbf24 !important; filter: drop-shadow(0 0 4px rgba(251,191,36,0.4)); }
.testimonial-text  { color: rgba(186,230,255,0.7) !important; }

/* Features strip */
.feat-strip-section {
  background: linear-gradient(180deg, rgba(10,22,40,0.99) 0%, rgba(8,18,34,0.99) 100%) !important;
}
.feat-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.feat-strip-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(13,27,46,0.8);
  border: 1px solid rgba(56,189,248,0.12);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.feat-strip-item:hover {
  border-color: rgba(56,189,248,0.35);
  box-shadow: 0 0 24px rgba(56,189,248,0.10);
  transform: translateY(-3px);
}
.feat-strip-icon { font-size: 1.75rem; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(56,189,248,0.3)); }
.feat-strip-item strong { color: #e0f2fe; display: block; font-size: 0.95rem; margin-bottom: 0.3rem; }
.feat-strip-item p { color: rgba(186,230,255,0.5); font-size: 0.82rem; line-height: 1.5; margin: 0; }

/* Why-teaser section */
.why-teaser-section {
  background: linear-gradient(180deg, rgba(8,18,34,0.98) 0%, rgba(10,22,40,0.98) 100%) !important;
}
.why-teaser-badge {
  display: inline-block;
  background: rgba(56,189,248,0.1);
  color: var(--neon-blue);
  border: 1px solid rgba(56,189,248,0.3);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.why-teaser-text h2 { color: #e0f2fe !important; }
.why-teaser-text > p { color: rgba(186,230,255,0.55) !important; }
.glass-why-tp {
  background: rgba(13,27,46,0.8) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  color: rgba(186,230,255,0.7) !important;
  border-radius: 10px !important;
}
.why-tp-yes { color: var(--neon-green) !important; filter: drop-shadow(0 0 4px rgba(52,211,153,0.6)); }

/* Compare table dark */
.mini-compare-table {
  background: rgba(13,27,46,0.9) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.08), 0 16px 48px rgba(0,0,0,0.5), 0 0 30px rgba(56,189,248,0.08) !important;
}
.mct-header {
  background: rgba(6,13,26,0.8) !important;
  border-bottom: 1px solid rgba(56,189,248,0.15) !important;
  color: rgba(186,230,255,0.6) !important;
}
.mct-col-us { color: var(--neon-blue) !important; font-weight: 700 !important; }
.mct-row { border-bottom-color: rgba(56,189,248,0.08) !important; color: rgba(186,230,255,0.6) !important; }
.mct-col-feat { color: rgba(186,230,255,0.5) !important; }
.mct-yes     { color: var(--neon-green) !important;  filter: drop-shadow(0 0 4px rgba(52,211,153,0.6)); }
.mct-partial { color: #fbbf24 !important; }
.mct-no      { color: rgba(239,68,68,0.7) !important; }

/* HiW video placeholder — dark */
.hiw-video-placeholder {
  background: rgba(6,13,26,0.95) !important;
  border: 1px dashed rgba(56,189,248,0.2) !important;
}
.hiw-vp-icon {
  background: rgba(56,189,248,0.1) !important;
  color: var(--neon-blue) !important;
  box-shadow: 0 0 20px rgba(56,189,248,0.2) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
}
.hiw-vp-label { color: rgba(186,230,255,0.7) !important; }
.hiw-vp-hint  { color: rgba(56,189,248,0.4) !important; }
.hiw-connector { background: linear-gradient(#0d1b2e, rgba(56,189,248,0.08), #0d1b2e) !important; }
.hiw-connector::after { background: rgba(56,189,248,0.25) !important; }

/* Hiw section icon colors */
.hiw-step-icon.blue   { background: rgba(37,99,235,0.2) !important;  color: var(--neon-blue) !important;   box-shadow: 0 0 16px rgba(56,189,248,0.25); }
.hiw-step-icon.green  { background: rgba(5,150,105,0.2) !important;  color: var(--neon-green) !important;  box-shadow: 0 0 16px rgba(52,211,153,0.25); }
.hiw-step-icon.purple { background: rgba(124,58,237,0.2) !important; color: var(--neon-purple) !important; box-shadow: 0 0 16px rgba(167,139,250,0.25); }
.hiw-step-icon.orange { background: rgba(234,88,12,0.2) !important;  color: #fb923c !important;             box-shadow: 0 0 16px rgba(251,146,60,0.20); }
.hiw-step-num { color: var(--neon-blue) !important; opacity: 0.6; }
.glass-hiw-card h3 { color: #e0f2fe !important; }
.glass-hiw-card p  { color: rgba(186,230,255,0.55) !important; }

/* Source cards alt colors on dark */
.source-badge.msd { background: rgba(167,29,93,0.2) !important; color: #f472b6 !important; }
.source-badge.cch { background: rgba(3,105,161,0.2) !important; color: #38bdf8 !important; }

/* Auth page: keep left panel, brighten right panel slightly */
.auth-right { background: rgba(8,18,34,0.98) !important; }
.auth-form h2 { color: #e0f2fe !important; }
.auth-form-sub { color: rgba(186,230,255,0.55) !important; }
.auth-tabs { background: rgba(6,13,26,0.8) !important; }
.auth-tab { color: rgba(186,230,255,0.5) !important; }
.auth-tab.active { background: rgba(13,27,46,0.9) !important; color: var(--neon-blue) !important; }
.auth-right .form-group label { color: rgba(186,230,255,0.8) !important; }
.auth-right .form-group input,
.auth-right .form-group select,
.auth-right .form-group textarea {
  background: rgba(6,13,26,0.8) !important;
  border-color: rgba(56,189,248,0.2) !important;
  color: #e0f2fe !important;
}
.auth-right .form-group input:focus {
  border-color: rgba(56,189,248,0.5) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.12) !important;
}
.auth-switch-text { color: rgba(186,230,255,0.45) !important; }

/* Cookie banner */
.cookie-banner {
  background: rgba(6,13,26,0.97) !important;
  border-top: 1px solid rgba(56,189,248,0.15);
}
.cookie-banner p a { color: var(--neon-blue) !important; }

/* Pricing page adjustments */
.pricing-section-header h2 { color: #e0f2fe !important; }
.pricing-section-header p  { color: rgba(186,230,255,0.55) !important; }

/* Dashboard keep mostly light (functional UI), just accent tweaks */
.dash-topbar {
  background: rgba(6,13,26,0.95) !important;
  border-bottom-color: rgba(56,189,248,0.12) !important;
  backdrop-filter: blur(16px);
}
.dash-sidebar {
  background: rgba(8,18,34,0.98) !important;
  border-right-color: rgba(56,189,248,0.10) !important;
}
.dash-nav-item { color: rgba(186,230,255,0.55) !important; }
.dash-nav-item:hover { background: rgba(56,189,248,0.06) !important; color: rgba(186,230,255,0.85) !important; }
.dash-nav-item.active { background: rgba(37,99,235,0.15) !important; color: var(--neon-blue) !important; }
.sidebar-upgrade { box-shadow: 0 0 24px rgba(37,99,235,0.3) !important; }
.dash-main { background: rgba(8,18,34,0.98) !important; }
.view-header h2 { color: #e0f2fe !important; }
.view-header p  { color: rgba(186,230,255,0.5) !important; }

@media (max-width: 900px) {
  .feat-strip-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .feat-strip-grid { grid-template-columns: 1fr; }
}

/* ── ECG scan line in hero ── */
.hero-ecg-wrap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.hero-ecg-svg {
  width: 200%;
  height: 100%;
  animation: ecgScroll 8s linear infinite;
}
@keyframes ecgScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ecg-line {
  fill: none;
  stroke: rgba(56,189,248,0.35);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(56,189,248,0.6));
}

/* ── Neon data nodes decoration in stats band ── */
.stats-band .container { position: relative; z-index: 1; }

/* ── Animated connecting dots on how-it-works step connector ── */
.hiw-connector {
  position: relative;
  overflow: visible;
}
.hiw-connector::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(56,189,248,0.3), transparent);
  animation: connectorPulse 3s ease-in-out infinite;
}
@keyframes connectorPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* ===================================================
   TECH REDESIGN v2 — PRICING, WHY-US, SECTION HEADERS
   =================================================== */

/* ── Override inline light backgrounds on all pages ── */
body { background: linear-gradient(180deg, #060d1a 0%, #08121e 50%, #060d1a 100%) !important; }

/* Section headings everywhere */
h1, h2, h3 { color: #e0f2fe; }
p { color: rgba(186,230,255,0.65); }

/* ── Pricing hero ── */
.pricing-hero {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(37,99,235,0.15) 0%, transparent 70%),
    linear-gradient(160deg, #060d1a 0%, #0a1628 60%, #0d1f3c 100%) !important;
  padding: 3.5rem 0 2.5rem !important;
}
.pricing-hero h1 { color: #e0f2fe !important; }
.pricing-hero p   { color: rgba(186,230,255,0.65) !important; }
.pricing-hero-badge {
  background: rgba(56,189,248,0.12) !important;
  color: var(--neon-blue) !important;
  border-color: rgba(56,189,248,0.3) !important;
}
.pricing-hero-glass-card {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
  box-shadow: 0 0 40px rgba(56,189,248,0.08) !important;
  backdrop-filter: blur(20px);
}
.trust-strip .trust-item { color: rgba(186,230,255,0.65) !important; }
.trust-strip .trust-item svg { color: var(--neon-green) !important; }
.billing-toggle span { color: rgba(186,230,255,0.5) !important; }
.billing-toggle span.active { color: #e0f2fe !important; }
.save-badge { background: rgba(52,211,153,0.15) !important; color: var(--neon-green) !important; border-color: rgba(52,211,153,0.3) !important; }

/* ── Pricing main section ── */
.pricing-main {
  background: linear-gradient(180deg, rgba(8,18,34,0.99) 0%, rgba(10,22,40,0.99) 100%) !important;
}

/* Pricing cards — .pc */
.pc {
  background: rgba(13,27,46,0.88) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.06), 0 12px 40px rgba(0,0,0,0.5) !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s !important;
}
.pc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.pc:hover::before { opacity: 1; }
.pc:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(56,189,248,0.35) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.2), 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(56,189,248,0.12) !important;
}
.pc-tier { color: rgba(56,189,248,0.5) !important; }
.pc-name { color: #e0f2fe !important; }
.pc-amount { color: #e0f2fe !important; }
.pc-period { color: rgba(186,230,255,0.4) !important; }
.pc-desc   { color: rgba(186,230,255,0.55) !important; }
.pc-features li { color: rgba(186,230,255,0.7) !important; }
.pc-features .dim { color: rgba(186,230,255,0.25) !important; }
.pc-features .chk { color: var(--neon-green) !important; filter: drop-shadow(0 0 4px rgba(52,211,153,0.5)); }
.pc-features .cross { color: rgba(186,230,255,0.2) !important; }
.pc-note { color: rgba(186,230,255,0.3) !important; }
.pc-limit-text .pc-limit-val   { color: #e0f2fe !important; }
.pc-limit-text .pc-limit-label { color: rgba(186,230,255,0.45) !important; }
.pc-limits { border-color: rgba(56,189,248,0.1) !important; }
.pc-limit-row { border-color: rgba(56,189,248,0.08) !important; }
.pc-limit-icon { background: rgba(37,99,235,0.2) !important; }
.pc-limit-icon.check { background: rgba(37,99,235,0.2) !important; }
.pc-limit-icon.chat  { background: rgba(22,163,74,0.2) !important; }
.pc-divider { border-color: rgba(56,189,248,0.08) !important; }
.pc-cta.outline {
  background: transparent !important;
  border-color: rgba(56,189,248,0.35) !important;
  color: var(--neon-blue) !important;
}
.pc-cta.outline:hover {
  background: rgba(56,189,248,0.10) !important;
  border-color: rgba(56,189,248,0.6) !important;
}
.pc-cta:not(.outline) {
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
  box-shadow: 0 0 20px rgba(37,99,235,0.4) !important;
}

/* Featured / Pro card */
.pc.featured {
  border-color: rgba(56,189,248,0.4) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.2), 0 20px 60px rgba(0,0,0,0.6), 0 0 50px rgba(56,189,248,0.15) !important;
}
.pc-popular {
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
  box-shadow: 0 0 16px rgba(56,189,248,0.4) !important;
}

/* Feature deep-dive section */
.features-dive {
  background: linear-gradient(180deg, rgba(10,22,40,0.99) 0%, rgba(8,18,34,0.99) 100%) !important;
}
.section-header-glass {
  background: transparent;
  border: none;
  backdrop-filter: none;
}
.section-header-glass h2 { color: #e0f2fe !important; }
.section-header-glass .sub { color: rgba(186,230,255,0.5) !important; }

.feature-card {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.05), 0 8px 28px rgba(0,0,0,0.4) !important;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s !important;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.4), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(56,189,248,0.3) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.15), 0 16px 48px rgba(0,0,0,0.5), 0 0 30px rgba(56,189,248,0.10) !important;
}
.feature-card h3 { color: #e0f2fe !important; }
.feature-card > p { color: rgba(186,230,255,0.6) !important; }
.feature-card-icon {
  background: rgba(37,99,235,0.18) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
}
.feature-card-steps li { color: rgba(186,230,255,0.6) !important; }
.step-num {
  background: rgba(37,99,235,0.2) !important;
  color: var(--neon-blue) !important;
  border-color: rgba(56,189,248,0.2) !important;
}
.src-badge-sm {
  background: rgba(37,99,235,0.2) !important;
  color: var(--neon-blue) !important;
  border-color: rgba(56,189,248,0.2) !important;
}
.src-badge-sm.who  { background: rgba(37,99,235,0.2) !important;  color: var(--neon-blue) !important; }
.src-badge-sm.ema  { background: rgba(5,150,105,0.2) !important;  color: var(--neon-green) !important; }
.src-badge-sm.nice { background: rgba(124,58,237,0.2) !important; color: var(--neon-purple) !important; }
.src-badge-sm.ord  { background: rgba(234,88,12,0.2) !important;  color: #fb923c !important; }

/* Comparison section */
.compare-section {
  background: linear-gradient(180deg, rgba(8,18,34,0.99) 0%, rgba(10,22,40,0.99) 100%) !important;
}
.cmp-table-wrap {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  box-shadow: 0 0 40px rgba(56,189,248,0.08) !important;
  border-radius: 16px !important;
  overflow: hidden;
}
.cmp-head {
  background: rgba(6,13,26,0.9) !important;
  border-bottom-color: rgba(56,189,248,0.12) !important;
}
.cmp-head-us { color: var(--neon-blue) !important; }
.cmp-head div { color: rgba(186,230,255,0.4) !important; }
.cmp-row { border-bottom-color: rgba(56,189,248,0.06) !important; }
.cmp-row:hover { background: rgba(56,189,248,0.04) !important; }
.cmp-feat { color: rgba(186,230,255,0.6) !important; }
.cmp-highlight { background: rgba(37,99,235,0.08) !important; }
.cmp-yes     { color: var(--neon-green) !important;  filter: drop-shadow(0 0 4px rgba(52,211,153,0.5)); }
.cmp-partial { color: #fbbf24 !important; }
.cmp-no      { color: rgba(239,68,68,0.6) !important; }

/* FAQ section */
.pricing-faq {
  background: linear-gradient(180deg, rgba(10,22,40,0.99) 0%, rgba(8,18,34,0.99) 100%) !important;
}
.faq-item {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  transition: border-color 0.2s !important;
}
.faq-item.open {
  border-color: rgba(56,189,248,0.3) !important;
  box-shadow: 0 0 20px rgba(56,189,248,0.08) !important;
}
.faq-q { color: #e0f2fe !important; }
.faq-a { color: rgba(186,230,255,0.6) !important; background: transparent !important; }
.faq-q svg, .faq-icon { color: rgba(56,189,248,0.5) !important; }

/* Pricing CTA */
.pricing-cta-section {
  background: linear-gradient(135deg, #060d1a 0%, #0d1f3c 50%, #061525 100%) !important;
  border-top: 1px solid rgba(56,189,248,0.1);
}
.pricing-cta-section h2 { color: #e0f2fe !important; }
.pricing-cta-section p  { color: rgba(186,230,255,0.6) !important; }

/* ── WHY US PAGE dark styling ── */
.why-hero {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(37,99,235,0.15) 0%, transparent 70%),
    linear-gradient(160deg, #060d1a 0%, #0a1628 60%, #0d1f3c 100%) !important;
}
.why-hero h1 { color: #e0f2fe !important; }
.why-hero h1 span { color: var(--neon-blue) !important; }
.why-hero p { color: rgba(186,230,255,0.65) !important; }
.why-hero-badge {
  background: rgba(56,189,248,0.12) !important;
  color: var(--neon-blue) !important;
  border: 1px solid rgba(56,189,248,0.3) !important;
}

.why-trust-strip {
  background: rgba(6,13,26,0.97) !important;
  border-bottom-color: rgba(56,189,248,0.12) !important;
}
.why-trust-item { color: rgba(186,230,255,0.7) !important; }

/* tech-explain cards */
.tech-explain-item {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s !important;
}
.tech-explain-item:hover {
  border-color: rgba(56,189,248,0.3) !important;
  box-shadow: 0 0 24px rgba(56,189,248,0.10) !important;
  transform: translateY(-3px);
}
.tech-explain-item h3 { color: #e0f2fe !important; }
.tech-explain-item p  { color: rgba(186,230,255,0.55) !important; }
.tei-icon {
  background: rgba(37,99,235,0.18) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
}

/* Why-us comparison table */
.comparison-table {
  background: rgba(13,27,46,0.85) !important;
  border-color: rgba(56,189,248,0.15) !important;
  border-radius: 16px !important;
  overflow: hidden;
}
.comparison-table th {
  background: rgba(6,13,26,0.9) !important;
  color: rgba(186,230,255,0.6) !important;
  border-color: rgba(56,189,248,0.12) !important;
}
.comparison-table th.us { color: var(--neon-blue) !important; }
.comparison-table td {
  color: rgba(186,230,255,0.6) !important;
  border-color: rgba(56,189,248,0.06) !important;
}
.comparison-table tr:hover td { background: rgba(56,189,248,0.04) !important; }
.cmp-us-col { background: rgba(37,99,235,0.06) !important; }
.cmp-yes-cell { color: var(--neon-green) !important; filter: drop-shadow(0 0 4px rgba(52,211,153,0.5)); }
.cmp-no-cell  { color: rgba(239,68,68,0.6) !important; }
.cmp-part-cell { color: #fbbf24 !important; }

/* USP cards */
.usp-card {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  transition: transform 0.25s, border-color 0.25s !important;
}
.usp-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(56,189,248,0.3) !important;
}
.usp-card h3 { color: #e0f2fe !important; }
.usp-card p  { color: rgba(186,230,255,0.55) !important; }

/* Legal page dark */
.legal-page h1, .legal-page h2 { color: #e0f2fe !important; }
.legal-page p, .legal-page li { color: rgba(186,230,255,0.6) !important; }
.legal-section h1, .legal-section h2 { color: #e0f2fe !important; }
.legal-section p, .legal-section li  { color: rgba(186,230,255,0.6) !important; }
.legal-tab { color: rgba(186,230,255,0.45) !important; }
.legal-tab.active { color: var(--neon-blue) !important; border-bottom-color: var(--neon-blue) !important; }
.legal-tabs { border-bottom-color: rgba(56,189,248,0.15) !important; }
.legal-notice { background: rgba(245,158,11,0.1) !important; border-color: rgba(245,158,11,0.3) !important; }
.legal-notice p { color: rgba(251,191,36,0.85) !important; }
.legal-contact-box { background: rgba(13,27,46,0.8) !important; border-color: rgba(56,189,248,0.2) !important; }
.legal-contact-box p { color: rgba(186,230,255,0.65) !important; }

/* ── General card/grid overrides that may have missed ── */
.card, .info-card, .data-card {
  background: rgba(13,27,46,0.85) !important;
  border-color: rgba(56,189,248,0.12) !important;
  color: rgba(186,230,255,0.7) !important;
}

/* Source numbers on index */
.src-count { color: var(--neon-green) !important; font-weight: 700; }


/* ══════════════════════════════════════════════════════════════
   DARK TECH FIXES — lang button, hero chat, FAQ, sections
   ══════════════════════════════════════════════════════════════ */

/* ── Language dropdown button — dark header style ── */
header .lang-dropdown-selected,
.header .lang-dropdown-selected,
.lang-dropdown-selected {
  background: rgba(13,27,46,0.75) !important;
  border: 1px solid rgba(56,189,248,0.22) !important;
  color: #bae6ff !important;
  border-radius: 8px !important;
}
header .lang-dropdown-selected:hover,
.lang-dropdown-selected:hover {
  background: rgba(56,189,248,0.12) !important;
  border-color: rgba(56,189,248,0.45) !important;
}
.ldrop-sel-label {
  color: rgba(186,230,255,0.5) !important;
  border-right-color: rgba(56,189,248,0.2) !important;
}
.ldrop-sel-code { color: #bae6ff !important; }
.ldrop-sel-arrow { color: rgba(186,230,255,0.6) !important; }

/* Auth page language selector — keep dark to match dark right panel */
.auth-lang-row .lang-dropdown-selected {
  background: rgba(13,27,46,0.75) !important;
  border: 1px solid rgba(56,189,248,0.22) !important;
  color: #bae6ff !important;
}
.auth-lang-row .lang-dropdown-selected:hover {
  background: rgba(56,189,248,0.12) !important;
  border-color: rgba(56,189,248,0.45) !important;
}
.auth-lang-row .ldrop-sel-label { color: rgba(186,230,255,0.5) !important; border-right-color: rgba(56,189,248,0.2) !important; }
.auth-lang-row .ldrop-sel-code  { color: #bae6ff !important; }
.auth-lang-row .ldrop-sel-arrow { color: rgba(186,230,255,0.6) !important; }
/* Dashboard topbar language selector — keep original light look */
.dash-topbar-right .lang-dropdown-selected {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}
.dash-topbar-right .lang-dropdown-selected:hover { background: #e2e8f0 !important; }
.dash-topbar-right .ldrop-sel-label { color: #475569 !important; border-right-color: #cbd5e1 !important; }
.dash-topbar-right .ldrop-sel-code  { color: #334155 !important; }
.dash-topbar-right .ldrop-sel-arrow { color: #64748b !important; }

/* Global language popup — dark theme */
#globalLangPopup {
  background: #0d1b2e !important;
  border: 1px solid rgba(56,189,248,0.22) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(56,189,248,0.08) !important;
}
#globalLangPopup button {
  color: rgba(186,230,255,0.85) !important;
  border-bottom: 1px solid rgba(56,189,248,0.07) !important;
}
#globalLangPopup button:last-child { border-bottom: none !important; }
#globalLangPopup button:hover { background: rgba(56,189,248,0.1) !important; }

/* ── Hero demo chat — bot answer must be visible on dark card ── */
.hero-bot-answer {
  color: #bae6ff !important;
  font-size: 0.82rem !important;
  line-height: 1.55 !important;
}
.hero-bot-answer strong {
  color: #38bdf8 !important;
  font-weight: 700 !important;
}
.hero-bot-answer em {
  color: #34d399 !important;
  font-style: normal !important;
  font-weight: 600 !important;
}
/* Doctor card (hero demo) — dark glassmorphism */
.doctor-card {
  background: linear-gradient(145deg, rgba(13,27,46,0.95) 0%, rgba(6,13,26,0.98) 100%) !important;
  border: 1px solid rgba(56,189,248,0.22) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(56,189,248,0.12) !important;
  color: #bae6ff !important;
}
.doctor-name { color: #e0f2fe !important; }
.doctor-role { color: rgba(186,230,255,0.6) !important; }
.mini-msg.user {
  background: rgba(37,99,235,0.25) !important;
  color: #bae6ff !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
}
.mini-msg.bot {
  background: rgba(13,27,46,0.8) !important;
  color: #bae6ff !important;
  border: 1px solid rgba(56,189,248,0.1) !important;
}
.mini-src-badge {
  background: rgba(56,189,248,0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56,189,248,0.25) !important;
}

/* ── FAQ section on index.html — DARK override ── */
#faq-section,
.section-alt {
  background: linear-gradient(180deg, #060d1a 0%, #080f1e 100%) !important;
}
#faq-section .section-header h2 {
  color: #e0f2fe !important;
}
#faq-section .section-header p {
  color: rgba(186,230,255,0.55) !important;
}
/* .faq-list wrapper */
.faq-list {
  background: transparent !important;
  border-color: rgba(56,189,248,0.1) !important;
}
/* .faq-item — the white/glass ones on index — override to dark */
.faq-item {
  background: rgba(10,18,34,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35) !important;
  margin-bottom: 10px !important;
  overflow: hidden !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.faq-item:hover {
  border-color: rgba(56,189,248,0.28) !important;
  box-shadow: 0 8px 32px rgba(56,189,248,0.08) !important;
}
.faq-item.open {
  border-color: rgba(56,189,248,0.32) !important;
  box-shadow: 0 0 24px rgba(56,189,248,0.1) !important;
}
/* faq-question button */
.faq-question {
  background: transparent !important;
  color: #e0f2fe !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
}
.faq-question:hover {
  color: #38bdf8 !important;
  background: rgba(56,189,248,0.05) !important;
}
/* faq-arrow */
.faq-arrow {
  color: rgba(56,189,248,0.6) !important;
}
.faq-item.open .faq-arrow {
  color: #38bdf8 !important;
  transform: rotate(45deg) !important;
}
/* faq-answer text */
.faq-answer p {
  color: rgba(186,230,255,0.65) !important;
}

/* ── Section backgrounds — all sections dark ── */
.section-block {
  background: linear-gradient(180deg, #060d1a 0%, #080f1e 100%) !important;
}
.section-block:nth-child(even),
.section-alt {
  background: linear-gradient(180deg, #07111f 0%, #060d1a 100%) !important;
}

/* Section headers */
.section-block .section-header h2,
.section-header h2 {
  color: #e0f2fe !important;
}
.section-block .section-header p,
.section-header p {
  color: rgba(186,230,255,0.55) !important;
}


/* ══════════════════════════════════════════════════════════════════════
   GLOBAL DARK FIX — все светлые карточки/блоки → тёмный tech стиль
   Перекрывает ВСЕ предыдущие glassmorphism белые стили
   ══════════════════════════════════════════════════════════════════════ */

/* ---------- Общий тёмный фон секций ---------- */
body,
.section-block,
.section-alt,
#faq-section,
#sources,
#how-it-works,
.hiw-section,
.features-strip,
.testimonials-section,
.pricing-teaser,
.disclaimer-section,
.cta-section {
  background: linear-gradient(180deg, #060d1a 0%, #07101f 100%) !important;
  color: rgba(186,230,255,0.75) !important;
}

/* ---------- Section headers ---------- */
.section-header {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}
.section-header h2 {
  color: #e0f2fe !important;
  text-shadow: 0 0 30px rgba(56,189,248,0.25) !important;
}
.section-header p,
.section-header .section-subtitle {
  color: rgba(186,230,255,0.55) !important;
}

/* ---------- How It Works cards (.glass-hiw-card) ---------- */
.glass-hiw-card {
  background: linear-gradient(145deg, rgba(10,22,40,0.92) 0%, rgba(6,13,26,0.96) 100%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(56,189,248,0.08) !important;
  color: rgba(186,230,255,0.75) !important;
}
.glass-hiw-card:hover {
  border-color: rgba(56,189,248,0.35) !important;
  box-shadow: 0 16px 48px rgba(56,189,248,0.1), 0 0 0 1px rgba(56,189,248,0.2) !important;
  transform: translateY(-6px) !important;
}
.glass-hiw-card h3,
.glass-hiw-card .hiw-title { color: #e0f2fe !important; }
.glass-hiw-card p,
.glass-hiw-card .hiw-text  { color: rgba(186,230,255,0.6) !important; }
.hiw-step-num {
  color: var(--neon-blue, #38bdf8) !important;
  text-shadow: 0 0 20px rgba(56,189,248,0.5) !important;
}
.hiw-icon-wrap, .hiw-icon {
  background: rgba(56,189,248,0.1) !important;
  border-color: rgba(56,189,248,0.2) !important;
  color: #38bdf8 !important;
}

/* ---------- Feature strip cards (.feat-strip-item) ---------- */
.feat-strip-item {
  background: linear-gradient(145deg, rgba(10,22,40,0.92) 0%, rgba(6,13,26,0.96) 100%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(56,189,248,0.14) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4) !important;
  color: rgba(186,230,255,0.75) !important;
}
.feat-strip-item:hover {
  border-color: rgba(56,189,248,0.32) !important;
  box-shadow: 0 12px 36px rgba(56,189,248,0.1) !important;
}
.feat-strip-item h3,
.feat-strip-item .feat-title { color: #e0f2fe !important; }
.feat-strip-item p,
.feat-strip-item .feat-text  { color: rgba(186,230,255,0.6) !important; }
.feat-icon {
  background: rgba(56,189,248,0.1) !important;
  border-color: rgba(56,189,248,0.18) !important;
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 6px rgba(56,189,248,0.4)) !important;
}

/* ---------- Source cards (.source-card-new) ---------- */
.source-card-new {
  background: linear-gradient(145deg, rgba(10,22,40,0.92) 0%, rgba(6,13,26,0.96) 100%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(56,189,248,0.14) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45) !important;
  color: rgba(186,230,255,0.75) !important;
}
.source-card-new:hover {
  border-color: rgba(56,189,248,0.32) !important;
  box-shadow: 0 16px 48px rgba(56,189,248,0.1) !important;
}
.source-card-new h4 { color: #e0f2fe !important; }
.source-card-new p  { color: rgba(186,230,255,0.6) !important; }
.source-badge { filter: brightness(1.1) !important; }

/* ---------- Testimonial cards ---------- */
.testimonial-card {
  background: linear-gradient(145deg, rgba(10,22,40,0.92) 0%, rgba(6,13,26,0.96) 100%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(56,189,248,0.14) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45) !important;
  color: rgba(186,230,255,0.75) !important;
}
.testimonial-card:hover {
  border-color: rgba(56,189,248,0.32) !important;
  box-shadow: 0 16px 48px rgba(56,189,248,0.1) !important;
}
.testimonial-text { color: rgba(186,230,255,0.75) !important; }
.testimonial-author { color: #e0f2fe !important; }
.testimonial-role   { color: rgba(186,230,255,0.5) !important; }
.testimonial-stars  { color: #fbbf24 !important; filter: drop-shadow(0 0 4px rgba(251,191,36,0.5)) !important; }
.testimonial-tag {
  background: rgba(56,189,248,0.1) !important;
  border-color: rgba(56,189,248,0.2) !important;
  color: #38bdf8 !important;
}

/* ---------- FAQ items (index + pricing) ---------- */
.faq-item {
  background: rgba(9,18,34,0.92) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
  margin-bottom: 10px !important;
}
.faq-item:hover {
  border-color: rgba(56,189,248,0.28) !important;
}
.faq-item.open {
  border-color: rgba(56,189,248,0.35) !important;
  box-shadow: 0 0 24px rgba(56,189,248,0.1) !important;
}
.faq-question, .faq-q {
  background: transparent !important;
  color: #e0f2fe !important;
}
.faq-question:hover, .faq-q:hover {
  color: #38bdf8 !important;
  background: rgba(56,189,248,0.04) !important;
}
.faq-arrow { color: rgba(56,189,248,0.6) !important; }
.faq-item.open .faq-arrow { color: #38bdf8 !important; }
.faq-answer p, .faq-a { color: rgba(186,230,255,0.65) !important; background: transparent !important; }

/* ---------- Pricing teaser cards (.pt-card) ---------- */
.pt-card:not(.pt-card-featured):not(.pt-card-proplus) {
  background: linear-gradient(145deg, rgba(10,22,40,0.92) 0%, rgba(6,13,26,0.96) 100%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(56,189,248,0.14) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45) !important;
}
.pt-card .pt-name   { color: #e0f2fe !important; }
.pt-card .pt-price  { color: #38bdf8 !important; text-shadow: 0 0 20px rgba(56,189,248,0.4) !important; }
.pt-card .pt-period { color: rgba(186,230,255,0.5) !important; }
.pt-card .pt-feat   { color: rgba(186,230,255,0.65) !important; }
.pt-card .pt-feat::before { color: #34d399 !important; }

/* ---------- Why-us teaser (comparison block on index) ---------- */
.why-teaser-inner {
  background: linear-gradient(145deg, rgba(10,22,40,0.9) 0%, rgba(6,13,26,0.95) 100%) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5) !important;
}
.glass-why-tp {
  background: rgba(13,27,46,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  color: rgba(186,230,255,0.75) !important;
}
.glass-why-tp:hover {
  border-color: rgba(56,189,248,0.3) !important;
  background: rgba(16,33,58,0.9) !important;
}
.why-tp-yes { color: #34d399 !important; filter: drop-shadow(0 0 4px rgba(52,211,153,0.5)) !important; }
.why-teaser-inner h3  { color: #e0f2fe !important; }
.why-teaser-inner p   { color: rgba(186,230,255,0.6) !important; }

/* ---------- Mini compare table ---------- */
.mini-compare-table {
  background: rgba(9,18,34,0.9) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45) !important;
}
.mini-compare-table th {
  background: rgba(13,27,46,0.95) !important;
  color: #e0f2fe !important;
  border-bottom-color: rgba(56,189,248,0.12) !important;
}
.mini-compare-table td { color: rgba(186,230,255,0.7) !important; border-color: rgba(56,189,248,0.07) !important; }
.mct-col-feat { color: rgba(186,230,255,0.55) !important; }
.mct-col-us   { color: #e0f2fe !important; font-weight: 600 !important; }

/* ---------- Disclaimer banner ---------- */
.disclaimer-banner {
  background: rgba(9,18,34,0.88) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(245,158,11,0.25) !important;
  color: rgba(253,230,138,0.85) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}
.disclaimer-banner a { color: #fbbf24 !important; }

/* ---------- Glass stat cards (hero area) ---------- */
.glass-stat-card {
  background: rgba(9,18,34,0.85) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
}
.glass-stat-card .stat-num { color: #38bdf8 !important; text-shadow: 0 0 20px rgba(56,189,248,0.5) !important; }
.glass-stat-card .stat-label { color: rgba(186,230,255,0.6) !important; }

/* ---------- Quick cards, step cards (dashboard etc) ---------- */
.quick-card,
.step-card-new,
.plan-info-card {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.13) !important;
  color: rgba(186,230,255,0.75) !important;
}
.quick-card h3, .step-card-new h3 { color: #e0f2fe !important; }
.quick-card p,  .step-card-new p  { color: rgba(186,230,255,0.6) !important; }

/* ---------- Emergency USP block ---------- */
.emergency-usp {
  background: rgba(127,29,29,0.25) !important;
  border: 1px solid rgba(239,68,68,0.3) !important;
  backdrop-filter: blur(12px) !important;
}
.emergency-usp p, .emergency-usp span { color: rgba(254,202,202,0.85) !important; }

/* ---------- Help cards ---------- */
.help-card {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  color: rgba(186,230,255,0.75) !important;
}
.help-card h3 { color: #e0f2fe !important; }
.help-card p  { color: rgba(186,230,255,0.6) !important; }

/* ---------- AI question cards — dark override (belt & braces) ---------- */
.ai-question-card {
  background: rgba(9,20,38,0.92) !important;
  border: 1.5px solid rgba(56,189,248,0.18) !important;
}
.ai-question-text { color: #bae6ff !important; }
.ai-question-input {
  background: rgba(6,13,26,0.85) !important;
  color: #e0f2fe !important;
  border-color: rgba(56,189,248,0.22) !important;
}
.ai-question-input::placeholder { color: rgba(186,230,255,0.35) !important; }
.ai-question-card.ai-question-answered {
  background: rgba(16,40,28,0.90) !important;
  border-color: rgba(52,211,153,0.35) !important;
}
.ai-question-answer-sent {
  color: #34d399 !important;
  background: rgba(16,40,28,0.85) !important;
}

/* ---------- Comparison table (full, pricing page) ---------- */
.comparison-table {
  background: rgba(9,18,34,0.92) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
}
.comparison-table th {
  background: rgba(13,27,46,0.95) !important;
  color: #e0f2fe !important;
  border-color: rgba(56,189,248,0.1) !important;
}
.comparison-table td {
  color: rgba(186,230,255,0.7) !important;
  border-color: rgba(56,189,248,0.07) !important;
}
.comparison-table tr:hover td {
  background: rgba(56,189,248,0.04) !important;
}

/* ---------- Pricing tech explain box ---------- */
.pricing-tech-explain {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.14) !important;
  color: rgba(186,230,255,0.7) !important;
}

/* ---------- Any remaining white .card or .box ---------- */
[class*="card"]:not([class*="pt-card-featured"]):not([class*="pt-card-proplus"]):not(.source-badge) {
  background: rgba(9,18,34,0.88) !important;
  border-color: rgba(56,189,248,0.12) !important;
  color: rgba(186,230,255,0.75) !important;
}
[class*="card"] h2,
[class*="card"] h3,
[class*="card"] h4 { color: #e0f2fe !important; }
[class*="card"] p  { color: rgba(186,230,255,0.65) !important; }



/* ══════════════════════════════════════════════════════
   HOVER FIX — таблица сравнения, нет белых фонов
   ══════════════════════════════════════════════════════ */

/* Mini compare table — убираем белый фон MedAssist колонки и hover */
.mct-row .mct-col-us {
  background: rgba(37,99,235,0.1) !important;
  border-radius: 0 !important;
}
.mct-row:hover {
  background: rgba(56,189,248,0.06) !important;
}
.mct-row:hover .mct-col-us {
  background: rgba(37,99,235,0.16) !important;
}
.mct-row .mct-col-feat {
  color: rgba(186,230,255,0.55) !important;
  font-weight: 500 !important;
}

/* Full comparison table hover */
.comparison-table tbody tr:hover {
  background: rgba(56,189,248,0.05) !important;
}
.comparison-table tbody tr:hover td {
  background: transparent !important;
}

/* cmp-yes cell highlight column — нет белого */
.cmp-row .cmp-col-us,
.cmp-head-us,
[class*="col-us"] {
  background: rgba(37,99,235,0.08) !important;
}
.cmp-row:hover .cmp-col-us,
[class*="col-us"]:hover {
  background: rgba(37,99,235,0.14) !important;
}

/* Убираем все оставшиеся белые/светлые hover фоны */
tr:hover td,
tr:hover th {
  background: inherit !important;
}
.mct-header .mct-col-us {
  background: rgba(37,99,235,0.15) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
}


/* ══════════════════════════════════════════════════════
   EMERGENCY ALERT BOX — dark red theme (index.html)
   ══════════════════════════════════════════════════════ */
.emergency-alert-box {
  background: rgba(90,15,15,0.55) !important;
  border: 2px solid rgba(239,68,68,0.55) !important;
  box-shadow: 0 4px 24px rgba(239,68,68,0.22) !important;
  backdrop-filter: blur(8px) !important;
}
.emergency-alert-box .ea-header {
  color: #fca5a5 !important;
}
.emergency-alert-box .ea-body {
  color: #fecaca !important;
}

/* ══════════════════════════════════════════════════════
   PRICING PAGE — dark overrides via styles.css cascade
   Covers any remaining light backgrounds from base rules
   ══════════════════════════════════════════════════════ */

/* Pricing page body — ensure dark background */
body:has(.pricing-hero) {
  background:
    radial-gradient(ellipse at 15% 25%, rgba(37,99,235,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(56,189,248,0.08) 0%, transparent 50%),
    linear-gradient(160deg, #060d1a 0%, #07101f 50%, #060d1a 100%) !important;
}

/* Pricing cards — kill any white glass override from global rule */
.pc {
  background: linear-gradient(145deg, rgba(10,22,40,0.92) 0%, rgba(6,13,26,0.96) 100%) !important;
  border: 1px solid rgba(56,189,248,0.18) !important;
  color: #e0f2fe !important;
}
.pc.featured {
  background: linear-gradient(135deg, #1a3a7a 0%, #1e40af 100%) !important;
  border-color: rgba(96,165,250,0.5) !important;
  color: #fff !important;
}
.pc.proplus {
  background: linear-gradient(135deg, #3b1d6e 0%, #4c1d95 100%) !important;
  border-color: rgba(167,139,250,0.5) !important;
  color: #fff !important;
}
.pc-amount { color: #38bdf8 !important; }
.pc.featured .pc-amount { color: #bae6ff !important; }
.pc.proplus .pc-amount { color: #ddd6fe !important; }
.pc-name { color: #f0f9ff !important; }
.pc-desc { color: rgba(186,230,255,0.65) !important; }
.pc.featured .pc-desc, .pc.proplus .pc-desc { color: rgba(255,255,255,0.75) !important; }
.pc-period { color: rgba(186,230,255,0.6) !important; }
.pc.featured .pc-period, .pc.proplus .pc-period { color: rgba(255,255,255,0.6) !important; }
.pc-note { color: rgba(186,230,255,0.4) !important; }
.pc-limits {
  background: rgba(6,13,26,0.5) !important;
  border-color: rgba(56,189,248,0.15) !important;
}
.pc.featured .pc-limits, .pc.proplus .pc-limits {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.pc-limit-row:not(:last-child) { border-color: rgba(56,189,248,0.1) !important; }
.pc-limit-val { color: #38bdf8 !important; }
.pc.featured .pc-limit-val { color: #bae6ff !important; }
.pc-limit-label { color: rgba(186,230,255,0.55) !important; }
.pc-features li { color: rgba(186,230,255,0.8) !important; }
.pc.featured .pc-features li, .pc.proplus .pc-features li { color: rgba(255,255,255,0.85) !important; }
.pc-features li.dim { color: rgba(186,230,255,0.35) !important; }
.pc-limit-icon.check { background: rgba(37,99,235,0.25) !important; }
.pc-limit-icon.chat { background: rgba(16,185,129,0.2) !important; }
.pc-limit-icon.inf { background: rgba(124,58,237,0.25) !important; }

/* Feature cards dark */
.feature-card {
  background: linear-gradient(145deg, rgba(10,22,40,0.92) 0%, rgba(6,13,26,0.96) 100%) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  color: #e0f2fe !important;
}
.feature-card h3 { color: #bae6ff !important; }
.feature-card p { color: rgba(186,230,255,0.65) !important; }
.feature-card-steps li { color: rgba(186,230,255,0.7) !important; border-color: rgba(56,189,248,0.08) !important; }
.feature-card-icon { background: rgba(37,99,235,0.2) !important; }

/* Pricing comparison table dark */
.compare-table-wrap {
  background: rgba(9,18,34,0.85) !important;
  border: 1px solid rgba(56,189,248,0.18) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.compare-table th {
  background: rgba(6,13,26,0.9) !important;
  color: rgba(186,230,255,0.8) !important;
  border-color: rgba(56,189,248,0.2) !important;
}
.compare-table th.featured-col { background: rgba(37,99,235,0.2) !important; color: #60a5fa !important; }
.compare-table th.proplus-col { background: rgba(124,58,237,0.18) !important; color: #a78bfa !important; }
.compare-table td { color: rgba(186,230,255,0.75) !important; border-color: rgba(56,189,248,0.07) !important; background: transparent !important; }
.compare-table td:first-child { color: rgba(186,230,255,0.85) !important; }
.compare-table td.featured-col { background: rgba(37,99,235,0.08) !important; }
.compare-table td.proplus-col { background: rgba(124,58,237,0.08) !important; }
.compare-table tr:hover td { background: rgba(56,189,248,0.05) !important; }
.compare-table tr:hover td.featured-col { background: rgba(37,99,235,0.15) !important; }
.compare-table tr:hover td.proplus-col { background: rgba(124,58,237,0.12) !important; }
.compare-table .cat-row td { background: rgba(6,13,26,0.7) !important; color: rgba(56,189,248,0.6) !important; }

/* Pricing FAQ dark */
.pricing-faq .faq-item {
  background: linear-gradient(145deg, rgba(10,22,40,0.92) 0%, rgba(6,13,26,0.96) 100%) !important;
  border-color: rgba(56,189,248,0.15) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.pricing-faq .faq-q { color: rgba(186,230,255,0.85) !important; }
.pricing-faq .faq-q:hover { background: rgba(56,189,248,0.07) !important; }
.pricing-faq .faq-q.open { background: rgba(37,99,235,0.15) !important; color: #60a5fa !important; }
.pricing-faq .faq-a { color: rgba(186,230,255,0.6) !important; background: transparent !important; }

/* Section header glass — marketing pages default: clean transparent text header */
.section-header-glass {
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  padding: 0 0 2.5rem;
  text-align: center;
}
.section-header-glass h2 { color: #f0f9ff !important; }
.section-header-glass .sub { color: rgba(186,230,255,0.65) !important; }

/* Pricing hero glass card dark */
.pricing-hero-glass-card {
  background: rgba(9,18,34,0.75) !important;
  border: 1px solid rgba(56,189,248,0.18) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5) !important;
}
.pricing-hero-glass-card h1 { color: #f0f9ff !important; }
.pricing-hero-glass-card p { color: rgba(186,230,255,0.7) !important; }
.pricing-hero-badge { background: rgba(56,189,248,0.12) !important; color: #38bdf8 !important; border-color: rgba(56,189,248,0.25) !important; }
.trust-item { color: rgba(186,230,255,0.65) !important; }
.trust-item svg { color: #34d399 !important; }

/* Pricing page src badges — dark */
.src-badge-sm.who { background: rgba(37,99,235,0.2) !important; color: #60a5fa !important; }
.src-badge-sm.ema { background: rgba(16,185,129,0.15) !important; color: #34d399 !important; }
.src-badge-sm.nice { background: rgba(245,158,11,0.15) !important; color: #fbbf24 !important; }
.src-badge-sm.ord { background: rgba(139,92,246,0.15) !important; color: #a78bfa !important; }

/* Pricing page section headings */
.features-dive h2, .compare-section h2, .pricing-faq h2 { color: #f0f9ff !important; }
.features-dive .sub, .compare-section .sub, .pricing-faq .sub { color: rgba(186,230,255,0.65) !important; }

/* val/yes/no in compare table */
.val { color: #e0f2fe !important; }
.val-blue { color: #60a5fa !important; }
.val-purple { color: #a78bfa !important; }
.val-inf { color: #a78bfa !important; }
.yes { color: #34d399 !important; }
.no { color: rgba(186,230,255,0.2) !important; }

/* ═══════════════════════════════════════════════
   DASHBOARD DARK MODE — fix all remaining whites
   ═══════════════════════════════════════════════ */

/* ── Form inputs / textarea / select ── */
.dashboard-body .form-group input,
.dashboard-body .form-group input[type="text"],
.dashboard-body .form-group input[type="email"],
.dashboard-body .form-group input[type="number"],
.dashboard-body .form-group textarea,
.dashboard-body .form-group select,
.dashboard-body .duration-count-input {
  background: rgba(6,13,26,0.85) !important;
  border-color: rgba(56,189,248,0.2) !important;
  color: #e0f2fe !important;
}
.dashboard-body .form-group input::placeholder,
.dashboard-body .form-group textarea::placeholder {
  color: rgba(186,230,255,0.35) !important;
}
.dashboard-body .form-group input:focus,
.dashboard-body .form-group textarea:focus,
.dashboard-body .form-group select:focus {
  border-color: rgba(56,189,248,0.5) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.1) !important;
  background: rgba(8,18,34,0.95) !important;
}
.dashboard-body .form-group select option {
  background: #0f1e36;
  color: #e0f2fe;
}
.dashboard-body .form-group label {
  color: rgba(186,230,255,0.75) !important;
}

/* ── Radio cards ── */
.dashboard-body .radio-card {
  background: rgba(9,18,34,0.8) !important;
  border: 1px solid rgba(56,189,248,0.18) !important;
  color: rgba(186,230,255,0.65) !important;
}
.dashboard-body .radio-card:hover {
  border-color: rgba(56,189,248,0.4) !important;
  background: rgba(13,27,46,0.9) !important;
}
.dashboard-body .radio-card input:checked + .radio-label,
.dashboard-body .radio-card.checked {
  background: rgba(37,99,235,0.25) !important;
  border-color: rgba(56,189,248,0.5) !important;
  color: #38bdf8 !important;
}

/* ── Checkbox cards ── */
.dashboard-body .checkbox-card {
  background: rgba(9,18,34,0.8) !important;
  border: 1px solid rgba(56,189,248,0.18) !important;
  color: rgba(186,230,255,0.65) !important;
}
.dashboard-body .checkbox-card:hover {
  border-color: rgba(56,189,248,0.4) !important;
}
.dashboard-body .checkbox-card input:checked + span {
  color: #38bdf8 !important;
}
.dashboard-body .checkbox-card:has(input:checked) {
  background: rgba(37,99,235,0.15) !important;
  border-color: rgba(56,189,248,0.45) !important;
}

/* ── Profile sections ── */
.dashboard-body .profile-section {
  background: rgba(9,18,34,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}
.dashboard-body .profile-section h3 {
  color: #e0f2fe !important;
  border-bottom-color: rgba(56,189,248,0.12) !important;
}

/* ── Profile alert ── */
.dashboard-body .profile-alert {
  background: rgba(37,99,235,0.1) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
  color: rgba(186,230,255,0.8) !important;
}
.dashboard-body .profile-alert strong { color: #e0f2fe !important; }
.dashboard-body .profile-alert p { color: rgba(186,230,255,0.6) !important; }

/* ── Quick cards on home ── */
.dashboard-body .quick-card {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.13) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.dashboard-body .quick-card.primary {
  background: rgba(37,99,235,0.15) !important;
  border-color: rgba(56,189,248,0.3) !important;
}
.dashboard-body .quick-card.primary .qc-icon-svg {
  background: rgba(37,99,235,0.25) !important;
  color: #38bdf8 !important;
}

/* ── Plan info card ── */
.dashboard-body .plan-info-card {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.13) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── History items ── */
.dashboard-body .history-item {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
}
.dashboard-body .history-item:hover,
.dashboard-body .history-item-clickable:hover {
  background: rgba(13,27,46,0.95) !important;
  border-color: rgba(56,189,248,0.28) !important;
}
.dashboard-body .history-date { color: rgba(186,230,255,0.45) !important; }
.dashboard-body .history-symptom { color: #e0f2fe !important; }

/* ── History detail modal — dark theme ── */
.history-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  overflow-y: auto !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 40px 20px !important;
}
.dashboard-body .history-modal-overlay {
  background: rgba(0,0,0,0.72) !important;
  backdrop-filter: blur(4px) !important;
}
.dashboard-body .history-modal-box {
  background: rgba(10,20,40,0.98) !important;
  border: 1px solid rgba(56,189,248,0.22) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(56,189,248,0.08) !important;
  color: #e0f2fe !important;
  max-height: none !important;
  overflow-y: visible !important;
  margin: auto !important;
}
.dashboard-body .history-modal-header h3 {
  color: #bae6ff !important;
}
.dashboard-body .history-modal-date {
  color: rgba(186,230,255,0.5) !important;
}
.dashboard-body .history-modal-close {
  background: rgba(56,189,248,0.1) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
  color: #7dd3fc !important;
}
.dashboard-body .history-modal-close:hover {
  background: rgba(56,189,248,0.2) !important;
  color: #38bdf8 !important;
}
.dashboard-body .history-modal-section {
  border-bottom-color: rgba(56,189,248,0.1) !important;
}
.dashboard-body .history-modal-section h4 {
  color: rgba(186,230,255,0.6) !important;
}
.dashboard-body .history-modal-params {
  color: rgba(186,230,255,0.75) !important;
}
.dashboard-body .history-modal-params strong {
  color: #bae6ff !important;
}
.dashboard-body .history-modal-response {
  background: rgba(6,13,26,0.8) !important;
  border: 1px solid rgba(56,189,248,0.1) !important;
  color: rgba(186,230,255,0.85) !important;
}
.dashboard-body .history-modal-response p,
.dashboard-body .history-modal-response li,
.dashboard-body .history-modal-response h1,
.dashboard-body .history-modal-response h2,
.dashboard-body .history-modal-response h3 {
  color: rgba(186,230,255,0.85) !important;
}
.dashboard-body .history-modal-response strong {
  color: #bae6ff !important;
}
.dashboard-body .history-modal-sources {
  color: rgba(186,230,255,0.6) !important;
}
.dashboard-body .history-modal-sources a {
  color: #38bdf8 !important;
}
.dashboard-body .history-modal-footer {
  border-top-color: rgba(56,189,248,0.1) !important;
}
.dashboard-body .history-modal-footer p {
  color: rgba(186,230,255,0.4) !important;
}
.dashboard-body .history-modal-emergency {
  background: rgba(220,38,38,0.12) !important;
  border-color: rgba(248,113,113,0.35) !important;
  color: #fca5a5 !important;
}

/* ── Chat containers ── */
.dashboard-body .chat-container {
  background: rgba(8,18,34,0.95) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
}
.dashboard-body .chat-header {
  background: rgba(6,13,26,0.9) !important;
  border-bottom-color: rgba(56,189,248,0.12) !important;
  color: rgba(186,230,255,0.75) !important;
}
.dashboard-body .chat-messages {
  background: rgba(6,10,20,0.9) !important;
}
.dashboard-body .chat-input-area {
  background: rgba(8,18,34,0.95) !important;
  border-top: 2px solid rgba(56,189,248,0.25) !important;
}
.dashboard-body #dash-chatInput,
.dashboard-body #standalone-chatInput {
  background: rgba(6,13,26,0.85) !important;
  border-color: rgba(56,189,248,0.4) !important;
  color: #e0f2fe !important;
}
.dashboard-body #dash-chatInput::placeholder,
.dashboard-body #standalone-chatInput::placeholder {
  color: rgba(186,230,255,0.6) !important;
}
/* ── Attach button dark theme ── */
.dashboard-body .chat-attach-btn {
  background: rgba(13,27,46,0.9) !important;
  border-color: rgba(56,189,248,0.35) !important;
  color: rgba(186,230,255,0.7) !important;
}
.dashboard-body .chat-attach-btn:hover {
  background: rgba(14,165,233,0.15) !important;
  border-color: rgba(56,189,248,0.7) !important;
  color: #38bdf8 !important;
}
.dashboard-body .chat-attach-btn.has-files {
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  background: rgba(56,189,248,0.12) !important;
}
/* ── File chip dark theme ── */
.dashboard-body .chat-file-chip {
  background: rgba(13,27,46,0.95) !important;
  border-color: rgba(56,189,248,0.3) !important;
  color: rgba(186,230,255,0.85) !important;
}

/* ── Results sidebar / summary ── */
.dashboard-body .results-summary {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
}
.dashboard-body .results-summary h3 { color: #e0f2fe !important; }
.dashboard-body .summary-row { color: rgba(186,230,255,0.7) !important; }
.dashboard-body .summary-row strong { color: rgba(186,230,255,0.9) !important; }
.dashboard-body .results-sources {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
}
.dashboard-body .results-sources h4 { color: rgba(186,230,255,0.7) !important; }
.dashboard-body .results-actions .btn-outline {
  border-color: rgba(56,189,248,0.25) !important;
  color: rgba(186,230,255,0.7) !important;
}
.dashboard-body .results-actions .btn-outline:hover {
  border-color: rgba(56,189,248,0.5) !important;
  color: #38bdf8 !important;
}

/* ── Questionnaire q-step ── */
.dashboard-body .q-step {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.1) !important;
}

/* ── Consent box ── */
.dashboard-body .consent-box {
  background: rgba(37,99,235,0.08) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
}
.dashboard-body .consent-box label { color: rgba(186,230,255,0.7) !important; }
.dashboard-body .checkbox-inline input[type="checkbox"] {
  accent-color: #38bdf8;
}

/* ── Section headers (dash-section-header) ── */
.dashboard-body .dash-section-header h2 { color: #e0f2fe !important; }
.dashboard-body .dash-section-header p { color: rgba(186,230,255,0.55) !important; }
.dashboard-body .dash-welcome h1 { color: #e0f2fe !important; }
.dashboard-body .dash-welcome p { color: rgba(186,230,255,0.55) !important; }

/* ── Help FAQ in dashboard ── */
.dashboard-body .help-faq { color: rgba(186,230,255,0.75) !important; }
.dashboard-body .faq-q {
  background: transparent !important;
  color: rgba(186,230,255,0.8) !important;
}
.dashboard-body .faq-q:hover {
  background: rgba(56,189,248,0.05) !important;
  color: #38bdf8 !important;
}
.dashboard-body .faq-q.open {
  background: rgba(37,99,235,0.12) !important;
  color: #38bdf8 !important;
}
.dashboard-body .faq-a { color: rgba(186,230,255,0.6) !important; }
.dashboard-body .faq-item {
  border-bottom-color: rgba(56,189,248,0.1) !important;
}

/* ── Welcome banner (new user) ── */
.dashboard-body .new-user-welcome-banner {
  background: rgba(37,99,235,0.12) !important;
  border: 1px solid rgba(56,189,248,0.2) !important;
}

/* ── Profile success/error msgs ── */
.dashboard-body .form-success { background: rgba(16,185,129,0.12) !important; border-color: rgba(52,211,153,0.3) !important; color: #34d399 !important; }
.dashboard-body .form-error   { background: rgba(239,68,68,0.1) !important;  border-color: rgba(239,68,68,0.3) !important;   color: #fca5a5 !important; }

/* ── Messages in chat ── */
.dashboard-body .msg.bot .msg-bubble {
  background: rgba(13,27,46,0.9) !important;
  border-color: rgba(56,189,248,0.1) !important;
  color: rgba(186,230,255,0.85) !important;
}
.dashboard-body .msg.user .msg-bubble {
  background: rgba(37,99,235,0.25) !important;
  color: #e0f2fe !important;
}
.dashboard-body .msg-time { color: rgba(186,230,255,0.35) !important; }

/* ── Standalone chat intro ── */
.dashboard-body .standalone-chat-intro h3 { color: #e0f2fe !important; }
.dashboard-body .standalone-chat-intro p  { color: rgba(186,230,255,0.55) !important; }
.dashboard-body .chat-starter-btn {
  background: rgba(13,27,46,0.85) !important;
  border-color: rgba(56,189,248,0.2) !important;
  color: rgba(186,230,255,0.7) !important;
}
.dashboard-body .chat-starter-btn:hover {
  border-color: rgba(56,189,248,0.45) !important;
  color: #38bdf8 !important;
}

/* ── Chat sessions sidebar ── */
.dashboard-body .chat-sessions-sidebar {
  background: #071526 !important;
  border-right: 1.5px solid #1e3a5f !important;
}
.dashboard-body .css-header {
  background: #0d2137 !important;
  border-bottom: 1px solid #1e3a5f !important;
}
.dashboard-body .css-title { color: #e2e8f0 !important; }
.dashboard-body .css-clear-btn {
  background: none !important;
  border: 1px solid #1e3a5f !important;
  color: #64748b !important;
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.dashboard-body .css-clear-btn:hover {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}
.dashboard-body .css-list { background: #071526 !important; }
.dashboard-body .css-session-item {
  color: #94a3b8 !important;
}
.dashboard-body .css-session-item:hover {
  background: #1e3a5f !important;
  color: #e2e8f0 !important;
  border: none !important;
}
.dashboard-body .css-session-item.active {
  background: rgba(37,99,235,0.2) !important;
  border: 1.5px solid rgba(37,99,235,0.4) !important;
  color: #e2e8f0 !important;
}
.dashboard-body .css-session-title { color: #cbd5e1 !important; }
.dashboard-body .css-session-meta  { color: #4b6a8a !important; }
.dashboard-body .css-session-delete { color: #4b6a8a !important; }
.dashboard-body .css-session-delete:hover { color: #ef4444 !important; background: rgba(239,68,68,0.1) !important; }
.dashboard-body .css-empty {
  color: #4b6a8a !important;
  flex-direction: column;
  text-align: center;
  padding: 24px 16px !important;
}
.dashboard-body .css-empty-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.dashboard-body .css-empty-icon svg { stroke: #4b6a8a; }

/* ── CSS header title row ── */
.dashboard-body .css-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dashboard-body .css-header-title svg { stroke: #38bdf8; flex-shrink: 0; }

/* ── Chat intro SVG icon ── */
.dashboard-body .chat-intro-svg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0d2137;
  border: 1.5px solid #1e3a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.dashboard-body .chat-intro-svg svg { stroke: #38bdf8; }

/* ── Chat starter buttons — show properly in dark ── */
.dashboard-body .standalone-chat-intro {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 2rem 1.5rem;
  gap: 0.5rem;
}
.dashboard-body .standalone-chat-intro h3 { color: #e2e8f0 !important; font-size: 1.15rem; margin-bottom: 4px; }
.dashboard-body .standalone-chat-intro p  { color: #64748b !important; font-size: 0.84rem; max-width: 400px; margin-bottom: 4px; }
.dashboard-body .chat-starter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  max-width: 520px;
}
.dashboard-body .chat-starter-btn {
  background: #0d2137 !important;
  border: 1.5px solid #1e3a5f !important;
  color: #94a3b8 !important;
  border-radius: 99px !important;
  padding: 7px 15px !important;
  font-size: 0.81rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
}
.dashboard-body .chat-starter-btn:hover {
  background: #1e3a5f !important;
  border-color: #2563eb !important;
  color: #e2e8f0 !important;
}

/* ── Send button — active blue, disabled dim ── */
.dashboard-body .btn-send {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.dashboard-body .btn-send:disabled {
  background: #1e3a5f !important;
  border-color: #1e3a5f !important;
  color: #4b6a8a !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}
.dashboard-body .btn-send:not(:disabled):hover {
  background: #1d4ed8 !important;
}

/* ── Standalone chat background (overrides .standalone-chat { background:#fff }) ── */
.dashboard-body .standalone-chat {
  background: #060d1a !important;
}
.dashboard-body .standalone-chat .chat-messages {
  background: #060d1a !important;
}

/* ── Message bubbles in dashboard chat ── */
.dashboard-body .msg.bot .msg-bubble {
  background: #0d1b2e !important;
  border: 1px solid rgba(56,189,248,0.1) !important;
  color: rgba(186,230,255,0.88) !important;
}
.dashboard-body .msg.user .msg-bubble {
  background: #1e40af !important;
  color: #fff !important;
}
.dashboard-body .msg-bubble code {
  background: rgba(56,189,248,0.1) !important;
  color: #7dd3fc !important;
}
.dashboard-body .msg-sources {
  background: rgba(37,99,235,0.1) !important;
  border-left-color: #2563eb !important;
  color: rgba(186,230,255,0.7) !important;
}
.dashboard-body .msg-sources strong { color: #7dd3fc !important; }
.dashboard-body .msg-sources a { color: #38bdf8 !important; }

/* ── Standalone chat — slightly shorter ── */
.dashboard-body .chat-layout {
  height: calc(100vh - 130px) !important;
  max-height: 680px !important;
}
.dashboard-body .chat-layout .standalone-chat {
  max-height: 680px !important;
}

/* ── Intensity slider ── */
.dashboard-body .intensity-labels { color: rgba(186,230,255,0.5) !important; }
.dashboard-body #c-intensityVal    { color: #38bdf8 !important; }

/* ── Progress bar & step indicator ── */
.dashboard-body .q-progress { background: rgba(56,189,248,0.1) !important; }
.dashboard-body .q-progress-bar { background: linear-gradient(90deg,#2563eb,#38bdf8) !important; }
.dashboard-body .q-steps { color: rgba(186,230,255,0.45) !important; }
.dashboard-body .q-step h3 { color: #e0f2fe !important; }
.dashboard-body .q-step-desc { color: rgba(186,230,255,0.55) !important; }

/* ── Loading steps ── */
.dashboard-body .loading-step { color: rgba(186,230,255,0.45) !important; }
.dashboard-body .loading-step.active { color: #34d399 !important; }
.dashboard-body .loading-container h2 { color: #e0f2fe !important; }
.dashboard-body .loading-container p  { color: rgba(186,230,255,0.55) !important; }

/* ═══════════════════════════════════════════════
   MEDICAL CARD
   ═══════════════════════════════════════════════ */

/* ── Locked state ── */
.mc-locked-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 1.25rem;
  max-width: 520px;
  margin: 0 auto;
}
.mc-locked-icon { font-size: 3rem; }
.mc-locked-wrap h2 { color: #e0f2fe; font-size: 1.5rem; }
.mc-locked-wrap p { color: rgba(186,230,255,0.65); line-height: 1.6; }

/* ── Overview Stats Row ── */
.mc-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) { .mc-stats-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .mc-stats-row { grid-template-columns: repeat(2, 1fr); } }
.mc-stat-card {
  background: rgba(13,27,46,0.8);
  border: 1px solid rgba(56,189,248,0.12);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  text-align: center;
}
.mc-stat-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: #38bdf8;
  line-height: 1.2;
}
.mc-stat-label {
  font-size: 0.72rem;
  color: rgba(186,230,255,0.55);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Health Score Card (PRO+) ── */
.mc-health-score-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(56,189,248,0.08));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.mc-hs-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.mc-hs-header h3 { color: #e0f2fe; font-size: 1rem; margin: 0; }
.mc-hs-badge {
  background: rgba(124,58,237,0.3);
  color: #c4b5fd;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.06em;
  border: 1px solid rgba(124,58,237,0.4);
}
.mc-hs-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.mc-hs-item { text-align: center; }
.mc-hs-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: #a78bfa;
}
.mc-hs-label {
  font-size: 0.7rem;
  color: rgba(186,230,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}
.mc-proj-worsening { color: #f87171; }
.mc-proj-stable    { color: #38bdf8; }
.mc-proj-improving { color: #34d399; }

/* ── Main Grid (Timeline + Symptoms) ── */
.mc-main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 900px) { .mc-main-grid { grid-template-columns: 1fr; } }

/* ── Generic Card ── */
.mc-card {
  background: rgba(13,27,46,0.8);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}
.mc-card h3 {
  color: #e0f2fe;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

/* ── Timeline ── */
.mc-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 420px;
  overflow-y: auto;
}
.mc-timeline::-webkit-scrollbar { width: 4px; }
.mc-timeline::-webkit-scrollbar-track { background: transparent; }
.mc-timeline::-webkit-scrollbar-thumb { background: rgba(56,189,248,0.2); border-radius: 99px; }

.mc-timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.mc-tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.mc-tl-body { flex: 1; min-width: 0; }
.mc-tl-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.mc-tl-date { font-size: 0.75rem; color: rgba(186,230,255,0.5); }
.mc-tl-severity {
  font-size: 0.7rem;
  color: rgba(186,230,255,0.45);
  background: rgba(56,189,248,0.08);
  padding: 1px 6px;
  border-radius: 6px;
}
.mc-tl-source { font-size: 0.85rem; margin-left: auto; }
.mc-tl-symptoms {
  font-size: 0.85rem;
  color: #e0f2fe;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-tl-summary {
  font-size: 0.75rem;
  color: rgba(186,230,255,0.45);
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* Risk Badges */
.mc-risk-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mc-risk-high   { background: rgba(239,68,68,0.2);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.mc-risk-medium { background: rgba(245,158,11,0.2); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.mc-risk-low    { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }

/* ── Top Symptoms ── */
.mc-top-symptoms {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.mc-symptom-item {
  display: grid;
  grid-template-columns: 1fr 100px 32px;
  align-items: center;
  gap: 0.5rem;
}
.mc-symptom-name {
  font-size: 0.82rem;
  color: #e0f2fe;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-symptom-bar-wrap {
  height: 5px;
  background: rgba(56,189,248,0.1);
  border-radius: 99px;
  overflow: hidden;
}
.mc-symptom-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 99px;
  transition: width 0.6s ease;
}
.mc-symptom-count {
  font-size: 0.72rem;
  color: rgba(186,230,255,0.45);
  text-align: right;
}

/* ── Emergency Events ── */
.mc-emergency-card { border-color: rgba(239,68,68,0.25); margin-bottom: 1.25rem; }
.mc-emergency-card h3 { color: #fca5a5; }
.mc-emergency-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mc-emergency-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(239,68,68,0.08);
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.15);
  flex-wrap: wrap;
}
.mc-event-date { font-size: 0.75rem; color: rgba(186,230,255,0.5); }
.mc-event-symptoms { font-size: 0.82rem; color: #fca5a5; }

/* ── GDPR Row ── */
.mc-gdpr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(56,189,248,0.08);
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.mc-gdpr-row p { font-size: 0.8rem; color: rgba(186,230,255,0.45); margin: 0; }
.mc-gdpr-btn {
  font-size: 0.78rem !important;
  padding: 6px 14px !important;
  border-color: rgba(239,68,68,0.3) !important;
  color: #fca5a5 !important;
}
.mc-gdpr-btn:hover { border-color: rgba(239,68,68,0.6) !important; }

/* ── Empty section text ── */
.mc-empty-section {
  font-size: 0.85rem;
  color: rgba(186,230,255,0.4);
  font-style: italic;
  padding: 0.5rem 0;
}


/* ═══════════════════════════════════════════════════════
   ACCOUNT SETTINGS VIEW
   ═══════════════════════════════════════════════════════ */

/* Layout */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
}

/* Card base */
.settings-card {
  background: rgba(9,18,34,0.85);
  border: 1px solid rgba(56,189,248,0.12);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Card header for account info */
.settings-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.settings-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(56,189,248,0.25);
}
.settings-account-info { flex: 1; }
.settings-account-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e0f2fe;
  margin-bottom: 2px;
}
.settings-account-email {
  font-size: 0.88rem;
  color: rgba(186,230,255,0.6);
  margin-bottom: 8px;
}
.settings-account-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-since {
  font-size: 0.78rem;
  color: rgba(186,230,255,0.4);
}

/* Plan chip */
.settings-plan-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(56,189,248,0.15);
  border: 1px solid rgba(56,189,248,0.3);
  color: #38bdf8;
}
.settings-plan-chip.large {
  font-size: 0.85rem;
  padding: 5px 14px;
}
.settings-plan-chip.pro { background: rgba(37,99,235,0.2); border-color: rgba(96,165,250,0.4); color: #60a5fa; }
.settings-plan-chip.pro_plus { background: rgba(124,58,237,0.2); border-color: rgba(167,139,250,0.4); color: #a78bfa; }
.settings-plan-chip.free { background: rgba(100,116,139,0.2); border-color: rgba(148,163,184,0.3); color: #94a3b8; }

/* Card title & desc */
.settings-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e0f2fe;
  margin: 0 0 0.35rem 0;
}
.settings-card-desc {
  font-size: 0.82rem;
  color: rgba(186,230,255,0.5);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

/* Inputs */
.settings-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(6,13,26,0.9);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 8px;
  color: #e0f2fe;
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.settings-input:focus {
  outline: none;
  border-color: rgba(56,189,248,0.55);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.08);
}
.settings-input::placeholder { color: rgba(186,230,255,0.3); }

/* Field layouts */
.settings-field-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.settings-field-row .settings-input { flex: 1; }
.settings-field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Password eye toggle */
.settings-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.settings-pass-wrap .settings-input { padding-right: 42px; }
.settings-eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: rgba(186,230,255,0.4);
  padding: 0;
  line-height: 1;
}
.settings-eye-btn:hover { color: #38bdf8; }

/* Feedback messages */
.settings-msg {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  min-height: 1.2rem;
  transition: all 0.2s;
}
.settings-msg.success { color: #34d399; }
.settings-msg.error   { color: #f87171; }

/* Billing card */
.settings-billing-card { border-color: rgba(56,189,248,0.2); }
.sbp-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}
.sbp-status {
  font-size: 0.78rem;
  color: rgba(186,230,255,0.5);
}
.sbp-details {
  font-size: 0.82rem;
  color: rgba(186,230,255,0.55);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.settings-billing-btns { display: flex; flex-direction: column; gap: 0.5rem; }

/* Usage */
.settings-usage-list { display: flex; flex-direction: column; gap: 0.6rem; }
.settings-usage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(186,230,255,0.65);
  padding: 8px 12px;
  background: rgba(6,13,26,0.5);
  border-radius: 8px;
  border: 1px solid rgba(56,189,248,0.08);
}
.su-val {
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.88rem;
}

/* Invoice list */
.settings-invoice-empty {
  font-size: 0.82rem;
  color: rgba(186,230,255,0.35);
  text-align: center;
  padding: 1rem 0;
}
.settings-invoice-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(56,189,248,0.08);
  font-size: 0.84rem;
}
.settings-invoice-item:last-child { border-bottom: none; }
.inv-date { color: rgba(186,230,255,0.5); font-size: 0.78rem; }
.inv-plan { color: #e0f2fe; font-weight: 600; }
.inv-amount { color: #34d399; font-weight: 700; }
.inv-status {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.inv-status.paid { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.inv-status.pending { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }

/* Danger zone */
.settings-danger-card {
  border-color: rgba(239,68,68,0.2) !important;
  background: rgba(20,5,5,0.7) !important;
}
.danger-title { color: #f87171 !important; }

/* Danger zone button */
.btn-danger {
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.35);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-danger:hover {
  background: rgba(239,68,68,0.22);
  border-color: rgba(239,68,68,0.6);
  color: #fca5a5;
}

/* Delete modal */
.settings-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.settings-modal {
  background: #0d1b2e;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  text-align: center;
}
.settings-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.settings-modal h3 {
  color: #f87171;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}
.settings-modal p {
  color: rgba(186,230,255,0.6);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
}
.settings-modal-field {
  text-align: left;
  margin-bottom: 0.75rem;
}
.settings-modal-field label {
  display: block;
  font-size: 0.8rem;
  color: rgba(186,230,255,0.5);
  margin-bottom: 0.4rem;
}
.settings-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}


/* ══════════════════════════════════════════════════════════
   DASHBOARD — dark fix for FAQ (Help view) + userName hide
   ══════════════════════════════════════════════════════════ */

/* Hide username text beside avatar in topbar */
.dashboard-body #userName { display: none !important; }

/* FAQ in Help view — fully dark */
.dashboard-body .faq-q {
  background: rgba(9,18,34,0.85) !important;
  color: #e0f2fe !important;
  border-bottom: 1px solid rgba(56,189,248,0.1) !important;
}
.dashboard-body .faq-q:hover {
  background: rgba(13,27,46,0.9) !important;
}
.dashboard-body .faq-q.open {
  background: rgba(13,27,46,0.95) !important;
  color: #38bdf8 !important;
}
.dashboard-body .faq-q::after { color: rgba(56,189,248,0.6) !important; }
.dashboard-body .faq-a {
  background: rgba(6,13,26,0.7) !important;
  color: rgba(186,230,255,0.6) !important;
  display: none;
}
.dashboard-body .faq-item {
  border-bottom: 1px solid rgba(56,189,248,0.1) !important;
  background: transparent !important;
}

/* Plan-locked / upgrade boxes in medical card */
.dashboard-body .mc-locked-box,
.dashboard-body .mc-upsell {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
}

/* Any remaining white card backgrounds inside dashboard */
.dashboard-body .help-card,
.dashboard-body .help-faq,
.dashboard-body .help-form-wrap {
  background: transparent !important;
}
.dashboard-body .help-card {
  background: rgba(9,18,34,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  border-radius: 14px !important;
}
.dashboard-body .help-faq h3 { color: #e0f2fe !important; }

/* Help success card */
.dashboard-body .help-success-card {
  background: rgba(9,18,34,0.85) !important;
  border: 1px solid rgba(52,211,153,0.2) !important;
  border-radius: 14px !important;
  text-align: center;
  padding: 2rem;
}
.dashboard-body .help-success-card h3 { color: #34d399 !important; }
.dashboard-body .help-success-card p { color: rgba(186,230,255,0.7) !important; }
.dashboard-body .help-ticket-id { background: rgba(13,27,46,0.85) !important; color: #60a5fa !important; border: 1px solid rgba(56,189,248,0.15) !important; }
.dashboard-body .new-user-welcome-banner strong { color: #bae6ff !important; }
.dashboard-body .new-user-welcome-banner p { color: rgba(186,230,255,0.65) !important; }


/* ══════════════════════════════════════════════════════════
   DASHBOARD — COMPREHENSIVE DARK FIX (bright elements)
   ══════════════════════════════════════════════════════════ */

/* ── Topbar logo — make visible ── */
.dashboard-body .dash-topbar .logo {
  color: #e0f2fe !important;
  text-decoration: none !important;
}
.dashboard-body .dash-topbar .logo-icon {
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 6px rgba(56,189,248,0.5));
}
.dashboard-body .dash-topbar .logo-text {
  color: #e0f2fe !important;
  font-weight: 300;
}
.dashboard-body .dash-topbar .logo-d {
  color: #38bdf8 !important;
  font-weight: 800;
}
.dashboard-body .dash-topbar .logo-ai {
  background: linear-gradient(135deg, #10b981, #0891b2) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(16,185,129,0.45) !important;
}

/* ── User button (avatar circle) ── */
.dashboard-body .user-btn {
  background: rgba(9,18,34,0.7) !important;
  border: 1.5px solid rgba(56,189,248,0.25) !important;
  color: #e0f2fe !important;
}
.dashboard-body .user-btn:hover {
  border-color: rgba(56,189,248,0.55) !important;
  background: rgba(13,27,46,0.85) !important;
}
.dashboard-body .user-avatar {
  background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(56,189,248,0.3) !important;
}

/* ── User dropdown — dark & visible ── */
.dashboard-body .user-dropdown {
  background: #0d1b2e !important;
  border: 1px solid rgba(56,189,248,0.25) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(56,189,248,0.1) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
.dashboard-body .user-dropdown a {
  color: #e0f2fe !important;
  padding: 0.7rem 1.1rem !important;
  font-size: 0.88rem !important;
  transition: background 0.15s !important;
}
.dashboard-body .user-dropdown a:hover {
  background: rgba(56,189,248,0.12) !important;
  color: #38bdf8 !important;
}
.dashboard-body .user-dropdown hr {
  border-top-color: rgba(56,189,248,0.12) !important;
  margin: 4px 0 !important;
}
.dashboard-body .user-dropdown .logout-link {
  color: #f87171 !important;
}
.dashboard-body .user-dropdown .logout-link:hover {
  background: rgba(239,68,68,0.1) !important;
  color: #fca5a5 !important;
}

/* ── Language dropdown button in topbar ── */
.dashboard-body .dash-topbar-right .lang-dropdown-selected {
  background: rgba(9,18,34,0.8) !important;
  border: 1.5px solid rgba(56,189,248,0.25) !important;
  color: #e0f2fe !important;
  border-radius: 8px !important;
}
.dashboard-body .dash-topbar-right .lang-dropdown-selected:hover {
  background: rgba(13,27,46,0.9) !important;
  border-color: rgba(56,189,248,0.5) !important;
}

/* ── Source tags in chat messages ── */
.dashboard-body .msg-source-tag {
  background: rgba(37,99,235,0.18) !important;
  color: #7dd3fc !important;
  border-color: rgba(56,189,248,0.25) !important;
}
.dashboard-body .msg-source-tag:hover {
  background: rgba(37,99,235,0.28) !important;
}

/* ── Source badges (WHO, EMA, NICE, etc.) ── */
.dashboard-body .source-badge.who  { background: rgba(37,99,235,0.2) !important;  color: #7dd3fc !important; border: 1px solid rgba(37,99,235,0.3) !important; }
.dashboard-body .source-badge.ema  { background: rgba(5,150,105,0.2) !important;  color: #34d399 !important; border: 1px solid rgba(5,150,105,0.3) !important; }
.dashboard-body .source-badge.nice { background: rgba(124,58,237,0.2) !important; color: #a78bfa !important; border: 1px solid rgba(124,58,237,0.3) !important; }
.dashboard-body .source-badge.ord  { background: rgba(234,88,12,0.18) !important; color: #fb923c !important; border: 1px solid rgba(234,88,12,0.25) !important; }
.dashboard-body .source-badge.msd  { background: rgba(219,39,119,0.15) !important; color: #f472b6 !important; border: 1px solid rgba(219,39,119,0.25) !important; }
.dashboard-body .source-badge.cch  { background: rgba(2,132,199,0.18) !important; color: #38bdf8 !important; border: 1px solid rgba(2,132,199,0.25) !important; }

/* ── msg-sources (citations panel below bot message) ── */
.dashboard-body .msg-sources {
  background: rgba(9,18,34,0.88) !important;
  border-left-color: #38bdf8 !important;
  color: rgba(186,230,255,0.7) !important;
}
.dashboard-body .msg-sources span {
  background: rgba(37,99,235,0.15) !important;
  border-color: rgba(56,189,248,0.2) !important;
  color: #7dd3fc !important;
}
.dashboard-body .msg-sources strong { color: rgba(186,230,255,0.55) !important; }

/* ── source-item (symptom check result sources) ── */
.dashboard-body .source-item {
  background: rgba(9,18,34,0.8) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  color: rgba(186,230,255,0.75) !important;
}
.dashboard-body .source-item a {
  color: #38bdf8 !important;
}
/* ── source-item-badge ── */
.dashboard-body .source-item-badge {
  background: rgba(37,99,235,0.18) !important;
  color: #7dd3fc !important;
}

/* ── Chat starter buttons ── */
.dashboard-body .chat-starter-btn {
  background: rgba(9,18,34,0.85) !important;
  border-color: rgba(56,189,248,0.2) !important;
  color: #7dd3fc !important;
}
.dashboard-body .chat-starter-btn:hover {
  background: rgba(37,99,235,0.2) !important;
  border-color: rgba(56,189,248,0.4) !important;
  color: #38bdf8 !important;
}

/* ── Follow-up / input boxes that appear bright ── */
.dashboard-body [class*="follow-up"] {
  background: rgba(9,18,34,0.85) !important;
  border-color: rgba(56,189,248,0.2) !important;
  color: #e0f2fe !important;
}

/* ── Any remaining white panels inside dash-main ── */
.dashboard-body .dash-main > * > div[style*="background: #fff"],
.dashboard-body .dash-main > * > div[style*="background:#fff"],
.dashboard-body .dash-main > * > div[style*="background: white"] {
  background: rgba(9,18,34,0.85) !important;
}

/* ── Result sources section in symptom check results ── */
.dashboard-body .results-sources-section,
.dashboard-body .source-section {
  background: rgba(9,18,34,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  border-radius: 10px;
}

/* ── Nav sidebar active state ── */
.dashboard-body .dash-nav-item.active {
  background: rgba(37,99,235,0.15) !important;
  color: #38bdf8 !important;
  border-left: 3px solid #38bdf8;
}

/* ── Chevron in user button ── */
.dashboard-body .chevron { color: rgba(186,230,255,0.5) !important; }


/* ── User dropdown OPEN state — highest priority ── */
.dashboard-body .user-dropdown.open {
  display: block !important;
  animation: dropdownFadeIn 0.15s ease;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Lang popup global overlay — dark ── */
#globalLangPopup {
  background: #0d1b2e !important;
  border: 1px solid rgba(56,189,248,0.25) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7) !important;
  border-radius: 12px !important;
}
#globalLangPopup button {
  color: #e0f2fe !important;
}
#globalLangPopup button:hover {
  background: rgba(56,189,248,0.1) !important;
}


/* ── qc-icon-svg — dark in dashboard ── */
.dashboard-body .qc-icon-svg {
  background: rgba(37,99,235,0.18) !important;
  color: #38bdf8 !important;
}
.dashboard-body .quick-card .qc-arrow { color: rgba(56,189,248,0.4) !important; }
.dashboard-body .quick-card:hover     { border-color: rgba(56,189,248,0.35) !important; }

/* ── plan-info-card ── */
.dashboard-body .plan-info-card {
  background: rgba(9,18,34,0.88) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
}
.dashboard-body .plan-info-card strong { color: #e0f2fe !important; }
.dashboard-body .plan-info-card p      { color: rgba(186,230,255,0.55) !important; }

/* ── profile-alert ── */
.dashboard-body .profile-alert {
  background: rgba(37,99,235,0.1) !important;
  border: 1px solid rgba(56,189,248,0.15) !important;
  color: #e0f2fe !important;
}
.dashboard-body .profile-alert strong { color: #e0f2fe !important; }
.dashboard-body .profile-alert p      { color: rgba(186,230,255,0.6) !important; }

/* ── Sidebar upgrade box ── */
.dashboard-body .sidebar-upgrade {
  background: rgba(37,99,235,0.12) !important;
  border: 1px solid rgba(56,189,248,0.18) !important;
  border-radius: 12px !important;
}
.dashboard-body .sidebar-upgrade p { color: rgba(186,230,255,0.65) !important; }
.dashboard-body .upgrade-icon svg  { color: #fbbf24 !important; }

/* ── Topbar — ensure solid dark ── */
.dashboard-body .dash-topbar {
  background: rgba(6,13,26,0.97) !important;
  border-bottom: 1px solid rgba(56,189,248,0.12) !important;
  backdrop-filter: blur(20px) !important;
}


/* ══════════════════════════════════════════════════════════
   DASHBOARD HOME — REDESIGNED
   ══════════════════════════════════════════════════════════ */

/* Hero greeting */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, rgba(9,18,34,0.95) 0%, rgba(13,27,52,0.9) 100%);
  border: 1px solid rgba(56,189,248,0.15);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.home-greeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.25);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.home-hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #e0f2fe;
  margin: 0 0 0.35rem 0;
  line-height: 1.2;
}
.home-name-gradient {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-hero-sub {
  color: rgba(186,230,255,0.6);
  font-size: 0.92rem;
  margin: 0;
}
.home-hero-right { flex-shrink: 0; width: 200px; }
.home-ecg-wrap { opacity: 0.4; }
.home-ecg-svg { width: 100%; height: 40px; }
.home-ecg-line {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: ecgDraw 3s ease forwards 0.5s, ecgPulse 2s ease-in-out infinite 3.5s;
}
@keyframes ecgDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes ecgPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Stats row */
.home-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) { .home-stats-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-stats-row { grid-template-columns: 1fr; } }

.home-stat-card {
  background: rgba(9,18,34,0.85);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: border-color 0.2s, transform 0.2s;
}
.home-stat-card:hover {
  border-color: rgba(56,189,248,0.3);
  transform: translateY(-2px);
}
.hsc-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hsc-info { min-width: 0; }
.hsc-label {
  font-size: 0.72rem;
  color: rgba(186,230,255,0.45);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.hsc-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #e0f2fe;
}

/* Action grid */
.home-action-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 860px) { .home-action-grid { grid-template-columns: 1fr; } }

/* Big CTA */
.home-big-cta {
  background: linear-gradient(135deg, rgba(37,99,235,0.2) 0%, rgba(9,18,34,0.92) 60%);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.home-big-cta:hover {
  border-color: rgba(56,189,248,0.5);
  box-shadow: 0 0 30px rgba(37,99,235,0.2);
  transform: translateY(-2px);
}
.hbc-glow {
  position: absolute;
  top: -30px; left: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hbc-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, rgba(37,99,235,0.4), rgba(56,189,248,0.2));
  border: 1px solid rgba(56,189,248,0.3);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #38bdf8;
  box-shadow: 0 0 20px rgba(37,99,235,0.3);
}
.hbc-text { flex: 1; }
.hbc-text h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #e0f2fe;
  margin: 0 0 0.35rem 0;
}
.hbc-text p {
  font-size: 0.84rem;
  color: rgba(186,230,255,0.55);
  margin: 0 0 0.6rem 0;
  line-height: 1.5;
}
.hbc-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 20px;
  padding: 2px 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hbc-arrow {
  font-size: 1.5rem;
  color: rgba(56,189,248,0.6);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.home-big-cta:hover .hbc-arrow { transform: translateX(4px); color: #38bdf8; }

/* Small cards grid */
.home-small-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.home-small-card {
  background: rgba(9,18,34,0.85);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.home-small-card:hover {
  border-color: rgba(56,189,248,0.3);
  transform: translateY(-2px);
}
.hsc2-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.6rem;
}
.home-small-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e0f2fe;
  margin: 0 0 3px 0;
}
.home-small-card p {
  font-size: 0.75rem;
  color: rgba(186,230,255,0.45);
  margin: 0;
  line-height: 1.4;
}

/* KB band */
.home-kb-band {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(6,13,26,0.7);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 12px;
  padding: 0.9rem 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.home-kb-item { display: flex; align-items: center; gap: 0.6rem; }
.home-kb-num {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-kb-label {
  font-size: 0.78rem;
  color: rgba(186,230,255,0.5);
  font-weight: 600;
}
.home-kb-divider {
  width: 1px; height: 24px;
  background: rgba(56,189,248,0.15);
}
.home-kb-src { gap: 0.4rem; flex-wrap: wrap; }
.home-kb-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-kb-tag.who  { background: rgba(37,99,235,0.2);  color: #7dd3fc; border: 1px solid rgba(37,99,235,0.3); }
.home-kb-tag.ema  { background: rgba(5,150,105,0.2);  color: #34d399; border: 1px solid rgba(5,150,105,0.3); }
.home-kb-tag.nice { background: rgba(124,58,237,0.2); color: #a78bfa; border: 1px solid rgba(124,58,237,0.3); }
.home-kb-tag.ord  { background: rgba(234,88,12,0.15); color: #fb923c; border: 1px solid rgba(234,88,12,0.25); }
.home-kb-tag.rxn  { background: rgba(20,184,166,0.2); color: #2dd4bf; border: 1px solid rgba(20,184,166,0.3); }
.home-kb-tag.dai  { background: rgba(249,115,22,0.2); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }
.home-kb-tag.loi  { background: rgba(99,102,241,0.2); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }

/* Bottom row */
.home-bottom-row {
  display: grid;
  grid-template-columns: 280px 1fr 240px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1100px) { .home-bottom-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  { .home-bottom-row { grid-template-columns: 1fr; } }

/* Plan card */
.home-plan-card {
  background: rgba(9,18,34,0.9);
  border: 1px solid rgba(56,189,248,0.15);
  border-radius: 14px;
  padding: 1.25rem;
}
.hpc-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(186,230,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}
.hpc-plan-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 0.85rem;
}
.hpc-sub {
  font-size: 0.78rem;
  color: rgba(186,230,255,0.45);
}
.hpc-bar-wrap { margin-bottom: 1rem; }
.hpc-bar-label {
  display: flex; justify-content: space-between;
  font-size: 0.73rem;
  color: rgba(186,230,255,0.45);
  margin-bottom: 4px;
}
.hpc-bar {
  height: 5px;
  background: rgba(56,189,248,0.1);
  border-radius: 10px;
  overflow: hidden;
}
.hpc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 10px;
  transition: width 0.6s ease;
}
.hpc-upgrade-btn { margin-top: 0.25rem; }

/* Tips card */
.home-tips-card {
  background: rgba(9,18,34,0.85);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 14px;
  padding: 1.25rem;
}
.htc-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(186,230,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.9rem;
}
.htc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.htc-item { display: flex; align-items: flex-start; gap: 10px; }
.htc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.htc-item strong {
  font-size: 0.83rem;
  font-weight: 700;
  color: #e0f2fe;
  display: block;
  margin-bottom: 2px;
}
.htc-item p {
  font-size: 0.76rem;
  color: rgba(186,230,255,0.45);
  margin: 0;
  line-height: 1.4;
}

/* Disclaimer card */
.home-disclaimer-card {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.18);
  border-radius: 14px;
  padding: 1.1rem;
}
.hdc-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.hdc-text strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
  display: block;
  margin-bottom: 0.35rem;
}
.hdc-text p {
  font-size: 0.75rem;
  color: rgba(186,230,255,0.45);
  line-height: 1.55;
  margin: 0 0 0.65rem 0;
}
.hdc-links {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.72rem;
  color: rgba(186,230,255,0.3);
}
.hdc-links a { color: rgba(56,189,248,0.6); text-decoration: none; }
.hdc-links a:hover { color: #38bdf8; }

/* ══════════════════════════════════════════════════════════
   FIX: User dropdown — force above everything, proper dark
   ══════════════════════════════════════════════════════════ */
.dashboard-body .user-menu {
  position: relative;
  z-index: 9999 !important;
}
.dashboard-body .dash-topbar {
  z-index: 1001 !important;
}
.dashboard-body .user-dropdown {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  z-index: 99999 !important;
  background: #0b1829 !important;
  border: 1px solid rgba(56,189,248,0.3) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(56,189,248,0.08), 0 0 20px rgba(37,99,235,0.15) !important;
  min-width: 200px !important;
  overflow: hidden !important;
  display: none;
  backdrop-filter: blur(20px) !important;
}
.dashboard-body .user-dropdown.open {
  display: block !important;
  animation: dropdownSlideIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
@keyframes dropdownSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dashboard-body .user-dropdown a {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0.75rem 1.1rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #e0f2fe !important;
  text-decoration: none !important;
  transition: background 0.15s !important;
  border-radius: 0 !important;
}
.dashboard-body .user-dropdown a:hover {
  background: rgba(56,189,248,0.1) !important;
  color: #38bdf8 !important;
}
.dashboard-body .user-dropdown hr {
  border: none !important;
  border-top: 1px solid rgba(56,189,248,0.1) !important;
  margin: 4px 12px !important;
}
.dashboard-body .user-dropdown .logout-link {
  color: #f87171 !important;
}
.dashboard-body .user-dropdown .logout-link:hover {
  background: rgba(239,68,68,0.1) !important;
  color: #fca5a5 !important;
}

/* ══════════════════════════════════════════════════════════
   FIX: Language button hover — subtle dark, no bright flash
   ══════════════════════════════════════════════════════════ */
.dashboard-body .dash-topbar-right .lang-dropdown-selected {
  background: rgba(9,18,34,0.8) !important;
  border: 1.5px solid rgba(56,189,248,0.22) !important;
  color: rgba(186,230,255,0.85) !important;
  border-radius: 8px !important;
  transition: border-color 0.2s, background 0.2s !important;
}
.dashboard-body .dash-topbar-right .lang-dropdown-selected:hover {
  background: rgba(13,27,46,0.95) !important;
  border-color: rgba(56,189,248,0.4) !important;
  color: #e0f2fe !important;
}

/* Override any global lang popup brightness in dashboard */
body.dashboard-body #globalLangPopup button {
  background: transparent !important;
  color: #e0f2fe !important;
}
body.dashboard-body #globalLangPopup button:hover {
  background: rgba(56,189,248,0.08) !important;
}

/* ══════════════════════════════════════════════════════════
   SYMPTOM CHECK — 3-STEP REDESIGN
   ══════════════════════════════════════════════════════════ */

/* Wrapper */
.check-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

/* ── Progress header ── */
.check-progress-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-text-secondary, #6b7280);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}
.btn-back:hover { color: var(--color-primary, #2563eb); }

/* Stepper */
.check-stepper {
  display: flex;
  align-items: center;
  gap: 0;
}
.check-stepper-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #9ca3af;
  transition: color 0.2s;
}
.check-stepper-step.active   { color: #2563eb; }
.check-stepper-step.active .stepper-dot { background: #2563eb; color: #fff; border-color: #2563eb; }
.check-stepper-step.done     { color: #22c55e; }
.check-stepper-step.done .stepper-dot  { background: #22c55e; color: #fff; border-color: #22c55e; }
.stepper-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s;
}
.stepper-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin: 0 8px;
  min-width: 20px;
  transition: background 0.3s;
}
/* Progress bar */
.check-progress-bar-wrap { width: 100%; }
.check-progress-bar-track {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}
.check-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ── Step cards ── */
.q-step-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.q-step-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  background: rgba(37,99,235,0.15);
  color: #60a5fa;
}

/* ── Textarea with char counter ── */
.textarea-wrap {
  position: relative;
}
.textarea-wrap textarea {
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 28px;
}
.char-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.72rem;
  color: #9ca3af;
  pointer-events: none;
}

/* ── Body area grid ── */
.body-area-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.body-area-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.body-area-btn:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
}
.body-area-btn.selected {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
@media (max-width: 600px) {
  .body-area-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Duration picker ── */
.duration-picker { display: flex; flex-direction: column; gap: 10px; }
.duration-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dur-pill {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.dur-pill input { display: none; }
.dur-pill span {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1.5px solid #d1d5db;
  font-size: 0.84rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s;
}
.dur-pill input:checked + span {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.dur-pill span:hover { border-color: #2563eb; }
.duration-count-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dur-stepper-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.dur-stepper-btn:hover { border-color: #2563eb; color: #2563eb; }
.duration-count-input {
  width: 60px;
  text-align: center;
  padding: 6px 4px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
}
.duration-count-unit { font-size: 0.84rem; color: #6b7280; font-weight: 500; }

/* ── Intensity scale ── */
.intensity-scale {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.intensity-track {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}
.intensity-input {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 99px;
  background: #e5e7eb;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.intensity-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(37,99,235,0.35);
  cursor: pointer;
  transition: transform 0.15s;
}
.intensity-input::-webkit-slider-thumb:hover { transform: scale(1.15); }
.intensity-fill {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #22c55e, #ef4444);
  pointer-events: none;
  z-index: 1;
  transition: width 0.15s;
}
.intensity-readout {
  display: flex;
  align-items: center;
  gap: 12px;
}
.intensity-emoji {
  font-size: 1.8rem;
  line-height: 1;
  transition: transform 0.2s;
}
.intensity-value-wrap {
  display: flex;
  flex-direction: column;
}
.intensity-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}
.intensity-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #22c55e;
}
.intensity-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #9ca3af;
  padding: 0 2px;
}

/* ── Associated symptoms grid ── */
.sym-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 4px 0 16px;
}
.sym-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1.5px solid rgba(56,189,248,0.14);
  border-radius: 12px;
  background: rgba(9,18,34,0.75);
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
  text-align: center;
  color: rgba(186,230,255,0.7);
}
.sym-card input[type="checkbox"] { display: none; }
.sym-card:hover {
  border-color: rgba(56,189,248,0.38);
  background: rgba(13,27,50,0.9);
  color: #e0f2fe;
}
.sym-card:hover .sym-icon svg { stroke: #38bdf8; }
.sym-card:has(input:checked) {
  border-color: #2563eb;
  background: rgba(37,99,235,0.25);
  color: #e0f2fe;
}
.sym-card:has(input:checked) .sym-icon svg { stroke: #60a5fa; }
.sym-card--warning { border-color: rgba(251,191,36,0.25); }
.sym-card--warning:hover { border-color: rgba(251,191,36,0.5); }
.sym-card--warning:has(input:checked) {
  background: rgba(245,158,11,0.2);
  border-color: rgba(251,191,36,0.5);
}
.sym-card--warning:has(input:checked) .sym-icon svg { stroke: #fbbf24; }
.sym-card--danger { border-color: rgba(239,68,68,0.22); }
.sym-card--danger:hover { border-color: rgba(239,68,68,0.45); }
.sym-card--danger:has(input:checked) {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.5);
}
.sym-card--danger:has(input:checked) .sym-icon svg { stroke: #f87171; }
.sym-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.sym-icon svg { stroke: rgba(186,230,255,0.5); transition: stroke 0.18s; }
.sym-name { font-size: 0.7rem; font-weight: 600; line-height: 1.2; }
@media (max-width: 600px) {
  .sym-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Emergency inline alert ── */
.emergency-inline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #7f1d1d;
  margin-bottom: 12px;
  animation: fadeIn 0.3s ease;
}
.emergency-inline span:first-child { font-size: 1.3rem; flex-shrink: 0; }

/* ── Step 3 pill selects ── */
.pill-select-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.pill-select {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.pill-select input { display: none; }
.pill-select span {
  padding: 7px 16px;
  border-radius: 99px;
  border: 1.5px solid #d1d5db;
  font-size: 0.84rem;
  font-weight: 500;
  color: #374151;
  background: #fff;
  transition: all 0.15s;
  white-space: nowrap;
}
.pill-select span:hover { border-color: #2563eb; }
.pill-select input:checked + span {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* ── Temperature input ── */
.temp-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.temp-input { width: 110px; }
.temp-unit { font-weight: 600; font-size: 1rem; color: #374151; }

/* ── Profile context box (Step 3) ── */
.profile-context-box {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
}
.pcb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.pcb-edit-btn {
  margin-left: auto;
  background: none;
  border: 1px solid #0369a1;
  color: #0369a1;
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.pcb-edit-btn:hover { background: #0369a1; color: #fff; }
.pcb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pcb-tag {
  background: #fff;
  border: 1px solid #bae6fd;
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: #0369a1;
  font-weight: 500;
}

/* ── Step navigation ── */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 12px;
}
.btn-submit-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Consent box ── */
.consent-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0 8px;
}

/* ══════════════════════════════════════════════════════════
   HEALTH PROFILE — REDESIGN
   ══════════════════════════════════════════════════════════ */

/* Header bar */
.profile-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Completion ring widget */
.profile-completion-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.completion-ring {
  transform: rotate(-90deg);
}
#completionRingPath {
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s;
}
.completion-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563eb;
  margin-top: 2px;
}

/* BMI widget */
.bmi-widget {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  position: relative;
}
.bmi-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.bmi-number {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
}
.bmi-label-text {
  font-size: 0.9rem;
  font-weight: 600;
}
.bmi-bar-track {
  position: relative;
  height: 10px;
  width: 100%;
  border-radius: 99px;
  overflow: hidden;
  background: #e5e7eb;
  margin: 4px 0;
}
.bmi-bar-segments {
  display: flex;
  height: 100%;
  border-radius: 99px;
  overflow: hidden;
}
.bmi-seg {
  flex: 1;
  height: 10px;
  font-size: 0.63rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  overflow: hidden;
  transition: color 0.2s;
}
.bmi-seg.underweight { background: #93c5fd; }
.bmi-seg.normal      { background: #86efac; }
.bmi-seg.overweight  { background: #fde68a; }
.bmi-seg.obese       { background: #fca5a5; }
.bmi-seg.active {
  color: #111827;
  font-size: 0.6rem;
}
.bmi-pointer {
  position: absolute;
  top: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1d4ed8;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transform: translateX(-50%);
  transition: left 0.4s ease;
}
.bmi-note {
  font-size: 0.72rem;
  color: #6b7280;
}

/* Profile section header */
.profile-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f3f4f6;
}
.prof-sec-icon { font-size: 1.2rem; }
.prof-sec-badge {
  margin-left: auto;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Sex cards */
.prof-sex-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.sex-cards {
  display: flex;
  gap: 10px;
}
.sex-card { cursor: pointer; flex: 1; }
.sex-card input { display: none; }
.sex-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
  transition: all 0.15s;
}
.sex-card input:checked + .sex-card-inner {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.sex-card-inner span:first-child { font-size: 1.5rem; }

/* Two-column form row */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.prof-body-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 580px) {
  .form-row-2, .prof-body-row { grid-template-columns: 1fr 1fr; }
}

/* Chronic conditions grid */
.chronic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 6px 0;
}
.chronic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  cursor: pointer;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s;
}
.chronic-card input { display: none; }
.chronic-card:hover { border-color: #2563eb; background: #eff6ff; }
.chronic-card:has(input:checked) {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.chronic-card--none:has(input:checked) { background: #22c55e; border-color: #22c55e; }
.chronic-icon { font-size: 1.3rem; }
@media (max-width: 600px) {
  .chronic-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Lifestyle pills */
.lifestyle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 580px) { .lifestyle-grid { grid-template-columns: 1fr; } }
.lifestyle-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.ls-pill { cursor: pointer; }
.ls-pill input { display: none; }
.ls-pill span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1.5px solid #d1d5db;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  background: #fff;
  transition: all 0.15s;
  white-space: nowrap;
}
.ls-pill span:hover { border-color: #2563eb; }
.ls-pill input:checked + span { background: #2563eb; color: #fff; border-color: #2563eb; }
.ls-pill--warn input:checked + span { background: #f59e0b; border-color: #f59e0b; }

/* Profile save bar */
.profile-save-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 16px 0;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}
.profile-save-bar .btn { margin-left: auto; }
#profile-success { color: #16a34a; font-size: 0.875rem; font-weight: 500; }
#profile-error   { color: #dc2626; font-size: 0.875rem; font-weight: 500; }

/* ══════════════════════════════════════════════════════════
   CHECK HISTORY PANEL (inside Symptom Check tab)
   ══════════════════════════════════════════════════════════ */
.check-history-panel {
  max-width: 700px;
  margin: 32px auto 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.chp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  background: #f9fafb;
}
.chp-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.chp-see-all {
  font-size: 0.8rem;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.chp-see-all:hover { text-decoration: underline; }
.chp-list { padding: 0; }
.chp-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  font-size: 0.84rem;
  color: #9ca3af;
}
.chp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.12s;
}
.chp-item:last-child { border-bottom: none; }
.chp-item:hover { background: #f9fafb; }
.chp-item-icon { font-size: 1.2rem; flex-shrink: 0; }
.chp-item-body { flex: 1; min-width: 0; }
.chp-item-symptom {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chp-item-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chp-emergency {
  color: #ef4444;
  font-weight: 600;
  font-size: 0.72rem;
}
.chp-item-arrow { color: #d1d5db; flex-shrink: 0; }

/* ── Optional label ── */
.optional {
  font-weight: 400;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ── Form error ── */
.form-error {
  color: #dc2626;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 6px 10px;
  background: #fef2f2;
  border-radius: 8px;
  margin-top: 6px;
  display: none;
}

/* Loading pulse animation */
.loading-pulse {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-pulse-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #2563eb;
  opacity: 0;
  animation: pulseRing 1.8s ease-out infinite;
}
.loading-pulse-ring::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #2563eb;
  opacity: 0;
  animation: pulseRing 1.8s ease-out infinite 0.6s;
}
.loading-pulse-core {
  z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
@keyframes pulseRing {
  0%   { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════
   WHAT'S NEW SECTION (landing page)
   ══════════════════════════════════════════════════════════ */
.whats-new-section { padding: 80px 0; background: #fff; }
.section-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.whats-new-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}
@media (max-width: 900px) { .whats-new-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .whats-new-grid { grid-template-columns: 1fr; } }

.wn-card {
  position: relative;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px 22px 20px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.wn-card:hover {
  box-shadow: 0 8px 24px rgba(37,99,235,0.10);
  transform: translateY(-2px);
  border-color: #bfdbfe;
}
.wn-card--major {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border-color: #bfdbfe;
  grid-column: span 1;
}
.wn-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 99px;
  background: #e5e7eb;
  color: #374151;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wn-tag--new      { background: #dcfce7; color: #166534; }
.wn-tag--improved { background: #dbeafe; color: #1d4ed8; }
.wn-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}
.wn-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.wn-card p {
  font-size: 0.84rem;
  color: #4b5563;
  line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════
   DARK DASHBOARD — New Component Overrides
   All rules scoped to .dashboard-body so they only apply
   to dashboard.html (dark theme).
   ══════════════════════════════════════════════════════════ */

/* ── Seg-control (segmented button selector) ── */
.dashboard-body .seg-control {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #1e3a5f;
  background: #0d2137;
  width: 100%;
  flex-wrap: nowrap;
}
.dashboard-body .seg-btn {
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  border-right: 1px solid #1e3a5f;
  outline: none;
  flex: 1;
  text-align: center;
}
.dashboard-body .seg-btn:last-child { border-right: none; }
.dashboard-body .seg-btn:hover {
  background: #1e3a5f;
  color: #e2e8f0;
}
.dashboard-body .seg-btn.active {
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}
.dashboard-body .seg-btn--warn.active {
  background: #dc2626;
  color: #fff;
}

/* ── Tag buttons (multi/single select chips) ── */
.dashboard-body .tag-select-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.dashboard-body .tag-btn {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1.5px solid #1e3a5f;
  background: #0d2137;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  outline: none;
  white-space: nowrap;
}
.dashboard-body .tag-btn:hover {
  border-color: #2563eb;
  color: #e2e8f0;
  background: #1e3a5f;
}
.dashboard-body .tag-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 600;
}
.dashboard-body .tag-btn--none.active {
  background: #374151;
  border-color: #6b7280;
  color: #d1d5db;
}

/* ── "Add other condition" button ── */
.dashboard-body .add-other-btn {
  margin-top: 8px;
  background: none;
  border: 1px dashed #1e3a5f;
  border-radius: 8px;
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.dashboard-body .add-other-btn:hover {
  background: #0d2137;
  border-color: #38bdf8;
}

/* ── Other text-field wrapper ── */
.dashboard-body .other-field-wrap {
  margin-top: 8px;
}
.dashboard-body .other-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #1e3a5f;
  background: #0d2137;
  color: #e2e8f0;
  font-size: 0.85rem;
}
.dashboard-body .other-input:focus {
  outline: none;
  border-color: #2563eb;
}
.dashboard-body .other-input::placeholder { color: #4b6a8a; }

/* ── SVG icon in section headers ── */
.dashboard-body .prof-sec-icon-svg {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1e3a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #38bdf8;
}
.dashboard-body .prof-sec-icon-svg svg {
  stroke: #38bdf8;
}

/* ── Profile section header border ── */
.dashboard-body .profile-section-header {
  border-bottom-color: #1e3a5f;
}

/* ── BMI widget dark ── */
.dashboard-body .bmi-widget {
  background: #0d2137;
  border-color: #1e3a5f;
}
.dashboard-body .bmi-number { color: #e2e8f0; }
.dashboard-body .bmi-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.dashboard-body .bmi-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.dashboard-body .bmi-labels-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 2px;
}
.dashboard-body .bmi-note { color: #64748b; }
.dashboard-body .bmi-bar-track { background: #1e3a5f; }
.dashboard-body .bmi-pointer { border-color: #0d2137; }

/* ── Profile completion ring text dark ── */
.dashboard-body .completion-pct { color: #38bdf8; }
.dashboard-body .completion-label { color: #94a3b8; }

/* ── Form field hints in dark ── */
.dashboard-body .field-hint {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
  margin-left: 6px;
}

/* ══════════════════════════════════════════════════════════
   SYMPTOM CHECK — Dark overrides for white blocks
   ══════════════════════════════════════════════════════════ */

/* ── Step card ── */
.dashboard-body .q-step-card {
  background: #0f1f35 !important;
  border-color: #1e3a5f !important;
  color: #e2e8f0 !important;
}
.dashboard-body .q-step-card h3 { color: #e2e8f0 !important; }
.dashboard-body .q-step-card p  { color: #94a3b8 !important; }
.dashboard-body .q-step-card label { color: #cbd5e1 !important; }
.dashboard-body .q-step-card .form-group { margin-bottom: 20px; }

/* ── Body area buttons (dark) ── */
.dashboard-body .body-area-btn {
  background: #0d2137 !important;
  border-color: #1e3a5f !important;
  color: #94a3b8 !important;
  flex-direction: column;
  gap: 5px;
}
.dashboard-body .body-area-btn svg {
  stroke: #64748b;
  transition: stroke 0.15s;
  flex-shrink: 0;
}
.dashboard-body .body-area-btn:hover {
  background: #1e3a5f !important;
  border-color: #2563eb !important;
  color: #e2e8f0 !important;
}
.dashboard-body .body-area-btn:hover svg { stroke: #e2e8f0; }
.dashboard-body .body-area-btn.selected {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.dashboard-body .body-area-btn.selected svg { stroke: #fff; }

/* ── Duration pills (dark) ── */
.dashboard-body .dur-pill span {
  background: #0d2137 !important;
  border-color: #1e3a5f !important;
  color: #94a3b8 !important;
}
.dashboard-body .dur-pill span:hover {
  border-color: #2563eb !important;
  color: #e2e8f0 !important;
}
.dashboard-body .dur-pill input:checked + span {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

/* ── Duration stepper inputs ── */
.dashboard-body .dur-stepper-btn {
  background: #1e3a5f;
  border: 1px solid #1e3a5f;
  color: #e2e8f0;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
}
.dashboard-body .dur-stepper-btn:hover { background: #2563eb; border-color: #2563eb; }
.dashboard-body .duration-count-input {
  background: #0d2137;
  border: 1.5px solid #1e3a5f;
  color: #e2e8f0;
  border-radius: 6px;
  width: 52px;
  text-align: center;
  padding: 4px;
}
.dashboard-body .duration-count-unit { color: #94a3b8; }

/* ── Symptom cards (dark) ── */
.dashboard-body .sym-card {
  background: rgba(9,18,34,0.75) !important;
  border: 1.5px solid rgba(56,189,248,0.14) !important;
  color: rgba(186,230,255,0.6) !important;
  position: relative;
}
.dashboard-body .sym-card:hover {
  background: rgba(13,27,50,0.92) !important;
  border-color: rgba(56,189,248,0.45) !important;
  color: #e0f2fe !important;
  box-shadow: 0 0 12px rgba(56,189,248,0.12) !important;
}
.dashboard-body .sym-card:has(input:checked) {
  background: rgba(37,99,235,0.28) !important;
  border: 2px solid #38bdf8 !important;
  color: #e0f2fe !important;
  box-shadow: 0 0 16px rgba(56,189,248,0.30), inset 0 0 12px rgba(37,99,235,0.15) !important;
}
.dashboard-body .sym-card:has(input:checked) .sym-name {
  color: #bae6ff !important;
  font-weight: 700 !important;
}
.dashboard-body .sym-card:has(input:checked) .sym-icon svg {
  stroke: #38bdf8 !important;
  filter: drop-shadow(0 0 4px rgba(56,189,248,0.6)) !important;
}
/* Selected checkmark indicator in top-right corner */
.dashboard-body .sym-card:has(input:checked)::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 16px; height: 16px;
  background: #38bdf8;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}
.dashboard-body .sym-card--warning {
  border-color: rgba(251,191,36,0.22) !important;
}
.dashboard-body .sym-card--warning:hover {
  border-color: rgba(251,191,36,0.5) !important;
}
.dashboard-body .sym-card--warning:has(input:checked) {
  background: rgba(245,158,11,0.22) !important;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251,191,36,0.25) !important;
}
.dashboard-body .sym-card--warning:has(input:checked)::after {
  background-color: #fbbf24;
}
.dashboard-body .sym-card--danger {
  border-color: rgba(239,68,68,0.22) !important;
}
.dashboard-body .sym-card--danger:hover {
  border-color: rgba(239,68,68,0.5) !important;
}
.dashboard-body .sym-card--danger:has(input:checked) {
  background: rgba(239,68,68,0.20) !important;
  border: 2px solid #f87171 !important;
  box-shadow: 0 0 16px rgba(239,68,68,0.25) !important;
}
.dashboard-body .sym-card--danger:has(input:checked)::after {
  background-color: #f87171;
}

/* ── Step 3 pill selects (dark) ── */
.dashboard-body .pill-select span {
  background: #0d2137 !important;
  border-color: #1e3a5f !important;
  color: #94a3b8 !important;
}
.dashboard-body .pill-select span:hover {
  border-color: #2563eb !important;
  color: #e2e8f0 !important;
}
.dashboard-body .pill-select input:checked + span {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

/* ── Profile context box (dark) ── */
.dashboard-body .profile-context-box {
  background: #0d2137 !important;
  border-color: #1e3a5f !important;
}
.dashboard-body .pcb-header { color: #38bdf8 !important; }
.dashboard-body .pcb-edit-btn {
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}
.dashboard-body .pcb-edit-btn:hover {
  background: #38bdf8 !important;
  color: #0f1f35 !important;
}

/* ── Temperature input dark ── */
.dashboard-body .temp-input {
  background: #0d2137;
  border: 1.5px solid #1e3a5f;
  color: #e2e8f0;
}
.dashboard-body .temp-unit { color: #94a3b8; }

/* ── Char counter dark ── */
.dashboard-body .char-counter { color: #4b6a8a; }

/* ── Check history panel (dark) ── */
.dashboard-body .check-history-panel {
  background: rgba(9,18,34,0.85) !important;
  border: 1px solid rgba(56,189,248,0.12) !important;
  position: relative;
  z-index: 1;
}
.dashboard-body .chp-header {
  background: rgba(6,13,26,0.6) !important;
  border-bottom-color: rgba(56,189,248,0.1) !important;
}
.dashboard-body .chp-title { color: #e0f2fe !important; }
.dashboard-body .chp-title svg { stroke: #38bdf8 !important; }
.dashboard-body .chp-see-all { color: #38bdf8 !important; }
.dashboard-body .chp-list { background: transparent !important; }
.dashboard-body .chp-item {
  background: transparent !important;
  border-bottom: 1px solid rgba(56,189,248,0.08) !important;
  cursor: pointer !important;
  position: relative;
  z-index: 2;
  pointer-events: all !important;
  transition: background 0.15s, border-color 0.15s !important;
}
.dashboard-body .chp-item:hover {
  background: rgba(56,189,248,0.07) !important;
  border-bottom-color: rgba(56,189,248,0.18) !important;
}
.dashboard-body .chp-item-symptom { color: #e0f2fe !important; }
.dashboard-body .chp-item-meta { color: #4b6a8a !important; }
.dashboard-body .chp-item-arrow { stroke: #38bdf8 !important; color: #38bdf8 !important; }
.dashboard-body .chp-item-icon svg { stroke: rgba(56,189,248,0.5) !important; }
.dashboard-body .chp-empty { color: #4b6a8a !important; }
.dashboard-body .chp-emergency { color: #f87171 !important; }

/* ── Consent box dark ── */
.dashboard-body .consent-box {
  background: #0d2137;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* ── Form errors / success dark ── */
.dashboard-body .form-error {
  color: #fca5a5;
  font-size: 0.83rem;
  margin-top: 6px;
}

/* ── Step nav buttons inherit properly ── */
.dashboard-body .step-nav { display: flex; justify-content: space-between; margin-top: 20px; gap: 12px; }

/* ── Required / optional labels dark ── */
.dashboard-body .q-step-card .required { color: #f87171; }
.dashboard-body .q-step-card .optional { color: #64748b; }

/* ── Profile save bar (dark) ── */
.dashboard-body .profile-save-bar {
  background: #071526 !important;
  border-top: 1px solid #1e3a5f !important;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4) !important;
  padding: 16px 0 !important;
}
.dashboard-body #profile-success { color: #4ade80 !important; }
.dashboard-body #profile-error   { color: #f87171 !important; }

/* ── Profile form — use full width, no max-width cap ── */
.dashboard-body .profile-form {
  max-width: none !important;
  width: 100% !important;
}

/* ── Top grid: Basic Info + Medical History side by side ── */
.dashboard-body .profile-top-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  margin-bottom: 16px !important;
  align-items: start !important;
}
@media (max-width: 860px) {
  .dashboard-body .profile-top-grid { grid-template-columns: 1fr !important; }
}
.dashboard-body .profile-top-grid .profile-section {
  margin-bottom: 0 !important;
}

/* ── Lifestyle seg-controls: 5 columns ── */
.dashboard-body .lifestyle-segs-row {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 14px !important;
  margin-bottom: 18px !important;
}
@media (max-width: 1100px) {
  .dashboard-body .lifestyle-segs-row { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 700px) {
  .dashboard-body .lifestyle-segs-row { grid-template-columns: 1fr 1fr !important; }
}

/* ── Lifestyle Diet + Sport: 2 equal columns ── */
.dashboard-body .lifestyle-tags-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
}
@media (max-width: 700px) {
  .dashboard-body .lifestyle-tags-row { grid-template-columns: 1fr !important; }
}

/* ── prof-body-row: 3 cols in basic section ── */
.dashboard-body .prof-body-row {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* ── Profile sections (dark) ── */
.dashboard-body .profile-section {
  background: #0f1f35 !important;
  border: 1px solid #1e3a5f !important;
  border-radius: 14px !important;
  padding: 20px !important;
  margin-bottom: 16px !important;
}

/* ── Profile form inputs (dark) ── */
.dashboard-body .profile-form input[type="text"],
.dashboard-body .profile-form input[type="number"],
.dashboard-body .profile-form select,
.dashboard-body .profile-form textarea {
  background: #0d2137 !important;
  border: 1.5px solid #1e3a5f !important;
  color: #e2e8f0 !important;
  border-radius: 8px !important;
}
.dashboard-body .profile-form input::placeholder { color: #4b6a8a !important; }
.dashboard-body .profile-form select option { background: #0d2137; color: #e2e8f0; }
.dashboard-body .profile-form input:focus,
.dashboard-body .profile-form select:focus {
  outline: none !important;
  border-color: #2563eb !important;
}
.dashboard-body .profile-form label { color: #cbd5e1 !important; }

/* ═══════════════════════════════════════════════════
   MEDICAL CARD — New Features CSS
   ═══════════════════════════════════════════════════ */

/* ── Card Header Row ── */
.mc-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mc-card-hdr h3 { margin: 0; }
.mc-card-action {
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.25);
  color: #38bdf8;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.mc-card-action:hover { background: rgba(56,189,248,0.22); }

/* ── Side Column (symptoms + doctor tips) ── */
.mc-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Health Insights Card ── */
.mc-insights-card {
  margin-bottom: 0;
}
.mc-insights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mc-insights-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mc-insights-title-row h3 { margin: 0; }
.mc-insights-updated {
  font-size: 11px;
  color: #4b6a8a;
  white-space: nowrap;
}
.mc-insights-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mc-insight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(56,189,248,0.05);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 10px;
  padding: 10px 14px;
}
.mc-insight-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
}
.mc-insight-text {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}

/* ── Trend Chart ── */
.mc-trend-card { margin-bottom: 0; }
.mc-trend-legend {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #64748b;
  gap: 4px;
}
.mc-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.mc-trend-chart {
  overflow-x: auto;
  padding-bottom: 4px;
}
.mc-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
  min-width: 420px;
  padding: 0 4px;
}
.mc-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}
.mc-chart-bar-wrap {
  position: relative;
  width: 100%;
  height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.mc-chart-bar-ev {
  width: 45%;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height .4s ease;
}
.mc-chart-bar-sev {
  width: 45%;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height .4s ease;
  opacity: 0.75;
}
.mc-chart-label {
  font-size: 9px;
  color: #4b6a8a;
  text-align: center;
  white-space: nowrap;
}
.mc-chart-count {
  font-size: 10px;
  color: #38bdf8;
  min-height: 13px;
}

/* ── Doctor Tips Card ── */
.mc-doctor-card { padding: 18px 20px; }
.mc-doctor-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.mc-doctor-header h3 { margin: 0; }
.mc-doctor-tips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mc-doctor-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.5;
}
.mc-doctor-tip-item span { flex: 1; }

/* ── Quick Actions Bar ── */
.mc-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 16px 0 4px;
  border-top: 1px solid rgba(56,189,248,0.1);
}
.mc-action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.2);
  color: #7dd3fc;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}
.mc-action-btn:hover {
  background: rgba(56,189,248,0.18);
  border-color: rgba(56,189,248,0.4);
  color: #e0f2fe;
}
.mc-action-btn.mc-action-danger {
  border-color: rgba(239,68,68,0.25);
  color: #fca5a5;
  background: rgba(239,68,68,0.07);
}
.mc-action-btn.mc-action-danger:hover {
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.4);
}

/* Responsive */
@media (max-width: 700px) {
  .mc-actions-bar { gap: 8px; }
  .mc-action-btn { font-size: 12px; padding: 7px 11px; }
  .mc-chart-bars { min-width: 320px; }
}

/* ═══════════════════════════════════════════════════
   OTP VERIFICATION — Auth Page Styles
   ═══════════════════════════════════════════════════ */

.otp-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  opacity: 0.9;
}

.otp-boxes {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0 4px;
}

.otp-box {
  width: 48px;
  height: 58px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  caret-color: transparent;
}

.otp-box:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.18);
}

.otp-box.filled {
  border-color: #0ea5e9;
  background: #f0f9ff;
}

/* Dark mode otp boxes (on auth page with dark bg) */
.auth-body .otp-box {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.2);
  color: #f1f5f9;
}
.auth-body .otp-box:focus {
  border-color: #0ea5e9;
  background: rgba(14,165,233,0.08);
}

.otp-resend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #64748b;
  margin-top: 16px;
  justify-content: center;
}

.otp-resend-btn {
  background: none;
  border: none;
  color: #0ea5e9;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color .15s;
}
.otp-resend-btn:hover { color: #0284c7; }

.otp-timer {
  color: #94a3b8;
  font-size: 13px;
}

.auth-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 10px;
  transition: color .15s;
}
.auth-back-btn:hover { color: #0ea5e9; }

.form-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin: 8px 0;
}

/* ── Google Sign-In Button ──────────────────────────── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  border: 1.5px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: #3c4043;
  font-size: 14.5px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
  letter-spacing: 0.01em;
}
.btn-google:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #bfdbfe;
  box-shadow: 0 2px 8px rgba(66,133,244,0.12);
}
.btn-google:active:not(:disabled) {
  background: #f0f4ff;
}
.btn-google:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.btn-google svg {
  flex-shrink: 0;
}

/* Dark mode Google button (auth page) */
.auth-body .btn-google {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  color: #f1f5f9;
}
.auth-body .btn-google:hover:not(:disabled) {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* ── Auth Divider ("or") ────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #94a3b8;
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border, #e2e8f0);
}
.auth-body .auth-divider {
  color: rgba(255,255,255,0.35);
}
.auth-body .auth-divider::before,
.auth-body .auth-divider::after {
  background: rgba(255,255,255,0.15);
}

/* ═══════════════════════════════════════════════════════════
   VISUAL ENHANCEMENTS v2 — Animations, Glow, Effects
   ═══════════════════════════════════════════════════════════ */

/* ── Shimmer sweep on primary buttons ───────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  transition: none;
}
.btn-primary:hover::after {
  animation: btn-shimmer 0.55s ease forwards;
}
@keyframes btn-shimmer {
  0%   { left: -75%; }
  100% { left: 125%; }
}

/* ── Gentle pulse glow on primary CTA ───────────────────── */
.btn-primary.btn-lg,
.pc-cta.primary,
.pc-cta.purple {
  animation: cta-pulse 3.5s ease-in-out infinite;
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,99,235,0.25); }
  50%       { box-shadow: 0 6px 32px rgba(37,99,235,0.48), 0 0 0 4px rgba(37,99,235,0.08); }
}
.pc-cta.purple {
  animation-name: cta-pulse-purple;
}
@keyframes cta-pulse-purple {
  0%, 100% { box-shadow: 0 4px 20px rgba(124,58,237,0.25); }
  50%       { box-shadow: 0 6px 32px rgba(124,58,237,0.48), 0 0 0 4px rgba(124,58,237,0.08); }
}

/* ── Card hover lift ─────────────────────────────────────── */
.feature-card,
.hpc-card,
.stat-card,
.plan-card,
.settings-card,
.support-card,
.history-card,
.mc-insight-card,
.pc {
  transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.22s ease;
}
.feature-card:hover,
.hpc-card:hover,
.stat-card:hover,
.plan-card:hover,
.mc-insight-card:hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: 0 12px 40px rgba(0,0,0,.13);
}
.pc:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}

/* ── Gradient text utility ───────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Floating animation for icons/visual elements ────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.float-anim { animation: float 4s ease-in-out infinite; }

/* ── Entrance animations ─────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-up  { animation: fade-up  0.5s ease both; }
.animate-fade-in  { animation: fade-in  0.4s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── Glassmorphism cards (enhanced) ──────────────────────── */
.glass-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
[data-theme="dark"] .glass-card,
.dark-bg .glass-card {
  background: rgba(15,23,42,0.65);
  border-color: rgba(255,255,255,0.08);
}

/* ── Progress bar shimmer ────────────────────────────────── */
@keyframes progress-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.usage-bar-fill,
.progress-bar-fill {
  background-size: 200% 100%;
  background-image: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    var(--color-accent)   40%,
    var(--color-primary)  80%,
    var(--color-primary)  100%
  );
  animation: progress-shimmer 2.5s linear infinite;
}

/* ── Ripple on button click ──────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
}
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-anim 0.55s linear;
  background: rgba(255,255,255,0.35);
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Gradient border (glow ring) on focus ────────────────── */
.btn-primary:focus-visible,
.pc-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.35), 0 4px 20px rgba(37,99,235,0.3);
}

/* ── Pricing card pc-cta — fix <button> vs <a> styles ────── */
.pc-cta {
  display: block;
  width: 100%;
  border: none;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 0;
  border-radius: 12px;
  text-decoration: none;
  transition: background .2s, transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
  letter-spacing: 0.02em;
}
.pc-cta.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}
.pc-cta.primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}
.pc-cta.purple {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
}
.pc-cta.purple:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}
.pc-cta.secondary {
  background: rgba(255,255,255,0.1);
  color: #cbd5e1;
  border: 1.5px solid rgba(255,255,255,0.18);
}
.pc-cta.secondary:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.pc-cta:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  animation: none !important;
}

/* ── Glowing badge ───────────────────────────────────────── */
.glow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(6,182,212,.12));
  color: var(--color-primary);
  border: 1px solid rgba(37,99,235,.2);
  box-shadow: 0 0 12px rgba(37,99,235,.12);
}

/* ── Animated gradient background (hero enhancement) ─────── */
@keyframes bg-pan {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animated-gradient {
  background: linear-gradient(-45deg, #eff6ff, #e0f2fe, #f0fdf4, #eff6ff);
  background-size: 400% 400%;
  animation: bg-pan 12s ease infinite;
}

/* ── Success upgrade banner (payment complete) ────────────── */
.new-user-welcome-banner {
  transition: opacity 0.5s ease;
}

/* ── Sidebar upgrade box — eye-catching ──────────────────── */
.sidebar-upgrade {
  position: relative;
  overflow: hidden;
}
.sidebar-upgrade::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(37,99,235,0.06) 0%,
    rgba(6,182,212,0.06) 100%
  );
  border-radius: inherit;
  pointer-events: none;
}

/* ── Dashboard stat cards — colored top border ────────────── */
.stat-card:nth-child(1) { border-top: 3px solid var(--color-primary); }
.stat-card:nth-child(2) { border-top: 3px solid var(--color-success); }
.stat-card:nth-child(3) { border-top: 3px solid var(--color-accent); }
.stat-card:nth-child(4) { border-top: 3px solid var(--color-warning); }

/* ── Smooth transition on all interactive elements ────────── */
input, textarea, select {
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* ── Medical card insight — animated score ring ───────────── */
@keyframes ring-fill {
  from { stroke-dashoffset: 282; }
  to   { stroke-dashoffset: var(--target-offset, 100); }
}
.score-ring-progress {
  animation: ring-fill 1.2s cubic-bezier(.4,0,.2,1) forwards;
}

/* ── Emergency alert — pulse border ──────────────────────── */
@keyframes emergency-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}
.emergency-card,
.emergency-banner {
  animation: emergency-pulse 2s ease infinite;
}

/* ── Toast / notification slide-in ───────────────────────── */
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)     scale(1); }
}
.toast { animation: toast-in 0.3s cubic-bezier(.34,1.56,.64,1) both; }

/* ── Skeleton loading shimmer ─────────────────────────────── */
@keyframes skeleton-wave {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e8edf2 50%, #f0f4f8 75%);
  background-size: 200px 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: 6px;
}

/* ── Link underline hover effect ──────────────────────────── */
.animated-link {
  position: relative;
  text-decoration: none;
}
.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width 0.25s ease;
}
.animated-link:hover::after { width: 100%; }



/* ═══════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS — Bottom Tab Bar + All Fixes
   ════════════════════════════════════════════════════════════ */

/* ── Bottom Navigation Bar (hidden on desktop) ── */
.dash-bottom-nav {
  display: none;
}

/* ── More Sheet (hidden by default everywhere) ── */
.dash-bnav-more-sheet {
  display: none;
}

@media (max-width: 899px) {

  /* ── Bottom Nav ── */
  .dash-bottom-nav {
    display: flex !important;
    align-items: stretch;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9500 !important;
    background: var(--card-bg, #0d1f38);
    border-top: 1px solid var(--border, rgba(255,255,255,0.08));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 20px rgba(0,0,0,0.25);
  }

  .dash-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    padding: 6px 0 4px;
    transition: color 0.18s;
    -webkit-tap-highlight-color: transparent;
  }

  .dash-bnav-item svg {
    flex-shrink: 0;
    transition: stroke 0.18s;
  }

  .dash-bnav-item.active {
    color: var(--accent, #38bdf8);
  }

  .dash-bnav-item.active svg {
    stroke: var(--accent, #38bdf8);
  }

  /* ── Pad content so it's not hidden behind bottom nav ── */
  .dashboard-body .dash-main {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ── More sheet (slides up from bottom) ── */
  .dash-bnav-more-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 300;
    visibility: hidden;
    pointer-events: none;
  }

  .dash-bnav-more-sheet.open {
    visibility: visible;
    pointer-events: auto;
  }

  .dash-bnav-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s;
  }

  .dash-bnav-more-sheet.open .dash-bnav-more-backdrop {
    background: rgba(0, 0, 0, 0.45);
  }

  .dash-bnav-more-menu {
    position: absolute;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    background: var(--card-bg, #0d1f38);
    border-top: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 16px 16px 0 0;
    padding: 8px 0 4px;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
  }

  .dash-bnav-more-sheet.open .dash-bnav-more-menu {
    transform: translateY(0);
  }

  .dash-bnav-more-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: var(--text-main, #e2e8f0);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .dash-bnav-more-item:active {
    background: rgba(255,255,255,0.05);
  }

  .dash-bnav-more-item svg {
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
  }

  /* ── Topbar: show logo text centered, hide plan badge ── */
  .dashboard-body .dash-topbar .logo-text {
    display: inline !important;
    font-size: 0.9rem;
  }

  .dashboard-body .plan-badge {
    display: none;
  }

  .dashboard-body .dash-topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .dashboard-body .dash-topbar-right {
    gap: 8px;
  }

  /* Shrink lang dropdown button on mobile */
  .dashboard-body .lang-dropdown-selected {
    padding: 6px 8px;
    font-size: 13px;
    min-width: 0;
  }

  /* ── AI Chat view (view-chat): fixed overlay between topbar and bottom nav ── */
  /* position:fixed removes it from normal flow, so dash-main padding no longer offsets it */
  #view-chat.active {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 50 !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  /* chat-layout fills the fixed container */
  #view-chat.active .chat-layout {
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  /* standalone-chat-wrap fills chat-layout */
  #view-chat.active .standalone-chat-wrap {
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
  }
  /* standalone-chat fills wrap — auto height, not calc() */
  #view-chat.active .standalone-chat {
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
  }
  /* messages scroll internally — NEVER push input off screen */
  #view-chat.active .standalone-chat .chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;    /* CRITICAL: allows flex shrink */
  }
  /* input ALWAYS pinned to bottom — never moves */
  #view-chat.active .standalone-chat .chat-input-area {
    flex-shrink: 0 !important;
    position: relative !important;
    bottom: auto !important;
  }

  /* ── Symptom check embedded chat: fixed height, input always at bottom ── */
  .dashboard-body .chat-container {
    height: 55vh !important;
    min-height: 300px !important;
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  /* ── Chat view: hide sessions sidebar on mobile, show toggle btn ── */
  .dashboard-body .chat-sessions-sidebar {
    display: none;
  }

  .dashboard-body .chat-sessions-sidebar.mobile-open {
    display: flex;
    position: fixed;
    inset: 0 0 calc(58px + env(safe-area-inset-bottom, 0px)) 0;
    z-index: 150;
    background: var(--card-bg, #0d1f38);
    flex-direction: column;
    overflow-y: auto;
  }

  /* Show mobile chat toggle button */
  .chat-sessions-mobile-toggle {
    display: flex !important;
  }

  /* ── Mobile: make chat input clearly visible ── */
  .dashboard-body .chat-input-area {
    border-top: 2px solid rgba(56,189,248,0.4) !important;
    padding: 10px 12px !important;
  }
  .dashboard-body #dash-chatInput,
  .dashboard-body #standalone-chatInput {
    border-color: rgba(56,189,248,0.6) !important;
    min-height: 48px !important;
    font-size: 16px !important;
  }
  .dashboard-body #dash-chatInput::placeholder,
  .dashboard-body #standalone-chatInput::placeholder {
    color: rgba(186,230,255,0.7) !important;
  }
  /* Symptom check: messages scroll internally, input pinned at bottom */
  .dashboard-body .chat-container .chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;    /* CRITICAL: prevents messages pushing input off screen */
  }
  .dashboard-body .chat-container .chat-input-area {
    flex-shrink: 0 !important;
    position: relative !important;
    bottom: auto !important;
  }

  /* ── Home: hide duplicate plain stats row, keep plan card with upgrade ── */
  .dashboard-body .home-stats-row {
    display: none !important;
  }

  /* ── view-check: body area grid 3 cols → 2 cols on very small ── */
  .body-area-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* ── Profile: body-row stacks on narrow ── */
  .prof-body-row {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── Medical card stats: compact ── */
  .mc-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── Topbar user name: hide on narrow ── */
  .dashboard-body .user-btn > span:not(.chevron):not(.user-avatar) {
    display: none;
  }

}

@media (max-width: 480px) {

  /* Even smaller: 2 cols for body area */
  .body-area-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Stack profile body row */
  .prof-body-row {
    grid-template-columns: 1fr !important;
  }

  /* Compact home hero title */
  .home-hero-title {
    font-size: 1.5rem !important;
  }

  .home-hero-right {
    display: none;
  }

  /* OTP boxes: shrink slightly on tiny phones */
  .otp-box {
    width: 40px !important;
    height: 50px !important;
    font-size: 20px !important;
  }

  /* Topbar: even more compact */
  .dashboard-body .dash-topbar {
    padding: 0 10px;
  }

  /* ── Chat input area: bigger tap targets on mobile ── */
  .chat-input-area {
    padding: 10px 12px !important;
    gap: 8px !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    background: var(--color-white, #fff) !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .chat-input-area textarea {
    min-height: 48px !important;
    padding: 12px 14px !important;
    font-size: 16px !important; /* prevents iOS auto-zoom */
  }
  .btn-send {
    min-width: 48px !important;
    min-height: 48px !important;
  }
  .chat-attach-btn {
    min-width: 48px !important;
    min-height: 48px !important;
  }
  .chat-file-chips { flex-wrap: wrap; }

}

/* ── File Attachment UI ──────────────────────────────────── */
.chat-input-area {
  flex-wrap: wrap;
}
.chat-file-chips {
  width: 100%;
  display: none; /* shown via JS when files selected */
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.4rem 0 0.1rem;
  order: -1; /* appears above textarea row */
}
.chat-file-chips.has-files { display: flex; }
.chat-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--color-surface-alt, #f1f5f9);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 20px;
  padding: 0.25rem 0.6rem 0.25rem 0.45rem;
  font-size: 0.78rem;
  color: var(--color-text, #1e293b);
  max-width: 180px;
  overflow: hidden;
}
.chat-file-chip svg { flex-shrink: 0; opacity: 0.6; }
.chat-file-chip-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.chat-file-chip-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  line-height: 1;
  flex-shrink: 0;
  color: inherit;
  font-size: 1rem;
  margin-left: 2px;
}
.chat-file-chip-remove:hover { opacity: 1; color: #ef4444; }
.chat-attach-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md, 8px);
  border: 1.5px solid var(--color-border, #e2e8f0);
  background: var(--color-surface-alt, #f1f5f9);
  color: var(--color-text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.chat-attach-btn:hover {
  border-color: var(--color-primary, #0ea5e9);
  color: var(--color-primary, #0ea5e9);
  background: var(--color-white, #fff);
}
.chat-attach-btn.has-files {
  border-color: var(--color-primary, #0ea5e9);
  color: var(--color-primary, #0ea5e9);
  background: rgba(14,165,233,0.07);
}

/* ── Add a "Chats" toggle button inside chat view header (mobile only) ── */
.chat-sessions-mobile-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--btn-ghost-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 8px;
  color: var(--text-main, #e2e8f0);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

/* ═══════════════════════════════════════════════════════════
   END MOBILE OPTIMIZATIONS
   ════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════
   PUBLIC PAGES — Mobile Fixes
   Pages: index, pricing, how-it-works, why-us, legal, sources
   ════════════════════════════════════════════════════════════ */

/* ─── GLOBAL: safe hero padding on all pages ─────────────── */
@media (max-width: 640px) {
  .hero, .why-hero, .hiw-hero, .pricing-hero,
  .why-trust-strip, .section-block {
    padding-left: 16px;
    padding-right: 16px;
  }
  .section-header h2, .section-title {
    font-size: 1.55rem !important;
  }
  .hero-title {
    font-size: 1.7rem !important;
  }
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .section-header h2, .section-title {
    font-size: 1.35rem !important;
  }
  .hero-title {
    font-size: 1.5rem !important;
  }
  /* CTA buttons: stack on tiny screens */
  .hero-actions, .hiw-hero-actions, .why-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero-actions .btn,
  .hiw-hero-actions .btn,
  .why-hero-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ─── INDEX.HTML ─────────────────────────────────────────── */

/* Mini comparison table: horizontal scroll on small screens */
@media (max-width: 600px) {
  .idx-why-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .idx-mini-table {
    min-width: 420px;
  }
}

/* Stats row: full-width numbers on tiny phones */
@media (max-width: 400px) {
  .idx-stat-num {
    font-size: 1.4rem;
  }
}

/* ─── PRICING.HTML ───────────────────────────────────────── */

/* Hero glass card: tighter padding on mobile */
@media (max-width: 480px) {
  .pricing-hero-glass-card {
    padding: 18px 16px !important;
  }
  .pricing-hero h1,
  .pricing-hero-glass-card h1 {
    font-size: 1.45rem !important;
  }
  /* Price amount: smaller on very small screens */
  .pc-amount {
    font-size: 2.2rem !important;
  }
  /* Pricing cards: full width, no gap issues */
  .pricing-grid,
  .idx-pricing-grid {
    padding: 0 4px;
  }
}

/* Compare table: horizontal scroll + compact cells on mobile */
@media (max-width: 768px) {
  .compare-table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px !important;
  }
  .compare-table {
    min-width: 460px;
    font-size: 12px !important;
  }
  .compare-table th,
  .compare-table td {
    padding: 9px 12px !important;
    font-size: 12px !important;
  }
  /* Feature cards grid → 1 col earlier */
  .features-section .features-grid,
  .feature-cards {
    grid-template-columns: 1fr !important;
  }
  /* Pricing FAQ grid */
  .faq-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ─── HOW-IT-WORKS.HTML ──────────────────────────────────── */

/* Process timeline: tighter on tablet */
@media (max-width: 768px) {
  .process-timeline {
    padding: 0 4px;
  }
  .process-card {
    padding: 20px !important;
  }
  .process-step {
    gap: 12px !important;
  }
  .process-step-num {
    width: 56px !important;
    min-width: 56px !important;
  }
}

@media (max-width: 500px) {
  /* Stack step num above card */
  .process-step {
    grid-template-columns: 1fr !important;
  }
  .process-step-num {
    width: 44px !important;
    min-width: 44px !important;
    margin: 0 auto 8px !important;
  }
  .process-timeline::before {
    display: none;
  }
  .hiw-hero h1 {
    font-size: 1.6rem !important;
  }
}

/* ─── WHY-US.HTML ────────────────────────────────────────── */

/* Main comparison table: horizontal scroll on mobile */
@media (max-width: 768px) {
  .comparison-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
  .comparison-table {
    min-width: 480px;
    font-size: 13px;
  }
  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
  /* Mini compare table */
  .mini-compare-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mct-header,
  .mct-row {
    min-width: 360px;
  }
  /* Trust strip: wrap nicely */
  .why-trust-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  /* Why features grid */
  .why-features-grid,
  .why-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .why-hero h1 {
    font-size: 1.6rem !important;
  }
}

/* ─── LEGAL.HTML ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .legal-page {
    padding: 32px 16px 60px !important;
  }
  .legal-tabs {
    gap: 4px;
    flex-wrap: wrap;
  }
  .legal-tab {
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
  .legal-section h1 {
    font-size: 22px !important;
  }
  .legal-section h2 {
    font-size: 16px !important;
  }
}

/* ─── SOURCES.HTML ───────────────────────────────────────── */

@media (max-width: 768px) {
  .sources-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
  /* Reset loi-wide span so it doesn't create implicit columns in 2-col layout */
  .src-card.loi-wide {
    grid-column: span 2 !important; /* keep span 2 in 2-col layout */
  }
  /* Sources stats grid: 2 col */
  .src-stats-grid,
  .sources-stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  /* Hero stats: wrap nicely */
  .sources-hero-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
}

@media (max-width: 580px) {
  /* Switch to 1-col on smaller phones — reset loi-wide span to prevent implicit column */
  .sources-main-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .src-card.loi-wide {
    grid-column: auto !important;
  }
}

@media (max-width: 480px) {
  .sources-main-grid {
    grid-template-columns: 1fr !important;
  }
  .src-card {
    padding: 20px 16px !important;
  }
}

/* ─── ADMIN.HTML ─────────────────────────────────────────── */

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px !important;
    border-radius: 14px !important;
  }
  .admin-main {
    padding: 16px !important;
  }
  .stat-grid {
    grid-template-columns: 1fr !important;
  }
  .charts-row,
  .charts-row-3,
  .revenue-grid,
  .mc-insights-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ─── PUBLIC HEADER: mobile layout — lang left | logo center | hamburger right ─ */
@media (max-width: 640px) {

  /* 3-column grid: equal sides so logo is perfectly centered */
  .header .header-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 12px;
    gap: 0;
  }

  /* Logo: center column */
  .header .logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }
  /* Show logo text on mobile (centered, so we want the name visible) */
  .header .logo-text {
    display: inline !important;
    font-size: 1rem;
  }
  .header .logo-icon {
    font-size: 1.1rem;
  }

  /* Nav links: hidden */
  .header .nav {
    display: none !important;
  }

  /* Lang dropdown: left column */
  .header .lang-dropdown {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .header .lang-dropdown-selected {
    padding: 6px 8px;
    font-size: 13px;
  }

  /* Hamburger: right column */
  .header .mobile-menu-btn {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  /* Hide desktop-only CTA buttons */
  .header .btn-outline.btn-sm,
  .header .btn-primary.btn-sm {
    display: none !important;
  }
}

/* ─── DASHBOARD TOPBAR: desktop — keep logo left, lang+user right ──────── */
@media (min-width: 900px) {
  /* Reorder: logo first, then lang (auto margin pushes it right), then topbar-right */
  .dashboard-body .dash-topbar .logo          { order: 1; }
  .dashboard-body .dash-topbar .lang-dropdown { order: 2; margin-left: auto; margin-right: 0.75rem; }
  .dashboard-body .dash-topbar-right          { order: 3; }
}

/* ─── DASHBOARD TOPBAR: mobile layout — lang left | logo center | user right ─ */
@media (max-width: 899px) {

  .dashboard-body .dash-topbar {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 12px;
    gap: 0;
  }

  /* Lang dropdown: left column (now a direct .dash-topbar child) */
  .dashboard-body .dash-topbar .lang-dropdown {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-left: 0;
    margin-right: 0;
  }
  .dashboard-body .dash-topbar .lang-dropdown-selected {
    padding: 5px 8px;
    font-size: 13px;
  }

  /* Logo: center column */
  .dashboard-body .dash-topbar .logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }
  /* Show logo text on mobile */
  .dashboard-body .dash-topbar .logo-text {
    display: inline !important;
    font-size: 0.95rem;
  }
  .dashboard-body .dash-topbar .logo-icon {
    font-size: 1rem;
  }

  /* Right side: user menu in right column */
  .dashboard-body .dash-topbar-right {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }
}

/* ═══════════════════════════════════════════════════════════
   END PUBLIC PAGES MOBILE FIXES
   ════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   UPGRADE VIEW  (view-upgrade inside dashboard)
   ════════════════════════════════════════════════════════════ */

/* ── Sidebar nav upgrade item — gold accent ── */
.dash-nav-upgrade {
  color: #f59e0b !important;
  margin-top: 4px;
}
.dash-nav-upgrade:hover { background: rgba(245,158,11,0.1) !important; }
.dash-nav-upgrade.active { background: rgba(245,158,11,0.15) !important; color: #fbbf24 !important; }
.dash-nav-upgrade svg { stroke: #f59e0b; }

/* ── Mobile more sheet upgrade item — gold accent ── */
.dash-bnav-upgrade-item { color: #f59e0b !important; }
.dash-bnav-upgrade-item svg { stroke: #f59e0b !important; }

/* ── Current plan banner ── */
.upg-current-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(56,189,248,0.07);
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.upg-current-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.upg-current-desc {
  font-size: 0.875rem;
  color: rgba(186,230,255,0.65);
}

/* ── Billing toggle ── */
.upg-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}
.upg-toggle-lbl {
  font-size: 0.9rem;
  color: rgba(186,230,255,0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}
.upg-save-chip {
  background: rgba(52,211,153,0.15);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
}
.upg-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.upg-switch input { opacity: 0; width: 0; height: 0; }
.upg-switch-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.upg-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.upg-switch input:checked + .upg-switch-slider { background: #2563eb; }
.upg-switch input:checked + .upg-switch-slider::before { transform: translateX(20px); }

/* ── Plans grid ── */
.upg-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  align-items: start;
}

/* ── Individual plan card ── */
.upg-plan-card {
  background: rgba(9,18,34,0.8);
  border: 1px solid rgba(56,189,248,0.14);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.upg-plan-card:hover {
  border-color: rgba(56,189,248,0.3);
  transform: translateY(-2px);
}
.upg-plan-card.upg-plan-active {
  border-color: rgba(56,189,248,0.5) !important;
  background: rgba(37,99,235,0.1) !important;
}

/* Featured (Pro) card */
.upg-plan-featured {
  border-color: rgba(56,189,248,0.4) !important;
  background: rgba(37,99,235,0.08) !important;
}
/* Premium (Pro+) card */
.upg-plan-premium {
  border-color: rgba(167,139,250,0.3) !important;
}
.upg-plan-premium .upg-checkout-btn { background: linear-gradient(135deg,#7c3aed,#4f46e5) !important; }
.upg-plan-premium .upg-checkout-btn:hover { background: linear-gradient(135deg,#6d28d9,#4338ca) !important; }

/* Popular ribbon */
.upg-popular-ribbon {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 0 0 10px 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Plan top section */
.upg-plan-top { display: flex; flex-direction: column; gap: 4px; }
.upg-plan-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #e0f2fe;
  letter-spacing: -0.01em;
}
.upg-plus-sup { color: #38bdf8; }
.upg-plan-price-wrap { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.upg-price-num {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.upg-price-per { font-size: 0.8rem; color: rgba(186,230,255,0.5); }
.upg-price-annual-note { font-size: 0.75rem; color: rgba(52,211,153,0.8); margin-top: 2px; }
.upg-plan-tagline { font-size: 0.8rem; color: rgba(186,230,255,0.45); margin-top: 4px; }

/* Limit chips */
.upg-limits-row { display: flex; flex-wrap: wrap; gap: 6px; }
.upg-limit-chip {
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.18);
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
}

/* Feature list */
.upg-feature-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.upg-feature-list li {
  font-size: 0.82rem;
  color: rgba(186,230,255,0.7);
  padding-left: 18px;
  position: relative;
}
.upg-feature-list li::before {
  content: '✓';
  position: absolute; left: 0;
  color: #34d399;
  font-weight: 700;
}

/* Plan action (CTA area) */
.upg-plan-action { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.upg-checkout-btn { font-weight: 700 !important; }
.upg-btn-downgrade { background: rgba(255,255,255,0.06) !important; color: rgba(186,230,255,0.5) !important; }
.upg-current-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #34d399;
  padding: 8px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: 8px;
}

/* ── Trust strip ── */
.upg-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(56,189,248,0.1);
  border-bottom: 1px solid rgba(56,189,248,0.1);
  margin-bottom: 32px;
  font-size: 0.8rem;
  color: rgba(186,230,255,0.45);
}
.upg-trust-strip span { display: flex; align-items: center; gap: 5px; }

/* ── FAQ section ── */
.upg-faq-section { margin-bottom: 24px; }
.upg-faq-title {
  font-size: 1rem;
  font-weight: 700;
  color: #e0f2fe;
  margin-bottom: 16px;
}
.upg-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.upg-faq-item {
  background: rgba(9,18,34,0.6);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 10px;
  padding: 14px 16px;
}
.upg-faq-item strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #bae6ff;
  margin-bottom: 5px;
}
.upg-faq-item p {
  font-size: 0.78rem;
  color: rgba(186,230,255,0.55);
  line-height: 1.5;
  margin: 0;
}

/* ── Inline error message ── */
.upg-error-msg {
  color: #f87171;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

/* ── Disclaimer ── */
.upg-disclaimer {
  font-size: 0.72rem;
  color: rgba(186,230,255,0.3);
  text-align: center;
  max-width: 540px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .upg-plans-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .upg-faq-grid   { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .upg-plans-grid { max-width: 100%; }
  .upg-plan-card  { padding: 20px 16px; }
  .upg-price-num  { font-size: 1.7rem; }
}

/* ═══════════════════════════════════════════════════════════
   END UPGRADE VIEW
   ════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   DARK AUDIT FIXES — light-color leaks patched for dashboard
   ════════════════════════════════════════════════════════════ */

/* Stepper dot: was white/light-grey, now dark-themed */
.dashboard-body .stepper-dot {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(56,189,248,0.30) !important;
  color: rgba(186,230,255,0.6) !important;
}
.dashboard-body .check-stepper-step.active .stepper-dot {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.dashboard-body .check-stepper-step.done .stepper-dot {
  background: #22c55e !important;
  border-color: #22c55e !important;
  color: #fff !important;
}

/* Upgrade limit card: was light-theme text colors */
.dashboard-body .upgrade-limit-title {
  color: rgba(186,230,255,0.92) !important;
}
.dashboard-body .upgrade-limit-text {
  color: rgba(186,230,255,0.60) !important;
}
.dashboard-body .upgrade-limit-card {
  background: linear-gradient(135deg, rgba(37,99,235,0.12) 0%, rgba(124,58,237,0.14) 100%) !important;
  border-color: rgba(99,102,241,0.35) !important;
}

/* BMI active segment text: keep dark on colored background (intentional) */
.bmi-seg.active { color: rgba(0,0,0,0.75); }

/* ── DARK AUDIT LEAK FIXES (round 2) ── */

/* 1. Stepper connector line — was #e5e7eb (light grey) */
.dashboard-body .stepper-line {
  background: rgba(56,189,248,0.18) !important;
}
.dashboard-body .check-stepper-step.done .stepper-line {
  background: rgba(34,197,94,0.4) !important;
}

/* 2. Check progress bar track — was #e5e7eb */
.dashboard-body .check-progress-bar-track {
  background: rgba(30,58,95,0.7) !important;
}

/* 3. Intensity range slider track — was #e5e7eb */
.dashboard-body .intensity-input {
  background: linear-gradient(to right, #2563eb 0%, #38bdf8 100%) !important;
  accent-color: #38bdf8;
}

/* 4. Emergency inline alert — was #fef2f2 / #7f1d1d (pink/dark-red) */
.dashboard-body .emergency-inline {
  background: rgba(239,68,68,0.10) !important;
  border-color: rgba(239,68,68,0.35) !important;
  color: #fca5a5 !important;
}
.dashboard-body .emergency-inline svg,
.dashboard-body .emergency-inline .emg-icon {
  color: #f87171 !important;
}

/* 5. Profile context box tags — were white pills */
.dashboard-body .pcb-tag {
  background: rgba(37,99,235,0.18) !important;
  color: #7dd3fc !important;
  border-color: rgba(56,189,248,0.20) !important;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE FIXES — iOS auto-zoom + responsive polish
   ════════════════════════════════════════════════════════════ */

/* iOS auto-zoom prevention: all inputs must be >= 16px on mobile */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important; /* iOS zooms in when < 16px on focus */
  }
}

/* ═══ QA Phase 1 — Mobile Overflow Fixes ═══ */

/* Medical card timeline: prevent long symptom strings from overflowing.
   .mc-tl-symptoms uses white-space:nowrap+overflow:hidden intentionally for
   single-line ellipsis — we override the container to contain it properly.
   .mc-tl-body already has min-width:0 but needs overflow-wrap for summary/source. */
.mc-tl-body {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0; /* already set at line 6560 — kept here for specificity safety */
}

/* Medical card timeline summary and source text (below symptom line) */
.mc-tl-summary,
.mc-tl-source {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Medical card timeline symptoms line: replace nowrap with ellipsis-safe wrap
   so long symptom strings don't push the flex container beyond 375px */
.mc-tl-symptoms {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Medical card top-symptoms grid: constrain the fixed 100px column on small viewports */
@media (max-width: 480px) {
  .mc-symptom-item {
    grid-template-columns: 1fr 70px 28px;
  }
}

/* Check results: AI response markdown may contain long URLs or unbreakable strings */
.results-container,
.results-summary,
.summary-content,
.results-sources,
.source-item {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* AI chat messages: long medical term URLs or code in bot responses */
.msg-bubble,
.chat-bubble {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Markdown content within chat messages (links, code blocks inline text) */
.msg-bubble p,
.msg-bubble li,
.msg-bubble code {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ═══ Phase 2 — Medical Card Redesign (mc2-) ═══ */

/* Layout scaffold */
.mc2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(56,189,248,0.08);
}
.mc2-header-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e0f2fe;
  margin: 0;
}
.mc2-plan-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(56,189,248,0.15);
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Score section — ring + sparkline side by side */
.mc2-score-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(56,189,248,0.06);
}
.mc2-score-ring-wrap {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}
.mc2-score-svg {
  display: block;
}
.mc2-score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mc2-score-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e0f2fe;
  line-height: 1;
}
.mc2-score-label {
  font-size: 0.65rem;
  color: rgba(186,230,255,0.5);
  margin-top: 0.2rem;
  text-align: center;
}
.mc2-score-trend {
  font-size: 0.8rem;
  margin-top: 0.4rem;
  font-weight: 500;
}
.mc2-trend-better { color: #34d399; }
.mc2-trend-worse  { color: #fca5a5; }
.mc2-trend-stable { color: rgba(186,230,255,0.6); }
.mc2-sparkline-wrap {
  flex: 1;
  min-width: 0;
}
.mc2-sparkline-label {
  font-size: 0.7rem;
  color: rgba(186,230,255,0.45);
  margin-bottom: 0.4rem;
}

/* Stats row */
.mc2-stats-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border-bottom: 1px solid rgba(56,189,248,0.06);
}
.mc2-stat-card {
  background: rgba(13,27,46,0.6);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  min-width: 90px;
  flex-shrink: 0;
  text-align: center;
}
.mc2-stat-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: #38bdf8;
}
.mc2-stat-lbl {
  font-size: 0.65rem;
  color: rgba(186,230,255,0.5);
  margin-top: 0.15rem;
}

/* Main grid — timeline + sidebar */
.mc2-main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  padding: 1rem;
  align-items: start;
}
@media (max-width: 768px) {
  .mc2-main-grid {
    grid-template-columns: 1fr;
  }
}

/* Timeline card */
.mc2-timeline-card {
  background: rgba(13,27,46,0.8);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 12px;
  overflow: hidden;
}
.mc2-tl-header {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(186,230,255,0.65);
  border-bottom: 1px solid rgba(56,189,248,0.06);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mc2-tl-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(56,189,248,0.04);
  cursor: pointer;
}
.mc2-tl-item:last-child { border-bottom: none; }
.mc2-tl-item:hover { background: rgba(56,189,248,0.04); }
.mc2-tl-row1 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.mc2-tl-date {
  font-size: 0.75rem;
  color: rgba(186,230,255,0.5);
  flex-shrink: 0;
}
.mc2-risk-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.mc2-risk-high   { color: #fca5a5; background: rgba(239,68,68,0.2); }
.mc2-risk-medium { color: #fcd34d; background: rgba(245,158,11,0.2); }
.mc2-risk-low    { color: #86efac; background: rgba(34,197,94,0.15); }
.mc2-severity-pill {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(56,189,248,0.08);
  color: rgba(186,230,255,0.6);
  flex-shrink: 0;
}
.mc2-tl-symptoms {
  font-size: 0.78rem;
  color: #e0f2fe;
  margin-bottom: 0.3rem;
  overflow-wrap: break-word;
  word-break: break-word;
}
.mc2-tl-summary {
  font-size: 0.75rem;
  color: rgba(186,230,255,0.55);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: break-word;
  transition: max-height 0.3s ease;
}
.mc2-tl-item.mc2-tl-expanded .mc2-tl-summary {
  display: block;
  -webkit-line-clamp: unset;
}
.mc2-tl-expand-hint {
  font-size: 0.7rem;
  color: rgba(56,189,248,0.7);
  margin-top: 0.25rem;
}
.mc2-tl-item.mc2-tl-expanded .mc2-tl-expand-hint { display: none; }
.mc2-tl-empty {
  padding: 2rem;
  text-align: center;
  color: rgba(186,230,255,0.4);
  font-size: 0.85rem;
}

/* Sidebar column */
.mc2-side-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Shared card style for sidebar cards — freq chart and insights */
.mc2-card {
  background: rgba(13,27,46,0.8);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 12px;
  overflow: hidden;
}
.mc2-card-header {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(186,230,255,0.65);
  border-bottom: 1px solid rgba(56,189,248,0.06);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mc2-card-body {
  padding: 1rem;
}

/* Emergency flip card — CSS 3D (content injected by 02-03) */
.mc2-emergency-flip {
  padding: 0 1rem 1rem;
}
.mc2-flip-wrap {
  perspective: 800px;
  width: 100%;
  min-height: 160px;
}
.mc2-flip-inner {
  position: relative;
  width: 100%;
  min-height: 160px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.mc2-flip-inner.mc2-flipped {
  transform: rotateY(180deg);
}
.mc2-flip-front,
.mc2-flip-back {
  position: absolute;
  width: 100%;
  min-height: 160px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: rgba(13,27,46,0.8);
  border: 1px solid rgba(56,189,248,0.1);
  border-radius: 12px;
  padding: 1rem;
  box-sizing: border-box;
}
.mc2-flip-back {
  transform: rotateY(180deg);
}

/* Actions bar */
.mc2-actions-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  flex-wrap: wrap;
}
.mc2-btn-primary {
  background: rgba(56,189,248,0.15) !important;
  border-color: rgba(56,189,248,0.4) !important;
  color: #7dd3fc !important;
}
.mc2-btn-primary:hover {
  background: rgba(56,189,248,0.25) !important;
}
.mc2-btn-danger {
  background: rgba(239,68,68,0.08) !important;
  border-color: rgba(239,68,68,0.25) !important;
  color: #fca5a5 !important;
}
.mc2-btn-danger:hover {
  background: rgba(239,68,68,0.15) !important;
}

/* Placeholder states for canvas elements before 02-02/03 render */
.mc2-canvas-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  color: rgba(186,230,255,0.3);
  font-size: 0.8rem;
  font-style: italic;
}

/* === Quick Task 1 — Medical Card Profile Banner === */
.mc2-profile-banner {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(56,189,248,0.06);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.mc2-pb-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #e2e8f0;
}
.mc2-pb-sep {
  color: rgba(148,163,184,0.5);
  margin: 0 0.15rem;
}
.mc2-pb-item {
  font-size: 0.82rem;
  color: #94a3b8;
}
.mc2-pb-pill {
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
}
.mc2-pb-pill.allergy {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
}
.mc2-pb-pill.meds {
  background: rgba(56,189,248,0.15);
  color: #7dd3fc;
}
.mc2-pb-empty {
  font-size: 0.82rem;
  color: #64748b;
  cursor: pointer;
  text-decoration: underline;
}

/* ═══ Phase 4 — Family Profiles Frontend (fam-) ═══ */

#fam-switcher-container {
  position: relative;
  display: flex;
  align-items: center;
}

.fam-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.85rem;
  transition: background 0.15s;
  user-select: none;
}

.fam-switcher:hover {
  background: rgba(255, 255, 255, 0.13);
}

.fam-switcher-locked {
  opacity: 0.6;
}

.fam-switcher-locked:hover {
  background: rgba(255, 255, 255, 0.07);
}

.fam-avatar {
  font-size: 1.1rem;
  line-height: 1;
}

.fam-name {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fam-caret {
  font-size: 0.75rem;
  opacity: 0.7;
}

.fam-lock {
  font-size: 0.75rem;
  opacity: 0.6;
}

.fam-self-badge {
  font-size: 0.65rem;
  background: rgba(99, 179, 237, 0.2);
  color: #63b3ed;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-left: 0.25rem;
}

.fam-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  overflow: hidden;
}

.fam-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.12s;
}

.fam-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.fam-dropdown-item.fam-active {
  background: rgba(99, 179, 237, 0.12);
  color: #63b3ed;
}

.fam-item-avatar {
  font-size: 1.1rem;
  line-height: 1;
}

.fam-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fam-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.25rem 0;
}

.fam-manage-link {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

.fam-viewing-badge {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  font-size: 0.7rem;
  color: #63b3ed;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Family management page ── */

.fam-member-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.fam-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  gap: 1rem;
}

.fam-member-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.fam-member-avatar {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.fam-member-info {
  min-width: 0;
}

.fam-member-name {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fam-member-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.15rem;
}

.fam-member-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.fam-empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

/* Modals */
.fam-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.fam-modal-box {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.75rem;
  width: 100%;
  max-width: 400px;
  margin: 1rem;
}

.fam-modal-box h3 {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.fam-form-group {
  margin-bottom: 1rem;
}

.fam-form-group label {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.35rem;
}

.fam-form-group input[type="text"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 0.55rem 0.75rem;
  color: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.fam-form-group input[type="text"]:focus {
  outline: none;
  border-color: rgba(99, 179, 237, 0.5);
}

.fam-consent-group {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: rgba(99, 179, 237, 0.06);
  border: 1px solid rgba(99, 179, 237, 0.15);
  border-radius: 8px;
  padding: 0.75rem;
}

.fam-consent-group input[type="checkbox"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: #63b3ed;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.fam-consent-group label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
  cursor: pointer;
  margin: 0;
}

.fam-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.fam-error-msg {
  background: rgba(252, 165, 165, 0.1);
  border: 1px solid rgba(252, 165, 165, 0.25);
  border-radius: 7px;
  padding: 0.5rem 0.75rem;
  color: #fca5a5;
  font-size: 0.83rem;
  margin-top: 0.75rem;
}

.fam-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  border-radius: 7px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.fam-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.fam-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-radius: 7px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.fam-btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
}

@media (max-width: 480px) {
  .fam-member-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .fam-member-card-actions {
    width: 100%;
  }
  .fam-member-card-actions .btn {
    flex: 1;
  }
}

/* ═══════════════════════════════════════════════════════════
   MC2 — Smart Alerts
   ═══════════════════════════════════════════════════════════ */
.mc2-alerts-section {
  margin: 0 0 0.75rem;
  display: none;
}
.mc2-alerts-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mc2-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.4;
  border: 1px solid transparent;
}
.mc2-alert-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
}
.mc2-alert-text {
  flex: 1;
}
.mc2-alert-danger {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.25);
  color: #fca5a5;
}
.mc2-alert-warning {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.25);
  color: #fcd34d;
}
.mc2-alert-info {
  background: rgba(56,189,248,0.08);
  border-color: rgba(56,189,248,0.20);
  color: #7dd3fc;
}

/* ═══════════════════════════════════════════════════════════
   MC2 — 8-Week Heatmap
   ═══════════════════════════════════════════════════════════ */
.mc2-heatmap-section {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(56,189,248,0.10);
  border-radius: 0.85rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.mc2-heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  cursor: pointer;
  user-select: none;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.mc2-heatmap-header:hover {
  background: rgba(56,189,248,0.04);
}
.mc2-heatmap-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(186,230,255,0.75);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.mc2-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: rgba(186,230,255,0.45);
}
.mc2-hm-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-left: 0.25rem;
}
.mc2-hm-lbl {
  margin-right: 0.15rem;
}
.mc2-heatmap-inner {
  padding: 0.35rem 1rem 0.75rem;
  transition: max-height 0.3s ease;
}
.mc2-heatmap-inner.mc2-collapsed {
  display: none;
}
.mc2-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  width: 100%;
}
.mc2-hm-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  cursor: default;
  transition: transform 0.1s, opacity 0.1s;
  min-width: 0;
}
.mc2-hm-cell:hover {
  transform: scale(1.2);
  opacity: 0.9;
}
.mc2-hm-empty {
  background: rgba(56,189,248,0.07);
  border: 1px solid rgba(56,189,248,0.08);
}
.mc2-hm-low {
  background: rgba(34,197,94,0.45);
  border: 1px solid rgba(34,197,94,0.2);
}
.mc2-hm-med {
  background: rgba(245,158,11,0.55);
  border: 1px solid rgba(245,158,11,0.25);
}
.mc2-hm-high {
  background: rgba(239,68,68,0.65);
  border: 1px solid rgba(239,68,68,0.3);
}
.mc2-heatmap-week-labels {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  margin-top: 4px;
  gap: 3px;
}
.mc2-heatmap-week-labels span {
  font-size: 0.62rem;
  color: rgba(186,230,255,0.3);
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .mc2-heatmap-legend { display: none; }
  .mc2-heatmap-week-labels span:not(:first-child):not(:last-child) {
    visibility: hidden;
  }
}
