/* ==========================================
   CLINIQO - Enterprise Medical SaaS Platform
   Complete Design System & Global Styles
   ========================================== */

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

/* ======= CSS VARIABLES / DESIGN TOKENS ======= */
:root {
  /* Primary Brand 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: #1e3a8a;

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

  /* Emerald */
  --emerald-50: #ecfdf5;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;

  /* Amber */
  --amber-50: #fffbeb;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;

  /* Rose/Red */
  --rose-50: #fff1f2;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;

  /* Purple */
  --purple-50: #faf5ff;
  --purple-500: #a855f7;
  --purple-600: #9333ea;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Typography */
  --font-sans: 'Inter', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-arabic: 'Cairo', 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

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

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.35);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Background */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;

  /* Text */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;

  /* Borders */
  --border-color: #e5e7eb;
  --border-color-strong: #d1d5db;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --header-height: 64px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --border-color: #334155;
  --border-color-strong: #475569;
}

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

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

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

/* Arabic RTL */
[lang="ar"], .rtl { 
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
}

/* ======= TYPOGRAPHY ======= */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }
p { color: var(--text-secondary); line-height: 1.7; }
a { color: var(--primary-600); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-700); }
img { max-width: 100%; height: auto; display: block; }
ul,ol { padding-left: 1.5em; }
button { cursor: pointer; font-family: inherit; }
input,textarea,select { font-family: inherit; }

/* ======= LAYOUT ======= */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 960px; }
.container-lg { max-width: 1440px; }

/* Grid System */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; } .gap-8 { gap: 32px; }

/* ======= APP SHELL ======= */
.app-shell { display: flex; min-height: 100vh; background: var(--bg-secondary); }

/* ======= SIDEBAR ======= */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: width var(--transition-base), transform var(--transition-base);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed-width); }

.sidebar-logo {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-height);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.logo-icon svg { color: white; width: 22px; height: 22px; }

.logo-text { overflow: hidden; white-space: nowrap; }
.logo-text h2 { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.logo-text span { font-size: 0.7rem; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* Sidebar Navigation */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

.nav-section { margin-bottom: 24px; }
.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 12px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 2px;
  position: relative;
  text-decoration: none;
}

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

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-50), var(--teal-50));
  color: var(--primary-600);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(135deg, var(--primary-500), var(--teal-500));
  border-radius: 0 3px 3px 0;
}

.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--rose-500);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border-color);
}

/* ======= MAIN CONTENT ======= */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-base);
}

/* ======= TOP HEADER ======= */
.top-header {
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

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

.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  width: 16px;
  height: 16px;
}

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

.header-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.header-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.header-btn .notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--rose-500);
  border-radius: 50%;
  border: 2px solid white;
}

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-400), var(--teal-400));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast);
}
.user-avatar:hover { border-color: var(--primary-400); }

/* ======= PAGE CONTENT ======= */
.page-content { flex: 1; padding: 24px; }

.page-header {
  margin-bottom: 24px;
}

.page-header h1 { font-size: 1.75rem; font-weight: 800; }
.page-header p { color: var(--text-secondary); margin-top: 4px; font-size: 0.9rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.breadcrumb .sep { color: var(--border-color-strong); }
.breadcrumb span:last-child { color: var(--text-secondary); font-weight: 500; }

/* ======= CARDS ======= */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: box-shadow var(--transition-fast);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-sm { padding: 16px; border-radius: var(--radius-lg); }
.card-lg { padding: 32px; border-radius: var(--radius-2xl); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

/* ======= STAT CARDS ======= */
.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.stat-card.blue::before { background: linear-gradient(90deg, var(--primary-500), var(--primary-400)); }
.stat-card.teal::before { background: linear-gradient(90deg, var(--teal-500), var(--teal-400)); }
.stat-card.emerald::before { background: linear-gradient(90deg, var(--emerald-500), var(--emerald-400)); }
.stat-card.amber::before { background: linear-gradient(90deg, var(--amber-500), var(--amber-400)); }
.stat-card.rose::before { background: linear-gradient(90deg, var(--rose-500), var(--rose-400)); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple-500), #c084fc); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-50); color: var(--primary-600); }
.stat-icon.teal { background: var(--teal-50); color: var(--teal-600); }
.stat-icon.emerald { background: var(--emerald-50); color: var(--emerald-600); }
.stat-icon.amber { background: var(--amber-50); color: var(--amber-500); }
.stat-icon.rose { background: var(--rose-50); color: var(--rose-500); }
.stat-icon.purple { background: var(--purple-50); color: var(--purple-600); }

.stat-body { flex: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 6px; }
.stat-change { font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.stat-change.up { color: var(--emerald-600); }
.stat-change.down { color: var(--rose-500); }
.stat-change.neutral { color: var(--text-tertiary); }

/* ======= BUTTONS ======= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* Button Sizes */
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: var(--radius-sm); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 14px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }

/* Button Variants */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-700), var(--primary-600)); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4); transform: translateY(-1px); }

.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--bg-tertiary); border-color: var(--border-color-strong); }

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

.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-danger { background: var(--rose-500); color: white; box-shadow: 0 2px 8px rgba(244, 63, 94, 0.3); }
.btn-danger:hover { background: var(--rose-600); }

.btn-success { background: var(--emerald-500); color: white; }
.btn-success:hover { background: var(--emerald-600); }

.btn-teal { background: linear-gradient(135deg, var(--teal-600), var(--teal-500)); color: white; box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3); }
.btn-teal:hover { background: linear-gradient(135deg, var(--teal-700), var(--teal-600)); }

/* ======= FORMS ======= */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.form-label .required { color: var(--rose-500); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus { border-color: var(--primary-400); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.form-control::placeholder { color: var(--text-tertiary); }
.form-control:disabled { background: var(--bg-secondary); opacity: 0.6; cursor: not-allowed; }

.form-control.error { border-color: var(--rose-400); }
.form-control.success { border-color: var(--emerald-400); }

.form-hint { font-size: 0.75rem; color: var(--text-tertiary); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--rose-500); margin-top: 4px; font-weight: 500; }

.input-group { position: relative; }
.input-group .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); width: 16px; height: 16px; }
.input-group .form-control { padding-left: 38px; }
.input-group .input-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); font-size: 0.8rem; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ======= TABLES ======= */
.table-container { overflow-x: auto; border-radius: var(--radius-xl); border: 1px solid var(--border-color); }

.data-table { width: 100%; border-collapse: collapse; background: var(--bg-primary); }
.data-table thead { background: var(--bg-secondary); }
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tbody tr:hover { background: var(--bg-secondary); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ======= BADGES / CHIPS ======= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-blue { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-200); }
.badge-teal { background: var(--teal-50); color: var(--teal-700); border: 1px solid var(--teal-100); }
.badge-emerald { background: var(--emerald-50); color: var(--emerald-600); border: 1px solid #a7f3d0; }
.badge-amber { background: var(--amber-50); color: #b45309; border: 1px solid #fde68a; }
.badge-rose { background: var(--rose-50); color: var(--rose-600); border: 1px solid #fecdd3; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.badge-purple { background: var(--purple-50); color: var(--purple-600); border: 1px solid #e9d5ff; }

/* Status badges */
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.status-dot.active { background: var(--emerald-500); box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
.status-dot.waiting { background: var(--amber-500); }
.status-dot.completed { background: var(--primary-500); }
.status-dot.cancelled { background: var(--rose-500); }
.status-dot.inactive { background: var(--gray-400); }

/* ======= MODALS ======= */
.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;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-sm { max-width: 420px; }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 960px; }

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 12px; justify-content: flex-end; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* ======= TABS ======= */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-color); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--primary-600); border-bottom-color: var(--primary-500); }

/* ======= TIMELINE ======= */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: var(--border-color); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-dot {
  position: absolute;
  left: -23px;
  top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--primary-200);
}
.timeline-content { font-size: 0.875rem; }
.timeline-time { font-size: 0.75rem; color: var(--text-tertiary); margin-top: 2px; }

/* ======= ALERTS ======= */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-info { background: var(--primary-50); color: var(--primary-800); border: 1px solid var(--primary-200); }
.alert-success { background: var(--emerald-50); color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning { background: var(--amber-50); color: #92400e; border: 1px solid #fde68a; }
.alert-danger { background: var(--rose-50); color: #9f1239; border: 1px solid #fecdd3; }

/* ======= PATIENT CARD ======= */
.patient-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.patient-card:hover { border-color: var(--primary-300); box-shadow: var(--shadow-md); }

.patient-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-400), var(--teal-400));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.patient-info h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.patient-info p { font-size: 0.75rem; color: var(--text-secondary); }
.patient-meta { margin-left: auto; text-align: right; }
.patient-meta .mrn { font-size: 0.7rem; color: var(--text-tertiary); font-weight: 600; background: var(--bg-secondary); padding: 2px 7px; border-radius: var(--radius-sm); }

/* ======= APPOINTMENT SLOT ======= */
.time-slot {
  padding: 8px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  background: var(--bg-primary);
}

.time-slot:hover { border-color: var(--primary-400); background: var(--primary-50); color: var(--primary-600); }
.time-slot.selected { background: var(--primary-500); color: white; border-color: var(--primary-500); }
.time-slot.booked { background: var(--bg-secondary); color: var(--text-tertiary); cursor: not-allowed; text-decoration: line-through; }
.time-slot.available { border-color: var(--emerald-300); color: var(--emerald-600); }

/* ======= CALENDAR ======= */
.mini-calendar { background: var(--bg-primary); border-radius: var(--radius-xl); padding: 16px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calendar-header h4 { font-size: 0.9rem; font-weight: 700; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-day-label { font-size: 0.65rem; font-weight: 700; color: var(--text-tertiary); text-align: center; padding: 4px; text-transform: uppercase; }
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
}
.calendar-day:hover { background: var(--primary-50); color: var(--primary-600); }
.calendar-day.today { background: var(--primary-500); color: white; font-weight: 700; }
.calendar-day.has-appt { position: relative; }
.calendar-day.has-appt::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: var(--teal-500); border-radius: 50%; }
.calendar-day.other-month { color: var(--text-tertiary); }

/* ======= NOTIFICATIONS ======= */
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
}

.notif-header { padding: 16px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.notif-title { font-size: 0.9rem; font-weight: 700; }

.notif-item {
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.notif-item:hover { background: var(--bg-secondary); }
.notif-item.unread { background: var(--primary-50); }

.notif-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-body h5 { font-size: 0.8rem; font-weight: 600; margin-bottom: 2px; }
.notif-body p { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }
.notif-time { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 3px; }

/* ======= CHARTS (CSS only) ======= */
.progress-bar { height: 6px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--primary-500), var(--teal-400)); transition: width 0.6s ease; }
.progress-fill.success { background: linear-gradient(90deg, var(--emerald-500), var(--teal-400)); }
.progress-fill.warning { background: linear-gradient(90deg, var(--amber-500), #fcd34d); }
.progress-fill.danger { background: linear-gradient(90deg, var(--rose-500), #fb7185); }

/* Donut chart placeholder */
.donut { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.donut-center { position: absolute; text-align: center; }

/* ======= SCROLLBAR ======= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-color-strong); }

/* ======= ANIMATIONS ======= */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes bounce-in { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.9); } 100% { transform: scale(1); opacity: 1; } }

.animate-fade { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.3s ease; }
.animate-slide-right { animation: slideRight 0.3s ease; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-bounce-in { animation: bounce-in 0.5s ease; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ======= TOOLTIP ======= */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: white;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 1000;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ======= DROPDOWN ======= */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--bg-secondary); }
.dropdown-item.danger { color: var(--rose-500); }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 4px 0; }

/* ======= AI CHAT ======= */
.ai-chat { display: flex; flex-direction: column; height: 100%; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-message { display: flex; gap: 10px; max-width: 85%; animation: slideUp 0.2s ease; }
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
}
.chat-message.assistant .chat-bubble { background: var(--bg-secondary); color: var(--text-primary); border-bottom-left-radius: 4px; }
.chat-message.user .chat-bubble { background: linear-gradient(135deg, var(--primary-600), var(--primary-500)); color: white; border-bottom-right-radius: 4px; }

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.chat-input-area textarea {
  flex: 1;
  resize: none;
  max-height: 120px;
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.chat-input-area textarea:focus { border-color: var(--primary-400); }

/* ======= VITAL SIGNS ======= */
.vital-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
}
.vital-label { font-size: 0.7rem; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.vital-value { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.vital-unit { font-size: 0.7rem; color: var(--text-secondary); font-weight: 500; }
.vital-status { font-size: 0.7rem; margin-top: 4px; font-weight: 600; }
.vital-status.normal { color: var(--emerald-600); }
.vital-status.high { color: var(--rose-500); }
.vital-status.low { color: var(--amber-500); }

/* ======= EMR - Medical Record ======= */
.soap-section {
  border-left: 3px solid var(--border-color);
  padding-left: 16px;
  margin-bottom: 20px;
}
.soap-section.subjective { border-color: var(--primary-400); }
.soap-section.objective { border-color: var(--teal-400); }
.soap-section.assessment { border-color: var(--amber-400); }
.soap-section.plan { border-color: var(--emerald-400); }

.soap-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.soap-section.subjective .soap-label { color: var(--primary-600); }
.soap-section.objective .soap-label { color: var(--teal-600); }
.soap-section.assessment .soap-label { color: var(--amber-500); }
.soap-section.plan .soap-label { color: var(--emerald-600); }

/* ======= QUEUE DISPLAY ======= */
.queue-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-600);
  line-height: 1;
  letter-spacing: -2px;
}
.queue-card {
  background: linear-gradient(135deg, var(--primary-600), var(--teal-600));
  color: white;
  border-radius: var(--radius-2xl);
  padding: 24px;
  text-align: center;
}
.queue-card .queue-number { color: white; font-size: 4rem; }

/* ======= PRESCRIPTION ======= */
.rx-header { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 800; color: var(--primary-600); margin-bottom: 16px; }
.drug-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border-color); }

/* ======= INVOICE ======= */
.invoice-header { background: linear-gradient(135deg, var(--primary-700), var(--teal-600)); color: white; padding: 32px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.invoice-table thead th { background: var(--bg-secondary); }

/* ======= FINANCIAL CHART ======= */
.sparkline { display: flex; align-items: flex-end; gap: 4px; height: 50px; }
.sparkline-bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--primary-200); transition: background var(--transition-fast); }
.sparkline-bar.active { background: var(--primary-500); }
.sparkline-bar:hover { background: var(--primary-400); }

/* ======= RESPONSIVE ======= */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .page-content { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 10px 12px; }
  .top-header { padding: 0 16px; }
  .header-search { display: none; }
  .modal { max-width: 100%; margin: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
}

/* ======= WEBSITE (Public) ======= */
.website-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.website-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 32px;
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 50%, #faf5ff 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -200px; left: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

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

.feature-icon-box {
  width: 52px; height: 52px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

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

/* ======= DARK MODE ======= */
[data-theme="dark"] .website-header { background: rgba(15, 23, 42, 0.95); border-color: var(--border-color); }
[data-theme="dark"] .hero-section { background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e1b4b 100%); }
[data-theme="dark"] .card, [data-theme="dark"] .stat-card { background: var(--bg-primary); border-color: var(--border-color); }
[data-theme="dark"] .sidebar { background: var(--bg-primary); border-color: var(--border-color); }
[data-theme="dark"] .top-header { background: var(--bg-primary); border-color: var(--border-color); }
[data-theme="dark"] .nav-item:hover { background: rgba(59, 130, 246, 0.1); }
[data-theme="dark"] .nav-item.active { background: rgba(59, 130, 246, 0.12); }
[data-theme="dark"] .data-table thead { background: var(--bg-secondary); }
[data-theme="dark"] .data-table tbody tr:hover { background: var(--bg-secondary); }
[data-theme="dark"] .form-control { background: var(--bg-secondary); border-color: var(--border-color); color: var(--text-primary); }
[data-theme="dark"] .glass-card { background: rgba(30, 41, 59, 0.85); border-color: rgba(71, 85, 105, 0.5); }

/* ======= PRINT ======= */
@media print {
  .sidebar, .top-header, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ======= UTILITY CLASSES ======= */
.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.875rem; } .text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; } .font-extrabold { font-weight: 800; }
.text-primary-c { color: var(--primary-600); } .text-teal { color: var(--teal-600); }
.text-success { color: var(--emerald-600); } .text-warning { color: var(--amber-500); }
.text-danger { color: var(--rose-500); } .text-muted { color: var(--text-secondary); }
.text-center { text-align: center; } .text-right { text-align: right; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-6 { padding: 24px; }
.rounded { border-radius: var(--radius-md); } .rounded-lg { border-radius: var(--radius-lg); } .rounded-full { border-radius: 9999px; }
.w-full { width: 100%; } .h-full { height: 100%; }
.hidden { display: none; } .invisible { visibility: hidden; }
.overflow-hidden { overflow: hidden; } .overflow-auto { overflow: auto; }
.relative { position: relative; } .absolute { position: absolute; }
.border { border: 1px solid var(--border-color); }
.opacity-50 { opacity: 0.5; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cursor-pointer { cursor: pointer; }

/* ======= SPECIAL COMPONENTS ======= */
.divider { height: 1px; background: var(--border-color); margin: 20px 0; }
.divider-text { display: flex; align-items: center; gap: 12px; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }
.divider-text span { font-size: 0.75rem; color: var(--text-tertiary); font-weight: 500; white-space: nowrap; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 500; color: var(--text-secondary); }

.count-chip { min-width: 20px; height: 20px; border-radius: 10px; background: var(--primary-500); color: white; font-size: 0.65rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ======= LANDING PAGE SPECIFIC ======= */
.section { padding: 80px 0; }
.section-label { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary-600); background: var(--primary-50); padding: 6px 14px; border-radius: var(--radius-full); margin-bottom: 16px; border: 1px solid var(--primary-100); }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.section-desc { font-size: 1rem; color: var(--text-secondary); max-width: 540px; line-height: 1.7; }

.feature-card {
  padding: 28px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  transition: all var(--transition-base);
}
.feature-card:hover { border-color: var(--primary-200); box-shadow: 0 8px 30px rgba(59, 130, 246, 0.1); transform: translateY(-3px); }

.pricing-card { background: var(--bg-primary); border: 2px solid var(--border-color); border-radius: var(--radius-2xl); padding: 32px; transition: all var(--transition-base); }
.pricing-card.popular { border-color: var(--primary-500); position: relative; }
.pricing-card.popular::before { content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary-500); color: white; font-size: 0.7rem; font-weight: 700; padding: 4px 14px; border-radius: 9999px; }
.pricing-price { font-size: 2.5rem; font-weight: 900; }
.pricing-currency { font-size: 1rem; font-weight: 600; vertical-align: super; color: var(--text-secondary); }
.pricing-period { font-size: 0.875rem; color: var(--text-secondary); }
.pricing-features { list-style: none; padding: 0; margin: 20px 0; }
.pricing-features li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.875rem; }

/* Doctor card */
.doctor-card { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-2xl); overflow: hidden; transition: all var(--transition-base); }
.doctor-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.doctor-avatar-wrap { height: 200px; background: linear-gradient(135deg, var(--primary-50), var(--teal-50)); display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.doctor-info { padding: 20px; }
.doctor-speciality { font-size: 0.8rem; color: var(--primary-600); font-weight: 600; margin-bottom: 4px; }
.doctor-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.doctor-rating { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--amber-500); font-weight: 600; }
.doctor-stats { display: flex; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-color); }
.doctor-stat { font-size: 0.75rem; }
.doctor-stat span { display: block; font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }

/* ======= SUPER ADMIN ======= */
.tenant-card { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 20px; transition: all var(--transition-fast); }
.tenant-card:hover { border-color: var(--primary-300); box-shadow: var(--shadow-md); }

/* ======= LOADING STATES ======= */
.page-loader { display: flex; align-items: center; justify-content: center; min-height: 300px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border-color); border-top-color: var(--primary-500); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.empty-state p { font-size: 0.875rem; color: var(--text-secondary); max-width: 280px; margin: 0 auto; }

/* ======= MOBILE APP PREVIEW ======= */
.phone-mockup {
  width: 260px;
  height: 520px;
  background: var(--gray-900);
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255,255,255,0.1);
  position: relative;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}
.phone-notch {
  width: 100px;
  height: 24px;
  background: var(--gray-900);
  border-radius: 0 0 16px 16px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* ======= SECURE BADGE ======= */
.security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--emerald-50);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: #065f46;
}

/* section bg */
.bg-primary-c { background: var(--bg-primary); }
.bg-secondary-c { background: var(--bg-secondary); }
.bg-gradient-brand { background: linear-gradient(135deg, var(--primary-600) 0%, var(--teal-600) 100%); }
.bg-gradient-subtle { background: linear-gradient(135deg, var(--primary-50) 0%, var(--teal-50) 50%, var(--purple-50) 100%); }

/* ======= PAGINATION ======= */
.pagination { display: flex; align-items: center; gap: 6px; }
.page-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); color: var(--text-secondary); background: var(--bg-primary); }
.page-btn:hover { border-color: var(--primary-400); color: var(--primary-600); background: var(--primary-50); }
.page-btn.active { background: var(--primary-500); color: white; border-color: var(--primary-500); }

/* ======= FOOTER ======= */
.website-footer { background: var(--gray-900); color: var(--gray-400); padding: 60px 0 30px; }
.footer-brand h2 { color: white; font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.footer-links h4 { color: white; font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--gray-400); font-size: 0.85rem; text-decoration: none; transition: color var(--transition-fast); }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid var(--gray-800); margin-top: 40px; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; }

/* ======= AI TYPING INDICATOR ======= */
.typing-indicator { display: flex; align-items: center; gap: 4px; padding: 10px 14px; background: var(--bg-secondary); border-radius: var(--radius-lg); width: fit-content; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-tertiary); animation: bounce-typing 1.4s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce-typing { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
