/* ===================================
   PAGES DATABASE CHECKER
   =================================== */
/* ===================================
   BASE.CSS
   =================================== */

/* ===================================
   BASE.CSS - Reset, Body, Typography
   =================================== */

/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: inherit;
}

/* Base Elements */
html {
  font-size: 16px;
  line-height: 1.6;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

body {
  font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold, 600);
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* Form Elements */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border-radius: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  border-radius: 0;
}

/* Remove default browser styling - Flat Design */
* {
  border-radius: 0 !important;
}

/* Remove all transitions for better performance */
* {
  transition: none !important;
  animation: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

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

:focus:not(:focus-visible) {
  outline: none;
}
/* Screen-reader only content */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* ===================================
   LAYOUT.CSS
   =================================== */

/* ===================================
   LAYOUT.CSS - Header, Footer, Grid, Section, Utilities
   =================================== */

/* ===================================
   CONTAINER
   =================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-5);
}

/* ===================================
   GRID SYSTEM
   =================================== */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }

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

/* ===================================
   FLEXBOX LAYOUT
   =================================== */
.flex { display: flex; }

.flex-row { flex-direction: row; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col { flex-direction: column; }
.flex-col-reverse { flex-direction: column-reverse; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-center { align-items: center; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.flex-1 { flex: 1 1 0%; }
.flex-none { flex: none; }

.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* ===================================
   SPACING UTILITIES
   =================================== */
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

/* ===================================
   SIZING UTILITIES
   =================================== */
.w-full { width: 100%; }
.w-auto { width: auto; }

.h-full { height: 100%; }
.h-auto { height: auto; }
.h-screen { height: 100vh; }

.max-w-full { max-width: 100%; }
.max-w-none { max-width: none; }

/* ===================================
   DISPLAY UTILITIES
   =================================== */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* ===================================
   POSITION UTILITIES
   =================================== */
.static { position: static; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }

/* ===================================
   TEXT UTILITIES
   =================================== */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }
.text-4xl { font-size: 36px; }
.text-5xl { font-size: 48px; }
.text-6xl { font-size: 60px; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }

/* ===================================
   BORDER UTILITIES
   =================================== */
.border { border: 1px solid var(--border); }
.border-0 { border: 0; }
.border-t { border-top: 1px solid var(--border); }
.border-r { border-right: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-l { border-left: 1px solid var(--border); }

.rounded-none { border-radius: 0; }
.rounded { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-full { border-radius: 9999px; }

/* ===================================
   OVERFLOW UTILITIES
   =================================== */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-x-auto { overflow-x: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-y-hidden { overflow-y: hidden; }

/* ===================================
   OPACITY UTILITIES
   =================================== */
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }

/* ===================================
   CURSOR UTILITIES
   =================================== */
.cursor-auto { cursor: auto; }
.cursor-default { cursor: default; }
.cursor-pointer { cursor: pointer; }
.cursor-text { cursor: text; }
.cursor-help { cursor: help; }

/* Remove padding to body since footer is no longer fixed */
body {
  padding-top: var(--header-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===================================
   HEADER & FOOTER
   =================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: #ffffff;
  border-bottom: 2px solid #e5e7eb;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: 1200px;
  margin: 0 auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  position: relative;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--accent-primary);
  background: rgba(241, 140, 142, 0.1);
  transform: translateY(-1px);
}

.nav-link:active {
  transform: translateY(0);
}

.nav-link[aria-current="page"] {
  color: var(--accent-primary);
  background: rgba(241, 140, 142, 0.08);
}

.nav-link::after {
  display: none;
}

.nav-link:hover::after {
  display: none;
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ===================================
   SECTION LAYOUTS
   =================================== */
.section {
  padding: var(--space-16) 0;
}

.section-sm {
  padding: var(--space-8) 0;
}

.section-lg {
  padding: var(--space-24) 0;
}

.section-xl {
  padding: var(--space-32) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin: 0 0 var(--space-4);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ===================================
   MAIN LAYOUT
   =================================== */
main {
  flex: 1;
}


/* ===================================
   THEME.CSS
   =================================== */

/* ===================================
   THEME - RED & WHITE (with Dark Mode)
   =================================== */
:root {
  /* ===================================
     BASE PALETTE - Light Mode
     =================================== */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --text: #000000;
  --text-muted: #666666;
  
  /* ===================================
     PRIMARY RED PALETTE
     =================================== */
  --red-50: #FFF5F3;
  --red-500: #F18C8E;  /* Primary brand color */
  --red-600: #DC2626;
  
  /* ===================================
     SEMANTIC COLORS
     =================================== */
  --primary: var(--red-500);
  --primary-hover: var(--red-600);
  --accent: var(--red-500);
  --accent-hover: var(--red-600);
  
  --success: #15803D;
  --success-hover: #166534;
  --warning: #D97706;
  --warning-hover: #B45309;
  --error: var(--red-600);
  --error-hover: var(--red-700);
  --info: #2563EB;
  --info-hover: #1D4ED8;
  
  /* ===================================
     NEUTRAL COLORS
     =================================== */
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  
  /* ===================================
     SYSTEM COLORS
     =================================== */
  --border: var(--gray-200);
  --divider: var(--gray-300);
  --hover: var(--red-50);
  --focus: var(--primary);
  --disabled: var(--gray-400);
  
  /* ===================================
     COMPONENT COLORS
     =================================== */
  --btn-primary-bg: var(--primary);
  --btn-secondary-bg: #F9FAFB;
  --btn-danger-bg: var(--error);
  
  --link: var(--primary);
  --link-hover: var(--primary-hover);
  
  /* ===================================
     OPACITY COLORS
     =================================== */
  --primary-opacity-10: rgba(232, 92, 65, 0.1);
  --primary-opacity-20: rgba(232, 92, 65, 0.2);
  --primary-opacity-30: rgba(232, 92, 65, 0.3);
  
  /* ===================================
     GRADIENTS
     =================================== */
  --gradient-primary: linear-gradient(135deg, var(--red-500) 0%, var(--red-600) 100%);
  --gradient-accent: linear-gradient(135deg, var(--red-500) 0%, #FF6B5B 100%);
  --gradient-success: linear-gradient(135deg, var(--success) 0%, var(--success-hover) 100%);
  --gradient-warning: linear-gradient(135deg, var(--warning) 0%, var(--warning-hover) 100%);
  --gradient-error: linear-gradient(135deg, var(--error) 0%, var(--error-hover) 100%);
  --gradient-surface: linear-gradient(135deg, var(--bg) 0%, var(--red-50) 100%);
  
  /* ===================================
     SHADOWS - Minimized for Performance
     =================================== */
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
  --shadow-2xl: none;
  --shadow-inner: none;
  --shadow-colored: none;
  
  /* ===================================
     TYPOGRAPHY
     =================================== */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* ===================================
     SPACING
     =================================== */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Aliases for convenience */
  --space-xs: var(--space-1);
  --space-sm: var(--space-2);
  --space-md: var(--space-4);
  --space-lg: var(--space-6);
  --space-xl: var(--space-8);
  --space-2xl: var(--space-12);
  --space-3xl: var(--space-16);
  
  /* ===================================
     BORDER RADIUS
     =================================== */
  --radius-none: 0;
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;
  
  /* ===================================
     TRANSITIONS - Disabled for Performance
     =================================== */
  --transition-fast: 0s;
  --transition-normal: 0s;
  
  /* Status backgrounds */
  --success-bg: rgba(34, 197, 94, 0.1);
  --warning-bg: rgba(245, 158, 11, 0.1);
  --error-bg: rgba(239, 68, 68, 0.1);
  --info-bg: rgba(59, 130, 246, 0.1);
  
  /* ===================================
     Z-INDEX
     =================================== */
  --z-dropdown: 1020;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-header: 1030;
  --z-footer: 1010;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  --z-maximum: 9999;
  
  /* ===================================
     EFFECTS
     =================================== */
  --focus-ring: 0 0 0 2px var(--primary-opacity-20);
  --header-height: 64px;
  --border-width: 1px;
  
  /* ===================================
     LEGACY MAPPINGS (for backward compatibility)
     =================================== */
  --accent-primary: var(--primary);
  --text-secondary: var(--text-muted);
  --toast-success: var(--success);
  --toast-warning: var(--warning);
  --toast-error: var(--error);
  --toast-info: var(--info);
  
  --color-primary: var(--primary);
  --color-primary-hover: var(--primary-hover);
  --color-accent: var(--accent);
  --color-accent-hover: var(--accent-hover);
  --color-success: var(--success);
  --color-success-hover: var(--success-hover);
  --color-warning: var(--warning);
  --color-warning-hover: var(--warning-hover);
  --color-error: var(--error);
  --color-error-hover: var(--error-hover);
  --color-info: var(--info);
  --color-info-hover: var(--info-hover);
  
  --bg-primary: var(--bg);
  --bg-secondary: var(--surface);
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-overlay: var(--primary-opacity-10);
  --bg-gradient: var(--gradient-surface);
  --bg-gradient-alt: linear-gradient(135deg, var(--surface) 0%, var(--border) 100%);
  
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --text-inverse: #ffffff;
  --text-disabled: var(--disabled);
  
  --border-color: var(--border);
  --border-focus: var(--focus);
  --border-error: var(--error);
  --border-success: var(--success);
  --border-warning: var(--warning);
}

/* ===================================
   THEME APPLICATION
   =================================== */
body {
  color: var(--text);
}

/* Glass effect - Disabled for Performance */
.glass {
  background: rgba(255, 255, 255, 0.95);
}

.glass-light {
  background: rgba(255, 255, 255, 0.8);
}

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

/* ===================================
   SCROLLBAR - Simplified
   =================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* ===================================
   SCROLLBAR STABILIZER - Prevent layout shift
   =================================== */
html {
  scrollbar-gutter: stable; /* Reserve space for scrollbar */
}

/* Alternative for browsers that don't support scrollbar-gutter */
@supports not (scrollbar-gutter: stable) {
  html {
    margin-left: calc(100vw - 100%);
    margin-right: 0;
  }
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) var(--gray-100);
}


/* ===================================
   BUTTONS.CSS
   =================================== */

/* ===================================
   FLAT BUTTONS - RED PRIMARY THEME
   =================================== */

/* Base Button - Flat Design */
.btn {
  background: var(--red-500);
  color: white;
  border: none;
  border-radius: 0;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: #E76E70;
}

.btn:active {
  background: #D95A5C;
}

/* Remove all pseudo-elements and decorative effects */
.btn::before,
.btn::after {
  display: none !important;
}

.btn:hover::before,
.btn:hover::after,
.btn:active::before,
.btn:active::after {
  display: none !important;
}

/* Button States */
.btn:focus-visible {
  outline: 2px solid var(--red-500);
  outline-offset: 2px;
}

.btn:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Button Variants - Flat Design */
.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background: var(--red-500);
  color: white;
  border-color: var(--red-500);
}

.btn-tertiary {
  background: transparent;
  color: var(--red-500);
  border: 2px solid var(--red-500);
}

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

/* Size Variants */
.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  min-height: 32px;
  border-radius: 0;
}

.btn-large {
  padding: 14px 28px;
  font-size: 16px;
  min-height: 48px;
  border-radius: 0;
}

/* Icon Button */
.btn-icon {
  padding: 10px;
  min-height: 40px;
  min-width: 40px;
  border-radius: 0;
}

.btn-icon.btn-small {
  padding: 8px;
  min-height: 32px;
  min-width: 32px;
}

.btn-icon.btn-large {
  padding: 14px;
  min-height: 48px;
  min-width: 48px;
}

/* Specific Button Overrides - Flat Design */
.content .buttons .btn {
  background: var(--red-500);
  color: white;
  border: none;
  border-radius: 0;
  padding: 12px 24px;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.content .buttons .btn:hover {
  background: #dc2626;
}

.content-actions .btn {
  background: var(--red-500);
  color: white;
  border: none;
  border-radius: 0;
  padding: 12px 24px;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.content-actions .btn:hover {
  background: #dc2626;
}

/* Button Icon Styling */
.btn i {
  font-size: 16px;
}

/* ===================================
   SIDEBAR - FLAT DESIGN
   =================================== */

/* Sidebar Container */
.sidebar {
  flex: 0 1 auto;
  width: auto;
  min-width: 200px;
  max-width: 500px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Sidebar Header - Flat Design */
.sidebar-header {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  height: 48px;
  align-items: center;
}

.sidebar-header .btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 0;
  background: var(--red-500);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: 32px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.sidebar-header .btn i {
  font-size: 14px;
}

.sidebar-header .btn span {
  display: none;
}

.sidebar-header .btn:hover {
  background: #dc2626;
  color: white;
}

.sidebar-header .btn:active {
  background: #b91c1c;
}

.sidebar-header .btn.secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.sidebar-header .btn.secondary:hover {
  background: var(--red-500);
  color: white;
  border-color: var(--red-500);
}

/* Sidebar Body */
.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Sidebar Search - Flat Design */
.sidebar-search {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.sidebar-search input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-family-base);
  outline: none;
  border-radius: 0;
}

.sidebar-search input:focus {
  border-color: var(--red-500);
  background: var(--surface);
}

.sidebar-search input::placeholder {
  color: var(--text-muted);
}

/* File Tree - Flat Design */
.file-tree {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  user-select: none;
  line-height: 1.5;
}

/* Tree Container */
.file-tree ul.tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Folder Structure */
.file-tree .folder {
  position: relative;
  cursor: pointer;
}

.file-tree .folder > .label {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border: 1px solid transparent;
}

.file-tree .folder > .label::before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: var(--space-1);
  font-size: 8px;
  transition: transform 0.2s ease;
}

.file-tree .folder.open > .label::before {
  transform: rotate(90deg);
}

.file-tree .folder > .label:hover {
  background: var(--bg-secondary);
}

/* Folder Children */
.file-tree .folder > ul {
  margin-left: var(--space-4);
  border-left: 1px solid var(--border);
  padding-left: var(--space-3);
  margin-top: var(--space-1);
  display: none;
}

.file-tree .folder.open > ul {
  display: block;
}

/* File Items */
.file-tree .file {
  cursor: pointer;
}

.file-tree .file > .label {
  display: flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  color: var(--text-muted);
  border: 1px solid transparent;
}

/* Common Hover States */
.file-tree .folder > .label:hover,
.file-tree .file > .label:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

/* Active State */
.file-tree .file.selected > .label {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-color: var(--accent-primary);
  font-weight: 500;
}

/* File Type Colors */
.file-tree .file[data-ext="html"] > .label { color: var(--accent-primary); }
.file-tree .file[data-ext="css"] > .label { color: var(--success); }
.file-tree .file[data-ext="js"] > .label { color: var(--warning); }
.file-tree .file[data-ext="json"] > .label { color: var(--info); }
.file-tree .file[data-ext="md"] > .label { color: var(--text-muted); }

/* Empty State */
.file-tree-empty {
  padding: var(--space-4);
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* Loading State */
.file-tree-loading {
  padding: var(--space-4);
  text-align: center;
  color: var(--text-muted);
}

/* Resize Handle - Flat Design */
.resize-handle {
  width: 2px;
  background: var(--border);
  cursor: col-resize;
  position: relative;
}

.resize-handle:hover {
  background: var(--accent-primary);
}

.resize-handle:active {
  background: var(--accent-hover);
}

/* Scrollbar Styling - Flat Design */
.sidebar-body::-webkit-scrollbar {
  width: 8px;
}

.sidebar-body::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.sidebar-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 0;
}

.sidebar-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}


/* ===================================
   CARDS.CSS
   =================================== */

/* ===================================
   CARD COMPONENTS
   =================================== */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--accent-primary);
}

.card-header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin: 0 0 var(--space-2);
  line-height: var(--line-height-tight);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: var(--line-height-normal);
}

.card-body {
  flex: 1;
}

.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* Card Variants */
.card-interactive {
  cursor: pointer;
}

.card-bordered {
  border: 2px solid var(--border);
}

.card-bordered:hover {
  border-color: var(--accent-primary);
}

.card-outlined {
  border: 1px solid var(--divider);
  background: transparent;
}

.card-outlined:hover {
  background: var(--surface);
  border-color: var(--border);
}

/* Card Sizes */
.card-sm {
  padding: var(--space-4);
}

.card-sm .card-title {
  font-size: var(--font-size-lg);
}

.card-lg {
  padding: var(--space-8);
}

.card-lg .card-title {
  font-size: var(--font-size-2xl);
}

.card-xl {
  padding: var(--space-10);
}

.card-xl .card-title {
  font-size: var(--font-size-3xl);
}

/* Card States */
.card-loading {
  opacity: 0.6;
  pointer-events: none;
}

.card-loading::after {
  display: none;
}


.card-error {
  border-color: var(--btn-danger-bg);
  background: rgba(220, 38, 38, 0.05);
}

.card-success {
  border-color: var(--toast-success);
  background: rgba(22, 163, 74, 0.05);
}

.card-warning {
  border-color: var(--toast-warning);
  background: rgba(245, 158, 11, 0.05);
}

.card-info {
  border-color: var(--toast-info);
  background: rgba(37, 99, 235, 0.05);
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.card-actions-right {
  margin-left: auto;
}

.card-actions-vertical {
  flex-direction: column;
  align-items: stretch;
}

.card-actions-vertical .btn {
  justify-content: center;
}


/* ===================================
   FORMS.CSS
   =================================== */

/* ===================================
   FORM COMPONENTS
   =================================== */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-row {
  display: flex;
  gap: var(--space-4);
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
}

.form-inline {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.form-inline .form-group {
  flex: 1;
  min-width: 200px;
}

/* Form Labels */
.form-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text);
  line-height: var(--line-height-normal);
  display: block;
}

.form-label.required::after {
  content: ' *';
  color: var(--btn-danger-bg);
}

.form-label-description {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  font-weight: var(--font-weight-normal);
  margin-top: var(--space-1);
}

/* Form Inputs - Flat Design */
.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid #E9ECEF;
  font-size: var(--font-size-sm);
  font-family: var(--font-family-base);
  color: var(--text);
  background: #FFFFFF;
  outline: none;
  border-radius: 0;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: none;
}

.form-input:hover:not(:focus) {
  border-color: var(--divider);
}

.form-input:disabled {
  background: var(--bg);
  color: var(--disabled);
  cursor: not-allowed;
  opacity: 0.6;
}

.form-input:invalid {
  border-color: var(--accent-primary);
}

.form-input.success {
  border-color: #15803D;
}

/* Input Sizes */
.form-input-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-xs);
}

.form-input-lg {
  padding: var(--space-4) var(--space-5);
  font-size: var(--font-size-base);
}

/* Textarea - Flat Design */
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid #E9ECEF;
  font-size: var(--font-size-sm);
  font-family: var(--font-family-base);
  color: var(--text);
  background: #FFFFFF;
  transition: border-color 0.15s ease;
  outline: none;
  resize: vertical;
  min-height: 100px;
  border-radius: 0;
  box-shadow: none;
}

.form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: none;
}

.form-textarea:hover:not(:focus) {
  border-color: var(--divider);
}

.form-textarea:disabled {
  background: var(--bg);
  color: var(--disabled);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Select - Flat Design */
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid #E9ECEF;
  font-size: var(--font-size-sm);
  font-family: var(--font-family-base);
  color: var(--text);
  background: #FFFFFF;
  transition: border-color 0.15s ease;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: calc(var(--space-4) + 16px);
  border-radius: 0;
  box-shadow: none;
}

.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: none;
}

.form-select:hover:not(:focus) {
  border-color: var(--divider);
}

.form-select:disabled {
  background: var(--bg);
  color: var(--disabled);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Checkbox & Radio - Flat Design */
.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  position: relative;
}

.form-checkbox input,
.form-radio input {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease;
  appearance: none;
  position: relative;
  margin: 0;
  border-radius: 0;
}

.form-checkbox input:checked {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
}

.form-checkbox input:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #FFFFFF;
  font-size: 10px;
}

.form-radio input:checked {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
}

.form-radio input:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #FFFFFF;
}

.form-checkbox input:focus,
.form-radio input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.form-checkbox input:disabled,
.form-radio input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Switch */
.form-switch {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.form-switch input {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  cursor: pointer;
  transition: background-color 0.15s ease;
  appearance: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.form-switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  transition: transform 0.15s ease;
  box-shadow: none;
}

.form-switch input:checked {
  background: var(--btn-primary-bg);
}

.form-switch input:checked::after {
  transform: translateX(20px);
}

.form-switch input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.form-switch input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form Help Text */
.form-help {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
  line-height: var(--line-height-normal);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--btn-danger-bg);
  margin-top: var(--space-1);
  line-height: var(--line-height-normal);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-success {
  font-size: var(--font-size-xs);
  color: var(--toast-success);
  margin-top: var(--space-1);
  line-height: var(--line-height-normal);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.form-actions-right {
  margin-left: auto;
}

.form-actions-center {
  justify-content: center;
}

.form-actions-stacked {
  flex-direction: column;
  gap: var(--space-3);
}


/* ===================================
   NOTIFICATIONS.CSS
   =================================== */

/* ===================================
   TOAST NOTIFICATIONS - Disabled for performance
   =================================== */
.toast-container {
  position: fixed;
  top: calc(56px + var(--space-4));
  right: var(--space-4);
  z-index: var(--z-toast);
  display: none; /* Hide all toasts by default */
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

/* Only show button-related toasts */
.toast-container.button-toast {
  display: flex;
}

.toast {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 300px;
  max-width: 400px;
  pointer-events: all;
}


.toast.success {
  border-left: 4px solid var(--toast-success);
}

.toast.error {
  border-left: 4px solid var(--error);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--info);
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--toast-success);
}

.toast.error .toast-icon {
  color: var(--error);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast.info .toast-icon {
  color: var(--info);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: 2px;
}

.toast-message {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: 0;
}

.toast-close:hover {
  color: var(--text);
  background: var(--bg-secondary);
}


/* ===================================
   ANIMATIONS.CSS
   =================================== */

/* ===================================
   ANIMATION COMPONENTS - DISABLED FOR PERFORMANCE
   =================================== */

/* All animations disabled for better performance on low-spec devices */
.loading-shimmer,
.shimmer-effect,
.spin-animation,
.fade-in,
.fade-out,
.slide-in,
.slide-up,
.fade-in-up {
  animation: none !important;
}


/* ===================================
   UTILITIES.CSS
   =================================== */

/* ===================================
   UTILITY COMPONENTS
   =================================== */

/* Focus Indicators */
.focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: var(--z-tooltip);
}

.skip-link:focus {
  top: 6px;
}

/* Transitions - Disabled for Performance */
.fade-in,
.fade-out,
.slide-up {
  animation: none !important;
}

/* Skeleton Loading - Simplified */
.skeleton {
  background: #f0f0f0;
}

/* Ripple Effect - Disabled for Performance */
.ripple::before {
  display: none;
}


/* ===================================
   PAGES DATABASE CHECKER
   =================================== */

/* ===================================
   PAGES-DATABASE-CHECKER.CSS - Enhanced Layout Design
   =================================== */

/* Reset and Base Styles */
body.flat-design {
  background: #fafafa;
  color: #212121;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Only remove border-radius, keep shadows */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *::before, *::after {
  border-radius: 0 !important;
  box-sizing: border-box;
}

html, body {
  overflow: hidden;
  height: 100%;
}

/* Ensure buttons don't have unwanted shadows */
.btn, .back-btn, #loadMoreBtn, #folderOpenBtn, #checkBtn, #openSearchModalBtn, #searchEmailBtn {
  box-shadow: none !important;
}

/* Main Layout */
main#main-content {
  display: flex;
  height: calc(100vh - 64px - 60px);
  margin-top: 64px;
  margin-bottom: 60px;
  background: #fafafa;
  flex-direction: row !important;
}

/* ===================================
   ENHANCED SIDEBAR
   =================================== */
.sidebar {
  width: 300px;
  background: #ffffff;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  order: 1;
}

/* ===================================
   MAIN CONTENT AREA
   =================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  order: 2;
  min-width: 0;
}

.sidebar-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #212121;
}

.sidebar-section {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-section:last-child {
  border-bottom: none;
}

.sidebar-section h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #616161;
  margin: 0 0 16px 0;
}

/* Button Blocks */
.btn-block {
  width: 100%;
  justify-content: center;
}

/* File List */
.file-list {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  max-height: 300px;
  overflow-y: auto;
}

.file-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-list li {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  color: #616161;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-list li:hover {
  background: var(--red-500, #F18C8E);
  color: #ffffff;
}

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

.file-list li::before {
  content: '\f15b';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 11px;
  opacity: 0.5;
}

.file-list li:hover::before {
  opacity: 1;
}

/* Quick Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-item {
  background: #f8f9fa;
  padding: 16px;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--red-500, #F18C8E);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #616161;
  margin-top: 4px;
}

/* Toolbar - Compact */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 24px; /* Reduced from 24px 32px */
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  gap: 16px; /* Reduced from 24px */
}

.toolbar-left {
  flex: 1;
}

/* Title with Loading Indicator Container */
.title-with-loading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.title-with-loading h1 {
  margin: 0;
}

.toolbar h1 {
  font-size: 20px; /* Reduced from 24px */
  font-weight: 600;
  margin: 0 0 4px 0; /* Reduced from 0 0 8px 0 */
  color: #212121;
  line-height: 1.2;
}

.breadcrumb {
  font-size: 12px; /* Reduced from 14px */
  color: #616161;
  line-height: 1.3;
}

.breadcrumb span {
  font-family: 'Consolas', 'Monaco', monospace;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Buttons in Header */
#headerContainer .btn {
  background: var(--red-500, #F18C8E);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.2s ease;
  text-transform: none;
  letter-spacing: normal;
}

#headerContainer .btn:hover {
  background: var(--red-600, #DC2626);
}

#headerContainer .btn:active {
  background: #b91c1c;
}

/* Danger button style */
.btn-danger {
  background: #dc3545 !important;
  color: #ffffff !important;
}

.btn-danger:hover {
  background: #c82333 !important;
}

/* Loading Indicator */
#loadingWrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.3s ease;
}

#loadingIndicator {
  background: var(--red-500, #F18C8E);
  color: #ffffff;
  padding: 6px 12px;
  font-weight: 500;
  font-size: 12px;
  border: none;
  transition: all 0.3s ease;
}

#loadingIndicator.pill {
  border-radius: 9999px !important;
}

#loadingIndicator.pulse {
  animation: pulse 2s infinite;
}

#loadingIndicator.complete {
  background: #4caf50;
  animation: complete-pulse 0.5s ease;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(241, 140, 142, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(241, 140, 142, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(241, 140, 142, 0);
  }
}

@keyframes complete-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

#progressText {
  font-weight: 500;
  font-size: 14px;
  color: #616161;
  transition: color 0.3s ease;
}

#loadingIndicator.complete + #progressText {
  color: #4caf50;
  font-weight: 600;
}

/* Content Area with Panels - Compact */
.content-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  padding: 4px; /* Reduced from 8px */
  gap: 4px; /* Reduced from 8px */
}

/* Panel System - Compact */
.panel {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px; /* Reduced from 16px 20px */
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  min-height: 40px; /* Reduced from default */
}

.panel-header h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  color: #212121;
  flex: 1;
  line-height: 1.3;
}

.panel-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.panel-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  margin: 0;
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.panel-footer {
  padding: 12px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

/* Data Container - Notepad++ Style - Compact */
.data-container {
  height: 100%;
  overflow: auto;
  position: relative;
  background: #ffffff;
  /* Enable GPU acceleration for smoother scrolling */
  transform: translateZ(0);
  will-change: transform;
  /* CSS containment for better performance */
  contain: layout style paint;
  /* Optimize for scrolling */
  overflow-anchor: none;
  z-index: 2;
  padding: 0 8px;
  margin: 0; /* Ensure no default margin */
  box-sizing: border-box; /* Ensure proper box sizing */
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px; /* Reduced from 14px */
  line-height: 1.3; /* Reduced from 1.5 */
  /* Ensure proper height calculation */
  flex: 1;
  min-height: 0;
}

/* Data Rows - Notepad++ Style - Compact */
.data-row {
  border-bottom: none;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px; /* Reduced from 14px */
  line-height: 1.4; /* Improved from 1.3 for better spacing */
  color: #000000;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  contain: layout style;
  padding: 2px 4px; /* Added vertical padding */
  position: relative;
  min-height: 18px; /* Ensure minimum height for compact lines */
  display: flex;
  align-items: flex-start;
  margin: 0; /* Ensure no default margin */
  box-sizing: border-box; /* Ensure proper box sizing */
}

.data-row::before {
  content: attr(data-line-number);
  flex-shrink: 0;
  width: 7ch;
  text-align: right;
  margin-right: 1ch;
  color: #666;
  user-select: none;
}

.data-row:hover {
  background-color: #e8f0fe;
}

/* Virtual scroll content optimization */
.virtual-scroll-content {
  position: relative;
  transform: translateZ(0);
  /* Enable GPU acceleration */
  contain: layout style paint;
  /* Optimize for compositing */
  isolation: isolate;
  z-index: 2;
  background: #ffffff;
  counter-reset: line;
}

.virtual-scroll-content > div {
  /* Enable GPU acceleration for scrollable items */
  transform: translateZ(0);
  /* Optimize for frequent updates */
  will-change: transform;
  /* Use containment for better performance */
  contain: layout style paint;
  /* Optimize text rendering */
  text-rendering: optimizeSpeed;
  /* Prevent layout shifts */
  position: absolute;
  left: 0;
  right: 0;
  /* Optimize for scrolling performance */
  overflow-anchor: none;
  z-index: 2;
  padding: 0 8px;
}

/* Data Scroll Container - With Scrollbar */
.data-scroll-container {
  height: 100%;
  overflow: auto;
  background: #ffffff;
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.data-scroll-container::-webkit-scrollbar {
  width: 12px;
}

.data-scroll-container::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 0;
}

.data-scroll-container::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 0;
  border: 2px solid #f0f0f0;
}

.data-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

/* Virtual Scroll Container */
.virtual-scroll-container {
  height: 100%;
  overflow: auto;
  background: #ffffff;
}

.virtual-scroll-container::-webkit-scrollbar {
  width: 12px;
}

.virtual-scroll-container::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 0;
}

.virtual-scroll-container::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 0;
  border: 2px solid #f0f0f0;
}

.virtual-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9e9e9e;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: #ffffff;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* Results Container - Compact */
.results-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px; /* Reduced from 16px */
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  box-sizing: border-box;
  max-height: calc(100vh - var(--header-height) - 60px - 120px);
}

/* Custom scrollbar for results container */
.results-container::-webkit-scrollbar {
  width: 12px;
}

.results-container::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 0;
}

.results-container::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 0;
  border: 2px solid #f0f0f0;
}

.results-container::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

.results-container::-webkit-scrollbar-corner {
  background: #f0f0f0;
}

/* Validation Results - Compact */
.validation-results {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Reduced from 24px */
  width: 100%;
  max-width: 100%;
}

.results-summary {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  padding: 16px; /* Reduced from 20px */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.results-summary h4 {
  font-size: 12px;
  font-weight: 600;
  color: #212121;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.results-summary h4::before {
  content: '\f080';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 16px;
}

.results-summary p {
  font-size: 12px; /* Reduced from 14px */
  color: #616161;
  margin: 0 0 6px 0; /* Reduced from 0 0 8px 0 */
  display: flex;
  align-items: center;
  gap: 6px; /* Reduced from 8px */
}

.results-summary .error-count {
  color: #c62828;
  font-weight: 600;
}

.results-summary .error-count::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 16px;
}

.results-summary .success-count {
  color: #2e7d32;
  font-weight: 600;
}

.results-summary .success-count::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 16px;
}

/* KRHRED List - Compact */
.krhred-list {
  margin-top: 12px; /* Reduced from 16px */
  padding-top: 12px; /* Reduced from 16px */
  border-top: 1px solid #e0e0e0;
}

.krhred-list h5 {
  font-size: 12px; /* Reduced from 14px */
  font-weight: 600;
  color: #212121;
  margin: 0 0 8px 0; /* Reduced from 0 0 12px 0 */
  display: flex;
  align-items: center;
  gap: 6px; /* Reduced from 8px */
}

.krhred-list h5::before {
  content: '\f02b';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 16px;
}

.krhred-unit {
  display: inline-block;
  padding: 4px 8px; /* Reduced from 6px 12px */
  margin: 0 4px 6px 0; /* Reduced from 0 8px 8px 0 */
  font-size: 11px; /* Reduced from 12px */
  font-family: 'Consolas', 'Monaco', monospace;
  font-weight: 600;
  border: 1px solid;
  border-radius: 0;
  transition: all 0.2s ease;
  cursor: default;
  position: relative;
}

.krhred-unit:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.krhred-unit.valid {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border-color: #4caf50;
}

.krhred-unit.valid::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: -4px;
  right: -4px;
  background: #4caf50;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.krhred-unit.error {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
  border-color: #f44336;
}

.krhred-unit.error::after {
  content: '!';
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f44336;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
}

.units-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.unit-badge {
  padding: 4px 12px;
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-weight: 500;
  border: 1px solid;
}

.unit-badge.success {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #4caf50;
}

.unit-badge.error {
  background: #ffebee;
  color: #c62828;
  border-color: #f44336;
}

/* Results Details */
.results-details {
  width: 100%;
}

.results-details h4 {
  font-size: 14px;
  font-weight: 600;
  color: #212121;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-details h4::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 16px;
}

/* Error Items - Compact */
.error-item {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #f44336;
  border-radius: 4px;
  padding: 12px; /* Reduced from 16px */
  margin-bottom: 12px; /* Reduced from 16px */
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  position: relative;
  animation: slideIn 0.3s ease-out;
  clear: both; /* Clear any floats */
  overflow: hidden; /* Prevent content overflow */
}

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

.error-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-left-color: #d32f2f;
}

.error-item strong {
  display: flex;
  align-items: center;
  gap: 6px; /* Reduced from 8px */
  font-size: 14px; /* Reduced from 16px */
  color: #d32f2f;
  margin: 0 0 8px 0; /* Reduced from 0 0 12px 0 */
  font-weight: 600;
  line-height: 1.3; /* Ensure proper line height */
}

.error-item strong::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 18px;
  flex-shrink: 0;
}

.error-item .error-details {
  margin-left: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
  line-height: 1.4; /* Ensure proper line spacing */
}

.error-item .error-count {
  position: absolute;
  top: 12px; /* Reduced from 16px */
  right: 12px; /* Reduced from 16px */
  background: #ffebee;
  color: #c62828;
  padding: 3px 6px; /* Reduced from 4px 8px */
  border-radius: 10px; /* Reduced from 12px */
  font-size: 11px; /* Reduced from 12px */
  font-weight: 600;
  line-height: 1; /* Ensure proper line height */
}

/* Error severity levels */
.error-item.severe {
  border-left-color: #b71c1c;
}

.error-item.severe .error-count {
  background: #ffcdd2;
  color: #b71c1c;
}

.error-item.warning {
  border-left-color: #ff9800;
}

.error-item.warning strong {
  color: #f57c00;
}

.error-item.warning strong::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.error-item.info {
  border-left-color: #2196f3;
}

.error-item.info strong {
  color: #1976d2;
}

.error-item.info strong::before {
  content: '\f05a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

/* Error actions */
.error-item .error-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.error-item .error-actions button {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #424242;
  cursor: pointer;
  transition: all 0.2s ease;
}

.error-item .error-actions button:hover {
  background: #f5f5f5;
  border-color: #bdbdbd;
}

.error-category {
  margin-bottom: 20px;
  padding: 16px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
}

.error-category h5 {
  margin: 0 0 12px 0;
  color: white;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #e53e3e;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.error-category h5 i {
  font-size: 12px;
}

/* Virtual scrolling for error containers */
.error-virtual-container {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #ffffff;
  margin-bottom: 16px;
}

.error-virtual-container::-webkit-scrollbar {
  width: 12px;
}

.error-virtual-container::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 0;
}

.error-virtual-container::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 0;
  border: 2px solid #f0f0f0;
}

.error-virtual-container::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

/* Virtual scrolling items */
.error-virtual-container .error-unit-header {
  background: #f8f9fa;
  padding: 6px 16px;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  font-size: 14px;
  color: #d32f2f;
  position: sticky;
  top: 0;
  z-index: 10;
}

.error-virtual-container .error-item {
  border-left: none;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: none;
  animation: none;
  padding: 8px 16px;
  border-bottom: 1px solid #f5f5f5;
  background: #ffffff;
  display: flex;
  align-items: center;
  min-height: 50px;
}

.error-virtual-container .error-item:hover {
  background: #f8f9fa;
}

.error-virtual-container .error-item .error-details {
  margin: 0;
  padding: 0;
  border: none;
  flex: 1;
}

.error-virtual-container .error-item .error-count {
  position: static;
  background: #f5f5f5;
  color: #666;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  margin-left: 8px;
}

/* Error unit group for Invalid Data errors */
.error-unit-group {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 12px;
  overflow: hidden;
}

.error-unit-header {
  background: #f8f9fa;
  padding: 10px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.error-unit-header strong {
  color: #d32f2f;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.error-count-unit {
  color: #666;
  font-size: 12px;
  font-weight: normal;
  margin-left: 8px;
}

/* Error summary for large error sets */
.error-summary {
  background: #f8f9fa;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 0; /* Ensure no gap with next element */
  position: relative;
  z-index: 10; /* Ensure it stays above content */
}

.error-summary-text {
  color: #666;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  caret-color: transparent; /* Hide text cursor */
  user-select: none; /* Prevent text selection */
  line-height: 1.4; /* Ensure proper line height */
  margin: 0; /* Remove default margin */
}

.btn-show-all {
  background: var(--red-500, #F18C8E);
  color: white;
  border: none;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-show-all:hover {
  background: var(--red-600, #DC2626);
}

.errors-container {
  position: relative;
  transition: max-height 0.3s ease;
}

.loading-more-errors {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

.loading-more-errors i {
  margin-right: 8px;
}

/* Error items inside unit groups */
.error-unit-group .error-item {
  border-left: none;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: none;
  animation: none;
}

.error-unit-group .error-item:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}

.error-unit-group .error-item:hover {
  box-shadow: none;
  transform: none;
  border-left-color: transparent;
}

.error-unit-group .error-item .error-details {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.error-unit-group .error-item .error-count {
  top: 8px;
  right: 8px;
}

.error-lines-list {
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.error-line-item {
  background: #f5f5f5;
  color: #424242;
  padding: 4px 8px;
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
}

.error-line-item:hover {
  background: #e0e0e0;
}

.error-units {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.error-details-toggle {
  margin-top: 20px;
}

.error-details-toggle button {
  width: 100%;
  justify-content: center;
}

.error-details-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0;
}

.error-details-toggle.expanded .error-details-content {
  max-height: 500px;
  overflow-y: auto;
  margin-top: 12px;
}

.error-details-toggle.expanded button i {
  transform: rotate(180deg);
}

.error-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #e53e3e;
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.error-line {
  font-size: 12px;
  color: #424242;
  font-family: 'Consolas', 'Monaco', monospace;
  background: #fafafa;
  padding: 8px 12px;
  margin: 4px 0;
  border-left: 3px solid #e0e0e0;
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  width: 100%;
  box-sizing: border-box;
  border-radius: 0;
  transition: all 0.2s ease;
  position: relative;
  clear: both;
  overflow: hidden;
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
}

.error-unit-group .error-line {
  background: transparent;
  margin: 2px 0; /* Reduced from 0 */
  padding: 6px 12px; /* Reduced from 8px 16px */
  border-left: none;
  border-radius: 0;
  line-height: 1.3; /* Added for consistency */
  clear: both; /* Added for overflow prevention */
  overflow: hidden; /* Added for overflow prevention */
}

.error-unit-group .error-line:hover {
  background: #f8f9fa;
  border-left-color: transparent;
}

/* Virtual container error lines */
.error-virtual-container {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.error-virtual-container .error-content-container {
  background: #ffffff;
}

.error-virtual-container .error-unit-header {
  background: #f8f9fa;
  padding: 10px 16px;
  border-bottom: 1px solid #e0e0e0;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

.error-virtual-container .error-unit-header strong {
  color: #d32f2f;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.error-virtual-container .error-item {
  border-left: none;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: none;
  animation: none;
  background: transparent !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

.error-virtual-container .error-item:last-child {
  border-bottom: none !important;
}

.error-virtual-container .error-item:hover {
  box-shadow: none;
  transform: none;
  border-left-color: transparent;
  background: #f8f9fa !important;
}

.error-virtual-container .error-line {
  background: transparent !important;
  margin: 0 !important;
  padding: 6px 12px !important; /* Reduced from 8px 16px */
  border-left: none !important;
  border-radius: 0 !important;
  border-bottom: none !important;
  line-height: 1.3 !important; /* Added for consistency */
  clear: both !important; /* Added for overflow prevention */
  overflow: hidden !important; /* Added for overflow prevention */
}

.error-virtual-container .error-line:hover {
  background: #f8f9fa !important;
  border-left-color: transparent !important;
}

.error-line::before {
  content: attr(data-line-prefix);
  flex-shrink: 0;
  margin-right: 0.5em;
  color: #666;
  font-weight: bold;
}

.error-line:hover {
  background: #f0f0f0;
  border-left-color: #F18C8E;
}

.error-email {
  font-size: 12px;
  color: #666666;
  margin-top: 4px;
}

.error-email::before {
  content: '\f0e0';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 4px;
}

/* Select Small */
.select-small {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #212121;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.5;
  height: 32px;
  box-sizing: border-box;
}

.select-small:focus {
  outline: 2px solid var(--red-500, #F18C8E);
  outline-offset: 2px;
}

/* Button Icon */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #616161;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: #f5f5f5;
  color: var(--red-500, #F18C8E);
  border-color: var(--red-500, #F18C8E);
}

/* Database Table - Enhanced */
.database-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  table-layout: fixed;
  max-width: 100%;
}

.database-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
  border-right: 1px solid #e5e5e5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
  word-wrap: break-word;
  word-break: break-all;
}

.database-table td:last-child {
  border-right: none;
}

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

.database-table tr:hover td {
  background: #f8f9fa;
}

.database-table tr:hover {
  background: #f8f9fa;
}

.database-table td {
  color: #424242;
  position: relative;
}

/* Zebra striping for better readability */
.database-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.database-table tbody tr:nth-child(even):hover {
  background: #f0f0f0;
}

/* Column hover effect */
.database-table td:hover {
  background: #e3f2fd !important;
  cursor: pointer;
}

/* Tooltip for truncated content */
.database-table td[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #212121;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

/* Results Container */
#resultsContainer {
  background: #ffffff;
  overflow-y: auto;
  padding: 24px;
}

#krhredResults,
#krhredDetails {
  margin-bottom: 24px;
}

/* ===================================
   FLOATING ACTION BUTTON
   =================================== */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red-500, #F18C8E);
  color: #ffffff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab:hover {
  background: #E76E70;
}

.fab-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.fab-container.active .fab-menu {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.fab-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: #616161;
  border: 1px solid #e0e0e0;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-item:hover {
  background: var(--red-500, #F18C8E);
  color: #ffffff;
  border-color: var(--red-500, #F18C8E);
}

/* Modal - Flat Design */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.modal-dialog {
  position: relative;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  z-index: 2;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  z-index: 3;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
  color: #ffffff;
}

.modal-title {
  background: linear-gradient(135deg, var(--red-500, #F18C8E) 0%, #ec5a6a 100%);
  color: #ffffff;
  padding: 24px 28px;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px 12px 0 0;
  position: relative;
  overflow: hidden;
}

.modal-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}

/* Modal Controls */
.modal-controls {
  padding: 24px 28px;
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  gap: 16px;
  align-items: center;
}

.input-group {
  flex: 1;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.input-group:focus-within {
  border-color: var(--red-500, #F18C8E);
  box-shadow: 0 0 0 3px rgba(241, 140, 142, 0.1);
  transform: translateY(-1px);
}

.input-group i {
  padding: 0 12px;
  color: #616161;
}

.input-group input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: 'Consolas', 'Monaco', monospace;
  outline: none;
}

#searchEmailBtn {
  background: linear-gradient(135deg, var(--red-500, #F18C8E) 0%, #ec5a6a 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(241, 140, 142, 0.3);
  cursor: pointer;
}

#searchEmailBtn:hover {
  background: linear-gradient(135deg, #ec5a6a 0%, #d64545 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(241, 140, 142, 0.4);
}

#searchEmailBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(241, 140, 142, 0.3);
}

/* Modal Content */
.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  background: #ffffff;
  contain: layout style paint;
  scroll-behavior: smooth;
}

.modal-content.loading {
  opacity: 0.6;
  pointer-events: none;
}

.modal-content.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--red-500, #F18C8E);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Modal Footer */
.modal-footer {
  padding: 20px 28px;
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

#copyDatabaseBtn {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

#copyDatabaseBtn:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

#copyDatabaseBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

#copyDatabaseBtn.copied {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Toast animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

#modalResults {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

#schemaInfo {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: #757575;
  margin-bottom: 16px;
}

#emailMatchesInfo {
  font-weight: 500;
  margin-bottom: 16px;
  color: #212121;
}

.krhred-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  contain: layout style;
  will-change: contents;
}

.krhred-row {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  padding: 16px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  color: #616161;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  contain: layout style;
  transform: translateZ(0);
}

.krhred-row code {
  flex-shrink: 0;
  color: #d32f2f;
  font-weight: 600;
  width: 200px;
  text-align: right;
  padding-right: 12px;
}

.krhred-row.email-row code {
  color: #d32f2f;
  width: 200px;
  text-align: right;
  padding-right: 12px;
}

.krhred-row input,
.krhred-row textarea {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: #f5f5f5;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  color: #666;
  transition: all 0.3s ease;
  min-height: 36px;
  cursor: not-allowed;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
  resize: none;
}

.krhred-row input:focus,
.krhred-row textarea:focus {
  outline: none;
  border-color: var(--red-500, #F18C8E);
  box-shadow: 0 0 0 3px rgba(241, 140, 142, 0.1);
  background: #f5f5f5;
  cursor: not-allowed;
}

.krhred-row textarea.value-long {
  min-height: 60px;
  height: auto;
}

.krhred-row.email-row {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 16px;
}

.email-group {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.email-group .krhred-row {
  border: none;
  margin: 0;
  padding: 8px 0;
  background: transparent;
}

.email-group .krhred-row:first-child {
  padding-top: 0;
}

.email-group .krhred-row:last-child {
  padding-bottom: 0;
}

.email-group .krhred-row.copy-row {
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  margin-top: 8px;
  justify-content: flex-end;
}

.copy-group-btn {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-group-btn:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.copy-group-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.copy-group-btn.copied {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.email-group .krhred-row:hover {
  background: transparent;
}

.krhred-row.email-row code {
  color: #d32f2f;
}

.krhred-row:hover {
  background: #f5f5f5;
}

.modal-help {
  padding: 16px 24px;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #757575;
}

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

::-webkit-scrollbar-track {
  background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background: #bdbdbd;
}

::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

/* Utility Classes */
.muted {
  color: #757575;
  font-size: 13px;
}

/* Performance Mode Optimizations */
.performance-mode .data-row {
  /* Reduce visual effects in performance mode */
  transition: none;
  will-change: auto;
}

.performance-mode .data-container {
  /* Faster transitions */
  transition: none;
  will-change: auto;
}

.performance-mode .data-row:hover {
  /* Simpler hover effect */
  background-color: #f0f0f0;
}

/* Performance indicator */
.performance-mode::before {
  content: '\f0e7';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 4px;
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(255, 193, 7, 0.9);
  color: #000;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  z-index: 9999;
  border-radius: 2px;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 124px);
  }
  
  #sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  #headerContainer {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  #headerContainer h1 {
    font-size: 20px;
    width: 100%;
  }
  
  #contentContainer {
    flex-direction: column;
  }
  
  #resultsContainer {
    width: 100%;
    height: 300px;
    border-right: none;
    border-top: 1px solid #e0e0e0;
  }
  
  .modal-dialog {
    width: 95%;
    max-width: none;
    margin: 20px;
    max-height: 90vh;
    border-radius: 8px;
  }
  
  .modal-title {
    padding: 20px;
    font-size: 18px;
  }
  
  .modal-controls {
    padding: 20px;
    flex-direction: column;
    gap: 12px;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  .back-btn {
    bottom: 80px;
  }
}

/* Responsive Design - Tablet */
@media (max-width: 1023px) and (min-width: 768px) {
  .db-checker-layout {
    gap: var(--space-4);
  }

  .db-input-panel {
    padding: var(--space-4);
  }
}

/* Responsive Design - Small Mobile */
@media (max-width: 480px) {
  .db-input-group {
    flex-direction: column;
  }

  .db-input {
    width: 100%;
    font-size: 14px;
    padding: 12px;
  }

  .db-button {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
  }
}
