/* ===== ROOT VARIABLES ===== */
:root {
  --sidebar-width: 280px;
  --header-height: 70px;
  
  /* Primary Colors */
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  
  /* Sidebar */
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #3b82f6;
  
  /* Background Colors */
  --header-bg: #ffffff;
  --body-bg: #f1f5f9;
  --content-bg: #f8fafc;
  --card-bg: #ffffff;
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  /* Border and Dividers */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Shadows - Enhanced for modern look */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  
  /* Status Colors */
  --success-color: #10b981;
  --success-light: #d1fae5;
  --warning-color: #f59e0b;
  --warning-light: #fef3c7;
  --danger-color: #ef4444;
  --danger-light: #fee2e2;
  --info-color: #3b82f6;
  --info-light: #dbeafe;
  
  /* Spacing */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===== SIDEBAR STYLES ===== */
.admin-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, #0f172a 100%);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.admin-sidebar::-webkit-scrollbar {
  width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  font-weight: bold;
}

.sidebar-logo-text {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sidebar-menu {
  padding: 1rem;
}

.menu-section-title {
  color: var(--sidebar-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem 0.5rem;
  margin-top: 1.5rem;
  opacity: 0.7;
}

.menu-section-title:first-child {
  margin-top: 0;
}

.sidebar-menu .nav-link {
  color: var(--sidebar-text);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  text-decoration: none;
}

.sidebar-menu .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(4px);
}

.sidebar-menu .nav-link.active {
  background: var(--sidebar-active);
  color: white;
  box-shadow: var(--shadow-md);
}

.sidebar-menu .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

/* Submenu styles */
.sidebar-submenu {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-submenu .nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 400;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--body-bg);
  transition: all 0.3s ease;
}

.main-content {
  flex: 1;
  padding: 2rem;
  background: var(--content-bg);
}

/* ===== HEADER STYLES ===== */
.admin-header {
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: var(--body-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Site Info Section */
.site-info-section {
  flex: 1;
  display: flex;
  align-items: center;
}

.active-site-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  max-width: 400px;
}

.site-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.site-details {
  flex: 1;
  min-width: 0;
}

.site-details h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-details p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search {
  position: relative;
  width: 320px;
}

.header-search input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  background: var(--body-bg);
  transition: all 0.2s ease;
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.header-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Selector */
.language-selector {
  display: flex;
  align-items: center;
}

.language-selector select {
  padding: 0.5rem 2rem 0.5rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: white;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 10px;
}

.language-selector select:hover {
  border-color: var(--primary-color);
  background-color: var(--body-bg);
}

.language-selector select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.125rem;
  position: relative;
  transition: all 0.2s ease;
}

.header-icon-btn:hover {
  background: var(--body-bg);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.header-icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger-color);
  color: white;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 2px solid white;
}

/* User Profile Button */
.user-profile-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-button:hover,
.user-profile-button.active {
  background: var(--body-bg);
  border-color: var(--primary-color);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 120px;
}

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.dropdown-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 0.25rem;
  transition: transform 0.2s ease;
}

.user-profile-button.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* CSS-Only Dropdown */
.user-profile-dropdown {
  position: relative;
}

.dropdown-toggle-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dropdown-toggle-checkbox:checked ~ .user-profile-button {
  background: var(--body-bg);
  border-color: var(--primary-color);
}

.dropdown-toggle-checkbox:checked ~ .user-profile-button .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-toggle-checkbox:checked ~ .profile-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Profile Dropdown */
.profile-dropdown,
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 280px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  padding: 0.5rem;
}

.profile-dropdown.show,
.profile-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header,
.profile-dropdown-header {
  padding: 1rem;
  background: linear-gradient(135deg, var(--body-bg) 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.dropdown-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.dropdown-user-details {
  flex: 1;
  min-width: 0;
}

.dropdown-user-details .fw-semibold {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-details small {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search {
  position: relative;
  width: 320px;
}

.header-search input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  background: var(--body-bg);
  transition: all 0.2s ease;
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.header-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Selector */
.language-selector {
  display: flex;
  align-items: center;
}

.language-selector select {
  padding: 0.5rem 2rem 0.5rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: white;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 10px;
}

.language-selector select:hover {
  border-color: var(--primary-color);
  background-color: var(--body-bg);
}

.language-selector select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.125rem;
  position: relative;
  transition: all 0.2s ease;
}

.header-icon-btn:hover {
  background: var(--body-bg);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.header-icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger-color);
  color: white;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 2px solid white;
}

/* User Profile Button */
.user-profile-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-button:hover,
.user-profile-button.active {
  background: var(--body-bg);
  border-color: var(--primary-color);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 120px;
}

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.dropdown-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 0.25rem;
  transition: transform 0.2s ease;
}

.user-profile-button.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* CSS-Only Dropdown */
.user-profile-dropdown {
  position: relative;
}

.dropdown-toggle-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dropdown-toggle-checkbox:checked ~ .user-profile-button {
  background: var(--body-bg);
  border-color: var(--primary-color);
}

.dropdown-toggle-checkbox:checked ~ .user-profile-button .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-toggle-checkbox:checked ~ .profile-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Profile Dropdown */
.profile-dropdown,
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 280px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  padding: 0.5rem;
}

.profile-dropdown.show,
.profile-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header,
.profile-dropdown-header {
  padding: 1rem;
  background: linear-gradient(135deg, var(--body-bg) 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.dropdown-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.dropdown-user-details {
  flex: 1;
  min-width: 0;
}

.dropdown-user-details .fw-semibold {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-details small {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search {
  position: relative;
  width: 320px;
}

.header-search input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  background: var(--body-bg);
  transition: all 0.2s ease;
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.header-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Selector */
.language-selector {
  display: flex;
  align-items: center;
}

.language-selector select {
  padding: 0.5rem 2rem 0.5rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: white;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 10px;
}

.language-selector select:hover {
  border-color: var(--primary-color);
  background-color: var(--body-bg);
}

.language-selector select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.125rem;
  position: relative;
  transition: all 0.2s ease;
}

.header-icon-btn:hover {
  background: var(--body-bg);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.header-icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger-color);
  color: white;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 2px solid white;
}

/* User Profile Button */
.user-profile-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-button:hover,
.user-profile-button.active {
  background: var(--body-bg);
  border-color: var(--primary-color);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 120px;
}

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.dropdown-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 0.25rem;
  transition: transform 0.2s ease;
}

.user-profile-button.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* CSS-Only Dropdown */
.user-profile-dropdown {
  position: relative;
}

.dropdown-toggle-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dropdown-toggle-checkbox:checked ~ .user-profile-button {
  background: var(--body-bg);
  border-color: var(--primary-color);
}

.dropdown-toggle-checkbox:checked ~ .user-profile-button .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-toggle-checkbox:checked ~ .profile-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Profile Dropdown */
.profile-dropdown,
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 280px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  padding: 0.5rem;
}

.profile-dropdown.show,
.profile-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header,
.profile-dropdown-header {
  padding: 1rem;
  background: linear-gradient(135deg, var(--body-bg) 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.dropdown-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.dropdown-user-details {
  flex: 1;
  min-width: 0;
}

.dropdown-user-details .fw-semibold {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-details small {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  padding: 2rem;
  background: var(--content-bg);
}

/* Page Header */
.page-header {
  background: white;
  padding: 1.5rem 2rem;
  margin: -2rem -2rem 2rem -2rem;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-title i {
  color: var(--primary-color);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
  margin: 0;
}

/* ===== CARDS ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background: var(--body-bg);
  border-top: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Card Variants */
.card-elevated {
  box-shadow: var(--shadow-lg);
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl);
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--border-light);
}

.card-flat:hover {
  box-shadow: var(--shadow-sm);
}

/* Stat Cards */
.stat-card {
  padding: 1.5rem;
  border-radius: var(--border-radius);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.stat-card-icon.primary {
  background: var(--primary-light);
  color: var(--primary-color);
}

.stat-card-icon.success {
  background: var(--success-light);
  color: var(--success-color);
}

.stat-card-icon.warning {
  background: var(--warning-light);
  color: var(--warning-color);
}

.stat-card-icon.danger {
  background: var(--danger-light);
  color: var(--danger-color);
}

.stat-card-icon.info {
  background: var(--info-light);
  color: var(--info-color);
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1;
}

.stat-card-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.stat-card-trend.up {
  color: var(--success-color);
}

.stat-card-trend.down {
  color: var(--danger-color);
}

/* ===== BUTTONS ===== */
.btn {
  padding: 0.625rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center,
  gap: 0.5rem;
  line-height: 1.5;
}

.btn i {
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-secondary {
  background: var(--text-secondary);
  color: white;
}

.btn-secondary:hover {
  background: var(--text-primary);
  color: white;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #059669;
  color: white;
}

.btn-warning {
  background: var(--warning-color);
  color: white;
}

.btn-warning:hover {
  background: #d97706;
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-light {
  background: var(--body-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-light:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color);
}

/* ===== FORMS ===== */
.form-control {
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: white;
  color: var(--text-primary);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
  background: white;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  display: block;
}

.form-select {
  padding: 0.625rem 2.5rem 0.625rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.75rem center/12px 10px;
  transition: all 0.2s ease;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-label {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-left: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.input-group {
  display: flex;
  gap: 0;
}

.input-group .form-control {
  border-radius: 0;
}

.input-group .form-control:first-child {
  border-top-left-radius: var(--border-radius-sm);
  border-bottom-left-radius: var(--border-radius-sm);
}

.input-group .form-control:last-child {
  border-top-right-radius: var(--border-radius-sm);
  border-bottom-right-radius: var(--border-radius-sm);
}

.input-group-text {
  padding: 0.625rem 1rem;
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--text-muted);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Form Validation */
.is-invalid {
  border-color: var(--danger-color);
}

.is-invalid:focus {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 3px var(--danger-light);
}

.invalid-feedback {
  color: var(--danger-color);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

.is-valid {
  border-color: var(--success-color);
}

.is-valid:focus {
  border-color: var(--success-color);
  box-shadow: 0 0 0 3px var(--success-light);
}

.valid-feedback {
  color: var(--success-color);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

/* ===== FOOTER ===== */
.admin-footer {
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.admin-footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.admin-footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content-wrapper {
    margin-left: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .site-info-section {
    flex: 0;
  }

  .active-site-info {
    display: none;
  }

  .admin-header {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .header-search {
    display: none;
  }

  .main-content {
    padding: 1rem;
  }

  .user-info {
    display: none;
  }

  .user-profile-dropdown .user-name,
  .user-profile-dropdown .user-role {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 1rem;
    margin: -1rem -1rem 1rem -1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .site-details h4 {
    font-size: 0.875rem;
  }

  .site-details p {
    font-size: 0.75rem;
  }

  .language-selector select {
    padding: 0.5rem 1.75rem 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 576px) {
  .page-title {
    font-size: 1.25rem;
  }

  .user-profile-button {
    padding: 0.5rem;
    border: none;
    background: transparent;
  }

  .dropdown-arrow {
    display: none;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8125rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card-value {
    font-size: 1.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .card-header {
    padding: 1rem;
    font-size: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
  }

  .metric-item {
    min-width: 100%;
  }

  .info-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-dropdown-menu {
    min-width: 260px;
    right: -0.5rem;
  }
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Print Styles */
@media print {
  .admin-sidebar,
  .admin-header,
  .admin-footer,
  .table-actions,
  .btn,
  button {
    display: none !important;
  }

  .main-content-wrapper {
    margin-left: 0 !important;
  }

  .main-content {
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--body-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Selection Color */
::selection {
  background: var(--primary-light);
  color: var(--primary-color);
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Transitions */
a, button, input, select, textarea {
  transition: all 0.2s ease;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Tooltips Enhancement */
.tooltip {
  font-size: 0.8125rem;
}

.tooltip-inner {
  padding: 0.5rem 0.75rem;
  background: var(--text-primary);
  border-radius: var(--border-radius-sm);
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform 0.2s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}