/* ============================================
   HOMECARE - Premium Healthcare Platform
   Shared Styles & Design System
   ============================================ */

/* CSS Variables - Healthcare Color Palette */
:root {
  /* Primary Colors */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a5f;
  --primary-950: #0f172a;

  /* Teal Accent */
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;

  /* Success */
  --success-50: #f0fdf4;
  --success-500: #22c55e;
  --success-600: #16a34a;

  /* Warning */
  --warning-50: #fffbeb;
  --warning-500: #f59e0b;

  /* Error */
  --error-50: #fef2f2;
  --error-500: #ef4444;

  /* Neutral */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  --gradient-teal: linear-gradient(135deg, var(--teal-500) 0%, var(--primary-600) 100%);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0d9488 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 20px rgba(59,130,246,0.3);
  --shadow-glow-teal: 0 0 20px rgba(20,184,166,0.3);

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

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.text-display {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.text-headline {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
}

.text-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--slate-500);
}

.text-small {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
}

.text-caption {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

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

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

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

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

@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

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

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.05); }
  28% { transform: scale(1); }
  42% { transform: scale(1.05); }
  70% { transform: scale(1); }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scale-in {
  animation: fadeInScale 0.4s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-soft {
  animation: pulse 2s ease-in-out infinite;
}

.animate-heartbeat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

/* Stagger Delays */
.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }
.stagger-5 { animation-delay: 0.5s; opacity: 0; }
.stagger-6 { animation-delay: 0.6s; opacity: 0; }

/* Scroll Animation Base */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   GLASSMORPHISM
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   PREMIUM CARDS
   ============================================ */
.card-premium {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-100);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card-premium:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-gradient {
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  color: white;
  overflow: hidden;
  position: relative;
}

.card-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-teal {
  background: var(--gradient-teal);
  color: white;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.4);
}

.btn-teal:hover {
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-600);
  border: 2px solid var(--primary-200);
}

.btn-outline:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
}

.btn-ghost {
  background: transparent;
  color: var(--slate-600);
}

.btn-ghost:hover {
  background: var(--slate-100);
  color: var(--slate-800);
}

.btn-white {
  background: white;
  color: var(--primary-700);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.badge-primary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge-success {
  background: var(--success-50);
  color: var(--success-600);
}

.badge-warning {
  background: var(--warning-50);
  color: #b45309;
}

.badge-error {
  background: var(--error-50);
  color: var(--error-500);
}

.badge-teal {
  background: var(--teal-100);
  color: var(--teal-600);
}

/* ============================================
   FORMS
   ============================================ */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: white;
  color: var(--slate-800);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: var(--slate-400);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

/* ============================================
   PROGRESS & STATUS
   ============================================ */
.progress-bar {
  height: 8px;
  background: var(--slate-200);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

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

.status-dot-online {
  background: var(--success-500);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.status-dot-away {
  background: var(--warning-500);
}

.status-dot-busy {
  background: var(--error-500);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--primary-500);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: slideDown 0.3s ease-out;
  font-size: 0.875rem;
}

.toast-success { border-left-color: var(--success-500); }
.toast-error { border-left-color: var(--error-500); }
.toast-warning { border-left-color: var(--warning-500); }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

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

/* ============================================
   TABS
   ============================================ */
.tabs-list {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--slate-100);
  border-radius: var(--radius-md);
}

.tab-btn {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-500);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex: 1;
  text-align: center;
}

.tab-btn:hover {
  color: var(--slate-700);
}

.tab-btn.active {
  background: white;
  color: var(--primary-600);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* ============================================
   ACCORDION
   ============================================ */
.accordion-item {
  border-bottom: 1px solid var(--slate-200);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--slate-800);
  transition: color var(--transition-fast);
}

.accordion-trigger:hover {
  color: var(--primary-600);
}

.accordion-icon {
  transition: transform var(--transition-base);
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.accordion-item.open .accordion-content {
  max-height: 500px;
  padding-bottom: 1rem;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar {
  width: 280px;
  height: 100vh;
  background: white;
  border-right: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: transform var(--transition-base);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--slate-100);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-600);
  transition: all var(--transition-fast);
  margin-bottom: 0.25rem;
}

.sidebar-nav-item:hover {
  background: var(--slate-100);
  color: var(--slate-800);
}

.sidebar-nav-item.active {
  background: var(--primary-50);
  color: var(--primary-600);
}

.sidebar-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--slate-100);
}

/* Sidebar collapsed on mobile */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0 !important;
  }
}

.main-content {
  margin-left: 280px;
  min-height: 100vh;
}

/* ============================================
   TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

.data-table td {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-100);
}

.data-table tr:hover td {
  background: var(--slate-50);
}

/* ============================================
   CALENDAR
   ============================================ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-day:hover {
  background: var(--slate-100);
}

.calendar-day.today {
  background: var(--primary-100);
  color: var(--primary-600);
  font-weight: 600;
}

.calendar-day.selected {
  background: var(--primary-600);
  color: white;
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-500);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--slate-200);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary-200);
}

/* ============================================
   CHARTS
   ============================================ */
.chart-container {
  position: relative;
  height: 300px;
}

.mini-chart {
  height: 60px;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

.avatar-lg {
  width: 64px;
  height: 64px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  margin-left: -0.5rem;
  border: 2px solid white;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* ============================================
   SEARCH & FILTERS
   ============================================ */
.search-bar {
  position: relative;
}

.search-bar input {
  padding-left: 2.5rem;
  width: 100%;
}

.search-bar svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--slate-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  border-color: var(--primary-300);
}

.filter-chip.active {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-700);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: var(--slate-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   CONFIRMATION DIALOG
   ============================================ */
.confirm-dialog {
  text-align: center;
  padding: 2rem;
}

.confirm-dialog-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--slate-600);
  transition: all var(--transition-fast);
}

.page-btn:hover {
  background: var(--slate-100);
}

.page-btn.active {
  background: var(--primary-600);
  color: white;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-100);
  transition: all var(--transition-base);
}

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

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

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin-top: 0.5rem;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.stat-change.up {
  color: var(--success-600);
}

.stat-change.down {
  color: var(--error-500);
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  color: white;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #2dd4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
  padding: 5rem 1rem;
}

@media (min-width: 640px) {
  .section {
    padding: 5rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 6rem 2rem;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
}

.section-title p {
  font-size: 1.125rem;
  color: var(--slate-500);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid-doctors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   SPECIALTY CARDS
   ============================================ */
.specialty-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--slate-100);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.specialty-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-teal);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.specialty-card:hover::before {
  transform: scaleX(1);
}

.specialty-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
}

.specialty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
}

/* ============================================
   DOCTOR CARDS
   ============================================ */
.doctor-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--slate-100);
  transition: all var(--transition-base);
}

.doctor-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.doctor-card-image {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.doctor-card-body {
  padding: 1.5rem;
}

.doctor-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #f59e0b;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-100);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 4rem;
  color: var(--primary-100);
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  color: #f59e0b;
  margin-bottom: 1rem;
}

/* ============================================
   ARTICLE CARDS
   ============================================ */
.article-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--slate-100);
  transition: all var(--transition-base);
}

.article-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.article-image {
  height: 200px;
  background: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-200) 100%);
  position: relative;
  overflow: hidden;
}

.article-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.375rem 0.875rem;
  background: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-600);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   WEBINAR CARD
   ============================================ */
.webinar-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.webinar-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 4rem 1rem 2rem;
}

.footer a {
  color: var(--slate-400);
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: white;
}

.footer h4 {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .section {
    padding: 3rem 1rem;
  }

  .text-display {
    font-size: 2rem;
  }

  .sidebar {
    width: 260px;
  }

  .grid-auto,
  .grid-doctors {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container-premium {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container-premium {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-premium {
    padding: 0 2rem;
  }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--teal-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-balance {
  text-wrap: balance;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gradient Border */
.gradient-border {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient-teal);
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
}

/* Hover lift effect */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Ring animation for live indicators */
@keyframes ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ring-animation::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--success-500);
  animation: ring 1.5s ease-out infinite;
}
