/* ===== ELEGANT EXAM PLATFORM THEME ===== */

/* Modern Color Palette */
:root {
  /* Primary Colors */
  --primary: #6366f1;           /* Modern indigo */
  --primary-dark: #4f46e5;     /* Darker indigo */
  --primary-light: #a5b4fc;    /* Light indigo */
  --primary-bg: #eef2ff;       /* Very light indigo background */
  
  /* Accent Colors */
  --accent: #f59e0b;           /* Warm amber */
  --accent-dark: #d97706;      /* Darker amber */
  --success: #10b981;          /* Emerald green */
  --warning: #f59e0b;          /* Amber */
  --danger: #ef4444;           /* Red */
  --info: #3b82f6;             /* Blue */
  
  /* Neutral Colors */
  --bg-primary: #ffffff;       /* Pure white */
  --bg-secondary: #f8fafc;     /* Very light gray */
  --bg-tertiary: #f1f5f9;      /* Light gray */
  --text-primary: #1e293b;     /* Dark slate */
  --text-secondary: #64748b;   /* Medium slate */
  --text-muted: #94a3b8;       /* Light slate */
  --border: #e2e8f0;           /* Light border */
  --border-light: #f1f5f9;     /* Very light border */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  --gradient-success: linear-gradient(135deg, var(--success) 0%, #059669 100%);

  /* Aliases (compat for older selectors) */
  --primary-color: var(--primary);
  --accent-color: var(--accent);
  --text-color: var(--text-primary);
  --light-gray: var(--bg-tertiary);
}

/* ===== BASE STYLES ===== */
body {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  font-weight: 400;
}

/* ===== NAVIGATION ===== */
.navbar {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary) !important;
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--primary-dark) !important;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary) !important;
}

.dropdown-menu {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
}

.dropdown-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ===== BUTTONS ===== */
.btn {
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  border: none;
  padding: 0.625rem 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 {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

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

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
  color: white;
}

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

.btn-warning:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  color: white;
}

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

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  color: white;
}

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

.btn-light:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

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

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

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

.btn-outline-danger:hover {
  background: var(--danger);
  color: white;
  transform: translateY(-1px);
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

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

.card-body {
  padding: 1.5rem;
}

.card.feature {
  border: 0;
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
}

/* ===== TABLES ===== */
.table {
  background: var(--bg-primary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead th {
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--text-primary);
  padding: 1rem 0.75rem;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

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

.table-responsive {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ===== FORMS ===== */
.form-control {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--bg-primary);
  width: 100%;
}


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

/* Select2: prevent truncation and ensure proper sizing (base theme) */
.select2, .select2-container { width: 100% !important; }
.select2-container .select2-selection--single {
  min-height: 38px;
  height: auto !important;
  display: flex;
  align-items: center;
}
.select2-container .select2-selection--single .select2-selection__rendered {
  white-space: normal !important; /* override base ellipsis */
  text-overflow: clip !important;
  overflow: visible !important;
  word-break: break-word;
  line-height: 1.3;
}

/* Prevent ellipsis on selects (ensure full text is shown in the field) */
select.form-control {
  text-overflow: clip !important;
  white-space: normal !important;
}


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

.form-control-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* ===== BADGES ===== */
.badge {
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.75rem;
}

.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(--text-muted);
  color: white;
}

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

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

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success);
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger);
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid var(--info);
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

.hero .btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
}

.hero .btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 2rem 0;
  margin-top: 3rem;
}

/* ===== UTILITIES ===== */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.small-muted { color: var(--text-muted); font-size: 0.875rem; }

.bg-primary { background: var(--primary) !important; }
.bg-light { background: var(--bg-tertiary) !important; }

.border-primary { border-color: var(--primary) !important; }
.border-light { border-color: var(--border-light) !important; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 0;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
  }
}

/* ===== STUDENT DASHBOARD STYLES ===== */

/* Page Header */
.page-header {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.page-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
}

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

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
}

/* Dashboard Cards */
.dashboard-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.card-header-modern {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.card-header-modern h5 {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.card-body-modern {
  padding: 2rem;
}

/* Elegant Table Styles */
.table-elegant {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table-elegant thead th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border: none;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.table-elegant thead th:first-child {
  border-top-left-radius: var(--radius);
}

.table-elegant thead th:last-child {
  border-top-right-radius: var(--radius);
}

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

.table-elegant tbody tr:hover {
  background: var(--bg-secondary);
  transform: scale(1.01);
}

.table-elegant tbody td {
  padding: 1.25rem;
  border: none;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

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

/* Table Content Styling */
.exam-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.exam-window {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.window-start, .window-end {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.window-separator {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

.exam-date {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.duration-badge, .marks-badge {
  background: var(--primary-bg);
  color: var(--primary);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
}

.best-score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.percentage {
  font-weight: 700;
  color: var(--success);
  font-size: 1rem;
}

.score-detail {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.no-score {
  color: var(--text-muted);
  font-size: 1.25rem;
}

.score-fraction {
  font-weight: 600;
  color: var(--text-primary);
}

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

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

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

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

/* Gradient Buttons */
.btn-gradient {
  background: var(--gradient-primary);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

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

.btn-outline-gradient {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.btn-outline-gradient:hover {
  background: var(--gradient-primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-1px);
}

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

.empty-state i {
  opacity: 0.5;
  margin-bottom: 1rem;
}

/* Pagination Wrapper */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.pagination-wrapper .pagination {
  margin: 0;
}

.pagination-wrapper .page-link {
  color: var(--primary);
  border-color: var(--border);
  padding: 0.5rem 0.75rem;
}

.pagination-wrapper .page-link:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
}

.pagination-wrapper .page-item.active .page-link {
  background: var(--gradient-primary);
  border-color: var(--primary);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.dashboard-card {
  animation: fadeIn 0.5s ease-out;
}

.table-elegant tbody tr {
  animation: fadeIn 0.3s ease-out;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Mobile breakpoints */
@media (max-width: 768px) {
  /* Page Header Mobile */
  .page-header {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .page-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  /* Dashboard Cards Mobile */
  .dashboard-card {
    margin-bottom: 1rem;
    border-radius: var(--radius);
  }
  
  .card-header-modern {
    padding: 1rem 1.5rem;
  }
  
  .card-body-modern {
    padding: 1rem;
  }
  
  /* Mobile Table - Convert to Cards */
  .table-responsive {
    border: none;
    overflow: visible;
  }
  
  .table-elegant {
    display: none; /* Hide table on mobile */
  }
  
  /* Mobile Card Layout for Table Data */
  .mobile-exam-cards {
    display: block;
  }
  
  .mobile-exam-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
  }
  
  .mobile-exam-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
  }
  
  .mobile-exam-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
  }
  
  .mobile-exam-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    flex: 1;
    margin-right: 1rem;
  }
  
  .mobile-exam-action {
    flex-shrink: 0;
  }
  
  .mobile-exam-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .mobile-detail-item {
    display: flex;
    flex-direction: column;
  }
  
  .mobile-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
  }
  
  .mobile-detail-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
  }
  
  .mobile-window-dates {
    font-size: 0.8rem;
    color: var(--text-secondary);
  }
  
  .mobile-best-score {
    text-align: center;
    grid-column: span 2;
  }
  
  .mobile-best-score .percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
  }
  
  .mobile-best-score .score-detail {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
  }
  
  /* Mobile Buttons */
  .btn-gradient, .btn-outline-gradient {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Empty State Mobile */
  .empty-state {
    padding: 2rem 1rem;
  }
  
  .empty-state i {
    font-size: 2.5rem;
  }
  
  /* Pagination Mobile */
  .pagination-wrapper {
    padding: 1rem 0;
  }
  
  .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .page-header {
    padding: 1rem;
  }
  
  .page-header .d-flex {
    flex-direction: column;
    text-align: center;
  }
  
  .page-icon {
    margin-bottom: 1rem;
    margin-right: 0 !important;
  }
  
  .card-header-modern {
    padding: 1rem;
  }
  
  .card-body-modern {
    padding: 1rem;
  }
  
  .mobile-exam-details {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .mobile-best-score {
    grid-column: span 1;
  }
  
  .mobile-exam-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .mobile-exam-title {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

/* ===== CUSTOM COMPONENTS ===== */
.stats-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.stats-card h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.page-header {
  background: var(--bg-primary);
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  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.125rem;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    /* Ensure solid background even if custom properties fail */
    background-color: var(--primary-dark);
    background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    z-index: 1040;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.show {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0.5rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin: 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.25);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff !important;
    border-left-color: var(--accent-color);
}

.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff !important;
    border-left-color: var(--accent-color);
    font-weight: 700;
}

.sidebar-nav .nav-link i {
    color: #ffffff !important;
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: var(--light-gray);
    color: var(--primary-color);
}

/* Main Content with Sidebar */
.main-content {
    padding-top: 76px;
    min-height: calc(100vh - 76px);
    transition: margin-left 0.3s ease;
}

.main-content.with-sidebar {
    margin-left: 0;
}

/* Enhanced User Profile in Navbar */
.user-avatar {
    color: var(--primary-color);
}

.user-info .user-name {
    font-weight: 500;
    color: var(--text-color);
}

.user-info .user-role {
    font-size: 0.75rem;
    line-height: 1;
}

.dropdown-header {
    padding: 0.75rem 1rem;
    background: var(--light-gray);
}

/* Fixed Navbar Adjustments */
.navbar.fixed-top {
    z-index: 1050;
}

/* Import form input-group alignment (Bootstrap 4) */
#question-import-form .input-group .custom-file {
    flex: 1 1 auto;
}
#question-import-form .input-group .custom-file-input,
#question-import-form .input-group .custom-file-label {
    height: calc(2.25rem + 2px);
}
#question-import-form .input-group .custom-file-label {
    padding: .375rem .75rem;
    line-height: 1.5;
}
#question-import-form .input-group .btn {
    height: calc(2.25rem + 2px);
    display: inline-flex;
    align-items: center;
}

/* Responsive Sidebar */
@media (min-width: 992px) {
    .sidebar {
        left: 0;
        position: fixed;
    }
    
    .main-content.with-sidebar {
        margin-left: 280px;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar-overlay {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        left: -280px;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content.with-sidebar {
        margin-left: 0;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .user-info {
        display: none;
    }
}
