        /* ==========================================================================
   CUREXAL SPACE — CORE DESIGN SYSTEM & STYLING TOKENS
   Modern Hybrid Healthcare & Telehealth Operations
   ========================================================================== */

:root {
  /* Brand Core */
  --curexal-navy: #091322;
  --curexal-navy-light: #10223A;
  --curexal-teal: #0D9488;
  --curexal-teal-light: #E6F6F4;
  --curexal-teal-dark: #0B7268;
  --curexal-teal-accent: #14B8A6;
  --curexal-indigo: #4F46E5;
  --curexal-indigo-light: #EEF2FF;
  --curexal-cyan: #06B6D4;
  --curexal-cyan-light: #ECFEFF;
  --curexal-amber: #F59E0B;
  --curexal-amber-light: #FEF3C7;
  --curexal-emerald: #10B981;
  --curexal-emerald-light: #ECFDF5;
  --curexal-rose: #F43F5E;
  --curexal-rose-light: #FFF1F2;

  /* Neutrals */
  --bg-main: #F8FAFC;
  --surface-card: #FFFFFF;
  --surface-muted: #F1F5F9;
  --border-light: #E2E8F0;
  --border-subtle: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-faint: #94A3B8;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.font-mono-code {
  font-family: var(--font-mono);
}

/* Glassmorphism & Elevated Panels */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-dark-panel {
  background: rgba(9, 19, 34, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Interactive Card Elevation */
.hover-lift {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
}


/* Form Controls (using :where to allow utility classes like pl-10 to override gracefully) */
:where(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="search"],
  select,
  textarea
) {
  font-family: inherit;
  font-size: 0.8125rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-light);
  padding: 0.5625rem 0.875rem;
  width: 100%;
  background-color: #FFFFFF;
  color: var(--text-primary);
  transition: all 0.15s ease-in-out;
}

:where(input:focus, select:focus, textarea:focus) {
  outline: none;
  border-color: var(--curexal-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
}

:where(input::placeholder, textarea::placeholder) {
  color: #94A3B8;
  font-size: 0.8125rem;
}

/* Bulletproof Input Icon Alignment */
.curexal-input-leading-icon {
  padding-left: 2.75rem !important; /* 44px ensures text never overlaps 16px icon */
}

.curexal-input-trailing-icon {
  padding-right: 2.75rem !important; /* 44px ensures text never overlaps trailing button */
}

/* 100vh Layout Constraint */
.auth-viewport-fixed {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* Table Styling */
.curexal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.curexal-table th {
  padding: 0.75rem 1.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.curexal-table td {
  padding: 0.9375rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-primary);
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.curexal-table tr:hover td {
  background-color: #FAFCFE;
}

/* Status Badges */
.badge-active {
  background-color: var(--curexal-emerald-light);
  color: #047857;
  border: 1px solid #A7F3D0;
}

.badge-pending {
  background-color: var(--curexal-amber-light);
  color: #B45309;
  border: 1px solid #FDE68A;
}

.badge-suspended {
  background-color: var(--curexal-rose-light);
  color: #BE123C;
  border: 1px solid #FECDD3;
}

.badge-facility-physical {
  background-color: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.badge-facility-virtual {
  background-color: #F5F3FF;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

/* Pulsing Status Dot */
.pulse-indicator {
  position: relative;
  display: inline-flex;
  height: 8px;
  width: 8px;
}

.pulse-indicator .ping {
  position: absolute;
  display: inline-flex;
  height: 100%;
  width: 100%;
  border-radius: 9999px;
  opacity: 0.75;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-indicator .dot {
  position: relative;
  display: inline-flex;
  border-radius: 9999px;
  height: 8px;
  width: 8px;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Button Accents */
.btn-curexal-primary {
  background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 0.625rem;
  padding: 0.5rem 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(13, 148, 136, 0.2);
  transition: all 0.15s ease-in-out;
}

.btn-curexal-primary:hover {
  background: linear-gradient(135deg, #0F766E 0%, #115E59 100%);
  box-shadow: 0 4px 12px -2px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.btn-curexal-secondary {
  background: #FFFFFF;
  color: var(--text-primary);
  font-weight: 600;
  border: 1px solid var(--border-light);
  border-radius: 0.625rem;
  padding: 0.5rem 1rem;
  transition: all 0.15s ease-in-out;
}

.btn-curexal-secondary:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

/* Care Journey Stage Step Indicator */
.journey-track {
  display: flex;
  align-items: center;
  position: relative;
}

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.journey-connector {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 2px;
  background: #E2E8F0;
  z-index: 0;
}

/* Cloaking */
[x-cloak] {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
