/* ═══════════════════════════════════════════════════════════════
   LOTUS ACADEMY — Components
   Buttons · Cards · Forms · Tables · Badges · Modals · Charts
   ═══════════════════════════════════════════════════════════════ */

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--h-btn);
  padding: 0 var(--space-6);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Primary — Royal Purple Gradient */
.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.35), 0 0 32px rgba(139, 92, 246, 0.15);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.45s ease;
}

.btn-primary:hover:not(:disabled)::before { left: 100%; }

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(109, 40, 217, 0.45), 0 0 50px rgba(139, 92, 246, 0.25);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
}

/* Accent — Purple/Lavender */
.btn-accent {
  background: linear-gradient(135deg, #A855F7, #7C3AED);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-accent:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.55);
}

/* Secondary — Glass */
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
}

.btn-outline:hover:not(:disabled) {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(109, 40, 217, 0.12);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 12px;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-card);
  color: var(--text-main);
}

/* Semantic */
.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #ffffff;
}

/* Sizes */
.btn-sm {
  height: var(--h-btn-sm);
  padding: 0 var(--space-4);
  font-size: var(--text-xs);
  border-radius: 10px;
}

.btn-lg {
  height: var(--h-btn-lg);
  padding: 0 var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Subtle card gradient overlay */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.02) 0%, transparent 50%);
  pointer-events: none;
  border-radius: var(--radius);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Lotus petal glow for stat cards */
.stat-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lotus);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-card .stat-icon.blue   { background: rgba(109, 40, 217, 0.15); color: var(--primary-light); }
.stat-card .stat-icon.gold   { background: rgba(139, 92, 246, 0.15); color: var(--primary-light); }
.stat-card .stat-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-card .stat-icon.red    { background: rgba(239, 68, 68, 0.12);  color: var(--danger-light); }
.stat-card .stat-icon.orange { background: rgba(245, 158, 11, 0.12); color: var(--warning-light); }

.stat-card .stat-value {
  font-family: 'Sora', 'IBM Plex Mono', monospace;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.04em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: var(--leading-snug);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  min-height: var(--h-input);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: var(--leading-normal);
  transition: all 0.2s ease;
  outline: none;
}

/* RTL input clipping */
.form-input {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), 0 0 16px rgba(109, 40, 217, 0.15);
  background: var(--bg-card-elevated);
  color: var(--text-main);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted);
}

/* Light Mode Input Enhancements */
body.theme-light .form-input,
body.theme-light .form-select,
body.theme-light .form-textarea {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
}

body.theme-light .form-input::placeholder,
body.theme-light .form-textarea::placeholder {
  color: #94a3b8 !important;
}

body.theme-light .form-input:focus,
body.theme-light .form-select:focus,
body.theme-light .form-textarea:focus {
  border-color: #6D28D9 !important;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15) !important;
  background: #ffffff !important;
  color: #1E1B4B !important;
}

body.theme-light .form-input:disabled,
body.theme-light .form-select:disabled,
body.theme-light .form-textarea:disabled {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
  -webkit-text-fill-color: #475569;
}

/* Date/time picker indicator brightness for dark theme */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) brightness(1.2);
  cursor: pointer;
}
body.theme-light input[type="date"]::-webkit-calendar-picker-indicator,
body.theme-light input[type="time"]::-webkit-calendar-picker-indicator,
body.theme-light input[type="month"]::-webkit-calendar-picker-indicator {
  filter: none;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237E7E92' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
  padding-right: 14px;
}

/* ── Custom Select UI ────────────────────────────────────────── */
.custom-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  cursor: pointer;
  min-height: var(--h-input);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:focus {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  outline: none;
}

.custom-select-trigger .trigger-text {
  flex: 1;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.custom-select-trigger .trigger-icon {
  margin-right: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-trigger .trigger-icon {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-elevated);
  z-index: 1000;
  display: none;
  padding: 4px 0;
  backdrop-filter: blur(12px);
}

.custom-select-wrapper.open .custom-select-options {
  display: block;
  animation: dropdownIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.custom-select-option {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-main);
  transition: background var(--transition);
}

.custom-select-option:hover {
  background: rgba(139, 92, 246, 0.12);
}

.custom-select-option.selected {
  background: rgba(109, 40, 217, 0.18);
  color: var(--primary-light);
  font-weight: 600;
}

.filters-bar .custom-select-wrapper {
  width: auto;
  min-width: max-content;
  max-width: 100%;
  flex: 0 1 auto;
}

@media (max-width: 768px) {
  .custom-select-options { min-width: 100%; }
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  white-space: pre-wrap;
  overflow: auto;
  text-overflow: clip;
}

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 4px;
}

/* ── Modal System (Light & Dark Theme) ───────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 8, 20, 0.82);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.theme-light .modal-overlay {
  background: rgba(11, 8, 20, 0.45);
}

.modal-content {
  background: #140E26;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(109, 40, 217, 0.25);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
}

body.theme-light .modal-content {
  background: #FFFFFF;
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 20px 50px rgba(109, 40, 217, 0.16), 0 4px 16px rgba(0, 0, 0, 0.05);
  color: #1E1B4B;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.18);
  background: rgba(24, 17, 46, 0.6);
  color: #ffffff;
}

body.theme-light .modal-header {
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
  background: linear-gradient(135deg, #FAF5FF 0%, #F5EEFF 100%);
  color: #1E1B4B;
}

.modal-header h3 {
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0;
  color: inherit;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

body.theme-light .modal-close-btn {
  color: #64748b;
}

body.theme-light .modal-close-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.modal-body {
  padding: 24px;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
  color: inherit;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-light .modal-actions {
  border-top: 1px solid #e2e8f0;
}

.modal-body .table-container {
  overflow-x: auto;
  max-width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* ── Tables ──────────────────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: right;
  white-space: nowrap;
}

.data-table th {
  background: rgba(139, 92, 246, 0.08);
  color: var(--text-muted);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
}

/* Round first and last th */
.data-table thead tr th:first-child {
  border-radius: 0 var(--radius) 0 0;
}
.data-table thead tr th:last-child {
  border-radius: var(--radius) 0 0 0;
}

body.lang-fr .data-table thead tr th:first-child {
  border-radius: var(--radius) 0 0 0;
}
body.lang-fr .data-table thead tr th:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.data-table td {
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.06);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-success { background: rgba(16, 185, 129, 0.12); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-danger  { background: rgba(239, 68, 68, 0.1);   color: var(--danger-light); border: 1px solid rgba(239, 68, 68, 0.18); }
.badge-warning { background: rgba(245, 158, 11, 0.1);  color: var(--warning-light); border: 1px solid rgba(245, 158, 11, 0.18); }
.badge-info    { background: rgba(139, 92, 246, 0.12); color: var(--primary-light); border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-muted   { background: rgba(126, 126, 146, 0.1); color: var(--text-muted); border: 1px solid var(--border); }
.badge-primary { background: rgba(109, 40, 217, 0.15); color: var(--primary-light); border: 1px solid rgba(139, 92, 246, 0.25); }
.badge-lotus   { background: rgba(167, 139, 250, 0.15); color: var(--primary-light); border: 1px solid rgba(167, 139, 250, 0.25); }

/* ── Progress Bar ────────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar .fill.green  { background: linear-gradient(90deg, #10B981, #34D399); }
.progress-bar .fill.gold   { background: var(--brand-gradient); }
.progress-bar .fill.red    { background: linear-gradient(90deg, #EF4444, #F87171); }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 72px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  opacity: 0.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state .title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.empty-state .description {
  font-size: 0.88rem;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Loading Skeleton ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    rgba(139, 92, 246, 0.08) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text  { height: 16px; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-card  { height: 120px; }

/* ── Filters Bar ─────────────────────────────────────────────── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.filters-bar .search-input {
  flex: 1;
  min-width: 200px;
  max-width: 350px;
}

.filters-bar .form-select {
  width: auto;
  min-width: max-content;
  max-width: 100%;
  flex: 0 1 auto;
}

.filters-bar .form-input:not(.search-input) {
  width: auto;
  min-width: 170px;
}

.filters-bar .filter-label,
.filters-bar label {
  display: inline-block;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.3;
  max-width: 100%;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pagination .page-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
}

.pagination .page-btn:hover {
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--text-main);
  background: rgba(109, 40, 217, 0.1);
}

.pagination .page-btn.active {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.4);
}

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.01em;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(139, 92, 246, 0.08);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
  background: rgba(139, 92, 246, 0.12);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* ── Schedule Grid ───────────────────────────────────────────── */
.schedule-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.schedule-grid .header-cell,
.schedule-grid .time-cell,
.schedule-grid .session-cell {
  padding: 10px 8px;
  background: var(--bg-card);
  font-size: 0.8rem;
}

.schedule-grid .header-cell {
  background: rgba(109, 40, 217, 0.1);
  font-weight: 700;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schedule-grid .time-cell {
  font-family: 'Sora', monospace;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}

.schedule-grid .session-cell.has-session {
  background: rgba(109, 40, 217, 0.12);
  border-right: 3px solid var(--accent);
  cursor: pointer;
  transition: background 0.15s ease;
}

.schedule-grid .session-cell.has-session:hover {
  background: rgba(109, 40, 217, 0.22);
}

.schedule-grid .session-cell .course-name {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-main);
}

.schedule-grid .session-cell .room-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Keyframe Animations ─────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade  { animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-slide { animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-down  { animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* ── LTR Overrides (French: body.lang-fr) ───────────────────── */
body.lang-fr .data-table th,
body.lang-fr .data-table td { text-align: left; }

body.lang-fr .form-select {
  background-position: right 12px center;
  padding-right: 36px;
  padding-left: 14px;
}

body.lang-fr .custom-select-trigger { text-align: left; }

body.lang-fr .custom-select-trigger .trigger-icon {
  margin-right: 0;
  margin-left: 8px;
}

body.lang-fr .custom-select-options {
  right: auto;
  left: 0;
}

body.lang-fr .schedule-grid .session-cell.has-session {
  border-right: none;
  border-left: 3px solid var(--accent);
}

/* ── Fix filter height alignment ─────────────────────────────── */
.payments-filters .form-input,
.filters-bar .form-input {
  height: 40px !important;
}

.payments-filters .form-select,
.card .filters-bar .form-select,
.filters-bar .form-select {
  height: 40px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: normal !important;
  min-width: max-content !important;
  white-space: nowrap !important;
}

/* ── Notifications Dropdown System (Light & Dark Theme) ───────── */
#notifications-dropdown {
  display: none;
  position: fixed;
  top: 70px;
  left: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  border-radius: var(--radius, 16px);
  z-index: 1000;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  background: var(--bg-card-elevated, #101826);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  color: var(--text-main, #ffffff);
}

body.lang-fr #notifications-dropdown {
  left: auto;
  right: 20px;
}

/* Light Theme overrides for Notifications */
body.theme-light #notifications-dropdown {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

.notifications-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

body.theme-light .notifications-header {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.notifications-header-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

body.theme-light .notifications-header-title {
  color: #0f172a;
}

.notification-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
  background: rgba(139, 92, 246, 0.08);
  border-right: 3px solid var(--primary);
}

body.lang-fr .notification-item.unread {
  border-right: none;
  border-left: 3px solid var(--primary);
}

body.theme-light .notification-item {
  border-bottom: 1px solid #f1f5f9;
}

body.theme-light .notification-item:hover {
  background: #f1f5f9;
}

body.theme-light .notification-item.unread {
  background: #FAF5FF;
  border-right-color: #6D28D9;
}

body.theme-light.lang-fr .notification-item.unread {
  border-left-color: #6D28D9;
}

.notification-item .notif-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

body.theme-light .notification-item .notif-title {
  color: #0f172a;
}

.notification-item.read .notif-title {
  font-weight: 500;
  opacity: 0.85;
}

.notification-item .notif-msg {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

body.theme-light .notification-item .notif-msg {
  color: #334155;
}

.notification-item .notif-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.theme-light .notification-item .notif-date {
  color: #64748b;
}

