/*
 * QGradr - Professional Classic Design System
 * Color Palette:
 * - Primary: Deep Navy Blue (#1e3a5f)
 * - Secondary: Gold/Amber (#d4af37)
 * - Accent: Teal (#2dd4bf)
 * - Success: Emerald (#10b981)
 * - Danger: Ruby (#dc2626)
 * - Warning: Amber (#f59e0b)
 *
 * ALTERNATIVE PALETTE (Purple/Cyan Gradient):
 * - Purple Deep: #5409DA / rgb(84, 9, 218)
 * - Purple Blue: #4E71FF / rgb(78, 113, 255)
 * - Sky Blue: #8DD8FF / rgb(141, 216, 255)
 * - Cyan Light: #BBFBFF / rgb(187, 251, 255)
 * To use: Add class "theme-purple" to <html> element
 */

/* ============================================
   CSS VARIABLES - LIGHT & DARK MODE
   ============================================ */

:root {
  /* Primary Colors */
  --color-primary: #1e3a5f;
  --color-primary-light: #2d4a6f;
  --color-primary-dark: #152a45;
  --color-primary-rgb: 30, 58, 95;
  
  /* Secondary/Gold Colors */
  --color-secondary: #d4af37;
  --color-secondary-light: #e4c447;
  --color-secondary-dark: #b8941f;
  --color-secondary-rgb: 212, 175, 55;
  
  /* Accent/Teal Colors */
  --color-accent: #2dd4bf;
  --color-accent-light: #4de4cf;
  --color-accent-dark: #1db9a5;
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-light: #fee2e2;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;
  
  /* Light Mode Backgrounds */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #1e3a5f;
  --bg-header: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-modal-overlay: rgba(30, 58, 95, 0.5);
  
  /* Light Mode Text */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-light: #ffffff;
  --text-sidebar: #cbd5e1;
  --text-sidebar-active: #d4af37;
  
  /* Borders */
  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;
  --border-focus: #d4af37;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(30, 58, 95, 0.05);
  --shadow: 0 4px 6px -1px rgba(30, 58, 95, 0.1), 0 2px 4px -2px rgba(30, 58, 95, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(30, 58, 95, 0.1), 0 4px 6px -4px rgba(30, 58, 95, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(30, 58, 95, 0.1), 0 8px 10px -6px rgba(30, 58, 95, 0.1);
  
  /* Layout */
  --sidebar-width: 280px;
  --header-height: 70px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Dark Mode */
[data-theme="dark"] {
  /* Dark Mode Backgrounds */
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --bg-sidebar: #0f172a;
  --bg-header: #1e293b;
  --bg-hover: #334155;
  --bg-input: #334155;
  --bg-modal-overlay: rgba(0, 0, 0, 0.7);
  
  /* Dark Mode Text */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #ffffff;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #d4af37;
  
  /* Dark Mode Borders */
  --border-color: #334155;
  --border-color-light: #1e293b;
  --border-focus: #d4af37;
  
  /* Dark Mode Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

/* ============================================
   ALTERNATIVE PURPLE/CYAN THEME
   ============================================ */

/* Purple Theme - Light Mode */
.theme-purple {
  /* Purple/Cyan Primary Colors */
  --color-primary: #5409DA;
  --color-primary-light: #6B2DE3;
  --color-primary-dark: #4307B0;
  --color-primary-rgb: 84, 9, 218;
  
  /* Secondary - Purple Blue */
  --color-secondary: #4E71FF;
  --color-secondary-light: #6B8AFF;
  --color-secondary-dark: #3B5CE0;
  --color-secondary-rgb: 78, 113, 255;
  
  /* Accent - Sky Blue to Cyan */
  --color-accent: #8DD8FF;
  --color-accent-light: #BBFBFF;
  --color-accent-dark: #6BC4F0;
  
  /* Semantic Colors - Adjusted for purple theme */
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-light: #fee2e2;
  --color-info: #4E71FF;
  --color-info-light: #E8EEFF;
  
  /* Light Mode Backgrounds - Slightly tinted */
  --bg-body: #F8F7FF;
  --bg-card: #ffffff;
  --bg-sidebar: #5409DA;
  --bg-header: #ffffff;
  --bg-hover: #F0EDFF;
  --bg-input: #ffffff;
  --bg-modal-overlay: rgba(84, 9, 218, 0.5);
  
  /* Light Mode Text */
  --text-primary: #1a0b2e;
  --text-secondary: #5a4a6e;
  --text-muted: #8b7d9e;
  --text-light: #ffffff;
  --text-sidebar: #E8E0FF;
  --text-sidebar-active: #BBFBFF;
  
  /* Borders */
  --border-color: #E0D8F0;
  --border-color-light: #F0EDFF;
  --border-focus: #4E71FF;
  
  /* Shadows - Purple tinted */
  --shadow-sm: 0 1px 2px 0 rgba(84, 9, 218, 0.08);
  --shadow: 0 4px 6px -1px rgba(84, 9, 218, 0.12), 0 2px 4px -2px rgba(84, 9, 218, 0.12);
  --shadow-lg: 0 10px 15px -3px rgba(84, 9, 218, 0.15), 0 4px 6px -4px rgba(84, 9, 218, 0.15);
  --shadow-xl: 0 20px 25px -5px rgba(84, 9, 218, 0.18), 0 8px 10px -6px rgba(84, 9, 218, 0.18);
}

/* Purple Theme - Dark Mode */
.theme-purple[data-theme="dark"] {
  /* Dark Mode Backgrounds */
  --bg-body: #0d0618;
  --bg-card: #1a1030;
  --bg-sidebar: #0d0618;
  --bg-header: #1a1030;
  --bg-hover: #2a1f45;
  --bg-input: #2a1f45;
  --bg-modal-overlay: rgba(0, 0, 0, 0.8);
  
  /* Dark Mode Text */
  --text-primary: #f5f3ff;
  --text-secondary: #c4b8e0;
  --text-muted: #8b7d9e;
  --text-light: #ffffff;
  --text-sidebar: #b8a8d8;
  --text-sidebar-active: #8DD8FF;
  
  /* Dark Mode Borders */
  --border-color: #3a2a55;
  --border-color-light: #1a1030;
  --border-focus: #4E71FF;
  
  /* Dark Mode Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

/* ============================================
   BASE & RESET
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--color-secondary); }

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

/* Spacing */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.p-0 { padding: 0; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-secondary);
  background: var(--bg-card);
  color: var(--color-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow);
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--color-secondary);
  color: var(--color-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Palette Toggle - positioned below theme toggle */
#paletteToggle {
  position: fixed;
  top: 74px !important;
  right: 20px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #1e3a5f, #d4af37);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow);
}

#paletteToggle:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

#paletteToggle svg {
  width: 20px;
  height: 20px;
  color: white;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

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

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 48px 40px;
  text-align: center;
}

.login-logo {
  margin-bottom: 32px;
}

.login-logo img {
  width: 100px;
  height: 100px;
  margin-bottom: 16px;
}

.login-logo h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.login-logo .tagline {
  font-size: 14px;
  color: var(--color-secondary);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.login-form {
  text-align: left;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 15px;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

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

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checkbox-wrapper span {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

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

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.4);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.5);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
  color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

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

.btn-outline:hover:not(:disabled) {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* Error Message */
.alert {
  padding: 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-error {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-left: 4px solid var(--color-danger);
}

.alert-success {
  background: var(--color-success-light);
  color: var(--color-success);
  border-left: 4px solid var(--color-success);
}

.alert-warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
  border-left: 4px solid var(--color-warning);
}

/* Loading Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   LAYOUT - DASHBOARD
   ============================================ */

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition-base);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-header img {
  width: 48px;
  height: 48px;
}

.sidebar-brand {
  color: white;
}

.sidebar-brand h2 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.sidebar-brand p {
  font-size: 11px;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  padding: 12px 24px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  color: var(--text-sidebar);
  transition: all var(--transition-fast);
  cursor: pointer;
  border-left: 3px solid transparent;
  margin: 2px 0;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}

.nav-item.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--text-sidebar-active);
  border-left-color: var(--color-secondary);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item span {
  font-size: 14px;
  font-weight: 500;
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logout-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.header {
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* Header User Menu */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.user-menu {
  position: relative;
}

.user-menu-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.user-menu-button:hover {
  background: var(--bg-hover);
  border-color: var(--color-secondary);
}

.user-menu-button .user-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.user-menu-button .user-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}

.user-menu-dropdown.show {
  display: block;
}

.user-menu-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.user-menu-item:hover {
  background: var(--bg-hover);
  color: var(--color-secondary);
}

.user-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* Content Area */
.content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* ============================================
   CARDS & COMPONENTS
   ============================================ */

.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body {
  padding: 28px;
}

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

.stat-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

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

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.navy { background: rgba(30, 58, 95, 0.1); color: var(--color-primary); }
.stat-icon.gold { background: rgba(212, 175, 55, 0.15); color: var(--color-secondary); }
.stat-icon.teal { background: rgba(45, 212, 191, 0.15); color: var(--color-accent); }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-change {
  font-size: 12px;
  margin-top: 8px;
  font-weight: 600;
}

.stat-change.positive { color: var(--color-success); }
.stat-change.negative { color: var(--color-danger); }

/* ============================================
   TABLES
   ============================================ */

.table-container {
  overflow-x: auto;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 16px 20px;
  text-align: left;
}

.data-table th {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--bg-body);
  border-bottom: 2px solid var(--border-color);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

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

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table td {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(30, 58, 95, 0.1);
  color: var(--color-primary);
}

.badge-secondary {
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-secondary-dark);
}

.badge-success {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.badge-danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 28px;
}

.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--bg-card);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-xl);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  max-width: 420px;
  animation: toastSlideIn 0.4s ease;
  border: 1px solid var(--border-color);
  border-left: 4px solid;
}

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

.toast.error {
  border-left-color: var(--color-danger);
}

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

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

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

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 14px;
}

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

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }
  
  .content {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .header {
    padding: 0 20px;
  }
  
  .content {
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .login-card {
    padding: 36px 24px;
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

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

/* ============================================
   SELECTION STYLING
   ============================================ */

::selection {
  background: var(--color-secondary);
  color: var(--color-primary);
}
