/* =================================
   🎮 GAMING ADMIN COMPONENTS
   ================================= */

/* Import expandable admin styles - Style sobre compatible */
@import url('./expandable-admin.css');

/* =================================
   📊 USERS ADMIN STATS & FILTERS
   ================================= */

/* Users Stats Bar (Crackme Contest Style) */
.users-stats-bar {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(10, 29, 49, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 3px;
}

.users-stats-bar .stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.users-stats-bar .stat-label {
  color: var(--text-muted);
  font-size: 14px;
}

.users-stats-bar .stat-value {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
}

/* Auto-refresh indicator */
.auto-refresh-indicator {
  opacity: 0.7;
}

.auto-refresh-indicator .stat-label {
  color: var(--text-muted);
  font-size: 12px;
}

.auto-refresh-indicator .stat-value {
  color: #666;
  font-size: 14px;
  font-weight: normal;
}


/* ===================================
   MODERN ADMIN TABLE - x0ne Charter
   Minimaliste, sobre, classe
   =================================== */

/* Base Table Styles */
.admin-table, 
table.admin-table,
.modern-table,
#usersTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--x0ne-font-mono);
  font-size: 0.75rem;
  table-layout: auto;
}

/* Users table - fixed layout with compact columns */
#usersTable {
  table-layout: auto;
}

#usersTable th,
#usersTable td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.5rem 0.4rem;
}

/* Table Headers - Ultra minimal */
.admin-table thead th,
.modern-table thead th,
#usersTable thead th {
  font-family: var(--x0ne-font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(74, 144, 217, 0.15);
  background: transparent;
}

/* Table Body Cells */
.admin-table tbody td,
.modern-table tbody td,
#usersTable tbody td {
  padding: 0.6rem 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

/* Table Rows */
.admin-table tbody tr,
.modern-table tbody tr,
#usersTable tbody tr {
  transition: background 0.15s ease;
}

.admin-table tbody tr:hover,
.modern-table tbody tr:hover,
#usersTable tbody tr:hover {
  background: rgba(74, 144, 217, 0.04);
}

/* Legacy font rules for compatibility */
.quiz-toggle-table,
.quiz-toggle-table *,
#students-table,
#table_id {
  font-family: 'Fira Code', monospace !important;
  font-size: 13px !important;
}

.quiz-toggle-table thead th,
#students-table thead th,
#table_id thead th {
  font-family: 'Fira Code', monospace !important;
  font-size: 12px !important;
  letter-spacing: 0.5px !important;
  font-weight: 600 !important;
}

/* DataTables Elements */
.dataTables_wrapper,
.dataTables_wrapper *,
.dataTables_info,
.dataTables_paginate,
.dataTables_length,
.dataTables_filter input {
  font-family: 'Fira Code', monospace !important;
}


.user-row {
  font-family: var(--x0ne-font-mono);
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

/* Student Cell - Consolidated view */
.student-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}

.student-cell .username-cell {
  font-size: 0.8rem;
  font-weight: 500;
}

.student-cell .student-name {
  color: var(--text-color);
  font-size: 0.85rem;
}

.student-cell .student-email {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
}

.student-github {
  color: rgba(74, 222, 128, 0.6);
  text-decoration: none;
  font-size: 0.75rem;
}

.student-github:hover {
  color: rgba(74, 222, 128, 0.9);
}

/* Role badges - minimal */
.role-badge {
  font-size: 0.6rem;
  text-transform: lowercase;
}

.role-admin {
  color: rgba(250, 204, 21, 0.8);
}

.role-teacher {
  color: rgba(168, 85, 247, 0.8);
}

.text-muted {
  color: rgba(255, 255, 255, 0.3);
}

/* Username colored by completion level */
.username-cell {
  font-size: 0.75rem;
  text-decoration: none;
}

a.username-cell:hover {
  text-decoration: underline;
}

.username-cell.level-0 { color: rgba(248, 113, 113, 0.8); }
.username-cell.level-1 { color: rgba(147, 51, 234, 0.8); }
.username-cell.level-2 { color: rgba(250, 204, 21, 0.8); }
.username-cell.level-3 { color: rgba(74, 144, 217, 0.8); }
.username-cell.level-4 { color: rgba(74, 222, 128, 0.9); }

/* Email cell */
.email-cell {
  color: rgba(74, 144, 217, 0.7);
  font-size: 0.7rem;
}

.user-status-indicators {
  display: flex;
  gap: 5px;
  align-items: center;
}

.status-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
  text-decoration: none;
}

.status-indicator.verified {
  background: var(--neon-green); /* #28a745 */
  color: white;
}

.status-indicator.unverified {
  background: var(--error-color); /* #dc3545 */
  color: white;
}

.status-indicator.team {
  background: var(--color-info); /* #17a2b8 */
  color: white;
}

.status-indicator.github {
  background: var(--neon-purple); /* #6f42c1 */
  color: white;
}

/* User Row Expandable System (like admin classes) */
.expandable-user-row {
  transition: all 0.3s ease;
}

.expandable-user-row.expanded {
  background: var(--x0ne-bg-light) !important;
  border-bottom: 1px solid var(--x0ne-primary) !important;
}

/* Clickable Row Styling */
.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--x0ne-bg-30) !important;
}


/* ===================================
   USER EXPAND PANEL (Profile Pattern)
   =================================== */

.user-details-row {
  background: transparent !important;
  border-top: none !important;
  display: none;
}

.user-expand-panel {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Two Column Grid (like /profile) */
.expand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.expand-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Field Row (label: value) */
.expand-field {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.expand-field:last-child {
  border-bottom: none;
}

.expand-field label {
  color: var(--text-muted);
  font-size: 0.75rem;
  min-width: 70px;
  flex-shrink: 0;
}

.expand-value {
  color: var(--text-color);
  font-size: 0.8rem;
}

.expand-value.primary {
  color: var(--primary-color);
  font-weight: 500;
}

.expand-value .muted {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Badge */
.expand-badge {
  font-size: 0.65rem;
  padding: 0.15em 0.5em;
  border-radius: 2px;
  text-transform: lowercase;
}

.expand-badge.verified {
  background: rgba(74, 222, 128, 0.15);
  color: rgba(74, 222, 128, 0.9);
}

.expand-badge.unverified {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.expand-badge.verified {
  background: rgba(74, 144, 217, 0.08);
  color: rgba(74, 144, 217, 0.7);
  border: 1px solid rgba(74, 144, 217, 0.15);
}

.expand-badge.admin {
  background: rgba(168, 85, 247, 0.12);
  color: rgba(168, 85, 247, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.expand-badge.student {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.expand-badge.team {
  background: rgba(34, 197, 94, 0.1);
  color: rgba(34, 197, 94, 0.85);
  border: 1px solid rgba(34, 197, 94, 0.2);
  margin-right: 0.3rem;
}

.expand-badge.team small {
  opacity: 0.5;
  font-size: 0.55rem;
}

.badge-team {
  background: rgba(34, 197, 94, 0.1);
  color: rgba(34, 197, 94, 0.85);
  border-color: rgba(34, 197, 94, 0.2);
}

.teams-cell {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* Value modifiers */
.profile-field .value.primary {
  color: var(--primary-color);
}

.profile-field .value.muted {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Select styling for inline edit */
select.profile-editable-input,
select.profile-select {
  font-family: var(--font-mono);
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: inherit;
  font-size: 0.8rem;
  padding: 2px 4px;
  cursor: pointer;
  text-align: right;
  text-align-last: right;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select.profile-editable-input:hover,
select.profile-select:hover {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

select.profile-editable-input:focus,
select.profile-select:focus {
  outline: none;
  border-bottom-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.03);
}

select.profile-editable-input option,
select.profile-select option {
  background: var(--x0ne-bg-secondary);
  color: var(--text-color);
}

/* Number input styling for inline edit */
input[type="number"].profile-editable-input,
input[type="number"].profile-number {
  font-family: var(--font-mono);
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: inherit;
  font-size: 0.8rem;
  padding: 2px 4px;
  width: 60px;
  text-align: right;
  -moz-appearance: textfield;
}

input[type="number"].profile-editable-input::-webkit-outer-spin-button,
input[type="number"].profile-editable-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"].profile-editable-input:hover {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

input[type="number"].profile-editable-input:focus {
  outline: none;
  border-bottom-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.03);
}

.quota-unit {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 2px;
  opacity: 0.6;
}

/* Quota Inline (for table column) */
.quota-inline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #22c55e;
  font-weight: 500;
}

.quota-inline .quota-sep {
  color: var(--text-muted);
  opacity: 0.5;
  margin: 0 1px;
}

.quota-inline.quota-low {
  color: #fbbf24;
}

.quota-inline.quota-empty {
  color: #ef4444;
}

.quota-cell {
  text-align: center;
}

/* Quota Display for Admin Users */
.quota-display {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.quota-remaining {
  color: #22c55e;
  font-weight: 500;
}

.quota-remaining.quota-low {
  color: #fbbf24;
}

.quota-remaining.quota-empty {
  color: #ef4444;
}

.quota-limit {
  color: var(--text-muted);
  opacity: 0.6;
}

.quota-label {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

.quota-add-btn {
  margin-left: 0.5rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(74, 144, 217, 0.3);
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.quota-add-btn:hover {
  background: rgba(74, 144, 217, 0.15);
  border-color: var(--primary-color);
}

/* Add Tests Modal */
.add-tests-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.add-tests-modal-content {
  background: var(--x0ne-bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
  min-width: 240px;
}

.add-tests-modal-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: lowercase;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.add-tests-modal-body {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.add-tests-modal-body input {
  width: 70px;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: white;
  font-family: var(--font-mono);
  font-size: 1rem;
  text-align: center;
}

.add-tests-modal-body input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.add-tests-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.add-tests-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.add-tests-cancel,
.add-tests-confirm {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-tests-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.add-tests-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
}

.add-tests-confirm {
  background: rgba(74, 144, 217, 0.15);
  border: 1px solid rgba(74, 144, 217, 0.3);
  color: var(--primary-color);
}

.add-tests-confirm:hover {
  background: rgba(74, 144, 217, 0.25);
}

/* Inline Links */
.expand-link-inline {
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.expand-link-inline:hover {
  opacity: 0.8;
}

/* Actions Row */
.expand-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Action Buttons - Sober & Minimal */
.expand-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  padding: 0.4em 0.85em;
  border-radius: 3px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: lowercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expand-btn:hover {
  border-color: rgba(74, 144, 217, 0.3);
  color: rgba(74, 144, 217, 0.8);
}

/* Success button - subtle blue instead of green */
.expand-btn-success {
  border-color: rgba(74, 144, 217, 0.15);
  color: rgba(74, 144, 217, 0.6);
}

.expand-btn-success:hover {
  background: rgba(74, 144, 217, 0.05);
  border-color: rgba(74, 144, 217, 0.4);
  color: rgba(74, 144, 217, 0.9);
}

/* Danger button - very subtle red */
.expand-btn-danger {
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
}

.expand-btn-danger:hover {
  background: rgba(248, 113, 113, 0.05);
  border-color: rgba(248, 113, 113, 0.25);
  color: rgba(248, 113, 113, 0.7);
}

/* Warning button - subtle orange/amber */
.expand-btn-warning {
  border-color: rgba(251, 191, 36, 0.15);
  color: rgba(251, 191, 36, 0.6);
}

.expand-btn-warning:hover {
  background: rgba(251, 191, 36, 0.05);
  border-color: rgba(251, 191, 36, 0.4);
  color: rgba(251, 191, 36, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
  .expand-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .expand-field label {
    min-width: 60px;
  }
}

/* ===================================
   🎮 FACTORIZED ACTION BUTTONS
   =================================== */

/* Base Action Button Style (used everywhere) */
.action-btn,
.dt-button,
.dt-button-cyberpunk {
  background: var(--x0ne-bg-tertiary) !important;
  color: var(--x0ne-text-secondary) !important;
  border: 1px solid var(--x0ne-border-light) !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-family: 'Fira Code', monospace !important;
  text-decoration: none !important;
  display: inline-block !important;
  margin: 0 4px 0 0 !important;
}

/* Hover Effect (factorized) */
.action-btn:hover,
.dt-button:hover,
.dt-button-cyberpunk:hover {
  background: var(--x0ne-bg-light) !important;
  border-color: var(--x0ne-border) !important;
  color: var(--x0ne-text-primary) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Active State (factorized) */
.action-btn:active,
.dt-button:active,
.dt-button-cyberpunk:active {
  transform: translateY(0) !important;
}

/* Delete Action Variant */
.action-btn.delete-action:hover {
  background: rgba(220, 53, 69, 0.1) !important;
  border-color: var(--error-color) !important;
  color: var(--error-color) !important;
}

/* Action Button Containers */
.user-actions-grid,
.dt-buttons-container {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

/* Email verification styling */
.email-unverified {
  color: rgba(255, 255, 255, 0.4) !important;
  font-style: normal !important;
}

.user-row[data-verified="false"] {
  background-color: rgba(255, 255, 255, 0.015);
}

.user-row[data-verified="false"]:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.user-row[data-class="no-class"] td:nth-child(4) {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Date Display Styling */
.date-display {
  font-size: 11px;
  color: #999;
  font-family: 'Fira Code', monospace;
}

/* Activity Status Colors */
.date-display.activity-active {
  color: var(--neon-green); /* #28a745 */
  font-weight: 600;
}

/* Special styling for "Just now" */
.date-display.just-now {
  color: var(--accent-color) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 3px rgba(0, 255, 157, 0.5);
  animation: pulse-green 2s infinite;
}

.date-display.activity-recent {
  color: var(--primary-color);
}

.date-display.activity-idle {
  color: var(--neon-yellow); /* #ffc107 */
}

.date-display.activity-inactive,
.date-display.inactive {
  color: #666;
  font-style: italic;
}

/* Column Display Dropdown */
.column-visibility-dropdown {
  background: var(--x0ne-bg-card);
  border: 1px solid var(--x0ne-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 10px;
  min-width: 180px;
  font-family: 'Fira Code', monospace;
}

.column-visibility-header {
  font-size: 12px;
  font-weight: bold;
  color: var(--x0ne-text-primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--x0ne-border-light);
}

.column-visibility-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.column-visibility-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--x0ne-text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 3px;
  transition: background 0.2s;
}

.column-visibility-options label:hover {
  background: var(--x0ne-bg-secondary);
}

.column-visibility-options input[type="checkbox"] {
  margin: 0;
}

/* User Profile Completion Levels - Subtle indicators */

/* Level 0: No progress - Red left border */
.user-row.completion-0 {
  border-left: 3px solid rgba(248, 113, 113, 0.7);
}

/* Level 1: Email verified - Purple */
.user-row.completion-1 {
  border-left: 3px solid rgba(147, 51, 234, 0.7);
}

/* Level 2: Email + Name - Yellow */
.user-row.completion-2 {
  border-left: 3px solid rgba(250, 204, 21, 0.7);
}

/* Level 3: Email + Name + Class - Blue */
.user-row.completion-3 {
  border-left: 3px solid rgba(74, 144, 217, 0.7);
}

/* Level 4: Complete Profile - Green */
.user-row.completion-4,
.user-row.profile-complete {
  border-left: 3px solid rgba(74, 222, 128, 0.8);
}

/* Unverified row — dimmed */
.user-row.unverified td {
  opacity: 0.35;
}
.user-row.unverified:hover td {
  opacity: 0.6;
}
.user-row.unverified.expanded td {
  opacity: 0.7;
}

/* Verify badge */
.verify-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}
.verify-badge.verified {
  color: rgba(74, 222, 128, 0.8);
  background: rgba(74, 222, 128, 0.08);
}
.verify-badge.unverified {
  color: rgba(248, 113, 113, 0.9);
  background: rgba(248, 113, 113, 0.1);
  opacity: 1 !important;
}

@keyframes pulse-green {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Profile Completion Legend - Subtle inline display */
.completion-legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--x0ne-font-mono);
  padding: 8px 12px;
  background: rgba(26, 26, 26, 0.3);
  border: 1px solid #333;
  border-radius: 3px;
  font-size: 12px;
  color: #999;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #444;
}

.legend-color.completion-0 {
  background: rgba(248, 113, 113, 0.5);
  border-color: rgba(248, 113, 113, 0.8);
}

.legend-color.completion-1 {
  background: rgba(147, 51, 234, 0.5);
  border-color: rgba(147, 51, 234, 0.8);
}

.legend-color.completion-2 {
  background: rgba(250, 204, 21, 0.5);
  border-color: rgba(250, 204, 21, 0.8);
}

.legend-color.completion-3 {
  background: rgba(74, 144, 217, 0.5);
  border-color: rgba(74, 144, 217, 0.8);
}

.legend-color.completion-4 {
  background: rgba(74, 222, 128, 0.6);
  border-color: rgba(74, 222, 128, 0.8);
}

.legend-text {
  font-size: 11px;
  color: #aaa;
}

/* Users Table - Expand & Selection */
.expand-cell {
  text-align: center;
  cursor: pointer;
  color: #666;
  font-size: 16px;
  padding: 8px !important;
  transition: all 0.2s ease;
  user-select: none;
}

.expand-cell:hover {
  color: rgba(74, 144, 217, 0.8);
  background: rgba(74, 144, 217, 0.05);
}

tr.expanded .expand-arrow {
  transform: rotate(180deg);
}

.select-btn {
  background: rgba(74, 144, 217, 0.15);
  border: 1px solid rgba(74, 144, 217, 0.4);
  border-radius: 3px;
  color: rgba(74, 144, 217, 0.9);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 4px 8px;
  transition: all 0.2s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.select-btn:hover {
  background: rgba(74, 144, 217, 0.25);
  transform: scale(1.05);
}

.select-indicator {
  color: #666;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-block;
  width: 20px;
  text-align: center;
}

/* Sticky Student Column */
.sticky-student-header,
.sticky-student-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--x0ne-bg-secondary);
  min-width: 180px;
  max-width: 220px;
  /* Ensure border matches other cells */
  border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
}

.sticky-student-header {
  background: var(--x0ne-bg-secondary);
  z-index: 3;
  /* Header has different border color */
  border-bottom: 1px solid rgba(74, 144, 217, 0.15) !important;
}

.sticky-student-cell {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  /* Use table-cell display to avoid breaking DataTables layout */
  /* The internal content is stacked naturally via block children */
}

/* Daily Test Badge - top right of student cell */
.daily-test-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: -0.02em;
}

.daily-test-badge.badge-low {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.daily-test-badge.badge-empty {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.sticky-student-cell .username-cell {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
}

.sticky-student-cell .student-name {
  display: block;
  color: var(--text-color);
  font-size: 0.85rem;
  margin-top: 2px;
}

.sticky-student-cell .student-email {
  display: block;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
  margin-top: 2px;
}

.sticky-student-cell:hover {
  box-shadow: inset 3px 0 0 0 rgba(74, 144, 217, 0.3);
}

/* Selection via box-shadow glow */
.user-row.selected .sticky-student-cell {
  box-shadow: inset 3px 0 0 0 var(--x0ne-primary);
  background: rgba(74, 144, 217, 0.06);
}

.user-row.selected {
  background: rgba(74, 144, 217, 0.04) !important;
}

.user-row.selected:hover {
  background: rgba(74, 144, 217, 0.08) !important;
}

/* Email Modal - Users Preview */
.users-preview {
  max-height: 150px;
  overflow-y: auto;
  background: rgba(74, 144, 217, 0.03);
  border: 1px solid rgba(74, 144, 217, 0.1);
  border-radius: 4px;
  padding: 10px;
}

.user-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--x0ne-font-mono);
  font-size: 13px;
}

.user-preview-item:last-child {
  border-bottom: none;
}

.user-preview-item .user-name {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.user-preview-item .user-email {
  color: rgba(74, 144, 217, 0.8);
  font-size: 12px;
}

/* Users Table - Cell Helpers */
.cell-center {
  text-align: center;
}

.text-empty {
  color: #666;
  font-style: italic;
}

.text-success-icon {
  color: rgba(74, 144, 217, 0.6);
  font-size: 0.9em;
}

.text-error-icon {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.9em;
}

.text-link {
  color: rgba(74, 144, 217, 0.9);
}

.text-warning {
  color: #ffc107;
}

/* Team & CC Team Badges - Subtle */
.badge-team {
  background: rgba(100, 255, 218, 0.08);
  color: rgba(100, 255, 218, 0.8);
  border-color: rgba(100, 255, 218, 0.2);
}

.badge-ccteam {
  background: rgba(255, 64, 129, 0.08);
  color: rgba(255, 64, 129, 0.8);
  border-color: rgba(255, 64, 129, 0.2);
}

/* Wide Main Container (for users, etc.) */
.main.main-wide {
  max-width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Gaming Admin Container */
.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--x0ne-spacing-md);
  font-family: var(--x0ne-font-mono);
  color: var(--x0ne-text-primary);
  line-height: 1.4;
}

.admin-header {
  text-align: center;
  margin-bottom: var(--x0ne-spacing-xl);
  padding-bottom: var(--x0ne-spacing-lg);
  border-bottom: 1px solid var(--x0ne-border);
}

.admin-title {
  font-size: 2.5rem;
  font-weight: normal;
  margin: 0 0 var(--x0ne-spacing-sm) 0;
  color: var(--x0ne-text-neon);
  font-family: var(--x0ne-font-mono);
  text-shadow: 0 0 10px rgba(209, 255, 204, 0.5);
}

.admin-subtitle {
  font-size: 1.1rem;
  color: var(--x0ne-text-secondary);
  margin: 0;
  font-weight: normal;
  font-family: var(--x0ne-font-code);
}

/* =================================
   🎮 GAMING TAB NAVIGATION
   ================================= */

.tab-nav {
  display: flex;
  gap: var(--x0ne-spacing-xs);
  margin-bottom: var(--x0ne-spacing-xl);
  background: var(--x0ne-bg-glass);
  padding: var(--x0ne-spacing-xs);
  border-radius: var(--x0ne-radius-md);
  border: 1px solid var(--x0ne-border);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--x0ne-spacing-xs);
  padding: var(--x0ne-spacing-md) var(--x0ne-spacing-lg);
  background: none;
  border: none;
  border-radius: var(--x0ne-radius-sm);
  color: var(--x0ne-text-secondary);
  cursor: pointer;
  transition: var(--x0ne-transition-slow);
  font-weight: normal;
  font-size: 1rem;
  font-family: var(--x0ne-font-mono);
}

.tab-btn:hover {
  color: var(--x0ne-text-primary);
  background: rgba(128, 191, 255, 0.1);
  transform: translateY(-1px);
}

.tab-btn.active {
  background: transparent;
  color: var(--x0ne-accent);
  border: 1px solid var(--x0ne-accent);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
  transform: none;
}

.tab-icon {
  font-size: 1.2rem;
}

.tab-label {
  font-family: var(--x0ne-font-mono);
  font-size: 1rem;
}

/* Gaming Tab Content */
.tab-content {
  display: none;
  animation: gameContentFadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes gameContentFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-section {
  padding: 0;
}

/* =================================
   🎮 GAMING SECTION HEADERS
   ================================= */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--x0ne-spacing-lg);
  padding-bottom: var(--x0ne-spacing-md);
  border-bottom: 1px solid var(--x0ne-border);
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: normal;
  margin: 0;
  color: var(--x0ne-primary);
  font-family: var(--x0ne-font-code);
}

.section-subtitle {
  color: var(--x0ne-text-secondary);
  font-size: 0.95rem;
  margin: var(--x0ne-spacing-xs) 0 0 0;
  font-family: var(--x0ne-font-code);
}

.section-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--x0ne-spacing-md);
}

/* =================================
   🎮 MODULE EDIT STYLES
   ================================= */

.simple-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--x0ne-spacing-md);
  margin: var(--x0ne-spacing-md) 0;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: var(--x0ne-spacing-xs);
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-item label {
  font-size: 0.85rem;
  color: var(--x0ne-text-secondary);
  font-family: var(--x0ne-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item span {
  color: var(--x0ne-text-primary);
  font-family: var(--x0ne-font-mono);
  font-size: 1rem;
}

.module-name-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(138, 43, 226, 0.15);
  color: #ba68c8;
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.module-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.type-quiz { background: rgba(0, 255, 157, 0.2); color: var(--accent-color); }
.type-lesson { background: rgba(128, 191, 255, 0.2); color: var(--primary-color); }
.type-slides { background: rgba(255, 215, 0, 0.2); color: var(--neon-yellow); }
.type-exercise { background: rgba(255, 107, 107, 0.2); color: var(--neon-red); }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 400;
  font-family: var(--x0ne-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}

.status-draft { 
  background: rgba(250, 204, 21, 0.1); 
  color: rgba(250, 204, 21, 0.9);
  border-color: rgba(250, 204, 21, 0.2);
}

.status-published { 
  background: rgba(74, 144, 217, 0.1); 
  color: rgba(74, 144, 217, 0.9);
  border-color: rgba(74, 144, 217, 0.2);
}

.status-archived { 
  background: rgba(128, 128, 128, 0.1); 
  color: rgba(128, 128, 128, 0.8);
  border-color: rgba(128, 128, 128, 0.2);
}

.questions-simple-list {
  margin: var(--x0ne-spacing-md) 0;
  max-height: 400px;
  overflow-y: auto;
}

.question-item {
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-sm);
  padding: var(--x0ne-spacing-sm);
  margin: var(--x0ne-spacing-xs) 0;
  border-radius: 3px;
  font-family: var(--x0ne-font-mono);
  font-size: 0.9rem;
}

.question-item.validated {
  background: rgba(0, 255, 157, 0.05);
  border-left: 3px solid var(--accent-color);
}

.question-item.pending {
  background: rgba(255, 107, 107, 0.05);
  border-left: 3px solid var(--neon-red);
}

.question-number {
  font-weight: bold;
  min-width: 30px;
  color: var(--x0ne-primary);
}

.question-text {
  flex: 1;
  color: var(--x0ne-text-primary);
  overflow: visible;
  white-space: normal;
  line-height: 1.4;
}

.question-status {
  font-size: 0.8rem;
  font-weight: bold;
}

.content-sections {
  margin: var(--x0ne-spacing-md) 0;
}

.content-sections h4 {
  color: var(--x0ne-primary);
  font-family: var(--x0ne-font-mono);
  margin-bottom: var(--x0ne-spacing-sm);
}

.section-item {
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-sm);
  padding: var(--x0ne-spacing-xs);
  margin: var(--x0ne-spacing-xs) 0;
  font-family: var(--x0ne-font-mono);
  color: var(--x0ne-text-secondary);
}

.section-number {
  font-weight: bold;
  color: var(--x0ne-primary);
  min-width: 20px;
}

.section-title {
  color: var(--x0ne-text-primary);
}

/* =================================
   📝 QUIZ EDITOR - x0ne Theme
   ================================= */

.quiz-editor-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-back-link {
  color: rgba(74, 144, 217, 0.7);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  display: inline-block;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.quiz-back-link:hover {
  color: #4a90d9;
}

.quiz-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.quiz-editor-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.quiz-header-badges {
  display: flex;
  gap: 0.5rem;
}

.order-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-editor-section {
  background: rgba(74, 144, 217, 0.04);
  border: 1px solid rgba(74, 144, 217, 0.12);
  border-radius: 8px;
  padding: 1.25rem;
}

.quiz-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  gap: 1rem;
}

.quiz-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quiz-stat {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.stat-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
}

.stat-count.validated {
  color: #4ade80;
}

.stat-count.pending {
  color: #fbbf24;
}

.quiz-stat .stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.quiz-stat-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
}

.quiz-search-create {
  display: flex;
  gap: 0.5rem;
}

.quiz-search-input,
.quiz-create-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  width: 160px;
  transition: all 0.2s ease;
}

.quiz-search-input:focus,
.quiz-create-input:focus {
  outline: none;
  border-color: rgba(74, 144, 217, 0.4);
  background: rgba(74, 144, 217, 0.05);
}

.quiz-create-input {
  border-left: 2px solid #4ade80;
}

.quiz-search-input::placeholder,
.quiz-create-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.quiz-empty-state {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.module-type-display {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: rgba(74, 144, 217, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

/* Quiz Editor Question Rows */
.quiz-editor-section .question-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin: 0.5rem 0;
  border-radius: 4px;
}

.quiz-editor-section .question-row.validated {
  background: rgba(74, 222, 128, 0.03);
  border-left: 2px solid rgba(74, 222, 128, 0.4);
}

.quiz-editor-section .question-row.pending {
  background: rgba(251, 191, 36, 0.03);
  border-left: 2px solid rgba(251, 191, 36, 0.4);
}

.quiz-editor-section .question-row:hover {
  background: rgba(74, 144, 217, 0.05);
  border-color: rgba(74, 144, 217, 0.15);
}

.quiz-editor-section .question-number {
  color: rgba(74, 144, 217, 0.7);
  font-size: 0.75rem;
}

.quiz-editor-section .question-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
}

.quiz-editor-section .question-expand-toggle {
  color: rgba(255, 255, 255, 0.3);
}

.quiz-editor-section .question-expand-toggle:hover {
  color: rgba(74, 144, 217, 0.7);
  background: rgba(74, 144, 217, 0.1);
}

.quiz-editor-section .question-row.expanded .question-details {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-editor-section .option-item {
  font-size: 0.75rem;
}

.quiz-editor-section .option-item.correct {
  background: rgba(74, 222, 128, 0.08);
}

.quiz-editor-section .option-letter {
  color: rgba(74, 144, 217, 0.7);
  font-size: 0.7rem;
}

.quiz-editor-section .option-text {
  color: rgba(255, 255, 255, 0.7);
}

.quiz-editor-section .question-explanation {
  color: rgba(74, 222, 128, 0.7);
  font-size: 0.75rem;
}

.quiz-editor-section .difficulty-badge {
  background: rgba(74, 144, 217, 0.1);
  color: rgba(74, 144, 217, 0.8);
  font-size: 0.6rem;
}

.quiz-editor-section .toggle-switch input:checked + .toggle-slider {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.4);
}

.quiz-editor-section .toggle-switch input:checked + .toggle-slider:before {
  background: #4ade80;
}

.quiz-editor-section .toggle-switch input:not(:checked) + .toggle-slider {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
}

.quiz-editor-section .toggle-switch input:not(:checked) + .toggle-slider:before {
  background: #fbbf24;
}

.quiz-editor-section .delete-question-btn {
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
}

.quiz-editor-section .delete-question-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.quiz-editor-section .action-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
}

.quiz-editor-section .questions-unified-list {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.75rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* =================================
   📋 QUESTIONS TITLE & STATS
   ================================= */

.questions-title {
  color: var(--x0ne-text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.8;
  margin: 0;
}

.questions-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--x0ne-spacing-sm);
  margin: var(--x0ne-spacing-sm) 0;
  font-size: 0.9rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-xs);
}

.stat-label {
  color: var(--x0ne-text-muted);
  font-weight: 500;
}

.stat-value {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85rem;
}

.stat-value.validated {
  background: rgba(0, 255, 157, 0.15);
  color: #00cc7a;
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.stat-value.pending {
  background: rgba(255, 107, 107, 0.15);
  color: #cc5555;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.stat-separator {
  color: var(--x0ne-text-muted);
  opacity: 0.5;
}

/* =================================
   🎮 QUESTION TOGGLES - STYLE X0NE
   ================================= */

.questions-unified-list {
  margin: var(--x0ne-spacing-md) 0;
  max-height: 80vh;
  min-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(128, 191, 255, 0.2);
  border-radius: 8px;
  padding: var(--x0ne-spacing-md);
  background: rgba(0, 0, 0, 0.1);
}

.question-row {
  display: flex;
  flex-direction: column;
  padding: var(--x0ne-spacing-md);
  margin: var(--x0ne-spacing-sm) 0;
  border-radius: 6px;
  font-family: 'Fira Code', monospace;
  transition: var(--x0ne-transition-normal);
  border-left: 3px solid transparent;
  position: relative;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(128, 191, 255, 0.1);
}

.question-row > .question-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--x0ne-spacing-sm);
}

.question-row.validated {
  background: rgba(0, 255, 157, 0.05);
  border-left-color: var(--accent-color);
}

.question-row.pending {
  background: rgba(255, 107, 107, 0.05);
  border-left-color: var(--neon-red);
}

.question-row:hover {
  background: rgba(128, 191, 255, 0.1);
}

.question-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--x0ne-spacing-sm);
  width: 100%;
}

.question-main {
  display: flex;
  align-items: flex-start;
  gap: var(--x0ne-spacing-sm);
  flex: 1;
  min-height: 40px;
}

.question-number {
  font-weight: bold;
  color: var(--x0ne-primary);
  min-width: 40px;
  font-size: 0.9rem;
  padding-top: 2px;
  flex-shrink: 0;
  font-family: 'Fira Code', monospace;
}

.question-text {
  color: var(--x0ne-text-primary);
  font-size: 0.9rem;
  line-height: 1.5;
  overflow: visible;
  white-space: normal;
  max-width: none;
  font-family: 'Fira Code', monospace;
  flex: 1;
}

/* Toggle arrow (style admin/classes) */
.question-expand-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.2s ease;
  border-radius: 4px;
  user-select: none;
  color: #666;
  font-size: 16px;
  flex-shrink: 0;
}

.question-expand-toggle:hover {
  background: rgba(0, 255, 0, 0.05);
  color: var(--neon-green);
}

.question-expand-toggle .expand-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.question-row.expanded .question-expand-toggle .expand-arrow {
  transform: rotate(180deg);
}

.question-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* =================================
   🎮 TOGGLE SWITCH - COMPACT X0NE
   ================================= */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--x0ne-bg-secondary);
  border: 1px solid var(--x0ne-border);
  transition: var(--x0ne-transition-normal);
  border-radius: 12px;
  cursor: pointer;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background: var(--x0ne-text-muted);
  transition: var(--x0ne-transition-normal);
  border-radius: 50%;
}

/* État activé (validated) */
.toggle-switch input:checked + .toggle-slider {
  background: rgba(0, 255, 157, 0.2);
  border-color: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(14px);
  background: var(--accent-color);
}

/* État désactivé (pending) */
.toggle-switch input:not(:checked) + .toggle-slider {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--neon-red);
}

.toggle-switch input:not(:checked) + .toggle-slider:before {
  background: var(--neon-red);
}

/* Hover effects */
.toggle-switch:hover .toggle-slider {
  box-shadow: 0 0 8px rgba(128, 191, 255, 0.3);
}

.toggle-switch input:checked:hover + .toggle-slider {
  background: rgba(0, 255, 157, 0.3);
}

.toggle-switch input:not(:checked):hover + .toggle-slider {
  background: rgba(255, 107, 107, 0.3);
}

/* Focus states */
.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(128, 191, 255, 0.5);
}

/* =================================
   🎮 TOOLTIPS STYLE X0NE
   ================================= */

.toggle-switch[title] {
  position: relative;
}

.toggle-switch[title]:hover:after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 4px 8px;
  background: var(--x0ne-bg-tertiary);
  color: var(--x0ne-text-primary);
  font-size: 0.75rem;
  font-family: var(--x0ne-font-mono);
  border: 1px solid var(--x0ne-border);
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease forwards;
}

.toggle-switch[title]:hover:before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px;
  border: 4px solid transparent;
  border-top-color: var(--x0ne-border);
  z-index: 999;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease forwards;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* =================================
   🎮 QUESTION DETAILS DÉPLIANT
   ================================= */

.question-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  margin-top: 0;
  padding: 0;
  font-family: 'Fira Code', monospace;
}

.question-row.expanded .question-details {
  max-height: 800px;
  opacity: 1;
  margin-top: var(--x0ne-spacing-sm);
  padding: var(--x0ne-spacing-sm);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  border: 1px solid var(--x0ne-border);
}

.question-row.expanded .question-expandable {
  color: var(--x0ne-accent);
}



.question-options {
  margin-bottom: var(--x0ne-spacing-sm);
}

.option-item {
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-xs);
  padding: 4px 0;
  font-size: 0.875rem;
  line-height: 1.5;
  font-family: 'Fira Code', monospace;
  transition: all 0.2s ease;
}

.option-item.correct .option-letter {
  color: var(--x0ne-accent);
  font-weight: bold;
}

.option-letter {
  color: var(--x0ne-primary);
  font-weight: bold;
  min-width: 25px;
  font-family: 'Fira Code', monospace;
}

.option-text {
  color: var(--x0ne-text-secondary);
  flex: 1;
  font-family: 'Fira Code', monospace;
}



.question-explanation {
  margin: var(--x0ne-spacing-sm) 0;
  font-size: 0.85rem;
  color: rgba(0, 255, 157, 0.8);
  line-height: 1.5;
  font-family: 'Fira Code', monospace;
  font-style: italic;
}

.question-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--x0ne-spacing-xs);
}

.difficulty-badge {
  background: rgba(128, 191, 255, 0.2);
  color: var(--x0ne-primary);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: bold;
}

/* =================================
   🎮 ÉDITION INVISIBLE (CONTENTEDITABLE)
   ================================= */

[contenteditable="true"] {
  outline: none;
  transition: var(--x0ne-transition-normal);
  position: relative;
}

[contenteditable="true"]:focus {
  background: rgba(0, 255, 157, 0.05);
  border-radius: 2px;
}

[contenteditable="true"]:hover {
  background: rgba(128, 191, 255, 0.03);
  border-radius: 2px;
}

/* Hover effects pour les options */
.option-item[style*="cursor: pointer"] {
  border-radius: 4px;
  padding: 4px 8px;
  margin: 2px 0;
}

.option-item[style*="cursor: pointer"]:hover {
  background: rgba(128, 191, 255, 0.08);
  transform: translateX(2px);
}

.option-item.correct {
  background: rgba(0, 255, 157, 0.05);
  border-radius: 4px;
  padding: 4px 8px;
  margin: 2px 0;
}

.editable-difficulty:hover {
  background: rgba(128, 191, 255, 0.1);
  border-radius: 3px;
}

/* =================================
   🎮 STATUS ROW DANS LE DÉPLIANT
   ================================= */

.question-status-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--x0ne-spacing-lg);
  margin-bottom: var(--x0ne-spacing-md);
  padding: var(--x0ne-spacing-xs);
}

.question-actions {
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-xs);
}

.action-label {
  font-size: 0.8rem;
  color: var(--x0ne-text-muted);
  font-weight: 500;
  user-select: none;
}

/* =================================
   🗑️ DELETE QUESTION BUTTON
   ================================= */

.delete-question-btn {
  background: transparent;
  border: 1px solid rgba(128, 128, 128, 0.2);
  color: var(--x0ne-text-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--x0ne-transition-normal);
  font-size: 14px;
  font-weight: normal;
  padding: 0;
}

.delete-question-btn:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.4);
  color: var(--neon-red);
  transform: scale(1.02);
}

.delete-question-btn:active {
  transform: scale(0.98);
}

.delete-question-btn .delete-icon {
  line-height: 1;
  user-select: none;
  opacity: 0.7;
}

.delete-question-btn:hover .delete-icon {
  opacity: 1;
}

/* =================================
   🔍 SEARCH & CREATE FIELDS
   ================================= */

.search-create-container {
  display: flex;
  gap: var(--x0ne-spacing-sm);
  margin-bottom: var(--x0ne-spacing-lg);
}

.search-create-container .search-input {
  flex: 1;
}

.create-input {
  border-left: 3px solid var(--x0ne-accent) !important;
}

.create-input:focus {
  border-left: 3px solid var(--x0ne-accent) !important;
  box-shadow: 0 0 0 2px rgba(0, 255, 157, 0.3) !important;
}

.create-input.loading {
  background: linear-gradient(90deg, var(--x0ne-bg-secondary) 25%, rgba(0, 255, 157, 0.1) 50%, var(--x0ne-bg-secondary) 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Questions cachées par la recherche */
.question-row.search-hidden {
  display: none !important;
}

/* =================================
   📱 RESPONSIVE QUESTIONS DISPLAY
   ================================= */

/* Mobile et petits écrans */
@media (max-width: 768px) {
  .questions-unified-list {
    max-height: 70vh;
    min-height: 300px;
    padding: var(--x0ne-spacing-sm);
  }
  
  .question-row {
    padding: var(--x0ne-spacing-sm);
    margin: var(--x0ne-spacing-xs) 0;
  }
}

/* Tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
  .questions-unified-list {
    max-height: 75vh;
    min-height: 450px;
  }
}

/* Grands écrans */
@media (min-width: 1025px) {
  .questions-unified-list {
    max-height: 85vh;
    min-height: 500px;
  }
}

/* Très grands écrans */
@media (min-width: 1440px) {
  .questions-unified-list {
    max-height: 90vh;
    min-height: 600px;
  }
}

/* =================================
   📊 QUIZ PROGRESS - MINIMALISTE
   ================================= */

.quiz-progress {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(128, 191, 255, 0.05);
  border: 1px solid rgba(128, 191, 255, 0.2);
  border-radius: 6px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-family: var(--x0ne-font-display);
  font-weight: 500;
}

.progress-percentage {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-family: var(--x0ne-font-mono);
  opacity: 0.8;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(128, 191, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #4a9eff);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quiz-completed {
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(74, 158, 255, 0.05);
  border-radius: 4px;
}

.quiz-completed p {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  color: var(--text-color);
  font-family: var(--x0ne-font-display);
}

.completion-message {
  margin: 8px 0 0 0 !important;
  font-size: 0.85rem;
  color: var(--primary-color);
  font-style: italic;
}

.quiz-access-denied {
  padding: 12px;
  background: rgba(255, 107, 107, 0.1);
  border-left: 3px solid var(--neon-red);
  border-radius: 4px;
}

.quiz-access-denied p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--neon-red);
  font-family: var(--x0ne-font-display);
}

/* =================================
   📊 QUIZ SCORES - ADMIN TABLE
   ================================= */

.quiz-score-cell {
  text-align: center;
  padding: 8px 12px;
}

.quiz-score-value {
  font-weight: bold;
  color: var(--accent-color);
  font-size: 1.1rem;
  font-family: var(--x0ne-font-display);
}

.quiz-score-total {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-family: var(--x0ne-font-mono);
}

.quiz-score-empty {
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--x0ne-font-mono);
}

/* =================================
   🎛️ COLUMN DISPLAY CONTROLS
   ================================= */


.column-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.column-control-dropdown {
  position: relative;
  display: inline-block;
}

.column-control-btn {
  background: rgba(128, 191, 255, 0.1);
  border: 1px solid rgba(128, 191, 255, 0.3);
  color: var(--primary-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: var(--x0ne-font-mono);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: space-between;
}

.column-control-btn:hover {
  background: rgba(128, 191, 255, 0.2);
  border-color: rgba(128, 191, 255, 0.5);
  transform: translateY(-1px);
}

.dropdown-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.column-control-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.column-control-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(128, 191, 255, 0.3);
  border-radius: 8px;
  padding: 16px;
  min-width: 280px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.column-control-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.column-control-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(128, 191, 255, 0.1);
}

.btn-column-action {
  background: rgba(128, 191, 255, 0.1);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: var(--x0ne-font-mono);
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-column-action:hover {
  background: rgba(128, 191, 255, 0.2);
  transform: translateY(-1px);
}

.column-control-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
    flex-direction: column;
  gap: 4px;
}

.column-control-item {
  padding: 4px 0;
}

.column-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.column-toggle-label:hover {
  background: rgba(128, 191, 255, 0.05);
}

.column-toggle {
  width: 14px;
  height: 14px;
  accent-color: var(--primary-color);
  cursor: pointer;
  margin: 0;
}

.column-toggle-label span {
  color: var(--text-color);
  font-family: var(--x0ne-font-mono);
  font-size: 0.85rem;
  user-select: none;
}

/* Colonnes cachées - gérées par DataTables */
/* DataTables gère nativement la visibilité des colonnes */

/* DataTables Column Visibility Button */
.btn-column-visibility {
  background: var(--x0ne-color-primary) !important;
  color: white !important;
  border: 1px solid var(--x0ne-color-primary) !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.btn-column-visibility:hover {
  background: var(--x0ne-color-primary-dark) !important;
  border-color: var(--x0ne-color-primary-dark) !important;
  transform: translateY(-1px) !important;
}

.btn-column-visibility:focus {
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
  outline: none !important;
}

/* =================================
   📊 CHART VISUALIZATION STYLES
   ================================= */

.visualization-controls {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(128, 191, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  margin: 16px 0;
}

.view-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.view-btn {
  background: rgba(128, 191, 255, 0.1);
  border: 2px solid rgba(128, 191, 255, 0.3);
  color: var(--primary-color);
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--x0ne-font-display);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-btn:hover {
  background: rgba(128, 191, 255, 0.2);
  border-color: rgba(128, 191, 255, 0.5);
  transform: translateY(-2px);
}

.view-btn.active {
  background: rgba(128, 191, 255, 0.3);
  border-color: var(--primary-color);
  color: var(--text-color);
  box-shadow: 0 4px 12px rgba(128, 191, 255, 0.2);
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(128, 191, 255, 0.1);
}

.chart-controls select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(128, 191, 255, 0.3);
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--x0ne-font-mono);
  font-size: 0.9rem;
  cursor: pointer;
}

.chart-controls select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(128, 191, 255, 0.2);
}

.charts-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.chart-wrapper {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(128, 191, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  position: relative;
}

.chart-wrapper canvas {
  max-width: 100%;
  height: auto;
}

.chart-stats {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(128, 191, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
}

.chart-stat-item {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  border-left: 4px solid var(--primary-color);
}

.chart-stat-item:last-child {
  margin-bottom: 0;
}

.chart-stat-item h4 {
  margin: 0;
  color: var(--text-color);
  font-family: var(--x0ne-font-display);
  font-size: 1rem;
  font-weight: 500;
}

.chart-stat-item h4:first-child {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}




/* Responsive consolidé plus bas */

@media (max-width: 480px) {
  .column-control-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 120px;
  }
  
  .column-control-menu {
    min-width: 240px;
    padding: 12px;
  }
  
  .column-control-list {
    max-height: 250px;
  }
}

/* Responsive consolidé plus bas */

/* =================================
   🎮 GAMING CARDS & GRIDS
   ================================= */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--x0ne-spacing-lg);
  margin-bottom: var(--x0ne-spacing-lg);
}

.course-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  transition: var(--x0ne-transition-slow);
  position: relative;
  overflow: hidden;
}

.course-card:hover {
  border-color: var(--x0ne-primary);
  background: var(--x0ne-bg-70);
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--x0ne-spacing-md);
}

.course-title {
  font-size: 1.25rem;
  font-weight: normal;
  margin: 0;
  color: var(--x0ne-text-primary);
  line-height: 1.3;
  font-family: var(--x0ne-font-mono);
}

.course-actions {
  display: flex;
  gap: var(--x0ne-spacing-xs);
  opacity: 0;
  transition: opacity var(--x0ne-transition-normal);
}

.course-card:hover .course-actions {
  opacity: 1;
}

.course-meta {
  display: flex;
  gap: var(--x0ne-spacing-md);
  margin-bottom: var(--x0ne-spacing-md);
  font-size: 0.85rem;
}

.course-link {
  color: var(--x0ne-primary);
  font-family: var(--x0ne-font-mono);
  background: rgba(128, 191, 255, 0.1);
  padding: 2px 6px;
  border-radius: var(--x0ne-radius-sm);
  border: 1px solid rgba(128, 191, 255, 0.3);
}

.course-modules {
  color: var(--x0ne-text-muted);
  font-family: var(--x0ne-font-mono);
}

.course-description {
  color: var(--x0ne-text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 var(--x0ne-spacing-lg) 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--x0ne-font-code);
}

.course-footer {
  margin-top: auto;
}

/* =================================
   🎮 WAREZ MODULES PREVIEW
   ================================= */

.modules-preview {
  margin: var(--x0ne-spacing-lg) 0;
  background: rgba(0, 255, 65, 0.03);
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: var(--x0ne-radius-sm);
  padding: var(--x0ne-spacing-md);
}

.modules-title {
  font-size: 0.75rem;
  font-weight: normal;
  margin: 0 0 var(--x0ne-spacing-sm) 0;
  color: var(--x0ne-accent);
  font-family: var(--x0ne-font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.modules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 120px;
  overflow-y: auto;
}

.modules-list .module-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--x0ne-spacing-xs) 0;
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
  margin: 0;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  border-radius: 0;
  transition: background-color 0.2s ease;
}

.modules-list .module-item:hover {
  background: rgba(0, 255, 65, 0.05);
}

.modules-list .module-item:last-child {
  border-bottom: none;
}

.module-info {
  display: flex;
  align-items: center;
  flex-grow: 1;
  gap: var(--x0ne-spacing-xs);
}

.module-name {
  color: var(--x0ne-text-primary);
  font-family: var(--x0ne-font-mono);
  font-size: 0.85rem;
}

.module-type {
  color: var(--x0ne-text-muted);
  font-family: var(--x0ne-font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.question-count {
  color: var(--x0ne-accent);
  font-family: var(--x0ne-font-mono);
  font-size: 0.75rem;
  opacity: 0.8;
}

.module-actions {
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-xs);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.modules-list .module-item:hover .module-actions {
  opacity: 1;
}

.btn-edit-module {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: rgba(0, 255, 157, 0.1);
  color: var(--x0ne-accent);
  border: 1px solid rgba(0, 255, 157, 0.3);
  border-radius: 3px;
  text-decoration: none;
  font-family: var(--x0ne-font-mono);
  font-size: 0.7rem;
  transition: all 0.2s ease;
}

.btn-edit-module:hover {
  background: var(--x0ne-accent);
  color: var(--x0ne-bg-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 255, 157, 0.3);
}

.btn-delete-module {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgba(255, 56, 96, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(255, 56, 96, 0.3);
  border-radius: 3px;
  font-family: var(--x0ne-font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete-module:hover {
  background: var(--error-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(255, 56, 96, 0.3);
}

.no-modules {
  color: var(--x0ne-text-muted);
  font-family: var(--x0ne-font-mono);
  font-size: 0.85rem;
  text-align: center;
  display: block;
  font-style: italic;
  letter-spacing: 1px;
}

/* Scrollbar for modules list */
.modules-list::-webkit-scrollbar {
  width: 4px;
}

.modules-list::-webkit-scrollbar-track {
  background: rgba(0, 255, 65, 0.1);
}

.modules-list::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 65, 0.3);
  border-radius: 2px;
}

.modules-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 65, 0.5);
}

/* =================================
   🎮 GAMING EMPTY STATE
   ================================= */

.empty-state {
  text-align: center;
  padding: var(--x0ne-spacing-xl);
  color: var(--x0ne-text-secondary);
  background: var(--x0ne-bg-card);
  border: 1px solid var(--x0ne-border);
  border-radius: var(--x0ne-radius-md);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: var(--x0ne-spacing-md);
  opacity: 0.7;
  color: var(--x0ne-primary);
}

.empty-state h3 {
  font-size: 1.5rem;
  margin: 0 0 var(--x0ne-spacing-sm) 0;
  color: var(--x0ne-text-primary);
  font-family: var(--x0ne-font-mono);
}

.empty-state p {
  margin: 0 0 var(--x0ne-spacing-lg) 0;
  font-family: var(--x0ne-font-code);
}

/* =================================
   🎮 GAMING FORMS
   ================================= */

.form-container {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--x0ne-spacing-xl);
  margin-bottom: var(--x0ne-spacing-lg);
}

.modern-form {
  max-width: none;
}

.form-section {
  margin-bottom: var(--x0ne-spacing-xl);
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section-title {
  font-size: 1.25rem;
  font-weight: normal;
  margin: 0 0 var(--x0ne-spacing-lg) 0;
  color: var(--x0ne-primary);
  position: relative;
  padding-bottom: var(--x0ne-spacing-sm);
  font-family: var(--x0ne-font-code);
}

.form-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--x0ne-accent);
  border-radius: 1px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--x0ne-spacing-md);
  margin-bottom: var(--x0ne-spacing-md);
}

.form-group {
  margin-bottom: var(--x0ne-spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--x0ne-spacing-xs);
  font-weight: normal;
  color: var(--x0ne-text-primary);
  font-size: 0.9rem;
  font-family: var(--x0ne-font-mono);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--form-input-padding);
  background: var(--form-input-bg);
  border: var(--form-input-border);
  border-radius: var(--form-input-radius);
  color: var(--x0ne-text-primary);
  font-size: var(--form-input-size);
  transition: var(--x0ne-transition-normal);
  font-family: var(--form-input-font);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--form-input-focus-border);
  background: var(--x0ne-bg-secondary);
  box-shadow: 0 0 5px rgba(0, 255, 157, 0.3);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--x0ne-text-muted);
  opacity: 0.7;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.4;
}

/* Gaming AI Prompt Section */
.ai-prompt-section {
  background: rgba(255, 240, 0, 0.05);
  border: 1px solid rgba(255, 240, 0, 0.3);
  border-radius: var(--x0ne-radius-md);
  padding: var(--x0ne-spacing-lg);
  margin-top: var(--x0ne-spacing-lg);
}

.dynamic-config {
  background: rgba(128, 191, 255, 0.05);
  border: 1px solid rgba(128, 191, 255, 0.3);
  border-radius: var(--x0ne-radius-md);
  padding: var(--x0ne-spacing-lg);
  margin: var(--x0ne-spacing-md) 0;
}

/* =================================
   🎮 GAMING MODULE COMPONENTS
   ================================= */

.modules-container {
  border: 2px dashed var(--x0ne-border);
  border-radius: var(--x0ne-radius-md);
  padding: var(--x0ne-spacing-lg);
  text-align: center;
  color: var(--x0ne-text-muted);
  transition: var(--x0ne-transition-normal);
  background: var(--x0ne-bg-tertiary);
}

.modules-container:empty::before {
  content: 'No modules added yet. Click "Add Module" to get started.';
  font-style: italic;
  font-family: var(--x0ne-font-code);
}

.modules-container:hover {
  border-color: var(--x0ne-border-hover);
}

.module-item {
  background: rgba(128, 191, 255, 0.05);
  border: 1px solid rgba(128, 191, 255, 0.3);
  border-radius: var(--x0ne-radius-md);
  padding: var(--x0ne-spacing-lg);
  margin-bottom: var(--x0ne-spacing-md);
  text-align: left;
}

.module-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--x0ne-spacing-md);
}

.module-item-header h4 {
  margin: 0;
  color: var(--x0ne-primary);
  font-size: 1.1rem;
  font-family: var(--x0ne-font-mono);
  font-weight: normal;
}

/* =================================
   🎮 GAMING BUTTONS - UNIFIÉ AVEC ACTION-BTN
   ================================= */

/* Utiliser .action-btn comme base pour tous les boutons */
.btn-primary,
.btn-secondary,
.btn-icon-only {
  /* Hérite de .action-btn défini plus haut */
  display: inline-flex;
  align-items: center;
  gap: var(--x0ne-spacing-xs);
  background: var(--x0ne-bg-tertiary) !important;
  color: var(--x0ne-text-secondary) !important;
  border: 1px solid var(--x0ne-border-light) !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-family: 'Fira Code', monospace !important;
  text-decoration: none !important;
  margin: 0 4px 0 0 !important;
}

/* Variantes de couleur */
.btn-primary {
  border-color: var(--x0ne-accent) !important;
  color: var(--x0ne-accent) !important;
}

.btn-primary:hover {
  background: var(--x0ne-accent) !important;
  color: var(--x0ne-bg-primary) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0, 255, 157, 0.3) !important;
}

.btn-secondary {
  border-color: var(--x0ne-primary) !important;
  color: var(--x0ne-primary) !important;
}

.btn-secondary:hover {
  background: var(--x0ne-primary) !important;
  color: var(--x0ne-bg-primary) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(128, 191, 255, 0.3) !important;
}

.btn-icon-only {
  padding: 8px !important;
  min-width: auto !important;
}

.btn-icon-only.danger:hover {
  background: var(--x0ne-danger) !important;
  border-color: var(--x0ne-danger) !important;
  color: white !important;
}

.full-width {
  width: 100% !important;
  justify-content: center !important;
}

/* Gaming Form Actions */
.form-actions {
  display: flex;
  gap: var(--x0ne-spacing-md);
  justify-content: flex-end;
  margin-top: var(--x0ne-spacing-xl);
  padding-top: var(--x0ne-spacing-lg);
  border-top: 1px solid var(--x0ne-border);
}

/* =================================
   🎮 GAMING FILE INPUT
   ================================= */

.file-input-wrapper {
  position: relative;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-label {
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-sm);
  padding: var(--x0ne-spacing-md);
  background: var(--x0ne-bg-secondary);
  border: 1px solid var(--x0ne-border);
  border-radius: var(--x0ne-radius-md);
  cursor: pointer;
  transition: var(--x0ne-transition-normal);
  color: var(--x0ne-text-secondary);
  font-family: var(--x0ne-font-mono);
}

.file-input-label:hover {
  border-color: var(--x0ne-border-hover);
  background: var(--x0ne-bg-tertiary);
  color: var(--x0ne-text-primary);
}

.file-icon {
  font-size: 1.2rem;
}

/* Gaming Import/Export Grid */
.import-export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--x0ne-spacing-lg);
}

/* Responsive consolidé en fin de fichier */

/* =================================
   🎮 GAMING UTILITY COMPONENTS
   ================================= */

.dynamic-config-title {
  color: var(--x0ne-primary);
  font-size: 1rem;
  margin-bottom: var(--x0ne-spacing-md);
  font-weight: normal;
  font-family: var(--x0ne-font-mono);
}

.dynamic-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--x0ne-spacing-md);
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: var(--x0ne-spacing-xs);
  cursor: pointer;
  font-size: 0.9rem !important;
  font-family: var(--x0ne-font-mono);
}

.checkbox-label input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
}

.field-description {
  display: block;
  font-size: 0.8rem;
  color: var(--x0ne-text-muted);
  margin-top: var(--x0ne-spacing-xs);
  font-style: italic;
  font-family: var(--x0ne-font-code);
}

.error-state {
  text-align: center;
  padding: var(--x0ne-spacing-lg);
  color: var(--x0ne-danger);
  background: var(--x0ne-bg-card);
  border: 1px solid var(--x0ne-danger);
  border-radius: var(--x0ne-radius-md);
}

.error-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--x0ne-spacing-sm);
}

/* =================================
   🎮 GAMING LOADING & ANIMATIONS
   ================================= */

.loading-spinner {
  animation: gamingSpin 1s linear infinite;
  display: inline-block;
  color: var(--x0ne-accent);
}

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

/* Gaming Hover Effects */
.course-card,
.form-container,
.module-item {
  position: relative;
}

.course-card:hover,
.form-container:hover {
  background: var(--x0ne-bg-70);
}

/* Gaming Glow Effects */
.btn-primary:hover,
.btn-secondary:hover {
  text-shadow: 0 0 5px currentColor;
}

.admin-title {
  text-shadow: 0 0 10px rgba(209, 255, 204, 0.5);
}

.popular-themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--x0ne-spacing-lg);
  max-height: 60vh;
  overflow-y: auto;
  padding: var(--x0ne-spacing-md);
}

.theme-category {
  background: rgba(0, 19, 39, 0.7);
  border: 1px solid var(--x0ne-border-color);
  border-radius: var(--x0ne-radius-md);
  padding: var(--x0ne-spacing-md);
}

.theme-category-title {
  color: var(--x0ne-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 var(--x0ne-spacing-sm) 0;
  font-family: var(--x0ne-font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.theme-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--x0ne-spacing-xs);
}

.theme-button {
  background: transparent;
  border: 1px solid var(--x0ne-border-color);
  color: var(--x0ne-text-secondary);
  padding: 6px 12px;
  border-radius: var(--x0ne-radius-sm);
  font-size: 0.8rem;
  font-family: var(--x0ne-font-mono);
  cursor: pointer;
  transition: all var(--x0ne-transition-normal);
  white-space: nowrap;
}

.theme-button:hover {
  background: var(--x0ne-accent);
  color: var(--x0ne-dark);
  border-color: var(--x0ne-accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 255, 157, 0.3);
}

.theme-button:active {
  transform: translateY(0);
}

/* Form note styling */
.form-note {
  font-size: 0.8rem;
  color: var(--x0ne-text-muted);
  font-family: var(--x0ne-font-mono);
  margin-top: var(--x0ne-spacing-xs);
  padding: var(--x0ne-spacing-xs);
  background: rgba(128, 191, 255, 0.05);
  border-left: 2px solid var(--x0ne-primary);
  border-radius: 0 var(--x0ne-radius-sm) var(--x0ne-radius-sm) 0;
}

/* Datalist styling for theme suggestions */
input[list] {
  position: relative;
}



.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  background: var(--x0ne-dark);
  border: 1px solid var(--x0ne-border-color);
  border-radius: var(--x0ne-radius-md);
  padding: var(--x0ne-spacing-md);
  font-family: var(--x0ne-font-mono);
  transform: translateX(100%);
  opacity: 0;
  transition: all var(--x0ne-transition-normal);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.notification-show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-sm);
}

.notification-icon {
  font-weight: bold;
  font-size: 0.9rem;
}

.notification-message {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.notification-success {
  border-color: var(--x0ne-accent);
  background: rgba(0, 255, 157, 0.1);
}

.notification-success .notification-icon {
  color: var(--x0ne-accent);
}

.notification-error {
  border-color: var(--x0ne-error);
  background: rgba(255, 56, 96, 0.1);
}

.notification-error .notification-icon {
  color: var(--x0ne-error);
}

.notification-warning {
  border-color: #ffa500;
  background: rgba(255, 165, 0, 0.1);
}

.notification-warning .notification-icon {
  color: #ffa500;
}

.notification-info {
  border-color: var(--x0ne-primary);
  background: rgba(128, 191, 255, 0.1);
}

.notification-info .notification-icon {
  color: var(--x0ne-primary);
}


.loading-spinner {
  display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
  font-family: var(--x0ne-font-mono);
  color: var(--x0ne-accent);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

/* Status display for generation processes */
#quiz-generation-status,
#generation-status {
  background: rgba(0, 19, 39, 0.8);
  border: 1px solid var(--x0ne-border-color);
  border-radius: var(--x0ne-radius-md);
  padding: var(--x0ne-spacing-md);
  display: flex;
  align-items: center;
  gap: var(--x0ne-spacing-sm);
  font-family: var(--x0ne-font-mono);
  color: var(--x0ne-text-secondary);
}



/* Responsive consolidé en fin de fichier */

.table-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
}

.dropdown.table-dropdown .dropdown-menu,
.table-dropdown-menu {
  background: var(--x0ne-bg-98);
  border: 1px solid rgba(128, 191, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dropdown.table-dropdown { position: relative; z-index: 2001; }
.dropdown.table-dropdown .dropdown-menu { z-index: 5000; }

.admin-table-container,
.table-container {
  overflow-y: visible;
}

/* Users table with sticky column */
.users-table-container {
  overflow-x: auto;
  position: relative;
}

.table-dropdown-menu a + a { border-top: 1px solid rgba(128, 191, 255, 0.12); }

.table-dropdown-menu a.delete-action:hover {
  background-color: var(--x0ne-danger);
  color: #fff;
}
.class-link-main {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}
.class-link-main:hover {
    text-decoration: underline;
    color: #fff;
}
.admin-back-link { color: var(--primary-color); text-decoration: none; }
.admin-course-title { color: var(--primary-color); font-family: 'Fira Code', monospace; margin: 0; }
.admin-header-flex { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); }
.admin-description { color: rgba(128, 191, 255, 0.8); margin-bottom: 30px; }
.text-muted-center { text-align: center; color: #a0a0a0; }

.module-filter-container {
  background: var(--x0ne-bg-30);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  padding: 20px;
}

.admin-filter-select {
  background: var(--x0ne-bg-80);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 5px 10px;
  font-family: 'Fira Code', monospace;
  border-radius: 3px;
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-between-margin { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; }
.flex-gap { display: flex; gap: 10px; align-items: center; }
.admin-back-link-alt { color: var(--primary-color); text-decoration: none; font-family: 'Fira Code', monospace; }
.admin-title-primary { color: var(--primary-color); font-family: 'Fira Code', monospace; margin: 20px 0 10px 0; }
.admin-title-accent { color: var(--accent-color); font-family: 'Fira Code', monospace; margin: 0; }
.admin-btn-primary { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); padding: 4px 8px; cursor: pointer; font-family: 'Fira Code', monospace; font-size: 12px; border-radius: 3px; }
.admin-btn-accent { background: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); padding: 8px 15px; cursor: pointer; font-family: 'Fira Code', monospace; border-radius: 3px; }
.admin-btn-warning { background: transparent; border: 1px solid #ffd700; color: #ffd700; padding: 8px 15px; cursor: pointer; font-family: 'Fira Code', monospace; border-radius: 3px; }
.admin-btn-danger { background: transparent; border: 1px solid #ff6b6b; color: #ff6b6b; padding: 4px 8px; cursor: pointer; font-family: 'Fira Code', monospace; font-size: 12px; border-radius: 3px; }

/* =================================
   💎 DATATABLES CUSTOM STYLING
   ================================= */

/* Style pour TOUS les boutons DataTables - UNIFIÉ avec .action-btn */

/* =================================
   🔍 GLOBAL SEARCH INPUT STYLE
   ================================= */

/* Style unifié pour TOUS les inputs de recherche */
input[type="text"][placeholder*="earch"],
input[type="search"],
.search-input,
.dt-search input,
input.search,
input[id*="search"],
input[name*="search"],
input[class*="search"] {
  background: transparent !important;
  border: 1px solid rgba(128, 191, 255, 0.3) !important;
  color: #fff !important;
  padding: var(--btn-padding) !important;
  border-radius: var(--btn-border-radius) !important;
  font-family: var(--x0ne-font-display) !important;
  font-size: var(--btn-font-size) !important;
  min-width: 200px !important;
  transition: all 0.3s ease !important;
}

/* Placeholder pour tous les search */
input[type="text"][placeholder*="earch"]::placeholder,
input[type="search"]::placeholder,
.search-input::placeholder,
.dt-search input::placeholder,
input.search::placeholder,
input[id*="search"]::placeholder,
input[name*="search"]::placeholder,
input[class*="search"]::placeholder {
  color: rgba(128, 191, 255, 0.6) !important;
}

/* Focus pour tous les search */
input[type="text"][placeholder*="earch"]:focus,
input[type="search"]:focus,
.search-input:focus,
.dt-search input:focus,
input.search:focus,
input[id*="search"]:focus,
input[name*="search"]:focus,
input[class*="search"]:focus {
  outline: none !important;
  border-color: #80bfff !important;
  box-shadow: 0 0 8px rgba(128, 191, 255, 0.3) !important;
}

/* Masquer les labels de recherche */
.dt-search label,
label[for*="search"] {
  display: none !important;
}

/* Le dropdown dans DataTables */
.dt-buttons .column-control-dropdown {
  position: relative;
  display: inline-block;
}

/* Ajustement pour les boutons avec icônes */
.dt-button span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 4px;
  font-family: var(--x0ne-font-mono);
}

.badge-success {
  background: rgba(0, 255, 159, 0.2);
  color: #00ff9f;
  border: 1px solid rgba(0, 255, 159, 0.3);
}

.badge-secondary {
  background: rgba(128, 128, 128, 0.2);
  color: #999;
  border: 1px solid rgba(128, 128, 128, 0.3);
}

/* Quiz toggle table */
.quiz-toggle-table {
  font-size: 0.875rem;
}

.quiz-toggle-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #80bfff;
}

/* Lien sur le nom de classe */
.class-name-link {
  color: inherit !important;
  text-decoration: none !important;
  position: relative;
  z-index: 2;
  transition: color 0.2s ease;
}

.class-name-link:hover {
  color: #80bfff !important;
  cursor: pointer;
  text-decoration: underline !important;
}

/* Sections pliables */
.admin-section.collapsible .admin-section-header {
  cursor: pointer;
  position: relative;
  user-select: none;
}

.admin-section.collapsible .admin-section-header:hover {
  background: rgba(128, 191, 255, 0.05);
}

.section-toggle {
  position: absolute;
  right: var(--x0ne-spacing-md);
  top: 50%;
  transform: translateY(-50%);
  color: #80bfff;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.admin-section.collapsed .section-toggle {
  transform: translateY(-50%) rotate(-90deg);
}

/* Chart controls dans le header */
.admin-section-header .chart-controls {
  margin-left: auto;
  margin-right: 60px; /* Espace pour le toggle */
}

.admin-section-header .chart-controls select {
  background: transparent;
  border: 1px solid rgba(128, 191, 255, 0.3);
  color: #80bfff;
  padding: 4px 8px;
  font-size: 0.875rem;
  font-family: var(--x0ne-font-mono);
  border-radius: 4px;
  cursor: pointer;
}

.admin-section-header .chart-controls select:focus {
  outline: none;
  border-color: #80bfff;
}

/* Container DataTables */
.dataTables_wrapper {
  font-family: var(--x0ne-font-mono) !important;
}

/* Alignement de la barre de contrôle */
.dataTables_wrapper .dt-layout-row {
  margin-bottom: 1rem !important;
}

/* Container pour search et buttons */
.dataTables_wrapper .dt-layout-start,
.dataTables_wrapper .dt-layout-end {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}

/* Espacement entre les boutons */
.dt-buttons {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

/* Info et pagination */
.dataTables_info,
.dataTables_paginate {
  color: rgba(74, 144, 217, 0.7) !important;
  font-family: var(--x0ne-font-mono) !important;
  font-size: 0.7rem !important;
}

/* =================================
   📄 PAGINATION FORCÉE SIMPLE
   ================================= */

/* Forcer le reset de TOUS les styles de pagination possibles */
.dataTables_wrapper .dt-paging .dt-paging-button,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dt-paging .dt-paging-button,
.dataTables_paginate .paginate_button,
.dt-paging-button,
.paginate_button,
button.dt-paging-button,
button.paginate_button,
a.dt-paging-button,
a.paginate_button {
  /* Reset tout */
  all: unset !important;
  
  /* Style minimal */
  display: inline-block !important;
  background: transparent !important;
  border: 1px solid rgba(74, 144, 217, 0.2) !important;
  color: rgba(74, 144, 217, 0.7) !important;
  padding: 2px 6px !important;
  font-size: 0.65rem !important;
  font-family: var(--x0ne-font-mono) !important;
  cursor: pointer !important;
  border-radius: 2px !important;
  margin: 0 1px !important;
  text-decoration: none !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

/* Hover - Sélecteurs plus spécifiques */
.dataTables_wrapper .dt-paging-button:hover:not(.disabled),
.dataTables_wrapper .paginate_button:hover:not(.disabled),
.dt-paging-button:hover:not(.disabled),
.paginate_button:hover:not(.disabled) {
  background: rgba(128, 191, 255, 0.1) !important;
  border-color: #80bfff !important;
  color: #80bfff !important;
}

/* Current/Active */
.dataTables_wrapper .dt-paging-button.current,
.dataTables_wrapper .paginate_button.current,
.dataTables_wrapper .paginate_button.active,
.dt-paging-button.current,
.paginate_button.current,
.paginate_button.active {
  background: rgba(128, 191, 255, 0.15) !important;
  border-color: #80bfff !important;
  color: #fff !important;
}

/* Disabled */
.dataTables_wrapper .dt-paging-button.disabled,
.dataTables_wrapper .paginate_button.disabled,
.dt-paging-button.disabled,
.paginate_button.disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Container de pagination */
.dataTables_wrapper .dt-paging,
.dataTables_wrapper .dataTables_paginate {
  margin-top: 10px !important;
  text-align: right !important;
}

/* Select "Show entries" - Plus spécifique */
.dataTables_wrapper .dt-length select,
.dataTables_wrapper .dataTables_length select {
  all: unset !important;
  background: transparent !important;
  border: 1px solid rgba(128, 191, 255, 0.3) !important;
  color: #80bfff !important;
  padding: 2px 8px !important;
  font-size: 0.75rem !important;
  font-family: var(--x0ne-font-mono) !important;
  cursor: pointer !important;
  border-radius: 3px !important;
  min-width: 50px !important;
}

/* =================================
   ⚔️ SABRE LASER EFFECT
   ================================= */

/* Effet sabre laser pour les champs de création */
.create-input.loading {
  background: linear-gradient(90deg, var(--x0ne-bg-secondary) 25%, rgba(0, 255, 157, 0.1) 50%, var(--x0ne-bg-secondary) 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =================================
   📱 CONSOLIDATED RESPONSIVE DESIGN
   ================================= */

/* Mobile - 768px and below */
@media (max-width: 768px) {
  /* Admin Container */
  .admin-container {
    padding: var(--x0ne-spacing-sm);
  }
  
  .admin-title {
    font-size: 2rem;
  }
  
  /* Navigation */
  .tab-nav {
    flex-direction: column;
  }
  
  .tab-btn {
    justify-content: flex-start;
  }
  
  /* Grids */
  .courses-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Headers */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--x0ne-spacing-md);
  }
  
  /* Forms */
  .form-actions {
    flex-direction: column-reverse;
  }
  
  .import-export-grid {
    grid-template-columns: 1fr;
  }
  
  /* Charts & Views */
  .view-toggle {
    flex-direction: column;
    gap: 8px;
  }
  
  .view-btn {
    width: 100%;
    justify-content: center;
  }
  
  .chart-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .chart-controls select {
    width: 100%;
  }
  
  /* Column Controls */
  .column-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .column-control-menu {
    right: auto;
    left: 0;
    min-width: 260px;
  }
  
  /* Questions */
  .question-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--x0ne-spacing-xs);
  }
  
  .question-toggle {
    align-self: flex-end;
  }
  
  .question-text {
    max-width: none;
    white-space: normal;
  }
  
  .questions-unified-list {
    max-height: 70vh;
    min-height: 300px;
    padding: var(--x0ne-spacing-sm);
  }
  
  /* Themes */
  .popular-themes-grid {
    grid-template-columns: 1fr;
    max-height: 50vh;
  }
  
  .theme-buttons {
    justify-content: center;
  }
  
  /* Notifications */
  .notification {
    left: 10px;
    right: 10px;
    max-width: none;
    transform: translateY(-100%);
  }
  
  .notification-show {
    transform: translateY(0);
  }
  
  /* E-zine */
  .ascii-art {
    font-size: 0.3rem;
  }
  
  .data-label {
    width: 120px;
  }
  
  .ezine-btn {
    display: block;
    margin: var(--x0ne-spacing-sm) 0;
  }
  
  .social-item {
    flex-direction: column;
    text-align: center;
    gap: var(--x0ne-spacing-sm);
  }
  
  /* Raw E-zine */
  .ezine-raw-text,
  .raw-modal-text,
  .raw-form-content {
    font-size: 0.7rem;
    padding: 10px;
  }
  
  .raw-input,
  .raw-input-num,
  .raw-select {
    min-width: 150px;
    font-size: 0.7rem;
  }
  
  .raw-modal {
    padding: 10px;
  }
  
  .raw-modal-content {
    max-width: 100%;
  }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
  .column-control-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 120px;
  }
  
  .column-control-menu {
    min-width: 240px;
    padding: 12px;
  }
  
  .column-control-list {
    max-height: 250px;
  }
}

/* Tablet - 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .questions-unified-list {
    max-height: 75vh;
    min-height: 450px;
  }
}

/* Large screens - 1025px and above */
@media (min-width: 1025px) {
  .questions-unified-list {
    max-height: 85vh;
    min-height: 500px;
  }
}

/* Extra large screens - 1440px and above */
@media (min-width: 1440px) {
  .questions-unified-list {
    max-height: 90vh;
    min-height: 600px;
  }
}

/* =================================
   RUNNERS ADMIN - Minimaliste
   ================================= */

/* Status dot indicator */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-dot.online {
  background: rgba(74, 222, 128, 0.9);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}

.status-dot.offline {
  background: rgba(248, 113, 113, 0.6);
}

/* Runner rows */
.runner-row {
  transition: background 0.15s;
}

.runner-online {
  border-left: 3px solid rgba(74, 222, 128, 0.6);
}

.runner-offline {
  border-left: 3px solid rgba(248, 113, 113, 0.4);
}

.runner-name {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.runner-containers {
  color: rgba(74, 144, 217, 0.9);
  font-weight: 500;
}

.runner-metric {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* Container rows */
.container-row {
  transition: background 0.15s;
}

.container-running {
  border-left: 3px solid rgba(74, 222, 128, 0.5);
}

.container-stopped {
  border-left: 3px solid rgba(255, 255, 255, 0.1);
}

.container-name {
  color: rgba(74, 144, 217, 0.8);
  font-size: 0.75rem;
}

/* Template table */
.template-alias {
  color: rgba(74, 222, 128, 0.8);
  font-weight: 500;
}

.fingerprint {
  font-family: var(--x0ne-font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
}

/* Section header with count */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  border-bottom: none;
}

.section-header h2 {
  font-size: 0.8rem;
  font-weight: 400;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--x0ne-font-mono);
  text-transform: lowercase;
}

.section-count {
  font-size: 0.7rem;
  color: rgba(74, 144, 217, 0.6);
  font-family: var(--x0ne-font-mono);
}

.section-header .admin-search {
  margin-left: auto;
  width: 200px;
}

/* Runner sections spacing */
.runner-section {
  margin-bottom: 2rem;
}

/* =================================
   📊 USER STATS COLUMNS
   ================================= */

.stat-cell {
  text-align: center;
  white-space: nowrap;
}

.stat-cell .stat-value {
  font-family: var(--x0ne-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Score color coding - subtle */
.stat-cell .score-high {
  color: rgba(74, 222, 128, 0.8);
}

.stat-cell .score-mid {
  color: rgba(250, 204, 21, 0.7);
}

.stat-cell .score-low {
  color: rgba(248, 113, 113, 0.6);
}

/* Default stat value color */
.stat-cell .stat-value:not(.score-high):not(.score-mid):not(.score-low) {
  color: rgba(255, 255, 255, 0.7);
}

/* =================================
   📍 IP TRACKING COLUMN
   ================================= */

.ip-cell {
  white-space: nowrap;
}

.ip-display {
  font-family: var(--x0ne-font-mono);
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.8);
  letter-spacing: -0.02em;
}

.ip-value {
  font-family: var(--x0ne-font-mono);
  font-size: 0.75rem;
  color: rgba(74, 144, 217, 0.9);
}

/* Date cell compact */
.date-cell {
  white-space: nowrap;
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.7);
}

/* =================================
   ⚔️ WAR MODE TOGGLE
   ================================= */

/* Admin Toggle - unified, minimalist toggle component */
.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--x0ne-font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 8px;
  margin-right: 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.admin-toggle:last-of-type {
  margin-right: 16px;
}

.admin-toggle:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.03);
}

.admin-toggle-label {
  text-transform: lowercase;
}

.admin-toggle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.admin-toggle-dot.off {
  background: rgba(255, 255, 255, 0.2);
}

.admin-toggle-dot.on {
  background: rgba(74, 222, 128, 0.8);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.admin-toggle-dot.danger {
  background: rgba(248, 113, 113, 0.8);
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}

.admin-toggle-status {
  text-transform: lowercase;
  transition: color 0.15s ease;
}

.admin-toggle-status.off {
  color: rgba(255, 255, 255, 0.35);
}

.admin-toggle-status.on {
  color: rgba(74, 222, 128, 0.8);
}

.admin-toggle-status.danger {
  color: rgba(248, 113, 113, 0.8);
}

/* War mode specific - subtle red tint when active */
.admin-toggle.war-active .admin-toggle-dot {
  background: rgba(248, 113, 113, 0.8);
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}

.admin-toggle.war-active .admin-toggle-status {
  color: rgba(248, 113, 113, 0.8);
}

/* War mode table styling */
body.war-mode .users-table-container {
  background: rgba(248, 113, 113, 0.02);
  border-color: rgba(248, 113, 113, 0.1);
}

body.war-mode #usersTable thead th {
  border-bottom-color: rgba(248, 113, 113, 0.2);
}

body.war-mode .stat-cell .score-high {
  color: rgba(74, 222, 128, 1);
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

body.war-mode .stat-cell .score-mid {
  color: rgba(250, 204, 21, 1);
  text-shadow: 0 0 6px rgba(250, 204, 21, 0.4);
}

body.war-mode .stat-cell .score-low {
  color: rgba(248, 113, 113, 1);
  text-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}

/* =================================
   Admin Tabs - Reusable tab component
   ================================= */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--x0ne-font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  text-transform: lowercase;
  transition: color 0.15s ease;
}

.admin-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.15s ease;
}

.admin-tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.admin-tab.active {
  color: var(--primary-color);
}

.admin-tab.active::after {
  background: var(--primary-color);
}

.admin-tab-count {
  background: rgba(74, 144, 217, 0.15);
  color: var(--primary-color);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  margin-left: 6px;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* =================================
   Admin Forms - Textarea & Filters
   ================================= */
.admin-textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--x0ne-font-mono);
  font-size: 0.8rem;
  width: 100%;
  min-height: 100px;
  resize: vertical;
}

.admin-textarea:focus {
  outline: none;
  border-color: rgba(74, 144, 217, 0.4);
  background: rgba(74, 144, 217, 0.05);
}

.admin-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.admin-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

/* Utility text classes */
.text-success-icon {
  color: rgba(74, 144, 217, 0.6);
}

.text-danger {
  color: rgba(248, 113, 113, 0.8);
}

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

.font-mono {
  font-family: var(--x0ne-font-mono);
}

/* =================================

/* Discord tag - subtle blurple styling */
.discord-tag {
  color: rgba(88, 101, 242, 0.85);
  font-size: 0.72rem;
  letter-spacing: -0.01em;
}