/* ============================================
   MEDICAL BOOKING SYSTEM - PREMIUM STYLES
   Modern, Animated, Professional Healthcare Theme
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Primary Gradient Colors */
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --primary-light: #7c3aed;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-gradient-hover: linear-gradient(135deg, #5a67d8 0%, #6b21a8 100%);

  /* Secondary Colors */
  --secondary: #f093fb;
  --secondary-dark: #c026d3;
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

  /* Accent Colors */
  --accent: #4facfe;
  --accent-light: #00f2fe;
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

  /* Healthcare Colors */
  --medical-blue: #0ea5e9;
  --medical-teal: #14b8a6;
  --medical-green: #22c55e;
  --medical-red: #ef4444;

  /* Status Colors */
  --success: #10b981;
  --success-light: #34d399;
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --warning: #f59e0b;
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --danger: #ef4444;
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --info: #3b82f6;
  --info-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);

  /* Neutral Colors */
  --dark: #1e293b;
  --dark-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;

  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.4);
  --shadow-glow-accent: 0 0 40px rgba(79, 172, 254, 0.4);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

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

  /* Fonts */
  --font-sans: 'Inter', 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Keyframe Animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(20px) rotate(-5deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.4); }
  50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.8); }
}

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

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

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

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

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

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

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

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

@keyframes wave {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(10px) translateY(-5px); }
  50% { transform: translateX(0) translateY(0); }
  75% { transform: translateX(-10px) translateY(5px); }
}

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

@keyframes borderGlow {
  0%, 100% { border-color: rgba(102, 126, 234, 0.5); }
  50% { border-color: rgba(118, 75, 162, 0.8); }
}

body {
  font-family: var(--font-sans);
  background-color: #f0f4ff;
  background-image:
    /* Animated gradient overlay */
    linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 50%, rgba(240, 147, 251, 0.03) 100%),
    /* Medical cross pattern */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.03'%3E%3Cpath d='M50 25h-10v15h-15v10h15v15h10v-15h15v-10h-15v-15z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    /* Dots pattern */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23764ba2' fill-opacity='0.02'%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='40' cy='40' r='2'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;

}
/* Large Decorative SVG Background Elements */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -15%;
  width: 800px;
  height: 800px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cdefs%3E%3ClinearGradient id='grad1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23667eea;stop-opacity:0.1'/%3E%3Cstop offset='100%25' style='stop-color:%23764ba2;stop-opacity:0.05'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='200' cy='200' r='180' fill='url(%23grad1)'/%3E%3Ccircle cx='200' cy='200' r='140' fill='none' stroke='%23667eea' stroke-opacity='0.08' stroke-width='2'/%3E%3Ccircle cx='200' cy='200' r='100' fill='none' stroke='%23764ba2' stroke-opacity='0.06' stroke-width='2'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -25%;
  left: -10%;
  width: 700px;
  height: 700px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cdefs%3E%3ClinearGradient id='grad2' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%234facfe;stop-opacity:0.08'/%3E%3Cstop offset='100%25' style='stop-color:%2300f2fe;stop-opacity:0.04'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M200 20 L380 200 L200 380 L20 200 Z' fill='url(%23grad2)'/%3E%3Cpath d='M200 60 L340 200 L200 340 L60 200 Z' fill='none' stroke='%234facfe' stroke-opacity='0.06' stroke-width='2'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  z-index: -1;
  animation: floatReverse 25s ease-in-out infinite;
  pointer-events: none;
}
/* ---------- Floating Medical Elements ---------- */
.main-wrapper {
  position: relative;
}

.main-wrapper::before {
  content: '';
  position: fixed;
  top: 15%;
  left: 5%;
  width: 120px;
  height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect x='35' y='10' width='30' height='80' rx='4' fill='%23ef4444' fill-opacity='0.15'/%3E%3Crect x='10' y='35' width='80' height='30' rx='4' fill='%23ef4444' fill-opacity='0.15'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  z-index: -1;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.main-wrapper::after {
  content: '';
  position: fixed;
  bottom: 20%;
  right: 8%;
  width: 100px;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 10 C50 10 80 30 80 55 C80 75 65 90 50 90 C35 90 20 75 20 55 C20 30 50 10 50 10' fill='%23f472b6' fill-opacity='0.12'/%3E%3Cpath d='M50 25 C50 25 70 40 70 55 C70 68 60 78 50 78 C40 78 30 68 30 55 C30 40 50 25 50 25' fill='%23f472b6' fill-opacity='0.08'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  z-index: -1;
  animation: heartbeat 3s ease-in-out infinite, floatReverse 10s ease-in-out infinite;
  pointer-events: none;
}

/* ========================================
   NAVBAR / HEADER - Premium Glass Design
   ======================================== */
.navbar {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.875rem 1.5rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 30px rgba(102, 126, 234, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 1040;
  position: relative;
  overflow: hidden;
}

/* Navbar animated background */
.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 8s linear infinite;
}

/* Navbar decorative elements */
.navbar::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -5%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  color: var(--white) !important;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-brand::before {
  content: '';
  width: 42px;
  height: 42px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Crect width='50' height='50' rx='12' fill='white' fill-opacity='0.2'/%3E%3Crect x='20' y='10' width='10' height='30' rx='2' fill='white'/%3E%3Crect x='10' y='20' width='30' height='10' rx='2' fill='white'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  animation: heartbeat 3s ease-in-out infinite;
}

/* Logout Button */
.navbar .btn-outline-danger {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  color: var(--white) !important;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.navbar .btn-outline-danger::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: var(--transition-slow);
  z-index: -1;
}

.navbar .btn-outline-danger:hover {
  background: var(--danger-gradient) !important;
  border-color: transparent !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.navbar .btn-outline-danger:hover::before {
  left: 100%;
}

/* Sidebar Toggle */
.sidebar-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 1.25rem;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.sidebar-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  transform: scale(1.08) rotate(5deg);
  border-color: rgba(255, 255, 255, 0.4);
}

.sidebar-toggle:hover::before {
  opacity: 1;
}

/* User Info */
.navbar .me-3 {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95) !important;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  position: relative;
  z-index: 1;
}

.navbar .me-3::before {
  content: '';
  width: 36px;
  height: 36px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18' fill='white' fill-opacity='0.2'/%3E%3Ccircle cx='20' cy='15' r='6' fill='white' fill-opacity='0.9'/%3E%3Cpath d='M8 35 C8 27 14 23 20 23 C26 23 32 27 32 35' fill='white' fill-opacity='0.9'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ========================================
   SIDEBAR - Modern Dark Glass Design
   ======================================== */
.offcanvas {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow:var(--shadow-xl);
}

/* Sidebar decorative background */
.offcanvas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='80' cy='20' r='40' fill='%23667eea' fill-opacity='0.05'/%3E%3Ccircle cx='20' cy='80' r='30' fill='%234facfe' fill-opacity='0.03'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Sidebar large decorative element */
.offcanvas::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -50px;
  width: 300px;
  height: 300px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3ClinearGradient id='sideGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23667eea;stop-opacity:0.1'/%3E%3Cstop offset='100%25' style='stop-color:%234facfe;stop-opacity:0.05'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='100' cy='100' r='90' fill='url(%23sideGrad)'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  pointer-events: none;
  animation: float 15s ease-in-out infinite;
}

.offcanvas-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.offcanvas-title {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.offcanvas-title::before {
  content: '';
  width: 45px;
  height: 45px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cdefs%3E%3ClinearGradient id='logoGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%234facfe'/%3E%3Cstop offset='100%25' style='stop-color:%2300f2fe'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='50' height='50' rx='12' fill='url(%23logoGrad)'/%3E%3Crect x='20' y='10' width='10' height='30' rx='2' fill='white'/%3E%3Crect x='10' y='20' width='30' height='10' rx='2' fill='white'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  filter: drop-shadow(0 4px 15px rgba(79, 172, 254, 0.4));
  animation: heartbeat 3s ease-in-out infinite;
}

.offcanvas-body {
  padding: 1rem 0 !important;
  position: relative;
  z-index: 1;
}

/* Sidebar Navigation */
.offcanvas .nav {
  padding: 0.75rem 1rem !important;
}

.offcanvas .nav-item {
  margin-bottom: 0.375rem !important;
}

.offcanvas .nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 1rem 1.25rem !important;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.875rem;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

/* Nav link hover effect */
.offcanvas .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--accent-gradient);
  transform: scaleY(0);
  transition: var(--transition);
  border-radius: 0 4px 4px 0;
}

.offcanvas .nav-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(79, 172, 254, 0.1), transparent);
  opacity: 0;
  transition: var(--transition);
}

.offcanvas .nav-link:hover {
  color: var(--white) !important;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(8px);
}

.offcanvas .nav-link:hover::before {
  transform: scaleY(0.7);
}

.offcanvas .nav-link:hover::after {
  opacity: 1;
}

/* Active nav link */
.offcanvas .nav-link.active {
  color: var(--white) !important;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.9) 0%, rgba(0, 242, 254, 0.7) 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 25px rgba(79, 172, 254, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateX(0);
}

.offcanvas .nav-link.active::before {
  transform: scaleY(1);
  background: var(--white);
  width: 5px;
}

/* Nav Link Icons with SVG */
.offcanvas .nav-link[href*="dashboard"]::after,
.offcanvas .nav-link[href*="appointment"]::after,
.offcanvas .nav-link[href*="schedule"]::after,
.offcanvas .nav-link[href*="hospital"]::after,
.offcanvas .nav-link[href*="enquir"]::after,
.offcanvas .nav-link[href*="doctor"]::after,
.offcanvas .nav-link[href*="specialization"]::after,
.offcanvas .nav-link[href*="booking"]::after {
  content: '';
  margin-left: auto;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
  transition: var(--transition);
}

.offcanvas .nav-link:hover::after,
.offcanvas .nav-link.active::after {
  opacity: 1;
  transform: scale(1.1);
}

.offcanvas .nav-link[href*="dashboard"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z'/%3E%3C/svg%3E");
}

.offcanvas .nav-link[href*="appointment"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM9 10H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm-8 4H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2z'/%3E%3C/svg%3E");
}

.offcanvas .nav-link[href*="schedule"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
}

.offcanvas .nav-link[href*="hospital"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-4v-4H6v-4h4V6h4v4h4v4z'/%3E%3C/svg%3E");
}

.offcanvas .nav-link[href*="enquir"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z'/%3E%3C/svg%3E");
}

.offcanvas .nav-link[href*="doctor"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E");
}

.offcanvas .nav-link[href*="specialization"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M19.5 12c-2.5 0-4.5 2-4.5 4.5s2 4.5 4.5 4.5 4.5-2 4.5-4.5-2-4.5-4.5-4.5zm1.5 5h-1v1h-1v-1h-1v-1h1v-1h1v1h1v1zm-5.5-2.5c0-1.4.8-2.6 2-3.2-.1-1.5-1.4-2.8-3-2.8-1.7 0-3 1.3-3 3s1.3 3 3 3c.4 0 .7-.1 1-.2zm-5.5.5c-2.5 0-4.5 2-4.5 4.5S7.5 24 10 24s4.5-2 4.5-4.5-2-4.5-4.5-4.5z'/%3E%3C/svg%3E");
}

.offcanvas .nav-link[href*="booking"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z'/%3E%3C/svg%3E");
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
main.flex-fill {
  background: transparent;
  min-height: calc(100vh - 70px);
  padding: 2rem !important;
  position: relative;
  animation: slideInUp 0.5s ease-out;
}



@media (min-width: 768px) {
  main.flex-fill {
    padding: 2rem !important;
  }
}

/* ---------- Footer Styles ---------- */
/* ---------- Footer Styles ---------- */
footer, .footer {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%) !important;
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 2rem;
  color: var(--white) !important;
  font-size: 0.9rem;
  box-shadow:
    0 -4px 30px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer 10s linear infinite;
}

footer.bg-primary {
  background: var(--primary-gradient) !important;
}

footer span,
footer .container {
  color: var(--white) !important;
}

footer a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  opacity: 0.9;
}

footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Footer text styling */
footer .container span {
  font-weight: 500;
  letter-spacing: 0.025em;
  opacity: 0.95;
}

/* ---------- Card Styles ---------- */
.card {
 background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  box-shadow:
    0 10px 40px rgba(102, 126, 234, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: var(--transition);
  overflow: hidden;
  animation: scaleIn 0.4s ease-out;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 25px 60px rgba(102, 126, 234, 0.2),
    0 10px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  border-color: rgba(102, 126, 234, 0.2);
}

.card:hover::before {
  opacity: 1;
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  position: relative;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
}

.card-body {
  padding: 1.75rem;
}

.card-footer {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1.25rem 1.5rem;
}
/* ========================================
   BUTTONS - Premium Gradient Design
   ======================================== */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-transform: capitalize;
}

/* Button shine effect */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: var(--transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(-1px);
}

/* Primary Button */
.btn-primary {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  background: var(--primary-gradient-hover);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
  color: var(--white);
}

/* Secondary Button */
.btn-secondary {
  background: var(--secondary-gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-secondary:hover {
  box-shadow: 0 8px 30px rgba(240, 147, 251, 0.5);
  color: var(--white);
}

/* Success Button */
.btn-success {
  background: var(--success-gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
  color: var(--white);
}

/* Danger Button */
.btn-danger {
  background: var(--danger-gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
  color: var(--white);
}

/* Warning Button */
.btn-warning {
  background: var(--warning-gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-warning:hover {
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
  color: var(--white);
}

/* Info Button */
.btn-info {
  background: var(--accent-gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-info:hover {
  box-shadow: 0 8px 30px rgba(79, 172, 254, 0.5);
  color: var(--white);
}

/* Outline Buttons */
.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: var(--white);
}

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

.btn-outline-secondary:hover {
  background: var(--secondary-gradient);
  border-color: transparent;
  color: var(--white);
}

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

.btn-outline-success:hover {
  background: var(--success-gradient);
  border-color: transparent;
  color: var(--white);
}

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

.btn-outline-danger:hover {
  background: var(--danger-gradient);
  border-color: transparent;
  color: var(--white);
}

/* Button Sizes */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  border-radius: var(--radius-xl);
}
/* ---------- Form Styles ---------- */
.form-control, .form-select {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--white);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
  outline: none;
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-label {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* Select2 Custom Styles */
.select2-container--default .select2-selection--single {
  border: 2px solid var(--gray-200) !important;
  border-radius: var(--radius) !important;
  height: auto !important;
  padding: 0.5rem 0.75rem !important;
  transition: var(--transition);
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0 !important;
  color: var(--gray-800) !important;
}

.select2-dropdown {
  border: 2px solid var(--gray-200) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--primary) !important;
}

/* ---------- Table Styles ---------- */
.table {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table thead th {
  background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border: none;
}

.table tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

.table tbody tr {
  transition: var(--transition);
}

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

.table tbody tr:last-child td {
  border-bottom: none;
}

/* DataTables Custom Styles */
/* ---------- CRITICAL: DataTable Mobile Scroll Fix ---------- */
.table-responsive {
   background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
    box-shadow:
    0 10px 40px rgba(102, 126, 234, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

/* Ensure card body doesn't interfere with scroll */
.card-body {
  overflow: visible !important;
}

.card-body .table-responsive {
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  margin-bottom: -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 1.5rem;
}

@media (max-width: 991.98px) {
  .card-body .table-responsive {
    margin-left: -1rem;
    margin-right: -1rem;
    margin-bottom: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
  }
}

/* DataTable wrapper must not restrict width */
.dataTables_wrapper {
  overflow-x: visible !important;
  width: 100%;
}

/* Table must have minimum width to force scroll */
.datatable {
  min-width: 100% !important;
  width: max-content !important;
  white-space: nowrap;
}

/* Force columns to not wrap */
.datatable th,
.datatable td {
  white-space: nowrap !important;
  min-width: fit-content;
}

/* Scrollbar styling for better visibility */
.table-responsive::-webkit-scrollbar {
  height: 10px !important;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--gray-200) !important;
  border-radius: 5px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--primary) !important;
  border-radius: 5px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark) !important;
}

/* Mobile specific adjustments */
@media (max-width: 767.98px) {
  /* Ensure table can scroll */
  .table-responsive {
    max-width: 100vw !important;
    overflow-x: scroll !important;
    position: relative;
  }

  .datatable {
    min-width: 800px !important; /* Force minimum width to trigger scroll */
    width: auto !important;
  }

  .datatable thead th {
    font-size: 0.75rem;
    padding: 0.75rem 0.5rem !important;
    min-width: 80px;
  }

  .datatable tbody td {
    font-size: 0.8rem;
    padding: 0.75rem 0.5rem !important;
    min-width: 80px;
  }

  /* Action column specific */
  .datatable th:last-child,
  .datatable td:last-child {
    min-width: 140px !important;
  }

  /* Reduce button size on mobile */
  .datatable .btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
  }

  .datatable td .d-flex.gap-2 {
    gap: 0.25rem !important;
  }
}

/* Add scroll hint for mobile users */
.table-responsive {
  position: relative;
}

@media (max-width: 767.98px) {
  .table-responsive::after {
    content: '← Swipe →';
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: swipeHint 4s ease-in-out;
    pointer-events: none;
  }
}

@keyframes swipeHint {
  0%, 100% { opacity: 0; }
  10%, 70% { opacity: 1; }
  80% { opacity: 0; }
}

/* DataTables length and filter adjustments for mobile */
@media (max-width: 767.98px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    width: 100%;
    text-align: left !important;
  }

  .dataTables_wrapper .dataTables_length label,
  .dataTables_wrapper .dataTables_filter label {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .dataTables_wrapper .dataTables_length select {
    width: 100% !important;
    max-width: 200px;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    max-width: 100%;
  }

  .dataTables_wrapper .row {
    margin: 0;
  }

  .dataTables_wrapper .row > div {
    padding: 0.5rem 0;
  }
}

/* Container adjustments */
@media (max-width: 767.98px) {
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .card {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---------- Toast Styles ---------- */
.toast {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: none;
  overflow: hidden;
}

.toast-container {
  z-index: 1090 !important;
}

.toast-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 1rem;
}

.toast-body {
  padding: 1rem;
}

/* Toast Variants */
.toast.bg-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
}

.toast.bg-danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%) !important;
}

.toast.bg-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%) !important;
}

.toast.bg-info {
  background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%) !important;
}

/* ---------- Badge Styles ---------- */
.badge {
  padding: 0.4em 0.75em;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.025em;
}

.badge.bg-primary {
  background: var(--primary-gradient) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%) !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%) !important;
  color: var(--gray-900) !important;
}

.badge.bg-info {
  background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%) !important;
}

/* ---------- Alert Styles ---------- */
.alert {
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border-left: 4px solid var(--success);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  border-left: 4px solid var(--info);
}

/* ---------- Modal Styles ---------- */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
}

.modal-title {
  font-weight: 700;
  color: var(--gray-900);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* ---------- Pagination Styles ---------- */
.pagination {
  gap: 0.25rem;
}

.page-link {
  border-radius: var(--radius);
  border: 2px solid var(--gray-200);
  color: var(--gray-600);
  padding: 0.5rem 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.page-link:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-800);
}

.page-item.active .page-link {
  background: var(--primary-gradient);
  border-color: var(--primary);
  color: var(--white);
}

/* ---------- Responsive Utilities ---------- */
@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 1rem;
  }

  .navbar .me-3 {
    display: none;
  }

  main.flex-fill {
    padding: 1rem !important;
  }

  .card-body {
    padding: 1rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

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

@media (min-width: 576px) and (max-width: 767.98px) {
  main.flex-fill {
    padding: 1.25rem !important;
  }
}

@media (min-width: 992px) {
  .sidebar-toggle {
    display: none;
  }
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

/* ---------- Utility Classes ---------- */
.shadow-primary {
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.3);
}

.shadow-secondary {
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--primary-gradient);
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Stats Card ---------- */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-gradient);
}

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

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(8, 145, 178, 0.1);
  color: var(--primary);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ---------- Dashboard Welcome Card ---------- */
.welcome-card {
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.welcome-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.welcome-card h2 {
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.welcome-card p {
  opacity: 0.9;
  font-size: 1rem;
}

/* ---------- Dashboard Top Welcome Banner ---------- */
.dashboard-welcome-banner {
  background: linear-gradient(135deg, #1363C6 0%, #3b82f6 100%);
  border-radius: 24px;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.dashboard-welcome-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.dashboard-welcome-banner::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  right: -60px;
  bottom: -80px;
  pointer-events: none;
}

.dashboard-welcome-banner .welcome-banner-left,
.dashboard-welcome-banner .welcome-banner-right {
  position: relative;
  z-index: 1;
}

.welcome-banner-left {
  max-width: 60%;
}

.welcome-banner-datetime {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

.welcome-banner-title {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.welcome-banner-subtitle {
  margin: 0;
  font-size: 1rem;
  opacity: 0.95;
}

.welcome-banner-subtitle span {
  font-weight: 700;
}

.welcome-banner-right {
  flex: 0 0 auto;
  max-width: 160px;
}

.welcome-banner-image {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 35px rgba(15, 23, 42, 0.45));
}

@media (max-width: 991.98px) {
  .dashboard-welcome-banner {
    padding: 1.5rem 1.5rem;
  }

  .welcome-banner-left {
    max-width: 100%;
  }

  .welcome-banner-title {
    font-size: 1.5rem;
  }

  .welcome-banner-right {
    max-width: 140px;
  }
}

@media (max-width: 767.98px) {
  .dashboard-welcome-banner {
    flex-direction: row;
    align-items: center;
  }

  .welcome-banner-left {
    max-width: 100%;
  }

  .welcome-banner-title {
    font-size: 1.35rem;
  }

  .welcome-banner-right {
    max-width: 110px;
  }
}

@media (max-width: 575.98px) {
  .dashboard-welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.4rem 1.25rem;
  }

  .welcome-banner-right {
    align-self: center;
    max-width: 130px;
  }

  .welcome-banner-datetime {
    font-size: 0.7rem;
  }
}

/* ---------- Scrollbar Styles ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ---------- Selection Styles ---------- */
::selection {
  background: rgba(8, 145, 178, 0.2);
  color: var(--gray-900);
}

/* ---------- Focus Visible Styles ---------- */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Print Styles ---------- */
@media print {
  .navbar,
  .offcanvas,
  .sidebar-toggle,
  .btn {
    display: none !important;
  }

  main.flex-fill {
    padding: 0 !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}


/* =====================================================
   BRAND OVERRIDE — BLUE & WHITE MEDICAL THEME
   ===================================================== */

/* ---------- GLOBAL FONT ---------- */
html, body,
button, input, select, textarea {
  font-family: "Open Sans", sans-serif !important;
}

/* ---------- COLOR TOKENS ---------- */
:root {
  --primary: #1363C6;
  --primary-dark: #0f52a5;
  --primary-light: #3b82f6;

  /* Kill purple gradients */
  --primary-gradient: linear-gradient(135deg, #1363C6 0%, #1363C6 100%);
  --primary-gradient-hover: linear-gradient(135deg, #0f52a5 0%, #0f52a5 100%);

  --accent: #1363C6;
  --accent-gradient: linear-gradient(135deg, #1363C6, #1363C6);
}

/* ---------- BODY BACKGROUND ---------- */
body {
  background-color: #f4f7fb !important;
  background-image: none !important;
}

/* Remove floating decorative SVGs */
body::before,
body::after,
.main-wrapper::before,
.main-wrapper::after {
  display: none !important;
}

/* ---------- NAVBAR ---------- */
.navbar {
  background: #1363C6 !important;
  box-shadow: 0 6px 18px rgba(19, 99, 198, 0.35) !important;
}

.navbar::before,
.navbar::after {
  display: none !important;
}

.navbar-brand,
.navbar .me-3 {
  color: #ffffff !important;
}

/* Sidebar toggle */
.sidebar-toggle {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}

/* Logout */
.navbar .btn-outline-danger {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar .btn-outline-danger:hover {
  background: #dc2626 !important;
}

/* ---------- SIDEBAR ---------- */
.offcanvas {
  background: #0f172a !important; /* medical dark blue */
}

.offcanvas::before,
.offcanvas::after {
  display: none !important;
}

.offcanvas .nav-link.active {
  background: #1363C6 !important;
  box-shadow: none !important;
}

.offcanvas .nav-link::before {
  background: #ffffff !important;
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  background: #1363C6 !important;
  box-shadow: 0 4px 14px rgba(19, 99, 198, 0.35) !important;
}

.btn-primary:hover {
  background: #0f52a5 !important;
}

.btn-outline-primary {
  border-color: #1363C6 !important;
  color: #1363C6 !important;
}

.btn-outline-primary:hover {
  background: #1363C6 !important;
  color: #ffffff !important;
}

/* ---------- CARDS ---------- */
.card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

.card::before {
  display: none !important;
}

/* ---------- TABLE ---------- */
.table thead th {
  background: #1363C6 !important;
}

.table thead th::after {
  display: none !important;
}

/* ---------- FORM FOCUS ---------- */
.form-control:focus,
.form-select:focus {
  border-color: #1363C6 !important;
  box-shadow: 0 0 0 3px rgba(19, 99, 198, 0.2) !important;
}

/* ---------- SELECTION ---------- */
::selection {
  background: rgba(19, 99, 198, 0.2);
}
