/* ================= AI COMPLIANCE MODULE - MODERN UI/UX ================= */
/* Modern design system with enhanced accessibility and animations */

/* ================= GLOBAL FOCUS BORDER REMOVAL ================= */
/* Remove all focus borders and outlines from the entire application */
*:focus,
*:focus-visible,
*:focus-within {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

/* ================= HERO GRADIENT TEXT ================= */
.hero-gradient-text {
  background: linear-gradient(135deg, #0197da, #60a5fa);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: hero-gradient-smooth 8s ease-in-out infinite;
  will-change: opacity, transform, background-position;
  /* Entrance animation */
  opacity: 0;
  transform: translateY(30px);
  animation: heroTextEntrance 1s ease-out 0.3s forwards, hero-gradient-smooth 8s ease-in-out 1.3s infinite;
}

/* Hero text entrance animation */
@keyframes heroTextEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hospital name entrance animation */
.hospital-name-entrance {
  opacity: 0;
  transform: translateY(20px);
  animation: hospitalNameEntrance 0.8s ease-out forwards;
}

@keyframes hospitalNameEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-gradient-smooth {
  0% { 
    opacity: 1;
    transform: scale(1);
    background-position: 0% 0%;
  }
  25% {
    opacity: 0.9;
    transform: scale(1.005);
    background-position: 100% 0%;
  }
  50% { 
    opacity: 0.8;
    transform: scale(1.01);
    background-position: 100% 100%;
  }
  75% {
    opacity: 0.9;
    transform: scale(1.005);
    background-position: 0% 100%;
  }
  100% { 
    opacity: 1;
    transform: scale(1);
    background-position: 0% 0%;
  }
}

/* Additional Gradient Text Class from images/styles.css */
.gradient-text {
  background: linear-gradient(135deg, #0197da, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================= iOS 26 LIQUID GLASS EFFECTS ================= */
/* Modern frosted glass containers with light opacity and blur effects */

.liquid-glass-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-container:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  /* Transform effect removed */
}

.liquid-glass-dropdown {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-dropdown:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 
    0 8px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.liquid-glass-table {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.liquid-glass-table th {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.liquid-glass-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
}

.liquid-glass-table tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Enhanced glass effect for better visibility */
.liquid-glass-enhanced {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Chart container liquid glass effect */
.chart-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Chart container shimmer effect - removed */

/* Chart bar animations */
@keyframes chartBarGrow {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.chart-bar-animate {
  animation: chartBarGrow 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: bottom;
}

/* Enhanced chart hover effects */
canvas {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

canvas:hover {
  filter: brightness(1.05) saturate(1.1);
}

/* iOS 26 Liquid Glass Animation Effects - shimmer removed */

/* Liquid glass container shimmer effect - removed */

/* Ensure proper positioning for pseudo-elements */
.liquid-glass-container,
.liquid-glass-dropdown {
  position: relative;
  overflow: hidden;
}

/* Enhanced text contrast for better readability */
.liquid-glass-container *,
.liquid-glass-dropdown * {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Smooth transitions for all interactive elements */
.liquid-glass-container *,
.liquid-glass-dropdown *,
.liquid-glass-table * {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced summary styling for dropdown */
.liquid-glass-dropdown summary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-dropdown summary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.liquid-glass-dropdown[open] summary {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* EP Score Display Enhancements */
.score-percent {
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.025em;
}

/* Overall Score Percentage Display */
#scorePercent {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease-in-out;
}

/* Overall Score Label Display */
#scoreLabel {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: color 0.3s ease-in-out;
  font-weight: normal !important;
  color: #6b7280; /* Start with gray color */
}

.score-bar-fill {
  transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

/* Score Select Dropdown Styling */
.score-select {
  background-color: #1f2937; /* dark gray background */
  color: #f9fafb; /* light text */
  border: 2px solid #374151; /* darker border */
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  width: 100%;
  transition: all 0.2s ease-in-out;
}

/* Score color coding - these override the base styling with higher specificity */
select.score-select.score-satisfactory {
  background-color: #065f46 !important; /* dark green */
  color: #d1fae5 !important; /* light green text */
  border-color: #10b981 !important; /* green border */
}

select.score-select.score-partial {
  background-color: #92400e !important; /* dark yellow/orange */
  color: #fef3c7 !important; /* light yellow text */
  border-color: #f59e0b !important; /* yellow border */
}

select.score-select.score-insufficient {
  background-color: #991b1b !important; /* dark red */
  color: #fecaca !important; /* light red text */
  border-color: #ef4444 !important; /* red border */
}

/* Ensure color classes override any other styling */
.score-select[class*="score-satisfactory"] {
  background-color: #065f46 !important;
  color: #d1fae5 !important;
  border-color: #10b981 !important;
}

.score-select[class*="score-partial"] {
  background-color: #92400e !important;
  color: #fef3c7 !important;
  border-color: #f59e0b !important;
}

.score-select[class*="score-insufficient"] {
  background-color: #991b1b !important;
  color: #fecaca !important;
  border-color: #ef4444 !important;
}

/* N/A value styling - distinct purple/violet theme for visibility */
.score-select.score-na {
  background-color: #581c87 !important; /* dark purple background */
  color: #e9d5ff !important; /* light purple text */
  border-color: #8b5cf6 !important; /* purple border */
}

/* Ensure N/A styling overrides base styling */
select.score-select.score-na {
  background-color: #581c87 !important;
  color: #e9d5ff !important;
  border-color: #8b5cf6 !important;
}

.score-select[class*="score-na"] {
  background-color: #581c87 !important;
  color: #e9d5ff !important;
  border-color: #8b5cf6 !important;
}

/* Default/Unselected state - ensure no color highlighting */
.score-select:not(.score-satisfactory):not(.score-partial):not(.score-insufficient):not(.score-na) {
  background-color: #1f2937 !important; /* dark gray background */
  color: #f9fafb !important; /* light text */
  border-color: #374151 !important; /* dark border */
}

.score-select:hover {
  opacity: 0.8; /* slightly fade on hover */
  /* Transform effect removed */ /* subtle lift effect */
}

.score-select:focus {
  outline: none;
  /* Glow effect removed */
  /* Transform effect removed */ /* subtle lift effect */
}

/* Hover effects for color-coded dropdowns */
.score-select.score-satisfactory:hover {
  background-color: #047857 !important; /* slightly lighter green */
}

.score-select.score-partial:hover {
  background-color: #b45309 !important; /* slightly lighter yellow */
}

.score-select.score-insufficient:hover {
  background-color: #b91c1c !important; /* slightly lighter red */
}

.score-select.score-na:hover {
  background-color: #6b21a8 !important; /* slightly lighter purple */
}

.score-select option {
  background-color: #1f2937 !important; /* dark background for options */
  color: #f9fafb !important; /* light text for options */
  padding: 0.5rem !important;
}

.score-select option:hover {
  background-color: #374151 !important; /* darker on hover */
}

.score-select option:checked {
  background-color: #3b82f6 !important; /* blue for selected option */
  color: white !important;
}

/* Placeholder text styling for score selects */
.score-select option[value=""] {
  color: #9ca3af !important; /* lighter gray for placeholder */
  font-style: italic !important;
}

/* Ensure consistent styling across all score selects */
select.score-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f9fafb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.5rem center !important;
  background-size: 1rem !important;
  padding-right: 2.5rem !important;
}

/* Textarea Styling for Comments and Responsible Party */
textarea.form-textarea,
textarea.auto-expand,
textarea[id^="comments-"],
textarea[id^="party-"] {
  background-color: #1f2937 !important; /* dark background */
  color: #f9fafb !important; /* light text */
  border: 2px solid #374151 !important; /* dark border */
  border-radius: 0.375rem !important;
  padding: 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  min-height: 2.5rem !important;
  resize: vertical !important;
  transition: all 0.2s ease-in-out !important;
  width: 100% !important;
}

/* Placeholder text styling */
textarea.form-textarea::placeholder,
textarea.auto-expand::placeholder,
textarea[id^="comments-"]::placeholder,
textarea[id^="party-"]::placeholder {
  color: #9ca3af !important; /* light gray for placeholder */
  opacity: 1 !important;
}

/* Focus states for textareas */
textarea.form-textarea:focus,
textarea.auto-expand:focus,
textarea[id^="comments-"]:focus,
textarea[id^="party-"]:focus {
  outline: none !important;
  /* Border color change removed */
  /* Glow effect removed */
}

/* Hover states for textareas */
textarea.form-textarea:hover,
textarea.auto-expand:hover,
textarea[id^="comments-"]:hover,
textarea[id^="party-"]:hover {
  border-color: #4b5563 !important; /* slightly lighter border on hover */
}

/* Textarea wrapper styling */
.textarea-wrapper {
  position: relative;
  width: 100%;
}

.textarea-mirror {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.75rem;
  border: 2px solid transparent;
  border-radius: 0.375rem;
}

/* Pie Chart Enhancements */
#scorePie {
  transition: stroke-dasharray 0.5s ease-in-out, stroke-dashoffset 0.5s ease-in-out, stroke 0.3s ease-in-out;
}

:root {
  /* Modern Color Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  
  --success-50: #f0fdf4;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --error-50: #fef2f2;
  --error-500: #ef4444;
  --error-600: #dc2626;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
  --transition-slow: 350ms ease-out;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  
  /* Theme Variables - Default to Dark Mode */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-primary: #334155;
  --border-secondary: #475569;
  --shadow-theme: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

html, body {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modern Color System */
.text-blue-600 { color: var(--primary-600) !important; }
.hover\:text-blue-600:hover { color: var(--primary-600) !important; }
.bg-blue-600 { background-color: var(--primary-600) !important; }
.hover\:bg-blue-600:hover { background-color: var(--primary-700) !important; }
.border-blue-600 { border-color: var(--primary-600) !important; }

/* ================= MODERN COMPONENT SYSTEM ================= */

/* Enhanced Score Select Component */
.score-select {
  width: 100%;
  text-align: center;
  appearance: none;
  background: white;
  border: 2px solid var(--secondary-200);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--secondary-700);
  cursor: pointer;
  transition: all var(--transition-normal);
  background-image: url("data:image/svg+xml,%3Csvg fill='%2364748b' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 10.96l3.71-3.73a.75.75 0 011.08 1.04l-4.25 4.25a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-position: right var(--space-sm) center;
  background-repeat: no-repeat;
  background-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.score-select:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-md);
  /* Transform effect removed */
}

.score-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
  background-color: var(--primary-50);
}

/* Score State Styles */
.score-satisfactory { 
  background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
  color: white;
  border-color: var(--success-500);
  /* Glow effect removed */
}

.score-partial { 
  background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
  color: white;
  border-color: var(--warning-500);
  /* Glow effect removed */
}

.score-insufficient { 
  background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
  color: white;
  border-color: var(--error-500);
  /* Glow effect removed */
}

.score-select:focus,
.score-select:active {
  background-color: white !important;
  color: inherit;
  border-color: var(--primary-500) !important;
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* ================= MODERN PROGRESS BAR SYSTEM ================= */

.score-bar {
  height: 0.75rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--secondary-200) 0%, var(--secondary-100) 100%);
  overflow: hidden;
  width: 150px;
  margin-left: var(--space-sm);
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition-normal);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-bar-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 9999px;
  position: relative;
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 100%);
  /* Glow effect removed */
}

/* Score bar shimmer effect - removed */

/* Score Bar Color Variants */
.score-bar-fill.score-excellent {
  background: linear-gradient(90deg, var(--success-500) 0%, var(--success-600) 100%);
  /* Glow effect removed */
}

.score-bar-fill.score-good {
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 100%);
  /* Glow effect removed */
}

.score-bar-fill.score-fair {
  background: linear-gradient(90deg, var(--warning-500) 0%, var(--warning-600) 100%);
  /* Glow effect removed */
}

.score-bar-fill.score-poor {
  background: linear-gradient(90deg, var(--error-500) 0%, var(--error-600) 100%);
  /* Glow effect removed */
}

.score-percent {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--secondary-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--secondary-200);
  transition: all var(--transition-normal);
}

/* EP Score specific styling - override score-percent for EP scores */
.bg-transparent.score-percent {
  background: transparent !important;
  color: white !important;
  border: 1px solid white !important;
  margin-left: 0 !important;
  padding: 0.25rem 0.75rem !important; /* px-3 py-1 */
  border-radius: 0.5rem !important; /* rounded-lg */
}

.score-percent:hover {
  background: var(--secondary-100);
  /* Transform effect removed */
}

.bg-transparent.score-percent:hover {
  background: transparent !important;
  /* Transform effect removed */
}

/* ================= MODERN TABLE SYSTEM ================= */

.table-container {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--secondary-200);
  position: relative;
}

.table-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 50%, var(--primary-500) 100%);
  background-size: 200% 100%;
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  position: relative;
}

th, td {
  border: none;
  border-bottom: 1px solid var(--secondary-200);
  padding: var(--space-lg);
  vertical-align: top;
  transition: all var(--transition-normal);
  position: relative;
}

th {
  white-space: nowrap;
  word-break: normal;
  text-align: center;
  vertical-align: middle;
  background: linear-gradient(135deg, var(--secondary-50) 0%, var(--secondary-100) 100%);
  font-weight: 700;
  color: var(--secondary-800);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--primary-200);
  position: sticky;
  top: 0;
  z-index: 10;
}

th:first-child {
  border-top-left-radius: var(--radius-xl);
  white-space: nowrap;
  min-width: fit-content;
  width: auto;
}

th:last-child {
  border-top-right-radius: var(--radius-xl);
}

td {
  color: var(--secondary-700);
  background: white;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* EP column styling - keep labels on one line and allow expansion */
td:first-child {
  white-space: nowrap;
  min-width: fit-content;
  width: auto;
}

tbody tr {
  transition: all var(--transition-normal);
  position: relative;
}

tbody tr:hover {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  /* Transform effect removed */
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
  z-index: 5;
}

tbody tr:hover td {
  border-color: var(--primary-200);
}

tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-xl);
}

tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-xl);
}

/* Enhanced table cell interactions */
td:focus-within {
  background: var(--primary-50);
  box-shadow: inset 0 0 0 2px var(--primary-200);
}

/* Table responsive wrapper */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}


/* ================= MODERN FORM SYSTEM ================= */

.compliance-form {
  background: white;
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--secondary-200);
  position: relative;
  overflow: hidden;
}

.compliance-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 50%, var(--primary-500) 100%);
}

.form-group {
  margin-bottom: var(--space-xl);
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-normal);
}

.form-group:focus-within .form-label {
  color: var(--primary-600);
}

.form-input {
  width: 100%;
  border: 2px solid var(--secondary-200);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  background: white;
  font-size: 0.875rem;
  color: var(--secondary-700);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-sans);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100), var(--shadow-md);
  background-color: var(--primary-50);
  /* Transform effect removed */
}

.form-input:hover {
  border-color: var(--primary-300);
  background-color: var(--secondary-50);
  box-shadow: var(--shadow-md);
}

.form-input::placeholder {
  color: var(--secondary-400);
  font-style: italic;
}

.form-textarea {
  width: 100%;
  border: 2px solid var(--secondary-200);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  background: white;
  font-size: 0.875rem;
  color: var(--secondary-700);
  transition: all var(--transition-normal);
  min-height: 120px;
  resize: vertical;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-sans);
  line-height: 1.6;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100), var(--shadow-md);
  background-color: var(--primary-50);
  /* Transform effect removed */
}

.form-textarea:hover {
  border-color: var(--primary-300);
  background-color: var(--secondary-50);
  box-shadow: var(--shadow-md);
}

.form-textarea::placeholder {
  color: var(--secondary-400);
  font-style: italic;
}

/* Enhanced textarea with auto-expand */
.auto-expand {
  resize: none;
  overflow: hidden;
  min-height: 40px;
  max-height: 200px;
}

.textarea-wrapper {
  position: relative;
}

.textarea-mirror {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 0.875rem;
  line-height: 1.6;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid transparent;
  font-family: var(--font-sans);
}

/* ================= AI REVIEW STYLES ================= */

.ai-review-container {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #0ea5e9;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  position: relative;
}

.ai-review-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ai-review-icon {
  width: 24px;
  height: 24px;
  color: #0ea5e9;
}

.ai-review-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0c4a6e;
}

.ai-review-content {
  color: #0c4a6e;
  line-height: 1.6;
}

.ai-review-confidence {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0c4a6e;
  margin-top: 0.75rem;
}

/* ================= MODERN CARD SYSTEM ================= */
/* Hospital card styles moved to unified tile-card section below */

/* Removed blue line from hospital cards */
/* Removed hover effects from hospital cards */

/* Hospital card active state transform effect removed */

/* ================= UNIFIED TILE CARD STYLES ================= */

/* Base tile-card class with consistent bounce animation */
.tile-card {
  position: relative;
  cursor: pointer;
  margin: 0;
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  /* Entrance animation with bounce effect - consistent across all tiles */
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.6s ease-out forwards;
}

/* Chapter card extends tile-card */
.chapter-card,
.tile-card.chapter-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  justify-content: space-between;
  /* Ensure chapter-card gets bounce animation */
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.6s ease-out forwards;
}

/* Ensure tiles in chapter-tiles container get bounce animation */
#chapter-tiles .chapter-card,
#chapter-tiles .tile-card,
#chapter-tiles .stagger-item {
  /* Force bounce animation - ensure it overrides any conflicting rules */
  animation: cardEntrance 0.6s ease-out forwards !important;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(30px);
}

/* Ensure tiles in chapter-cards container get bounce animation - same as chapter-tiles */
#chapter-cards .chapter-card:not(.chapter-card-enabled):not(.chapter-card-disabled),
#chapter-cards .tile-card:not(.chapter-card-enabled):not(.chapter-card-disabled),
#chapter-cards .stagger-item:not(.chapter-card-enabled):not(.chapter-card-disabled) {
  /* Force bounce animation - ensure it overrides any conflicting rules */
  animation: cardEntrance 0.6s ease-out forwards !important;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(30px);
}

/* Ensure enabled/disabled tiles in chapter-cards also get bounce animation */
#chapter-cards .chapter-card-enabled,
#chapter-cards .tile-card.chapter-card-enabled,
#chapter-cards .stagger-item.chapter-card-enabled {
  /* Force bounce animation for enabled cards */
  animation: cardEntranceEnabled 0.6s ease-out forwards !important;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(30px);
}

#chapter-cards .chapter-card-disabled,
#chapter-cards .tile-card.chapter-card-disabled,
#chapter-cards .stagger-item.chapter-card-disabled {
  /* Force bounce animation for disabled cards */
  animation: cardEntranceDisabled 0.6s ease-out forwards !important;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(30px);
}

/* Hospital card extends tile-card - ensure it gets animation */
.hospital-card,
.tile-card.hospital-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: var(--space-2xl);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  justify-content: center;
  /* Ensure hospital-card gets bounce animation */
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.6s ease-out forwards;
}

/* Tile hover effects - matching content-card hover style */
.tile-card:hover,
.chapter-card:hover,
.hospital-card:hover,
.tile-card.chapter-card:hover,
.tile-card.hospital-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Ensure consistent spacing for all chapter card content */
.chapter-card .flex-1 {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

/* Ensure chapter card content is properly spaced */
.chapter-card .text-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

/* Hospital tiles - center content vertically and horizontally */
#hospital-tiles .tile-card,
#hospital-tiles .chapter-card {
  justify-content: center;
  /* No entrance animation - tiles appear immediately */
  opacity: 1;
  transform: none;
  animation: none !important;
}

#hospital-tiles .tile-card h3,
#hospital-tiles .chapter-card h3 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.chapter-card .mt-auto {
  margin-top: auto;
  min-height: 32px; /* Ensure consistent bottom spacing */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Stagger-item now uses tile-card animation - no separate animation needed */
/* Animation is handled by .tile-card and .chapter-card classes */

/* Basic card entrance animation with bounce effect */
@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-5px);  /* Slight overshoot for bounce effect */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enabled and disabled cards have identical styling except for opacity */
.chapter-card-enabled {
  cursor: pointer;
}

.chapter-card-disabled {
  cursor: not-allowed;
}

/* Both card states use the same entrance animation but with different final opacity */
.tile-card.chapter-card-enabled,
.stagger-item.chapter-card-enabled,
.chapter-card.chapter-card-enabled {
  animation: cardEntranceEnabled 0.6s ease-out forwards;
}

.tile-card.chapter-card-disabled,
.stagger-item.chapter-card-disabled,
.chapter-card.chapter-card-disabled {
  animation: cardEntranceDisabled 0.6s ease-out forwards;
}

/* Entrance animation keyframes for enabled cards with bounce effect */
@keyframes cardEntranceEnabled {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-5px);  /* Slight overshoot for bounce effect */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Entrance animation keyframes for disabled cards with bounce effect */
@keyframes cardEntranceDisabled {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 0.3;
    transform: translateY(-5px);
  }
  100% {
    opacity: 0.5;
    transform: translateY(0);
  }
}

/* Revealed state for scroll animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Hospital tiles container - no container animation, tiles animate individually */
#hospital-tiles {
  /* Container is immediately visible so tile animations can be seen */
  opacity: 1;
  transform: translateY(0);
  /* Ensure proper spacing at bottom */
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  /* Allow overshoot animation to be visible - prevent clipping */
  overflow: visible;
  /* Add padding to allow overshoot animation (scale 1.02) to be visible */
  padding: 1rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

/* Chapter tiles container - no container animation, tiles animate individually */
#chapter-tiles {
  /* Container is immediately visible so tile animations can be seen */
  opacity: 1;
  transform: translateY(0);
  /* Ensure proper spacing at bottom */
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  /* Allow overshoot animation to be visible - prevent clipping */
  overflow: visible;
  /* Add padding to allow overshoot animation (scale 1.02) to be visible */
  padding: 1rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

/* Chapter cards container - no container animation, tiles animate individually */
#chapter-cards {
  /* Container is immediately visible so tile animations can be seen */
  opacity: 1;
  transform: translateY(0);
  /* Ensure proper spacing at bottom */
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  /* Allow overshoot animation to be visible - prevent clipping */
  overflow: visible;
}

/* Offsite grid container - no container animation, tiles animate individually */
#offsite-grid {
  /* Container is immediately visible so tile animations can be seen */
  opacity: 1;
  transform: translateY(0);
  /* Allow overshoot animation to be visible - prevent clipping */
  overflow: visible;
  /* Add padding to allow overshoot animation (scale 1.02) to be visible */
  padding: 1rem;
  box-sizing: border-box;
}

/* Ensure consistent grid spacing for chapter cards */
#chapter-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
  /* Add padding to allow overshoot animation (scale 1.02) to be visible */
  padding: 1rem;
  box-sizing: border-box;
  /* Prevent clipping of animated tiles */
  overflow: visible;
}

/* Responsive grid for chapter cards */
@media (min-width: 768px) {
  #chapter-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #chapter-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@keyframes containerEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Removed blue line from chapter cards */
/* Removed hover effects from chapter cards */

/* Chapter card active state transform effect removed */

/* Remove focus outline from chapter cards */
.chapter-card:focus,
.chapter-card:focus-visible {
  outline: none !important;
  box-shadow: var(--shadow-md) !important;
  border-color: var(--secondary-200) !important;
}

/* Remove focus outline from hospital cards */
.hospital-card:focus,
.hospital-card:focus-visible {
  outline: none !important;
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.chapter-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--secondary-800);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.chapter-description {
  color: var(--secondary-600);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: var(--space-xs);
}

/* ================= DASHBOARD STYLES ================= */

.dashboard-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  transform-origin: center;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(1, 151, 218, 0.1), transparent);
  transition: left 0.6s ease;
}

.dashboard-card:hover::before {
  left: 100%;
}

.dashboard-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  /* Transform effect removed */
  border-color: rgba(1, 151, 218, 0.3);
}

.dashboard-progress-ring {
  transform: rotate(-90deg);
}

.dashboard-progress-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.dashboard-progress-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Dashboard Chapter Performance Table Responsive Styles */
#chapterTableBody .grid {
  min-height: 60px;
}

/* Mobile-specific styles for dashboard table */
@media (max-width: 640px) {
  /* Hide table header labels on small mobile screens */
  .table-header-row {
    display: none;
  }
  
  /* Reduce text sizes to fit better on mobile */
  #chapterTableBody .text-2xl {
    font-size: 1rem;
  }
  
  #chapterTableBody .font-medium {
    font-size: 0.875rem;
  }
  
  /* Make status text smaller */
  #chapterTableBody .text-xs {
    font-size: 0.625rem;
  }
  
  /* Reduce padding and gaps */
  #chapterTableBody .grid {
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  
  #chapterTableBody .px-2 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* Make progress bars smaller */
  #chapterTableBody .h-2 {
    height: 0.25rem;
  }
  
  /* Reduce header text size */
  .liquid-glass-container .grid:first-child .text-sm {
    font-size: 0.625rem;
  }
  
  /* Make action links smaller */
  #chapterTableBody a {
    font-size: 0.75rem;
  }
  
  #chapterTableBody svg {
    width: 0.75rem;
    height: 0.75rem;
  }
}

/* ================= MOBILE OPTIMIZATION FOR CHAPTER PAGES ================= */
/* Prevent horizontal scrolling on mobile devices */
@media (max-width: 768px) {
  /* Ensure body and html don't allow horizontal overflow */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  /* Optimize main content container for mobile */
  main#main-content {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  /* Force the main content to be constrained */
  main#main-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Optimize max-width containers for mobile */
  .max-w-7xl {
    max-width: 100% !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Optimize section containers */
  section {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Optimize grid layouts for mobile */
  .grid {
    gap: 1rem !important;
  }
  
  /* Single column layout for very small screens */
  .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  /* Force single column for all grid layouts on mobile */
  .grid[class*="grid-cols"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Ensure Tailwind responsive classes work properly on mobile */
  .md\\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  .lg\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  /* Optimize chapter cards for mobile */
  .chapter-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1rem !important;
    box-sizing: border-box;
  }
  
  /* Ensure text doesn't overflow in chapter cards */
  .chapter-title {
    font-size: 1rem !important;
    line-height: 1.25rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .chapter-description {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Optimize hero section text for mobile */
  h1 {
    font-size: 2rem !important;
    line-height: 2.25rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Optimize paragraph text for mobile */
  p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Optimize header for mobile */
  header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Ensure mobile menu doesn't cause overflow */
  #mobile-menu {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* Optimize navigation for mobile */
  nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  /* Ensure buttons and interactive elements fit on mobile */
  button, a {
    min-width: auto;
    max-width: 100%;
  }
  
  /* Optimize main content sections */
  section.max-w-7xl {
    max-width: 100% !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Ensure proper text wrapping in all containers */
  * {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Optimize flex containers for mobile */
  .flex {
    flex-wrap: wrap;
  }
  
  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Override global img rule for auth modal logo to maintain proper sizing */
  .auth-modal-logo img {
    max-width: 200px !important;
    width: 100% !important;
  }
  
  /* Respect responsive breakpoints within mobile query */
  @media (max-width: 480px) {
    .auth-modal-logo img {
      max-width: 150px !important;
    }
  }
  
  @media (max-width: 360px) {
    .auth-modal-logo img {
      max-width: 120px !important;
    }
  }
  
  /* ================= MOBILE OPTIMIZATION FOR SECTION DROPDOWNS AND TABLES ================= */
  
  /* CRITICAL: Override ALL fixed widths for section dropdowns on mobile */
  section[data-chapter] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] .group {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] .group[open] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] .group[open] summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] details {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] details[open] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  /* Force override of any remaining fixed widths */
  section[data-chapter] * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* CRITICAL: Force section card containers to mobile width */
  section[data-chapter] .bg-white.rounded-xl.shadow-lg {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    margin: 0 !important;
    padding: 0.75rem !important;
  }
  
  section[data-chapter] .bg-white.rounded-xl.shadow-lg.border.border-gray-200 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  /* Override any specific width classes that might be applied */
  section[data-chapter] .w-full,
  section[data-chapter] .w-auto,
  section[data-chapter] .w-fit {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  /* Force all child elements to respect container width */
  section[data-chapter] .bg-white.rounded-xl.shadow-lg * {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
  }
  
  /* Optimize table containers for mobile */
  section[data-chapter] .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
  }
  
  /* Custom scrollbar for webkit browsers on mobile */
  section[data-chapter] .table-responsive::-webkit-scrollbar {
    height: 6px;
  }
  
  section[data-chapter] .table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
  }
  
  section[data-chapter] .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
  }
  
  section[data-chapter] .table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
  }
  
  section[data-chapter] table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
    min-width: 600px; /* Minimum width to maintain table structure */
  }
  
  /* Optimize table cells for mobile */
  section[data-chapter] table td,
  section[data-chapter] table th {
    padding: 0.5rem 0.25rem !important;
    font-size: 0.75rem !important;
    line-height: 1.25rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: none !important;
  }
  
  /* Optimize textareas in tables for mobile */
  section[data-chapter] table td textarea {
    width: 100% !important;
    min-width: 120px !important;
    max-width: 200px !important;
    font-size: 0.75rem !important;
    padding: 0.25rem !important;
    resize: vertical !important;
  }
  
  /* Optimize select dropdowns in tables for mobile */
  section[data-chapter] table td select {
    width: 100% !important;
    min-width: 80px !important;
    max-width: 120px !important;
    font-size: 0.75rem !important;
    padding: 0.25rem !important;
  }
  
  /* CRITICAL: Force summary content to mobile width */
  section[data-chapter] summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    padding: 0.75rem !important;
    box-sizing: border-box !important;
  }
  
  section[data-chapter] summary > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  section[data-chapter] summary > div:first-child {
    max-width: 100% !important;
    flex: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  section[data-chapter] summary > div:last-child {
    max-width: 100% !important;
    min-width: auto !important;
    width: 100% !important;
    align-self: flex-end !important;
    box-sizing: border-box !important;
  }
  
  /* Force text content to wrap properly */
  section[data-chapter] summary p,
  section[data-chapter] summary span,
  section[data-chapter] summary div {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }
  
  /* Optimize score display for mobile */
  section[data-chapter] summary .flex.items-center.space-x-3 {
    min-width: auto !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
  }
  
  /* Optimize group content padding for mobile */
  section[data-chapter] .group > div.p-6 {
    padding: 0.75rem !important;
  }
  
  /* Ensure main content area doesn't cause horizontal scrolling */
  main#main-content .max-w-7xl {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  /* Optimize any remaining fixed-width elements */
  .w-full {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Ensure all containers respect mobile boundaries */
  .container,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-2xl,
  .max-w-xl {
    max-width: 100% !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* NUCLEAR OPTION: Force ALL elements to respect mobile width */
  * {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  
  /* Specifically target any remaining fixed-width elements */
  [style*="width: 1200px"],
  [style*="width:1200px"],
  [style*="min-width: 1200px"],
  [style*="min-width:1200px"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  /* Further reduce padding for very small screens */
  main#main-content {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .max-w-7xl {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* Reduce grid gap further */
  .grid {
    gap: 0.75rem !important;
  }
  
  /* Smaller chapter cards */
  .chapter-card {
    padding: 0.75rem !important;
    min-height: auto !important;
  }
  
  /* Smaller text for very small screens */
  h1 {
    font-size: 1.75rem !important;
    line-height: 2rem !important;
  }
  
  .chapter-title {
    font-size: 0.875rem !important;
    line-height: 1.125rem !important;
  }
  
  .chapter-description {
    font-size: 0.75rem !important;
    line-height: 1.125rem !important;
  }
  
  /* Smaller icons */
  .chapter-card .w-12.h-12 {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
  
  .chapter-card .w-6.h-6 {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }
  
  /* Further optimize for very small screens */
  section.max-w-7xl {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* Reduce header padding further */
  header {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  /* Ensure all text is properly sized */
  .text-xl {
    font-size: 1rem !important;
    line-height: 1.25rem !important;
  }
  
  .text-lg {
    font-size: 0.875rem !important;
    line-height: 1.125rem !important;
  }
  
  /* Further optimize section dropdowns for very small screens */
  section[data-chapter] .bg-white.rounded-xl.shadow-lg {
    padding: 0.5rem !important;
  }
  
  section[data-chapter] .group > div.p-6 {
    padding: 0.5rem !important;
  }
  
  /* Further optimize table cells for very small screens */
  section[data-chapter] table td,
  section[data-chapter] table th {
    padding: 0.25rem 0.125rem !important;
    font-size: 0.625rem !important;
    line-height: 1rem !important;
  }
  
  /* Further optimize form elements for very small screens */
  section[data-chapter] table td textarea {
    min-width: 100px !important;
    max-width: 150px !important;
    font-size: 0.625rem !important;
    padding: 0.125rem !important;
  }
  
  section[data-chapter] table td select {
    min-width: 60px !important;
    max-width: 100px !important;
    font-size: 0.625rem !important;
    padding: 0.125rem !important;
  }
  
  /* Reduce table minimum width for very small screens */
  section[data-chapter] table {
    min-width: 500px !important;
  }
  
  /* Further optimize containers for very small screens */
  main#main-content .max-w-7xl {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }
  
  .container,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-2xl,
  .max-w-xl {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* NUCLEAR OPTION for very small screens: Force ALL elements to respect mobile width */
  * {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  
  /* Force section elements to be even more constrained on very small screens */
  section[data-chapter] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  section[data-chapter] * {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }
}

/* ================= MODERN BUTTON SYSTEM ================= */

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

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

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  /* Transform effect removed */
  box-shadow: var(--shadow-xl);
}

.btn-primary:active {
  /* Transform effect removed */
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-600) 100%);
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-600) 0%, var(--secondary-700) 100%);
  /* Transform effect removed */
  box-shadow: var(--shadow-xl);
}

.btn-ai {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.btn-ai::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

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

.btn-ai:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  /* Transform effect removed */
  box-shadow: var(--shadow-xl);
}

/* Button Loading States - REMOVED */

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ================= MODERN ANIMATIONS & LOADING STATES - REMOVED ================= */

@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    /* Transform effect removed */
    opacity: 0.9;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    /* Transform effect removed */
  }
  to {
    opacity: 1;
    /* Transform effect removed */
  }
}

/* .loading-text - REMOVED */

/* Modern Card Animations */
.card-lift {
  transition: all var(--transition-slow);
}

.card-lift:hover {
  /* Transform effect removed */
  box-shadow: var(--shadow-2xl);
}

/* Stagger Animation - removed duplicate, using unified tile-card animation */
/* Animation is now handled by .tile-card and .chapter-card classes */

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  /* Transform effect removed */
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  /* Transform effect removed */
}

/* Page Transition */
.page-transition {
  transition: all 0.3s ease-in-out;
}

@keyframes pageExit {
  from {
    opacity: 1;
    /* Transform effect removed */
  }
  to {
    opacity: 0;
    /* Transform effect removed */
  }
}

/* Micro-interactions */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* Focused state transform effect removed */

/* Field Completion Animation */
.field-completed {
  border-color: var(--success-500) !important;
  background-color: var(--success-50) !important;
}

.completion-animation {
  animation: completionPulse 1s ease-out;
}

@keyframes completionPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Success Notification */
.success-notification {
  animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05) translateY(0);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    /* Transform effect removed */
  }
  to {
    opacity: 0;
    /* Transform effect removed */
  }
}

/* Shake Animation */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Pulse Attention */
.pulse-attention {
  animation: pulseAttention 2s ease-in-out infinite;
}

@keyframes pulseAttention {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    /* Transform effect removed */
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

/* ================= FULLSCREEN LOADER ================= */
.fullscreen-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ================= AUTH MODAL STYLES - LIQUID GLASS AESTHETIC ================= */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.auth-modal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2.5rem;
  border-radius: 24px;
  text-align: center;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
  position: relative;
  overflow: hidden;
}

.auth-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.4) 50%, 
    transparent 100%);
}


@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-modal-login {
  min-height: 400px;
}

.auth-modal-signup {
  min-height: 450px;
}

.auth-modal-logo {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

.auth-modal-logo img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Responsive logo sizing for smaller screens */
@media (max-width: 480px) {
  .auth-modal-logo img {
    max-width: 150px;
  }
}

@media (max-width: 360px) {
  .auth-modal-logo img {
    max-width: 120px;
  }
}

.auth-modal-inputs {
  margin: 1.5rem 0;
  position: relative;
  z-index: 2;
}

.auth-modal-input {
  width: 100%;
  padding: 16px 20px;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-sizing: border-box;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.auth-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.auth-modal-input:focus {
  outline: none;
  border-color: rgba(1, 151, 218, 0.6);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.auth-modal-input:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.35);
}

.auth-modal-button {
  background: linear-gradient(135deg, 
    rgba(1, 151, 218, 0.8) 0%, 
    rgba(1, 120, 179, 0.9) 50%,
    rgba(1, 151, 218, 0.8) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px 24px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.auth-modal-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent);
  transition: left 0.6s ease;
}

.auth-modal-button:hover {
  background: linear-gradient(135deg, 
    rgba(1, 120, 179, 0.9) 0%, 
    rgba(1, 151, 218, 0.8) 50%,
    rgba(1, 120, 179, 0.9) 100%);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.auth-modal-button:hover::before {
  left: 100%;
}

.auth-modal-button:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-modal-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg, 
    rgba(107, 114, 128, 0.6) 0%, 
    rgba(75, 85, 99, 0.7) 100%);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-modal-footer {
  margin-top: 1.5rem;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.auth-modal-footer a {
  color: rgba(1, 151, 218, 0.9);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.auth-modal-footer a:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(1, 151, 218, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ================= PASSWORD INPUT WRAPPER & VISIBILITY TOGGLE ================= */
.password-input-wrapper {
  position: relative;
  width: 100%;
  margin: 12px 0;
}

.password-input-wrapper .auth-modal-input {
  margin: 0;
  padding-right: 45px;
}

.password-toggle-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 0 !important;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
  z-index: 10;
  width: 20px;
  height: 20px;
  box-shadow: none !important;
  outline: none !important;
}

.password-toggle-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: none !important;
}

.password-toggle-btn:active {
  color: rgba(255, 255, 255, 1);
  background: none !important;
}

.password-toggle-btn:focus {
  outline: none !important;
  background: none !important;
}

.password-toggle-btn .eye-icon {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  fill: none;
  background: none !important;
}

.password-toggle-btn svg {
  background: none !important;
  display: block;
}

/* Hide native browser password reveal buttons in auth modal (Edge, Chrome, etc.) */
.auth-modal input[type="password"]::-ms-reveal,
.auth-modal input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Also hide for password inputs inside wrapper */
.password-input-wrapper input[type="password"]::-ms-reveal,
.password-input-wrapper input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ================= PASSWORD RESET MODAL STYLES ================= */
.auth-modal-password-reset {
  min-height: 450px;
}

.password-reset-message {
  text-align: center;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  position: relative;
  z-index: 2;
}

.password-reset-message p {
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.password-reset-error {
  color: #ff6b6b;
  font-size: 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ================= FORGOT PASSWORD MODAL STYLES ================= */
.auth-modal-forgot-password {
  min-height: 400px;
}

.forgot-password-message {
  text-align: center;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  position: relative;
  z-index: 2;
}

.forgot-password-message p {
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.forgot-password-error {
  color: #ff6b6b;
  font-size: 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.forgot-password-success {
  color: #4ade80;
  font-size: 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ================= HAMBURGER MENU STYLES ================= */

.hamburger-icon {
  transition: transform 0.3s ease;
}

/* Hamburger to X animation */
.hamburger-line {
  transition: all 0.3s ease;
  transform-origin: center;
}

#hamburger-btn.menu-open .line1 {
  transform: rotate(45deg) translate(0, 6px);
}

#hamburger-btn.menu-open .line2 {
  opacity: 0;
  transform: scaleX(0);
}

#hamburger-btn.menu-open .line3 {
  transform: rotate(-45deg) translate(0, -6px);
}

/* Hamburger icon hover transform effect removed */

.mobile-menu {
  transition: all 0.3s ease;
  /* Transform effect removed */
  opacity: 0;
}

.mobile-menu.show {
  /* Transform effect removed */
  opacity: 1;
}

/* ================= MODERN HEADER STYLES ================= */

/* Enhanced header with clean blur effect and subtle border */
header {
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  /* Define header height for precise positioning */
  --header-height: 72px; /* Calculated: py-4 (32px) + h-10 (40px) = 72px */
}

/* Hamburger button - no background or borders */
#hamburger-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#hamburger-btn:hover {
  background: transparent !important;
  background-color: transparent !important;
}

#hamburger-btn:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Override any Tailwind or other background classes on header */
header.bg-white,
header[class*="bg-"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* Enhanced mobile menu with clean blur effect */
#mobile-menu {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Ensure content behind header is properly blurred */
body {
  position: relative;
}

/* ================= TRANSPARENT SECTION TABLES ================= */

/* Make tables within section dropdowns transparent with minimal borders */
section[data-chapter] table {
  background: transparent !important;
  border: none !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* Add thin white line above table (header separator) */
section[data-chapter] th {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

section[data-chapter] td {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

section[data-chapter] tbody tr:last-child td {
  border-bottom: none !important;
}

section[data-chapter] tbody tr {
  background: transparent !important;
  border: none !important;
}

section[data-chapter] tbody tr:hover {
  background: transparent !important;
  border: none !important;
}

section[data-chapter] tbody tr:hover td {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

section[data-chapter] .table-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

section[data-chapter] .table-responsive {
  border: none !important;
  box-shadow: none !important;
}

/* Add thin white line at the top of the section dropdown content */
section[data-chapter] .group > div.p-6 {
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Add bottom line to section summary to separate from table */
section[data-chapter] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}


/* Ensure content behind header is properly blurred */
body {
  position: relative;
}

/* Add blur overlay for content scrolling behind header */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height, 72px); /* Use CSS custom property for exact header height */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 40; /* Just below header */
}

/* Enhanced mobile menu blur - make it look like header expansion */
#mobile-menu {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Center mobile menu navigation items */
#mobile-menu nav {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

#mobile-menu nav a,
#mobile-menu nav button {
  text-align: center !important;
  justify-content: center !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 200px !important;
  color: white !important;
}

/* Dark mode header blur adjustments */
/* @media (prefers-color-scheme: dark) { */
  header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  #mobile-menu {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }
  
  /* Center mobile menu navigation items - dark theme */
  #mobile-menu nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #mobile-menu nav a,
  #mobile-menu nav button {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 200px !important;
    color: white !important;
  }
  
  body::before {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, transparent 100%);
  }
/* } */

/* ================= MODERN RESPONSIVE DESIGN ================= */

/* Mobile First Approach */
@media (max-width: 640px) {
  :root {
    --space-xs: 0.125rem;
    --space-sm: 0.25rem;
    --space-md: 0.5rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
  }
  
  .hospital-card {
    padding: var(--space-lg);
    height: 160px;
    margin-bottom: var(--space-md);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .chapter-card {
    padding: var(--space-lg);
    height: auto !important;
    min-height: 150px;
    margin-bottom: var(--space-md);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .dashboard-card {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
  }
  
  .compliance-form {
    padding: var(--space-lg);
    margin: var(--space-md);
  }
  
  .table-container {
    margin: var(--space-md);
    border-radius: var(--radius-lg);
  }
  
  th, td {
    padding: var(--space-sm);
    font-size: 0.75rem;
  }
  
  .score-bar {
    width: 100px;
    height: 0.5rem;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-ai {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
  }
  
  .auth-modal {
    width: 95vw;
    padding: 2rem;
    margin: 1rem;
    border-radius: 20px;
  }
  
  .auth-modal-login {
    min-height: 320px;
  }
  
  .auth-modal-signup {
    min-height: 380px;
  }
  
  .auth-modal-input {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 16px;
    border-radius: 12px;
  }
  
  .auth-modal-button {
    padding: 14px 20px;
    border-radius: 12px;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .hospital-card {
    padding: var(--space-xl);
    height: 180px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .chapter-card {
    padding: var(--space-xl);
    height: auto !important;
    min-height: 170px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .dashboard-card {
    padding: var(--space-xl);
  }
  
  .compliance-form {
    padding: var(--space-xl);
  }
  
  .table-container {
    margin: var(--space-lg);
  }
  
  th, td {
    padding: var(--space-md);
  }
  
  .auth-modal {
    width: 90vw;
    max-width: 500px;
    padding: var(--space-xl);
    border-radius: 22px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hospital-card {
    padding: var(--space-2xl);
    height: 200px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .chapter-card {
    padding: var(--space-2xl);
    height: auto !important;
    min-height: 180px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .dashboard-card {
    padding: var(--space-2xl);
  }
  
  .compliance-form {
    padding: var(--space-2xl);
  }
  
  .table-container {
    margin: var(--space-xl);
  }
  
  th, td {
    padding: var(--space-lg);
  }
}

/* Media query transform effects removed for large screens */

/* Print Styles */
@media print {
  .hospital-card,
  .chapter-card,
  .dashboard-card {
    box-shadow: none;
    border: 1px solid #000;
    break-inside: avoid;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-ai {
    background: #000 !important;
    color: #fff !important;
    box-shadow: none !important;
  }
  
  .score-bar-fill {
    background: #000 !important;
  }
}

/* ================= MODERN ACCESSIBILITY ================= */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .spinner,
  .spinner::after {
    animation: none;
  }
  
  .table-container::before {
    animation: none;
  }
  
  .score-bar-fill::after {
    animation: none;
  }
}

/* Enhanced Focus Indicators - Removed focus borders */
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus:not(.chapter-card):not(.hospital-card) {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-500: #0000ff;
    --primary-600: #0000cc;
    --secondary-200: #000000;
    --secondary-700: #000000;
  }
  
  .hospital-card,
  .chapter-card,
  .dashboard-card,
  .compliance-form,
  .table-container {
    border: 3px solid #000000;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-ai {
    border: 3px solid #000000;
    background: #000000 !important;
    color: #ffffff !important;
  }
  
  .score-select {
    border: 2px solid #000000;
  }
  
  .form-input,
  .form-textarea {
    border: 2px solid #000000;
  }
}

/* Section Card Styling - Lock Width to Prevent Changes */
section[data-chapter] {
  width: 100%;
  display: block;
  overflow: hidden;
  position: relative;
}

section[data-chapter] > div {
  width: 100%;
  display: block;
  overflow: hidden;
  position: relative;
}

section[data-chapter] details {
  width: 100%;
  display: block;
  overflow: hidden;
  position: relative;
}

section[data-chapter] summary {
  width: 100%;
  min-height: 80px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

/* Lock section cards to exact width - no changes allowed */
section[data-chapter] .group {
  width: 100%;
  display: block;
  overflow: hidden;
  position: relative;
}

section[data-chapter] .group summary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

/* CRITICAL: Lock width when expanded - must match collapsed width EXACTLY */
section[data-chapter] .group[open] {
  width: 1200px !important; /* Fixed width - no changes allowed */
  max-width: 1200px !important;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

section[data-chapter] .group[open] summary {
  width: 1200px !important; /* Fixed width - no changes allowed */
  max-width: 1200px !important;
  min-height: 80px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

/* COMPLETELY LOCK all details/summary elements to prevent ANY width changes */
section[data-chapter] details {
  width: 1200px !important;
  max-width: 1200px !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  /* Disable any transitions that might cause width changes */
  transition: none !important;
  animation: none !important;
}

section[data-chapter] details[open] {
  width: 1200px !important;
  max-width: 1200px !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  /* Disable any transitions that might cause width changes */
  transition: none !important;
  animation: none !important;
}

section[data-chapter] summary {
  width: 1200px !important;
  max-width: 1200px !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  /* Disable any transitions that might cause width changes */
  transition: none !important;
  animation: none !important;
}

/* Disable ALL transitions and animations on section card elements */
section[data-chapter] * {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

/* Lock expanded content to exact same width as summary */
section[data-chapter] .group > div {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

/* Force all section card elements to maintain width */
section[data-chapter] * {
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Prevent flex items from expanding beyond container */
section[data-chapter] summary > div {
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}

section[data-chapter] summary > div:first-child {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 200px); /* Leave space for score section */
}

section[data-chapter] summary > div:last-child {
  flex-shrink: 0;
  min-width: 180px;
  max-width: 200px;
}

/* Ensure the score section doesn't expand */
section[data-chapter] summary .flex.items-center.space-x-3 {
  flex-shrink: 0;
  min-width: 180px;
  max-width: 200px;
}

/* CRITICAL: Force section cards to maintain exact width - prevent any expansion */
section[data-chapter] .bg-white.rounded-xl.shadow-lg {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Prevent any content from causing width expansion */
section[data-chapter] .bg-white.rounded-xl.shadow-lg * {
  max-width: 100% !important;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}

/* Lock the card container to prevent any width changes */
section[data-chapter] .bg-white.rounded-xl.shadow-lg.border.border-gray-200 {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Ensure the card maintains width in both collapsed and expanded states */
section[data-chapter] .bg-white.rounded-xl.shadow-lg.border.border-gray-200.overflow-hidden {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Specifically target tables to prevent width expansion */
section[data-chapter] table {
  width: 100%;
  table-layout: fixed;
  overflow: hidden;
}

section[data-chapter] .table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Ensure table cells don't expand beyond container */
section[data-chapter] table td {
  max-width: 100%;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Allow table headers to wrap text while maintaining column widths */
section[data-chapter] table th {
  max-width: 100%;
  overflow: visible;
  word-wrap: break-word;
  word-break: keep-all;
  white-space: nowrap;
  line-height: 1.2;
  font-size: 0.75rem;
  padding: 0.5rem 0.25rem;
  vertical-align: top;
  text-align: center;
  position: relative;
  hyphens: none;
}

/* Tooltip for table headers */
section[data-chapter] table th[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Allow text cells to wrap but prevent width expansion */
section[data-chapter] table td.collapsed-text {
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 200px; /* Limit text column width */
}

/* CRITICAL: Force the expanded content area to maintain exact card width - pre-sized for table */
section[data-chapter] .group > div.p-6 {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  /* Lock to exact table width */
  flex-shrink: 0;
  /* Add proper padding for table content */
  padding: 1.5rem !important;
}

/* Lock the table container to prevent width expansion - fill the white container */
section[data-chapter] .group > div.p-6 > div.table-responsive {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  box-sizing: border-box;
  /* Remove centering - let table fill the container */
  display: block;
  /* Remove extra padding that creates nested container effect */
  padding: 0;
}

/* Ensure the table fills the full width of the white container */
section[data-chapter] .group > div.p-6 > div.table-responsive > table {
  width: 100% !important; /* Fill the full container width */
  max-width: 100% !important;
  table-layout: fixed;
  overflow: hidden;
  box-sizing: border-box;
  /* Remove centering - fill the container */
  margin: 0;
}

/* Specific column width controls for proper table layout - PERCENTAGE BASED TO FILL CONTAINER */
/* EP column: keep labels on one line and allow column to expand */
section[data-chapter] table th:nth-child(1), /* EP # */
section[data-chapter] table td:nth-child(1) {
  width: 10% !important;
  min-width: 100px !important;
  max-width: 200px !important;
  padding: 0.5rem 0.5rem !important;
  white-space: nowrap !important;
  text-overflow: unset !important;
  overflow: visible !important;
  word-wrap: normal !important;
  box-sizing: border-box !important;
}

section[data-chapter] table th:nth-child(2), /* Standard Text */
section[data-chapter] table td:nth-child(2) {
  width: 35% !important;
  min-width: 200px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

section[data-chapter] table th:nth-child(3), /* Score */
section[data-chapter] table td:nth-child(3) {
  width: 10% !important;
  min-width: 100px !important;
  max-width: 120px !important;
  padding: 0.5rem !important;
  white-space: normal !important;
  text-overflow: unset !important;
  word-wrap: break-word !important;
}

section[data-chapter] table th:nth-child(4), /* Comments */
section[data-chapter] table td:nth-child(4) {
  width: 20% !important;
  min-width: 150px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

section[data-chapter] table th:nth-child(5), /* Responsible Party */
section[data-chapter] table td:nth-child(5) {
  width: 20% !important;
  min-width: 150px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

section[data-chapter] table th:nth-child(6), /* Repository/Folder */
section[data-chapter] table td:nth-child(6) {
  width: 8% !important;
  min-width: 60px !important;
  max-width: 80px !important;
  padding: 0.5rem !important;
}

/* Ensure textareas fit properly within their columns */
section[data-chapter] table td textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  resize: vertical !important;
  min-height: 2.5rem !important;
  padding: 0.5rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
}

/* Ensure textareas don't overflow their containers */
section[data-chapter] table td:nth-child(4) textarea, /* Comments */
section[data-chapter] table td:nth-child(5) textarea { /* Responsible Party */
  width: calc(100% - 1rem) !important; /* Account for cell padding */
  max-width: calc(100% - 1rem) !important;
  box-sizing: border-box !important;
  /* Add internal padding to prevent text from touching edges */
  padding: 0.5rem 0.375rem !important;
  /* Ensure proper border and spacing */
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  /* Prevent horizontal overflow */
  overflow-x: hidden !important;
  word-wrap: break-word !important;
  /* Smaller font size to fit better */
  font-size: 0.8rem !important;
  line-height: 1.2rem !important;
}

/* Column width adjustments for non-PE sub-chapter HTMLs (tables with Doc column) */
/* Target tables that have a "Doc" column (4th column with title="Documentation Required") */
/* Doc column (4th) - icon column, narrow */
section[data-chapter] table:has(th[title="Documentation Required"]) th:nth-child(4),
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(4) {
  width: 6% !important;
  min-width: 50px !important;
  max-width: 70px !important;
  padding: 0.5rem !important;
  text-align: center !important;
}

/* Folder column (5th) - icon column, narrow */
section[data-chapter] table:has(th[title="Documentation Required"]) th:nth-child(5),
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(5) {
  width: 6% !important;
  min-width: 50px !important;
  max-width: 70px !important;
  padding: 0.5rem !important;
  text-align: center !important;
}

/* Comments column (6th) - textarea, wider */
section[data-chapter] table:has(th[title="Documentation Required"]) th:nth-child(6),
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(6) {
  width: 22% !important;
  min-width: 180px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

/* Responsible Party column (7th) - textarea, wider */
section[data-chapter] table:has(th[title="Documentation Required"]) th:nth-child(7),
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(7) {
  width: 22% !important;
  min-width: 180px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

/* Update textarea rules for non-PE files (Comments and Responsible Party are now 6th and 7th) */
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(6) textarea, /* Comments */
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(7) textarea { /* Responsible Party */
  width: calc(100% - 1rem) !important;
  max-width: calc(100% - 1rem) !important;
  box-sizing: border-box !important;
  padding: 0.5rem 0.375rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  overflow-x: hidden !important;
  word-wrap: break-word !important;
  font-size: 0.8rem !important;
  line-height: 1.2rem !important;
}

/* Keep original container constraints but prevent expansion */
/* main#main-content overflow hidden removed to prevent content hiding issues */

/* Maintain original max-width but prevent expansion */
.max-w-7xl {
  overflow: hidden;
  max-width: 80rem; /* Ensure consistent max-width */
}

/* Allow tile containers to show overshoot animation */
section.max-w-7xl:has(#chapter-cards),
section.max-w-7xl:has(#hospital-tiles),
section.max-w-7xl:has(#offsite-grid),
section.max-w-7xl:has(#chapter-tiles) {
  overflow: visible;
  padding: 0.5rem;
}

/* Keep original container width but prevent expansion */
.max-w-7xl.mx-auto {
  overflow: hidden;
  max-width: 80rem; /* Ensure consistent max-width */
  margin-left: auto;
  margin-right: auto;
}

/* CRITICAL: Pre-size section cards to table width to prevent resize on expand */
section[data-chapter] {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Lock to exact table width */
  flex-shrink: 0;
}

/* Force section cards to be pre-sized for table expansion */
section[data-chapter] .bg-white.rounded-xl.shadow-lg,
section[data-chapter] .bg-pink-50.rounded-xl.shadow-lg {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Lock to exact table width */
  flex-shrink: 0;
}

/* Ensure consistent spacing and alignment for all section cards */
section[data-chapter] {
  margin-bottom: 1rem; /* Consistent spacing between cards */
}

/* Make sure all section cards have identical width behavior - pre-sized for table */
section[data-chapter] .group {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  margin: 0;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Lock to exact table width */
  flex-shrink: 0;
}

/* Ensure summary elements maintain consistent width - pre-sized for table */
section[data-chapter] .group summary {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  margin: 0;
  padding: 1.5rem; /* Consistent padding to match image */
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Lock to exact table width */
  flex-shrink: 0;
}

/* Mobile/Small Screen Section Container Improvements */
@media (max-width: 768px) {
  /* Improve section container layout for mobile */
  section[data-chapter] summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }
  
  /* Keep the existing horizontal layout for icon and text */
  section[data-chapter] summary > div:first-child {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    flex: 1;
  }
  
  /* Icon container - positioned to the left, keep same size */
  section[data-chapter] summary .w-12.h-12 {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
  }
  
  /* Text content area - takes remaining space, positioned to the right of icon */
  section[data-chapter] summary > div:first-child > div:last-child {
    flex: 1;
    min-width: 0;
  }
  
  /* EP code styling */
  section[data-chapter] summary .text-lg.font-bold {
    font-size: 1.125rem;
    line-height: 1.25rem;
    margin-bottom: 0.25rem;
  }
  
  /* Description text */
  section[data-chapter] summary .text-gray-300.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Score section - center it below the main content */
  section[data-chapter] summary > div:last-child {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }
  
  /* Progress bar container */
  section[data-chapter] summary .text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  /* Progress bar */
  section[data-chapter] summary .w-24.h-2 {
    width: 8rem;
    height: 0.5rem;
  }
  
  /* EP Score badge */
  section[data-chapter] summary .score-percent {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
  }
  
  /* Chevron icon */
  section[data-chapter] summary .transform {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
  }
  
  /* Ensure proper spacing and prevent overflow */
  section[data-chapter] summary {
    position: relative;
    min-height: auto;
  }
  
  /* Make sure the main content area doesn't overflow */
  section[data-chapter] summary > div:first-child {
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Ensure text doesn't break layout */
  section[data-chapter] summary .text-gray-300.text-sm {
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
  }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
  section[data-chapter] summary {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  /* Smaller icon on very small screens - maintain left positioning */
  section[data-chapter] summary .w-12.h-12 {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
  }
  
  /* Adjust gap between icon and text */
  section[data-chapter] summary > div:first-child {
    gap: 0.75rem;
  }
  
  /* Smaller progress bar */
  section[data-chapter] summary .w-24.h-2 {
    width: 6rem;
    height: 0.375rem;
  }
  
  /* Smaller EP Score badge */
  section[data-chapter] summary .score-percent {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  
  /* Adjust chevron position */
  section[data-chapter] summary .transform {
    bottom: 0.75rem;
    right: 0.75rem;
  }
}

/* Dark Mode Support - Applied by default */
/* @media (prefers-color-scheme: dark) { */
  :root {
    --primary-50: #1e3a8a;
    --primary-100: #1e40af;
    --primary-200: #1d4ed8;
    --primary-300: #2563eb;
    --primary-400: #3b82f6;
    --primary-500: #60a5fa;
    --primary-600: #93c5fd;
    --primary-700: #bfdbfe;
    --primary-800: #dbeafe;
    --primary-900: #eff6ff;
    
    --secondary-50: #0f172a;
    --secondary-100: #1e293b;
    --secondary-200: #334155;
    --secondary-300: #475569;
    --secondary-400: #64748b;
    --secondary-500: #94a3b8;
    --secondary-600: #cbd5e1;
    --secondary-700: #e2e8f0;
    --secondary-800: #f1f5f9;
    --secondary-900: #f8fafc;
  }
  
  body {
    background-color: var(--secondary-50);
    color: var(--secondary-800);
  }
  
  .hospital-card,
  .chapter-card,
  .dashboard-card,
  .compliance-form,
  .table-container {
    background: var(--secondary-100);
    border-color: var(--secondary-300);
  }
  
  th {
    background: var(--secondary-200);
    color: var(--secondary-800);
  }
  
  td {
    background: var(--secondary-100);
    color: var(--secondary-700);
  }
/* } */

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Enhanced ARIA Support */
[aria-expanded="true"]::after {
  content: " (expanded)";
  font-size: 0.8em;
  color: var(--secondary-500);
}

/* ================= CLICK TO EXPAND CURSOR FIX ================= */
/* Ensure click to expand elements show pointer cursor */
.collapsed-text,
.collapsed-text p,
.collapsed-text span,
td.collapsed-text,
td.collapsed-text p,
td.collapsed-text span {
  cursor: pointer !important;
}

/* Specifically target the click to expand text spans */
span.text-blue-500,
span.text-indigo-500 {
  cursor: pointer !important;
}

/* Ensure hover states work properly for click to expand elements */
.collapsed-text:hover,
.collapsed-text p:hover,
.collapsed-text span:hover,
td.collapsed-text:hover,
td.collapsed-text p:hover,
td.collapsed-text span:hover {
  cursor: pointer !important;
}

[aria-expanded="false"]::after {
  content: " (collapsed)";
  font-size: 0.8em;
  color: var(--secondary-500);
}

/* Loading State for Screen Readers */
[aria-busy="true"]::before {
  content: "Loading... ";
  font-size: 0.8em;
  color: var(--primary-600);
}

/* Error State Indicators */
[aria-invalid="true"] {
  border-color: var(--error-500) !important;
  box-shadow: 0 0 0 3px var(--error-100) !important;
}

/* Success State Indicators */
[aria-invalid="false"] {
  border-color: var(--success-500) !important;
  box-shadow: 0 0 0 3px var(--success-100) !important;
}

/* ================= DOCUMENT MANAGEMENT STYLES ================= */

/* Document Modal Overlay - liquid glass design */
.document-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  padding-top: 40px;
  padding-bottom: 40px;
  overflow-y: auto;
}

.document-modal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Liquid glass shimmer effect for document modal - removed */

/* Header with liquid glass design */
.document-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.document-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.document-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-header-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  /* Transform effect removed */
}

.document-header-info {
  display: flex;
  flex-direction: column;
}

.document-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.document-modal-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.8;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

.document-selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 8px;
  margin-left: 8px;
}

.document-header-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.document-header-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  /* Transform effect removed */
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ai-review-button img {
  max-width: 16px;
  max-height: 16px;
  object-fit: contain;
}


.document-modal-close {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.document-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  /* Transform effect removed */
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Toolbar - liquid glass design */
.document-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.document-toolbar-left {
  display: flex;
  align-items: center;
}

.document-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #94a3b8;
}

.breadcrumb-item {
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.breadcrumb-item.active {
  background: #e5e7eb;
  color: #374151;
  font-weight: 500;
}

.breadcrumb-separator {
  color: #9ca3af;
}

.document-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}


.document-search {
  position: relative;
  display: flex;
  align-items: center;
}

.document-search-input {
  padding: 8px 12px 8px 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 0.875rem;
  width: 200px;
  background: #1e293b;
  color: white;
}

.document-search-input:focus {
  outline: none;
  border-color: #60a5fa;
  /* Glow effect removed */
}

.document-search-input::placeholder {
  color: #64748b;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

/* File Explorer - liquid glass design */
.document-explorer {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* Desktop: Use the original structure */
.document-explorer-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Smooth scrolling for mobile */
.document-file-list {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.document-column-headers {
  display: flex;
  gap: 0;
  padding: 12px 20px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
  align-items: center;
}

.column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  padding: 0 8px;
  border-radius: 4px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

.column-header span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-header.resizable {
  padding-right: 16px;
}

.resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  background: transparent;
  transition: background-color 0.2s ease;
}

.resize-handle:hover {
  background: rgba(96, 165, 250, 0.3);
}

.resize-handle:active {
  background: rgba(96, 165, 250, 0.5);
}

.column-header:nth-child(1) { /* Checkbox column */
  justify-content: center;
}

.column-header:nth-child(2), /* Name column */
.column-header:nth-child(3), /* Size column */
.column-header:nth-child(4), /* Type column */
.column-header:nth-child(5), /* Date Modified column */
.column-header:nth-child(6), /* Uploaded By column */
.column-header:nth-child(7), /* AI Score column */
.column-header:nth-child(8) { /* Actions column */
  justify-content: flex-start;
}

.column-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.column-header.active {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}

.sort-icon {
  transition: transform 0.2s ease;
  opacity: 0.5;
}

.column-header.active .sort-icon {
  opacity: 1;
}

.column-header.actions-header {
  cursor: default;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.column-header.actions-header:hover {
  background: transparent;
}

.document-column-headers:hover .column-header.actions-header {
  opacity: 1;
}

.document-file-list {
  flex: 1;
  overflow-y: auto;
  background: transparent;
}

.document-file-list.drag-over {
  background: rgba(96, 165, 250, 0.1);
  border: 2px dashed rgba(96, 165, 250, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* File Items - liquid glass design */
.file-item {
  display: flex;
  gap: 0;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  align-items: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  min-height: 48px;
}

.file-item > * {
  padding: 0 8px;
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* Transform effect removed */
}

.file-item:last-child {
  border-bottom: none;
}

.file-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 0;
}


.file-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: flex-start;
  padding: 0;
}

.file-name-text {
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-description {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-type,
.file-modified,
.file-uploaded-by {
  font-size: 0.875rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 0;
}

.file-ai-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow: visible;
  padding: 0;
}

.ai-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  min-width: fit-content;
  overflow: visible;
}

.ai-badge.ai-satisfactory {
  background: #dcfce7;
  color: #166534;
}

.ai-badge.ai-partial {
  background: #fef3c7;
  color: #92400e;
}

.ai-badge.ai-insufficient {
  background: #fef2f2;
  color: #dc2626;
}

.ai-badge.ai-pending {
  background: #f3f4f6;
  color: #6b7280;
}



/* Folder Items */
.folder-item {
  background: #1e293b;
  border-left: 3px solid #60a5fa;
}

.folder-item:hover {
  background: #334155;
}

.folder-item .file-name {
  cursor: pointer;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

.folder-item .file-name:hover {
  color: #60a5fa;
}

.folder-item .file-icon {
  font-size: 1.2em;
  margin-right: 0;
  flex-shrink: 0;
}

.folder-item .file-name-text {
  flex: 1;
  min-width: 0;
  color: #f1f5f9;
}

/* Breadcrumb Navigation */
.document-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #94a3b8;
}

.breadcrumb-item {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.breadcrumb-item:hover {
  background: #f3f4f6;
  color: #374151;
}

.breadcrumb-item.current {
  color: #f1f5f9;
  font-weight: 500;
  cursor: default;
}

.breadcrumb-item.current:hover {
  background: none;
}

.breadcrumb-separator {
  color: #9ca3af;
  font-weight: 500;
}

/* Empty State */
.document-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
}

.empty-state-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #374151;
}

.empty-state-text p {
  margin: 0;
  color: #6b7280;
}

/* Loading State */
.document-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6b7280;
  gap: 16px;
}

/* .loading-spinner - REMOVED */

/* Status Bar */
.document-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: #94a3b8;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  min-width: 160px;
  overflow: hidden;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: #374151;
}

.context-menu-item:hover {
  background: #f3f4f6;
}

.context-menu-item.context-menu-danger {
  color: #dc2626;
}

.context-menu-item.context-menu-danger:hover {
  background: #fef2f2;
}

.context-menu-separator {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

/* Selection Styles */
.selection-header {
  justify-content: center;
}

.file-selection {
  display: flex;
  justify-content: center;
  align-items: center;
}

.file-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.select-all-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3b82f6;
}

/* AI Review Button */
.ai-review-button.has-selection {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.ai-review-button.has-selection:hover {
  background: rgba(34, 197, 94, 0.3);
}

/* Delete Selected Button */
.delete-selected-button.has-selection {
  background: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.delete-selected-button.has-selection:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* AI Review Modal */
.ai-review-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}

.ai-review-modal {
  background: #0F172A;
  border-radius: 12px;
  /* Glow effect removed */
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.ai-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  color: white;
}

.ai-review-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-review-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.ai-review-info {
  display: flex;
  flex-direction: column;
}

.ai-review-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.ai-review-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.9;
  margin: 0;
}

.ai-review-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 6px;
  padding: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-review-close:hover {
  background: rgba(255, 255, 255, 0.3);
  /* Transform effect removed */
}

.ai-review-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.ai-review-options {
  margin-bottom: 32px;
}

.ai-review-options h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #374151;
}

.review-option {
  margin-bottom: 12px;
}

.review-option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.review-option-label:hover {
  background: #f8fafc;
  border-color: #d1d5db;
}

.review-option-label input[type="radio"] {
  margin: 0;
  accent-color: #10b981;
}

.review-option-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-option-text strong {
  font-weight: 600;
  color: #374151;
}

.review-option-text small {
  color: #6b7280;
  font-size: 0.875rem;
}

.ai-review-documents {
  margin-bottom: 32px;
}

.ai-review-documents h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #374151;
}

.selected-documents-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selected-document-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.selected-doc-info {
  flex: 1;
  min-width: 0;
}

/* EP Information Section */
.ai-review-ep-info {
  margin-bottom: 32px;
}

.ai-review-ep-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #374151;
}

.ep-info-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.ep-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.ep-key {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
}

.ep-type {
  background: #10b981;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.ep-standard-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.no-documents {
  text-align: center;
  padding: 24px;
  color: #6b7280;
  font-style: italic;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

/* Results Section Updates */
.summary-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-width: 120px;
}

.summary-stat.stat-score {
  background: #f0f9ff;
  border-color: #0ea5e9;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.stat-number.score-satisfactory {
  color: #059669;
}

.stat-number.score-partial {
  color: #d97706;
}

.stat-number.score-insufficient {
  color: #dc2626;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

.compliance-result {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.compliance-result .result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.compliance-result .result-header h4 {
  margin: 0;
  font-size: 1.25rem;
  color: #1f2937;
}

.result-status {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.result-status.status-satisfactory {
  background: #d1fae5;
  color: #065f46;
}

.result-status.status-partial {
  background: #fef3c7;
  color: #92400e;
}

.result-status.status-insufficient {
  background: #fecaca;
  color: #991b1b;
}

.analysis-section,
.full-message-section {
  margin-bottom: 20px;
  background: transparent;
}

.analysis-section h5,
.full-message-section h5 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.analysis-text,
.full-message-text {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  max-height: none;
  overflow-y: visible;
}

.result-confidence {
  padding: 12px;
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #0c4a6e;
}

/* Results Actions */
.ai-review-results-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid white;
  background: #0F172A;
}

.ai-review-button.ai-review-close {
  background: #10b981;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-review-button.ai-review-close:hover {
  background: #059669;
  /* Transform effect removed */
}

.selected-doc-name {
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-doc-meta {
  font-size: 0.875rem;
  color: #6b7280;
}

.selected-doc-status {
  display: flex;
  align-items: center;
}

/* AI Review Progress */
.ai-review-progress {
  margin-bottom: 32px;
}

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

.progress-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #374151;
}

.progress-status {
  font-size: 0.875rem;
  color: #6b7280;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-details {
  font-size: 0.875rem;
  color: #6b7280;
}

/* AI Review Results */
.ai-review-results {
  margin-bottom: 32px;
}

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

.results-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #374151;
}

.summary-stats {
  display: flex;
  gap: 24px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #374151;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.results-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.result-document {
  display: flex;
  align-items: center;
  gap: 12px;
}


.result-doc-name {
  font-weight: 500;
  color: #374151;
}

.result-status {
  display: flex;
  align-items: center;
}

.result-badge {
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-badge.satisfactory {
  background: rgba(16, 185, 129, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(16, 185, 129, 0.3);
}

.result-badge.partial {
  background: rgba(245, 158, 11, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(245, 158, 11, 0.3);
}

.result-badge.insufficient {
  background: rgba(239, 68, 68, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(239, 68, 68, 0.3);
}

.result-badge.ai-pending {
  background: rgba(156, 163, 175, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(156, 163, 175, 0.3);
}

.result-content {
  padding: 0;
}

.result-summary {
  margin-bottom: 16px;
  color: #374151;
  line-height: 1.6;
}

.result-recommendations h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #374151;
}

.result-recommendations ul {
  margin: 0;
  padding-left: 20px;
}

.result-recommendations li {
  margin-bottom: 4px;
  color: #6b7280;
  font-size: 0.875rem;
}

/* AI Review Actions */
.ai-review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

.ai-review-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-review-cancel {
  background: #f3f4f6;
  color: #374151;
}

.ai-review-cancel:hover {
  background: #e5e7eb;
}

.ai-review-start {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.ai-review-start:hover {
  background: linear-gradient(135deg, #059669, #047857);
  /* Transform effect removed */
}

.ai-review-start:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* Upload Section */
.document-upload-section {
  margin-bottom: 32px;
}

.document-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  background: #f9fafb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.document-upload-area:hover,
.document-upload-area.drag-over {
  border-color: #3b82f6;
  background: #eff6ff;
  /* Transform effect removed */
}

.document-upload-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.document-upload-text {
  text-align: center;
  color: #374151;
  font-size: 1rem;
  font-weight: 500;
}

.document-upload-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.document-upload-text p {
  color: #6b7280;
  margin: 0 0 20px 0;
}

.document-upload-button {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.document-upload-button:hover {
  /* Transform and glow effects removed for performance */
  opacity: 0.9;
}

.document-upload-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* .document-upload-spinner - REMOVED */

/* Document List Section */
.document-list-section {
  flex: 1;
}

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

.document-list-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0;
}

.document-list-actions {
  display: flex;
  gap: 8px;
}

.document-refresh-button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.document-refresh-button:hover {
  background: #e5e7eb;
  /* Transform effect removed */
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.document-list-loading {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
}

.document-list-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.document-list-empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.document-list-empty-text h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #f1f5f9;
}

.document-list-empty-text p {
  margin: 0;
  color: #94a3b8;
}

/* Document Items */
.document-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #0F172A;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.document-item:hover {
  border-color: #60a5fa;
  /* Glow effect removed */
  /* Transform effect removed */
  background: #1e293b;
}

.document-item-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.document-item-info {
  flex: 1;
  min-width: 0;
}

.document-item-name {
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.document-item-separator {
  color: #d1d5db;
}

.document-item-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.4;
}

.ai-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
}

.ai-reviewed {
  background: #dcfce7;
  color: #166534;
}

.ai-pending {
  background: #f3f4f6;
  color: #6b7280;
}

.document-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.document-action-button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
}

.document-action-button:hover {
  background: #e5e7eb;
  color: #374151;
  /* Transform effect removed */
}

.document-action-button.document-delete:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

/* Document Details Modal - Liquid Glass Theme */
.document-details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}

.document-details-modal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.document-details-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.document-details-close {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.document-details-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

.document-details-content {
  padding: 24px;
  overflow-y: auto;
  max-height: 60vh;
  background: transparent;
  position: relative;
  z-index: 1;
}

.document-details-info {
  margin-bottom: 24px;
}

.document-details-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.document-info-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.document-info-label {
  font-weight: 600;
  color: rgba(96, 165, 250, 0.9);
  min-width: 100px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-info-value {
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Document Preview Styles */
.document-details-preview {
  margin-bottom: 24px;
}

.document-details-preview h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-preview-container {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.document-preview-loading {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  text-align: center;
}

.document-preview-image {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.document-preview-pdf,
.document-preview-office {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  position: relative;
}

.document-preview-fallback {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.document-preview-text {
  width: 100%;
}

.document-preview-text pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
}

.document-preview-unsupported,
.document-preview-error {
  text-align: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.7);
}

.document-preview-download-btn {
  background: rgba(96, 165, 250, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.5);
  color: #60a5fa;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}

.document-preview-download-btn:hover {
  background: rgba(96, 165, 250, 0.3);
  border-color: rgba(96, 165, 250, 0.7);
  transform: translateY(-1px);
}

.document-preview-error p {
  color: rgba(239, 68, 68, 0.9);
  margin-bottom: 12px;
}

.document-details-logs h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-logs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.document-log-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.document-log-action {
  font-weight: 600;
  color: rgba(96, 165, 250, 0.9);
  text-transform: capitalize;
  min-width: 60px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-log-user {
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-log-date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* AI Reviews History Section */
.document-details-ai-reviews {
  margin-top: 24px;
}

.document-details-ai-reviews h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-review-item {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ai-review-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.ai-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
}


.ai-review-date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-review-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  word-wrap: break-word;
}

.ai-review-recommendations {
  margin-bottom: 12px;
}

.ai-review-recommendations h5 {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-review-recommendations .recommendations-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  line-height: 1.6;
}

.ai-review-recommendations .recommendations-list li {
  margin-bottom: 0.5rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  padding-left: 20px;
}

.ai-review-recommendations .recommendations-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
}

.ai-review-recommendations .recommendations-list li:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.ai-review-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.ai-review-author {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-reviews-empty {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.ai-reviews-empty p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 8px 0;
  font-size: 0.875rem;
}

.ai-reviews-empty small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* Notifications */
.document-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 1200;
  /* Transform effect removed */
  transition: transform 0.3s ease;
  max-width: 300px;
}

/* Document notification show transform effect removed */

.document-notification-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.document-notification-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.document-notification-info {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* Responsive Design for Document Management */
@media (max-width: 1024px) {
  .document-modal {
    max-width: 95vw;
    margin: 10px;
  }
  
  .document-column-headers {
    gap: 0;
    padding: 12px 16px;
  }
  
  .file-item {
    gap: 0;
    padding: 12px 16px;
  }
  
  .document-search-input {
    width: 150px;
  }
}

@media (max-width: 768px) {
  .document-modal {
    margin: 5px;
    max-height: 95vh;
    border-radius: 8px;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .document-modal-header {
    padding: 12px 16px;
    flex-shrink: 0;
  }
  
  .document-header-actions {
    gap: 4px;
    flex-wrap: wrap;
  }
  
  .document-header-button {
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
  }
  
  .document-toolbar {
    padding: 8px 16px;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    flex-shrink: 0;
  }
  
  .document-toolbar-right {
    justify-content: space-between;
  }
  
  .document-search-input {
    width: 100%;
    max-width: 200px;
  }
  
  /* Enable horizontal scrolling for the explorer */
  .document-explorer {
    flex: 1;
    overflow: hidden;
    min-height: 0;
  }
  
  /* Create a horizontally scrollable container */
  .document-explorer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 800px; /* Minimum width to ensure all columns fit */
  }
  
  .document-column-headers {
    display: flex;
    gap: 0;
    padding: 12px 20px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    min-width: 800px;
  }
  
  .document-file-list {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    background: transparent;
    min-width: 800px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  .file-item {
    display: flex;
    gap: 0;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    align-items: center;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    min-height: 48px;
    min-width: 800px;
  }
  
  
  
  /* Make text content responsive */
  .file-name-text {
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-word;
  }
  
  .file-type,
  .file-modified,
  .file-uploaded-by,
  .file-ai-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
  }
  
  .file-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 0;
  }
  
  .document-status-bar {
    padding: 8px 16px;
    font-size: 0.875rem;
    flex-shrink: 0;
  }
  
  .document-details-modal {
    margin: 10px;
    max-height: 90vh;
  }
  
  .document-details-content {
    padding: 16px;
  }
  
  .ai-review-item {
    padding: 12px;
  }
  
  .ai-review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  
  .ai-review-text {
    font-size: 0.8rem;
  }
  
  .document-notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .context-menu {
    min-width: 140px;
  }
  
  /* AI Review Modal Mobile */
  .ai-review-modal {
    margin: 5px;
    max-height: 95vh;
  }
  
  .ai-review-header {
    padding: 12px 16px;
  }
  
  .ai-review-content {
    padding: 16px;
  }
  
  .summary-stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .summary-stat {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .result-document {
    width: 100%;
  }
  
  .result-status {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .document-modal {
    margin: 2px;
    border-radius: 4px;
  }
  
  .document-modal-header {
    padding: 8px 12px;
  }
  
  .document-modal-title {
    font-size: 1rem;
  }
  
  .document-modal-subtitle {
    font-size: 0.75rem;
  }
  
  .document-toolbar {
    padding: 6px 12px;
  }
  
  .document-column-headers {
    padding: 8px 12px;
    font-size: 0.7rem;
    gap: 12px;
    min-width: 700px;
  }
  
  .file-item {
    padding: 8px 12px;
    gap: 12px;
    min-width: 700px;
    min-height: 44px;
  }
  
  .file-name-text {
    font-size: 0.8rem;
  }
  
  .file-type,
  .file-modified,
  .file-uploaded-by,
  .file-ai-status {
    font-size: 0.7rem;
  }
  
  
  
  .document-status-bar {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  
  /* Improve touch targets */
  .document-header-button {
    min-width: 36px;
    min-height: 36px;
    padding: 8px;
  }
  
  .file-checkbox {
    width: 18px;
    height: 18px;
  }
  
  .select-all-checkbox {
    width: 18px;
    height: 18px;
  }
}

/* ================= AI MODAL STYLES (Liquid Glass Design) ================= */

/* AI Modal Overlay - enhanced liquid glass backdrop */
.ai-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  padding-top: 40px;
  padding-bottom: 40px;
  overflow-y: auto;
}

/* AI Modal Container - liquid glass design */
.ai-modal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  /* Glow effects removed */
  max-width: 1200px;
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Liquid glass shimmer effect for AI modal - removed */

/* AI Modal Header - liquid glass design */
.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.ai-modal-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-modal-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  /* Transform effect removed */
}

.ai-modal-title-section {
  display: flex;
  flex-direction: column;
}

.ai-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ai-modal-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.8;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-modal-close {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 8px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ai-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  /* Transform effect removed */
  /* Glow effects removed */
}

/* AI Modal Content - liquid glass layout */
.ai-modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* AI Modal Section */
.ai-modal-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.ai-modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-modal-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

/* AI Modal Card - liquid glass design */
.ai-modal-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Glow effects removed */
  position: relative;
  overflow: hidden;
}

.ai-modal-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  /* Transform effect removed */
  /* Glow effects removed */
}

/* Liquid glass shimmer effect for cards - removed */

/* New Layout Styles */
.ai-modal-top-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}


.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-count-badge {
  background: rgba(96, 165, 250, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.documents-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.document-preview-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.document-icon-small {
  width: 24px;
  height: 24px;
  background: rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  /* Glow effect removed */
}

.document-name-small {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.more-documents {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 8px;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.selection-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selection-item {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.selection-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.selection-item.total {
  font-weight: 600;
  color: rgba(96, 165, 250, 0.9);
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
}

.progress-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: rgba(96, 165, 250, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 
    0 0 8px rgba(96, 165, 250, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.status-dot.success {
  background: rgba(16, 185, 129, 0.8);
  border-color: rgba(16, 185, 129, 0.3);
  animation: none;
  box-shadow: 
    0 0 8px rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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


.results-summary-badge {
  background: rgba(16, 185, 129, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  /* Glow effects removed */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.results-summary-badge.score-satisfactory {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
  /* Glow effects removed */
}

.results-summary-badge.score-partial {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.3);
  /* Glow effects removed */
}

.results-summary-badge.score-insufficient {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  /* Glow effects removed */
}

.results-summary-badge.score-pending {
  background: rgba(107, 114, 128, 0.2);
  border-color: rgba(107, 114, 128, 0.3);
  /* Glow effects removed */
}

.results-content {
  overflow: visible;
}

/* Responsive Design for New Layout */
@media (max-width: 1024px) {
  .ai-modal-top-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .ai-modal-content {
    padding: 16px;
    gap: 16px;
  }
  
  .ai-modal-card {
    padding: 12px;
  }
  
  .card-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  
  .card-title {
    font-size: 0.875rem;
  }
  
}

/* EP Information Styles */
.ep-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ep-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ep-chapter {
  background: rgba(96, 165, 250, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  /* Glow effects removed */
  font-weight: 600;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ep-number {
  background: rgba(16, 185, 129, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  /* Glow effects removed */
  font-weight: 600;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ep-type-badge {
  background: rgba(245, 158, 11, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  /* Glow effects removed */
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 500;
}

.ep-standard-content {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  line-height: 1.6;
  font-size: 0.875rem;
}

/* Loading Placeholder - REMOVED */

/* Documents Grid */
.documents-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.document-item:hover {
  border-color: #60a5fa;
  /* Glow effect removed */
  /* Transform effect removed */
  background: #1e293b;
}

.document-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #8b5cf6;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.document-info {
  flex: 1;
  min-width: 0;
}

.document-name {
  font-weight: 500;
  color: #f1f5f9;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-meta {
  color: #94a3b8;
  font-size: 0.75rem;
}

.document-status {
  flex-shrink: 0;
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.status-satisfactory {
  background: #dcfce7;
  color: #16a34a;
}

.status-badge.status-partial {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.status-insufficient {
  background: #fee2e2;
  color: #dc2626;
}

.status-indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.status-pending {
  background: #f59e0b;
}

.status-indicator.status-satisfactory {
  background: #10b981;
}

.status-indicator.status-partial {
  background: #f59e0b;
}

.status-indicator.status-insufficient {
  background: #ef4444;
}

/* Progress Container */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-label {
  font-weight: 500;
  color: #f1f5f9;
  font-size: 0.875rem;
}

.progress-percentage {
  font-weight: 600;
  color: rgba(16, 185, 129, 0.9);
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.progress-bar-container {
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.8) 0%, rgba(5, 150, 105, 0.8) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 12px;
  width: 0%;
  box-shadow: 
    0 2px 8px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease;
}

.progress-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#progressStatus {
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Results Summary */
.results-summary {
  margin-bottom: 1.5rem;
}

.summary-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.summary-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  border: 1px solid white;
  border-radius: 0.75rem;
  /* Glow effect removed */
  flex: 1;
  min-width: 0;
}

.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.satisfactory {
  background: #dcfce7;
  color: #16a34a;
}

.stat-icon.partial {
  background: #fef3c7;
  color: #d97706;
}

.stat-icon.insufficient {
  background: #fee2e2;
  color: #dc2626;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Results List */
.results-list {
  background: transparent !important;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
}

/* Result Item */
.result-item {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  transition: all 0.2s ease;
}

.result-item:hover {
  border-color: transparent;
  box-shadow: none;
}

.result-header {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
}

.result-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.result-status {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-status.status-satisfactory {
  background: #dcfce7;
  color: #16a34a;
}

.result-status.status-partial {
  background: #fef3c7;
  color: #d97706;
}

.result-status.status-insufficient {
  background: #fee2e2;
  color: #dc2626;
}

.result-content {
  padding: 0;
}

.analysis-section,
.recommendations-section {
  margin-bottom: 1rem;
  background: transparent !important;
  border-radius: 0;
  padding: 0;
}

.analysis-section:last-child,
.recommendations-section:last-child {
  margin-bottom: 0;
}

.analysis-section h5,
.recommendations-section h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.5rem 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.analysis-section {
  color: rgba(255, 255, 255, 0.8) !important;
  background: transparent !important;
  border-radius: 0;
  padding: 0;
  margin-bottom: 1rem;
}

.analysis-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-size: 0.875rem;
  background: transparent;
  padding: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
}

.recommendations-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: white;
  font-size: 0.875rem;
  line-height: 1.6;
}

.recommendations-list li {
  margin-bottom: 0.5rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  padding-left: 20px;
}

.recommendations-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: white;
  font-weight: bold;
}

.recommendations-list li:last-child {
  margin-bottom: 0;
}

/* AI Modal Actions - liquid glass design */
.ai-modal-actions {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ai-modal-button {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ai-modal-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.ai-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
  /* Transform effect removed */
  /* Glow effects removed */
}

.ai-modal-start {
  background: rgba(16, 185, 129, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(16, 185, 129, 0.3);
  /* Glow effects removed */
}

.ai-modal-start:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.3);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(16, 185, 129, 0.4);
  /* Transform effect removed */
  /* Glow effects removed */
}

.ai-modal-start:disabled {
  background: rgba(107, 114, 128, 0.2);
  color: rgba(255, 255, 255, 0.5);
  border-color: rgba(107, 114, 128, 0.3);
  cursor: not-allowed;
  transform: none;
  /* Glow effects removed */
}

/* No Documents State */
.no-documents {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  padding: 2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-modal-overlay {
    padding: 0.5rem;
  }
  
  .ai-modal-header {
    padding: 1rem 1.5rem;
  }
  
  .ai-modal-content {
    padding: 1.5rem;
  }
  
  .ai-modal-actions {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }
  
  .ai-modal-button {
    width: 100%;
    justify-content: center;
  }
  
  .summary-stats {
    flex-direction: column;
  }
  
  .ai-modal-title {
    font-size: 1.5rem;
  }
}

/* ================= LEGACY AI REVIEW MODAL STYLES (DEPRECATED) ================= */

/* AI Review Modal Overlay */
.ai-review-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

/* AI Review Modal */
.ai-review-modal {
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  border-radius: 16px;
  /* Glow effect removed */
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideInUp 0.4s ease-out;
}

/* AI Review Header */
.ai-review-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-review-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ai-review-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.ai-review-info h2 {
  color: white;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ai-review-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin: 4px 0 0 0;
}

.ai-review-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-review-close:hover {
  background: rgba(255, 255, 255, 0.2);
  /* Transform effect removed */
}

/* AI Review Content */
.ai-review-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* EP Information Card */
.ai-review-ep-info h3 {
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.ep-info-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
}

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

.ep-key {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.ep-type {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.ep-standard-text {
  color: #e2e8f0;
  line-height: 1.6;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

/* Selected Documents */
.ai-review-documents h3 {
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.selected-documents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.selected-document-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.selected-doc-info {
  flex: 1;
}

.selected-doc-name {
  color: #f1f5f9;
  font-weight: 500;
  margin-bottom: 4px;
}

.selected-doc-meta {
  color: #94a3b8;
  font-size: 12px;
}

.selected-doc-status {
  margin-left: 16px;
}

/* AI Review Progress */
.ai-review-progress {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
}

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

.progress-header h3 {
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.progress-status {
  color: #60a5fa;
  font-size: 14px;
  font-weight: 500;
}

.progress-bar {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 8px;
}

.progress-details {
  color: #94a3b8;
  font-size: 14px;
}

/* AI Review Results */
.ai-review-results {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
}

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

.results-header h3 {
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.results-summary {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.summary-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 600;
}

.stat-value.score-satisfactory {
  color: #10b981;
}

.stat-value.score-partial {
  color: #f59e0b;
}

.stat-value.score-insufficient {
  color: #ef4444;
}

/* Result Item */
.result-item {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.result-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header h4 {
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.result-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-status.status-satisfactory {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.result-status.status-partial {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.result-status.status-insufficient {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.result-content {
  padding: 0;
}

.analysis-section h5,
.recommendations-section h5 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.analysis-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-size: 14px;
  margin-bottom: 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}


.analysis-meta {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.meta-value {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
}

/* AI Review Actions */
.ai-review-actions {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.ai-review-results-actions {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.ai-review-button {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-review-start {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

/* AI review start hover effects removed */

.ai-review-start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-review-cancel,
.ai-review-close {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-review-cancel:hover,
.ai-review-close:hover {
  background: rgba(255, 255, 255, 0.2);
  /* Transform effect removed */
}

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

@keyframes slideInUp {
  from {
    opacity: 0;
    /* Transform effect removed */
  }
  to {
    opacity: 1;
    /* Transform effect removed */
  }
}

/* Responsive Design for AI Review Modal */
@media (max-width: 768px) {
  .ai-review-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .ai-review-header {
    padding: 16px;
  }
  
  .ai-review-content {
    padding: 16px;
  }
  
  .ai-review-actions,
  .ai-review-results-actions {
    padding: 16px;
    flex-direction: column;
  }
  
  .summary-stats {
    flex-direction: column;
    gap: 12px;
  }
  
  .analysis-meta {
    flex-direction: column;
    gap: 12px;
  }
}

/* ================= DARK THEME SYSTEM ================= */

/* Dark Theme Variables */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-quaternary: #475569;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-primary: #334155;
  --border-secondary: #475569;
  --border-light: #64748b;
  --shadow-theme: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-card: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --gradient-card: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --accent-blue: #60a5fa;
  --accent-blue-light: rgba(59, 130, 246, 0.1);
  --accent-green: #34d399;
  --accent-green-light: rgba(16, 185, 129, 0.1);
  --accent-purple: #a78bfa;
  --accent-purple-light: rgba(139, 92, 246, 0.1);
}

/* Apply dark theme to body */
body {
  background: var(--gradient-primary);
  color: var(--text-primary);
  min-height: 100vh;
  /* Ensure proper spacing and prevent footer overlap */
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Dark theme header */
header {
  background-color: rgba(15, 23, 42, 0.95);
  border-bottom-color: var(--border-primary);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  /* Header entrance animation */
  opacity: 0;
  transform: translateY(-20px);
  animation: headerEntrance 0.6s ease-out forwards;
}

@keyframes headerEntrance {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= FOOTER STYLES TO MATCH HEADER ================= */

/* Style footer to match header exactly - clean reference implementation */
footer {
  background: transparent !important;
  background-color: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

/* Override any Tailwind or other background classes on footer */
footer[class*="bg-"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* Footer text and link colors - clean implementation matching reference */
/* These rules come after all global link rules and have high specificity */
footer,
footer p,
footer .text-gray-500,
footer.text-gray-500 {
  color: #cbd5e1 !important; /* gray-500 / text-secondary - matches reference */
}

footer a {
  color: #9ca3af !important; /* gray-400 */
  opacity: 1 !important;
  text-decoration: none;
}

footer a:hover {
  color: #60a5fa !important; /* blue-400 */
  opacity: 1 !important;
}


/* Dark theme hospital cards with enhanced liquid glass effect */
.hospital-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Removed hover effects from hospital cards */

/* Dark theme text colors */
.text-gray-800 {
  color: var(--text-primary) !important;
}

.text-gray-600 {
  color: var(--text-secondary) !important;
}

.text-gray-500:not(footer *):not(footer) {
  color: var(--text-muted) !important;
}

/* Footer text should use text-secondary (gray-500) per reference */
footer .text-gray-500,
footer.text-gray-500,
footer p {
  color: var(--text-secondary) !important; /* #cbd5e1 - matches reference */
}

/* Dark theme background colors */
.bg-white {
  background-color: var(--bg-secondary) !important;
}

.bg-gray-100 {
  background-color: var(--bg-tertiary) !important;
}

.bg-gray-50 {
  background-color: var(--bg-tertiary) !important;
}

/* Dark theme borders */
.border-gray-200 {
  border-color: var(--border-primary) !important;
}

/* Dark theme hover states */
.hover\:bg-blue-50:hover {
  background-color: var(--accent-blue-light) !important;
}

.hover\:bg-red-50:hover {
  background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Dark theme chapter cards and other content cards with enhanced liquid glass effect */
.chapter-card, .content-card, .card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Removed chapter-card hover effects - keeping content-card and card hover for other uses */
.content-card:hover, .card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  /* Glow effects removed */
  /* Transform effect removed */
}

/* Dark theme chapter card text overrides */
.chapter-title {
  color: var(--text-primary) !important;
}

.chapter-description {
  color: var(--text-secondary) !important;
}

/* Comprehensive dark theme text color overrides */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary) !important;
}

p, span, div, td, th {
  color: inherit;
}

/* Dark theme form elements */
.form-input, .form-textarea, input, textarea, select {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.form-input::placeholder, .form-textarea::placeholder, input::placeholder, textarea::placeholder {
  color: var(--text-muted) !important;
}

/* Dark theme table elements */
th {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

td {
  background: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
}

/* Dark theme breadcrumb elements */
.breadcrumb-item {
  color: var(--text-secondary) !important;
}

.breadcrumb-item.active {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.breadcrumb-separator {
  color: var(--text-muted) !important;
}

/* Dark theme document management elements */
.file-name-text {
  color: var(--text-primary) !important;
}

.file-description, .file-uploaded-by {
  color: var(--text-muted) !important;
}

.document-search-input {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.document-search-input::placeholder {
  color: var(--text-muted) !important;
}

/* Dark theme AI review elements */
.ai-review-title {
  color: var(--text-primary) !important;
}

.ai-review-content {
  color: var(--text-secondary) !important;
}

.ai-review-timestamp {
  color: var(--text-muted) !important;
}

/* Dark theme dashboard elements */
.dashboard-card-title {
  color: var(--text-primary) !important;
}

.dashboard-progress-label {
  color: var(--text-muted) !important;
}

/* Dark theme stat elements */
.stat-number {
  color: var(--text-primary) !important;
}

.stat-label {
  color: var(--text-muted) !important;
}

/* Dark theme modal elements */
.modal-title {
  color: var(--text-primary) !important;
}

.modal-content {
  color: var(--text-secondary) !important;
}

/* Dark theme button overrides */
.btn-secondary {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

.btn-secondary:hover {
  background: var(--bg-quaternary) !important;
  color: var(--text-primary) !important;
}

/* Dark theme empty state elements */
.empty-state-title {
  color: var(--text-primary) !important;
}

.empty-state-description {
  color: var(--text-muted) !important;
}

/* Document modal empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
  min-height: 200px;
}

.empty-state-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #374151;
}

.empty-state-text p {
  margin: 0;
  color: #6b7280;
}

/* Dark theme context menu elements */
.context-menu-item {
  color: var(--text-secondary) !important;
}

.context-menu-item:hover {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.context-menu-item.context-menu-danger {
  color: #fca5a5 !important;
}

/* Dark theme upload area elements */
.document-upload-text h3 {
  color: var(--text-primary) !important;
}

.document-upload-text p {
  color: var(--text-muted) !important;
}

/* Dark theme review elements */
.review-section-title {
  color: var(--text-primary) !important;
}

.review-option-text {
  color: var(--text-secondary) !important;
}

.review-option-text small {
  color: var(--text-muted) !important;
}

/* Dark theme compliance form elements */
.compliance-form h2, .compliance-form h3 {
  color: var(--text-primary) !important;
}

.compliance-form p {
  color: var(--text-secondary) !important;
}

/* Dark theme score badge elements */
.ai-badge {
  color: var(--text-primary) !important;
}

.ai-badge.ai-satisfactory {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
}

.ai-badge.ai-partial {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fcd34d !important;
}

.ai-badge.ai-insufficient {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
}

.ai-badge.ai-pending {
  background: var(--bg-tertiary) !important;
  color: var(--text-muted) !important;
}

/* Dark theme overrides for hardcoded colors */
/* Override hardcoded gray colors - but exclude footer */
.text-gray-800:not(footer *):not(footer), 
.text-gray-700:not(footer *):not(footer), 
.text-gray-600:not(footer *):not(footer), 
.text-gray-500:not(footer *):not(footer), 
.text-gray-400:not(footer *):not(footer) {
  color: var(--text-primary) !important;
}

/* Override hardcoded background colors */
.bg-white, .bg-gray-50, .bg-gray-100, .bg-gray-200 {
  background-color: var(--bg-secondary) !important;
}

/* Override hardcoded border colors */
.border-gray-200, .border-gray-300, .border-gray-400 {
  border-color: var(--border-primary) !important;
}

/* Dark theme specific element overrides */
.dashboard-card-title {
  color: var(--text-primary) !important;
}

.dashboard-progress-label {
  color: var(--text-muted) !important;
}

/* Override breadcrumb hardcoded colors */
.breadcrumb-item {
  color: var(--text-secondary) !important;
}

.breadcrumb-item.active {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.breadcrumb-separator {
  color: var(--text-muted) !important;
}

/* Override document management hardcoded colors */
.file-name-text {
  color: var(--text-primary) !important;
}

.file-description, .file-uploaded-by {
  color: var(--text-muted) !important;
}

.document-search-input {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.document-search-input::placeholder {
  color: var(--text-muted) !important;
}

/* Override AI review hardcoded colors */
.ai-review-title {
  color: var(--text-primary) !important;
}

.ai-review-content {
  color: var(--text-secondary) !important;
}

.ai-review-timestamp {
  color: var(--text-muted) !important;
}

/* Override stat elements hardcoded colors */
.stat-number {
  color: var(--text-primary) !important;
}

.stat-label {
  color: var(--text-muted) !important;
}

/* Override modal elements hardcoded colors */
.modal-title {
  color: var(--text-primary) !important;
}

.modal-content {
  color: var(--text-secondary) !important;
}

/* Override upload area hardcoded colors */
.document-upload-text h3 {
  color: var(--text-primary) !important;
}

.document-upload-text p {
  color: var(--text-muted) !important;
}

/* Override review elements hardcoded colors */
.review-section-title {
  color: var(--text-primary) !important;
}

.review-option-text {
  color: var(--text-secondary) !important;
}

.review-option-text small {
  color: var(--text-muted) !important;
}

/* Override compliance form hardcoded colors */
.compliance-form h2, .compliance-form h3 {
  color: var(--text-primary) !important;
}

.compliance-form p {
  color: var(--text-secondary) !important;
}

/* Override empty state hardcoded colors */
.empty-state-title {
  color: var(--text-primary) !important;
}

.empty-state-description {
  color: var(--text-muted) !important;
}

/* Override context menu hardcoded colors */
.context-menu-item {
  color: var(--text-secondary) !important;
}

.context-menu-item:hover {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.context-menu-item.context-menu-danger {
  color: #fca5a5 !important;
}

/* Additional comprehensive dark theme overrides */
/* Ensure all text elements inherit proper colors */
* {
  color: inherit;
}

/* Override any remaining hardcoded text colors */
.text-black, .text-gray-900 {
  color: var(--text-primary) !important;
}

/* Override any remaining hardcoded background colors */
.bg-gray-300, .bg-gray-400, .bg-gray-500 {
  background-color: var(--bg-tertiary) !important;
}

/* Override any remaining hardcoded border colors */
.border-gray-500, .border-gray-600 {
  border-color: var(--border-secondary) !important;
}

/* Ensure all form elements have proper dark theme styling */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"] {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

/* Override auth modal inputs to use black background */
.auth-modal input[type="text"], 
.auth-modal input[type="email"], 
.auth-modal input[type="password"] {
  background: rgba(0, 0, 0, 0.4) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="tel"]:focus, input[type="url"]:focus {
  border-color: var(--accent-blue) !important;
  outline: none !important;
}

/* Override auth modal input focus and hover states */
.auth-modal input[type="text"]:focus,
.auth-modal input[type="email"]:focus,
.auth-modal input[type="password"]:focus {
  background: rgba(0, 0, 0, 0.5) !important;
  border-color: rgba(1, 151, 218, 0.6) !important;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.auth-modal input[type="text"]:hover,
.auth-modal input[type="email"]:hover,
.auth-modal input[type="password"]:hover {
  background: rgba(0, 0, 0, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Ensure all select elements have proper dark theme styling */
select {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

select:focus {
  border-color: var(--accent-blue) !important;
  outline: none !important;
}

/* Ensure all textarea elements have proper dark theme styling */
textarea {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

textarea:focus {
  border-color: var(--accent-blue) !important;
  outline: none !important;
}

/* Override any remaining button styles */
button:not(.btn-primary):not(.btn-secondary):not(.password-toggle-btn) {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

button:not(.btn-primary):not(.btn-secondary):not(.password-toggle-btn):hover {
  background-color: var(--bg-quaternary) !important;
  color: var(--text-primary) !important;
}

/* Ensure password toggle button stays completely transparent */
button.password-toggle-btn,
button.password-toggle-btn:hover,
button.password-toggle-btn:active,
button.password-toggle-btn:focus {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Ensure all links have proper dark theme styling - exclude footer links */
a:not(.text-blue-600):not(.text-blue-500):not(footer a):not(footer *) {
  color: var(--accent-blue) !important;
}

a:not(.text-blue-600):not(.text-blue-500):not(footer a):not(footer *):hover {
  color: var(--accent-blue) !important;
  opacity: 0.8;
}

/* Override any remaining card backgrounds */
.card, .panel, .widget {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

/* Ensure all table elements have proper dark theme styling */
table {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-primary) !important;
}

table th {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

table td {
  background-color: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-primary) !important;
}

/* Ensure all list elements have proper dark theme styling */
ul, ol, li {
  color: var(--text-secondary) !important;
}

/* Override any remaining status colors */
.status-success, .status-complete, .status-approved {
  color: #6ee7b7 !important;
}

.status-warning, .status-pending, .status-partial {
  color: #fcd34d !important;
}

.status-error, .status-failed, .status-rejected {
  color: #fca5a5 !important;
}

.status-info, .status-in-progress {
  color: var(--accent-blue) !important;
}

/* Dark theme feature highlight cards with enhanced liquid glass effect */
.feature-card, .highlight-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  /* Entrance animation properties */
  opacity: 0;
  transform: translateY(20px);
  animation: featureCardEntrance 0.8s ease-out forwards;
}

/* Feature card entrance animation */
@keyframes featureCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Feature cards now use chapter-card animation, no stagger delays */
.feature-card.chapter-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.6s ease-out forwards;
}

.feature-card:hover, .highlight-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 16px 56px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  /* Transform effect removed */
}

/* Dark theme mobile menu - transparent to match header expansion */
#mobile-menu {
  background-color: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Dark theme gradient text */
.text-transparent.bg-clip-text {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dark theme button styling */
button, .btn {
  transition: all 0.3s ease;
}

button:hover, .btn:hover {
  background-color: var(--accent-blue-light);
  color: var(--accent-blue);
}

/* Dark theme input and form elements */
input, textarea, select {
  background-color: var(--bg-tertiary);
  border-color: var(--border-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

/* Dark theme focus states */
input:focus, textarea:focus, select:focus {
  /* Border color change removed */
  /* Glow effect removed */
}

/* Dark theme icon backgrounds */
.bg-blue-100 {
  background-color: rgba(59, 130, 246, 0.2) !important;
}

.bg-green-100 {
  background-color: rgba(16, 185, 129, 0.2) !important;
}

.bg-purple-100 {
  background-color: rgba(139, 92, 246, 0.2) !important;
}

/* Dark theme icon colors */
.text-blue-600 {
  color: #60a5fa !important;
}

.text-green-600 {
  color: #34d399 !important;
}

.text-purple-600 {
  color: #a78bfa !important;
}

/* Dark theme link colors - exclude footer links */
a:not(footer a):not(footer *) {
  color: var(--accent-blue);
}

a:not(footer a):not(footer *):hover {
  color: var(--accent-blue);
  opacity: 0.8;
}


/* ================= AI COMPLIANCE MODULE - MODERN UI/UX ================= */
/* Modern design system with enhanced accessibility and animations */

/* ================= GLOBAL FOCUS BORDER REMOVAL ================= */
/* Remove all focus borders and outlines from the entire application */
*:focus,
*:focus-visible,
*:focus-within {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

/* ================= HERO GRADIENT TEXT ================= */
.hero-gradient-text {
  background: linear-gradient(135deg, #0197da, #60a5fa);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: hero-gradient-smooth 8s ease-in-out infinite;
  will-change: opacity, transform, background-position;
  /* Entrance animation */
  opacity: 0;
  transform: translateY(30px);
  animation: heroTextEntrance 1s ease-out 0.3s forwards, hero-gradient-smooth 8s ease-in-out 1.3s infinite;
}

/* Hero text entrance animation */
@keyframes heroTextEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hospital name entrance animation */
.hospital-name-entrance {
  opacity: 0;
  transform: translateY(20px);
  animation: hospitalNameEntrance 0.8s ease-out forwards;
}

@keyframes hospitalNameEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-gradient-smooth {
  0% { 
    opacity: 1;
    transform: scale(1);
    background-position: 0% 0%;
  }
  25% {
    opacity: 0.9;
    transform: scale(1.005);
    background-position: 100% 0%;
  }
  50% { 
    opacity: 0.8;
    transform: scale(1.01);
    background-position: 100% 100%;
  }
  75% {
    opacity: 0.9;
    transform: scale(1.005);
    background-position: 0% 100%;
  }
  100% { 
    opacity: 1;
    transform: scale(1);
    background-position: 0% 0%;
  }
}

/* Additional Gradient Text Class from images/styles.css */
.gradient-text {
  background: linear-gradient(135deg, #0197da, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================= iOS 26 LIQUID GLASS EFFECTS ================= */
/* Modern frosted glass containers with light opacity and blur effects */

.liquid-glass-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-container:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  /* Transform effect removed */
}

.liquid-glass-dropdown {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-dropdown:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 
    0 8px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.liquid-glass-table {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.liquid-glass-table th {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.liquid-glass-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
}

.liquid-glass-table tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Enhanced glass effect for better visibility */
.liquid-glass-enhanced {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Chart container liquid glass effect */
.chart-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Chart container shimmer effect - removed */

/* Chart bar animations */
@keyframes chartBarGrow {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.chart-bar-animate {
  animation: chartBarGrow 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: bottom;
}

/* Enhanced chart hover effects */
canvas {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

canvas:hover {
  filter: brightness(1.05) saturate(1.1);
}

/* iOS 26 Liquid Glass Animation Effects - shimmer removed */

/* Liquid glass container shimmer effect - removed */

/* Ensure proper positioning for pseudo-elements */
.liquid-glass-container,
.liquid-glass-dropdown {
  position: relative;
  overflow: hidden;
}

/* Enhanced text contrast for better readability */
.liquid-glass-container *,
.liquid-glass-dropdown * {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Smooth transitions for all interactive elements */
.liquid-glass-container *,
.liquid-glass-dropdown *,
.liquid-glass-table * {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced summary styling for dropdown */
.liquid-glass-dropdown summary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-dropdown summary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.liquid-glass-dropdown[open] summary {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* EP Score Display Enhancements */
.score-percent {
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.025em;
}

/* Overall Score Percentage Display */
#scorePercent {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease-in-out;
}

/* Overall Score Label Display */
#scoreLabel {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: color 0.3s ease-in-out;
  font-weight: normal !important;
  color: #6b7280; /* Start with gray color */
}

.score-bar-fill {
  transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

/* Score Select Dropdown Styling */
.score-select {
  background-color: #1f2937; /* dark gray background */
  color: #f9fafb; /* light text */
  border: 2px solid #374151; /* darker border */
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  width: 100%;
  transition: all 0.2s ease-in-out;
}

/* Score color coding - these override the base styling with higher specificity */
select.score-select.score-satisfactory {
  background-color: #065f46 !important; /* dark green */
  color: #d1fae5 !important; /* light green text */
  border-color: #10b981 !important; /* green border */
}

select.score-select.score-partial {
  background-color: #92400e !important; /* dark yellow/orange */
  color: #fef3c7 !important; /* light yellow text */
  border-color: #f59e0b !important; /* yellow border */
}

select.score-select.score-insufficient {
  background-color: #991b1b !important; /* dark red */
  color: #fecaca !important; /* light red text */
  border-color: #ef4444 !important; /* red border */
}

/* Ensure color classes override any other styling */
.score-select[class*="score-satisfactory"] {
  background-color: #065f46 !important;
  color: #d1fae5 !important;
  border-color: #10b981 !important;
}

.score-select[class*="score-partial"] {
  background-color: #92400e !important;
  color: #fef3c7 !important;
  border-color: #f59e0b !important;
}

.score-select[class*="score-insufficient"] {
  background-color: #991b1b !important;
  color: #fecaca !important;
  border-color: #ef4444 !important;
}

/* N/A value styling - distinct purple/violet theme for visibility */
.score-select.score-na {
  background-color: #581c87 !important; /* dark purple background */
  color: #e9d5ff !important; /* light purple text */
  border-color: #8b5cf6 !important; /* purple border */
}

/* Ensure N/A styling overrides base styling */
select.score-select.score-na {
  background-color: #581c87 !important;
  color: #e9d5ff !important;
  border-color: #8b5cf6 !important;
}

.score-select[class*="score-na"] {
  background-color: #581c87 !important;
  color: #e9d5ff !important;
  border-color: #8b5cf6 !important;
}

/* Default/Unselected state - ensure no color highlighting */
.score-select:not(.score-satisfactory):not(.score-partial):not(.score-insufficient):not(.score-na) {
  background-color: #1f2937 !important; /* dark gray background */
  color: #f9fafb !important; /* light text */
  border-color: #374151 !important; /* dark border */
}

.score-select:hover {
  opacity: 0.8; /* slightly fade on hover */
  /* Transform effect removed */ /* subtle lift effect */
}

.score-select:focus {
  outline: none;
  /* Glow effect removed */
  /* Transform effect removed */ /* subtle lift effect */
}

/* Hover effects for color-coded dropdowns */
.score-select.score-satisfactory:hover {
  background-color: #047857 !important; /* slightly lighter green */
}

.score-select.score-partial:hover {
  background-color: #b45309 !important; /* slightly lighter yellow */
}

.score-select.score-insufficient:hover {
  background-color: #b91c1c !important; /* slightly lighter red */
}

.score-select.score-na:hover {
  background-color: #6b21a8 !important; /* slightly lighter purple */
}

.score-select option {
  background-color: #1f2937 !important; /* dark background for options */
  color: #f9fafb !important; /* light text for options */
  padding: 0.5rem !important;
}

.score-select option:hover {
  background-color: #374151 !important; /* darker on hover */
}

.score-select option:checked {
  background-color: #3b82f6 !important; /* blue for selected option */
  color: white !important;
}

/* Placeholder text styling for score selects */
.score-select option[value=""] {
  color: #9ca3af !important; /* lighter gray for placeholder */
  font-style: italic !important;
}

/* Ensure consistent styling across all score selects */
select.score-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f9fafb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.5rem center !important;
  background-size: 1rem !important;
  padding-right: 2.5rem !important;
}

/* Textarea Styling for Comments and Responsible Party */
textarea.form-textarea,
textarea.auto-expand,
textarea[id^="comments-"],
textarea[id^="party-"] {
  background-color: #1f2937 !important; /* dark background */
  color: #f9fafb !important; /* light text */
  border: 2px solid #374151 !important; /* dark border */
  border-radius: 0.375rem !important;
  padding: 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  min-height: 2.5rem !important;
  resize: vertical !important;
  transition: all 0.2s ease-in-out !important;
  width: 100% !important;
}

/* Placeholder text styling */
textarea.form-textarea::placeholder,
textarea.auto-expand::placeholder,
textarea[id^="comments-"]::placeholder,
textarea[id^="party-"]::placeholder {
  color: #9ca3af !important; /* light gray for placeholder */
  opacity: 1 !important;
}

/* Focus states for textareas */
textarea.form-textarea:focus,
textarea.auto-expand:focus,
textarea[id^="comments-"]:focus,
textarea[id^="party-"]:focus {
  outline: none !important;
  /* Border color change removed */
  /* Glow effect removed */
}

/* Hover states for textareas */
textarea.form-textarea:hover,
textarea.auto-expand:hover,
textarea[id^="comments-"]:hover,
textarea[id^="party-"]:hover {
  border-color: #4b5563 !important; /* slightly lighter border on hover */
}

/* Textarea wrapper styling */
.textarea-wrapper {
  position: relative;
  width: 100%;
}

.textarea-mirror {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.75rem;
  border: 2px solid transparent;
  border-radius: 0.375rem;
}

/* Pie Chart Enhancements */
#scorePie {
  transition: stroke-dasharray 0.5s ease-in-out, stroke-dashoffset 0.5s ease-in-out, stroke 0.3s ease-in-out;
}

:root {
  /* Modern Color Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  
  --success-50: #f0fdf4;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --error-50: #fef2f2;
  --error-500: #ef4444;
  --error-600: #dc2626;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
  --transition-slow: 350ms ease-out;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  
  /* Theme Variables - Default to Dark Mode */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-primary: #334155;
  --border-secondary: #475569;
  --shadow-theme: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

html, body {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modern Color System */
.text-blue-600 { color: var(--primary-600) !important; }
.hover\:text-blue-600:hover { color: var(--primary-600) !important; }
.bg-blue-600 { background-color: var(--primary-600) !important; }
.hover\:bg-blue-600:hover { background-color: var(--primary-700) !important; }
.border-blue-600 { border-color: var(--primary-600) !important; }

/* ================= MODERN COMPONENT SYSTEM ================= */

/* Enhanced Score Select Component */
.score-select {
  width: 100%;
  text-align: center;
  appearance: none;
  background: white;
  border: 2px solid var(--secondary-200);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--secondary-700);
  cursor: pointer;
  transition: all var(--transition-normal);
  background-image: url("data:image/svg+xml,%3Csvg fill='%2364748b' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 10.96l3.71-3.73a.75.75 0 011.08 1.04l-4.25 4.25a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-position: right var(--space-sm) center;
  background-repeat: no-repeat;
  background-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.score-select:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-md);
  /* Transform effect removed */
}

.score-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
  background-color: var(--primary-50);
}

/* Score State Styles */
.score-satisfactory { 
  background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
  color: white;
  border-color: var(--success-500);
  /* Glow effect removed */
}

.score-partial { 
  background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
  color: white;
  border-color: var(--warning-500);
  /* Glow effect removed */
}

.score-insufficient { 
  background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
  color: white;
  border-color: var(--error-500);
  /* Glow effect removed */
}

.score-select:focus,
.score-select:active {
  background-color: white !important;
  color: inherit;
  border-color: var(--primary-500) !important;
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* ================= MODERN PROGRESS BAR SYSTEM ================= */

.score-bar {
  height: 0.75rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--secondary-200) 0%, var(--secondary-100) 100%);
  overflow: hidden;
  width: 150px;
  margin-left: var(--space-sm);
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition-normal);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-bar-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 9999px;
  position: relative;
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 100%);
  /* Glow effect removed */
}

/* Score bar shimmer effect - removed */

/* Score Bar Color Variants */
.score-bar-fill.score-excellent {
  background: linear-gradient(90deg, var(--success-500) 0%, var(--success-600) 100%);
  /* Glow effect removed */
}

.score-bar-fill.score-good {
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 100%);
  /* Glow effect removed */
}

.score-bar-fill.score-fair {
  background: linear-gradient(90deg, var(--warning-500) 0%, var(--warning-600) 100%);
  /* Glow effect removed */
}

.score-bar-fill.score-poor {
  background: linear-gradient(90deg, var(--error-500) 0%, var(--error-600) 100%);
  /* Glow effect removed */
}

.score-percent {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--secondary-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--secondary-200);
  transition: all var(--transition-normal);
}

/* EP Score specific styling - override score-percent for EP scores */
.bg-transparent.score-percent {
  background: transparent !important;
  color: white !important;
  border: 1px solid white !important;
  margin-left: 0 !important;
  padding: 0.25rem 0.75rem !important; /* px-3 py-1 */
  border-radius: 0.5rem !important; /* rounded-lg */
}

.score-percent:hover {
  background: var(--secondary-100);
  /* Transform effect removed */
}

.bg-transparent.score-percent:hover {
  background: transparent !important;
  /* Transform effect removed */
}

/* ================= MODERN TABLE SYSTEM ================= */

.table-container {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--secondary-200);
  position: relative;
}

.table-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 50%, var(--primary-500) 100%);
  background-size: 200% 100%;
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  position: relative;
}

th, td {
  border: none;
  border-bottom: 1px solid var(--secondary-200);
  padding: var(--space-lg);
  vertical-align: top;
  transition: all var(--transition-normal);
  position: relative;
}

th {
  white-space: nowrap;
  word-break: normal;
  text-align: center;
  vertical-align: middle;
  background: linear-gradient(135deg, var(--secondary-50) 0%, var(--secondary-100) 100%);
  font-weight: 700;
  color: var(--secondary-800);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--primary-200);
  position: sticky;
  top: 0;
  z-index: 10;
}

th:first-child {
  border-top-left-radius: var(--radius-xl);
  white-space: nowrap;
  min-width: fit-content;
  width: auto;
}

th:last-child {
  border-top-right-radius: var(--radius-xl);
}

td {
  color: var(--secondary-700);
  background: white;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* EP column styling - keep labels on one line and allow expansion */
td:first-child {
  white-space: nowrap;
  min-width: fit-content;
  width: auto;
}

tbody tr {
  transition: all var(--transition-normal);
  position: relative;
}

tbody tr:hover {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  /* Transform effect removed */
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
  z-index: 5;
}

tbody tr:hover td {
  border-color: var(--primary-200);
}

tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-xl);
}

tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-xl);
}

/* Enhanced table cell interactions */
td:focus-within {
  background: var(--primary-50);
  box-shadow: inset 0 0 0 2px var(--primary-200);
}

/* Table responsive wrapper */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}


/* ================= MODERN FORM SYSTEM ================= */

.compliance-form {
  background: white;
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--secondary-200);
  position: relative;
  overflow: hidden;
}

.compliance-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 50%, var(--primary-500) 100%);
}

.form-group {
  margin-bottom: var(--space-xl);
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-700);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-normal);
}

.form-group:focus-within .form-label {
  color: var(--primary-600);
}

.form-input {
  width: 100%;
  border: 2px solid var(--secondary-200);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  background: white;
  font-size: 0.875rem;
  color: var(--secondary-700);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-sans);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100), var(--shadow-md);
  background-color: var(--primary-50);
  /* Transform effect removed */
}

.form-input:hover {
  border-color: var(--primary-300);
  background-color: var(--secondary-50);
  box-shadow: var(--shadow-md);
}

.form-input::placeholder {
  color: var(--secondary-400);
  font-style: italic;
}

.form-textarea {
  width: 100%;
  border: 2px solid var(--secondary-200);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  background: white;
  font-size: 0.875rem;
  color: var(--secondary-700);
  transition: all var(--transition-normal);
  min-height: 120px;
  resize: vertical;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-sans);
  line-height: 1.6;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100), var(--shadow-md);
  background-color: var(--primary-50);
  /* Transform effect removed */
}

.form-textarea:hover {
  border-color: var(--primary-300);
  background-color: var(--secondary-50);
  box-shadow: var(--shadow-md);
}

.form-textarea::placeholder {
  color: var(--secondary-400);
  font-style: italic;
}

/* Enhanced textarea with auto-expand */
.auto-expand {
  resize: none;
  overflow: hidden;
  min-height: 40px;
  max-height: 200px;
}

.textarea-wrapper {
  position: relative;
}

.textarea-mirror {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 0.875rem;
  line-height: 1.6;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid transparent;
  font-family: var(--font-sans);
}

/* ================= AI REVIEW STYLES ================= */

.ai-review-container {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #0ea5e9;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  position: relative;
}

.ai-review-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ai-review-icon {
  width: 24px;
  height: 24px;
  color: #0ea5e9;
}

.ai-review-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0c4a6e;
}

.ai-review-content {
  color: #0c4a6e;
  line-height: 1.6;
}

.ai-review-confidence {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0c4a6e;
  margin-top: 0.75rem;
}

/* ================= MODERN CARD SYSTEM ================= */
/* Hospital card styles moved to unified tile-card section below */

/* Removed blue line from hospital cards */
/* Removed hover effects from hospital cards */

/* Hospital card active state transform effect removed */

/* ================= UNIFIED TILE CARD STYLES ================= */

/* Base tile-card class with consistent bounce animation */
.tile-card {
  position: relative;
  cursor: pointer;
  margin: 0;
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  /* Entrance animation with bounce effect - consistent across all tiles */
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.6s ease-out forwards;
}

/* Chapter card extends tile-card */
.chapter-card,
.tile-card.chapter-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  justify-content: space-between;
  /* Ensure chapter-card gets bounce animation */
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.6s ease-out forwards;
}

/* Ensure tiles in chapter-tiles container get bounce animation */
#chapter-tiles .chapter-card,
#chapter-tiles .tile-card,
#chapter-tiles .stagger-item {
  /* Force bounce animation - ensure it overrides any conflicting rules */
  animation: cardEntrance 0.6s ease-out forwards !important;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(30px);
}

/* Ensure tiles in chapter-cards container get bounce animation - same as chapter-tiles */
#chapter-cards .chapter-card:not(.chapter-card-enabled):not(.chapter-card-disabled),
#chapter-cards .tile-card:not(.chapter-card-enabled):not(.chapter-card-disabled),
#chapter-cards .stagger-item:not(.chapter-card-enabled):not(.chapter-card-disabled) {
  /* Force bounce animation - ensure it overrides any conflicting rules */
  animation: cardEntrance 0.6s ease-out forwards !important;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(30px);
}

/* Ensure enabled/disabled tiles in chapter-cards also get bounce animation */
#chapter-cards .chapter-card-enabled,
#chapter-cards .tile-card.chapter-card-enabled,
#chapter-cards .stagger-item.chapter-card-enabled {
  /* Force bounce animation for enabled cards */
  animation: cardEntranceEnabled 0.6s ease-out forwards !important;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(30px);
}

#chapter-cards .chapter-card-disabled,
#chapter-cards .tile-card.chapter-card-disabled,
#chapter-cards .stagger-item.chapter-card-disabled {
  /* Force bounce animation for disabled cards */
  animation: cardEntranceDisabled 0.6s ease-out forwards !important;
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(30px);
}

/* Hospital card extends tile-card - ensure it gets animation */
.hospital-card,
.tile-card.hospital-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: var(--space-2xl);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  justify-content: center;
  /* Ensure hospital-card gets bounce animation */
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.6s ease-out forwards;
}

/* Tile hover effects - matching content-card hover style */
.tile-card:hover,
.chapter-card:hover,
.hospital-card:hover,
.tile-card.chapter-card:hover,
.tile-card.hospital-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Ensure consistent spacing for all chapter card content */
.chapter-card .flex-1 {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

/* Ensure chapter card content is properly spaced */
.chapter-card .text-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

/* Hospital tiles - center content vertically and horizontally */
#hospital-tiles .tile-card,
#hospital-tiles .chapter-card {
  justify-content: center;
  /* No entrance animation - tiles appear immediately */
  opacity: 1;
  transform: none;
  animation: none !important;
}

#hospital-tiles .tile-card h3,
#hospital-tiles .chapter-card h3 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.chapter-card .mt-auto {
  margin-top: auto;
  min-height: 32px; /* Ensure consistent bottom spacing */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Stagger-item now uses tile-card animation - no separate animation needed */
/* Animation is handled by .tile-card and .chapter-card classes */

/* Basic card entrance animation with bounce effect */
@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-5px);  /* Slight overshoot for bounce effect */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enabled and disabled cards have identical styling except for opacity */
.chapter-card-enabled {
  cursor: pointer;
}

.chapter-card-disabled {
  cursor: not-allowed;
}

/* Both card states use the same entrance animation but with different final opacity */
.tile-card.chapter-card-enabled,
.stagger-item.chapter-card-enabled,
.chapter-card.chapter-card-enabled {
  animation: cardEntranceEnabled 0.6s ease-out forwards;
}

.tile-card.chapter-card-disabled,
.stagger-item.chapter-card-disabled,
.chapter-card.chapter-card-disabled {
  animation: cardEntranceDisabled 0.6s ease-out forwards;
}

/* Entrance animation keyframes for enabled cards with bounce effect */
@keyframes cardEntranceEnabled {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-5px);  /* Slight overshoot for bounce effect */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Entrance animation keyframes for disabled cards with bounce effect */
@keyframes cardEntranceDisabled {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 0.3;
    transform: translateY(-5px);
  }
  100% {
    opacity: 0.5;
    transform: translateY(0);
  }
}

/* Revealed state for scroll animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Hospital tiles container - no container animation, tiles animate individually */
#hospital-tiles {
  /* Container is immediately visible so tile animations can be seen */
  opacity: 1;
  transform: translateY(0);
  /* Ensure proper spacing at bottom */
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  /* Allow overshoot animation to be visible - prevent clipping */
  overflow: visible;
  /* Add padding to allow overshoot animation (scale 1.02) to be visible */
  padding: 1rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

/* Chapter tiles container - no container animation, tiles animate individually */
#chapter-tiles {
  /* Container is immediately visible so tile animations can be seen */
  opacity: 1;
  transform: translateY(0);
  /* Ensure proper spacing at bottom */
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  /* Allow overshoot animation to be visible - prevent clipping */
  overflow: visible;
  /* Add padding to allow overshoot animation (scale 1.02) to be visible */
  padding: 1rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

/* Chapter cards container - no container animation, tiles animate individually */
#chapter-cards {
  /* Container is immediately visible so tile animations can be seen */
  opacity: 1;
  transform: translateY(0);
  /* Ensure proper spacing at bottom */
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  /* Allow overshoot animation to be visible - prevent clipping */
  overflow: visible;
}

/* Offsite grid container - no container animation, tiles animate individually */
#offsite-grid {
  /* Container is immediately visible so tile animations can be seen */
  opacity: 1;
  transform: translateY(0);
  /* Allow overshoot animation to be visible - prevent clipping */
  overflow: visible;
  /* Add padding to allow overshoot animation (scale 1.02) to be visible */
  padding: 1rem;
  box-sizing: border-box;
}

/* Ensure consistent grid spacing for chapter cards */
#chapter-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
  /* Add padding to allow overshoot animation (scale 1.02) to be visible */
  padding: 1rem;
  box-sizing: border-box;
  /* Prevent clipping of animated tiles */
  overflow: visible;
}

/* Responsive grid for chapter cards */
@media (min-width: 768px) {
  #chapter-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #chapter-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@keyframes containerEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Removed blue line from chapter cards */
/* Removed hover effects from chapter cards */

/* Chapter card active state transform effect removed */

/* Remove focus outline from chapter cards */
.chapter-card:focus,
.chapter-card:focus-visible {
  outline: none !important;
  box-shadow: var(--shadow-md) !important;
  border-color: var(--secondary-200) !important;
}

/* Remove focus outline from hospital cards */
.hospital-card:focus,
.hospital-card:focus-visible {
  outline: none !important;
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.chapter-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--secondary-800);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.chapter-description {
  color: var(--secondary-600);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: var(--space-xs);
}

/* ================= DASHBOARD STYLES ================= */

.dashboard-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  transform-origin: center;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(1, 151, 218, 0.1), transparent);
  transition: left 0.6s ease;
}

.dashboard-card:hover::before {
  left: 100%;
}

.dashboard-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  /* Transform effect removed */
  border-color: rgba(1, 151, 218, 0.3);
}

.dashboard-progress-ring {
  transform: rotate(-90deg);
}

.dashboard-progress-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.dashboard-progress-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Dashboard Chapter Performance Table Responsive Styles */
#chapterTableBody .grid {
  min-height: 60px;
}

/* Mobile-specific styles for dashboard table */
@media (max-width: 640px) {
  /* Hide table header labels on small mobile screens */
  .table-header-row {
    display: none;
  }
  
  /* Reduce text sizes to fit better on mobile */
  #chapterTableBody .text-2xl {
    font-size: 1rem;
  }
  
  #chapterTableBody .font-medium {
    font-size: 0.875rem;
  }
  
  /* Make status text smaller */
  #chapterTableBody .text-xs {
    font-size: 0.625rem;
  }
  
  /* Reduce padding and gaps */
  #chapterTableBody .grid {
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  
  #chapterTableBody .px-2 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* Make progress bars smaller */
  #chapterTableBody .h-2 {
    height: 0.25rem;
  }
  
  /* Reduce header text size */
  .liquid-glass-container .grid:first-child .text-sm {
    font-size: 0.625rem;
  }
  
  /* Make action links smaller */
  #chapterTableBody a {
    font-size: 0.75rem;
  }
  
  #chapterTableBody svg {
    width: 0.75rem;
    height: 0.75rem;
  }
}

/* ================= MOBILE OPTIMIZATION FOR CHAPTER PAGES ================= */
/* Prevent horizontal scrolling on mobile devices */
@media (max-width: 768px) {
  /* Ensure body and html don't allow horizontal overflow */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  /* Optimize main content container for mobile */
  main#main-content {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  /* Force the main content to be constrained */
  main#main-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Optimize max-width containers for mobile */
  .max-w-7xl {
    max-width: 100% !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Optimize section containers */
  section {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Optimize grid layouts for mobile */
  .grid {
    gap: 1rem !important;
  }
  
  /* Single column layout for very small screens */
  .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  /* Force single column for all grid layouts on mobile */
  .grid[class*="grid-cols"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Ensure Tailwind responsive classes work properly on mobile */
  .md\\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  .lg\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  /* Optimize chapter cards for mobile */
  .chapter-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1rem !important;
    box-sizing: border-box;
  }
  
  /* Ensure text doesn't overflow in chapter cards */
  .chapter-title {
    font-size: 1rem !important;
    line-height: 1.25rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .chapter-description {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Optimize hero section text for mobile */
  h1 {
    font-size: 2rem !important;
    line-height: 2.25rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Optimize paragraph text for mobile */
  p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Optimize header for mobile */
  header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Ensure mobile menu doesn't cause overflow */
  #mobile-menu {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* Optimize navigation for mobile */
  nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  /* Ensure buttons and interactive elements fit on mobile */
  button, a {
    min-width: auto;
    max-width: 100%;
  }
  
  /* Optimize main content sections */
  section.max-w-7xl {
    max-width: 100% !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Ensure proper text wrapping in all containers */
  * {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Optimize flex containers for mobile */
  .flex {
    flex-wrap: wrap;
  }
  
  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Override global img rule for auth modal logo to maintain proper sizing */
  .auth-modal-logo img {
    max-width: 200px !important;
    width: 100% !important;
  }
  
  /* Respect responsive breakpoints within mobile query */
  @media (max-width: 480px) {
    .auth-modal-logo img {
      max-width: 150px !important;
    }
  }
  
  @media (max-width: 360px) {
    .auth-modal-logo img {
      max-width: 120px !important;
    }
  }
  
  /* ================= MOBILE OPTIMIZATION FOR SECTION DROPDOWNS AND TABLES ================= */
  
  /* CRITICAL: Override ALL fixed widths for section dropdowns on mobile */
  section[data-chapter] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] .group {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] .group[open] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] .group[open] summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] details {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] details[open] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  section[data-chapter] summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  /* Force override of any remaining fixed widths */
  section[data-chapter] * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* CRITICAL: Force section card containers to mobile width */
  section[data-chapter] .bg-white.rounded-xl.shadow-lg {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    margin: 0 !important;
    padding: 0.75rem !important;
  }
  
  section[data-chapter] .bg-white.rounded-xl.shadow-lg.border.border-gray-200 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  /* Override any specific width classes that might be applied */
  section[data-chapter] .w-full,
  section[data-chapter] .w-auto,
  section[data-chapter] .w-fit {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  /* Force all child elements to respect container width */
  section[data-chapter] .bg-white.rounded-xl.shadow-lg * {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
  }
  
  /* Optimize table containers for mobile */
  section[data-chapter] .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
  }
  
  /* Custom scrollbar for webkit browsers on mobile */
  section[data-chapter] .table-responsive::-webkit-scrollbar {
    height: 6px;
  }
  
  section[data-chapter] .table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
  }
  
  section[data-chapter] .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
  }
  
  section[data-chapter] .table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
  }
  
  section[data-chapter] table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
    min-width: 600px; /* Minimum width to maintain table structure */
  }
  
  /* Optimize table cells for mobile */
  section[data-chapter] table td,
  section[data-chapter] table th {
    padding: 0.5rem 0.25rem !important;
    font-size: 0.75rem !important;
    line-height: 1.25rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: none !important;
  }
  
  /* Optimize textareas in tables for mobile */
  section[data-chapter] table td textarea {
    width: 100% !important;
    min-width: 120px !important;
    max-width: 200px !important;
    font-size: 0.75rem !important;
    padding: 0.25rem !important;
    resize: vertical !important;
  }
  
  /* Optimize select dropdowns in tables for mobile */
  section[data-chapter] table td select {
    width: 100% !important;
    min-width: 80px !important;
    max-width: 120px !important;
    font-size: 0.75rem !important;
    padding: 0.25rem !important;
  }
  
  /* CRITICAL: Force summary content to mobile width */
  section[data-chapter] summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    padding: 0.75rem !important;
    box-sizing: border-box !important;
  }
  
  section[data-chapter] summary > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  section[data-chapter] summary > div:first-child {
    max-width: 100% !important;
    flex: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  section[data-chapter] summary > div:last-child {
    max-width: 100% !important;
    min-width: auto !important;
    width: 100% !important;
    align-self: flex-end !important;
    box-sizing: border-box !important;
  }
  
  /* Force text content to wrap properly */
  section[data-chapter] summary p,
  section[data-chapter] summary span,
  section[data-chapter] summary div {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }
  
  /* Optimize score display for mobile */
  section[data-chapter] summary .flex.items-center.space-x-3 {
    min-width: auto !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
  }
  
  /* Optimize group content padding for mobile */
  section[data-chapter] .group > div.p-6 {
    padding: 0.75rem !important;
  }
  
  /* Ensure main content area doesn't cause horizontal scrolling */
  main#main-content .max-w-7xl {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  /* Optimize any remaining fixed-width elements */
  .w-full {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Ensure all containers respect mobile boundaries */
  .container,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-2xl,
  .max-w-xl {
    max-width: 100% !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* NUCLEAR OPTION: Force ALL elements to respect mobile width */
  * {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  
  /* Specifically target any remaining fixed-width elements */
  [style*="width: 1200px"],
  [style*="width:1200px"],
  [style*="min-width: 1200px"],
  [style*="min-width:1200px"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  /* Further reduce padding for very small screens */
  main#main-content {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .max-w-7xl {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* Reduce grid gap further */
  .grid {
    gap: 0.75rem !important;
  }
  
  /* Smaller chapter cards */
  .chapter-card {
    padding: 0.75rem !important;
    min-height: auto !important;
  }
  
  /* Smaller text for very small screens */
  h1 {
    font-size: 1.75rem !important;
    line-height: 2rem !important;
  }
  
  .chapter-title {
    font-size: 0.875rem !important;
    line-height: 1.125rem !important;
  }
  
  .chapter-description {
    font-size: 0.75rem !important;
    line-height: 1.125rem !important;
  }
  
  /* Smaller icons */
  .chapter-card .w-12.h-12 {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
  
  .chapter-card .w-6.h-6 {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }
  
  /* Further optimize for very small screens */
  section.max-w-7xl {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* Reduce header padding further */
  header {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  /* Ensure all text is properly sized */
  .text-xl {
    font-size: 1rem !important;
    line-height: 1.25rem !important;
  }
  
  .text-lg {
    font-size: 0.875rem !important;
    line-height: 1.125rem !important;
  }
  
  /* Further optimize section dropdowns for very small screens */
  section[data-chapter] .bg-white.rounded-xl.shadow-lg {
    padding: 0.5rem !important;
  }
  
  section[data-chapter] .group > div.p-6 {
    padding: 0.5rem !important;
  }
  
  /* Further optimize table cells for very small screens */
  section[data-chapter] table td,
  section[data-chapter] table th {
    padding: 0.25rem 0.125rem !important;
    font-size: 0.625rem !important;
    line-height: 1rem !important;
  }
  
  /* Further optimize form elements for very small screens */
  section[data-chapter] table td textarea {
    min-width: 100px !important;
    max-width: 150px !important;
    font-size: 0.625rem !important;
    padding: 0.125rem !important;
  }
  
  section[data-chapter] table td select {
    min-width: 60px !important;
    max-width: 100px !important;
    font-size: 0.625rem !important;
    padding: 0.125rem !important;
  }
  
  /* Reduce table minimum width for very small screens */
  section[data-chapter] table {
    min-width: 500px !important;
  }
  
  /* Further optimize containers for very small screens */
  main#main-content .max-w-7xl {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }
  
  .container,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-2xl,
  .max-w-xl {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* NUCLEAR OPTION for very small screens: Force ALL elements to respect mobile width */
  * {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  
  /* Force section elements to be even more constrained on very small screens */
  section[data-chapter] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  section[data-chapter] * {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }
}

/* ================= MODERN BUTTON SYSTEM ================= */

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

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

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  /* Transform effect removed */
  box-shadow: var(--shadow-xl);
}

.btn-primary:active {
  /* Transform effect removed */
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-600) 100%);
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-600) 0%, var(--secondary-700) 100%);
  /* Transform effect removed */
  box-shadow: var(--shadow-xl);
}

.btn-ai {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.btn-ai::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

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

.btn-ai:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  /* Transform effect removed */
  box-shadow: var(--shadow-xl);
}

/* Button Loading States - REMOVED */

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ================= MODERN ANIMATIONS & LOADING STATES - REMOVED ================= */

@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    /* Transform effect removed */
    opacity: 0.9;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    /* Transform effect removed */
  }
  to {
    opacity: 1;
    /* Transform effect removed */
  }
}

/* .loading-text - REMOVED */

/* Modern Card Animations */
.card-lift {
  transition: all var(--transition-slow);
}

.card-lift:hover {
  /* Transform effect removed */
  box-shadow: var(--shadow-2xl);
}

/* Stagger Animation - removed duplicate, using unified tile-card animation */
/* Animation is now handled by .tile-card and .chapter-card classes */

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  /* Transform effect removed */
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  /* Transform effect removed */
}

/* Page Transition */
.page-transition {
  transition: all 0.3s ease-in-out;
}

@keyframes pageExit {
  from {
    opacity: 1;
    /* Transform effect removed */
  }
  to {
    opacity: 0;
    /* Transform effect removed */
  }
}

/* Micro-interactions */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* Focused state transform effect removed */

/* Field Completion Animation */
.field-completed {
  border-color: var(--success-500) !important;
  background-color: var(--success-50) !important;
}

.completion-animation {
  animation: completionPulse 1s ease-out;
}

@keyframes completionPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Success Notification */
.success-notification {
  animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05) translateY(0);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    /* Transform effect removed */
  }
  to {
    opacity: 0;
    /* Transform effect removed */
  }
}

/* Shake Animation */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Pulse Attention */
.pulse-attention {
  animation: pulseAttention 2s ease-in-out infinite;
}

@keyframes pulseAttention {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    /* Transform effect removed */
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

/* ================= FULLSCREEN LOADER ================= */
.fullscreen-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ================= AUTH MODAL STYLES - LIQUID GLASS AESTHETIC ================= */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.auth-modal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2.5rem;
  border-radius: 24px;
  text-align: center;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
  position: relative;
  overflow: hidden;
}

.auth-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.4) 50%, 
    transparent 100%);
}


@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-modal-login {
  min-height: 400px;
}

.auth-modal-signup {
  min-height: 450px;
}

.auth-modal-logo {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

.auth-modal-logo img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Responsive logo sizing for smaller screens */
@media (max-width: 480px) {
  .auth-modal-logo img {
    max-width: 150px;
  }
}

@media (max-width: 360px) {
  .auth-modal-logo img {
    max-width: 120px;
  }
}

.auth-modal-inputs {
  margin: 1.5rem 0;
  position: relative;
  z-index: 2;
}

.auth-modal-input {
  width: 100%;
  padding: 16px 20px;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-sizing: border-box;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.auth-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.auth-modal-input:focus {
  outline: none;
  border-color: rgba(1, 151, 218, 0.6);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.auth-modal-input:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.35);
}

.auth-modal-button {
  background: linear-gradient(135deg, 
    rgba(1, 151, 218, 0.8) 0%, 
    rgba(1, 120, 179, 0.9) 50%,
    rgba(1, 151, 218, 0.8) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px 24px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.auth-modal-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent);
  transition: left 0.6s ease;
}

.auth-modal-button:hover {
  background: linear-gradient(135deg, 
    rgba(1, 120, 179, 0.9) 0%, 
    rgba(1, 151, 218, 0.8) 50%,
    rgba(1, 120, 179, 0.9) 100%);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.auth-modal-button:hover::before {
  left: 100%;
}

.auth-modal-button:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-modal-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg, 
    rgba(107, 114, 128, 0.6) 0%, 
    rgba(75, 85, 99, 0.7) 100%);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-modal-footer {
  margin-top: 1.5rem;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.auth-modal-footer a {
  color: rgba(1, 151, 218, 0.9);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.auth-modal-footer a:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(1, 151, 218, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ================= PASSWORD INPUT WRAPPER & VISIBILITY TOGGLE ================= */
.password-input-wrapper {
  position: relative;
  width: 100%;
  margin: 12px 0;
}

.password-input-wrapper .auth-modal-input {
  margin: 0;
  padding-right: 45px;
}

.password-toggle-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 0 !important;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
  z-index: 10;
  width: 20px;
  height: 20px;
  box-shadow: none !important;
  outline: none !important;
}

.password-toggle-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: none !important;
}

.password-toggle-btn:active {
  color: rgba(255, 255, 255, 1);
  background: none !important;
}

.password-toggle-btn:focus {
  outline: none !important;
  background: none !important;
}

.password-toggle-btn .eye-icon {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  fill: none;
  background: none !important;
}

.password-toggle-btn svg {
  background: none !important;
  display: block;
}

/* Hide native browser password reveal buttons in auth modal (Edge, Chrome, etc.) */
.auth-modal input[type="password"]::-ms-reveal,
.auth-modal input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Also hide for password inputs inside wrapper */
.password-input-wrapper input[type="password"]::-ms-reveal,
.password-input-wrapper input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ================= PASSWORD RESET MODAL STYLES ================= */
.auth-modal-password-reset {
  min-height: 450px;
}

.password-reset-message {
  text-align: center;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  position: relative;
  z-index: 2;
}

.password-reset-message p {
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.password-reset-error {
  color: #ff6b6b;
  font-size: 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ================= FORGOT PASSWORD MODAL STYLES ================= */
.auth-modal-forgot-password {
  min-height: 400px;
}

.forgot-password-message {
  text-align: center;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  position: relative;
  z-index: 2;
}

.forgot-password-message p {
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.forgot-password-error {
  color: #ff6b6b;
  font-size: 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.forgot-password-success {
  color: #4ade80;
  font-size: 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ================= HAMBURGER MENU STYLES ================= */

.hamburger-icon {
  transition: transform 0.3s ease;
}

/* Hamburger to X animation */
.hamburger-line {
  transition: all 0.3s ease;
  transform-origin: center;
}

#hamburger-btn.menu-open .line1 {
  transform: rotate(45deg) translate(0, 6px);
}

#hamburger-btn.menu-open .line2 {
  opacity: 0;
  transform: scaleX(0);
}

#hamburger-btn.menu-open .line3 {
  transform: rotate(-45deg) translate(0, -6px);
}

/* Hamburger icon hover transform effect removed */

.mobile-menu {
  transition: all 0.3s ease;
  /* Transform effect removed */
  opacity: 0;
}

.mobile-menu.show {
  /* Transform effect removed */
  opacity: 1;
}

/* ================= MODERN HEADER STYLES ================= */

/* Enhanced header with clean blur effect and subtle border */
header {
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  /* Define header height for precise positioning */
  --header-height: 72px; /* Calculated: py-4 (32px) + h-10 (40px) = 72px */
}

/* Hamburger button - no background or borders */
#hamburger-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#hamburger-btn:hover {
  background: transparent !important;
  background-color: transparent !important;
}

#hamburger-btn:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Override any Tailwind or other background classes on header */
header.bg-white,
header[class*="bg-"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* Enhanced mobile menu with clean blur effect */
#mobile-menu {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Ensure content behind header is properly blurred */
body {
  position: relative;
}

/* ================= TRANSPARENT SECTION TABLES ================= */

/* Make tables within section dropdowns transparent with minimal borders */
section[data-chapter] table {
  background: transparent !important;
  border: none !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* Add thin white line above table (header separator) */
section[data-chapter] th {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

section[data-chapter] td {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

section[data-chapter] tbody tr:last-child td {
  border-bottom: none !important;
}

section[data-chapter] tbody tr {
  background: transparent !important;
  border: none !important;
}

section[data-chapter] tbody tr:hover {
  background: transparent !important;
  border: none !important;
}

section[data-chapter] tbody tr:hover td {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

section[data-chapter] .table-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

section[data-chapter] .table-responsive {
  border: none !important;
  box-shadow: none !important;
}

/* Add thin white line at the top of the section dropdown content */
section[data-chapter] .group > div.p-6 {
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Add bottom line to section summary to separate from table */
section[data-chapter] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}


/* Ensure content behind header is properly blurred */
body {
  position: relative;
}

/* Add blur overlay for content scrolling behind header */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height, 72px); /* Use CSS custom property for exact header height */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 40; /* Just below header */
}

/* Enhanced mobile menu blur - make it look like header expansion */
#mobile-menu {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Center mobile menu navigation items */
#mobile-menu nav {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

#mobile-menu nav a,
#mobile-menu nav button {
  text-align: center !important;
  justify-content: center !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 200px !important;
  color: white !important;
}

/* Dark mode header blur adjustments */
/* @media (prefers-color-scheme: dark) { */
  header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  #mobile-menu {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }
  
  /* Center mobile menu navigation items - dark theme */
  #mobile-menu nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #mobile-menu nav a,
  #mobile-menu nav button {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 200px !important;
    color: white !important;
  }
  
  body::before {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, transparent 100%);
  }
/* } */

/* ================= MODERN RESPONSIVE DESIGN ================= */

/* Mobile First Approach */
@media (max-width: 640px) {
  :root {
    --space-xs: 0.125rem;
    --space-sm: 0.25rem;
    --space-md: 0.5rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
  }
  
  .hospital-card {
    padding: var(--space-lg);
    height: 160px;
    margin-bottom: var(--space-md);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .chapter-card {
    padding: var(--space-lg);
    height: auto !important;
    min-height: 150px;
    margin-bottom: var(--space-md);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .dashboard-card {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
  }
  
  .compliance-form {
    padding: var(--space-lg);
    margin: var(--space-md);
  }
  
  .table-container {
    margin: var(--space-md);
    border-radius: var(--radius-lg);
  }
  
  th, td {
    padding: var(--space-sm);
    font-size: 0.75rem;
  }
  
  .score-bar {
    width: 100px;
    height: 0.5rem;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-ai {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
  }
  
  .auth-modal {
    width: 95vw;
    padding: 2rem;
    margin: 1rem;
    border-radius: 20px;
  }
  
  .auth-modal-login {
    min-height: 320px;
  }
  
  .auth-modal-signup {
    min-height: 380px;
  }
  
  .auth-modal-input {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 16px;
    border-radius: 12px;
  }
  
  .auth-modal-button {
    padding: 14px 20px;
    border-radius: 12px;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .hospital-card {
    padding: var(--space-xl);
    height: 180px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .chapter-card {
    padding: var(--space-xl);
    height: auto !important;
    min-height: 170px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .dashboard-card {
    padding: var(--space-xl);
  }
  
  .compliance-form {
    padding: var(--space-xl);
  }
  
  .table-container {
    margin: var(--space-lg);
  }
  
  th, td {
    padding: var(--space-md);
  }
  
  .auth-modal {
    width: 90vw;
    max-width: 500px;
    padding: var(--space-xl);
    border-radius: 22px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hospital-card {
    padding: var(--space-2xl);
    height: 200px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .chapter-card {
    padding: var(--space-2xl);
    height: auto !important;
    min-height: 180px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  .dashboard-card {
    padding: var(--space-2xl);
  }
  
  .compliance-form {
    padding: var(--space-2xl);
  }
  
  .table-container {
    margin: var(--space-xl);
  }
  
  th, td {
    padding: var(--space-lg);
  }
}

/* Media query transform effects removed for large screens */

/* Print Styles */
@media print {
  .hospital-card,
  .chapter-card,
  .dashboard-card {
    box-shadow: none;
    border: 1px solid #000;
    break-inside: avoid;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-ai {
    background: #000 !important;
    color: #fff !important;
    box-shadow: none !important;
  }
  
  .score-bar-fill {
    background: #000 !important;
  }
}

/* ================= MODERN ACCESSIBILITY ================= */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .spinner,
  .spinner::after {
    animation: none;
  }
  
  .table-container::before {
    animation: none;
  }
  
  .score-bar-fill::after {
    animation: none;
  }
}

/* Enhanced Focus Indicators - Removed focus borders */
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus:not(.chapter-card):not(.hospital-card) {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-500: #0000ff;
    --primary-600: #0000cc;
    --secondary-200: #000000;
    --secondary-700: #000000;
  }
  
  .hospital-card,
  .chapter-card,
  .dashboard-card,
  .compliance-form,
  .table-container {
    border: 3px solid #000000;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-ai {
    border: 3px solid #000000;
    background: #000000 !important;
    color: #ffffff !important;
  }
  
  .score-select {
    border: 2px solid #000000;
  }
  
  .form-input,
  .form-textarea {
    border: 2px solid #000000;
  }
}

/* Section Card Styling - Lock Width to Prevent Changes */
section[data-chapter] {
  width: 100%;
  display: block;
  overflow: hidden;
  position: relative;
}

section[data-chapter] > div {
  width: 100%;
  display: block;
  overflow: hidden;
  position: relative;
}

section[data-chapter] details {
  width: 100%;
  display: block;
  overflow: hidden;
  position: relative;
}

section[data-chapter] summary {
  width: 100%;
  min-height: 80px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

/* Lock section cards to exact width - no changes allowed */
section[data-chapter] .group {
  width: 100%;
  display: block;
  overflow: hidden;
  position: relative;
}

section[data-chapter] .group summary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

/* CRITICAL: Lock width when expanded - must match collapsed width EXACTLY */
section[data-chapter] .group[open] {
  width: 1200px !important; /* Fixed width - no changes allowed */
  max-width: 1200px !important;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

section[data-chapter] .group[open] summary {
  width: 1200px !important; /* Fixed width - no changes allowed */
  max-width: 1200px !important;
  min-height: 80px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

/* COMPLETELY LOCK all details/summary elements to prevent ANY width changes */
section[data-chapter] details {
  width: 1200px !important;
  max-width: 1200px !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  /* Disable any transitions that might cause width changes */
  transition: none !important;
  animation: none !important;
}

section[data-chapter] details[open] {
  width: 1200px !important;
  max-width: 1200px !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  /* Disable any transitions that might cause width changes */
  transition: none !important;
  animation: none !important;
}

section[data-chapter] summary {
  width: 1200px !important;
  max-width: 1200px !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  /* Disable any transitions that might cause width changes */
  transition: none !important;
  animation: none !important;
}

/* Disable ALL transitions and animations on section card elements */
section[data-chapter] * {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

/* Lock expanded content to exact same width as summary */
section[data-chapter] .group > div {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

/* Force all section card elements to maintain width */
section[data-chapter] * {
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Prevent flex items from expanding beyond container */
section[data-chapter] summary > div {
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}

section[data-chapter] summary > div:first-child {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 200px); /* Leave space for score section */
}

section[data-chapter] summary > div:last-child {
  flex-shrink: 0;
  min-width: 180px;
  max-width: 200px;
}

/* Ensure the score section doesn't expand */
section[data-chapter] summary .flex.items-center.space-x-3 {
  flex-shrink: 0;
  min-width: 180px;
  max-width: 200px;
}

/* CRITICAL: Force section cards to maintain exact width - prevent any expansion */
section[data-chapter] .bg-white.rounded-xl.shadow-lg {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Prevent any content from causing width expansion */
section[data-chapter] .bg-white.rounded-xl.shadow-lg * {
  max-width: 100% !important;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}

/* Lock the card container to prevent any width changes */
section[data-chapter] .bg-white.rounded-xl.shadow-lg.border.border-gray-200 {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Ensure the card maintains width in both collapsed and expanded states */
section[data-chapter] .bg-white.rounded-xl.shadow-lg.border.border-gray-200.overflow-hidden {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* Specifically target tables to prevent width expansion */
section[data-chapter] table {
  width: 100%;
  table-layout: fixed;
  overflow: hidden;
}

section[data-chapter] .table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Ensure table cells don't expand beyond container */
section[data-chapter] table td {
  max-width: 100%;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Allow table headers to wrap text while maintaining column widths */
section[data-chapter] table th {
  max-width: 100%;
  overflow: visible;
  word-wrap: break-word;
  word-break: keep-all;
  white-space: nowrap;
  line-height: 1.2;
  font-size: 0.75rem;
  padding: 0.5rem 0.25rem;
  vertical-align: top;
  text-align: center;
  position: relative;
  hyphens: none;
}

/* Tooltip for table headers */
section[data-chapter] table th[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Allow text cells to wrap but prevent width expansion */
section[data-chapter] table td.collapsed-text {
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 200px; /* Limit text column width */
}

/* CRITICAL: Force the expanded content area to maintain exact card width - pre-sized for table */
section[data-chapter] .group > div.p-6 {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  /* Lock to exact table width */
  flex-shrink: 0;
  /* Add proper padding for table content */
  padding: 1.5rem !important;
}

/* Lock the table container to prevent width expansion - fill the white container */
section[data-chapter] .group > div.p-6 > div.table-responsive {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  box-sizing: border-box;
  /* Remove centering - let table fill the container */
  display: block;
  /* Remove extra padding that creates nested container effect */
  padding: 0;
}

/* Ensure the table fills the full width of the white container */
section[data-chapter] .group > div.p-6 > div.table-responsive > table {
  width: 100% !important; /* Fill the full container width */
  max-width: 100% !important;
  table-layout: fixed;
  overflow: hidden;
  box-sizing: border-box;
  /* Remove centering - fill the container */
  margin: 0;
}

/* Specific column width controls for proper table layout - PERCENTAGE BASED TO FILL CONTAINER */
/* EP column: keep labels on one line and allow column to expand */
section[data-chapter] table th:nth-child(1), /* EP # */
section[data-chapter] table td:nth-child(1) {
  width: 10% !important;
  min-width: 100px !important;
  max-width: 200px !important;
  padding: 0.5rem 0.5rem !important;
  white-space: nowrap !important;
  text-overflow: unset !important;
  overflow: visible !important;
  word-wrap: normal !important;
  box-sizing: border-box !important;
}

section[data-chapter] table th:nth-child(2), /* Standard Text */
section[data-chapter] table td:nth-child(2) {
  width: 35% !important;
  min-width: 200px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

section[data-chapter] table th:nth-child(3), /* Score */
section[data-chapter] table td:nth-child(3) {
  width: 10% !important;
  min-width: 100px !important;
  max-width: 120px !important;
  padding: 0.5rem !important;
  white-space: normal !important;
  text-overflow: unset !important;
  word-wrap: break-word !important;
}

section[data-chapter] table th:nth-child(4), /* Comments */
section[data-chapter] table td:nth-child(4) {
  width: 20% !important;
  min-width: 150px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

section[data-chapter] table th:nth-child(5), /* Responsible Party */
section[data-chapter] table td:nth-child(5) {
  width: 20% !important;
  min-width: 150px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

section[data-chapter] table th:nth-child(6), /* Repository/Folder */
section[data-chapter] table td:nth-child(6) {
  width: 8% !important;
  min-width: 60px !important;
  max-width: 80px !important;
  padding: 0.5rem !important;
}

/* Ensure textareas fit properly within their columns */
section[data-chapter] table td textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  resize: vertical !important;
  min-height: 2.5rem !important;
  padding: 0.5rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
}

/* Ensure textareas don't overflow their containers */
section[data-chapter] table td:nth-child(4) textarea, /* Comments */
section[data-chapter] table td:nth-child(5) textarea { /* Responsible Party */
  width: calc(100% - 1rem) !important; /* Account for cell padding */
  max-width: calc(100% - 1rem) !important;
  box-sizing: border-box !important;
  /* Add internal padding to prevent text from touching edges */
  padding: 0.5rem 0.375rem !important;
  /* Ensure proper border and spacing */
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  /* Prevent horizontal overflow */
  overflow-x: hidden !important;
  word-wrap: break-word !important;
  /* Smaller font size to fit better */
  font-size: 0.8rem !important;
  line-height: 1.2rem !important;
}

/* Column width adjustments for non-PE sub-chapter HTMLs (tables with Doc column) */
/* Target tables that have a "Doc" column (4th column with title="Documentation Required") */
/* Doc column (4th) - icon column, narrow */
section[data-chapter] table:has(th[title="Documentation Required"]) th:nth-child(4),
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(4) {
  width: 6% !important;
  min-width: 50px !important;
  max-width: 70px !important;
  padding: 0.5rem !important;
  text-align: center !important;
}

/* Folder column (5th) - icon column, narrow */
section[data-chapter] table:has(th[title="Documentation Required"]) th:nth-child(5),
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(5) {
  width: 6% !important;
  min-width: 50px !important;
  max-width: 70px !important;
  padding: 0.5rem !important;
  text-align: center !important;
}

/* Comments column (6th) - textarea, wider */
section[data-chapter] table:has(th[title="Documentation Required"]) th:nth-child(6),
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(6) {
  width: 22% !important;
  min-width: 180px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

/* Responsible Party column (7th) - textarea, wider */
section[data-chapter] table:has(th[title="Documentation Required"]) th:nth-child(7),
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(7) {
  width: 22% !important;
  min-width: 180px !important;
  max-width: none !important;
  padding: 0.5rem !important;
}

/* Update textarea rules for non-PE files (Comments and Responsible Party are now 6th and 7th) */
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(6) textarea, /* Comments */
section[data-chapter] table:has(th[title="Documentation Required"]) td:nth-child(7) textarea { /* Responsible Party */
  width: calc(100% - 1rem) !important;
  max-width: calc(100% - 1rem) !important;
  box-sizing: border-box !important;
  padding: 0.5rem 0.375rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  overflow-x: hidden !important;
  word-wrap: break-word !important;
  font-size: 0.8rem !important;
  line-height: 1.2rem !important;
}

/* Keep original container constraints but prevent expansion */
/* main#main-content overflow hidden removed to prevent content hiding issues */

/* Maintain original max-width but prevent expansion */
.max-w-7xl {
  overflow: hidden;
  max-width: 80rem; /* Ensure consistent max-width */
}

/* Allow tile containers to show overshoot animation */
section.max-w-7xl:has(#chapter-cards),
section.max-w-7xl:has(#hospital-tiles),
section.max-w-7xl:has(#offsite-grid),
section.max-w-7xl:has(#chapter-tiles) {
  overflow: visible;
  padding: 0.5rem;
}

/* Keep original container width but prevent expansion */
.max-w-7xl.mx-auto {
  overflow: hidden;
  max-width: 80rem; /* Ensure consistent max-width */
  margin-left: auto;
  margin-right: auto;
}

/* CRITICAL: Pre-size section cards to table width to prevent resize on expand */
section[data-chapter] {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Lock to exact table width */
  flex-shrink: 0;
}

/* Force section cards to be pre-sized for table expansion */
section[data-chapter] .bg-white.rounded-xl.shadow-lg,
section[data-chapter] .bg-pink-50.rounded-xl.shadow-lg {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Lock to exact table width */
  flex-shrink: 0;
}

/* Ensure consistent spacing and alignment for all section cards */
section[data-chapter] {
  margin-bottom: 1rem; /* Consistent spacing between cards */
}

/* Make sure all section cards have identical width behavior - pre-sized for table */
section[data-chapter] .group {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  margin: 0;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Lock to exact table width */
  flex-shrink: 0;
}

/* Ensure summary elements maintain consistent width - pre-sized for table */
section[data-chapter] .group summary {
  width: 1200px !important; /* Fixed width instead of min-width */
  max-width: 1200px !important;
  margin: 0;
  padding: 1.5rem; /* Consistent padding to match image */
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Lock to exact table width */
  flex-shrink: 0;
}

/* Mobile/Small Screen Section Container Improvements */
@media (max-width: 768px) {
  /* Improve section container layout for mobile */
  section[data-chapter] summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }
  
  /* Keep the existing horizontal layout for icon and text */
  section[data-chapter] summary > div:first-child {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    flex: 1;
  }
  
  /* Icon container - positioned to the left, keep same size */
  section[data-chapter] summary .w-12.h-12 {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
  }
  
  /* Text content area - takes remaining space, positioned to the right of icon */
  section[data-chapter] summary > div:first-child > div:last-child {
    flex: 1;
    min-width: 0;
  }
  
  /* EP code styling */
  section[data-chapter] summary .text-lg.font-bold {
    font-size: 1.125rem;
    line-height: 1.25rem;
    margin-bottom: 0.25rem;
  }
  
  /* Description text */
  section[data-chapter] summary .text-gray-300.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Score section - center it below the main content */
  section[data-chapter] summary > div:last-child {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }
  
  /* Progress bar container */
  section[data-chapter] summary .text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  /* Progress bar */
  section[data-chapter] summary .w-24.h-2 {
    width: 8rem;
    height: 0.5rem;
  }
  
  /* EP Score badge */
  section[data-chapter] summary .score-percent {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
  }
  
  /* Chevron icon */
  section[data-chapter] summary .transform {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
  }
  
  /* Ensure proper spacing and prevent overflow */
  section[data-chapter] summary {
    position: relative;
    min-height: auto;
  }
  
  /* Make sure the main content area doesn't overflow */
  section[data-chapter] summary > div:first-child {
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Ensure text doesn't break layout */
  section[data-chapter] summary .text-gray-300.text-sm {
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
  }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
  section[data-chapter] summary {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  /* Smaller icon on very small screens - maintain left positioning */
  section[data-chapter] summary .w-12.h-12 {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
  }
  
  /* Adjust gap between icon and text */
  section[data-chapter] summary > div:first-child {
    gap: 0.75rem;
  }
  
  /* Smaller progress bar */
  section[data-chapter] summary .w-24.h-2 {
    width: 6rem;
    height: 0.375rem;
  }
  
  /* Smaller EP Score badge */
  section[data-chapter] summary .score-percent {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  
  /* Adjust chevron position */
  section[data-chapter] summary .transform {
    bottom: 0.75rem;
    right: 0.75rem;
  }
}

/* Dark Mode Support - Applied by default */
/* @media (prefers-color-scheme: dark) { */
  :root {
    --primary-50: #1e3a8a;
    --primary-100: #1e40af;
    --primary-200: #1d4ed8;
    --primary-300: #2563eb;
    --primary-400: #3b82f6;
    --primary-500: #60a5fa;
    --primary-600: #93c5fd;
    --primary-700: #bfdbfe;
    --primary-800: #dbeafe;
    --primary-900: #eff6ff;
    
    --secondary-50: #0f172a;
    --secondary-100: #1e293b;
    --secondary-200: #334155;
    --secondary-300: #475569;
    --secondary-400: #64748b;
    --secondary-500: #94a3b8;
    --secondary-600: #cbd5e1;
    --secondary-700: #e2e8f0;
    --secondary-800: #f1f5f9;
    --secondary-900: #f8fafc;
  }
  
  body {
    background-color: var(--secondary-50);
    color: var(--secondary-800);
  }
  
  .hospital-card,
  .chapter-card,
  .dashboard-card,
  .compliance-form,
  .table-container {
    background: var(--secondary-100);
    border-color: var(--secondary-300);
  }
  
  th {
    background: var(--secondary-200);
    color: var(--secondary-800);
  }
  
  td {
    background: var(--secondary-100);
    color: var(--secondary-700);
  }
/* } */

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Enhanced ARIA Support */
[aria-expanded="true"]::after {
  content: " (expanded)";
  font-size: 0.8em;
  color: var(--secondary-500);
}

/* ================= CLICK TO EXPAND CURSOR FIX ================= */
/* Ensure click to expand elements show pointer cursor */
.collapsed-text,
.collapsed-text p,
.collapsed-text span,
td.collapsed-text,
td.collapsed-text p,
td.collapsed-text span {
  cursor: pointer !important;
}

/* Specifically target the click to expand text spans */
span.text-blue-500,
span.text-indigo-500 {
  cursor: pointer !important;
}

/* Ensure hover states work properly for click to expand elements */
.collapsed-text:hover,
.collapsed-text p:hover,
.collapsed-text span:hover,
td.collapsed-text:hover,
td.collapsed-text p:hover,
td.collapsed-text span:hover {
  cursor: pointer !important;
}

[aria-expanded="false"]::after {
  content: " (collapsed)";
  font-size: 0.8em;
  color: var(--secondary-500);
}

/* Loading State for Screen Readers */
[aria-busy="true"]::before {
  content: "Loading... ";
  font-size: 0.8em;
  color: var(--primary-600);
}

/* Error State Indicators */
[aria-invalid="true"] {
  border-color: var(--error-500) !important;
  box-shadow: 0 0 0 3px var(--error-100) !important;
}

/* Success State Indicators */
[aria-invalid="false"] {
  border-color: var(--success-500) !important;
  box-shadow: 0 0 0 3px var(--success-100) !important;
}

/* ================= DOCUMENT MANAGEMENT STYLES ================= */

/* Document Modal Overlay - liquid glass design */
.document-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  padding-top: 40px;
  padding-bottom: 40px;
  overflow-y: auto;
}

.document-modal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Liquid glass shimmer effect for document modal - removed */

/* Header with liquid glass design */
.document-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.document-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.document-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-header-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  /* Transform effect removed */
}

.document-header-info {
  display: flex;
  flex-direction: column;
}

.document-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.document-modal-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.8;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

.document-selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 8px;
  margin-left: 8px;
}

.document-header-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.document-header-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  /* Transform effect removed */
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ai-review-button img {
  max-width: 16px;
  max-height: 16px;
  object-fit: contain;
}


.document-modal-close {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.document-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  /* Transform effect removed */
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Toolbar - liquid glass design */
.document-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.document-toolbar-left {
  display: flex;
  align-items: center;
}

.document-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #94a3b8;
}

.breadcrumb-item {
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.breadcrumb-item.active {
  background: #e5e7eb;
  color: #374151;
  font-weight: 500;
}

.breadcrumb-separator {
  color: #9ca3af;
}

.document-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}


.document-search {
  position: relative;
  display: flex;
  align-items: center;
}

.document-search-input {
  padding: 8px 12px 8px 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 0.875rem;
  width: 200px;
  background: #1e293b;
  color: white;
}

.document-search-input:focus {
  outline: none;
  border-color: #60a5fa;
  /* Glow effect removed */
}

.document-search-input::placeholder {
  color: #64748b;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

/* File Explorer - liquid glass design */
.document-explorer {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* Desktop: Use the original structure */
.document-explorer-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Smooth scrolling for mobile */
.document-file-list {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.document-column-headers {
  display: flex;
  gap: 0;
  padding: 12px 20px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
  align-items: center;
}

.column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  padding: 0 8px;
  border-radius: 4px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

.column-header span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-header.resizable {
  padding-right: 16px;
}

.resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  background: transparent;
  transition: background-color 0.2s ease;
}

.resize-handle:hover {
  background: rgba(96, 165, 250, 0.3);
}

.resize-handle:active {
  background: rgba(96, 165, 250, 0.5);
}

.column-header:nth-child(1) { /* Checkbox column */
  justify-content: center;
}

.column-header:nth-child(2), /* Name column */
.column-header:nth-child(3), /* Size column */
.column-header:nth-child(4), /* Type column */
.column-header:nth-child(5), /* Date Modified column */
.column-header:nth-child(6), /* Uploaded By column */
.column-header:nth-child(7), /* AI Score column */
.column-header:nth-child(8) { /* Actions column */
  justify-content: flex-start;
}

.column-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.column-header.active {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}

.sort-icon {
  transition: transform 0.2s ease;
  opacity: 0.5;
}

.column-header.active .sort-icon {
  opacity: 1;
}

.column-header.actions-header {
  cursor: default;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.column-header.actions-header:hover {
  background: transparent;
}

.document-column-headers:hover .column-header.actions-header {
  opacity: 1;
}

.document-file-list {
  flex: 1;
  overflow-y: auto;
  background: transparent;
}

.document-file-list.drag-over {
  background: rgba(96, 165, 250, 0.1);
  border: 2px dashed rgba(96, 165, 250, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* File Items - liquid glass design */
.file-item {
  display: flex;
  gap: 0;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  align-items: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  min-height: 48px;
}

.file-item > * {
  padding: 0 8px;
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* Transform effect removed */
}

.file-item:last-child {
  border-bottom: none;
}

.file-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 0;
}


.file-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: flex-start;
  padding: 0;
}

.file-name-text {
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-description {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-type,
.file-modified,
.file-uploaded-by {
  font-size: 0.875rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 0;
}

.file-ai-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow: visible;
  padding: 0;
}

.ai-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  min-width: fit-content;
  overflow: visible;
}

.ai-badge.ai-satisfactory {
  background: #dcfce7;
  color: #166534;
}

.ai-badge.ai-partial {
  background: #fef3c7;
  color: #92400e;
}

.ai-badge.ai-insufficient {
  background: #fef2f2;
  color: #dc2626;
}

.ai-badge.ai-pending {
  background: #f3f4f6;
  color: #6b7280;
}



/* Folder Items */
.folder-item {
  background: #1e293b;
  border-left: 3px solid #60a5fa;
}

.folder-item:hover {
  background: #334155;
}

.folder-item .file-name {
  cursor: pointer;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

.folder-item .file-name:hover {
  color: #60a5fa;
}

.folder-item .file-icon {
  font-size: 1.2em;
  margin-right: 0;
  flex-shrink: 0;
}

.folder-item .file-name-text {
  flex: 1;
  min-width: 0;
  color: #f1f5f9;
}

/* Breadcrumb Navigation */
.document-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #94a3b8;
}

.breadcrumb-item {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.breadcrumb-item:hover {
  background: #f3f4f6;
  color: #374151;
}

.breadcrumb-item.current {
  color: #f1f5f9;
  font-weight: 500;
  cursor: default;
}

.breadcrumb-item.current:hover {
  background: none;
}

.breadcrumb-separator {
  color: #9ca3af;
  font-weight: 500;
}

/* Empty State */
.document-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
}

.empty-state-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #374151;
}

.empty-state-text p {
  margin: 0;
  color: #6b7280;
}

/* Loading State */
.document-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6b7280;
  gap: 16px;
}

/* .loading-spinner - REMOVED */

/* Status Bar */
.document-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: #94a3b8;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  min-width: 160px;
  overflow: hidden;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: #374151;
}

.context-menu-item:hover {
  background: #f3f4f6;
}

.context-menu-item.context-menu-danger {
  color: #dc2626;
}

.context-menu-item.context-menu-danger:hover {
  background: #fef2f2;
}

.context-menu-separator {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

/* Selection Styles */
.selection-header {
  justify-content: center;
}

.file-selection {
  display: flex;
  justify-content: center;
  align-items: center;
}

.file-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.select-all-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3b82f6;
}

/* AI Review Button */
.ai-review-button.has-selection {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.ai-review-button.has-selection:hover {
  background: rgba(34, 197, 94, 0.3);
}

/* Delete Selected Button */
.delete-selected-button.has-selection {
  background: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.delete-selected-button.has-selection:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* AI Review Modal */
.ai-review-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}

.ai-review-modal {
  background: #0F172A;
  border-radius: 12px;
  /* Glow effect removed */
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.ai-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  color: white;
}

.ai-review-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-review-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.ai-review-info {
  display: flex;
  flex-direction: column;
}

.ai-review-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.ai-review-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.9;
  margin: 0;
}

.ai-review-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 6px;
  padding: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-review-close:hover {
  background: rgba(255, 255, 255, 0.3);
  /* Transform effect removed */
}

.ai-review-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.ai-review-options {
  margin-bottom: 32px;
}

.ai-review-options h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #374151;
}

.review-option {
  margin-bottom: 12px;
}

.review-option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.review-option-label:hover {
  background: #f8fafc;
  border-color: #d1d5db;
}

.review-option-label input[type="radio"] {
  margin: 0;
  accent-color: #10b981;
}

.review-option-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-option-text strong {
  font-weight: 600;
  color: #374151;
}

.review-option-text small {
  color: #6b7280;
  font-size: 0.875rem;
}

.ai-review-documents {
  margin-bottom: 32px;
}

.ai-review-documents h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #374151;
}

.selected-documents-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selected-document-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.selected-doc-info {
  flex: 1;
  min-width: 0;
}

/* EP Information Section */
.ai-review-ep-info {
  margin-bottom: 32px;
}

.ai-review-ep-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #374151;
}

.ep-info-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.ep-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.ep-key {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
}

.ep-type {
  background: #10b981;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.ep-standard-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.no-documents {
  text-align: center;
  padding: 24px;
  color: #6b7280;
  font-style: italic;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

/* Results Section Updates */
.summary-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-width: 120px;
}

.summary-stat.stat-score {
  background: #f0f9ff;
  border-color: #0ea5e9;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.stat-number.score-satisfactory {
  color: #059669;
}

.stat-number.score-partial {
  color: #d97706;
}

.stat-number.score-insufficient {
  color: #dc2626;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

.compliance-result {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.compliance-result .result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.compliance-result .result-header h4 {
  margin: 0;
  font-size: 1.25rem;
  color: #1f2937;
}

.result-status {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.result-status.status-satisfactory {
  background: #d1fae5;
  color: #065f46;
}

.result-status.status-partial {
  background: #fef3c7;
  color: #92400e;
}

.result-status.status-insufficient {
  background: #fecaca;
  color: #991b1b;
}

.analysis-section,
.full-message-section {
  margin-bottom: 20px;
  background: transparent;
}

.analysis-section h5,
.full-message-section h5 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.analysis-text,
.full-message-text {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  max-height: none;
  overflow-y: visible;
}

.result-confidence {
  padding: 12px;
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #0c4a6e;
}

/* Results Actions */
.ai-review-results-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid white;
  background: #0F172A;
}

.ai-review-button.ai-review-close {
  background: #10b981;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-review-button.ai-review-close:hover {
  background: #059669;
  /* Transform effect removed */
}

.selected-doc-name {
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-doc-meta {
  font-size: 0.875rem;
  color: #6b7280;
}

.selected-doc-status {
  display: flex;
  align-items: center;
}

/* AI Review Progress */
.ai-review-progress {
  margin-bottom: 32px;
}

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

.progress-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #374151;
}

.progress-status {
  font-size: 0.875rem;
  color: #6b7280;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-details {
  font-size: 0.875rem;
  color: #6b7280;
}

/* AI Review Results */
.ai-review-results {
  margin-bottom: 32px;
}

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

.results-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #374151;
}

.summary-stats {
  display: flex;
  gap: 24px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #374151;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.results-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.result-document {
  display: flex;
  align-items: center;
  gap: 12px;
}


.result-doc-name {
  font-weight: 500;
  color: #374151;
}

.result-status {
  display: flex;
  align-items: center;
}

.result-badge {
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-badge.satisfactory {
  background: rgba(16, 185, 129, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(16, 185, 129, 0.3);
}

.result-badge.partial {
  background: rgba(245, 158, 11, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(245, 158, 11, 0.3);
}

.result-badge.insufficient {
  background: rgba(239, 68, 68, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(239, 68, 68, 0.3);
}

.result-badge.ai-pending {
  background: rgba(156, 163, 175, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(156, 163, 175, 0.3);
}

.result-content {
  padding: 0;
}

.result-summary {
  margin-bottom: 16px;
  color: #374151;
  line-height: 1.6;
}

.result-recommendations h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #374151;
}

.result-recommendations ul {
  margin: 0;
  padding-left: 20px;
}

.result-recommendations li {
  margin-bottom: 4px;
  color: #6b7280;
  font-size: 0.875rem;
}

/* AI Review Actions */
.ai-review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

.ai-review-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-review-cancel {
  background: #f3f4f6;
  color: #374151;
}

.ai-review-cancel:hover {
  background: #e5e7eb;
}

.ai-review-start {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.ai-review-start:hover {
  background: linear-gradient(135deg, #059669, #047857);
  /* Transform effect removed */
}

.ai-review-start:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* Upload Section */
.document-upload-section {
  margin-bottom: 32px;
}

.document-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  background: #f9fafb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.document-upload-area:hover,
.document-upload-area.drag-over {
  border-color: #3b82f6;
  background: #eff6ff;
  /* Transform effect removed */
}

.document-upload-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.document-upload-text {
  text-align: center;
  color: #374151;
  font-size: 1rem;
  font-weight: 500;
}

.document-upload-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.document-upload-text p {
  color: #6b7280;
  margin: 0 0 20px 0;
}

.document-upload-button {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.document-upload-button:hover {
  /* Transform and glow effects removed for performance */
  opacity: 0.9;
}

.document-upload-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* .document-upload-spinner - REMOVED */

/* Document List Section */
.document-list-section {
  flex: 1;
}

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

.document-list-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0;
}

.document-list-actions {
  display: flex;
  gap: 8px;
}

.document-refresh-button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.document-refresh-button:hover {
  background: #e5e7eb;
  /* Transform effect removed */
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.document-list-loading {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
}

.document-list-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.document-list-empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.document-list-empty-text h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #f1f5f9;
}

.document-list-empty-text p {
  margin: 0;
  color: #94a3b8;
}

/* Document Items */
.document-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #0F172A;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.document-item:hover {
  border-color: #60a5fa;
  /* Glow effect removed */
  /* Transform effect removed */
  background: #1e293b;
}

.document-item-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.document-item-info {
  flex: 1;
  min-width: 0;
}

.document-item-name {
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.document-item-separator {
  color: #d1d5db;
}

.document-item-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.4;
}

.ai-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
}

.ai-reviewed {
  background: #dcfce7;
  color: #166534;
}

.ai-pending {
  background: #f3f4f6;
  color: #6b7280;
}

.document-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.document-action-button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
}

.document-action-button:hover {
  background: #e5e7eb;
  color: #374151;
  /* Transform effect removed */
}

.document-action-button.document-delete:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

/* Document Details Modal - Liquid Glass Theme */
.document-details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}

.document-details-modal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.document-details-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.document-details-close {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.document-details-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

.document-details-content {
  padding: 24px;
  overflow-y: auto;
  max-height: 60vh;
  background: transparent;
  position: relative;
  z-index: 1;
}

.document-details-info {
  margin-bottom: 24px;
}

.document-details-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.document-info-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.document-info-label {
  font-weight: 600;
  color: rgba(96, 165, 250, 0.9);
  min-width: 100px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-info-value {
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Document Preview Styles */
.document-details-preview {
  margin-bottom: 24px;
}

.document-details-preview h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-preview-container {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.document-preview-loading {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  text-align: center;
}

.document-preview-image {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.document-preview-pdf,
.document-preview-office {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  position: relative;
}

.document-preview-fallback {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.document-preview-text {
  width: 100%;
}

.document-preview-text pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
}

.document-preview-unsupported,
.document-preview-error {
  text-align: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.7);
}

.document-preview-download-btn {
  background: rgba(96, 165, 250, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.5);
  color: #60a5fa;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}

.document-preview-download-btn:hover {
  background: rgba(96, 165, 250, 0.3);
  border-color: rgba(96, 165, 250, 0.7);
  transform: translateY(-1px);
}

.document-preview-error p {
  color: rgba(239, 68, 68, 0.9);
  margin-bottom: 12px;
}

.document-details-logs h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-logs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.document-log-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.document-log-action {
  font-weight: 600;
  color: rgba(96, 165, 250, 0.9);
  text-transform: capitalize;
  min-width: 60px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-log-user {
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-log-date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* AI Reviews History Section */
.document-details-ai-reviews {
  margin-top: 24px;
}

.document-details-ai-reviews h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-review-item {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ai-review-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.ai-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
}


.ai-review-date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-review-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  word-wrap: break-word;
}

.ai-review-recommendations {
  margin-bottom: 12px;
}

.ai-review-recommendations h5 {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-review-recommendations .recommendations-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  line-height: 1.6;
}

.ai-review-recommendations .recommendations-list li {
  margin-bottom: 0.5rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  padding-left: 20px;
}

.ai-review-recommendations .recommendations-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
}

.ai-review-recommendations .recommendations-list li:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.ai-review-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.ai-review-author {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-reviews-empty {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.ai-reviews-empty p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 8px 0;
  font-size: 0.875rem;
}

.ai-reviews-empty small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* Notifications */
.document-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 1200;
  /* Transform effect removed */
  transition: transform 0.3s ease;
  max-width: 300px;
}

/* Document notification show transform effect removed */

.document-notification-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.document-notification-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.document-notification-info {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* Responsive Design for Document Management */
@media (max-width: 1024px) {
  .document-modal {
    max-width: 95vw;
    margin: 10px;
  }
  
  .document-column-headers {
    gap: 0;
    padding: 12px 16px;
  }
  
  .file-item {
    gap: 0;
    padding: 12px 16px;
  }
  
  .document-search-input {
    width: 150px;
  }
}

@media (max-width: 768px) {
  .document-modal {
    margin: 5px;
    max-height: 95vh;
    border-radius: 8px;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .document-modal-header {
    padding: 12px 16px;
    flex-shrink: 0;
  }
  
  .document-header-actions {
    gap: 4px;
    flex-wrap: wrap;
  }
  
  .document-header-button {
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
  }
  
  .document-toolbar {
    padding: 8px 16px;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    flex-shrink: 0;
  }
  
  .document-toolbar-right {
    justify-content: space-between;
  }
  
  .document-search-input {
    width: 100%;
    max-width: 200px;
  }
  
  /* Enable horizontal scrolling for the explorer */
  .document-explorer {
    flex: 1;
    overflow: hidden;
    min-height: 0;
  }
  
  /* Create a horizontally scrollable container */
  .document-explorer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 800px; /* Minimum width to ensure all columns fit */
  }
  
  .document-column-headers {
    display: flex;
    gap: 0;
    padding: 12px 20px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    min-width: 800px;
  }
  
  .document-file-list {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    background: transparent;
    min-width: 800px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  .file-item {
    display: flex;
    gap: 0;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    align-items: center;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    min-height: 48px;
    min-width: 800px;
  }
  
  
  
  /* Make text content responsive */
  .file-name-text {
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-word;
  }
  
  .file-type,
  .file-modified,
  .file-uploaded-by,
  .file-ai-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
  }
  
  .file-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 0;
  }
  
  .document-status-bar {
    padding: 8px 16px;
    font-size: 0.875rem;
    flex-shrink: 0;
  }
  
  .document-details-modal {
    margin: 10px;
    max-height: 90vh;
  }
  
  .document-details-content {
    padding: 16px;
  }
  
  .ai-review-item {
    padding: 12px;
  }
  
  .ai-review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  
  .ai-review-text {
    font-size: 0.8rem;
  }
  
  .document-notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .context-menu {
    min-width: 140px;
  }
  
  /* AI Review Modal Mobile */
  .ai-review-modal {
    margin: 5px;
    max-height: 95vh;
  }
  
  .ai-review-header {
    padding: 12px 16px;
  }
  
  .ai-review-content {
    padding: 16px;
  }
  
  .summary-stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .summary-stat {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .result-document {
    width: 100%;
  }
  
  .result-status {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .document-modal {
    margin: 2px;
    border-radius: 4px;
  }
  
  .document-modal-header {
    padding: 8px 12px;
  }
  
  .document-modal-title {
    font-size: 1rem;
  }
  
  .document-modal-subtitle {
    font-size: 0.75rem;
  }
  
  .document-toolbar {
    padding: 6px 12px;
  }
  
  .document-column-headers {
    padding: 8px 12px;
    font-size: 0.7rem;
    gap: 12px;
    min-width: 700px;
  }
  
  .file-item {
    padding: 8px 12px;
    gap: 12px;
    min-width: 700px;
    min-height: 44px;
  }
  
  .file-name-text {
    font-size: 0.8rem;
  }
  
  .file-type,
  .file-modified,
  .file-uploaded-by,
  .file-ai-status {
    font-size: 0.7rem;
  }
  
  
  
  .document-status-bar {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  
  /* Improve touch targets */
  .document-header-button {
    min-width: 36px;
    min-height: 36px;
    padding: 8px;
  }
  
  .file-checkbox {
    width: 18px;
    height: 18px;
  }
  
  .select-all-checkbox {
    width: 18px;
    height: 18px;
  }
}

/* ================= AI MODAL STYLES (Liquid Glass Design) ================= */

/* AI Modal Overlay - enhanced liquid glass backdrop */
.ai-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  padding-top: 40px;
  padding-bottom: 40px;
  overflow-y: auto;
}

/* AI Modal Container - liquid glass design */
.ai-modal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  /* Glow effects removed */
  max-width: 1200px;
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Liquid glass shimmer effect for AI modal - removed */

/* AI Modal Header - liquid glass design */
.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.ai-modal-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-modal-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  /* Transform effect removed */
}

.ai-modal-title-section {
  display: flex;
  flex-direction: column;
}

.ai-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ai-modal-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.8;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-modal-close {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 8px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ai-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  /* Transform effect removed */
  /* Glow effects removed */
}

/* AI Modal Content - liquid glass layout */
.ai-modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* AI Modal Section */
.ai-modal-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.ai-modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-modal-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

/* AI Modal Card - liquid glass design */
.ai-modal-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Glow effects removed */
  position: relative;
  overflow: hidden;
}

.ai-modal-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  /* Transform effect removed */
  /* Glow effects removed */
}

/* Liquid glass shimmer effect for cards - removed */

/* New Layout Styles */
.ai-modal-top-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}


.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.document-count-badge {
  background: rgba(96, 165, 250, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.documents-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.document-preview-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.document-icon-small {
  width: 24px;
  height: 24px;
  background: rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  /* Glow effect removed */
}

.document-name-small {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.more-documents {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 8px;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.selection-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selection-item {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.selection-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.selection-item.total {
  font-weight: 600;
  color: rgba(96, 165, 250, 0.9);
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
}

.progress-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: rgba(96, 165, 250, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 
    0 0 8px rgba(96, 165, 250, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.status-dot.success {
  background: rgba(16, 185, 129, 0.8);
  border-color: rgba(16, 185, 129, 0.3);
  animation: none;
  box-shadow: 
    0 0 8px rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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


.results-summary-badge {
  background: rgba(16, 185, 129, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  /* Glow effects removed */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.results-summary-badge.score-satisfactory {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
  /* Glow effects removed */
}

.results-summary-badge.score-partial {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.3);
  /* Glow effects removed */
}

.results-summary-badge.score-insufficient {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  /* Glow effects removed */
}

.results-summary-badge.score-pending {
  background: rgba(107, 114, 128, 0.2);
  border-color: rgba(107, 114, 128, 0.3);
  /* Glow effects removed */
}

.results-content {
  overflow: visible;
}

/* Responsive Design for New Layout */
@media (max-width: 1024px) {
  .ai-modal-top-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .ai-modal-content {
    padding: 16px;
    gap: 16px;
  }
  
  .ai-modal-card {
    padding: 12px;
  }
  
  .card-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  
  .card-title {
    font-size: 0.875rem;
  }
  
}

/* EP Information Styles */
.ep-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ep-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ep-chapter {
  background: rgba(96, 165, 250, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  /* Glow effects removed */
  font-weight: 600;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ep-number {
  background: rgba(16, 185, 129, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  /* Glow effects removed */
  font-weight: 600;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ep-type-badge {
  background: rgba(245, 158, 11, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  /* Glow effects removed */
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 500;
}

.ep-standard-content {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  line-height: 1.6;
  font-size: 0.875rem;
}

/* Loading Placeholder - REMOVED */

/* Documents Grid */
.documents-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.document-item:hover {
  border-color: #60a5fa;
  /* Glow effect removed */
  /* Transform effect removed */
  background: #1e293b;
}

.document-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #8b5cf6;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.document-info {
  flex: 1;
  min-width: 0;
}

.document-name {
  font-weight: 500;
  color: #f1f5f9;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-meta {
  color: #94a3b8;
  font-size: 0.75rem;
}

.document-status {
  flex-shrink: 0;
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.status-satisfactory {
  background: #dcfce7;
  color: #16a34a;
}

.status-badge.status-partial {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.status-insufficient {
  background: #fee2e2;
  color: #dc2626;
}

.status-indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.status-pending {
  background: #f59e0b;
}

.status-indicator.status-satisfactory {
  background: #10b981;
}

.status-indicator.status-partial {
  background: #f59e0b;
}

.status-indicator.status-insufficient {
  background: #ef4444;
}

/* Progress Container */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-label {
  font-weight: 500;
  color: #f1f5f9;
  font-size: 0.875rem;
}

.progress-percentage {
  font-weight: 600;
  color: rgba(16, 185, 129, 0.9);
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.progress-bar-container {
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.8) 0%, rgba(5, 150, 105, 0.8) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 12px;
  width: 0%;
  box-shadow: 
    0 2px 8px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease;
}

.progress-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#progressStatus {
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Results Summary */
.results-summary {
  margin-bottom: 1.5rem;
}

.summary-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.summary-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  border: 1px solid white;
  border-radius: 0.75rem;
  /* Glow effect removed */
  flex: 1;
  min-width: 0;
}

.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.satisfactory {
  background: #dcfce7;
  color: #16a34a;
}

.stat-icon.partial {
  background: #fef3c7;
  color: #d97706;
}

.stat-icon.insufficient {
  background: #fee2e2;
  color: #dc2626;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Results List */
.results-list {
  background: transparent !important;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
}

/* Result Item */
.result-item {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  transition: all 0.2s ease;
}

.result-item:hover {
  border-color: transparent;
  box-shadow: none;
}

.result-header {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
}

.result-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.result-status {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-status.status-satisfactory {
  background: #dcfce7;
  color: #16a34a;
}

.result-status.status-partial {
  background: #fef3c7;
  color: #d97706;
}

.result-status.status-insufficient {
  background: #fee2e2;
  color: #dc2626;
}

.result-content {
  padding: 0;
}

.analysis-section,
.recommendations-section {
  margin-bottom: 1rem;
  background: transparent !important;
  border-radius: 0;
  padding: 0;
}

.analysis-section:last-child,
.recommendations-section:last-child {
  margin-bottom: 0;
}

.analysis-section h5,
.recommendations-section h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.5rem 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.analysis-section {
  color: rgba(255, 255, 255, 0.8) !important;
  background: transparent !important;
  border-radius: 0;
  padding: 0;
  margin-bottom: 1rem;
}

.analysis-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-size: 0.875rem;
  background: transparent;
  padding: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
}

.recommendations-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: white;
  font-size: 0.875rem;
  line-height: 1.6;
}

.recommendations-list li {
  margin-bottom: 0.5rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  padding-left: 20px;
}

.recommendations-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: white;
  font-weight: bold;
}

.recommendations-list li:last-child {
  margin-bottom: 0;
}

/* AI Modal Actions - liquid glass design */
.ai-modal-actions {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ai-modal-button {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ai-modal-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.ai-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
  /* Transform effect removed */
  /* Glow effects removed */
}

.ai-modal-start {
  background: rgba(16, 185, 129, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(16, 185, 129, 0.3);
  /* Glow effects removed */
}

.ai-modal-start:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.3);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(16, 185, 129, 0.4);
  /* Transform effect removed */
  /* Glow effects removed */
}

.ai-modal-start:disabled {
  background: rgba(107, 114, 128, 0.2);
  color: rgba(255, 255, 255, 0.5);
  border-color: rgba(107, 114, 128, 0.3);
  cursor: not-allowed;
  transform: none;
  /* Glow effects removed */
}

/* No Documents State */
.no-documents {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  padding: 2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-modal-overlay {
    padding: 0.5rem;
  }
  
  .ai-modal-header {
    padding: 1rem 1.5rem;
  }
  
  .ai-modal-content {
    padding: 1.5rem;
  }
  
  .ai-modal-actions {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }
  
  .ai-modal-button {
    width: 100%;
    justify-content: center;
  }
  
  .summary-stats {
    flex-direction: column;
  }
  
  .ai-modal-title {
    font-size: 1.5rem;
  }
}

/* ================= LEGACY AI REVIEW MODAL STYLES (DEPRECATED) ================= */

/* AI Review Modal Overlay */
.ai-review-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

/* AI Review Modal */
.ai-review-modal {
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  border-radius: 16px;
  /* Glow effect removed */
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideInUp 0.4s ease-out;
}

/* AI Review Header */
.ai-review-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-review-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ai-review-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.ai-review-info h2 {
  color: white;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ai-review-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin: 4px 0 0 0;
}

.ai-review-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-review-close:hover {
  background: rgba(255, 255, 255, 0.2);
  /* Transform effect removed */
}

/* AI Review Content */
.ai-review-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* EP Information Card */
.ai-review-ep-info h3 {
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.ep-info-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
}

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

.ep-key {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.ep-type {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.ep-standard-text {
  color: #e2e8f0;
  line-height: 1.6;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

/* Selected Documents */
.ai-review-documents h3 {
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.selected-documents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.selected-document-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.selected-doc-info {
  flex: 1;
}

.selected-doc-name {
  color: #f1f5f9;
  font-weight: 500;
  margin-bottom: 4px;
}

.selected-doc-meta {
  color: #94a3b8;
  font-size: 12px;
}

.selected-doc-status {
  margin-left: 16px;
}

/* AI Review Progress */
.ai-review-progress {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
}

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

.progress-header h3 {
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.progress-status {
  color: #60a5fa;
  font-size: 14px;
  font-weight: 500;
}

.progress-bar {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 8px;
}

.progress-details {
  color: #94a3b8;
  font-size: 14px;
}

/* AI Review Results */
.ai-review-results {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
}

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

.results-header h3 {
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.results-summary {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.summary-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 600;
}

.stat-value.score-satisfactory {
  color: #10b981;
}

.stat-value.score-partial {
  color: #f59e0b;
}

.stat-value.score-insufficient {
  color: #ef4444;
}

/* Result Item */
.result-item {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.result-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header h4 {
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.result-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-status.status-satisfactory {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.result-status.status-partial {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.result-status.status-insufficient {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.result-content {
  padding: 0;
}

.analysis-section h5,
.recommendations-section h5 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.analysis-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-size: 14px;
  margin-bottom: 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}


.analysis-meta {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.meta-value {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
}

/* AI Review Actions */
.ai-review-actions {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.ai-review-results-actions {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.ai-review-button {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-review-start {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

/* AI review start hover effects removed */

.ai-review-start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-review-cancel,
.ai-review-close {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-review-cancel:hover,
.ai-review-close:hover {
  background: rgba(255, 255, 255, 0.2);
  /* Transform effect removed */
}

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

@keyframes slideInUp {
  from {
    opacity: 0;
    /* Transform effect removed */
  }
  to {
    opacity: 1;
    /* Transform effect removed */
  }
}

/* Responsive Design for AI Review Modal */
@media (max-width: 768px) {
  .ai-review-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .ai-review-header {
    padding: 16px;
  }
  
  .ai-review-content {
    padding: 16px;
  }
  
  .ai-review-actions,
  .ai-review-results-actions {
    padding: 16px;
    flex-direction: column;
  }
  
  .summary-stats {
    flex-direction: column;
    gap: 12px;
  }
  
  .analysis-meta {
    flex-direction: column;
    gap: 12px;
  }
}

/* ================= DARK THEME SYSTEM ================= */

/* Dark Theme Variables */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-quaternary: #475569;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-primary: #334155;
  --border-secondary: #475569;
  --border-light: #64748b;
  --shadow-theme: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-card: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --gradient-card: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --accent-blue: #60a5fa;
  --accent-blue-light: rgba(59, 130, 246, 0.1);
  --accent-green: #34d399;
  --accent-green-light: rgba(16, 185, 129, 0.1);
  --accent-purple: #a78bfa;
  --accent-purple-light: rgba(139, 92, 246, 0.1);
}

/* Apply dark theme to body */
body {
  background: var(--gradient-primary);
  color: var(--text-primary);
  min-height: 100vh;
  /* Ensure proper spacing and prevent footer overlap */
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Dark theme header */
header {
  background-color: rgba(15, 23, 42, 0.95);
  border-bottom-color: var(--border-primary);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  /* Header entrance animation */
  opacity: 0;
  transform: translateY(-20px);
  animation: headerEntrance 0.6s ease-out forwards;
}

@keyframes headerEntrance {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= FOOTER STYLES TO MATCH HEADER ================= */

/* Style footer to match header exactly - clean reference implementation */
footer {
  background: transparent !important;
  background-color: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

/* Override any Tailwind or other background classes on footer */
footer[class*="bg-"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* Footer text and link colors - clean implementation matching reference */
/* These rules come after all global link rules and have high specificity */
footer,
footer p,
footer .text-gray-500,
footer.text-gray-500 {
  color: #cbd5e1 !important; /* gray-500 / text-secondary - matches reference */
}

footer a {
  color: #9ca3af !important; /* gray-400 */
  opacity: 1 !important;
  text-decoration: none;
}

footer a:hover {
  color: #60a5fa !important; /* blue-400 */
  opacity: 1 !important;
}


/* Dark theme hospital cards with enhanced liquid glass effect */
.hospital-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Removed hover effects from hospital cards */

/* Dark theme text colors */
.text-gray-800 {
  color: var(--text-primary) !important;
}

.text-gray-600 {
  color: var(--text-secondary) !important;
}

.text-gray-500:not(footer *):not(footer) {
  color: var(--text-muted) !important;
}

/* Footer text should use text-secondary (gray-500) per reference */
footer .text-gray-500,
footer.text-gray-500,
footer p {
  color: var(--text-secondary) !important; /* #cbd5e1 - matches reference */
}

/* Dark theme background colors */
.bg-white {
  background-color: var(--bg-secondary) !important;
}

.bg-gray-100 {
  background-color: var(--bg-tertiary) !important;
}

.bg-gray-50 {
  background-color: var(--bg-tertiary) !important;
}

/* Dark theme borders */
.border-gray-200 {
  border-color: var(--border-primary) !important;
}

/* Dark theme hover states */
.hover\:bg-blue-50:hover {
  background-color: var(--accent-blue-light) !important;
}

.hover\:bg-red-50:hover {
  background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Dark theme chapter cards and other content cards with enhanced liquid glass effect */
.chapter-card, .content-card, .card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Removed chapter-card hover effects - keeping content-card and card hover for other uses */
.content-card:hover, .card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  /* Glow effects removed */
  /* Transform effect removed */
}

/* Dark theme chapter card text overrides */
.chapter-title {
  color: var(--text-primary) !important;
}

.chapter-description {
  color: var(--text-secondary) !important;
}

/* Comprehensive dark theme text color overrides */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary) !important;
}

p, span, div, td, th {
  color: inherit;
}

/* Dark theme form elements */
.form-input, .form-textarea, input, textarea, select {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.form-input::placeholder, .form-textarea::placeholder, input::placeholder, textarea::placeholder {
  color: var(--text-muted) !important;
}

/* Dark theme table elements */
th {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

td {
  background: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
}

/* Dark theme breadcrumb elements */
.breadcrumb-item {
  color: var(--text-secondary) !important;
}

.breadcrumb-item.active {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.breadcrumb-separator {
  color: var(--text-muted) !important;
}

/* Dark theme document management elements */
.file-name-text {
  color: var(--text-primary) !important;
}

.file-description, .file-uploaded-by {
  color: var(--text-muted) !important;
}

.document-search-input {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.document-search-input::placeholder {
  color: var(--text-muted) !important;
}

/* Dark theme AI review elements */
.ai-review-title {
  color: var(--text-primary) !important;
}

.ai-review-content {
  color: var(--text-secondary) !important;
}

.ai-review-timestamp {
  color: var(--text-muted) !important;
}

/* Dark theme dashboard elements */
.dashboard-card-title {
  color: var(--text-primary) !important;
}

.dashboard-progress-label {
  color: var(--text-muted) !important;
}

/* Dark theme stat elements */
.stat-number {
  color: var(--text-primary) !important;
}

.stat-label {
  color: var(--text-muted) !important;
}

/* Dark theme modal elements */
.modal-title {
  color: var(--text-primary) !important;
}

.modal-content {
  color: var(--text-secondary) !important;
}

/* Dark theme button overrides */
.btn-secondary {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

.btn-secondary:hover {
  background: var(--bg-quaternary) !important;
  color: var(--text-primary) !important;
}

/* Dark theme empty state elements */
.empty-state-title {
  color: var(--text-primary) !important;
}

.empty-state-description {
  color: var(--text-muted) !important;
}

/* Document modal empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
  min-height: 200px;
}

.empty-state-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #374151;
}

.empty-state-text p {
  margin: 0;
  color: #6b7280;
}

/* Dark theme context menu elements */
.context-menu-item {
  color: var(--text-secondary) !important;
}

.context-menu-item:hover {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.context-menu-item.context-menu-danger {
  color: #fca5a5 !important;
}

/* Dark theme upload area elements */
.document-upload-text h3 {
  color: var(--text-primary) !important;
}

.document-upload-text p {
  color: var(--text-muted) !important;
}

/* Dark theme review elements */
.review-section-title {
  color: var(--text-primary) !important;
}

.review-option-text {
  color: var(--text-secondary) !important;
}

.review-option-text small {
  color: var(--text-muted) !important;
}

/* Dark theme compliance form elements */
.compliance-form h2, .compliance-form h3 {
  color: var(--text-primary) !important;
}

.compliance-form p {
  color: var(--text-secondary) !important;
}

/* Dark theme score badge elements */
.ai-badge {
  color: var(--text-primary) !important;
}

.ai-badge.ai-satisfactory {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
}

.ai-badge.ai-partial {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fcd34d !important;
}

.ai-badge.ai-insufficient {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
}

.ai-badge.ai-pending {
  background: var(--bg-tertiary) !important;
  color: var(--text-muted) !important;
}

/* Dark theme overrides for hardcoded colors */
/* Override hardcoded gray colors - but exclude footer */
.text-gray-800:not(footer *):not(footer), 
.text-gray-700:not(footer *):not(footer), 
.text-gray-600:not(footer *):not(footer), 
.text-gray-500:not(footer *):not(footer), 
.text-gray-400:not(footer *):not(footer) {
  color: var(--text-primary) !important;
}

/* Override hardcoded background colors */
.bg-white, .bg-gray-50, .bg-gray-100, .bg-gray-200 {
  background-color: var(--bg-secondary) !important;
}

/* Override hardcoded border colors */
.border-gray-200, .border-gray-300, .border-gray-400 {
  border-color: var(--border-primary) !important;
}

/* Dark theme specific element overrides */
.dashboard-card-title {
  color: var(--text-primary) !important;
}

.dashboard-progress-label {
  color: var(--text-muted) !important;
}

/* Override breadcrumb hardcoded colors */
.breadcrumb-item {
  color: var(--text-secondary) !important;
}

.breadcrumb-item.active {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.breadcrumb-separator {
  color: var(--text-muted) !important;
}

/* Override document management hardcoded colors */
.file-name-text {
  color: var(--text-primary) !important;
}

.file-description, .file-uploaded-by {
  color: var(--text-muted) !important;
}

.document-search-input {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.document-search-input::placeholder {
  color: var(--text-muted) !important;
}

/* Override AI review hardcoded colors */
.ai-review-title {
  color: var(--text-primary) !important;
}

.ai-review-content {
  color: var(--text-secondary) !important;
}

.ai-review-timestamp {
  color: var(--text-muted) !important;
}

/* Override stat elements hardcoded colors */
.stat-number {
  color: var(--text-primary) !important;
}

.stat-label {
  color: var(--text-muted) !important;
}

/* Override modal elements hardcoded colors */
.modal-title {
  color: var(--text-primary) !important;
}

.modal-content {
  color: var(--text-secondary) !important;
}

/* Override upload area hardcoded colors */
.document-upload-text h3 {
  color: var(--text-primary) !important;
}

.document-upload-text p {
  color: var(--text-muted) !important;
}

/* Override review elements hardcoded colors */
.review-section-title {
  color: var(--text-primary) !important;
}

.review-option-text {
  color: var(--text-secondary) !important;
}

.review-option-text small {
  color: var(--text-muted) !important;
}

/* Override compliance form hardcoded colors */
.compliance-form h2, .compliance-form h3 {
  color: var(--text-primary) !important;
}

.compliance-form p {
  color: var(--text-secondary) !important;
}

/* Override empty state hardcoded colors */
.empty-state-title {
  color: var(--text-primary) !important;
}

.empty-state-description {
  color: var(--text-muted) !important;
}

/* Override context menu hardcoded colors */
.context-menu-item {
  color: var(--text-secondary) !important;
}

.context-menu-item:hover {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.context-menu-item.context-menu-danger {
  color: #fca5a5 !important;
}

/* Additional comprehensive dark theme overrides */
/* Ensure all text elements inherit proper colors */
* {
  color: inherit;
}

/* Override any remaining hardcoded text colors */
.text-black, .text-gray-900 {
  color: var(--text-primary) !important;
}

/* Override any remaining hardcoded background colors */
.bg-gray-300, .bg-gray-400, .bg-gray-500 {
  background-color: var(--bg-tertiary) !important;
}

/* Override any remaining hardcoded border colors */
.border-gray-500, .border-gray-600 {
  border-color: var(--border-secondary) !important;
}

/* Ensure all form elements have proper dark theme styling */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"] {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

/* Override auth modal inputs to use black background */
.auth-modal input[type="text"], 
.auth-modal input[type="email"], 
.auth-modal input[type="password"] {
  background: rgba(0, 0, 0, 0.4) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="tel"]:focus, input[type="url"]:focus {
  border-color: var(--accent-blue) !important;
  outline: none !important;
}

/* Override auth modal input focus and hover states */
.auth-modal input[type="text"]:focus,
.auth-modal input[type="email"]:focus,
.auth-modal input[type="password"]:focus {
  background: rgba(0, 0, 0, 0.5) !important;
  border-color: rgba(1, 151, 218, 0.6) !important;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.auth-modal input[type="text"]:hover,
.auth-modal input[type="email"]:hover,
.auth-modal input[type="password"]:hover {
  background: rgba(0, 0, 0, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Ensure all select elements have proper dark theme styling */
select {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

select:focus {
  border-color: var(--accent-blue) !important;
  outline: none !important;
}

/* Ensure all textarea elements have proper dark theme styling */
textarea {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

textarea:focus {
  border-color: var(--accent-blue) !important;
  outline: none !important;
}

/* Override any remaining button styles */
button:not(.btn-primary):not(.btn-secondary):not(.password-toggle-btn) {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

button:not(.btn-primary):not(.btn-secondary):not(.password-toggle-btn):hover {
  background-color: var(--bg-quaternary) !important;
  color: var(--text-primary) !important;
}

/* Ensure password toggle button stays completely transparent */
button.password-toggle-btn,
button.password-toggle-btn:hover,
button.password-toggle-btn:active,
button.password-toggle-btn:focus {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Ensure all links have proper dark theme styling - exclude footer links */
a:not(.text-blue-600):not(.text-blue-500):not(footer a):not(footer *) {
  color: var(--accent-blue) !important;
}

a:not(.text-blue-600):not(.text-blue-500):not(footer a):not(footer *):hover {
  color: var(--accent-blue) !important;
  opacity: 0.8;
}

/* Override any remaining card backgrounds */
.card, .panel, .widget {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

/* Ensure all table elements have proper dark theme styling */
table {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-primary) !important;
}

table th {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

table td {
  background-color: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-primary) !important;
}

/* Ensure all list elements have proper dark theme styling */
ul, ol, li {
  color: var(--text-secondary) !important;
}

/* Override any remaining status colors */
.status-success, .status-complete, .status-approved {
  color: #6ee7b7 !important;
}

.status-warning, .status-pending, .status-partial {
  color: #fcd34d !important;
}

.status-error, .status-failed, .status-rejected {
  color: #fca5a5 !important;
}

.status-info, .status-in-progress {
  color: var(--accent-blue) !important;
}

/* Dark theme feature highlight cards with enhanced liquid glass effect */
.feature-card, .highlight-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  /* Entrance animation properties */
  opacity: 0;
  transform: translateY(20px);
  animation: featureCardEntrance 0.8s ease-out forwards;
}

/* Feature card entrance animation */
@keyframes featureCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Feature cards now use chapter-card animation, no stagger delays */
.feature-card.chapter-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.6s ease-out forwards;
}

.feature-card:hover, .highlight-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 16px 56px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  /* Transform effect removed */
}

/* Dark theme mobile menu - transparent to match header expansion */
#mobile-menu {
  background-color: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Dark theme gradient text */
.text-transparent.bg-clip-text {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dark theme button styling */
button, .btn {
  transition: all 0.3s ease;
}

button:hover, .btn:hover {
  background-color: var(--accent-blue-light);
  color: var(--accent-blue);
}

/* Dark theme input and form elements */
input, textarea, select {
  background-color: var(--bg-tertiary);
  border-color: var(--border-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

/* Dark theme focus states */
input:focus, textarea:focus, select:focus {
  /* Border color change removed */
  /* Glow effect removed */
}

/* Dark theme icon backgrounds */
.bg-blue-100 {
  background-color: rgba(59, 130, 246, 0.2) !important;
}

.bg-green-100 {
  background-color: rgba(16, 185, 129, 0.2) !important;
}

.bg-purple-100 {
  background-color: rgba(139, 92, 246, 0.2) !important;
}

/* Dark theme icon colors */
.text-blue-600 {
  color: #60a5fa !important;
}

.text-green-600 {
  color: #34d399 !important;
}

.text-purple-600 {
  color: #a78bfa !important;
}

/* Dark theme link colors - exclude footer links */
a:not(footer a):not(footer *) {
  color: var(--accent-blue);
}

a:not(footer a):not(footer *):hover {
  color: var(--accent-blue);
  opacity: 0.8;
}

