/* ============================================================
   Medix - COMPLETE STYLESHEET
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --blue: #1a73e8;
  --blue-dark: #1557b0;
  --blue-light: #e8f0fe;
  --blue-mid: #4a90d9;
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  --green: #16a34a;
  --green-light: #dcfce7;
  --orange: #ea580c;
  --orange-light: #fff7ed;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --red: #dc2626;
  --red-light: #fee2e2;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: "Inter", sans-serif;
  --font-heading: "Poppins", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
}
input,
select,
textarea,
button {
  font-family: var(--font-main);
}

/* ---------- Page System ---------- */

/* الـ CSS المطلوب لتشغيل الفنكشن */
.page {
  display: none;
  animation: fadeIn 0.4s ease-in-out; /* حركة خفيفة وقت التبديل */
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ---------- Container ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.logo-icon.large {
  width: 64px;
  height: 64px;
  font-size: 28px;
  border-radius: var(--radius-md);
}

.logo-icon.small {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.logo-icon.teal {
  background: linear-gradient(135deg, var(--teal), #0a7a6e);
}
.logo-icon.orange {
  background: linear-gradient(135deg, var(--orange), #c2410c);
}
.teal-icon {
  background: linear-gradient(135deg, var(--teal), #0a7a6e) !important;
}
.orange-icon {
  background: linear-gradient(135deg, var(--orange), #c2410c) !important;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--gray-800);
}
.logo-text strong {
  color: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: var(--blue-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
}

.btn-teal {
  background: linear-gradient(135deg, var(--teal), #0a7a6e);
  color: white;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
}

.btn-orange {
  background: linear-gradient(135deg, var(--orange), #c2410c);
  color: white;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.btn-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border-color: transparent;
}

.btn-danger:hover {
  background: var(--red);
  color: white;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.full-width {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
}

.btn-sm.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  box-shadow: none;
}

.btn-sm.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}

.btn-sm.btn-teal {
  background: linear-gradient(135deg, var(--teal), #0a7a6e);
  color: white;
  box-shadow: none;
}

.btn-sm.btn-danger {
  background: var(--red-light);
  color: var(--red);
}

.btn-sm-full {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: var(--transition);
}

.btn-icon.remove {
  color: var(--red);
}
.btn-icon.remove:hover {
  color: var(--red-dark);
  transform: scale(1.1);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 50%, #f0fdf9 100%);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(26, 115, 232, 0.06) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(13, 148, 136, 0.05) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  padding: 60px 24px 60px 5%;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-light);
  color: var(--blue);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(26, 115, 232, 0.2);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.highlight {
  color: var(--blue);
  position: relative;
}

.highlight::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 2px;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  background: white;
  padding: 20px 28px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  width: fit-content;
}

.stat-item {
  text-align: center;
  padding: 0 20px;
}
.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
}
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--gray-200);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  z-index: 1;
}

.hero-image-container {
  position: relative;
  width: 450px;
  height: 450px;
}

.hero-bg-shape {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 380px;
  background: linear-gradient(135deg, var(--blue-light), var(--teal-light));
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  animation: morphBlob 8s ease-in-out infinite;
}

@keyframes morphBlob {
  0%,
  100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  }
  25% {
    border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%;
  }
  50% {
    border-radius: 30% 70% 30% 70% / 60% 40% 60% 40%;
  }
  75% {
    border-radius: 50% 50% 70% 30% / 50% 30% 70% 50%;
  }
}

.doctor-avatar-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.doctor-avatar {
  position: relative;
}

.avatar-circle {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: white;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 2;
}

.avatar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(26, 115, 232, 0.2);
  animation: pulse-ring 3s ease-in-out infinite;
}

.ring-1 {
  width: 200px;
  height: 200px;
}
.ring-2 {
  width: 260px;
  height: 260px;
  animation-delay: 1s;
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.2;
  }
}

.floating-card {
  position: absolute;
  background: white;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  z-index: 3;
}

.card-1 {
  top: 10%;
  left: -10%;
  animation: float1 4s ease-in-out infinite;
}
.card-2 {
  bottom: 20%;
  right: -5%;
  animation: float2 5s ease-in-out infinite;
}
.card-3 {
  bottom: 5%;
  left: 5%;
  animation: float3 4.5s ease-in-out infinite;
}

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

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

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

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.card-icon.green {
  background: var(--green-light);
  color: var(--green);
}
.card-icon.blue {
  background: var(--blue-light);
  color: var(--blue);
}
.card-icon.orange {
  background: var(--orange-light);
  color: var(--orange);
}

.card-text strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-800);
}
.card-text span {
  display: block;
  font-size: 11px;
  color: var(--gray-500);
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 80px 0;
}
.section-gray {
  background: var(--gray-50);
}
.section-blue {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  border: 1px solid rgba(26, 115, 232, 0.15);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-title.white {
  color: white;
}

.section-subtitle {
  font-size: 17px;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- SERVICES ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transform: scaleX(0);
  transition: var(--transition);
}

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

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-light);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--blue-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--blue);
  margin-bottom: 20px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--blue);
  color: white;
  transform: rotate(5deg);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.65;
}

/* ---------- DEPARTMENTS ---------- */
.specialization-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-200);
  background: white;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.dept-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.dept-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue);
}

.dept-icon {
  width: 64px;
  height: 64px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--blue);
  margin: 0 auto 16px;
  transition: var(--transition);
}

.dept-card:hover .dept-icon {
  background: var(--blue);
  color: white;
  transform: scale(1.1);
}

.dept-card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.dept-card p {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.dept-count {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
  height: 400px;
}

.about-shape {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-light), var(--teal-light));
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.about-icon-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 32px;
  align-items: center;
  justify-items: center;
}

.about-icon-item {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  width: 100%;
  transition: var(--transition);
}

.about-icon-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.about-icon-item i {
  font-size: 28px;
  color: var(--blue);
  display: block;
  margin-bottom: 8px;
}

.about-icon-item span {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
}

.about-content p {
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 16px;
  font-size: 15px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0 32px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

.feature-item i {
  color: var(--green);
}

/* ---------- TESTIMONIALS ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-card .stars {
  color: #fbbf24;
  font-size: 18px;
  margin-bottom: 14px;
}

.testimonial-card p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  font-size: 14px;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 14px;
}

.testimonial-author strong {
  display: block;
  color: white;
  font-size: 14px;
}
.testimonial-author span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--gray-800);
}

.footer-brand .logo-text {
  color: white;
}
.footer-brand .logo-icon {
  background: var(--blue);
}

.footer-brand p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-500);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: var(--gray-800);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 14px;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-3px);
}

.footer-links h4 {
  color: white;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links ul li {
  margin-bottom: 10px;
}
.footer-links ul li a {
  font-size: 14px;
  color: var(--gray-500);
  transition: var(--transition);
}
.footer-links ul li a:hover {
  color: var(--blue);
  padding-left: 4px;
}

.footer-contact h4 {
  color: white;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.footer-contact p i {
  color: var(--blue);
  margin-top: 3px;
  width: 14px;
  flex-shrink: 0;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: var(--gray-600);
}

/* ---------- AUTH PAGES ---------- */
.auth-container {
  display: flex;
  min-height: 100vh;
}

.auth-left {
  width: 420px;
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

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

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

.doctor-left {
  background: linear-gradient(160deg, var(--teal), #0a7a6e);
}
.admin-left {
  background: linear-gradient(160deg, var(--orange), #c2410c);
}

.auth-brand {
  text-align: center;
  position: relative;
  z-index: 1;
}
.auth-brand h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-top: 12px;
}
.auth-brand p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  position: relative;
  z-index: 1;
}

.auth-feature-item i {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-portals {
  position: relative;
  z-index: 1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.portal-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  margin-bottom: 10px;
}

.portal-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  margin-bottom: 8px;
}

.portal-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.restriction-notice {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}

.restriction-notice i {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
  flex-shrink: 0;
}
.restriction-notice p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.5;
}

.auth-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--gray-50);
  overflow-y: auto;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--gray-600);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 32px;
  align-self: flex-start;
  transition: var(--transition);
}

.back-btn:hover {
  color: var(--blue);
}

.auth-form {
  display: none;
  width: 100%;
  max-width: 440px;
}

.auth-form.active {
  display: block;
}

.auth-form h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  border: 1px solid rgba(26, 115, 232, 0.2);
  line-height: 1.5;
}

.notice-banner.warning {
  background: #fff8e6;
  color: #b45309;
  border-color: #f59e0b33;
}
.notice-banner.danger {
  background: var(--red-light);
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.2);
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

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

.input-wrapper > i:first-child {
  position: absolute;
  left: 14px;
  color: var(--gray-400);
  font-size: 14px;
  pointer-events: none;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-800);
  background: white;
  transition: var(--transition);
  outline: none;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.toggle-pass {
  position: absolute;
  right: 14px;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 14px;
}

.toggle-pass:hover {
  color: var(--blue);
}

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

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
}

.checkbox-label a {
  color: var(--blue);
}

.forgot-link {
  font-size: 13px;
  color: var(--blue);
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--gray-500);
}
.auth-switch a {
  color: var(--blue);
  font-weight: 600;
}
.auth-switch.small {
  font-size: 13px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------- DASHBOARD LAYOUT ---------- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: white;
  border-right: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 20px;
}

.sidebar-brand span {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 13px;
  flex-shrink: 0;
}

.teal-avatar {
  background: linear-gradient(135deg, var(--teal), #0a7a6e) !important;
}
.orange-avatar {
  background: linear-gradient(135deg, var(--orange), #c2410c) !important;
}

.user-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}
.user-info span {
  font-size: 12px;
  color: var(--gray-500);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: var(--blue-light);
  color: var(--blue);
}

.doctor-sidebar .sidebar-link:hover,
.doctor-sidebar .sidebar-link.active {
  background: var(--teal-light);
  color: var(--teal);
}

.admin-sidebar .sidebar-link:hover,
.admin-sidebar .sidebar-link.active {
  background: var(--orange-light);
  color: var(--orange);
}

.sidebar-link.logout {
  color: var(--red);
}
.sidebar-link.logout:hover {
  background: var(--red-light);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.dashboard-main {
  flex: 1;
  padding: 28px;
  background: var(--gray-50);
  overflow-y: auto;
}

.dashboard-header {
  background: white;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border: 1px solid var(--gray-100);
}

.teal-header {
  border-left: 4px solid var(--teal);
}
.admin-header {
  border-left: 4px solid var(--orange);
}

.dashboard-header h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.dashboard-header p {
  font-size: 14px;
  color: var(--gray-500);
}

.date-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

.dash-section {
  display: none;
}
.dash-section.active {
  display: block;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

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

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

.stat-card.blue .stat-icon {
  background: var(--blue-light);
  color: var(--blue);
}
.stat-card.green .stat-icon {
  background: var(--green-light);
  color: var(--green);
}
.stat-card.orange .stat-icon {
  background: var(--orange-light);
  color: var(--orange);
}
.stat-card.purple .stat-icon {
  background: var(--purple-light);
  color: var(--purple);
}
.stat-card.teal .stat-icon {
  background: var(--teal-light);
  color: var(--teal);
}

.stat-card .stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
}

.stat-card .stat-label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.dash-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  margin-bottom: 20px;
}

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

.card-header h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
}

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

.card-header-row h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
}

/* ---------- APPOINTMENT LIST ---------- */
.appointment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appointment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.appointment-item:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.apt-color {
  width: 4px;
  height: 48px;
  border-radius: 4px;
  flex-shrink: 0;
}

.apt-color.blue {
  background: var(--blue);
}
.apt-color.green {
  background: var(--green);
}
.apt-color.orange {
  background: var(--orange);
}

.apt-info {
  flex: 1;
}
.apt-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}
.apt-info span {
  font-size: 12px;
  color: var(--gray-500);
}

.apt-time {
  text-align: center;
}
.apt-time strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}
.apt-time span {
  font-size: 12px;
  color: var(--gray-500);
}

/* ---------- PRESCRIPTION LIST ---------- */
.prescription-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prescription-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
}

.rx-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 16px;
  flex-shrink: 0;
}

.rx-info {
  flex: 1;
}
.rx-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}
.rx-info span {
  font-size: 12px;
  color: var(--gray-500);
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.badge-confirmed {
  background: var(--blue-light);
  color: var(--blue);
}
.badge-pending {
  background: #fff8e6;
  color: #b45309;
}
.badge-completed {
  background: var(--green-light);
  color: var(--green);
}
.badge-active {
  background: var(--green-light);
  color: var(--green);
}
.badge-paid {
  background: var(--green-light);
  color: var(--green);
}
.badge-cash {
  background: #fff8e6;
  color: #b45309;
}
.badge-inprogress {
  background: var(--blue-light);
  color: var(--blue);
}
.badge-danger {
  background: var(--red-light);
  color: var(--red);
}
.badge-inactive {
  background: var(--gray-100);
  color: var(--gray-500);
}

/* ---------- TABS ---------- */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius-md);
  width: fit-content;
  margin-bottom: 20px;
}

.tab {
  padding: 8px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  background: transparent;
  transition: var(--transition);
}

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

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ---------- DATA TABLE ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  background: var(--gray-50);
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gray-100);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-50);
  color: var(--gray-700);
  vertical-align: middle;
}

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

.table-doctor {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--gray-800);
}

.avatar-mini {
  width: 34px;
  height: 34px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.avatar-mini.mc {
  background: var(--teal);
}
.avatar-mini.er {
  background: var(--orange);
}

.appointments-table-wrapper {
  overflow-x: auto;
}

code {
  background: var(--gray-100);
  color: var(--blue);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  font-weight: 600;
}

/* ---------- BOOKING WIZARD ---------- */
.booking-wizard {
  background: white;
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.wizard-header {
  margin-bottom: 32px;
}

.wizard-header h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
}

.wizard-header p {
  color: var(--gray-500);
  font-size: 14px;
}

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  transition: var(--transition);
}

.wizard-step.active .step-circle,
.wizard-step.done .step-circle {
  background: var(--blue);
  color: white;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
}

.wizard-step span {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  white-space: nowrap;
}

.wizard-step.active span {
  color: var(--blue);
}

.wizard-line {
  width: 80px;
  height: 2px;
  background: var(--gray-200);
  margin: 0 8px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.wizard-line.done {
  background: var(--blue);
}

.booking-step {
  display: none;
}
.booking-step.active {
  display: block;
}

.booking-step h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 20px;
}

.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 14px;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.search-bar.compact {
  margin-bottom: 0;
  max-width: 320px;
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.doctor-card {
  padding: 16px;
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  background: white;
  cursor: pointer;
}

.doctor-card.selectable:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}
.doctor-card.selected {
  border-color: var(--blue);
  background: var(--blue-light);
}

.doctor-avatar-sm {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

.doctor-avatar-sm.mc {
  background: linear-gradient(135deg, var(--teal), #0a7a6e);
}
.doctor-avatar-sm.er {
  background: linear-gradient(135deg, var(--orange), #c2410c);
}

.doctor-details {
  flex: 1;
}
.doctor-details strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.specialty-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--blue-light);
  color: var(--blue);
  margin-bottom: 4px;
}

.specialty-tag.dentistry {
  background: var(--teal-light);
  color: var(--teal);
}
.specialty-tag.neuro {
  background: var(--orange-light);
  color: var(--orange);
}

.rating {
  font-size: 12px;
  color: var(--gray-500);
}

.rating i {
  color: #f59e0b;
}

.doctor-fee {
  font-size: 16px;
  font-weight: 800;
  color: var(--blue);
  text-align: right;
}

.doctor-fee small {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 400;
}

/* ---------- TIME SELECTION ---------- */
.time-selection {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.calendar-mini {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
  min-width: 280px;
}

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

.cal-header span {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-800);
}

.cal-header button {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.cal-header button:hover {
  background: var(--gray-200);
  color: var(--blue);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-name {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  padding: 4px;
}

.cal-day {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-700);
}

.cal-day:hover:not(.disabled):not(.unavailable) {
  background: var(--blue-light);
  color: var(--blue);
}
.cal-day.active {
  background: var(--blue);
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
}
.cal-day.disabled {
  color: var(--gray-300);
  cursor: not-allowed;
}
.cal-day.unavailable {
  color: var(--red);
  cursor: not-allowed;
  text-decoration: line-through;
}

.time-slots-container {
  flex: 1;
}
.time-slots-container h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 14px;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.time-slot {
  padding: 10px;
  text-align: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-700);
}

.time-slot:hover:not(.taken) {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
}
.time-slot.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}
.time-slot.taken {
  background: var(--gray-100);
  color: var(--gray-300);
  cursor: not-allowed;
  border-color: transparent;
  text-decoration: line-through;
}

.slot-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-500);
  font-weight: 500;
}

.legend-item::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.legend-item.available::before {
  border: 2px solid var(--gray-300);
}
.legend-item.selected-legend::before {
  background: var(--blue);
}
.legend-item.taken-legend::before {
  background: var(--gray-200);
}

.step-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

/* ---------- PAYMENT SECTION ---------- */
.appointment-summary {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--gray-200);
}

.appointment-summary h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: var(--gray-600);
}

.summary-row span {
  color: var(--gray-500);
}
.summary-row strong {
  color: var(--gray-800);
}
.summary-row.total {
  border-top: 1px solid var(--gray-200);
  margin-top: 8px;
  padding-top: 12px;
}
.summary-row.total span {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}
.summary-row.total strong {
  font-size: 18px;
  color: var(--blue);
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  background: white;
  position: relative;
}

.payment-option:hover {
  border-color: var(--blue);
}
.payment-option.active {
  border-color: var(--blue);
  background: var(--blue-light);
}

.payment-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.payment-option.active .payment-radio {
  border-color: var(--blue);
}

.radio-dot {
  width: 10px;
  height: 10px;
  background: var(--blue);
  border-radius: 50%;
}

.payment-icon {
  width: 44px;
  height: 44px;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--blue);
  flex-shrink: 0;
}

.payment-icon.cash {
  background: #fff8e6;
  color: #b45309;
}

.payment-info {
  flex: 1;
}
.payment-info strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.payment-info span {
  font-size: 13px;
  color: var(--gray-500);
}

.payment-badge {
  padding: 3px 10px;
  background: var(--green-light);
  color: var(--green);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.card-form {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
  margin-bottom: 24px;
  transition: var(--transition);
}

/* ---------- CONFIRMATION SCREEN ---------- */
.confirmation-screen {
  text-align: center;
  padding: 40px 20px;
}

.confirm-icon {
  font-size: 72px;
  color: var(--green);
  margin-bottom: 20px;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.confirmation-screen h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.confirmation-screen p {
  font-size: 15px;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.confirm-details {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  max-width: 480px;
  margin: 0 auto 32px;
  border: 1px solid var(--gray-100);
}

.confirm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  color: var(--gray-700);
}

.confirm-row:last-child {
  border-bottom: none;
}
.confirm-row i {
  color: var(--blue);
  width: 18px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- PRESCRIPTIONS GRID ---------- */
.prescriptions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.prescription-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  border-top: 4px solid var(--blue);
}

.rx-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.rx-symbol {
  font-size: 36px;
  font-weight: 900;
  color: var(--blue);
  font-family: serif;
  line-height: 1;
  flex-shrink: 0;
}

.rx-symbol.large {
  font-size: 48px;
}

.rx-meta {
  flex: 1;
}
.rx-meta strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}
.rx-meta span {
  font-size: 12px;
  color: var(--gray-500);
}

.rx-medicines {
  margin-bottom: 16px;
}

.medicine-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--gray-100);
}

.medicine-item:last-child {
  border-bottom: none;
}
.medicine-item > i {
  color: var(--blue);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.medicine-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.medicine-info span {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

.rx-notes {
  display: flex;
  gap: 10px;
  background: #fff8e6;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 16px;
  border-left: 3px solid #f59e0b;
}

.rx-notes i {
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}
.rx-notes p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.55;
}

/* ---------- PROFILE ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.profile-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  text-align: center;
  height: fit-content;
}

.profile-avatar-lg {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

.profile-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.profile-card p {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.profile-form {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.form-section {
  margin-bottom: 28px;
}
.form-section h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-100);
}

/* ---------- PATIENT QUEUE ---------- */
.patient-queue {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.queue-item.completed {
  background: var(--gray-50);
  opacity: 0.75;
}
.queue-item.in-progress {
  background: var(--blue-light);
  border-color: var(--blue);
}
.queue-item.waiting {
  background: white;
}

.queue-number {
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-400);
  width: 28px;
  flex-shrink: 0;
}

.queue-avatar {
  width: 42px;
  height: 42px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 13px;
  flex-shrink: 0;
}

.queue-avatar.current {
  background: var(--blue);
  box-shadow:
    0 0 0 3px rgba(26, 115, 232, 0.3),
    0 0 0 6px rgba(26, 115, 232, 0.1);
  animation: currentPulse 2s ease-in-out infinite;
}
.queue-avatar.waiting-av {
  background: var(--gray-300);
}

@keyframes currentPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(26, 115, 232, 0.3),
      0 0 0 6px rgba(26, 115, 232, 0.1);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(26, 115, 232, 0.5),
      0 0 0 8px rgba(26, 115, 232, 0.15);
  }
}

.queue-info {
  flex: 1;
}
.queue-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}
.queue-info span {
  font-size: 12px;
  color: var(--gray-500);
}

.queue-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.legend-dot.green {
  background: var(--green);
}
.legend-dot.blue {
  background: var(--blue);
}
.legend-dot.orange {
  background: var(--orange);
}

/* ---------- AVAILABILITY MANAGER ---------- */
.section-desc {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.availability-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.avail-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}

.day-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.day-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}

.avail-badge {
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.avail-badge.active {
  background: var(--green-light);
  color: var(--green);
}
.avail-badge.inactive {
  background: var(--gray-100);
  color: var(--gray-400);
}

.avail-times {
  padding: 16px 20px;
}
.avail-times.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.time-range-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.time-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.time-input-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
}

.time-input {
  padding: 8px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  outline: none;
  transition: var(--transition);
  width: 120px;
}

.time-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.time-separator {
  font-size: 16px;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.add-slot-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 2px dashed var(--gray-200);
  color: var(--gray-400);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: var(--transition);
  margin-top: 4px;
}

.add-slot-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-light);
}

.day-off-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: 14px;
  padding: 8px 0;
}

.avail-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ---------- TOGGLE SWITCH ---------- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray-300);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

input:checked + .toggle-slider {
  background: var(--teal);
}
input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ---------- CLINICAL VIEW ---------- */
.clinical-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
}

.patient-vitals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.vital-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--gray-100);
}

.vital-item i {
  font-size: 18px;
  color: var(--blue);
  width: 20px;
}
.vital-item strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-800);
}
.vital-item span {
  font-size: 11px;
  color: var(--gray-500);
}

.history-section {
  margin-bottom: 16px;
}
.history-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 10px;
}
.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-tag {
  padding: 4px 12px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.history-tag.danger {
  background: var(--red-light);
  color: var(--red);
}

.visit-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-600);
}

.visit-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
  min-width: 90px;
}

/* ---------- PRESCRIPTION WRITER ---------- */
.rx-writer-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-100);
}

.rx-writer-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
}
.rx-writer-header p {
  font-size: 13px;
  color: var(--gray-500);
}

.diagnosis-section {
  margin-bottom: 20px;
}
.diagnosis-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.rx-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-800);
  outline: none;
  transition: var(--transition);
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-main);
  line-height: 1.6;
}

.rx-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.medicines-section {
  margin-bottom: 20px;
}

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

.medicines-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}

.medicine-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid var(--gray-100);
}

.medicine-fields {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 12px;
}

.medicine-fields .form-group {
  margin-bottom: 0;
}
.medicine-fields label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.rx-input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gray-800);
  outline: none;
  transition: var(--transition);
  background: white;
}

.rx-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.remove-med-btn {
  background: var(--red-light);
  color: var(--red);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  flex-shrink: 0;
  margin-bottom: 0;
}

.remove-med-btn:hover {
  background: var(--red);
  color: white;
}

.rx-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ---------- ADMIN CHARTS ---------- */
.chart-container {
  padding: 10px 0;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 200px;
  padding: 0 10px;
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 6px;
}

.bar {
  width: 100%;
  background: linear-gradient(
    180deg,
    var(--blue-light),
    rgba(26, 115, 232, 0.15)
  );
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(26, 115, 232, 0.2);
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}

.bar:hover {
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
}
.bar:hover .bar-val {
  color: white;
}

.active-bar {
  background: linear-gradient(180deg, var(--blue), var(--blue-dark)) !important;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

.active-bar .bar-val {
  color: white !important;
}

.bar-val {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

.bar-label {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 600;
}

.dept-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dept-stat-item {
}

.dept-stat-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 14px;
}

.dept-stat-info span {
  color: var(--gray-600);
}
.dept-stat-info strong {
  color: var(--gray-800);
}

.dept-progress-bar {
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.dept-progress {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* ---------- ADMIN SEARCH/FILTER ---------- */
.search-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--gray-700);
  outline: none;
  background: white;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--blue);
}

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.date-filter {
  padding: 10px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--gray-700);
  outline: none;
  transition: var(--transition);
}

.date-filter:focus {
  border-color: var(--blue);
}

.export-btns {
  display: flex;
  gap: 8px;
}

/* ---------- SETTINGS ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

/* ---------- DOCTORS PAGE ---------- */
.page-header {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  padding: 80px 0 40px;
  color: white;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: white;
  margin: 12px 0 8px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 7px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

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

.doctor-full-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doctor-full-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-light);
}

.doc-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

.doc-card-avatar.mc {
  background: linear-gradient(135deg, var(--teal), #0a7a6e);
}
.doc-card-avatar.er {
  background: linear-gradient(135deg, var(--orange), #c2410c);
}

.doc-card-body {
  flex: 1;
}
.doc-card-body h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.doc-card-body p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 10px 0;
}

.doc-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.doc-meta span {
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 5px;
}
.doc-meta i {
  color: var(--blue);
}

.doc-availability {
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}
.doc-availability i {
  margin-right: 4px;
}

.doc-card-actions {
  display: flex;
  gap: 10px;
}

.doctor-full-card[style*="display: none"] {
  display: none !important;
}

/* ---------- PHARMACY PAGE ---------- */
.pharmacy-layout {
  display: flex;
  height: calc(100vh - 72px);
  margin-top: 0;
}

.pharmacy-sidebar {
  width: 380px;
  background: white;
  border-right: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.pharmacy-search {
  padding: 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detect-btn {
  border-radius: var(--radius-sm) !important;
}

.pharmacy-list {
  flex: 1;
  overflow-y: auto;
}

.pharmacy-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--gray-50);
}

.pharmacy-item:hover,
.pharmacy-item.active {
  background: var(--blue-light);
  border-left: 3px solid var(--blue);
}

.pharm-icon {
  width: 44px;
  height: 44px;
  background: var(--blue-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--blue);
  flex-shrink: 0;
}

.pharm-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.pharm-info span {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.pharm-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.distance {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
}
.distance i {
  color: var(--blue);
  font-size: 10px;
}

.pharmacy-map {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.map-container {
  width: 100%;
  height: 100%;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  background: #e8f4f8;
  position: relative;
  overflow: hidden;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 115, 232, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 115, 232, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.map-roads {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      transparent 30%,
      rgba(255, 255, 255, 0.7) 30%,
      rgba(255, 255, 255, 0.7) 33%,
      transparent 33%
    ),
    linear-gradient(
      90deg,
      transparent 45%,
      rgba(255, 255, 255, 0.7) 45%,
      rgba(255, 255, 255, 0.7) 48%,
      transparent 48%
    ),
    linear-gradient(
      transparent 65%,
      rgba(255, 255, 255, 0.6) 65%,
      rgba(255, 255, 255, 0.6) 68%,
      transparent 68%
    ),
    linear-gradient(
      90deg,
      transparent 70%,
      rgba(255, 255, 255, 0.6) 70%,
      rgba(255, 255, 255, 0.6) 73%,
      transparent 73%
    );
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  cursor: pointer;
}

.pin-dot {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin: 0 auto 4px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.pin-dot.user {
  background: var(--blue);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transform: none;
  border: 3px solid white;
  box-shadow:
    0 0 0 3px rgba(26, 115, 232, 0.3),
    var(--shadow-md);
  animation: userPulse 2s ease-in-out infinite;
}

@keyframes userPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(26, 115, 232, 0.3),
      0 4px 16px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(26, 115, 232, 0.15),
      0 4px 16px rgba(0, 0, 0, 0.15);
  }
}

.pin-dot.pharm {
  background: var(--green);
  color: white;
  transform: rotate(-45deg);
}
.pin-dot.pharm i {
  transform: rotate(45deg);
}
.pin-dot.closed-pin {
  background: var(--gray-400);
}

.active-pin .pin-dot {
  transform: rotate(-45deg) scale(1.2);
  background: var(--blue);
}
.active-pin .pin-dot i {
  transform: rotate(45deg);
}

.pin-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-700);
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.map-info-box {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 20px;
  min-width: 260px;
  border: 1px solid var(--gray-100);
  animation: slideUp 0.3s ease;
}

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

.info-box-content strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}
.info-box-content span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.info-box-content span i {
  color: var(--blue);
  width: 14px;
}

.info-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.map-controls {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-ctrl-btn {
  width: 36px;
  height: 36px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.map-ctrl-btn:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

/* ---------- MODAL ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideInModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.small-modal {
  max-width: 420px;
}

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

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 i {
  color: var(--orange);
}

.danger-header {
  background: var(--red-light);
}
.danger-header h3 {
  color: var(--red);
}
.danger-header h3 i {
  color: var(--red);
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.modal-body {
  padding: 28px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.generated-credentials {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
  border: 1px dashed var(--gray-300);
}

.generated-credentials h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.credential-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--gray-600);
}

.credential-row code {
  flex: 1;
}

.copy-btn {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--blue-light);
  color: var(--blue);
  border-color: var(--blue);
}

/* ---------- AI CHATBOT ---------- */
.chatbot-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1500;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 6px 24px rgba(26, 115, 232, 0.45);
  transition: var(--transition);
  position: relative;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(26, 115, 232, 0.55);
}

.chat-notification {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--red);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: notifPulse 2s ease-in-out infinite;
}

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

.chatbot-window {
  display: none;
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 360px;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  animation: slideUpChat 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-window.open {
  display: flex;
  flex-direction: column;
}

@keyframes slideUpChat {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.chat-header {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.chat-header-info strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: white;
}

.online-dot {
  font-size: 12px;
  color: #86efac;
  font-weight: 600;
}

.chat-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.chat-messages {
  flex: 1;
  height: 300px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--gray-50);
}

.chat-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.chat-message.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--blue);
  flex-shrink: 0;
}

.chat-message.user .msg-avatar {
  background: var(--blue);
  color: white;
}

.msg-bubble {
  background: white;
  border-radius: 16px 16px 16px 4px;
  padding: 12px 14px;
  max-width: 260px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}

.chat-message.user .msg-bubble {
  background: var(--blue);
  color: white;
  border-radius: 16px 16px 4px 16px;
  border-color: transparent;
}

.msg-bubble p {
  margin-bottom: 8px;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quick-replies button {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid rgba(26, 115, 232, 0.2);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.quick-replies button:hover {
  background: var(--blue);
  color: white;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--gray-100);
  background: white;
}

.chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.chat-input-area input:focus {
  border-color: var(--blue);
}

.send-btn {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--gray-900);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast i {
  color: #4ade80;
  font-size: 18px;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--blue);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
    padding: 100px 24px 40px;
  }
  .hero-stats {
    margin: 0 auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-visual {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dash-grid-2 {
    grid-template-columns: 1fr;
  }
  .clinical-layout {
    grid-template-columns: 1fr;
  }
  .time-selection {
    grid-template-columns: 1fr;
  }
  .medicine-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .auth-left {
    display: none;
  }
  .auth-right {
    padding: 32px 24px;
  }
  .sidebar {
    width: 220px;
  }
  .pharmacy-layout {
    flex-direction: column;
    height: auto;
  }
  .pharmacy-sidebar {
    width: 100%;
    height: 350px;
  }
  .pharmacy-map {
    height: 400px;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-md);
    gap: 4px;
  }
  .hamburger {
    display: flex;
  }
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  .stat-divider {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .dashboard-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-brand {
    border-bottom: none;
    padding-bottom: 0;
  }
  .sidebar-user {
    display: none;
  }
  .sidebar-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
  .dashboard-main {
    padding: 16px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .medicine-fields {
    grid-template-columns: 1fr 1fr;
  }
  .wizard-steps {
    gap: 4px;
  }
  .wizard-line {
    width: 30px;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .chatbot-window {
    width: 310px;
    right: -10px;
  }
  .booking-wizard {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .departments-grid {
    grid-template-columns: 1fr 1fr;
  }
  .doctors-grid {
    grid-template-columns: 1fr;
  }
  .prescriptions-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn-lg {
    width: 100%;
    justify-content: center;
  }
  .chatbot-widget {
    bottom: 16px;
    right: 16px;
  }
  .toast {
    font-size: 13px;
    padding: 12px 18px;
  }
  .availability-grid {
    grid-template-columns: 1fr;
  }
  .medicine-fields {
    grid-template-columns: 1fr;
  }
}
