/* IAAUG Sales Management Platform Styles */
/* Brand Colors: #95165c, #F4EEF1, #3E3E3E */

:root {
  /* Light Theme Variables */
  --primary-color: #95165c;
  --secondary-color: #F4EEF1;
  --dark-color: #3E3E3E;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
  --card-bg: #ffffff;
  --navbar-bg: #ffffff;
  --sidebar-bg: #f8f9fa;
  --hover-bg: #e9ecef;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Status colors with good contrast */
  --ok: #16a34a;
  --warn: #e67e22;
  --danger: #ef4444;
  --info: #2563eb;
  
  /* Review Management specific colors */
  --success-bg: #dcfce7;
  --success-border: #16a34a;
  --success-text: #166534;
  --error-bg: #fef2f2;
  --error-border: #dc2626;
  --error-text: #991b1b;
  --warning-bg: #fffbeb;
  --warning-border: #fbbf24;
  --warning-text: #dc2626;
  --text-muted: #6b7280;
  --bg-muted: #f9fafb;
  --info-bg: #f0f9ff;
  --info-border: #3b82f6;
  --info-text: #1e40af;
  
  /* Additional theme colors */
  --surface: var(--bg-primary);
  --surface2: var(--bg-secondary);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
}

/* ========================================= */
/* --- UNIFIED DROPDOWN MENU STYLES (FIXED) --- */
/* ========================================= */

/* 1. Containers for all dropdowns */
.nav-item.dropdown,
.user-menu {
    position: relative;
}

/* 2. Style all dropdown menus consistently (hidden by default) */
.dropdown-menu-nav,
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 220px;
    background-color: var(--card-bg); /* Use correct theme variable */
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 1010;
    list-style: none;
    padding: 0.5rem 0;
}

/* Position main nav dropdowns to the left */
.dropdown-menu-nav {
    left: 0;
}

/* Position user menu dropdown to the right */
.user-menu .dropdown-menu {
    left: auto;
    right: 0;
}

/* 3. DESKTOP BEHAVIOR: Show on hover */
@media (min-width: 769px) {
    .nav-item.dropdown:hover > .dropdown-menu-nav,
    .user-menu:hover > .dropdown-menu {
        display: block;
    }
}

/* 4. CLICK BEHAVIOR (All Devices): Show when JS adds the '.open' class */
.nav-item.dropdown.open > .dropdown-menu-nav,
.user-menu.open > .dropdown-menu {
    display: block;
}

/* 5. Styling for links inside ANY dropdown */
.dropdown-menu-nav li a,
.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary); /* Use correct theme variable */
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: none; /* Resetting single item border */
}
.dropdown-item {
    border-bottom: 1px solid var(--border-color);
}
.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-menu-nav li a:hover,
.dropdown-item:hover {
    background-color: var(--hover-bg);
    color: var(--primary-color);
}

/* 6. User Avatar (Part of the User Menu) */
.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
}
[data-theme="dark"] {
  /* Dark Theme Variables */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #d1d5db; /* Enhanced from #b0b0b0 for better contrast */
  --border-color: #404040;
  --card-bg: #2d2d2d;
  --navbar-bg: #1a1a1a;
  --sidebar-bg: #2d2d2d;
  --hover-bg: #404040;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
  
  /* Status colors with enhanced contrast for dark theme */
  --ok: #22c55e;
  --warn: #f97316;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Review Management specific colors */
  --success-bg: #1a3a24;
  --success-border: #22c55e;
  --success-text: #4ade80;
  --error-bg: #3a1a1a;
  --error-border: #ef4444;
  --error-text: #f87171;
  --warning-bg: #3a2e1a;
  --warning-border: #f97316;
  --warning-text: #fb923c;
  --text-muted: #9ca3af;
  --bg-muted: #374151;
  --info-bg: #1a2a3a;
  --info-border: #3b82f6;
  --info-text: #60a5fa;
  
  /* Additional theme colors */
  --surface: var(--bg-primary);
  --surface2: var(--bg-secondary);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
}

/* Enhanced contrast for KPI cards in dark mode */
[data-theme="dark"] .kpi-title,
[data-theme="dark"] .kpi-sub {
  color: #e5e7eb !important; /* Even lighter for better readability */
}

[data-theme="dark"] .kpi-value {
  color: #ffffff !important; /* Pure white for maximum contrast */
}

[data-theme="dark"] .kpi-card {
  border-color: #555555; /* Slightly lighter border for better definition */
}

/* Enhanced contrast for main dashboard cards in dark mode */
[data-theme="dark"] .stats-grid .card p {
  color: #e5e7eb !important; /* Ensure subtitle text has good contrast */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* Header Styles */
.header {
  background-color: var(--navbar-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 40px;
  width: auto;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Mobile Navigation Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
  background-color: var(--hover-bg);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-item a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.nav-item a:hover {
  background-color: var(--hover-bg);
  color: var(--primary-color);
}

.nav-item.active a {
  background-color: var(--primary-color);
  color: white;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--hover-bg);
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  display: none;
  z-index: 1001;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--hover-bg);
}

.dropdown-item:last-child {
  border-bottom: none;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

/* Modal Styles */
.overlay-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050;
  transition: opacity 0.3s ease;
}

.modal-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  width: auto;
  min-width: 300px;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header .card-title {
  margin: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.close-modal:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

/* Dark mode adjustments for modals */
[data-theme="dark"] .overlay-modal {
  background-color: rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .btn {
  color: #ffffff !important;
}

html[data-theme="dark"] .js-view-salary {
  color: #ffffff !important;
}

html[data-theme="dark"] a {
  color: #ffffff !important;
}

/* Project Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
}

.status-completed {
  background-color: #d1ecf1;
  color: #0c5460;
}

[data-theme="dark"] .status-active {
  background-color: #155724;
  color: #d4edda;
}

[data-theme="dark"] .status-inactive {
  background-color: #721c24;
  color: #f8d7da;
}

[data-theme="dark"] .status-completed {
  background-color: #0c5460;
  color: #d1ecf1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary) !important;
  background-color: var(--bg-secondary);
}

/* Tab buttons in modals */
.tab-btn {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background-color: var(--hover-bg);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #7a1149;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--dark-color);
}

.btn-secondary:hover {
  background-color: #e8dde1;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(149, 22, 92, 0.25);
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.table tbody tr:hover {
  background-color: var(--hover-bg);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Footer */
.footer {
  background-color: var(--navbar-bg);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 2rem 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section p,
.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: inline-block;
  padding: 0.5rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: #7a1149;
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.footer-bottom p { margin-left:auto; margin-right:auto; max-width: 100%; text-align:center; }

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeaa7;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

[data-theme="dark"] .alert-success {
  color: #d4edda;
  background-color: #155724;
  border-color: #0f4419;
}

[data-theme="dark"] .alert-danger {
  color: #f8d7da;
  background-color: #721c24;
  border-color: #5a161c;
}

[data-theme="dark"] .alert-warning {
  color: #fff3cd;
  background-color: #856404;
  border-color: #664d03;
}

[data-theme="dark"] .alert-info {
  color: #d1ecf1;
  background-color: #0c5460;
  border-color: #094349;
}

/* Utility Classes for Mobile */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

.mobile-stack {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.mobile-full-width {
  width: auto;
}

.mobile-center {
  text-align: left;
}

.mobile-hide {
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-content {
    padding: 1.5rem;
  }
  
  .navbar {
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Mobile Navigation */
  .mobile-menu-toggle {
    display: block;
  }
  
  .navbar {
    flex-wrap: wrap;
    padding: 1rem;
  }
  
  .logo-section {
    flex: 1;
  }
  
  .nav-menu {
    flex-direction: column;
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-menu.mobile-hidden {
    display: none;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-item a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
  }
  
  .user-menu {
    width: 100%;
  }
  
  .user-avatar {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.375rem;
  }
  
  .dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
  }
  
  /* Main Content */
  .main-content {
    padding: 1rem;
  }
  
  .page-header {
    margin-bottom: 1.5rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  /* Cards and Grids */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-footer {
    padding: 1rem;
  }
  
  /* Tables */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table {
    min-width: 600px;
    font-size: 0.875rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
    white-space: nowrap;
  }
  
  /* Buttons */
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
  
  /* Forms */
  .form-control {
    padding: 0.625rem;
    font-size: 0.9rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  /* Dashboard specific */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  /* Contact actions */
  .contact-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .contact-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Utility Classes for Mobile */
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
  
  .mobile-stack {
    flex-direction: column !important;
    gap: 1rem;
  }
  
  .mobile-full-width {
    width: 100% !important;
  }
  
  .mobile-center {
    text-align: center !important;
  }
  
  .mobile-hide {
    display: none !important;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .main-content {
    padding: 0.75rem;
  }
  
  .navbar {
    padding: 0.75rem;
  }
  
  .logo {
    height: 32px;
  }
  
  .brand-text {
    font-size: 1.25rem;
  }
  
  .page-title {
    font-size: 1.25rem;
  }
  
  .page-subtitle {
    font-size: 0.9rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .card-header {
    padding: 0.75rem;
  }
  
  .card-footer {
    padding: 0.75rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .form-control {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  .table {
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.375rem;
  }
  
  /* Hide less important columns on very small screens */
  .table .hide-mobile {
    display: none;
  }
  
  /* Stack form elements vertically */
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-row .form-group {
    width: 100%;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .btn-sm {
    min-height: 36px;
    min-width: 36px;
  }
  
  .form-control {
    min-height: 44px;
  }
  
  .nav-item a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .user-avatar {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Improved focus states for mobile */
@media (max-width: 768px) {
  .form-control:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease;
  }
  
  .btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}
/* ========================================= */
/* --- FIX FOR CLICKABLE MOBILE MENUS --- */
/* ========================================= */

/* This rule allows JavaScript to open the main navigation menus by adding an "open" class. */
/* It works alongside your existing :hover rule for desktops. */
.nav-item.dropdown.open > .dropdown-menu-nav {
    display: block;
}

/* This allows JavaScript to open the user profile menu by adding an "open" class. */
.user-menu.open > .dropdown-menu {
    display: block;
}

/* On mobile, this ensures the sub-menu items are indented correctly when opened. */
@media (max-width: 768px) {
    .dropdown-menu-nav li a {
        padding-left: 2rem !important;
    }
}
