/* ==============================================================================
   AyushMediKiosk - Modern Responsive Stylesheet
   Smart India Hackathon 2026 | Problem Statement: SIH26047
   Ministry of Ayush / All India Institute of Ayurveda
   ============================================================================== */

:root {
  --ayush-primary: #0B6E4F;
  --ayush-primary-dark: #074F39;
  --ayush-primary-light: #ECFDF5;
  --ayush-primary-subtle: #E6F4EA;
  
  --ayush-gold: #D97706;
  --ayush-gold-light: #FEF3C7;
  --ayush-gold-accent: #F59E0B;
  
  --ayush-bg: #F8FAF8;
  --ayush-card-bg: #FFFFFF;
  --ayush-surface-cream: #FCFAF6;
  
  --text-primary: #1A202C;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  
  --border-color: #E2E8F0;
  --border-focus: #0B6E4F;
  
  --red-flag: #DC2626;
  --red-flag-bg: #FEF2F2;
  --red-flag-border: #F87171;
  
  --blue-badge: #2563EB;
  --blue-badge-bg: #EFF6FF;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-gold: 0 8px 24px rgba(217, 119, 6, 0.18);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font-scale: 1;
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--ayush-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
}

/* App Header & Institutional Bar */
.gov-topbar {
  background: linear-gradient(90deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
  height: 4px;
  width: 100%;
}

.main-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-decoration: none;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  transition: var(--transition);
}

.brand-section:hover .brand-logo-img {
  transform: scale(1.02);
}

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

/* Top Utility Controls */
.lang-toggle-btn, .text-size-btn, .speech-toggle-btn, .cloud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: #fff;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.lang-toggle-btn:hover, .text-size-btn:hover, .speech-toggle-btn:hover {
  border-color: var(--ayush-primary);
  color: var(--ayush-primary);
  background: var(--ayush-primary-light);
}

/* 3-Language Segmented Control (EN / HI / TE) */
.lang-segmented-control {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border-color);
  gap: 2px;
}

.lang-pill-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  line-height: 1.2;
}

.lang-pill-btn:hover {
  color: var(--ayush-primary);
}

.lang-pill-btn.active {
  background: var(--ayush-primary);
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(11, 110, 79, 0.3);
}

.cloud-status-badge {
  font-size: 0.78rem;
  border-color: #A7F3D0;
  background: #ECFDF5;
  color: #065F46;
}

.cloud-status-badge.offline {
  border-color: #FED7AA;
  background: #FFF7ED;
  color: #C2410C;
}

.cloud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.cloud-status-badge.offline .cloud-dot {
  background-color: #F59E0B;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Navigation & Role Tabs */
.nav-role-tabs {
  display: flex;
  align-items: center;
  background: #F1F5F9;
  padding: 4px;
  border-radius: var(--radius-full);
}

.role-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.role-tab-btn.active {
  background: var(--ayush-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

/* Main Container Layout */
.app-viewport {
  flex: 1;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* View Sections */
.view-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

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

/* ==============================================================================
   1. LANDING & KIOSK HERO SECTION
   ============================================================================== */
.hero-card {
  background: linear-gradient(135deg, #0B6E4F 0%, #074F39 70%, #043828 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 28px;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero-title span {
  color: #FBBF24;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 720px;
  color: #E2E8F0;
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* Touch Friendly Buttons (Large 48-56px targets) */
.btn-primary-kiosk {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  border: none;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  text-decoration: none;
  min-height: 56px;
}

.btn-primary-kiosk:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.3);
  background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%);
}

.btn-secondary-kiosk {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  padding: 15px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  min-height: 56px;
}

.btn-secondary-kiosk:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #FFFFFF;
}

/* Feature Pillars Grid on Landing */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.feature-card {
  background: var(--ayush-card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ayush-primary-light);
  color: var(--ayush-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ayush-primary-dark);
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==============================================================================
   2. KIOSK PATIENT INTAKE WORKFLOW
   ============================================================================== */
.kiosk-workflow-wrapper {
  background: var(--ayush-card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* Step Progress Indicator */
.kiosk-step-bar {
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
  gap: 12px;
}

.step-indicator-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.step-indicator-item.active {
  color: var(--ayush-primary);
}

.step-indicator-item.completed {
  color: #059669;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E2E8F0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
}

.step-indicator-item.active .step-circle {
  background: var(--ayush-primary);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px var(--ayush-primary-light);
}

.step-indicator-item.completed .step-circle {
  background: #059669;
  color: #FFFFFF;
}

.step-divider {
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  min-width: 20px;
}

/* Intake Step Container */
.kiosk-step-content {
  padding: 36px 32px;
  min-height: 520px;
}

.step-header {
  margin-bottom: 28px;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ayush-primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Audio Read Button */
.audio-narrate-btn {
  background: var(--ayush-primary-light);
  border: 1px solid #A7F3D0;
  color: var(--ayush-primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  margin-top: 10px;
}

.audio-narrate-btn:hover {
  background: #D1FAE5;
}

/* Forms & Input Elements */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

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

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #FFFFFF;
  color: var(--text-primary);
  transition: var(--transition);
}

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

/* Speech-To-Text Form Input Group */
.input-speech-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-speech-wrap .form-input {
  padding-right: 48px;
}

.btn-field-speech {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #F8FAF8;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  padding: 0;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.btn-field-speech:hover {
  background: var(--ayush-primary-light);
  color: var(--ayush-primary);
  border-color: var(--ayush-primary);
  transform: translateY(-50%) scale(1.08);
}

.btn-field-speech.listening {
  background: #FEE2E2 !important;
  border-color: #EF4444 !important;
  color: #DC2626 !important;
  animation: pulse-speech 1.2s infinite ease-in-out;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25) !important;
}

@keyframes pulse-speech {
  0% { transform: translateY(-50%) scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { transform: translateY(-50%) scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: translateY(-50%) scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Chief Complaint Cards Selector */
.complaints-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.complaint-option-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  background: #FFFFFF;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.complaint-option-card:hover {
  border-color: var(--ayush-primary);
  transform: translateY(-2px);
  background: var(--ayush-surface-cream);
}

.complaint-option-card.selected {
  border-color: var(--ayush-primary);
  background: var(--ayush-primary-light);
  box-shadow: 0 0 0 2px var(--ayush-primary);
}

.complaint-header-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.complaint-icon-badge {
  font-size: 1.4rem;
  background: #F1F5F9;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.complaint-title-en {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.complaint-title-hi {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.complaint-ayush-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ayush-gold);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #CBD5E1;
}

/* SOCRATES Framework Explorer Cards */
.socrates-card {
  background: #F8FAF8;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.socrates-pill {
  background: var(--ayush-gold-light);
  color: #92400E;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}

/* Severity Slider Visualizer */
.severity-slider-container {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 16px 0 24px;
}

.severity-slider {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #10B981 0%, #F59E0B 50%, #EF4444 100%);
  outline: none;
  cursor: pointer;
  margin: 14px 0;
}

.severity-meter-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
}

.severity-score-badge {
  background: #EF4444;
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Emergency Red-Flag Banner / Alert */
.red-flag-alert-box {
  background: var(--red-flag-bg);
  border: 2px solid var(--red-flag-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  display: none;
  animation: pulseAlert 1.5s infinite alternate;
}

.red-flag-alert-box.visible {
  display: block;
}

@keyframes pulseAlert {
  from { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
  to { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.red-flag-title {
  color: var(--red-flag);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.red-flag-desc {
  color: #991B1B;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Granular Consent Modal & Identity Layer */
.consent-card {
  background: var(--ayush-surface-cream);
  border: 1px solid #E2D9C8;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.consent-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #EDE5D8;
}

.consent-checkbox-row:last-child {
  border-bottom: none;
}

.consent-checkbox-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--ayush-primary);
  cursor: pointer;
  margin-top: 2px;
}

/* AYUSH Mode Pariksha Questions */
.prakriti-question-block {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.prakriti-options-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.prakriti-option-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.prakriti-option-radio:hover {
  background: #F8FAF8;
  border-color: var(--ayush-primary);
}

.prakriti-option-radio.selected {
  border-color: var(--ayush-primary);
  background: var(--ayush-primary-light);
  font-weight: 600;
}

/* Ashtavidha Pariksha Table Grid */
.ashtavidha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.ashtavidha-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.ashtavidha-item-header {
  font-weight: 700;
  color: var(--ayush-primary-dark);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

/* Document Upload Module */
.upload-drop-zone {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  background: #F8FAFC;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
}

.upload-drop-zone:hover, .upload-drop-zone.dragover {
  border-color: var(--ayush-primary);
  background: var(--ayush-primary-light);
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--ayush-primary);
  margin-bottom: 12px;
}

.document-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.doc-timeline-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--ayush-gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Doctor Workspace Patient Uploaded Records & Images */
.doc-records-section {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.doc-images-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.doc-image-card {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.doc-image-thumb-wrap {
  width: 100%;
  height: 140px;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.doc-image-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.doc-image-thumb-wrap:hover .doc-image-thumb {
  transform: scale(1.05);
}

.doc-image-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.doc-image-thumb-wrap:hover .doc-image-zoom-overlay {
  opacity: 1;
}

.doc-image-card-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.doc-image-filename {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ayush-primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-image-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.doc-image-ocr-pill {
  font-size: 0.75rem;
  color: var(--ayush-primary-dark);
  background: var(--ayush-primary-light);
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1.3;
  margin-top: 4px;
}

.btn-view-doc-img {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--ayush-primary-dark);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
}

.btn-view-doc-img:hover {
  background: var(--ayush-primary);
  color: #FFFFFF;
  border-color: var(--ayush-primary);
}

/* Step 4 Timeline Thumbnails */
.doc-timeline-thumb-img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.doc-timeline-thumb-img:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-sm);
}

/* Kiosk Bottom Actions Bar */
.kiosk-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding: 20px 32px;
  background: #F8FAFC;
}

.btn-nav-prev {
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
}

.btn-nav-next {
  background: var(--ayush-primary);
  color: #FFFFFF;
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  min-height: 48px;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-nav-next:hover {
  background: var(--ayush-primary-dark);
  transform: translateY(-1px);
}

/* ==============================================================================
   3. DOCTOR CONSULTATION PORTAL
   ============================================================================== */
.doctor-layout-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 992px) {
  .doctor-layout-grid {
    grid-template-columns: 1fr;
  }
}

.queue-panel {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.queue-panel-header {
  padding: 16px 20px;
  background: #F8FAF8;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-list-container {
  max-height: 680px;
  overflow-y: auto;
}

.queue-patient-card {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.queue-patient-card:hover {
  background: #F8FAF8;
}

.queue-patient-card.active {
  background: var(--ayush-primary-light);
  border-left: 4px solid var(--ayush-primary);
}

.queue-patient-card.emergency {
  background: var(--red-flag-bg);
  border-left: 4px solid var(--red-flag);
}

.queue-token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.token-badge {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  background: #E2E8F0;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.status-waiting { background: #FEF3C7; color: #B45309; }
.status-in_consultation { background: #DBEAFE; color: #1D4ED8; }
.status-emergency { background: #FEE2E2; color: #B91C1C; }
.status-completed { background: #D1FAE5; color: #047857; }

/* Doctor Workspace Card */
.consultation-workspace {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.summary-block {
  background: #FDFBF7;
  border: 1px solid #E9E2D5;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.summary-heading {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ayush-primary-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Prescription Builder Form */
.medicine-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
}

.medicine-table th, .medicine-table td {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.9rem;
}

.medicine-table th {
  background: #F8FAFC;
  font-weight: 700;
}

.btn-add-medicine {
  background: var(--ayush-primary-light);
  border: 1px solid #A7F3D0;
  color: var(--ayush-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

/* ==============================================================================
   4. ADMIN ANALYTICS DASHBOARD
   ============================================================================== */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-metric-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon-square {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ayush-primary-light);
  color: var(--ayush-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.chart-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ==============================================================================
   5. MODALS & POPUPS
   ============================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-dialog {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

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

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ayush-primary-dark);
}

.modal-close-btn {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #F8FAFC;
}

/* Token Success Card (At end of Kiosk Flow) */
.token-success-box {
  text-align: center;
  padding: 36px 20px;
}

.token-big-display {
  font-family: monospace;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--ayush-primary);
  background: var(--ayush-primary-light);
  border: 2px dashed var(--ayush-primary);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: inline-block;
  margin: 18px 0;
  letter-spacing: 2px;
}

/* ==============================================================================
   7. ENHANCED ONLINE OPD & ROLE GATEWAY STYLES
   ============================================================================== */

/* Header Auth Badges */
.patient-auth-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--ayush-primary-light);
  color: var(--ayush-primary-dark);
  border: 1px solid var(--ayush-primary);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.patient-auth-badge:hover {
  background: var(--ayush-primary);
  color: #FFFFFF;
}

.doctor-auth-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.doctor-auth-btn:hover {
  background: #F59E0B;
  color: #FFFFFF;
}

/* Portal Choice Container (Replaces 4 boxes with Two Clear Portals) */
.portal-choice-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  max-width: 1050px;
  margin: 32px auto 0;
}

.portal-choice-card {
  background: var(--surface-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

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

.patient-portal-card {
  border-top: 6px solid var(--ayush-primary);
}

.doctor-portal-card {
  border-top: 6px solid #D97706;
}

.portal-card-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  background: #ECFDF5;
  color: #065F46;
  margin-bottom: 16px;
}

.portal-card-badge.doctor-badge {
  background: #FEF3C7;
  color: #92400E;
}

.portal-card-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.portal-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.portal-card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
}

.portal-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.portal-tag {
  font-size: 0.8rem;
  font-weight: 600;
  background: #F1F5F9;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 12px;
}

.portal-action-btn, .portal-btn {
  width: 100%;
  justify-content: center;
}

.doctor-entry-btn {
  background: #1E293B;
  color: #F8FAFC;
  border: 1px solid #334155;
}

.doctor-entry-btn:hover {
  background: #0F172A;
  color: #FBBF24;
}

/* ==============================================================================
   8. STEP-BY-STEP VOICE ASSISTANT AUDIO PROMPT BAR
   ============================================================================== */
.step-audio-prompt-bar {
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
  border: 1.5px solid #86EFAC;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(11, 110, 79, 0.08);
}

.audio-prompt-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.audio-prompt-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-wave-animation {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  padding: 2px;
}

.wave-bar {
  width: 4px;
  height: 8px;
  background: var(--ayush-primary);
  border-radius: 3px;
  transition: height 0.2s ease;
}

.audio-wave-animation.speaking .wave-bar {
  animation: waveJump 0.8s infinite ease-in-out alternate;
}

.audio-wave-animation.speaking .wave-bar:nth-child(1) { animation-delay: 0s; }
.audio-wave-animation.speaking .wave-bar:nth-child(2) { animation-delay: 0.15s; }
.audio-wave-animation.speaking .wave-bar:nth-child(3) { animation-delay: 0.3s; }
.audio-wave-animation.speaking .wave-bar:nth-child(4) { animation-delay: 0.1s; }
.audio-wave-animation.speaking .wave-bar:nth-child(5) { animation-delay: 0.25s; }

@keyframes waveJump {
  from { height: 6px; }
  to { height: 22px; }
}

.audio-prompt-text-wrap {
  flex: 1;
}

.audio-assistant-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ayush-primary);
  display: block;
}

.audio-prompt-text {
  margin: 2px 0 0;
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.45;
}

.btn-replay-audio {
  background: #FFFFFF;
  border: 1.5px solid var(--ayush-primary);
  color: var(--ayush-primary);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-replay-audio:hover {
  background: var(--ayush-primary);
  color: #FFFFFF;
}

.btn-voice-dictate-step {
  background: #EFF6FF;
  border: 1.5px solid #3B82F6;
  color: #1D4ED8;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-voice-dictate-step:hover {
  background: #2563EB;
  color: #FFFFFF;
}

.btn-voice-dictate-step.listening {
  background: #DC2626;
  border-color: #B91C1C;
  color: #FFFFFF;
  animation: pulseStepMic 1s infinite alternate;
}

@keyframes pulseStepMic {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

/* Floating OPD Speech-to-Text Status Pill */
.opd-speech-pill {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  opacity: 0;
  visibility: hidden;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 1050;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
}

.opd-speech-pill.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.speech-pill-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.speech-pill-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #EF4444;
  animation: pulseRec 1s infinite;
}

@keyframes pulseRec {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.speech-pill-lang {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #FDE68A;
}

.speech-pill-status {
  font-size: 0.88rem;
  font-weight: 600;
  color: #E2E8F0;
  white-space: nowrap;
}

.speech-pill-target {
  font-size: 0.78rem;
  color: #94A3B8;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speech-pill-preview {
  font-size: 0.88rem;
  color: #6EE7B7;
  font-weight: 600;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speech-pill-done {
  background: var(--ayush-primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.speech-pill-done:hover {
  background: #10B981;
}

/* ==============================================================================
   9. PATIENT AUTH TABS & DIGITAL HEALTH ID CARD
   ============================================================================== */
.auth-tabs-row {
  display: flex;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.auth-tab-btn.active {
  color: var(--ayush-primary);
  border-color: var(--ayush-primary);
  background: #F8FAF8;
}

.auth-info-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.4;
}

/* Digital Health Card Widget */
.digital-health-card {
  background: linear-gradient(135deg, #0B6E4F 0%, #074F39 100%);
  color: #FFFFFF;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 25px rgba(11, 110, 79, 0.35);
  text-align: left;
  position: relative;
  overflow: hidden;
  border: 2px solid #D97706;
}

.card-gov-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 1px;
  font-weight: 700;
  opacity: 0.9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.card-gov-text {
  letter-spacing: 1px;
}

.card-gov-emblem {
  font-size: 1.1rem;
}

.card-inst-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #FDE68A;
  letter-spacing: 0.5px;
}

.card-id-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.card-id-label {
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.85;
  letter-spacing: 0.5px;
  display: block;
}

.card-id-value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #FEF08A;
  font-family: monospace;
}

.card-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 0.85rem;
}

.card-f-label {
  font-size: 0.68rem;
  opacity: 0.75;
  font-weight: 700;
  display: block;
  letter-spacing: 0.5px;
}

.card-f-val {
  font-weight: 700;
  color: #FFFFFF;
}

.card-barcode-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-barcode {
  font-family: monospace;
  letter-spacing: 3px;
  font-weight: 800;
  font-size: 0.95rem;
  opacity: 0.85;
}

.card-abha-sim {
  font-size: 0.75rem;
  opacity: 0.85;
  font-weight: 600;
}

.pin-hint-tag {
  font-size: 0.85rem;
  color: #92400E;
  background: #FEF3C7;
  padding: 6px 14px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 8px;
}

/* ==============================================================================
   10. AYUSH MITRA AI CHATBOT WIDGET
   ============================================================================== */
.ayush-chatbot-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.chatbot-launcher-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--ayush-primary) 0%, var(--ayush-primary-dark) 100%);
  color: #FFFFFF;
  border: 2px solid #D97706;
  border-radius: 36px;
  padding: 10px 20px;
  box-shadow: 0 8px 24px rgba(11, 110, 79, 0.35);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-launcher-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(11, 110, 79, 0.45);
}

.launcher-icon-wrap {
  font-size: 1.5rem;
}

.launcher-text-wrap {
  text-align: left;
}

.launcher-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.launcher-sub {
  display: block;
  font-size: 0.72rem;
  opacity: 0.9;
}

.launcher-pulse {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #10B981;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.9; }
}

.chatbot-window {
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  bottom: 68px;
  right: 0;
  z-index: 1000;
  animation: chatFadeIn 0.25s ease-out;
}

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

.chatbot-header {
  background: linear-gradient(135deg, var(--ayush-primary) 0%, var(--ayush-primary-dark) 100%);
  color: #FFFFFF;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.chatbot-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
}

.chatbot-status-indicator {
  font-size: 0.72rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
}

.chatbot-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-ctrl-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition);
}

.chatbot-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F8FAF8;
}

.chat-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
}

.chat-msg.bot {
  align-self: flex-start;
  background: #FFFFFF;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--ayush-primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.chatbot-chips-container {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  border-top: 1px solid var(--border-color);
  background: #FFFFFF;
  scrollbar-width: thin;
}

.chat-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.chat-chip:hover {
  background: var(--ayush-primary-light);
  border-color: var(--ayush-primary);
  color: var(--ayush-primary);
}

.chatbot-input-bar {
  padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
}

.chatbot-input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.88rem;
  outline: none;
}

.chatbot-input:focus {
  border-color: var(--ayush-primary);
}

.chatbot-mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #F8FAF8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.chatbot-mic-btn.listening {
  background: #FEE2E2;
  border-color: #EF4444;
  color: #DC2626;
  animation: pulse 1s infinite;
}

.chatbot-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--ayush-primary);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition);
}

.chatbot-send-btn:hover {
  background: var(--ayush-primary-dark);
}

/* ==============================================================================
   6. PRINT STYLESHEET (Official AIIA OPD Case Sheet)
   ============================================================================== */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12pt;
  }
  
  .main-header, .gov-topbar, .kiosk-step-bar, .kiosk-footer-nav, .header-actions,
  .btn-print-case, .modal-close-btn, .modal-footer, .nav-role-tabs {
    display: none !important;
  }

  .app-viewport {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .print-case-sheet {
    display: block !important;
    border: 2px solid #000;
    padding: 20px;
    margin: 0;
  }

  .print-page-break {
    page-break-before: always;
  }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .header-container {
    padding: 8px 12px;
  }
  
  .kiosk-step-content {
    padding: 20px 16px;
  }
  
  .btn-primary-kiosk {
    width: 100%;
    justify-content: center;
  }
}

/* File Protocol Notice Banner */
.protocol-banner {
  background: linear-gradient(90deg, #1E293B, #0F172A);
  color: #F8FAFC;
  padding: 10px 18px;
  font-size: 0.88rem;
  display: none;
  border-bottom: 2px solid var(--ayush-gold);
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.protocol-banner.active {
  display: block;
}

.protocol-banner-content {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-protocol-switch {
  background: var(--ayush-gold);
  color: #0F172A;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.82rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-protocol-switch:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
}

.btn-protocol-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-protocol-close:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

/* ==============================================================================
   CHATBOT IMAGE UPLOAD & EXPLAIN SIMPLY ENHANCEMENTS
   ============================================================================== */

/* Image upload button in chatbot */
.chatbot-img-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #E0F2FE, #BAE6FD);
  color: #0369A1;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
}
.chatbot-img-btn:hover {
  background: linear-gradient(135deg, #BAE6FD, #7DD3FC);
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(3, 105, 161, 0.3);
}
.chatbot-img-btn.has-image {
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: #065F46;
}

/* Image preview bar above chatbot input */
.chatbot-image-preview-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
  border-top: 1px solid #BBF7D0;
  border-bottom: 1px solid #BBF7D0;
  animation: slideDown 0.25s ease;
}
.chatbot-image-preview-bar.visible {
  display: flex;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chatbot-preview-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #4ADE80;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.chatbot-preview-info {
  flex: 1;
  min-width: 0;
}
.chatbot-preview-filename {
  font-size: 0.78rem;
  font-weight: 700;
  color: #065F46;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chatbot-preview-hint {
  font-size: 0.72rem;
  color: #4B5563;
  margin-top: 2px;
}
.chatbot-preview-remove {
  background: #FEE2E2;
  border: none;
  color: #DC2626;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.chatbot-preview-remove:hover {
  background: #DC2626;
  color: #FFF;
  transform: scale(1.1);
}

/* Chat message image display */
.chat-msg-image {
  max-width: 220px;
  max-height: 160px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.3);
  object-fit: cover;
  display: block;
  margin-bottom: 6px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-msg-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* Explain Simply mode toggle */
.chatbot-explain-toggle {
  background: linear-gradient(135deg, #FEF9C3, #FEF08A);
  border: 1.5px solid #EAB308;
  color: #713F12;
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.chatbot-explain-toggle:hover {
  background: linear-gradient(135deg, #FDE68A, #FCD34D);
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.35);
  transform: translateY(-1px);
}
.chatbot-explain-toggle.active {
  background: linear-gradient(135deg, #059669, #047857);
  color: #FFFFFF;
  border-color: #047857;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.4);
}

/* Bot message action buttons */
.chat-msg-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.chat-action-btn {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(45, 122, 78, 0.3);
  color: #1B4332;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-action-btn:hover {
  background: var(--ayush-primary, #2D7A4E);
  color: #FFF;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(45,122,78,0.3);
}

/* Simplified response box style */
.chat-simple-box {
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
  border-left: 3px solid #22C55E;
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #14532D;
  line-height: 1.6;
  white-space: pre-wrap;
}
.chat-simple-box .simple-label {
  font-weight: 800;
  color: #15803D;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  display: block;
}

/* Image analysis response card */
.chat-analysis-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #1E293B;
}
.chat-analysis-card .analysis-section {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #E2E8F0;
}
.chat-analysis-card .analysis-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.chat-analysis-card .analysis-label {
  font-weight: 700;
  color: var(--ayush-primary-dark, #1B4332);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Typing indicator */
.chat-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}
.chat-typing-dot {
  width: 7px;
  height: 7px;
  background: var(--ayush-primary, #2D7A4E);
  border-radius: 50%;
  opacity: 0.5;
  animation: chatTypingBounce 1.2s infinite ease-in-out;
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatTypingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* ==============================================================================
   DOCTOR PORTAL - MEDICINE TABLE & PRESCRIPTION ENHANCEMENTS
   ============================================================================== */

.medicine-table input.rx-name {
  min-width: 140px;
}
.rx-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
  border: 1px solid #BBF7D0;
  border-radius: 8px;
}
.rx-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
  background: #FEF9C3;
  color: #713F12;
  border: 1px solid #EAB308;
}
.rx-status-badge.saved {
  background: #D1FAE5;
  color: #065F46;
  border-color: #4ADE80;
}
.rx-status-badge .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EAB308;
  display: inline-block;
}
.rx-status-badge.saved .status-dot {
  background: #22C55E;
}

/* Toast Notification */
.ayush-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, #065F46, #047857);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 99999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
}
.ayush-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ayush-toast.error {
  background: linear-gradient(135deg, #7F1D1D, #DC2626);
}

/* Quick formulation selector */
.rx-quick-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rx-quick-select {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
  background: #FFF;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.rx-quick-select:focus {
  border-color: var(--ayush-primary);
  box-shadow: 0 0 0 3px rgba(45, 122, 78, 0.12);
}
.btn-rx-from-catalog {
  background: linear-gradient(135deg, var(--ayush-primary), var(--ayush-primary-dark));
  color: #FFF;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.btn-rx-from-catalog:hover {
  background: linear-gradient(135deg, var(--ayush-primary-dark), #0F3620);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45,122,78,0.3);
}
