/*
 * ParkPlus Portal - Liquid Glass Theme
 * Modern, elegant UI with glassmorphism effects
 *
 * =====================================================================
 * PALETTE CONFIGURATION - CHANGE THEMES HERE
 * =====================================================================
 *
 * HOW TO CHANGE PALETTES:
 * 1. Find the "ACTIVE DARK THEME" or "ACTIVE LIGHT THEME" section below
 * 2. Copy the entire block from your desired palette definition
 * 3. Paste it to replace the "=== PALETTE COLORS ===" section
 *
 * DARK THEME PALETTES:
 *   - Steel Blue (DEFAULT) - Professional, balanced
 *   - Ocean Blue - Modern tech feel
 *   - Navy - Corporate, formal
 *
 * LIGHT THEME PALETTES:
 *   - Pure White (DEFAULT) - Clean, minimal
 *   - Warm White - Soft, inviting
 *   - Cool Gray - Modern, neutral
 *
 * =====================================================================
 */

/* ============================================ */
/* DARK PALETTE DEFINITIONS                    */
/* Copy from here to change dark theme         */
/* ============================================ */

/*
--- STEEL BLUE (Dark) - Professional, balanced ---
  --bg-gradient-start: #111827;
  --bg-gradient-mid: #1f2937;
  --bg-gradient-end: #0f172a;
  --sidebar-bg-start: rgba(17, 24, 39, 0.95);
  --sidebar-bg-end: rgba(15, 23, 42, 0.95);
  --color-primary: #3b82f6;
  --color-primary-light: #60a5fa;
  --color-primary-dark: #2563eb;
  --color-primary-rgb: 59, 130, 246;
  --color-secondary: #1e40af;
  --color-secondary-light: #3b82f6;
  --color-secondary-rgb: 30, 64, 175;
  --select-option-bg: #1f2937;
--- END STEEL BLUE ---
*/

/*
--- OCEAN BLUE (Dark) - Modern tech feel ---
  --bg-gradient-start: #0f172a;
  --bg-gradient-mid: #1e293b;
  --bg-gradient-end: #1e3a8a;
  --sidebar-bg-start: rgba(15, 23, 42, 0.95);
  --sidebar-bg-end: rgba(30, 58, 138, 0.95);
  --color-primary: #3b82f6;
  --color-primary-light: #60a5fa;
  --color-primary-dark: #2563eb;
  --color-primary-rgb: 59, 130, 246;
  --color-secondary: #1e3a8a;
  --color-secondary-light: #3b82f6;
  --color-secondary-rgb: 30, 58, 138;
  --select-option-bg: #1e293b;
--- END OCEAN BLUE ---
*/

/*
--- NAVY (Dark) - Corporate, formal ---
  --bg-gradient-start: #0a1628;
  --bg-gradient-mid: #162033;
  --bg-gradient-end: #1e3a5f;
  --sidebar-bg-start: rgba(10, 22, 40, 0.95);
  --sidebar-bg-end: rgba(30, 58, 95, 0.95);
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-primary-rgb: 37, 99, 235;
  --color-secondary: #1e3a5f;
  --color-secondary-light: #2563eb;
  --color-secondary-rgb: 30, 58, 95;
  --select-option-bg: #162033;
--- END NAVY ---
*/

/* ============================================ */
/* LIGHT PALETTE DEFINITIONS                   */
/* Copy from here to change light theme        */
/* ============================================ */

/*
--- PURE WHITE (Light) - Clean, minimal ---
  --bg-gradient-start: #ffffff;
  --bg-gradient-mid: #f8fafc;
  --bg-gradient-end: #f1f5f9;
  --sidebar-bg-start: rgba(255, 255, 255, 0.95);
  --sidebar-bg-end: rgba(248, 250, 252, 0.95);
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-primary-rgb: 37, 99, 235;
  --color-secondary: #1e40af;
  --color-secondary-light: #2563eb;
  --color-secondary-rgb: 30, 64, 175;
  --select-option-bg: #ffffff;
--- END PURE WHITE ---
*/

/*
--- WARM WHITE (Light) - Soft, inviting ---
  --bg-gradient-start: #fafaf9;
  --bg-gradient-mid: #f5f5f4;
  --bg-gradient-end: #e7e5e4;
  --sidebar-bg-start: rgba(250, 250, 249, 0.95);
  --sidebar-bg-end: rgba(245, 245, 244, 0.95);
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-primary-rgb: 37, 99, 235;
  --color-secondary: #1e40af;
  --color-secondary-light: #2563eb;
  --color-secondary-rgb: 30, 64, 175;
  --select-option-bg: #fafaf9;
--- END WARM WHITE ---
*/

/*
--- COOL GRAY (Light) - Modern, neutral ---
  --bg-gradient-start: #f8fafc;
  --bg-gradient-mid: #f1f5f9;
  --bg-gradient-end: #e2e8f0;
  --sidebar-bg-start: rgba(248, 250, 252, 0.95);
  --sidebar-bg-end: rgba(241, 245, 249, 0.95);
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-primary-rgb: 37, 99, 235;
  --color-secondary: #1e40af;
  --color-secondary-light: #2563eb;
  --color-secondary-rgb: 30, 64, 175;
  --select-option-bg: #f8fafc;
--- END COOL GRAY ---
*/

/* ============================================ */
/* ACTIVE DARK THEME                           */
/* Currently: Steel Blue                       */
/* ============================================ */
:root, [data-theme="dark"] {
  /* === PALETTE COLORS - Replace this block to change palette === */
  --bg-gradient-start: #0f172a;
  --bg-gradient-mid: #1e293b;
  --bg-gradient-end: #1e3a8a;
  --sidebar-bg-start: rgba(15, 23, 42, 0.95);
  --sidebar-bg-end: rgba(30, 58, 138, 0.95);
  --color-primary: #3b82f6;
  --color-primary-light: #60a5fa;
  --color-primary-dark: #2563eb;
  --color-primary-rgb: 59, 130, 246;
  --color-secondary: #1e3a8a;
  --color-secondary-light: #3b82f6;
  --color-secondary-rgb: 30, 58, 138;
  --select-option-bg: #1e293b;
  /* === END PALETTE COLORS === */

  /* === DARK THEME COMMON STYLES (don't change these) === */
  /* Glass surface colors */
  /* --glass-bg: rgba(255, 255, 255, 0.05); */
  --glass-bg: rgba(0, 0, 0, 0.2);
  --glass-bg-hover: rgba(255, 255, 255, 0.1);
  --glass-bg-dark: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(255, 255, 255, 0.2);

  /* Nav dropdown colors */
  --nav-dropdown-bg: rgba(255, 255, 255, 0.05);
  --nav-dropdown-border: rgba(255, 255, 255, 0.1);
  --nav-dropdown-text: #d1d5db;

  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: #e5e7eb;
  --text-muted: #d1d5db;
  --text-disabled: #9ca3af;

  /* Input/Form colors */
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-bg-focus: rgba(255, 255, 255, 0.1);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-border-focus: rgba(59, 130, 246, 0.5);
  --input-text: #ffffff;
  --input-placeholder: rgba(156, 163, 175, 0.7);

  /* Table colors */
  --table-bg: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
  --table-header-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(30, 64, 175, 0.15) 100%);
  --table-border: rgba(59, 130, 246, 0.2);
  --table-row-hover: rgba(59, 130, 246, 0.08);
  --table-cell-bg: rgba(59, 130, 246, 0.05);

  /* Active/Selected states */
  --active-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 64, 175, 0.2));
  --active-border: rgba(59, 130, 246, 0.3);

  /* Button primary gradient */
  --btn-primary-gradient: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(30, 64, 175, 0.9));
  --btn-primary-gradient-hover: linear-gradient(135deg, #3b82f6, #1e40af);

  /* Toggle/Checkbox accent */
  --toggle-active-bg: rgba(59, 130, 246, 0.8);
  --toggle-active-border: rgba(96, 165, 250, 0.3);
  --checkbox-checked-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(30, 64, 175, 0.9));
  --checkbox-checked-border: rgba(96, 165, 250, 0.5);

  /* Shadows */
  --shadow-color-rgb: 30, 64, 175;
  --shadow-glass: 0 8px 32px 0 rgba(var(--shadow-color-rgb), 0.37);
  --shadow-glass-sm: 0 4px 16px 0 rgba(var(--shadow-color-rgb), 0.25);
  --shadow-glass-lg: 0 12px 48px 0 rgba(var(--shadow-color-rgb), 0.5);

  /* Scrollbar */
  --scrollbar-track: rgba(255, 255, 255, 0.05);
  --scrollbar-thumb: rgba(255, 255, 255, 0.1);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.2);

  /* Status Colors */
  --color-success: #10b981;
  --color-success-light: #34d399;
  --color-warning: #f59e0b;
  --color-warning-light: #fbbf24;
  --color-danger: #ef4444;
  --color-danger-light: #f87171;
  --color-info: #3b82f6;
  --color-info-light: #60a5fa;

  /* Page title gradient */
  --title-gradient: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);

  /* Logo filter */
  --logo-filter: none;

  /* Card header text - for section titles like "User Information" */
  --card-header-text: #ffffff;

  /* Secondary button colors for dark mode */
  --btn-secondary-bg: rgba(107, 114, 128, 0.3);
  --btn-secondary-border: rgba(156, 163, 175, 0.3);
  --btn-secondary-text: #d1d5db;
  --btn-secondary-hover-bg: rgba(107, 114, 128, 0.5);
  --btn-secondary-hover-text: #ffffff;
}

/* ============================================ */
/* ACTIVE LIGHT THEME                          */
/* Currently: Pure White                       */
/* ============================================ */
[data-theme="light"] {
  /* === PALETTE COLORS (Pure White) - Replace this block to change palette === */
  --bg-gradient-start: #fafaf9;
  --bg-gradient-mid: #f5f5f4;
  --bg-gradient-end: #e7e5e4;
  --sidebar-bg-start: rgba(250, 250, 249, 0.95);
  --sidebar-bg-end: rgba(245, 245, 244, 0.95);
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-primary-rgb: 37, 99, 235;
  --color-secondary: #1e40af;
  --color-secondary-light: #2563eb;
  --color-secondary-rgb: 30, 64, 175;
  --select-option-bg: #fafaf9;
  /* === END PALETTE COLORS === */

  /* === LIGHT THEME COMMON STYLES (don't change these) === */
  /* Glass surface colors */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-hover: rgba(255, 255, 255, 0.9);
  --glass-bg-dark: rgba(248, 250, 252, 0.95);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.15);

  /* Nav dropdown colors */
  --nav-dropdown-bg: rgba(0, 0, 0, 0.03);
  --nav-dropdown-border: rgba(0, 0, 0, 0.08);
  --nav-dropdown-text: #4b5563;

  /* Text colors */
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-disabled: #9ca3af;

  /* Input/Form colors */
  --input-bg: rgba(255, 255, 255, 0.8);
  --input-bg-focus: rgba(255, 255, 255, 1);
  --input-border: rgba(0, 0, 0, 0.1);
  --input-border-focus: rgba(37, 99, 235, 0.5);
  --input-text: #111827;
  --input-placeholder: rgba(107, 114, 128, 0.8);

  /* Table colors */
  --table-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
  --table-header-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(30, 64, 175, 0.08) 100%);
  --table-border: rgba(37, 99, 235, 0.15);
  --table-row-hover: rgba(37, 99, 235, 0.05);
  --table-cell-bg: rgba(255, 255, 255, 0.5);

  /* Active/Selected states */
  --active-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(30, 64, 175, 0.1));
  --active-border: rgba(37, 99, 235, 0.3);

  /* Button primary gradient */
  --btn-primary-gradient: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(30, 64, 175, 0.95));
  --btn-primary-gradient-hover: linear-gradient(135deg, #2563eb, #1e40af);

  /* Toggle/Checkbox accent */
  --toggle-active-bg: rgba(37, 99, 235, 0.9);
  --toggle-active-border: rgba(59, 130, 246, 0.3);
  --checkbox-checked-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(30, 64, 175, 0.95));
  --checkbox-checked-border: rgba(59, 130, 246, 0.5);

  /* Shadows - lighter for light theme */
  --shadow-color-rgb: 0, 0, 0;
  --shadow-glass: 0 8px 32px 0 rgba(var(--shadow-color-rgb), 0.08);
  --shadow-glass-sm: 0 4px 16px 0 rgba(var(--shadow-color-rgb), 0.05);
  --shadow-glass-lg: 0 12px 48px 0 rgba(var(--shadow-color-rgb), 0.12);

  /* Scrollbar */
  --scrollbar-track: rgba(0, 0, 0, 0.03);
  --scrollbar-thumb: rgba(0, 0, 0, 0.1);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.2);

  /* Status Colors */
  --color-success: #10b981;
  --color-success-light: #34d399;
  --color-warning: #f59e0b;
  --color-warning-light: #fbbf24;
  --color-danger: #ef4444;
  --color-danger-light: #f87171;
  --color-info: #3b82f6;
  --color-info-light: #60a5fa;

  /* Page title gradient */
  --title-gradient: linear-gradient(135deg, #111827 0%, #1e40af 100%);

  /* Logo filter */
  --logo-filter: brightness(0) saturate(100%);

  /* Card header text - for section titles like "User Information" */
  --card-header-text: #111827;

  /* Secondary button colors for light mode */
  --btn-secondary-bg: rgba(100, 116, 139, 0.15);
  --btn-secondary-border: rgba(100, 116, 139, 0.3);
  --btn-secondary-text: #475569;
  --btn-secondary-hover-bg: rgba(100, 116, 139, 0.25);
  --btn-secondary-hover-text: #1e293b;
}

/* Base body styling */
body {
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-secondary);
  transition: background 0.3s ease, color 0.3s ease;
}

/* Sidebar Glass Styling */
.sidebar-glass {
  background: linear-gradient(180deg, var(--sidebar-bg-start) 0%, var(--sidebar-bg-end) 100%);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-right: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass-lg);
  padding-top: 1rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Navigation Link Styles */
.nav-link-glass {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link-glass:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  text-decoration: none;
  transform: translateX(4px);
}

.nav-link-glass-active {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--active-bg);
  border: 1px solid var(--active-border);
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--shadow-glass-sm);
  font-weight: 600;
}

.nav-link-glass i,
.nav-link-glass-active i {
  width: 1.25rem;
  text-align: center;
}

/* Navigation Dropdown Items - Consistent sizing */
.nav-drawer .nav-link-glass,
.nav-drawer .nav-link-glass-active {
  font-size: 0.9375rem; /* 15px - slightly smaller than base but still readable */
  padding: 0.625rem 0.875rem;
}

/* Navigation Drawer Toggle Button */
.nav-drawer-toggle {
  font-size: 0.9375rem;
}

/* Glass Card Component */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: var(--shadow-glass);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.glass-card-hover {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: var(--shadow-glass);
  transition: all 0.3s ease;
}

.glass-card-hover:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glass-lg);
  transform: translateY(-4px);
}

/* Glass Buttons */
.btn-glass {
  padding: 0.625rem 1.5rem;
  background: var(--glass-bg-hover);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-hover);
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #d1d5db;
  cursor: pointer;
}

.btn-glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glass);
  color: var(--text-primary);
}

.btn-glass:active {
  transform: scale(0.95);
}

.btn-glass-primary {
  padding: 0.625rem 1.5rem;
  background: var(--btn-primary-gradient);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-hover);
  border-radius: 0.75rem;
  font-weight: 500;
  color: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-glass-primary:hover {
  background: var(--btn-primary-gradient-hover);
  box-shadow: var(--shadow-glass-lg);
}

.btn-glass-primary:active {
  transform: scale(0.95);
}

.btn-glass-danger {
  padding: 0.625rem 1.5rem;
  background: rgba(239, 68, 68, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 0.75rem;
  font-weight: 500;
  color: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-glass-danger:hover {
  background: rgba(239, 68, 68, 1);
  box-shadow: var(--shadow-glass);
}

.btn-glass-danger:active {
  transform: scale(0.95);
}

.btn-glass-success {
  padding: 0.625rem 1.5rem;
  background: rgba(16, 185, 129, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 0.75rem;
  font-weight: 500;
  color: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-glass-success:hover {
  background: rgba(16, 185, 129, 1);
  box-shadow: var(--shadow-glass);
}

.btn-glass-success:active {
  transform: scale(0.95);
}

.btn-glass-secondary {
  padding: 0.625rem 1.5rem;
  background: var(--btn-secondary-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--btn-secondary-border);
  border-radius: 0.75rem;
  font-weight: 500;
  color: var(--btn-secondary-text);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-glass-secondary:hover {
  background: var(--btn-secondary-hover-bg);
  color: var(--btn-secondary-hover-text);
}

.btn-glass-secondary:active {
  transform: scale(0.95);
}

/* Small button variant */
.btn-glass-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Glass Inputs */
.input-glass {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--input-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--input-border);
  border-radius: 0.75rem;
  color: var(--input-text);
  transition: all 0.3s ease;
}

.input-glass::placeholder {
  color: var(--input-placeholder);
}

.input-glass:focus {
  outline: none;
  border-color: var(--input-border-focus);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.2);
}

.select-glass {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--input-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--input-border);
  border-radius: 0.75rem;
  color: var(--input-text);
  transition: all 0.3s ease;
  cursor: pointer;
}

.select-glass:focus {
  outline: none;
  border-color: var(--input-border-focus);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.2);
}

.select-glass option {
  background: var(--select-option-bg);
  color: var(--input-text);
}

.textarea-glass {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--input-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--input-border);
  border-radius: 0.75rem;
  color: var(--input-text);
  transition: all 0.3s ease;
  resize: vertical;
}

.textarea-glass::placeholder {
  color: var(--input-placeholder);
}

.textarea-glass:focus {
  outline: none;
  border-color: var(--input-border-focus);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.2);
}

/* Glass Tables */
.table-glass {
  width: 100%;
  background: var(--table-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--table-border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(var(--color-primary-rgb), 0.1);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.table-glass thead {
  background: var(--table-header-bg);
  border-bottom: 1px solid var(--table-border);
}

.table-glass th {
  padding: 1rem 0.75rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.table-glass td {
  padding: 0.875rem 0.75rem;
  font-size: 0.875rem;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.08);
  vertical-align: middle;
  background: var(--table-cell-bg);
}

.table-glass tbody tr {
  transition: all 0.2s ease;
}

.table-glass tbody tr:hover {
  background: var(--table-row-hover);
}

.table-glass tbody tr:hover td {
  background: var(--table-row-hover);
}

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

/* Responsive table handling */
@media (max-width: 768px) {
  .table-glass th,
  .table-glass td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8125rem;
  }

  .table-glass th {
    font-size: 0.75rem;
  }

  /* Allow table to scroll horizontally on small screens */
  .table-glass-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Reduce action button padding on mobile but keep side-by-side */
  .action-btns {
    gap: 0.25rem;
  }

  .action-btn {
    padding: 0.25rem 0.375rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .table-glass th,
  .table-glass td {
    padding: 0.625rem 0.375rem;
    font-size: 0.75rem;
  }

  .action-btn {
    padding: 0.25rem 0.3rem;
    font-size: 0.7rem;
  }
}

/* Glass Badges */
.badge-glass,
.badge-glass-success,
.badge-glass-warning,
.badge-glass-danger,
.badge-glass-info {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid;
}

.badge-glass {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
}

.badge-glass-success {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.badge-glass-warning {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fcd34d;
}

.badge-glass-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.badge-glass-info {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

/* Glass Alerts */
.alert-glass,
.alert-glass-success,
.alert-glass-warning,
.alert-glass-danger,
.alert-glass-info {
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: var(--shadow-glass-sm);
  margin-bottom: 1rem;
}

.alert-glass-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}

.alert-glass-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fde68a;
}

.alert-glass-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

.alert-glass-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(96, 165, 250, 0.3);
  color: #bfdbfe;
}

/* Status Circles */
.status-circle,
.status-circle-success,
.status-circle-warning,
.status-circle-danger,
.status-circle-green,
.status-circle-red {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  display: inline-block;
}

.status-circle {
  background: #6b7280;
  box-shadow: 0 0 8px rgba(107, 114, 128, 0.4);
}

.status-circle-success,
.status-circle-green {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-circle-warning {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.status-circle-danger,
.status-circle-red {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
  border: 2px solid var(--scrollbar-track);
}

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

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

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

.animate-shimmer {
  animation: shimmer 3s infinite;
  background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  background-size: 1000px 100%;
}

/* Loading spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Toggle Switch (Glass Style) */
.toggle-container {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-glass {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-glass input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-bg-hover);
  border: 1px solid var(--glass-border-hover);
  transition: all 0.3s ease;
  border-radius: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-glass input:checked + .toggle-slider {
  background: var(--toggle-active-bg);
  border-color: var(--toggle-active-border);
}

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

/* Checkbox (Glass Style) */
.checkbox-glass {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--input-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-hover);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.checkbox-glass:checked {
  background: var(--checkbox-checked-bg);
  border-color: var(--checkbox-checked-border);
}

.checkbox-glass:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 0.875rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.empty-state-subtext {
  font-size: 0.875rem;
  color: var(--text-disabled);
}

/* Action buttons for tables */
.action-btns {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.action-btn {
  padding: 0.375rem 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  color: #d1d5db;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.action-btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.action-btn-primary:hover {
  background: rgba(var(--color-primary-rgb), 0.2);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  color: var(--color-primary-light);
}

/* Page header */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Divider */
.divider-glass {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 1.5rem 0;
}

/* Close button for alerts */
.btn-close-glass {
  background: transparent;
  border: none;
  color: currentColor;
  opacity: 0.7;
  cursor: pointer;
  padding: 0.25rem;
  transition: opacity 0.2s ease;
}

.btn-close-glass:hover {
  opacity: 1;
}

/* Input Group Glass Styling (for price inputs with prefix/suffix) */
.input-group-glass {
  display: flex;
  align-items: center;
  width: 100%;
}

.input-group-glass-prefix,
.input-group-glass-suffix {
  padding: 0.625rem 0.875rem;
  background: var(--glass-bg);
  border: 1px solid var(--input-border);
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.input-group-glass-prefix {
  border-right: none;
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
}

.input-group-glass-suffix {
  border-left: none;
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

/* Input Group Text - for connected prefix/suffix elements like $ and .00 */
.input-group-glass .input-group-text {
  padding: 0.625rem 0.75rem;
  background: var(--glass-bg);
  border: 1px solid var(--input-border);
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* First text element gets left radius */
.input-group-glass .input-group-text:first-child {
  border-right: none;
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
}

/* Last text element gets right radius */
.input-group-glass .input-group-text:last-child {
  border-left: none;
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

/* Middle text elements have no radius and share borders */
.input-group-glass .input-group-text:not(:first-child):not(:last-child) {
  border-radius: 0;
  border-left: none;
  border-right: none;
}

/* Input in group - remove radius when adjacent to text elements */
.input-group-glass .input-glass {
  border-radius: 0;
}

/* If input is first child, give it left radius */
.input-group-glass .input-glass:first-child {
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
}

/* If input is last child, give it right radius */
.input-group-glass .input-glass:last-child {
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

/* Remove duplicate borders between adjacent elements */
.input-group-glass > *:not(:first-child) {
  margin-left: -1px;
}

/* Input Group Icon - for info icons at start of input groups */
.input-group-glass .input-group-icon {
  padding: 0.625rem 0.75rem;
  background: var(--glass-bg);
  border: 1px solid var(--input-border);
  border-right: none;
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.input-group-glass .input-group-icon:hover {
  color: var(--color-primary-light);
}

.input-glass-in-group {
  flex: 1;
  padding: 0.625rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-left: none;
  border-right: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.input-glass-in-group:focus {
  outline: none;
  background: var(--input-bg-focus);
  z-index: 1;
}

.input-glass-in-group::placeholder {
  color: var(--text-muted);
}

/* ============================================ */
/* TIME RANGE SELECTOR (Pill Buttons)          */
/* ============================================ */
.time-range-selector {
  display: inline-flex;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.time-range-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  padding: 12px;
}

.time-range-btn:hover {
  color: var(--text-primary);
  background: var(--glass-bg-hover);
}

.time-range-btn.active {
  background: var(--btn-primary-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.4);
}

/* Responsive: Stack on very small screens */
@media (max-width: 400px) {
  .time-range-selector {
    flex-wrap: wrap;
    border-radius: 1rem;
    justify-content: center;
  }

  .time-range-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* ============================================ */
/* THEME TOGGLE COMPONENT                      */
/* ============================================ */

/* Desktop theme toggle container - DISABLED, using in-nav toggle instead */
.theme-toggle-container {
  display: none !important;
}

.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.theme-toggle-wrapper:hover {
  background: var(--glass-bg-hover);
}

.theme-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.theme-toggle-label i {
  font-size: 1rem;
  color: var(--color-primary);
}

/* Theme Toggle Switch */
.theme-switch {
  position: relative;
  width: 52px;
  height: 28px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-bg-hover);
  border: 1px solid var(--glass-border-hover);
  transition: all 0.3s ease;
  border-radius: 28px;
}

.theme-switch-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Sun icon for light mode */
.theme-switch-slider:after {
  content: "☀️";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-switch input:checked + .theme-switch-slider {
  background: var(--glass-bg-hover);
}

.theme-switch input:checked + .theme-switch-slider:before {
  transform: translateX(24px);
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

/* Moon icon for dark mode */
.theme-switch input:checked + .theme-switch-slider:after {
  content: "🌙";
  left: auto;
  right: 6px;
  opacity: 0;
}

/* Mobile theme toggle (in mobile menu) */
.mobile-theme-toggle {
  padding: 1rem;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}

/* Theme toggle in sidebar - flows with content, not fixed */
.theme-toggle-mobile {
  position: relative;
  z-index: 1;
}

/* Ensure sidebar nav has room for all content */
.sidebar-glass nav {
  padding-bottom: 1rem;
}

/* Logo theme adaptation */
.logo-themed {
  filter: var(--logo-filter);
  transition: filter 0.3s ease;
}

/* ============================================ */
/* THEMED COLOR UTILITIES                       */
/* Use these instead of hardcoded colors        */
/* ============================================ */

/* Themed text colors - use primary color from theme */
.text-themed,
.text-themed-primary {
  color: var(--color-primary-light);
}

.text-themed-secondary {
  color: var(--color-secondary-light);
}

/* Themed background colors */
.bg-themed {
  background-color: rgba(var(--color-primary-rgb), 0.2);
}

.bg-themed-solid {
  background-color: var(--color-primary);
}

/* Themed hover states */
.hover\:text-themed:hover {
  color: var(--color-primary);
}

/* Themed icon badge (for icon backgrounds) */
.icon-badge-themed {
  background-color: rgba(var(--color-primary-rgb), 0.2);
  color: var(--color-primary-light);
}

/* Themed link colors */
a.link-themed,
.link-themed a {
  color: var(--color-primary-light);
}

a.link-themed:hover,
.link-themed a:hover {
  color: var(--color-primary);
}

/* Themed border */
.border-themed {
  border-color: rgba(var(--color-primary-rgb), 0.3);
}

/* Themed checkbox/input accent */
.accent-themed {
  accent-color: var(--color-primary);
}

/* ============================================ */
/* PASSWORD INPUT WITH VISIBILITY TOGGLE       */
/* ============================================ */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .input-glass {
  padding-right: 3rem;
  width: 100%;
}

.password-toggle-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-left: 1px solid var(--input-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

.password-toggle-btn:hover {
  color: var(--text-secondary);
  background: var(--glass-bg-hover);
}

.password-toggle-btn:focus {
  outline: none;
  color: var(--color-primary-light);
}

/* ============================================ */
/* HEADER BAR STYLING                           */
/* ============================================ */
header.header-glass {
  background: linear-gradient(135deg, var(--sidebar-bg-start), var(--sidebar-bg-end));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass-sm);
}

/* ============================================ */
/* IMAGE GALLERY / THUMBNAIL GRID              */
/* ============================================ */
.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.image-thumbnail-container {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.image-thumbnail-container:hover {
  border-color: var(--color-primary);
  transform: scale(1.02);
}

.image-thumbnail-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.image-thumbnail-container .delete-button {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.875rem;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-thumbnail-container:hover .delete-button {
  opacity: 1;
}

.image-thumbnail-container .delete-button:hover {
  background: rgba(220, 38, 38, 1);
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--glass-bg);
  border: 2px dashed var(--glass-border);
  border-radius: 0.75rem;
  min-height: 120px;
}

.image-placeholder i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

/* Image lightbox modal */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.image-lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 0.5rem;
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================ */
/* MOBILE MENU IMPROVEMENTS                    */
/* ============================================ */
/* Hide hamburger when mobile menu is open */
.mobile-menu.open ~ .mobile-menu-toggle,
body.mobile-menu-open .mobile-menu-toggle {
  opacity: 0;
  pointer-events: none;
}

/* Mobile Menu - Theme-aware styling */
.mobile-menu {
  background: linear-gradient(180deg, var(--sidebar-bg-start) 0%, var(--sidebar-bg-end) 100%) !important;
  border-right-color: var(--glass-border) !important;
}

/* Reduce top margin on mobile nav - close button only needs small clearance */
.mobile-menu nav {
  margin-top: 2.5rem !important;
}

/* Mobile Menu Toggle Button - Theme-aware styling */
.mobile-menu-toggle {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hover) !important;
  color: var(--text-primary) !important;
}

.mobile-menu-toggle:hover {
  background: var(--glass-bg-hover) !important;
}

/* Mobile Menu Close Button - Theme-aware styling */
.mobile-menu-close {
  background: var(--glass-bg-hover) !important;
  color: var(--text-primary) !important;
}

.mobile-menu-close:hover {
  background: var(--glass-bg-hover) !important;
}

/* ============================================ */
/* LIGHT THEME COMPONENT OVERRIDES             */
/* Centralized overrides for light mode        */
/* ============================================ */
[data-theme="light"] {
  /* Badge colors with better contrast for light mode */
  .badge-glass {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
    color: #475569;
  }

  .badge-glass-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #047857;
  }

  .badge-glass-warning {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(217, 119, 6, 0.5);
    color: #92400e;
  }

  .badge-glass-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #dc2626;
  }

  .badge-glass-info {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
  }

  /* Alert colors with better contrast for light mode */
  .alert-glass-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #065f46;
  }

  .alert-glass-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #78350f;
  }

  .alert-glass-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #991b1b;
  }

  .alert-glass-info {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.4);
    color: #1e3a8a;
  }

  /* Card header text (section titles like "User Information") */
  .glass-card h3,
  .glass-card h2 {
    color: var(--card-header-text) !important;
  }

  /* Force white text color overrides to use dark text */
  .text-white {
    color: var(--text-primary) !important;
  }

  /* Form labels - ensure good contrast */
  .glass-card label,
  label.block {
    color: #374151 !important;
  }

  /* Gray text utilities - darken for light mode */
  .text-gray-300 {
    color: #4b5563 !important;
  }

  .text-gray-400 {
    color: #6b7280 !important;
  }

  .text-gray-500 {
    color: #6b7280 !important;
  }

  /* Improve glass card visibility */
  .glass-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  }

  /* Table cell text color fix */
  .table-glass td {
    color: #374151;
  }

  .table-glass th {
    color: #1f2937;
  }

  /* Sidebar improvements for light mode */
  .sidebar-glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-right-color: rgba(0, 0, 0, 0.08);
  }

  /* Mobile menu improvements for light mode */
  .mobile-menu {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%) !important;
    border-right-color: rgba(0, 0, 0, 0.08) !important;
  }

  /* Mobile menu toggle button for light mode */
  .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #374151 !important;
  }

  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #111827 !important;
  }

  /* Mobile menu close button for light mode */
  .mobile-menu-close {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #374151 !important;
  }

  .mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #111827 !important;
  }

  /* Nav link text contrast */
  .nav-link-glass {
    color: #4b5563;
  }

  .nav-link-glass:hover {
    color: #111827;
    background: rgba(37, 99, 235, 0.08);
  }

  .nav-link-glass-active {
    color: #1e40af;
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.25);
  }

  /* Header bar for light mode */
  header.header-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }

  /* Toggle slider track for light mode */
  .toggle-slider {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.15);
  }

  /* Improve action button visibility */
  .action-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: #4b5563;
  }

  .action-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #1e40af;
  }

  .action-btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
  }

  .action-btn-primary:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
    color: #1d4ed8;
  }

  /* Input group text styling */
  .input-group-glass .input-group-text {
    background: rgba(248, 250, 252, 0.9);
    color: #4b5563;
  }

  /* Improve themed text for light mode */
  .text-themed,
  .text-themed-primary {
    color: var(--color-primary-dark);
  }

  /* Divider for light mode */
  .divider-glass {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
  }

  /* Small buttons variant for light mode */
  .btn-sm {
    font-size: 0.8125rem;
  }

  /* Input placeholder text */
  .input-glass::placeholder,
  .textarea-glass::placeholder {
    color: #9ca3af;
  }

  /* Navigation dropdown styling for light mode */
  /* Administration dropdown - override Tailwind inline styles */
  .nav-drawer-toggle:not([class*="from-amber"]) {
    background: rgba(37, 99, 235, 0.06) !important;
    border-color: rgba(37, 99, 235, 0.15) !important;
    color: #374151 !important;
  }

  .nav-drawer-toggle:not([class*="from-amber"]):hover {
    background: rgba(37, 99, 235, 0.12) !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
    color: #1e40af !important;
  }

  /* When Administration is active/expanded */
  .nav-drawer-toggle:not([class*="from-amber"])[class*="from-blue"] {
    background: rgba(37, 99, 235, 0.12) !important;
    border-color: rgba(37, 99, 235, 0.3) !important;
    color: #1e40af !important;
  }

  /* Border dividers - lighten for light mode */
  .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.08) !important;
  }

  /* Patrol result card improvements for light mode */
  .result-card {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, var(--glass-bg-dark) 100%);
    border-color: rgba(var(--color-primary-rgb), 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 15px rgba(var(--color-primary-rgb), 0.08);
  }

  .result-card:hover {
    border-color: rgba(var(--color-primary-rgb), 0.4);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15), 0 0 20px rgba(var(--color-primary-rgb), 0.12);
  }

  /* Result header backgrounds for light mode */
  .result-header.allowed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-bottom-color: rgba(16, 185, 129, 0.25);
  }

  .result-header.denied {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-bottom-color: rgba(239, 68, 68, 0.25);
  }

  .result-header.unknown {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.08) 100%);
    border-bottom-color: rgba(245, 158, 11, 0.25);
  }

  /* Result header with plate display */
  .plate-display {
    color: #1f2937;
    text-shadow: none;
  }

  /* Status badges with better contrast */
  .status-badge.allowed {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
    color: #047857;
  }

  .status-badge.denied {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #dc2626;
  }

  .status-badge.unknown {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
    color: #b45309;
  }

  /* Result content labels */
  .result-label {
    color: var(--color-primary-dark);
  }

  .result-value {
    color: #374151;
  }

  .result-value.highlight {
    color: #111827;
  }

  .result-value.expired {
    color: #dc2626;
  }

  /* Result actions area */
  .result-actions {
    background: rgba(0, 0, 0, 0.04);
    border-top-color: rgba(var(--color-primary-rgb), 0.1);
  }

  /* Theme toggle - use themed blue instead of yellow in light mode */
  .theme-switch-slider:before {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%) !important;
  }

  /* Impersonation banner visibility for light mode */
  .bg-gradient-to-br.from-blue-500\/20 {
    background: linear-gradient(to bottom right, rgba(37, 99, 235, 0.85), rgba(59, 130, 246, 0.9), rgba(99, 102, 241, 0.85)) !important;
    border-color: rgba(37, 99, 235, 0.6) !important;
  }

  /* Keep impersonation banner text light against blue background */
  .bg-gradient-to-br.from-blue-500\/20 .text-blue-300 {
    color: #bfdbfe !important;
  }

  .bg-gradient-to-br.from-blue-500\/20 .text-white {
    color: #ffffff !important;
  }

  .bg-gradient-to-br.from-blue-500\/20 .text-blue-400 {
    color: #93c5fd !important;
  }

  /* General text-blue overrides for other contexts */
  .text-blue-300:not(.bg-gradient-to-br .text-blue-300) {
    color: #1e40af !important;
  }

  .text-blue-400:not(.bg-gradient-to-br .text-blue-400) {
    color: #2563eb !important;
  }

  /* Inset visibility for dashboard cards - fix bg-white/5 */
  .bg-white\/5 {
    background: rgba(37, 99, 235, 0.06) !important;
    border: 1px solid rgba(37, 99, 235, 0.1);
  }

  .bg-white\/5:hover,
  .hover\:bg-white\/10:hover {
    background: rgba(37, 99, 235, 0.1) !important;
  }
}

/* ============================================ */
/* RESIDENT PORTAL COMPONENTS                  */
/* Text utilities, form labels, list groups,   */
/* rules collapsible, and additional badges    */
/* ============================================ */

/* Text Glass Utilities */
.text-glass-primary {
  color: var(--text-primary);
}

.text-glass-secondary {
  color: var(--text-secondary);
}

.text-glass-muted {
  color: var(--text-muted);
}

/* Form Label Glass */
.form-label-glass {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

/* List Group Glass */
.list-group-glass {
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.list-group-glass .list-group-item {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.list-group-glass .list-group-item:last-child {
  border-bottom: none;
}

.list-group-glass .list-group-item strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Badge Glass Secondary */
.badge-glass-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(156, 163, 175, 0.3);
  background: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
}

/* Button Glass Warning */
.btn-glass-warning {
  padding: 0.625rem 1.5rem;
  background: rgba(245, 158, 11, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 0.75rem;
  font-weight: 500;
  color: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-glass-warning:hover {
  background: rgba(245, 158, 11, 1);
  box-shadow: var(--shadow-glass);
}

.btn-glass-warning:active {
  transform: scale(0.95);
}

/* ============================================ */
/* PARKING RULES COLLAPSIBLE                   */
/* Used on resident dashboard                  */
/* ============================================ */
.rules-collapsible {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.rules-collapsible:hover {
  border-color: var(--glass-border-hover);
}

.rules-summary {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: background 0.2s ease;
  user-select: none;
}

.rules-summary::-webkit-details-marker {
  display: none;
}

.rules-summary::marker {
  display: none;
  content: '';
}

.rules-summary:hover {
  background: var(--glass-bg-hover);
}

.rules-chevron {
  transition: transform 0.3s ease;
  font-size: 0.75rem;
  color: var(--text-muted);
}

details.rules-collapsible[open] .rules-chevron {
  transform: rotate(180deg);
}

.rules-preview {
  font-size: 0.8125rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

@media (max-width: 576px) {
  .rules-preview {
    display: none;
  }
}

details.rules-collapsible[open] .rules-preview {
  display: none;
}

.rules-content {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.1);
}

.rules-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.5rem;
}

.rules-item {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  padding: 0.25rem 0;
}

.rules-item i {
  color: var(--color-primary-light);
  opacity: 0.7;
  width: 1.25rem;
  text-align: center;
}

/* ============================================ */
/* LIGHT MODE: RESIDENT COMPONENT OVERRIDES    */
/* ============================================ */
[data-theme="light"] {
  .text-glass-primary {
    color: var(--text-primary);
  }

  .text-glass-secondary {
    color: var(--text-secondary);
  }

  .text-glass-muted {
    color: var(--text-muted);
  }

  .form-label-glass {
    color: #374151;
  }

  .list-group-glass .list-group-item {
    background: rgba(255, 255, 255, 0.5);
    color: #374151;
  }

  .badge-glass-secondary {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
    color: #475569;
  }

  .rules-collapsible {
    background: rgba(255, 255, 255, 0.5);
  }

  .rules-content {
    background: rgba(0, 0, 0, 0.03);
  }

  .rules-item i {
    color: var(--color-primary);
  }
}

/* ============================================ */
/* RESIDENT PORTAL - SCOPED OVERRIDES          */
/* Matches www resident app sizing/spacing     */
/* Only applies when session nav = resident    */
/* ============================================ */
.resident-portal {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Tighter card rounding */
.resident-portal .glass-card,
.resident-portal .glass-card-hover {
  border-radius: 0.625rem;
}

.resident-portal .card-header {
  border-radius: 0.625rem 0.625rem 0 0 !important;
}

/* Compact buttons matching www sizing */
.resident-portal .btn-glass-primary,
.resident-portal .btn-glass-secondary,
.resident-portal .btn-glass-danger,
.resident-portal .btn-glass-success,
.resident-portal .btn-glass-warning {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.resident-portal .btn-glass-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
}

/* Tighter alerts matching www */
.resident-portal .alert-glass,
.resident-portal .alert-glass-success,
.resident-portal .alert-glass-warning,
.resident-portal .alert-glass-danger,
.resident-portal .alert-glass-info {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
}

/* Compact inputs */
.resident-portal .input-glass,
.resident-portal .select-glass {
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
}

.resident-portal .form-label-glass {
  font-size: 0.8125rem;
}

/* Tighter list groups */
.resident-portal .list-group-glass {
  border-radius: 0.375rem;
}

.resident-portal .list-group-glass .list-group-item {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

/* Tighter rules collapsible */
.resident-portal .rules-collapsible {
  border-radius: 0.375rem;
}

.resident-portal .rules-summary {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
}

.resident-portal .rules-preview {
  font-size: 0.75rem;
}

.resident-portal .rules-content {
  padding: 0.625rem 0.875rem;
}

.resident-portal .rules-grid {
  gap: 0.375rem 1.25rem;
}

.resident-portal .rules-item {
  font-size: 0.8125rem;
  padding: 0.125rem 0;
}

.resident-portal .rules-item i {
  width: 1rem;
  font-size: 0.75rem;
}

/* Table text sizing */
.resident-portal .table-glass th,
.resident-portal .table-glass td {
  font-size: 0.875rem;
}

/* Badge sizing */
.resident-portal .badge-glass-info,
.resident-portal .badge-glass-warning,
.resident-portal .badge-glass-secondary {
  font-size: 0.6875rem;
  padding: 0.2rem 0.625rem;
}

/* Light mode - resident scoped overrides */
[data-theme="light"] .resident-portal .alert-glass,
[data-theme="light"] .resident-portal .alert-glass-success,
[data-theme="light"] .resident-portal .alert-glass-warning,
[data-theme="light"] .resident-portal .alert-glass-danger,
[data-theme="light"] .resident-portal .alert-glass-info {
  font-size: 0.8125rem;
}
