/* ==============================================================================
   GRYGORCEWICZ.PL — NOWOCZESNY DESIGN SYSTEM STOMATOLOGICZNY (CSS3)
   Aesthetics: State-of-the-Art Medical UI, Glassmorphism, Micro-Animations,
   Vibrant Gradients, Fluid Typography, Touch & Responsive First, WCAG AAA.
   ============================================================================== */

/* --- Custom Properties & Design Tokens --- */
:root {
  /* Brand Palette - Deep Sky & Luminous Cyan */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-dark: #075985;
  --primary-light: #e0f2fe;
  --primary-subtle: #f0f9ff;
  --primary-glow: rgba(2, 132, 199, 0.28);

  /* Medical Teal & Vitality Mint */
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-light: #ccfbf1;
  --accent-subtle: #f0fdfa;
  --accent-glow: rgba(13, 148, 136, 0.28);

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

  /* Semantic Alerts */
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;

  /* Modern Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Dynamic Multi-Layer Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.09), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 24px 48px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 35px -5px rgba(2, 132, 199, 0.35);
  --shadow-glow-accent: 0 0 35px -5px rgba(13, 148, 136, 0.35);

  /* Glassmorphism Tokens */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-bg-dark: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-border-dark: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(16px);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-w-content: 1240px;

  /* Transitions & Easings */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--slate-800);
  background-color: var(--slate-50);
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background-color: #f8fafc;
}

body.panel-page {
  background-color: #f1f5f9 !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-bottom: 0 !important;
  min-height: 100vh !important;
}

/* Background Ambient Glow Spots (Subtle Medical Mesh) */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.07) 0%, rgba(2, 132, 199, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.06) 0%, rgba(13, 148, 136, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--slate-900);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p {
  color: var(--slate-600);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.25s var(--ease-smooth);
}
a:hover {
  color: var(--primary-hover);
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top 0.2s var(--ease-smooth);
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}
.skip-link:focus {
  top: 20px;
}

/* Layout Containers */
.container, .site-container {
  width: 100%;
  max-width: var(--max-w-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 1;
}

/* ==============================================================================
   KEYFRAME ANIMATIONS & UTILITIES
   ============================================================================== */

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

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

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

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-9px) rotate(0.4deg);
  }
}

@keyframes floatSlowReverse {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(7px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(2, 132, 199, 0);
  }
}

@keyframes livePulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 9px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-150%);
  }
  100% {
    transform: translateX(150%);
  }
}

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

/* Scroll Reveal Classes */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s var(--ease-smooth), transform 0.75s var(--ease-smooth);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays */
.delay-100 { transition-delay: 0.1s; animation-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; animation-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; animation-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; animation-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; animation-delay: 0.5s; }

/* Text Gradient Accents */
.text-gradient {
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Pulsing Online Dot */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  animation: livePulse 2s infinite ease-in-out;
}

/* Floating Elements Utility */
.float-element {
  animation: floatSlow 6s ease-in-out infinite;
}
.float-element-rev {
  animation: floatSlowReverse 5.5s ease-in-out infinite;
}

/* ==============================================================================
   DIAGONAL CUTS, ASYMMETRICAL GEOMETRY & EDITORIAL BLOCKS (Nicepage Style)
   ============================================================================== */

/* Section Slanted Cuts */
.section-slant-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%);
  padding-bottom: 120px !important;
}

.section-slant-top {
  clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 100%);
  padding-top: 120px !important;
}

.section-slant-both {
  clip-path: polygon(0 60px, 100% 0, 100% calc(100% - 60px), 0 100%);
  padding-top: 120px !important;
  padding-bottom: 120px !important;
}

.section-slant-reverse {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 60px));
}

/* Slanted Tag & Badges */
.slant-tag {
  display: inline-flex;
  align-items: center;
  transform: skewX(-12deg);
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  margin-bottom: 16px;
}
.slant-tag > * {
  transform: skewX(12deg);
}

.slant-badge-dark {
  display: inline-flex;
  align-items: center;
  transform: skewX(-12deg);
  background: #0f172a;
  color: #38bdf8;
  padding: 5px 14px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.slant-badge-dark > * {
  transform: skewX(12deg);
}

/* Asymmetric & Chamfered Cards (Technologiczne cięte formy) */
.card-chamfer {
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
  position: relative;
  transition: all 0.35s var(--ease-smooth);
}
.card-chamfer:hover {
  transform: translateY(-8px);
}

.card-asymmetric {
  border-radius: 40px 6px 40px 6px !important;
}

.card-asymmetric-rev {
  border-radius: 6px 40px 6px 40px !important;
}

/* Angled Photo Frame with Glowing Offset Slab */
.angled-photo-frame {
  position: relative;
  width: 100%;
  z-index: 1;
}
.angled-photo-frame::before {
  content: '';
  position: absolute;
  top: -14px;
  left: -14px;
  right: 14px;
  bottom: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  clip-path: polygon(0 0, 100% 3%, 97% 100%, 0 97%);
  border-radius: 28px;
  z-index: -1;
  transition: transform 0.4s var(--ease-smooth);
  box-shadow: 0 15px 35px -5px rgba(2, 132, 199, 0.3);
}
.angled-photo-frame:hover::before {
  transform: translate(-6px, -6px) rotate(-1deg);
}
.angled-photo-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 24px;
  display: block;
  box-shadow: var(--shadow-xl);
  clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
  position: relative;
  z-index: 1;
}

/* Nicepage 29405 Inspired: 4 Bold Characteristic Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}
.pillar-card {
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: 24px 6px 24px 6px;
  padding: 34px 24px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 30px -8px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  transition: all 0.35s var(--ease-smooth);
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}
.pillar-card:hover {
  transform: translateY(-10px) rotate(-0.5deg);
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: 0 24px 48px -10px rgba(2, 132, 199, 0.22);
}
.pillar-num {
  position: absolute;
  top: 12px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  color: #e2e8f0;
  line-height: 1;
  pointer-events: none;
  transition: all 0.3s ease;
  user-select: none;
}
.pillar-card:hover .pillar-num {
  color: rgba(2, 132, 199, 0.28);
  transform: scale(1.1) translateY(-2px);
}
.pillar-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 14px 4px 14px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}
.pillar-card:hover .pillar-icon-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  transform: rotate(6deg) scale(1.08);
}
.pillar-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 10px;
  line-height: 1.25;
}
.pillar-desc {
  font-size: 0.925rem;
  color: var(--slate-600);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}
.pillar-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}
.pillar-card:hover .pillar-link {
  gap: 10px;
  color: var(--primary-hover);
}

/* Floating Quote Ribbon */
.quote-ribbon {
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  backdrop-filter: blur(16px);
  border-radius: 16px 4px 16px 4px;
  border-left: 4px solid var(--accent);
  padding: 18px 22px;
  box-shadow: var(--shadow-xl);
  font-size: 0.95rem;
  line-height: 1.5;
  font-style: italic;
  position: absolute;
  bottom: -24px;
  left: 20px;
  right: 20px;
  z-index: 4;
}

@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -30px;
  }
  .section-slant-bottom {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 35px), 0 100%);
    padding-bottom: 80px !important;
  }
  .section-slant-top {
    clip-path: polygon(0 35px, 100% 0, 100% 100%, 0 100%);
    padding-top: 80px !important;
  }
}

@media (max-width: 640px) {
  .pillars-grid {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }
  .section-slant-bottom,
  .section-slant-top,
  .section-slant-both {
    clip-path: none;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }
}

/* ==============================================================================
   HEADER & TOP BAR NAVIGATION
   ============================================================================== */

.top-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: var(--slate-300);
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 60;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.top-bar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 12px;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
}
.top-bar-sep {
  color: rgba(255, 255, 255, 0.25);
  user-select: none;
  font-size: 0.85rem;
}
.top-bar a {
  color: var(--slate-300);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.top-bar a:hover {
  color: var(--white);
}
.top-bar .patient-zone-link {
  color: #38bdf8;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: all 0.2s ease;
}
.top-bar .patient-zone-link:hover {
  background: rgba(56, 189, 248, 0.25);
  color: var(--white);
}

/* Language Switcher Pill in Top Bar */
.top-bar .lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  font-size: 0.825rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 2px 7px;
  line-height: 1.2;
}
.top-bar .lang-switch a {
  color: var(--slate-300);
  text-decoration: none;
  padding: 2px 5px;
  border-radius: 3px;
  transition: all 0.2s ease;
  font-weight: 700;
}
.top-bar .lang-switch a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}
.top-bar .lang-switch a.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.22);
  font-weight: 800;
}
.top-bar .lang-switch-sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  user-select: none;
}

/* Sticky Glass Nav Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.35s var(--ease-smooth);
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.1);
  border-bottom-color: rgba(203, 213, 225, 0.6);
}
.site-header.scrolled .nav-row {
  height: 68px;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  transition: height 0.3s var(--ease-smooth);
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  group: true;
}
.brand-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b132b 0%, #1e293b 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  box-shadow: 0 6px 18px -3px rgba(2, 132, 199, 0.3);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}
.brand-logo:hover .brand-logo-icon {
  transform: scale(1.06) rotate(3deg);
  border-color: #38bdf8;
  box-shadow: 0 10px 25px -2px rgba(56, 189, 248, 0.45);
  color: #ffffff;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--slate-900);
  letter-spacing: 0.04em;
  line-height: 1.15;
}
.brand-name-light {
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.06em;
}
.brand-subtitle {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--slate-500);
  letter-spacing: 0.02em;
  display: block;
  margin-top: 2px;
}

/* Authentic Graphic Watermarks & Card Wave Accents */
.hero-brand-watermark {
  position: absolute;
  top: -40px;
  right: -60px;
  width: 580px;
  height: 580px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-10deg);
}
.hero-watermark-img {
  width: 100%;
  height: 100%;
  color: var(--primary);
}
.brand-wave-accent {
  position: relative;
  overflow: hidden;
}
.brand-wave-accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 120px;
  height: 48px;
  background: radial-gradient(circle at 0% 100%, rgba(2, 132, 199, 0.18) 0%, rgba(13, 148, 136, 0.1) 60%, transparent 80%);
  border-radius: 0 48px 0 0;
  pointer-events: none;
}

/* Navigation Links */
.site-nav {
  display: flex;
  align-items: center;
  flex-shrink: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: clamp(8px, 1.3vw, 20px);
  flex-wrap: nowrap;
}
.nav-links li {
  flex-shrink: 0;
}
.nav-links a {
  color: var(--slate-700);
  font-weight: 600;
  font-size: 0.885rem;
  padding: 6px 2px;
  position: relative;
  transition: color 0.25s var(--ease-smooth);
  white-space: nowrap !important;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-smooth);
}
.nav-links a:hover {
  color: var(--primary);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a.active {
  color: var(--primary);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-cta #btnHeaderBook {
  white-space: nowrap !important;
  padding: 10px 18px;
  font-size: 0.9rem;
  min-height: 42px;
}

/* Mobile Toggle Hamburger */
.nav-toggle-btn {
  display: none;
  width: 44px;
  height: 44px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--slate-800);
  transition: all 0.2s ease;
}
.nav-toggle-btn:hover {
  background: var(--slate-200);
}

/* Mobile Menu Drawer (Fullscreen App-Like Experience) */
.mobile-menu-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  z-index: 99999;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  overflow: hidden;
}

.mobile-menu-drawer.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

body.mobile-menu-open {
  overflow: hidden !important;
  touch-action: none;
}

body.mobile-menu-open .sticky-mobile-cta {
  display: none !important;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.mobile-close-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--slate-100);
  color: var(--slate-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-close-btn:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.lang-switch-mobile {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  background: var(--slate-100);
  border-radius: 20px;
  border: 1px solid var(--slate-200);
}

.lang-switch-mobile a {
  color: var(--slate-500);
  text-decoration: none;
}

.lang-switch-mobile a.active {
  color: var(--primary);
  font-weight: 800;
}

.mobile-menu-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-cta-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.07) 0%, rgba(14, 165, 233, 0.12) 100%);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
}

.btn-mobile-main {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.975rem;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.25);
}

.btn-mobile-sub {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  background: #ffffff;
  border: 1px solid var(--slate-300);
  color: var(--slate-800);
}

.mobile-menu-section-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-top: 10px;
  margin-bottom: -6px;
  padding-left: 4px;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--slate-800);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  text-decoration: none;
  transition: all 0.15s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(2, 132, 199, 0.35);
}

.mobile-menu-footer {
  margin-top: 12px;
  padding: 18px;
  background: var(--slate-100);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--slate-600);
}

.mobile-footer-phone {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mobile-footer-addr,
.mobile-footer-hours {
  line-height: 1.45;
}

/* ==============================================================================
   BUTTONS & CALL TO ACTION
   ============================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.975rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  min-height: 48px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s var(--ease-smooth);
  user-select: none;
}
.btn:active {
  transform: scale(0.97);
}

/* Primary Button with Glowing Hover & Shimmer */
.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  color: var(--white);
  box-shadow: 0 8px 24px -2px rgba(2, 132, 199, 0.5);
  transform: translateY(-2px);
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  transition: none;
}
.btn-primary:hover::after {
  animation: shimmer 1s ease-in-out;
}

/* Accent Button */
.btn-accent {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(13, 148, 136, 0.35);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: var(--white);
  box-shadow: 0 8px 24px -2px rgba(13, 148, 136, 0.5);
  transform: translateY(-2px);
}

/* Outline Buttons */
.btn-outline {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--slate-300);
  color: var(--slate-700);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: var(--white);
  border-color: var(--slate-400);
  color: var(--slate-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: var(--white);
}
.btn-danger:hover {
  background: #b91c1c;
  color: var(--white);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  min-height: 38px;
  border-radius: var(--radius-sm);
}

.btn-pulse {
  animation: pulseGlow 2.5s infinite;
}

/* ==============================================================================
   HERO SECTION (High-Tech Modern Medical Aesthetic)
   ============================================================================== */

.hero-section {
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(13, 148, 136, 0.07) 0%, transparent 45%),
              linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--slate-200);
}

/* Background Animated Grid Pattern */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.2);
  color: var(--primary-hover);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.06);
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.12;
  font-weight: 900;
  color: var(--slate-900);
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.hero-title span {
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-lead {
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--slate-600);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 36px;
}

/* Trust Bar / Social Proof under Hero Actions */
.hero-trust-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}
.hero-rating-stars {
  color: #f59e0b;
  font-size: 0.95rem;
  letter-spacing: 2px;
}
.hero-trust-text {
  font-size: 0.875rem;
  color: var(--slate-600);
  font-weight: 500;
}
.hero-trust-text strong {
  color: var(--slate-900);
}

/* Hero Glass Booking Card */
.hero-card-wrapper {
  position: relative;
}

.hero-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 36px;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12),
              0 0 0 1px rgba(255, 255, 255, 0.9),
              0 0 40px rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 2;
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s ease;
}
.hero-card:hover {
  box-shadow: 0 28px 56px -12px rgba(15, 23, 42, 0.16),
              0 0 50px rgba(2, 132, 199, 0.12);
}

.hero-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Floating Badges around Hero Card */
.floating-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-800);
  z-index: 3;
}
.floating-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.8rem;
}
.floating-badge-top {
  top: -20px;
  right: -16px;
  animation: floatSlow 5s ease-in-out infinite;
}
.floating-badge-bottom {
  bottom: -20px;
  left: -20px;
  animation: floatSlowReverse 5.5s ease-in-out infinite;
}

/* ==============================================================================
   FEATURE HIGHLIGHTS STRIP
   ============================================================================== */

.features-strip {
  padding: 48px 0;
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  position: relative;
  z-index: 2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: all 0.3s var(--ease-smooth);
}
.feature-item:hover {
  background: var(--slate-50);
  border-color: rgba(2, 132, 199, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.06);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12) 0%, rgba(13, 148, 136, 0.12) 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-spring), background 0.3s;
}
.feature-item:hover .feature-icon {
  transform: scale(1.1) rotate(4deg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}
.feature-desc {
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.5;
}

/* ==============================================================================
   SERVICES SECTION & CARDS
   ============================================================================== */

.section-py {
  padding: 96px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.65rem;
  font-weight: 900;
  color: var(--slate-900);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1.15rem;
  color: var(--slate-600);
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-smooth);
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.12),
              0 0 30px rgba(2, 132, 199, 0.08);
}
.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform 0.3s var(--ease-spring);
}
.service-card:hover .service-icon {
  transform: scale(1.12);
}

.service-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 10px;
}

.service-card-desc {
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--slate-100);
  font-size: 0.9rem;
  color: var(--slate-500);
}

.service-price {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--slate-900);
  font-size: 1.2rem;
}

/* ==============================================================================
   CALLOUTS & ALERTS
   ============================================================================== */

.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeInDown 0.4s var(--ease-smooth);
}
.alert-success {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-error {
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-warning {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}
.alert-info {
  background: var(--primary-light);
  color: #075985;
  border: 1px solid #bae6fd;
}

/* ==============================================================================
   BADGES & STATUS PILLS
   ============================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-confirmed { background: var(--success-light); color: #065f46; }
.badge-pending { background: var(--warning-light); color: #92400e; }
.badge-arrived { background: var(--primary-light); color: #075985; }
.badge-in_progress { background: #e0f2fe; color: #0369a1; }
.badge-completed { background: var(--slate-200); color: var(--slate-700); }
.badge-cancelled { background: var(--danger-light); color: #991b1b; }
.badge-critical { background: var(--danger-light); color: #991b1b; }

/* ==============================================================================
   FORMS & INPUTS
   ============================================================================== */

.form-group {
  margin-bottom: 22px;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-size: 0.975rem;
  font-family: var(--font-sans);
  color: var(--slate-900);
  background: var(--white);
  transition: all 0.2s var(--ease-smooth);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
  background: var(--white);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* ==============================================================================
   FDI ODONTOGRAM (Interactive Touch/Chairside Dental Chart)
   ============================================================================== */

.odontogram-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
}
.odontogram-arch {
  margin-bottom: 28px;
}
.arch-label {
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin-bottom: 14px;
  text-align: center;
}
.teeth-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 6px;
}
.tooth-card {
  width: 58px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  background: var(--slate-50);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  user-select: none;
}
.tooth-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 8px 16px -4px rgba(2, 132, 199, 0.25);
}
.tooth-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.35);
  transform: scale(1.06);
}
.tooth-number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--slate-800);
}
.tooth-crown-svg {
  width: 44px;
  height: 44px;
  margin: 6px auto;
}
.tooth-surface {
  fill: #f8fafc;
  stroke: #94a3b8;
  stroke-width: 1.5;
  transition: fill 0.2s var(--ease-smooth);
}
.tooth-surface:hover {
  fill: #bae6fd;
}
.tooth-surface.caries { fill: #ef4444; }
.tooth-surface.filling { fill: #0284c7; }
.tooth-surface.endo { fill: #0891b2; }
.tooth-surface.fracture { fill: #ea580c; }
.tooth-surface.crown { fill: #f59e0b; }

/* ==============================================================================
   STICKY MOBILE ACTION BAR
   ============================================================================== */

.sticky-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--slate-200);
  padding: 12px 18px;
  z-index: 55;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.08);
}

/* ==============================================================================
   FOOTER (Modern Dark Canvas)
   ============================================================================== */

.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #090d16 100%);
  color: var(--slate-300);
  padding: 80px 0 40px;
  margin-top: auto;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.3), rgba(45, 212, 191, 0.3), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.15fr 1.15fr 1.5fr;
  gap: clamp(24px, 3.5vw, 48px);
  margin-bottom: 56px;
  width: 100%;
}
.footer-title {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 11px;
}
.footer-links a {
  color: var(--slate-400);
  transition: all 0.2s ease;
  display: inline-block;
  font-size: 0.925rem;
}
.footer-links a:hover {
  color: var(--white);
  transform: translateX(4px);
}
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--slate-400);
  width: 100%;
}
.footer-bottom-left {
  text-align: left;
  flex: 1 1 320px;
  color: var(--slate-400);
}
.footer-bottom-right {
  text-align: right;
  flex: 1 1 320px;
  margin-left: auto;
  color: var(--slate-400);
}

/* ==============================================================================
   PANEL & DASHBOARD LAYOUTS (Doctor, Reception, Patient Portal, Admin)
   ============================================================================== */

.panel-backdrop {
  display: none;
}
.panel-mobile-toggle-btn {
  display: none;
}
.panel-sidebar-close {
  display: none;
}
.panel-topbar-logout-form {
  display: none;
}

/* Clinical EDM Header Base Rules */
.clinical-topbar {
  background: var(--slate-900);
  color: var(--white);
  padding: 12px 24px;
}
.clinical-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.clinical-brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
}
.clinical-desktop-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.clinical-desktop-nav .btn {
  color: var(--white);
  border-color: var(--slate-700);
}
.clinical-user-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.clinical-doctor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary-light);
}
.clinical-logout-btn {
  color: var(--slate-300);
  border-color: var(--slate-700);
}
.clinical-toggle-btn {
  display: none;
}
.clinical-touch-ribbon {
  display: none;
}
.clinical-mobile-drawer {
  display: none;
}
.clinical-backdrop {
  display: none;
}

.panel-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
}

.panel-sidebar {
  width: 270px;
  background: linear-gradient(180deg, #0f172a 0%, #090d16 100%);
  color: var(--slate-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.3s var(--ease-smooth);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-sidebar-header {
  padding: 26px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-sidebar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

.panel-sidebar-menu {
  list-style: none;
  padding: 20px 14px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--slate-300);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s var(--ease-smooth);
}
.panel-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  transform: translateX(4px);
}
.panel-sidebar-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.panel-sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--slate-400);
  background: rgba(0, 0, 0, 0.2);
}
.panel-sidebar-footer .btn {
  background: rgba(239, 68, 68, 0.14) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}
.panel-sidebar-footer .btn:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.panel-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel-topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--slate-200);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.panel-topbar-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--slate-900);
}

.panel-user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.panel-content {
  padding: 32px;
  flex-grow: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s var(--ease-smooth);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(2, 132, 199, 0.25);
}

.stat-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.1;
}

.stat-card-desc {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-top: 10px;
}

/* Data Table Card */
.data-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 32px;
}

.data-card-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
}

.data-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--slate-900);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-weight: 700;
  padding: 14px 24px;
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-800);
  vertical-align: middle;
}

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

/* Modern Tab Navigation */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--slate-200);
  margin-bottom: 28px;
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slate-500);
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--ease-smooth);
  margin-bottom: -2px;
}
.tab-btn:hover {
  color: var(--primary);
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ==============================================================================
   AUTHENTICATION & PORTAL LOGIN STYLES
   ============================================================================== */
#main-content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.auth-page-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  background: radial-gradient(circle at 50% 25%, rgba(2, 132, 199, 0.05) 0%, transparent 60%),
              linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  width: 100%;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7 0%, #0d9488 100%);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 26px;
}

.auth-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px -4px rgba(2, 132, 199, 0.25);
}

.auth-card-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-card-subtitle {
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.45;
}

/* Modern Segmented Control for Tabs (Zero overflow, zero scrollbars) */
.auth-segmented-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--slate-100);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.auth-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--slate-600);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  font-family: var(--font-sans);
  text-align: center;
  line-height: 1.25;
  user-select: none;
}

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

.auth-tab-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.auth-tab-btn .tab-badge {
  display: block;
  font-size: 0.725rem;
  font-weight: 500;
  opacity: 0.85;
}

.auth-pane {
  animation: fadeInUp 0.25s var(--ease-smooth);
}

/* Touch Chairside Action Controls */
.touch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.touch-action-btn {
  padding: 18px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-800);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s var(--ease-smooth);
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.touch-action-btn:hover, .touch-action-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
  animation: fadeInScale 0.25s var(--ease-smooth);
}
.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--slate-200);
}

/* ==============================================================================
   RESPONSIVE QUERIES
   ============================================================================== */

@media (max-width: 1280px) {
  .brand-subtitle {
    display: none;
  }
}

@media (max-width: 1160px) {
  .nav-links {
    display: none !important;
  }
  .nav-toggle-btn {
    display: flex !important;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-title {
    font-size: 2.75rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  body:not(.panel-page) {
    padding-bottom: 74px !important;
  }
  .nav-cta #btnHeaderBook {
    display: none !important;
  }
  .top-bar {
    padding: 6px 0;
  }
  .top-bar-row {
    font-size: 0.78rem;
    gap: 6px;
  }
  .top-bar-hours {
    display: none;
  }
  .top-bar-left {
    gap: 6px;
  }
  .top-bar-right {
    gap: 8px;
  }
  .top-bar .lang-switch {
    font-size: 0.75rem;
    padding: 1px 6px;
  }
  .footer-bottom-left,
  .footer-bottom-right {
    text-align: center;
    margin-left: 0;
    width: 100%;
  }
  .section-py {
    padding: 48px 0;
  }
  .hero-section {
    padding: 32px 0 48px;
  }
  .hero-title {
    font-size: 2.15rem;
    line-height: 1.25;
  }
  .hero-lead {
    font-size: 1.05rem;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-quick-booking-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 16px !important;
  }
  .hero-visual {
    width: 100%;
    max-width: 100%;
  }
  .hero-img-main {
    max-height: 340px;
    object-fit: cover;
    width: 100%;
  }

  /* Inline grid collapse for responsive mobile views */
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 2fr 1fr"],
  div[style*="grid-template-columns: 1fr 2fr"],
  div[style*="grid-template-columns: auto 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Sticky Bottom Bar for Smartphones */
  .sticky-mobile-cta {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--slate-200);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    padding: 10px 16px;
    gap: 10px;
    z-index: 999;
    align-items: center;
    justify-content: space-between;
  }
  .sticky-mobile-cta .btn {
    flex: 1;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    width: auto !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  body.panel-drawer-open,
  body.clinical-drawer-open {
    overflow: hidden !important;
    touch-action: none;
  }

  .panel-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .panel-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .panel-mobile-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-300);
    background: var(--white);
    color: var(--slate-800);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  .panel-mobile-toggle-btn:hover {
    background: var(--slate-100);
  }

  .panel-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .panel-topbar-logout-form {
    display: block;
  }

  .panel-topbar-date {
    display: none !important;
  }

  .panel-topbar-web-btn .panel-topbar-btn-text {
    display: none;
  }
  .panel-topbar-web-btn {
    padding: 8px 10px;
  }

  .panel-wrapper {
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
  }

  /* Off-canvas slide-out sheet on mobile */
  .panel-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 86%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  .panel-sidebar.mobile-open {
    transform: translateX(0);
  }

  .panel-sidebar-header {
    padding: 16px 20px;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
  }

  .panel-sidebar-menu {
    flex-direction: column;
    overflow-y: auto;
    padding: 14px 12px;
    gap: 6px;
    flex-grow: 1;
  }

  .panel-sidebar-link {
    padding: 11px 14px;
    font-size: 0.9rem;
    white-space: normal;
    border-radius: var(--radius-md);
  }

  .panel-sidebar-footer {
    display: block !important;
    margin-top: auto;
    padding: 16px 18px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
  }

  .panel-topbar {
    padding: 12px 14px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }
  .panel-topbar-title {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .panel-user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .panel-content {
    padding: 16px 12px 32px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Clinical EDM Navigation for Mobile / Tablet */
  .clinical-topbar {
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  .clinical-topbar-row {
    padding: 10px 14px;
  }
  .clinical-desktop-nav {
    display: none !important;
  }
  .clinical-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    cursor: pointer;
  }
  .clinical-brand-logo {
    font-size: 1.05rem;
  }
  .clinical-doctor-name {
    display: none;
  }
  .clinical-doctor-badge {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
  }
  .clinical-logout-text {
    display: none;
  }
  .clinical-logout-icon {
    display: inline-block;
  }
  .clinical-logout-btn {
    padding: 6px 10px;
    min-height: 34px;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
  }

  .clinical-touch-ribbon {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: none;
  }
  .clinical-touch-ribbon::-webkit-scrollbar {
    display: none;
  }
  .touch-ribbon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--slate-300);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  .touch-ribbon-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
  }

  .clinical-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .clinical-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .clinical-mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 86%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: #0f172a;
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
  }
  .clinical-mobile-drawer.active {
    transform: translateX(0);
  }

  .clinical-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
  }
  .clinical-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    cursor: pointer;
  }
  .clinical-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .clinical-doctor-card {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
  }
  .clinical-drawer-section-label {
    font-size: 0.725rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate-400);
    margin-top: 8px;
    margin-bottom: -4px;
    padding-left: 4px;
  }
  .clinical-drawer-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
  }
  .clinical-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate-300);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: all 0.2s ease;
  }
  .clinical-drawer-link:hover,
  .clinical-drawer-link.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
  }

  /* Responsive Odontogram for smartphones */
  .odontogram-container {
    padding: 14px 10px;
    border-radius: var(--radius-lg);
    overflow-x: hidden;
  }
  .teeth-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding: 8px 4px;
    gap: 6px;
    scrollbar-width: thin;
  }
  .tooth-card {
    width: 48px;
    padding: 6px 2px;
    flex-shrink: 0;
  }
  .tooth-card svg {
    width: 32px;
    height: 32px;
  }
  .tooth-card-number {
    font-size: 0.75rem;
  }

  /* Responsive Tabs Nav */
  .tabs-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .tabs-nav::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Responsive Tables & Grids */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
  }
  .stat-card {
    padding: 18px 20px;
  }
  .stat-card-value {
    font-size: 1.85rem;
  }

  /* Forms & Modals */
  .modal-dialog,
  #toothModal > div,
  #addAlertModal > div,
  #quickBookingModal > div {
    max-width: 95vw !important;
    margin: 16px auto !important;
    padding: 20px 16px !important;
  }
  .calendar-toolbar {
    padding: 14px 16px !important;
  }
  .calendar-toolbar > div {
    flex-direction: column;
    align-items: stretch !important;
  }
  .calendar-toolbar select,
  .calendar-toolbar input[type="date"] {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-logo-icon {
    width: 38px;
    height: 38px;
  }
  .sticky-mobile-cta .btn {
    padding: 10px 8px !important;
    font-size: 0.82rem !important;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .panel-sidebar-brand {
    font-size: 1rem;
  }
  .panel-topbar {
    padding: 10px 12px;
  }
  .panel-content {
    padding: 12px 10px;
  }
  .data-card {
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
  }
  .data-card-header {
    padding: 16px 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .tab-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  .tooth-card {
    width: 44px;
    padding: 4px 2px;
  }
  .btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
}

/* ==============================================================================
   PAGINATION STYLING (Uniwersalna czysta paginacja, brak rozjeżdżania)
   ============================================================================== */
.pagination-wrapper {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.pagination-btn:hover:not(.disabled) {
  background: var(--slate-50);
  border-color: var(--primary);
  color: var(--primary);
}
.pagination-btn.disabled {
  color: var(--slate-400) !important;
  background: #f1f5f9 !important;
  border-color: var(--slate-200) !important;
  cursor: not-allowed !important;
  user-select: none;
}
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination-page:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--slate-50);
}
.pagination-page.active {
  background: var(--primary, #0284c7) !important;
  border-color: var(--primary, #0284c7) !important;
  color: var(--white) !important;
  font-weight: 700;
}
/* Zabezpieczenie przed gigantycznymi SVG */
nav[role="navigation"] svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  display: inline-block !important;
}

/* ==============================================================================
   LAPTOP-FIRST REGISTRATION & RECEPTION OPTIMIZATION + MOBILE/TABLET ERGONOMICS
   ============================================================================== */

/* Domyślnie dolny pasek mobilny jest ukryty na laptopach i desktopach */
.mobile-bottom-nav {
  display: none;
}

/* --- OPTYMALIZACJA DLA EKRANU LAPTOPA (1024px+ : 13" - 15.6" 1366x768 / 1440x900 / 1080p) --- */
@media (min-width: 1024px) {
  .booking-laptop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(380px, 0.95fr);
    gap: 28px;
    align-items: start;
  }

  .booking-step-1 {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0 !important;
  }

  .booking-step-3 {
    grid-column: 1;
    grid-row: 2;
    margin-bottom: 0 !important;
  }

  .booking-step-2 {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0 !important;
  }

  .booking-finalize {
    grid-column: 2;
    grid-row: 2;
    position: sticky;
    top: 96px;
  }

  /* Kompaktowa recepcja na typowym ekranie laptopa (1024px - 1536px) */
  @media (max-width: 1536px) {
    .panel-sidebar {
      width: 236px;
    }
    .panel-content {
      padding: 16px 20px;
    }
    .calendar-toolbar {
      padding: 12px 18px !important;
      margin-bottom: 14px !important;
    }
    .stats-grid {
      gap: 12px;
      margin-bottom: 16px !important;
    }
    .stat-card {
      padding: 14px 16px;
    }
    .stat-card-value {
      font-size: 1.55rem;
    }
  }
}

/* --- TABLET & SMARTFON (< 1024px) --- */
@media (max-width: 1023px) {
  .booking-laptop-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .booking-card-shell {
    padding: 22px 18px !important;
  }
  .touch-tool-btn,
  .touch-plan-btn {
    min-height: 42px;
  }
}

/* --- SMARTFONY & MAŁE TABLETY (<= 768px) --- */
@media (max-width: 768px) {
  body:not(.panel-page) {
    padding-bottom: 74px !important;
  }

  /* Automatyczne zwijanie 2-kolumnowych siatek inline do 1 kolumny na smartfonie */
  .responsive-2col-grid,
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 2fr 1fr"],
  div[style*="grid-template-columns: 90px 1fr 120px 140px 40px"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Ergonomiczne cele dotykowe (WCAG / Mobile Touch Target >= 44px) */
  .form-control,
  select.form-control,
  input.form-control {
    min-height: 44px;
    font-size: 16px; /* Zapobiega auto-zoomowi na iOS Safari */
  }

  /* Dolny pasek nawigacji kciukowej (Thumb-Zone Bottom Navigation Bar) */
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.25);
    z-index: 9990;
  }

  .mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 100%;
    color: var(--slate-400);
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
  }

  .mobile-bottom-nav-item .mobile-bottom-nav-icon {
    font-size: 1.2rem;
    line-height: 1.1;
  }

  .mobile-bottom-nav-item.active,
  .mobile-bottom-nav-item:hover {
    color: #38bdf8;
  }
}

/* ==============================================================================
   RECEPTION & TIMETABLE ERGONOMIC BUTTONS & COMPACT MODE
   ============================================================================== */
.btn-xs {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 0.8125rem !important; /* 13px */
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  gap: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-family: var(--font-sans) !important;
}

.btn-sm {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 0.875rem !important; /* 14px */
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  gap: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-family: var(--font-sans) !important;
}

body.timetable-compact-mode .timetable-grid th,
body.timetable-compact-mode .timetable-grid td {
  padding: 4px 6px !important;
  height: 38px !important;
}

body.timetable-compact-mode .appointment-card-grid {
  padding: 4px 8px !important;
  font-size: 0.775rem !important;
}

