/* ============================================================
   HemoLinker – Main Design System & Style Sheet
   A premium healthcare startup aesthetic
   ============================================================ */

/* -------------------------------------------------------
   1. GOOGLE FONTS IMPORT
   ------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* -------------------------------------------------------
   2. CSS CUSTOM PROPERTIES (Design Tokens)
   ------------------------------------------------------- */
:root {
  /* Primary Brand Colors */
  --clr-primary:       #c0392b;
  --clr-primary-dark:  #96281b;
  --clr-primary-light: #e74c3c;
  --clr-primary-soft:  rgba(192, 57, 43, 0.1);
  --clr-primary-glow:  rgba(192, 57, 43, 0.25);

  /* Neutral Palette */
  --clr-bg:            #f8f9fc;
  --clr-bg-alt:        #ffffff;
  --clr-surface:       #ffffff;
  --clr-surface-2:     #f1f3f8;
  --clr-border:        #e2e8f0;
  --clr-border-light:  #f0f4fa;

  /* Text Colors */
  --clr-text:          #1a202c;
  --clr-text-2:        #4a5568;
  --clr-text-3:        #718096;
  --clr-text-inv:      #ffffff;

  /* Status Colors */
  --clr-success:       #27ae60;
  --clr-success-soft:  rgba(39, 174, 96, 0.1);
  --clr-warning:       #f39c12;
  --clr-warning-soft:  rgba(243, 156, 18, 0.1);
  --clr-danger:        #e74c3c;
  --clr-danger-soft:   rgba(231, 76, 60, 0.1);
  --clr-info:          #3498db;
  --clr-info-soft:     rgba(52, 152, 219, 0.1);

  /* Urgency Colors */
  --clr-critical:      #c0392b;
  --clr-high:          #e67e22;
  --clr-medium:        #f1c40f;
  --clr-normal:        #27ae60;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 25px rgba(0,0,0,.08), 0 10px 10px rgba(0,0,0,.04);
  --shadow-2xl: 0 25px 50px rgba(0,0,0,.12);
  --shadow-red: 0 4px 20px rgba(192, 57, 43, 0.3);

  /* Border Radius */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;
  --radius-full:9999px;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Typography */
  --font-primary:   'Inter', sans-serif;
  --font-display:   'Plus Jakarta Sans', sans-serif;

  /* Transitions */
  --transition-fast:   all 0.15s ease;
  --transition-normal: all 0.25s ease;
  --transition-slow:   all 0.4s ease;
  --transition-bounce: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Nav height */
  --nav-height: 72px;

  /* Glassmorphism */
  --glass-bg:     rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur:   blur(16px);
}

/* Dark Mode */
[data-theme="dark"] {
  --clr-bg:           #0f1117;
  --clr-bg-alt:       #161b27;
  --clr-surface:      #1a2035;
  --clr-surface-2:    #1f2744;
  --clr-border:       #2d3748;
  --clr-border-light: #252f44;
  --clr-text:         #f0f4ff;
  --clr-text-2:       #a0aec0;
  --clr-text-3:       #718096;
  --clr-text-inv:     #ffffff;
  --shadow-md:  0 4px 6px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.2);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.4), 0 4px 6px rgba(0,0,0,.3);
  --shadow-xl:  0 20px 25px rgba(0,0,0,.5), 0 10px 10px rgba(0,0,0,.3);
  --glass-bg:     rgba(26, 32, 53, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
}

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

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

body {
  font-family: var(--font-primary);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* -------------------------------------------------------
   4. NAVIGATION
   ------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition-normal);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
  background: var(--clr-surface);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--clr-primary);
  text-decoration: none;
}

.nav-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  box-shadow: var(--shadow-red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-2);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--clr-primary);
  background: var(--clr-primary-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.btn-nav-login {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border);
  transition: var(--transition-fast);
}

.btn-nav-login:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}

.btn-nav-register {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  color: white;
  box-shadow: var(--shadow-red);
  transition: var(--transition-bounce);
}

.btn-nav-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(192, 57, 43, 0.4);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  cursor: pointer;
}
.nav-toggle span {
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: var(--transition-normal);
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--clr-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition-fast);
  border: 1px solid var(--clr-border);
}
.theme-toggle:hover {
  background: var(--clr-primary-soft);
  border-color: var(--clr-primary);
}

/* -------------------------------------------------------
   5. HERO SECTION
   ------------------------------------------------------- */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-height);
  background: linear-gradient(
    135deg,
    var(--clr-bg) 0%,
    #fff5f5 50%,
    var(--clr-bg) 100%
  );
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .hero {
  background: linear-gradient(
    135deg,
    var(--clr-bg) 0%,
    #1a0a0a 50%,
    var(--clr-bg) 100%
  );
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(192, 57, 43, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(192, 57, 43, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-20) var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--clr-primary-soft);
  border: 1px solid rgba(192, 57, 43, 0.2);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-primary);
  margin-bottom: var(--space-6);
  animation: fadeInDown 0.6s ease;
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--clr-text);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.7s ease;
}

.hero-title span {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--clr-text-2);
  max-width: 520px;
  margin-bottom: var(--space-10);
  line-height: 1.8;
  animation: fadeInUp 0.8s ease;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  animation: fadeInUp 0.9s ease;
}

.hero-stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-12);
  animation: fadeInUp 1s ease;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--clr-primary);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--clr-text-3);
  margin-top: 2px;
  font-weight: 500;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  animation: fadeInRight 0.9s ease;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.hero-card {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--clr-border);
}

.hero-card-secondary {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 200px;
  transform: rotate(4deg);
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-2xl);
  animation: float 4s ease-in-out infinite;
}

.hero-card-tertiary {
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 180px;
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--clr-border);
  animation: float 4s ease-in-out infinite 2s;
}

/* -------------------------------------------------------
   6. BUTTONS
   ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-primary);
  transition: var(--transition-bounce);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  color: white;
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(192, 57, 43, 0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--clr-surface);
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--clr-surface-2);
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border: 1.5px solid var(--clr-primary);
}

.btn-outline:hover {
  background: var(--clr-primary-soft);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text-2);
}

.btn-ghost:hover {
  background: var(--clr-surface-2);
  color: var(--clr-text);
}

.btn-danger {
  background: var(--clr-danger);
  color: white;
}
.btn-danger:hover {
  background: #c0392b;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--clr-success);
  color: white;
}
.btn-success:hover { opacity: 0.9; }

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* -------------------------------------------------------
   7. CARDS
   ------------------------------------------------------- */
.card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
}

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

.card-body { padding: var(--space-6); }
.card-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--clr-border);
  background: var(--clr-surface-2);
}

/* Stat Card */
.stat-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-primary-light));
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--clr-text);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--clr-text-3);
  margin-top: var(--space-1);
  font-weight: 500;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: var(--space-2);
}

.stat-change.up   { color: var(--clr-success); }
.stat-change.down { color: var(--clr-danger); }

/* Blood Group Card */
.blood-group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  color: white;
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--font-display);
  box-shadow: var(--shadow-red);
}

/* -------------------------------------------------------
   8. SECTIONS
   ------------------------------------------------------- */
.section {
  padding: var(--space-24) var(--space-6);
}

.section-alt {
  background: var(--clr-surface-2);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--clr-text);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--clr-text-2);
  max-width: 560px;
  line-height: 1.8;
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

/* -------------------------------------------------------
   9. HOW IT WORKS
   ------------------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 2px;
  background: linear-gradient(90deg, var(--clr-primary), transparent);
  z-index: 0;
}

.step-card {
  text-align: center;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  position: relative;
  transition: var(--transition-normal);
}

.step-card:hover {
  border-color: var(--clr-primary-soft);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-red);
}

.step-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--clr-text);
  margin-bottom: var(--space-2);
}

.step-desc {
  font-size: 0.875rem;
  color: var(--clr-text-2);
  line-height: 1.6;
}

/* -------------------------------------------------------
   10. EMERGENCY REQUEST CARDS
   ------------------------------------------------------- */
.request-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  padding: var(--space-5);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.request-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.request-card.critical::before { background: var(--clr-critical); }
.request-card.high::before     { background: var(--clr-high); }
.request-card.medium::before   { background: var(--clr-medium); }
.request-card.normal::before   { background: var(--clr-normal); }

.request-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.urgency-badge.critical { background: rgba(192, 57, 43, 0.15); color: var(--clr-critical); }
.urgency-badge.high     { background: rgba(230, 126, 34, 0.15); color: var(--clr-high); }
.urgency-badge.medium   { background: rgba(241, 196, 15, 0.15); color: #d4a017; }
.urgency-badge.normal   { background: var(--clr-success-soft); color: var(--clr-success); }

/* -------------------------------------------------------
   11. FORMS
   ------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: var(--space-2);
}

.form-label span { color: var(--clr-primary); }

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text);
  font-size: 0.9rem;
  font-family: var(--font-primary);
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-glow);
}

.form-control::placeholder { color: var(--clr-text-3); }
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--clr-danger);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--clr-text-3);
  margin-top: var(--space-1);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .input-icon {
  position: absolute;
  left: var(--space-3);
  color: var(--clr-text-3);
  font-size: 1rem;
  pointer-events: none;
}

.input-group .form-control {
  padding-left: var(--space-10);
}

/* -------------------------------------------------------
   12. BADGES & STATUS INDICATORS
   ------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success  { background: var(--clr-success-soft);  color: var(--clr-success); }
.badge-warning  { background: var(--clr-warning-soft);  color: var(--clr-warning); }
.badge-danger   { background: var(--clr-danger-soft);   color: var(--clr-danger); }
.badge-info     { background: var(--clr-info-soft);     color: var(--clr-info); }
.badge-primary  { background: var(--clr-primary-soft);  color: var(--clr-primary); }
.badge-neutral  { background: var(--clr-surface-2);     color: var(--clr-text-3); }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.available     { background: var(--clr-success); animation: pulse 2s infinite; }
.status-dot.unavailable   { background: var(--clr-text-3); }
.status-dot.recently_donated { background: var(--clr-warning); }

/* -------------------------------------------------------
   13. TOAST NOTIFICATIONS
   ------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + var(--space-4));
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--clr-surface);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--clr-border);
  max-width: 380px;
  pointer-events: all;
  animation: slideInRight 0.35s ease, fadeOut 0.35s ease forwards var(--toast-duration, 3.65s);
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.toast.success::before { background: var(--clr-success); }
.toast.error::before   { background: var(--clr-danger); }
.toast.warning::before { background: var(--clr-warning); }
.toast.info::before    { background: var(--clr-info); }

.toast-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 600; font-size: 0.9rem; color: var(--clr-text); }
.toast-message { font-size: 0.8rem; color: var(--clr-text-2); margin-top: 2px; }
.toast-close {
  background: none;
  border: none;
  color: var(--clr-text-3);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s;
}
.toast-close:hover { color: var(--clr-text); }

/* -------------------------------------------------------
   14. MODAL
   ------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--clr-border);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition-bounce);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-body    { padding: var(--space-6); }
.modal-footer  {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--clr-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* -------------------------------------------------------
   15. LOADING STATES
   ------------------------------------------------------- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.spinner-dark {
  border-color: rgba(0,0,0,0.1);
  border-top-color: var(--clr-primary);
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--clr-surface-2) 25%,
    var(--clr-border) 50%,
    var(--clr-surface-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-4);
}

.page-loader .logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--clr-primary);
}

/* -------------------------------------------------------
   16. TABLE
   ------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: var(--clr-surface-2);
}

th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--clr-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--clr-border-light);
  color: var(--clr-text);
  vertical-align: middle;
}

tbody tr:hover { background: var(--clr-surface-2); }
tbody tr:last-child td { border-bottom: none; }

/* -------------------------------------------------------
   17. EMPTY STATE
   ------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: var(--space-2);
}

.empty-state-subtitle {
  font-size: 0.9rem;
  color: var(--clr-text-3);
  margin-bottom: var(--space-6);
}

/* -------------------------------------------------------
   18. FOOTER
   ------------------------------------------------------- */
.footer {
  background: var(--clr-text);
  color: rgba(255,255,255,0.7);
  padding: var(--space-16) var(--space-6) var(--space-6);
}

[data-theme="dark"] .footer {
  background: #0a0e18;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* -------------------------------------------------------
   19. AUTH PAGES
   ------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: linear-gradient(135deg, #fff5f5 0%, var(--clr-bg) 100%);
}

[data-theme="dark"] .auth-page {
  background: linear-gradient(135deg, #1a0a0a 0%, var(--clr-bg) 100%);
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1000px;
  width: 100%;
  background: var(--clr-surface);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--clr-border);
  overflow: hidden;
}

.auth-panel {
  padding: var(--space-12);
}

.auth-visual {
  background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-primary), #e74c3c);
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.auth-visual::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 250px;
  height: 250px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.auth-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

/* -------------------------------------------------------
   20. ANIMATIONS
   ------------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; pointer-events: none; }
}

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

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.2); }
}

@keyframes float {
  0%, 100% { transform: rotate(4deg) translateY(0); }
  50%       { transform: rotate(4deg) translateY(-12px); }
}

@keyframes float2 {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------
   21. UTILITY CLASSES
   ------------------------------------------------------- */
.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm  { font-size: 0.875rem; }
.text-xs  { font-size: 0.75rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-primary { color: var(--clr-primary); }
.text-muted   { color: var(--clr-text-3); }
.text-success { color: var(--clr-success); }
.text-danger  { color: var(--clr-danger); }
.text-warning { color: var(--clr-warning); }
.w-full  { width: 100%; }
.mt-auto { margin-top: auto; }
.mb-0    { margin-bottom: 0; }
.mb-4    { margin-bottom: var(--space-4); }
.mb-6    { margin-bottom: var(--space-6); }
.hidden  { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider {
  height: 1px;
  background: var(--clr-border);
  margin: var(--space-6) 0;
}
.cursor-pointer { cursor: pointer; }

/* Glassmorphism utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* -------------------------------------------------------
   22. SCROLLBAR
   ------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--clr-bg); }
::-webkit-scrollbar-thumb {
  background: var(--clr-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--clr-text-3); }

/* -------------------------------------------------------
   23. SELECTION
   ------------------------------------------------------- */
::selection {
  background: var(--clr-primary-soft);
  color: var(--clr-primary);
}

/* -------------------------------------------------------
   24. FOCUS VISIBLE
   ------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* -------------------------------------------------------
   25. BLOOD DONATION INFO CARDS
   ------------------------------------------------------- */
.info-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--clr-border);
  text-align: center;
  transition: var(--transition-normal);
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-primary-soft);
}

.info-card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
}

.info-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--clr-text);
  margin-bottom: var(--space-2);
}

.info-card-text {
  font-size: 0.875rem;
  color: var(--clr-text-2);
  line-height: 1.6;
}

/* -------------------------------------------------------
   26. CTA SECTION
   ------------------------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-primary), var(--clr-primary-light));
  padding: var(--space-20) var(--space-6);
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '🩸';
  position: absolute;
  font-size: 20rem;
  opacity: 0.03;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: var(--space-4);
}

.cta-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: var(--space-8);
  max-width: 500px;
  margin-inline: auto;
}

.btn-white {
  background: white;
  color: var(--clr-primary);
  font-weight: 700;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-lg);
  transition: var(--transition-bounce);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.btn-white:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* -------------------------------------------------------
   27. NOTIFICATION BELL
   ------------------------------------------------------- */
.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  transition: var(--transition-fast);
  cursor: pointer;
  font-size: 1rem;
}

.notif-bell:hover {
  background: var(--clr-primary-soft);
  border-color: var(--clr-primary);
}

.notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--clr-primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Final production UX pass
   ============================================================ */
:focus-visible { outline: 3px solid var(--clr-info); outline-offset: 3px; }
button:disabled, .btn:disabled { cursor: not-allowed; opacity: .62; }
[aria-live] { min-height: 1px; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.loading-overlay { position:fixed; inset:0; z-index:3000; display:grid; place-items:center; background:rgba(15,17,23,.45); backdrop-filter:blur(3px); }
.loading-panel { background:var(--clr-surface); border:1px solid var(--clr-border); border-radius:var(--radius-lg); box-shadow:var(--shadow-xl); padding:24px 28px; display:flex; align-items:center; gap:12px; font-weight:600; }
.spinner { width:20px; height:20px; border:3px solid var(--clr-border); border-top-color:var(--clr-primary); border-radius:50%; animation:hlspin .75s linear infinite; }
@keyframes hlspin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration:.001ms!important; animation-iteration-count:1!important; scroll-behavior:auto!important; transition-duration:.001ms!important; } }
