/* ============================================
   NEUROVENDAS COM BASTOS — Premium Dark Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Poppins:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --bg-dark: #0a0a0a;
  --bg-surface: #141414;
  --bg-card: #1c1c1c;
  --bg-card-hover: #242424;
  --bg-input: #1a1a1a;
  --gold: #c9a84c;
  --gold-light: #dbb85c;
  --gold-dim: rgba(201,168,76,0.15);
  --gold-glow: rgba(201,168,76,0.3);
  --text: #f0f0f0;
  --text-secondary: #999;
  --text-muted: #666;
  --success: #4caf50;
  --success-dim: rgba(76,175,80,0.15);
  --error: #e53935;
  --error-dim: rgba(229,57,53,0.15);
  --warning: #ff9800;
  --warning-dim: rgba(255,152,0,0.15);
  --info: #2196f3;
  --info-dim: rgba(33,150,243,0.15);
  --border: #2a2a2a;
  --border-light: #333;
  --sidebar-w: 300px;
  --navbar-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

::selection { background: var(--gold); color: var(--bg-dark); }

/* ── Login Page ── */
.login-page {
  display: flex;
  min-height: 100vh;
}

.login-hero {
  flex: 1;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, var(--gold-dim) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(5%, 3%); }
}

.login-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 500px;
}

.login-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.login-hero .tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  text-align: left;
}

.login-form-side {
  width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
}

.login-form-side h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.login-form-side .form-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.9rem;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-family: 'Montserrat', sans-serif;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #0a0a0a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--gold-glow);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold);
}

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

.btn-danger:hover {
  background: #c62828;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  padding: 8px 16px;
}

.btn-ghost:hover { background: var(--gold-dim); }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Layout: Navbar ── */
.navbar {
  height: var(--navbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.navbar-brand .brand-gold {
  color: var(--gold);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-user .user-name {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.navbar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ── Layout: Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-header h2 {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.sidebar-header .course-progress {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Sidebar: Module Tree ── */
.module-item {
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.module-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.module-header:hover { background: rgba(255,255,255,0.03); }

.module-header.active { background: var(--gold-dim); }

.module-header .module-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: 'Montserrat', sans-serif;
}

.module-header .module-info { flex: 1; min-width: 0; }

.module-header .module-title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Montserrat', sans-serif;
}

.module-header .module-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.module-header .module-chevron {
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.module-header.expanded .module-chevron { transform: rotate(90deg); }

.module-header .module-check {
  color: var(--success);
  flex-shrink: 0;
}

.module-lessons {
  display: none;
  padding: 0 0 4px 0;
}

.module-lessons.show { display: block; }

.lesson-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 8px 58px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.lesson-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.02);
}

.lesson-link.active {
  color: var(--gold);
  background: var(--gold-dim);
}

.lesson-link.completed { color: var(--success); }

.lesson-link .lesson-status {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.lesson-link.completed .lesson-status {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

.lesson-link.active .lesson-status {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--bg-dark);
}

.lesson-link .lesson-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--navbar-h);
  padding: 32px;
  min-height: calc(100vh - var(--navbar-h));
}

/* ── Video Player ── */
.video-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.video-container .video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.video-container .video-wrapper iframe,
.video-container .video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  color: var(--text-muted);
  gap: 12px;
}

.video-placeholder .icon { font-size: 3rem; opacity: 0.3; }
.video-placeholder p { font-size: 0.9rem; }

/* ── Lesson Info ── */
.lesson-info {
  max-width: 960px;
  margin: 0 auto;
}

.lesson-info .lesson-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.lesson-info h2 {
  font-size: 1.4rem;
}

.lesson-info .lesson-module-badge {
  font-size: 0.75rem;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.lesson-info .lesson-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.7;
}

.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 960px;
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.card:hover { border-color: var(--border-light); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 1rem;
}

/* ── Stats Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-card .stat-icon.gold { background: var(--gold-dim); }
.stat-card .stat-icon.green { background: var(--success-dim); }
.stat-card .stat-icon.blue { background: var(--info-dim); }
.stat-card .stat-icon.orange { background: var(--warning-dim); }

.stat-card .stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Progress Bar ── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-bar.lg { height: 10px; border-radius: 5px; }
.progress-bar.lg .progress-fill { border-radius: 5px; }

.progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ── Tables ── */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 14px 16px;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

tbody tr { transition: var(--transition); }
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

.badge-gold { background: var(--gold-dim); color: var(--gold); }
.badge-green { background: var(--success-dim); color: var(--success); }
.badge-red { background: var(--error-dim); color: var(--error); }
.badge-blue { background: var(--info-dim); color: var(--info); }
.badge-orange { background: var(--warning-dim); color: var(--warning); }
.badge-muted { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1.1rem; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.modal-close:hover { color: var(--text); }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Tabs (Admin) ── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

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

/* ── Admin Sidebar Nav ── */
.admin-nav { list-style: none; padding: 8px 0; }

.admin-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

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

.admin-nav li a.active {
  color: var(--gold);
  background: var(--gold-dim);
  border-left-color: var(--gold);
}

.admin-nav li a .nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }

/* ── Search ── */
.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
  outline: none;
}

.search-box input:focus { border-color: var(--gold); }

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Toggle Switch ── */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

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

.toggle .slider {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: var(--transition);
}

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

.toggle input:checked + .slider {
  background: var(--gold);
  border-color: var(--gold);
}

.toggle input:checked + .slider::before {
  background: var(--bg-dark);
  transform: translateX(20px);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; margin-bottom: 24px; }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 300px;
  animation: toastIn 0.3s ease;
  font-size: 0.9rem;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast.warning { border-left: 3px solid var(--warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Loading ── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  gap: 16px;
}

.loading-screen .loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-screen p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Section Headers ── */
.section-header {
  margin-bottom: 24px;
}

.section-header h1 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Part Separator ── */
.part-separator {
  padding: 8px 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  background: rgba(201,168,76,0.05);
  border-bottom: 1px solid var(--border);
}

/* ── Welcome Card ── */
.welcome-card {
  background: linear-gradient(135deg, rgba(201,168,76,0.1) 0%, rgba(201,168,76,0.02) 100%);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}

.welcome-card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.welcome-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Dropdown ── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  min-width: 180px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 500;
}

.dropdown-menu.show { display: block; }

.dropdown-menu a,
.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

/* ── Utilities ── */
.text-gold { color: var(--gold) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-error { color: var(--error) !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.75rem; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
  }
  .sidebar.open ~ .sidebar-backdrop { display: block; }

  .navbar { left: 0; }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }

  .login-page { flex-direction: column; }
  .login-hero { padding: 32px 24px; min-height: 40vh; }
  .login-hero h1 { font-size: 1.8rem; }
  .login-form-side {
    width: 100%;
    padding: 32px 24px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 768px) {
  .main-content { padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .lesson-nav { flex-direction: column; }
  .lesson-nav .btn { width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .grid-2 { grid-template-columns: 1fr; }
  .modal { margin: 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-hero { min-height: 30vh; padding: 24px 16px; }
  .login-hero h1 { font-size: 1.5rem; }
}
