/* ==========================================================================
   Medical Dose Pro - Professional Medical Theme & Thermal Label Engine
   تصميم طبي احترافي: أبيض ناصع مطعم بالأزرق الملكي + دعم الطابعات الحرارية
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-arabic: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-english: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Pure White & Medical Royal Blue Palette */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-focus: #0284c7;

  /* Medical Blue Accents */
  --primary-blue: #0284c7;
  --primary-blue-hover: #0369a1;
  --primary-blue-dark: #075985;
  --primary-blue-light: #e0f2fe;
  --primary-blue-glow: rgba(2, 132, 199, 0.2);

  --accent-royal: #2563eb;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(2, 132, 199, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.dark {
  --bg-body: #0b1329;
  --bg-card: #111d35;
  --bg-subtle: #172642;
  --bg-input: #0e172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #243552;
  --border-focus: #38bdf8;

  --primary-blue-light: #082f49;
  --primary-blue-glow: rgba(56, 189, 248, 0.25);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  width: 100%;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html[lang="en"] body {
  font-family: var(--font-english);
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.glass-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all 0.3s ease;
}

.dark .glass-header {
  background: rgba(17, 29, 53, 0.94);
  border-bottom-color: var(--border-color);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-blue);
  background-color: var(--bg-subtle);
  border-color: var(--border-color);
}

.nav-link.active {
  color: var(--primary-blue);
  background-color: var(--primary-blue-light);
  border-color: #bae6fd;
}

.dark .nav-link.active {
  color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.15);
  border-color: #0369a1;
}

/* ==========================================================================
   Luxury Sliding Pill Switch for Dark/Light Mode
   ========================================================================== */
.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 62px;
  height: 32px;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border: 2px solid #94a3b8;
  border-radius: 30px;
  padding: 2px 4px;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .theme-switch-btn {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-color: #38bdf8;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.theme-switch-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 2px;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.dark .theme-switch-thumb {
  transform: translateX(30px);
  background: #0284c7;
}

/* Language Toggle Button */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.lang-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background-color: var(--bg-subtle);
  transform: translateY(-1px);
}

/* ==========================================================================
   Form Inputs & Dropdowns (High Contrast for Light & Dark Mode)
   ========================================================================== */
.form-input, .form-select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3.5px var(--primary-blue-glow);
}

.dark .form-input, .dark .form-select, .dark input, .dark select, .dark textarea {
  background-color: #0e172a !important;
  color: #f8fafc !important;
  border-color: #243552 !important;
}

.dark select option {
  background-color: #0e172a !important;
  color: #f8fafc !important;
}

.dark input::placeholder, .dark textarea::placeholder {
  color: #64748b !important;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

/* Drug Autocomplete Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--primary-blue);
  border-radius: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  margin-top: 4px;
}

.dark .search-results-dropdown {
  background-color: #0e172a !important;
  border-color: #38bdf8 !important;
}

.search-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.15s ease;
  color: var(--text-main);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover, .search-item.highlighted {
  background-color: var(--primary-blue-light);
  color: var(--primary-blue-dark);
}

.dark .search-item {
  border-bottom-color: #1e2e4a !important;
  color: #f8fafc !important;
}

.dark .search-item:hover, .dark .search-item.highlighted {
  background-color: rgba(56, 189, 248, 0.2) !important;
  color: #38bdf8 !important;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: all 0.25s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  transform: translateY(-1px);
}

/* Prominent Pharmacy Sticker Print Button (High Contrast in Light & Dark) */
.btn-sticker-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  background-color: #0284c7 !important;
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 800;
  border: 1px solid #0369a1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}

.btn-sticker-print:hover {
  background-color: #0369a1 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background-color: var(--bg-subtle);
}

.dark .btn-secondary {
  background-color: #172642;
  border-color: #243552;
  color: #f8fafc;
}

/* Tabs */
.tab-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-muted);
}

.tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

/* Cards */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.15rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.25s ease;
}

.result-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
}

.dark .result-card {
  background: linear-gradient(135deg, #0c2742 0%, #071f36 100%);
  border: 1px solid #0369a1;
}

/* ==========================================================================
   Thermal Pharmacy Sticker (100% Monochrome Black & White for Clear Thermal Print)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
}

.dark .modal-card {
  background-color: #111d35 !important;
  color: #f8fafc !important;
  border-color: #243552 !important;
}

.sticker-preview-wrapper {
  background: #cbd5e1;
  padding: 1.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
}

.dark .sticker-preview-wrapper {
  background: #0b1329;
}

/* Strict Pure Black & White Thermal Label */
.pharmacy-sticker {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  border-radius: 4px;
  padding: 8px 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  line-height: 1.25;
  box-sizing: border-box;
}

.pharmacy-sticker * {
  color: #000000 !important;
}

.sticker-70x50 {
  width: 280px;
  height: 200px;
  font-size: 11px;
}
.sticker-50x30 {
  width: 220px;
  height: 132px;
  font-size: 9px;
  padding: 5px 6px;
}
.sticker-80x50 {
  width: 320px;
  height: 200px;
  font-size: 11.5px;
}
.sticker-100x50 {
  width: 380px;
  height: 190px;
  font-size: 12px;
}

.sticker-header {
  border-bottom: 2px solid #000000 !important;
  padding-bottom: 3px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sticker-drug-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #000000 !important;
}

.sticker-footer {
  border-top: 1.5px dashed #000000 !important;
  padding-top: 2px;
  margin-top: 3px;
  font-size: 9px;
  color: #000000 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Print Rules for Thermal Label Printers (@media print)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .glass-header, .adsense-slot, .no-print, footer, #mobile-menu, .modal-card-controls, article, aside {
    display: none !important;
  }

  body.printing-label .modal-overlay {
    position: static !important;
    background: none !important;
    padding: 0 !important;
  }

  body.printing-label .modal-card {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  body.printing-label .sticker-preview-wrapper {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.printing-label .pharmacy-sticker {
    box-shadow: none !important;
    border: 1px solid #000000 !important;
    width: 100% !important;
    height: 100% !important;
    page-break-inside: avoid;
  }

  body.printing-label-70x50 {
    @page { size: 70mm 50mm; margin: 0; }
  }
  body.printing-label-50x30 {
    @page { size: 50mm 30mm; margin: 0; }
  }
  body.printing-label-80x50 {
    @page { size: 80mm 50mm; margin: 0; }
  }
  body.printing-label-100x50 {
    @page { size: 100mm 50mm; margin: 0; }
  }
}

/* ==========================================================================
   Layout Utility System
   ========================================================================== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }

.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }

.max-w-md { max-width: 28rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-10 { padding-right: 2.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.ml-1 { margin-left: 0.25rem; }

.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

.sticky { position: sticky; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-0 { top: 0; }
.top-3 { top: 0.75rem; }
.top-3\.5 { top: 0.875rem; }
.left-3 { left: 0.75rem; }
.right-3 { right: 0.75rem; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

.text-white { color: #ffffff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }

.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-sky-600 { color: #0284c7; }
.text-sky-700 { color: #0369a1; }

.text-rose-500 { color: #f43f5e; }
.text-rose-600 { color: #e11d48; }

.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }

.bg-blue-50 { background-color: #eff6ff; }
.bg-sky-50 { background-color: #f0f9ff; }
.bg-rose-50 { background-color: #fff1f2; }
.bg-amber-50 { background-color: #fffbeb; }

.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-700 { border-color: #334155; }
.border-slate-800 { border-color: #1e293b; }
.border-blue-200 { border-color: #bfdbfe; }
.border-sky-200 { border-color: #bae6fd; }

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-blue-600 { --tw-gradient-from: #2563eb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0)); }
.to-sky-600 { --tw-gradient-to: #0284c7; }

.bg-clip-text { -webkit-background-clip: text; background-clip: text; }
.text-transparent { color: transparent; }

/* Responsive Media Queries */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .sm\:col-span-4 { grid-column: span 4 / span 4; }
  .sm\:col-span-8 { grid-column: span 8 / span 8; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:p-10 { padding: 2.5rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:col-span-5 { grid-column: span 5 / span 5; }
  .md\:col-span-7 { grid-column: span 7 / span 7; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Specific Container Styling for Pediatric and Adult Input Boxes */
#pediatric-inputs-section,
#adult-inputs-section,
.input-nested-box {
  background-color: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.85rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark #pediatric-inputs-section,
.dark #adult-inputs-section,
.dark .input-nested-box {
  background-color: #0b1329 !important;
  border-color: #1e293b !important;
}

.dark #pediatric-inputs-section label,
.dark #pediatric-inputs-section span,
.dark #adult-inputs-section label,
.dark #adult-inputs-section span,
.dark .input-nested-box label,
.dark .input-nested-box span {
  color: #f8fafc !important;
}

/* Comprehensive Dark Mode Background & Border Class Overrides */
.dark .dark\:bg-slate-900\/50,
.dark .dark\:bg-slate-900\/60,
.dark .dark\:bg-slate-900\/70,
.dark .dark\:bg-slate-900\/80,
.dark .dark\:bg-slate-900\/90,
.dark .dark\:bg-slate-900 {
  background-color: #0b1329 !important;
}

.dark .dark\:bg-slate-800 {
  background-color: #111d35 !important;
}

.dark .dark\:bg-slate-950 {
  background-color: #070d1e !important;
}

.dark .dark\:bg-sky-950\/40,
.dark .dark\:bg-sky-950 {
  background-color: #082845 !important;
}

.dark .dark\:bg-amber-950\/30,
.dark .dark\:bg-amber-950 {
  background-color: #3b2006 !important;
}

.dark .dark\:bg-rose-950\/40,
.dark .dark\:bg-rose-950 {
  background-color: #430c17 !important;
}

.dark .dark\:bg-blue-950\/40,
.dark .dark\:bg-blue-950 {
  background-color: #0a1f3d !important;
}

.dark .dark\:text-white { color: #ffffff !important; }
.dark .dark\:text-slate-100 { color: #f8fafc !important; }
.dark .dark\:text-slate-200 { color: #e2e8f0 !important; }
.dark .dark\:text-slate-300 { color: #cbd5e1 !important; }
.dark .dark\:text-slate-400 { color: #94a3b8 !important; }
.dark .dark\:text-sky-200 { color: #bae6fd !important; }
.dark .dark\:text-sky-300 { color: #7dd3fc !important; }
.dark .dark\:text-sky-400 { color: #38bdf8 !important; }

.dark .dark\:border-slate-700 { border-color: #243552 !important; }
.dark .dark\:border-slate-800 { border-color: #243552 !important; }
.dark .dark\:border-sky-800 { border-color: #0369a1 !important; }
