/* Google Font Import - Must be at the top */
@import url('https://fonts.googleapis.com/css2?family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap');

/* AdminJS Inspired Modern Theme */
:root {
  /* AdminJS Color Palette */
  --primary: #1c84ee;
  --primary-dark: #0d6efd;
  --primary-light: #6ea8fe;
  --secondary: #5d7186;
  --success: #22c55e;
  --warning: #f9b931;
  --danger: #ef5f5f;
  --info: #4ecac2;
  --purple: #7f56da;
  --pink: #ff86c8;
  --orange: #ff6c2f;
  --indigo: #53389f;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #eef2f7;
  --bg-dark: #22282e;
  
  /* Text Colors */
  --text-primary: #5d7186;
  --text-secondary: #8486a7;
  --text-muted: #b0b0bb;
  --text-dark: #323a46;
  
  /* Border Colors */
  --border-light: #eaedf1;
  --border-medium: #d8dfe7;
  
  /* Shadows */
  --shadow-sm: 0px 3px 4px 0px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 5px 10px rgba(30, 32, 37, 0.12);
  
  /* Border Radius */
  --radius-sm: 0.2rem;
  --radius-md: 0.3rem;
  --radius-lg: 0.5rem;
  
  /* Transitions */
  --transition: all 0.2s ease-in-out;
  
  /* Font */
  --font-family: 'Wix Madefor Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body { 
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

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

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

input, button, select, textarea { 
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.875rem;
}

input:focus, button:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 0.15rem rgba(28, 132, 238, 0.25);
}

button { 
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
}

button:hover { 
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.15);
}

table { 
  border-collapse: collapse; 
  width: 100%;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td { 
  border: none;
  padding: 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:hover {
  background: var(--bg-secondary);
}

/* AdminJS Layout Structure */
.wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  min-height: 100vh;
}

/* Force styles for PJAX loaded content */
.page-content * {
  box-sizing: border-box;
}

.page-content .card {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: var(--transition) !important;
}

.page-content .card:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px) !important;
}

.page-content .card-header {
  background: var(--bg-tertiary) !important;
  border-bottom: 1px solid var(--border-light) !important;
  padding: 1rem 1.25rem !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.page-content .card-body {
  padding: 1.25rem !important;
}

.page-content .form-control {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem !important;
  transition: var(--transition) !important;
  color: var(--text-primary) !important;
}

.page-content .form-control:focus {
  background: var(--bg-primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.15rem rgba(28, 132, 238, 0.25) !important;
  color: var(--text-primary) !important;
}

.page-content .form-select {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem !important;
  transition: var(--transition) !important;
  color: var(--text-primary) !important;
}

.page-content .form-select:focus {
  background: var(--bg-primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.15rem rgba(28, 132, 238, 0.25) !important;
  color: var(--text-primary) !important;
}

.page-content .btn {
  border-radius: var(--radius-md) !important;
  font-weight: 500 !important;
  padding: 0.75rem 1.5rem !important;
  font-size: 0.875rem !important;
  transition: var(--transition) !important;
  border: none !important;
}

.page-content .btn-primary {
  background: var(--primary) !important;
  color: white !important;
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1) !important;
}

.page-content .btn-primary:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.15) !important;
}

.page-content .table {
  border-collapse: collapse !important;
  width: 100% !important;
  background: var(--bg-primary) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm) !important;
}

.page-content .table th,
.page-content .table td {
  border: none !important;
  padding: 0.85rem !important;
  text-align: left !important;
  border-bottom: 1px solid var(--border-light) !important;
}

.page-content .table th {
  background: var(--bg-tertiary) !important;
  font-weight: 600 !important;
  color: var(--text-dark) !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.page-content .table tbody tr:hover {
  background: var(--bg-secondary) !important;
}

/* Main Navigation (Sidebar) */
.main-nav {
  top: 0;
  bottom: 0;
  z-index: 1010;
  margin-left: 0;
  position: fixed;
  transition: all 0.3s ease-in-out;
  width: 280px;
  background: var(--bg-primary);
  min-width: 280px;
  padding-bottom: 1.25rem;
  box-shadow: var(--shadow-lg);
  border-right: 1px solid var(--border-light);
}

/* Logo Box */
.logo-box {
  position: sticky;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease-in-out;
  line-height: 70px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-primary);
}

.logo-box img {
  max-height: 40px;
  width: auto;
}

/* Navigation Menu */
.navbar-nav {
  padding: 0.5rem 0;
}

.nav-item {
  padding: 0;
}

.nav-link {
  display: flex;
  gap: 12px;
  line-height: 1;
  font-weight: 400;
  align-items: center;
  white-space: nowrap;
  transition: all 0.3s ease-in-out;
  color: var(--text-primary);
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.nav-link.active {
  font-weight: 500;
  border-left-color: var(--primary);
  background-color: rgba(28, 132, 238, 0.1);
  color: var(--primary);
}

.nav-link:hover {
  color: var(--primary);
  background-color: rgba(28, 132, 238, 0.05);
  text-decoration: none;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  width: 20px;
}

/* Menu Title */
.menu-title {
  cursor: default;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.6;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: all 0.3s ease-in-out;
  height: 28px;
  margin: 0;
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 280px;
  z-index: 1000;
  height: 70px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  transition: all 0.3s ease-in-out;
}

/* Main Content */
.page-content {
  position: relative;
  transition: all 0.3s ease-in-out;
  min-height: calc(100vh - 70px);
  padding: 1.5rem;
  margin-left: 280px;
  margin-top: 70px;
}

/* Cards */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-body {
  padding: 1.25rem;
}

/* Statistics Cards */
.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  transition: var(--transition);
  height: 100%;
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 0 0;
  font-weight: 500;
}

/* Avatar for Icons */
.avatar-md {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.bg-opacity-10 {
  opacity: 0.1;
}

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

/* Form Elements */
.form-control {
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition: var(--transition);
  color: var(--text-primary);
}

.form-control:focus {
  background: var(--bg-primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.15rem rgba(28, 132, 238, 0.25);
  color: var(--text-primary);
}

.form-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition: var(--transition);
  color: var(--text-primary);
}

.form-select:focus {
  background: var(--bg-primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.15rem rgba(28, 132, 238, 0.25);
  color: var(--text-primary);
}

.form-label {
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.15);
}

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

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

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

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

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

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

/* Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
}

.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-info { background-color: var(--info) !important; }
.bg-secondary { background-color: var(--secondary) !important; }

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-warning {
  background: rgba(249, 185, 49, 0.1);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background: rgba(239, 95, 95, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-info {
  background: rgba(78, 202, 194, 0.1);
  color: var(--info);
  border-left: 4px solid var(--info);
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.875rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.625rem;
  line-height: 1.4;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* Dark Mode Styles */
[data-bs-theme="dark"] {
  --bg-primary: #1a1d29 !important;
  --bg-secondary: #161b22 !important;
  --bg-tertiary: #21262d !important;
  --bg-dark: #0d1117 !important;
  
  --text-primary: #e6edf3 !important;
  --text-secondary: #8b949e !important;
  --text-muted: #6e7681 !important;
  --text-dark: #f0f6fc !important;
  
  --border-light: #30363d !important;
  --border-medium: #21262d !important;
  
  --shadow-sm: 0px 3px 4px 0px rgba(0, 0, 0, 0.3) !important;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3) !important;
  --shadow-lg: 0 5px 10px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .main-nav {
  background: var(--bg-primary) !important;
  border-right-color: var(--border-light) !important;
}

[data-bs-theme="dark"] .logo-box {
  background: var(--bg-primary) !important;
  border-bottom-color: var(--border-light) !important;
}

[data-bs-theme="dark"] .topbar {
  background: var(--bg-primary) !important;
  border-bottom-color: var(--border-light) !important;
}

[data-bs-theme="dark"] .page-content {
  background: var(--bg-secondary) !important;
}

[data-bs-theme="dark"] .card {
  background: var(--bg-primary) !important;
  border-color: var(--border-light) !important;
}

[data-bs-theme="dark"] .card-header {
  background: var(--bg-tertiary) !important;
  border-bottom-color: var(--border-light) !important;
}

[data-bs-theme="dark"] .stat-card {
  background: var(--bg-primary) !important;
  border-color: var(--border-light) !important;
}

[data-bs-theme="dark"] .form-control {
  background: var(--bg-primary) !important;
  border-color: var(--border-medium) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .form-control:focus {
  background: var(--bg-primary) !important;
  border-color: var(--primary) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .form-select {
  background: var(--bg-primary) !important;
  border-color: var(--border-medium) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .form-select:focus {
  background: var(--bg-primary) !important;
  border-color: var(--primary) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .table {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .table th {
  background: var(--bg-tertiary) !important;
  color: var(--text-dark) !important;
  border-bottom-color: var(--border-light) !important;
}

[data-bs-theme="dark"] .table td {
  border-bottom-color: var(--border-light) !important;
}

[data-bs-theme="dark"] .table tbody tr:hover {
  background: var(--bg-secondary) !important;
}

[data-bs-theme="dark"] .nav-link {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .nav-link:hover {
  color: var(--primary) !important;
  background-color: rgba(28, 132, 238, 0.1) !important;
}

[data-bs-theme="dark"] .nav-link.active {
  color: var(--primary) !important;
  background-color: rgba(28, 132, 238, 0.15) !important;
}

[data-bs-theme="dark"] .menu-title {
  color: var(--text-secondary) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    margin-left: -280px;
  }
  
  .page-content {
    margin-left: 0;
  }
  
  .topbar {
    left: 0;
  }
  
  .sidebar-enable .main-nav {
    margin-left: 0;
    z-index: 1055;
  }
}



/* Toast notifications */
.toast-container{position:fixed;z-index:1055;right:16px;bottom:16px;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast{min-width:280px;max-width:400px;padding:12px 16px;border-radius:8px;color:#fff;box-shadow:0 6px 20px rgba(0,0,0,.2);display:flex;align-items:center;gap:10px;pointer-events:all;font-size:14px;line-height:1.5}
.toast-success{background:#198754}
.toast-error{background:#dc3545}
.toast-info{background:#0d6efd}
.toast-warning{background:#ff9800}
.toast-icon{font-size:18px;font-weight:bold;flex-shrink:0}
.toast-message{flex:1;word-break:break-word}
.toast-close{all:unset;cursor:pointer;font-size:20px;line-height:1;opacity:.7;padding:0 4px;flex-shrink:0}
.toast-close:hover{opacity:1}

/* Toast animations */
.toast.animate-in{animation:slideInRight .3s ease-out}
.toast.animate-out{animation:slideOutRight .3s ease-in;opacity:0}

@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}
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

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

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Modern Cards */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: none;
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.card-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
}

/* Modern Form Elements */
.form-control {
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
  background: var(--bg-primary);
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* Modern Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--primary);
  color: white;
}

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

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

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

.badge-secondary {
  background: var(--secondary);
  color: white;
}

/* Modern Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  border: none;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border-left: 4px solid var(--success);
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border-left: 4px solid var(--info);
}

/* Modern Images */
.img-cover {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

/* Dark mode */
[data-theme="dark"] body{background:#0b1220;color:#e5e7eb}
[data-theme="dark"] .card{background:#111827;box-shadow:none;border:1px solid #1f2937}
[data-theme="dark"] .table thead th{background:#111827}

/* Skeleton */
.skeleton{background:linear-gradient(90deg,#eee,#f6f6f6,#eee);background-size:200% 100%;animation:sh 1.2s infinite;min-height:14px;border-radius:8px}
@keyframes sh{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Modern Sidebar Layout */
:root {
  --sidebar-width: 280px;
  --topbar-height: 70px;
}

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

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.sidebar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
}

.sidebar-nav {
  padding: 1.5rem 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background: var(--bg-secondary);
  color: var(--primary);
  border-left-color: var(--primary);
  transform: translateX(4px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-left-color: var(--primary-dark);
}

.sidebar-link i {
  font-size: 1.125rem;
  width: 20px;
  text-align: center;
}

.sidebar-section-title {
  padding: 0.75rem 1.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.sidebar-divider {
  margin: 1rem 0;
  border-top: 1px solid var(--border-light);
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 999;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 2rem;
  flex: 1;
  min-height: calc(100vh - var(--topbar-height));
  background: transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .topbar {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar-header {
    padding: 1.5rem 1rem;
  }
  
  .sidebar-link {
    padding: 0.75rem 1rem;
  }
}

/* Modern Page Headers */
.page-header {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

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

/* Modern Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

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

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0.5rem 0 0 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

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