/* ============================================
   THEME ÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂEN - VÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂNG  v2
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-soft: #141414;
  --bg-card: #1a1a1a;
  --bg-hover: #222222;
  --border: #2a2a2a;
  --border-soft: #1f1f1f;
  --text: #ffffff;
  --text-soft: #b8b8b8;
  --text-mute: #6b6b6b;
  --accent: #d4af6e;
  --accent-dark: #b8923f;
  --accent-soft: rgba(212, 175, 110, 0.12);
  --success: #4ade80;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-yellow: 0 4px 16px rgba(212, 175, 110, 0.2);
  --transition: 0.2s ease;
  --font-serif: "Playfair Display", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dark); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  width: 100%;
  transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

.logo-mark {
  background: var(--accent);
  color: #000;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-header:hover { border-color: var(--accent); color: var(--accent); }

.btn-header.danger:hover { border-color: var(--danger); color: var(--danger); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  font-size: 13px;
}

.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
}

.user-chip .badge {
  background: var(--accent);
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

/* ============================================
   AUTH (LOGIN PAGE)
   ============================================ */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 214, 10, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 214, 10, 0.06) 0%, transparent 50%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--accent);
  color: #000;
  border-radius: 16px;
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 24px;
}

.auth-card h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text);
}

.auth-card h1 span { color: var(--accent); 
  font-style: italic;
  font-weight: 700;
}

.auth-subtitle {
  color: var(--text-soft);
  margin-bottom: 32px;
}

.btn-google {
  width: 100%;
  background: #fff;
  color: #000;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-google:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
}

.btn-google svg { width: 20px; height: 20px; }

.auth-note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-mute);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}
.page-title .accent { color: var(--accent); 
  font-style: italic;
}

.page-subtitle {
  color: var(--text-soft);
  font-size: 16px;
  margin-bottom: 32px;
}

/* ============================================
   COURSE CARDS (HOMEPAGE)
   ============================================ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-yellow);
}

.course-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: var(--accent);
  position: relative;
  overflow: hidden;
}

.course-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 214, 10, 0.15) 0%, transparent 60%);
}

.course-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-level {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  align-self: flex-start;
}

.course-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.course-desc {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
}

.course-progress-bar {
  height: 6px;
  background: var(--border-soft);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.course-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

/* ============================================
   COURSE PAGE LAYOUT
   ============================================ */
.course-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 80px);
}

.sidebar {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mute);
  margin-bottom: 8px;
}

.sidebar-course-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.progress-block {
  background: var(--bg-card);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.progress-percent { color: var(--accent); font-weight: 700; }

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width 0.4s ease;
}

.lesson-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.lesson-item:hover:not(.locked) { background: var(--bg-hover); }

.lesson-item.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.lesson-item.locked { opacity: 0.5; cursor: not-allowed; }

.lesson-status {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--border);
  color: var(--text-mute);
}

.lesson-item.completed .lesson-status,
.lesson-item.active .lesson-status {
  background: var(--accent);
  color: #000;
}

.lesson-item.locked .lesson-status { background: var(--bg-card); }

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

.lesson-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-item.locked .lesson-name { color: var(--text-mute); }

.lesson-duration { font-size: 12px; color: var(--text-mute); }

/* ============================================
   MAIN CONTENT (VIDEO + INFO)
   ============================================ */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.video-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  aspect-ratio: 16 / 9;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-mute);
  text-align: center;
  padding: 24px;
}

.video-placeholder .icon { font-size: 64px; color: var(--accent); opacity: 0.5; }

.lesson-content {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

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

.lesson-title-big {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.lesson-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.lesson-badge.done {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}

.lesson-description {
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 20px;
}

.timer-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-soft);
}

.timer-info.ready {
  border-color: var(--success);
  color: var(--success);
}

.timer-icon { font-size: 20px; }

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.nav-buttons {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-primary:disabled {
  background: var(--border); color: var(--text-mute);
  cursor: not-allowed; transform: none;
}

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

.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.25); border-color: var(--danger); }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
.mobile-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
  width: 100%;
  text-align: left;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-mute);
  grid-column: 1 / -1;
}

.empty-state .icon {
  font-size: 64px;
  color: var(--accent);
  margin-bottom: 16px;
}

.empty-state p { margin-bottom: 16px; }

/* ============================================
   ADMIN PAGE
   ============================================ */
.admin-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  width: fit-content;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-soft);
  transition: var(--transition);
}

.admin-tab:hover { color: var(--text); }

.admin-tab.active {
  background: var(--accent);
  color: #000;
}

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

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

.admin-card-title {
  font-size: 18px;
  font-weight: 700;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Lesson row in admin */
.admin-lesson-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  align-items: center;
}

.admin-lesson-row .num {
  background: var(--accent);
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.admin-lesson-info { min-width: 0; }
.admin-lesson-info .name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-lesson-info .meta {
  font-size: 12px;
  color: var(--text-mute);
}

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.form-row.single { grid-template-columns: 1fr; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.form-help {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 4px;
}

.form-help code {
  background: var(--bg-card);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--accent);
}

/* Users table */
.users-table {
  width: 100%;
  border-collapse: collapse;
}
.users-table th, .users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.users-table th {
  background: var(--bg-card);
  font-weight: 700;
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.users-table tr:hover td { background: var(--bg-hover); }

.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.role-badge.admin { background: var(--accent); color: #000; }
.role-badge.user { background: var(--border); color: var(--text-soft); }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h2 { font-size: 18px; }

.modal-close {
  background: transparent;
  font-size: 24px;
  color: var(--text-mute);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--bg-card); color: var(--text); }

.modal-body { padding: 24px; }

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

/* ============================================
   LOADING / SPINNER
   ============================================ */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 16px;
  color: var(--text-mute);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .course-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
    order: 2;
  }

  .main-content { order: 1; }

  .mobile-toggle { display: block; order: 1; }

  .sidebar.collapsed { display: none; }

  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container, .admin-layout { padding: 20px 16px; }

  .course-layout { padding: 16px; }

  .page-title { font-size: 24px; }

  .lesson-title-big { font-size: 20px; }

  .header-inner { padding: 0 4px; }

  .logo { font-size: 16px; }

  .course-grid { grid-template-columns: 1fr; gap: 16px; }

  .action-row { flex-direction: column; align-items: stretch; }

  .nav-buttons { width: 100%; }

  .nav-buttons .btn { flex: 1; justify-content: center; }

  .btn { width: 100%; justify-content: center; }

  .user-chip .name { display: none; }

  .users-table th:nth-child(3),
  .users-table td:nth-child(3) { display: none; }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  margin-top: 64px;
}

/* ============================================
   LANDING PAGE ÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ public, before login
   ============================================ */
.landing-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, rgba(255, 214, 10, 0.08), transparent 60%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.landing-loading {
  text-align: center;
  color: var(--text-mute);
}

.landing-wrap {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 36px 36px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}

.landing-logo {
  width: 64px;
  height: 64px;
  background: var(--accent);
  color: #000;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 900;
  font-family: "Arial Black", sans-serif;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-yellow);
}

.landing-card h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}
.landing-card h1 .accent { color: var(--accent); 
  font-style: italic;
}

.landing-subtitle {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 32px;
}

.landing-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.landing-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: left;
  text-decoration: none;
  transition: var(--transition);
  background: var(--bg-soft);
}

.landing-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--bg-hover);
}

.landing-btn.register-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}
.landing-btn.register-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #000;
  box-shadow: var(--shadow-yellow);
}

.landing-btn.login-btn {
  color: var(--text);
}
.landing-btn.login-btn:hover {
  color: var(--text);
}

.landing-btn-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
}
.landing-btn.login-btn .landing-btn-icon {
  background: var(--accent-soft);
}

.landing-btn-content {
  flex: 1;
}

.landing-btn-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}

.landing-btn-desc {
  font-size: 13px;
  opacity: 0.75;
}

.landing-note {
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.5;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .landing-card {
    padding: 32px 22px 24px;
  }
  .landing-card h1 {
    font-size: 22px;
  }
  .landing-btn {
    padding: 14px 16px;
    gap: 12px;
  }
  .landing-btn-icon {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  .landing-btn-title { font-size: 15px; }
}

/* ============================================
   24H LESSON LOCK FEATURE
   ============================================ */
.lesson-item.expired {
  opacity: 0.65;
  cursor: not-allowed;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}
.lesson-item.expired .lesson-status {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}
.lesson-item.expired .lesson-name {
  color: var(--text-mute);
  text-decoration: line-through;
}

.lesson-countdown {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.lesson-countdown.urgent {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
}
.lesson-expired-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}

.expired-notice {
  text-align: center;
  padding: 48px 24px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
}
.expired-notice .icon { font-size: 56px; color: var(--danger); margin-bottom: 16px; }
.expired-notice h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--danger);
  margin-bottom: 12px;
}
.expired-notice p { color: var(--text-soft); margin-bottom: 8px; }

.admin-locked-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
}
.admin-locked-row .info { flex: 1; min-width: 0; }
.admin-locked-row .info .name { font-weight: 600; }
.admin-locked-row .info .meta { font-size: 11px; color: var(--text-mute); }
.admin-locked-row .btn { white-space: nowrap; }


/* ============================================
   VIP LESSONS + PAYMENT MODAL
   ============================================ */
.lesson-vip-tag {
  display: inline-block;
  font-size: 11px;
  color: #000;
  background: linear-gradient(135deg, #e8c887, var(--accent));
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(212, 175, 110, 0.3);
}

.lesson-item.vip-locked {
  border-color: var(--accent);
  background: rgba(212, 175, 110, 0.08);
}
.lesson-item.vip-locked .lesson-status {
  background: linear-gradient(135deg, #e8c887, var(--accent));
  color: #000;
  font-size: 18px;
}

.vip-notice {
  text-align: center;
  padding: 32px 24px;
  background: linear-gradient(135deg, rgba(212, 175, 110, 0.08), rgba(212, 175, 110, 0.03));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}
.vip-notice h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 16px;
}
.vip-notice .vip-price {
  font-family: var(--font-serif);
  font-size: 36px;
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
  margin: 16px 0;
}
.vip-notice .vip-instructions {
  color: var(--text-soft);
  margin-bottom: 20px;
  line-height: 1.7;
}
.vip-notice .vip-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 14px;
}
.vip-notice.pending {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.03));
  border-color: var(--info);
}
.vip-notice.pending h3 { color: var(--info); }
.vip-warn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
}

.modal.payment-modal { max-width: 480px; }
.payment-qr-wrap {
  text-align: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.payment-qr { width: 100%; max-width: 300px; height: auto; }
.payment-info {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
}
.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--border);
}
.payment-row:last-child { border-bottom: none; }
.payment-row.highlight strong { color: var(--accent); font-size: 16px; }
.payment-note {
  font-size: 13px;
  color: var(--text-soft);
  background: rgba(212, 175, 110, 0.06);
  padding: 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.payment-row-admin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(212, 175, 110, 0.06);
  border: 1px solid rgba(212, 175, 110, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.payment-row-admin .info { flex: 1; min-width: 0; }
.payment-row-admin .info .name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.payment-row-admin .info .meta {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 4px;
}
.payment-row-admin .payment-content code {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: monospace;
  color: var(--accent);
}
.payment-row-admin .payment-amount {
  color: var(--accent);
  font-weight: 700;
  background: rgba(212, 175, 110, 0.15);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 13px;
}
.payment-row-admin .payment-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.payment-count {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  margin-left: 8px;
  font-weight: 700;
}


/* === Payment type badge & Course VIP === */
.payment-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 8px;
  vertical-align: middle;
}
.payment-type-badge.course {
  background: linear-gradient(135deg, #d4af6e, #8b6b3a);
  color: #000;
}
.payment-type-badge.lesson {
  background: rgba(212, 175, 110, 0.15);
  color: #d4af6e;
  border: 1px solid rgba(212, 175, 110, 0.3);
}
.vip-notice.course-vip {
  border: 2px solid rgba(212, 175, 110, 0.4);
  background: linear-gradient(135deg, rgba(42, 31, 10, 0.6), rgba(20, 20, 20, 0.6));
}


/* === Revenue stats cards === */
.revenue-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.stat-label {
  color: var(--text-mute);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  margin: 6px 0;
  color: #fff;
}
.stat-value.accent { color: #d4af6e; }
.stat-value.warn { color: #fbbf24; }
.stat-value.mute { color: var(--text-mute); }
.stat-sub {
  font-size: 11px;
  color: var(--text-mute);
}

/* === Filter buttons === */
.payments-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: 0.2s ease;
}
.filter-btn:hover {
  border-color: #d4af6e;
  color: #d4af6e;
}
.filter-btn.active {
  background: #d4af6e;
  color: #000;
  border-color: #d4af6e;
  font-weight: 700;
}

/* === Status badges === */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.status-badge.success { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.status-badge.warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.status-badge.danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* === User row hover === */
.user-row:hover {
  background: rgba(212, 175, 110, 0.05) !important;
}

/* === Modal large === */
.modal.modal-large {
  max-width: 720px;
  width: 90%;
}
.user-detail-header {
  background: rgba(212, 175, 110, 0.05);
  border: 1px solid rgba(212, 175, 110, 0.2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: grid;
  gap: 6px;
}
.user-detail-header > div { font-size: 14px; }
.detail-section {
  margin-bottom: 22px;
}
.detail-section h3 {
  font-size: 14px;
  color: #d4af6e;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.detail-list li {
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  font-size: 13px;
}


/* === Course card VIP overlay (landing home.html) === */
.course-card { position: relative; }
.course-vip-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.course-vip-overlay.course-vip-full {
  background: linear-gradient(135deg, #d4af6e, #8b6b3a);
  color: #000;
}
.course-vip-overlay.course-vip-full strong {
  font-size: 14px;
  margin-top: 2px;
}
.course-vip-overlay.course-vip-partial {
  background: rgba(212, 175, 110, 0.15);
  color: #d4af6e;
  border: 1px solid rgba(212, 175, 110, 0.4);
  backdrop-filter: blur(6px);
}
.course-card.vip-course {
  border: 2px solid rgba(212, 175, 110, 0.4);
}
.course-card.vip-course:hover {
  border-color: #d4af6e;
  box-shadow: 0 8px 24px rgba(212, 175, 110, 0.2);
}

/* === Timer paused hint === */
.timer-paused-hint {
  display: none;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}

/* === Auto-approved payment row === */
.payment-row-admin.auto-approved {
  border-left: 4px solid #fbbf24;
  background: rgba(251, 191, 36, 0.04);
}


/* === Leaderboard (v3 — clean redesign) === */
.leaderboard-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}
.leaderboard-header {
  text-align: center;
  margin-bottom: 28px;
}
.leaderboard-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 50px;
}
.lb-tab {
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}
.lb-tab:hover { color: #d4af6e; border-color: #d4af6e; }
.lb-tab.active {
  background: linear-gradient(135deg, #d4af6e, #8b6b3a);
  color: #000;
  border-color: #d4af6e;
}

/* Podium: 3 cards 2-1-3, all clean inside, NO floating icons */
.leaderboard-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin: 0 auto 36px;
  max-width: 760px;
}
.podium-slot {
  position: relative;
  border-radius: 16px;
  padding: 28px 18px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(30,30,30,0.7), rgba(15,15,15,0.95));
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: 0.25s ease;
}
.podium-slot.first {
  background: linear-gradient(180deg, rgba(212,175,110,0.18), rgba(40,28,8,0.95));
  border: 2px solid rgba(212,175,110,0.55);
  box-shadow: 0 12px 30px rgba(212,175,110,0.18);
}
.podium-slot.second {
  background: linear-gradient(180deg, rgba(192,197,208,0.15), rgba(30,32,38,0.95));
  border: 1.5px solid rgba(192,197,208,0.4);
}
.podium-slot.third {
  background: linear-gradient(180deg, rgba(205,127,50,0.15), rgba(38,28,18,0.95));
  border: 1.5px solid rgba(205,127,50,0.4);
}

/* Inline rank badge at top of card */
.podium-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.podium-slot.first .podium-rank-pill {
  background: linear-gradient(135deg, #d4af6e, #8b6b3a);
  color: #000;
}
.podium-slot.second .podium-rank-pill {
  background: linear-gradient(135deg, #c0c5d0, #6e7282);
  color: #1a1a1a;
}
.podium-slot.third .podium-rank-pill {
  background: linear-gradient(135deg, #cd7f32, #7a4a1a);
  color: #fff;
}

/* Number circle */
.podium-num-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.04);
  border: 2px solid currentColor;
}
.podium-slot.first .podium-num-circle { color: #d4af6e; }
.podium-slot.second .podium-num-circle { color: #c0c5d0; }
.podium-slot.third .podium-num-circle { color: #cd7f32; }

.podium-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fff;
  margin: 6px 0 14px;
  min-height: 36px;
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: break-word;
}
.podium-slot.first .podium-name { font-size: 15px; }

.podium-score-main {
  font-size: 30px;
  font-weight: 800;
  color: #d4af6e;
  letter-spacing: -0.5px;
  line-height: 1;
}
.podium-slot.first .podium-score-main { font-size: 36px; }
.podium-stat-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}
.podium-mini-stats {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 10px;
}

/* Hide old leftover classes from v1/v2 */
.podium-medal, .podium-avatar, .podium-rank, .podium-score { display: none; }
.podium-slot::before { display: none !important; }

.lb-table {
  width: 100%; border-collapse: collapse;
  background: rgba(255,255,255,0.02);
  border-radius: 10px; overflow: hidden;
}
.lb-table th, .lb-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.lb-table th { color: var(--text-mute); font-size: 12px; text-transform: uppercase; }
.lb-table tr.me-row { background: rgba(212,175,110,0.08); }
.lb-table tr.me-row td { color: #d4af6e; font-weight: 600; }

.my-rank-card {
  position: fixed;
  bottom: 20px;
  right: 24px;
  width: 320px;
  max-width: calc(100vw - 32px);
  z-index: 80;
}
.my-rank-inner {
  background: linear-gradient(135deg, #2a1f0a 0%, #1a1305 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212,175,110,0.5);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.7);
}
.my-rank-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: .5px; }
.my-rank-value { font-size: 26px; font-weight: 800; color: #d4af6e; line-height: 1; margin-top: 2px; }
.my-rank-score { font-size: 18px; font-weight: 700; color: #f4eddf; white-space: nowrap; }
.my-rank-breakdown { font-size: 11px; color: #999; flex: 1; }

@media (max-width: 768px) {
  .my-rank-card {
    left: 14px;
    right: 14px;
    width: auto;
    bottom: 14px;
  }
  .my-rank-inner { padding: 12px 14px; gap: 10px; }
  .my-rank-value { font-size: 22px; }
  .my-rank-score { font-size: 16px; }
}

/* === Score formula card === */
.formula-card {
  background: rgba(212,175,110,0.04);
  border: 1px solid rgba(212,175,110,0.2);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.7;
}
.formula-card h3 {
  font-size: 14px;
  color: #d4af6e;
  margin: 0 0 12px;
  font-weight: 700;
}
.formula-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.formula-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.formula-list strong { color: #d4af6e; font-weight: 700; }
.formula-list .neg { color: #ef4444; }

@media (max-width: 700px) {
  .leaderboard-podium { grid-template-columns: 1fr; gap: 16px; }
  .my-rank-inner { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .my-rank-breakdown { text-align: center; }
}

/* === LOCKSCREEN OVERLAY (full-page) === */
.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: lockFadeIn 0.3s ease;
}
@keyframes lockFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lock-overlay-inner {
  max-width: 480px;
  text-align: center;
  background: linear-gradient(180deg, rgba(212,175,110,0.08), rgba(20,20,20,0.6));
  border: 1px solid rgba(212,175,110,0.3);
  border-radius: 18px;
  padding: 40px 32px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lock-icon-big {
  width: 110px;
  height: 130px;
  margin: 0 auto 22px;
  color: #d4af6e;
  filter: drop-shadow(0 4px 16px rgba(212,175,110,0.4));
}
.lock-icon-big svg { width: 100%; height: 100%; }
.lock-title {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 14px;
  color: #fff;
}
.lock-subtitle {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0 0 10px;
}
.lock-hint {
  font-size: 13px;
  color: var(--text-mute);
  margin: 8px 0 0;
}
.lock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}
.lock-actions .btn {
  padding: 10px 22px;
  font-weight: 600;
}

/* === LEADERBOARD PODIUM v2 (kiểu ảnh tham chiếu) === */
.leaderboard-podium {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 14px;
  align-items: end;
  margin: 30px auto 40px;
  max-width: 700px;
  padding: 0 12px;
}
.podium-slot {
  position: relative;
  background: linear-gradient(180deg, rgba(40,40,40,0.5), rgba(15,15,15,0.85));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 50px 16px 24px;
  text-align: center;
  transition: 0.25s ease;
}

/* Medal/cup floating above card */
.podium-slot::before {
  content: "";
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.podium-slot.first {
  border: 2px solid rgba(212,175,110,0.5);
  background: linear-gradient(180deg, rgba(212,175,110,0.12), rgba(20,20,20,0.9));
  padding-top: 64px;
  transform: translateY(-30px);
  box-shadow: 0 10px 40px rgba(212,175,110,0.2);
}
.podium-slot.first::before {
  width: 80px; height: 80px; top: -54px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 80"><path d="M16 8v22a16 16 0 0032 0V8H16z" fill="%23d4af6e"/><path d="M14 14H4v8a10 10 0 0010 10V14zM50 14h10v8a10 10 0 01-10 10V14z" stroke="%23d4af6e" stroke-width="3" fill="none"/><path d="M26 52h12v8h6v6H20v-6h6v-8z" fill="%23d4af6e"/></svg>');
}
.podium-slot.second::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 80"><path d="M32 8L20 22h-8l-4 16h12v6h24v-6h12L52 22h-8L32 8z" fill="%23c0c5d0"/><circle cx="32" cy="50" r="18" fill="%23dde0e8" stroke="%23a0a8b8" stroke-width="2"/><text x="32" y="56" text-anchor="middle" font-size="20" font-weight="bold" fill="%23495162">2</text></svg>');
}
.podium-slot.third::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 80"><path d="M32 8L20 22h-8l-4 16h12v6h24v-6h12L52 22h-8L32 8z" fill="%23cd7f32"/><circle cx="32" cy="50" r="18" fill="%23d97732" stroke="%23a05a1f" stroke-width="2"/><text x="32" y="56" text-anchor="middle" font-size="20" font-weight="bold" fill="%23fff">3</text></svg>');
}

/* Big number circle inside card */
.podium-num-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin: 0 auto 14px;
  color: #fff;
}
.podium-slot.first .podium-num-circle {
  background: rgba(212,175,110,0.15);
  border-color: #d4af6e;
  color: #d4af6e;
}

.podium-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 8px 0 12px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.podium-score-main {
  font-size: 24px;
  font-weight: 800;
  color: #d4af6e;
  letter-spacing: -0.5px;
}
.podium-slot.first .podium-score-main { font-size: 28px; }
.podium-stat-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}
.podium-medal { display: none; } /* hide old emoji */
.podium-avatar { display: none; }
.podium-rank { display: none; }
.podium-score { display: none; }

/* === Score formula explainer === */
.formula-card {
  background: rgba(212,175,110,0.05);
  border: 1px solid rgba(212,175,110,0.2);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 30px 0;
  font-size: 13px;
  line-height: 1.7;
}
.formula-card h3 {
  font-size: 14px;
  color: #d4af6e;
  margin: 0 0 10px;
  font-weight: 700;
}
.formula-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.formula-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.formula-list strong { color: #d4af6e; font-weight: 700; }
.formula-list .neg { color: #ef4444; }

@media (max-width: 600px) {
  .leaderboard-podium { grid-template-columns: 1fr; gap: 30px; }
  .podium-slot.first { transform: none; }
}


/* Lock overlay close button */
.lock-overlay-inner { position: relative; }
.lock-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}
.lock-close:hover {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  border-color: rgba(239,68,68,0.4);
}


/* === Course thumb: locked state with big lock SVG === */
.course-thumb.thumb-locked {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0;
  transition: 0.25s ease;
}
.thumb-lock-svg {
  width: 80px;
  height: 100px;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.45));
}
.thumb-locked-full {
  background: linear-gradient(135deg, #4a3915 0%, #2a1f0a 50%, #1a1208 100%);
  color: #d4af6e;
}
.thumb-locked-full .thumb-lock-svg {
  filter: drop-shadow(0 6px 20px rgba(212,175,110,0.5));
}
.thumb-locked-partial {
  background: linear-gradient(135deg, #2a2010 0%, #1a1a1a 100%);
  color: rgba(212,175,110,0.65);
}
.thumb-lock-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: inherit;
  padding: 6px 14px;
  background: rgba(0,0,0,0.4);
  border-radius: 20px;
  border: 1px solid currentColor;
}

/* Hide old overlay since we now use thumb */
.course-vip-overlay { display: none !important; }

.course-card.vip-course {
  border: 2px solid rgba(212,175,110,0.45);
  background: linear-gradient(180deg, rgba(212,175,110,0.04), rgba(15,15,15,0.6));
}
.course-card.vip-course:hover {
  border-color: #d4af6e;
  box-shadow: 0 12px 32px rgba(212,175,110,0.25);
  transform: translateY(-4px);
}
.course-card.has-vip-lessons {
  border: 1.5px solid rgba(212,175,110,0.25);
}

/* === Price line in course body === */
.course-price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(212,175,110,0.18), rgba(139,107,58,0.08));
  border: 1px solid rgba(212,175,110,0.45);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 14px 0 12px;
}
.course-price-line .price-label {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}
.course-price-line .price-value {
  font-size: 19px;
  color: #d4af6e;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.course-price-line.price-partial {
  background: rgba(255,255,255,0.02);
  border-style: dashed;
  border-color: rgba(212,175,110,0.3);
}
.course-price-line.price-partial .price-value {
  font-size: 16px;
}


/* === QUIZ BUILDER (admin) === */
.quiz-builder {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}
.quiz-builder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.quiz-builder-header h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #d4af6e;
}
.quiz-count {
  color: var(--text-mute);
  font-weight: 400;
  font-size: 13px;
  margin-left: 6px;
}
.quiz-q-row {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.quiz-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.quiz-q-num {
  font-weight: 700;
  color: #d4af6e;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-icon-x {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.btn-icon-x:hover { background: rgba(239,68,68,0.3); }

.quiz-q-text {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  margin-bottom: 8px;
}
.quiz-opt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.quiz-opt-row input[type="radio"] {
  width: auto;
  flex-shrink: 0;
  cursor: pointer;
}
.quiz-opt-text {
  flex: 1;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
}
.quiz-q-hint {
  font-size: 11px;
  color: var(--text-mute);
  font-style: italic;
  margin-top: 4px;
}

/* === QUIZ USER-SIDE === */
.quiz-section {
  margin-top: 24px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px;
}
.quiz-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.quiz-header h3 {
  margin: 0 0 6px;
  color: #d4af6e;
  font-size: 18px;
}
.quiz-subtitle {
  color: var(--text-soft);
  font-size: 13px;
}
.quiz-passed-badge {
  display: inline-block;
  background: rgba(74,222,128,0.15);
  color: #4ade80;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
}
.quiz-form { display: flex; flex-direction: column; gap: 16px; }
.quiz-q-user {
  background: rgba(255,255,255,0.025);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: 0.2s ease;
}
.quiz-q-user.quiz-q-correct {
  border-color: rgba(74,222,128,0.5);
  background: rgba(74,222,128,0.05);
}
.quiz-q-user.quiz-q-wrong {
  border-color: rgba(239,68,68,0.5);
  background: rgba(239,68,68,0.05);
}
.quiz-q-text {
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
  font-size: 14px;
}
.quiz-opt-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s ease;
}
.quiz-opt-user:hover { background: rgba(212,175,110,0.06); }
.quiz-opt-user input[type="radio"] {
  width: auto;
  cursor: pointer;
}
.quiz-submit {
  align-self: flex-start;
  padding: 11px 26px;
  font-weight: 700;
  margin-top: 6px;
}
.quiz-result-card {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  text-align: center;
}
.quiz-result-card.passed {
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.4);
}
.quiz-result-card.failed {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.4);
}
.quiz-result-icon { font-size: 42px; margin-bottom: 8px; }
.quiz-result-score {
  font-size: 28px;
  font-weight: 800;
  color: #d4af6e;
  margin-bottom: 6px;
}
.quiz-result-msg {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 12px;
}


/* === COUPON UI === */
.coupon-block {
  background: rgba(212,175,110,0.05);
  border: 1px dashed rgba(212,175,110,0.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0 12px;
}
.coupon-block > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #d4af6e;
  margin-bottom: 8px;
}
.coupon-input-row {
  display: flex;
  gap: 8px;
}
.coupon-input-row input {
  flex: 1;
  padding: 9px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.coupon-input-row input:focus {
  outline: none;
  border-color: #d4af6e;
  background: rgba(255,255,255,0.08);
}
.coupon-result {
  margin-top: 10px;
  font-size: 13px;
  min-height: 20px;
}
.coupon-ok {
  color: #4ade80;
  display: inline-block;
  background: rgba(74,222,128,0.08);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(74,222,128,0.25);
  width: 100%;
  box-sizing: border-box;
}
.coupon-err {
  color: #ef4444;
}


/* Fix: select dropdown options invisible (white on white) */
select option {
  background: #1a1a1a;
  color: #fff;
}
select option:checked {
  background: #d4af6e;
  color: #000;
}

/* Quiz option letter prefix */
.quiz-opt-letter {
  display: inline-block;
  min-width: 22px;
  font-weight: 700;
  color: #d4af6e;
  font-size: 13px;
  text-align: center;
}



/* ============================================
   PHASE A — SETTINGS + DASHBOARD STYLES
   ============================================ */

/* ===== SETTINGS LAYOUT ===== */
.settings-layout {
  max-width: 1000px;
  margin: 32px auto;
  padding: 0 20px;
}
.settings-header { margin-bottom: 24px; }
.settings-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(212,175,110,0.2);
  margin-bottom: 24px;
  overflow-x: auto;
}
.settings-tab {
  background: transparent;
  border: none;
  color: #999;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.settings-tab:hover { color: #d4af6e; }
.settings-tab.active {
  color: #d4af6e;
  border-bottom-color: #d4af6e;
}
.settings-section { display: none; }
.settings-section.active { display: block; }

.settings-card {
  background: #1a1a1a;
  border: 1px solid rgba(212,175,110,0.15);
  border-radius: 12px;
  padding: 28px;
}
.settings-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #f4eddf;
  margin: 0 0 4px 0;
}
.settings-card-title.danger { color: #ef4444; }
.settings-card-desc {
  color: #999;
  font-size: 14px;
  margin: 0 0 22px 0;
}
.settings-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ===== PROFILE TAB ===== */
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: rgba(212,175,110,0.05);
  border-radius: 10px;
  margin-bottom: 22px;
}
.profile-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: #d4af6e;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  flex-shrink: 0;
  border: 3px solid #2a2a2a;
}

/* ===== NOTIFICATION ROWS ===== */
.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.notif-row:hover { background: rgba(212,175,110,0.05); }
.notif-row-title {
  font-weight: 600;
  color: #f4eddf;
  font-size: 15px;
}
.notif-row-desc {
  color: #888;
  font-size: 13px;
  margin-top: 2px;
}

/* Toggle switch */
.switch {
  position: relative;
  width: 46px; height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #444;
  border-radius: 26px;
  transition: .2s;
  cursor: pointer;
}
.switch .slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + .slider { background: #d4af6e; }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ===== SECURITY TAB ===== */
.security-google-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(212,175,110,0.05);
  border-radius: 10px;
  gap: 16px;
}
.danger-zone {
  border: 1px solid rgba(239,68,68,0.3) !important;
}
.danger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(239,68,68,0.05);
  border-radius: 10px;
  gap: 16px;
}
.btn-danger {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  font-size: 14px;
}
.btn-danger:hover { background: #dc2626; }

/* ===== PAYMENTS TAB ===== */
.payments-summary {
  color: #d4af6e;
  font-weight: 700;
  font-size: 14px;
}
.payments-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}
.payments-table th {
  text-align: left;
  padding: 12px;
  background: rgba(212,175,110,0.08);
  color: #d4af6e;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid rgba(212,175,110,0.2);
}
.payments-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #ddd;
  vertical-align: top;
}
.payments-table tbody tr:hover { background: rgba(212,175,110,0.04); }
.pay-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.pay-status.approved { background: rgba(74,222,128,0.15); color: #4ade80; }
.pay-status.pending  { background: rgba(212,175,110,0.15); color: #d4af6e; }
.pay-status.rejected { background: rgba(239,68,68,0.15); color: #ef4444; }
.pay-status.fraud    { background: rgba(239,68,68,0.3); color: #fff; }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout {
  max-width: 1100px;
  margin: 24px auto 48px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Welcome card */
.dash-welcome {
  background: linear-gradient(135deg, rgba(212,175,110,0.18), rgba(212,175,110,0.04));
  border: 1px solid rgba(212,175,110,0.3);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.dash-greet {
  font-size: 28px;
  font-weight: 800;
  color: #f4eddf;
  margin: 0;
}
.dash-greet-sub {
  color: #bbb;
  margin: 6px 0 18px 0;
  font-size: 15px;
}
.dash-stat-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.dash-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: #d4af6e;
}
.dash-stat-label {
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}

/* Level card */
.dash-level-card {
  background: #1a1a1a;
  border: 1px solid rgba(212,175,110,0.2);
  border-radius: 14px;
  padding: 22px 26px;
}
.dash-level-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-level-label {
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.dash-level-num {
  font-size: 24px;
  font-weight: 800;
  color: #d4af6e;
}
.dash-level-xp { color: #ddd; font-weight: 700; font-size: 14px; }
.dash-level-bar {
  height: 12px;
  background: #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
}
.dash-level-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af6e, #f4eddf);
  transition: width .6s ease-out;
}
.dash-level-foot {
  color: #999;
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

/* Dashboard grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
@media (max-width: 800px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-card {
  background: #1a1a1a;
  border: 1px solid rgba(212,175,110,0.15);
  border-radius: 14px;
  padding: 22px;
}
.dash-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #f4eddf;
  margin: 0 0 16px 0;
}

/* Continue card */
.dash-card-continue { display: flex; flex-direction: column; }
.continue-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.continue-course-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.continue-course-title {
  font-size: 18px;
  font-weight: 700;
  color: #d4af6e;
  margin: 0;
}
.continue-next-label {
  color: #999;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 6px;
}
.continue-next-title {
  font-size: 15px;
  font-weight: 600;
  color: #f4eddf;
}
.continue-progress { margin-top: 8px; }
.continue-progress-bar {
  height: 6px;
  background: #2a2a2a;
  border-radius: 3px;
  overflow: hidden;
}
.continue-progress-fill {
  height: 100%;
  background: #d4af6e;
}
.continue-progress-text {
  color: #999;
  font-size: 12px;
  margin-top: 4px;
}
.continue-cta { margin-top: 12px; text-align: center; }
.continue-empty {
  text-align: center;
  color: #999;
  padding: 24px 0;
}
.vip-tag {
  background: linear-gradient(135deg, #d4af6e, #f4eddf);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}

/* Quick grid */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(212,175,110,0.05);
  border: 1px solid rgba(212,175,110,0.15);
  border-radius: 10px;
  color: #f4eddf;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: all .15s;
}
.quick-tile:hover {
  background: rgba(212,175,110,0.12);
  border-color: #d4af6e;
  transform: translateY(-2px);
}
.quick-icon { font-size: 24px; margin-bottom: 6px; }

/* Recent courses */
.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.btn-link {
  color: #d4af6e;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.btn-link:hover { text-decoration: underline; }
.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .recent-grid { grid-template-columns: 1fr; } }
.recent-tile {
  background: #1a1a1a;
  border: 1px solid rgba(212,175,110,0.15);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .15s, border-color .15s;
  display: flex;
  flex-direction: column;
}
.recent-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(212,175,110,0.4);
}
.recent-thumb {
  background: linear-gradient(135deg, rgba(212,175,110,0.2), rgba(212,175,110,0.05));
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #d4af6e;
}
.recent-body { padding: 14px; }
.recent-body h4 {
  margin: 6px 0;
  font-size: 15px;
  color: #f4eddf;
  font-weight: 700;
}
.recent-meta {
  display: flex;
  justify-content: space-between;
  color: #888;
  font-size: 12px;
  margin-top: 6px;
}

/* Support card */
.dash-support {
  background: linear-gradient(135deg, rgba(74,222,128,0.08), rgba(74,222,128,0.02));
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.dash-support-icon { font-size: 36px; }
.dash-support-body { flex: 1; min-width: 200px; }
.dash-support-body h3 { margin: 0; color: #f4eddf; font-size: 16px; }
.dash-support-body p { margin: 4px 0 0 0; color: #aaa; font-size: 13px; }

/* Form row utility used by settings */
.form-row.single { grid-template-columns: 1fr; }

/* ===== HEADER NAV (Phase A) ===== */
.header-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.btn-header.active {
  background: rgba(212,175,110,0.15);
  color: #d4af6e !important;
  border-color: rgba(212,175,110,0.4);
}
@media (max-width: 760px) {
  .header-nav { display: none; }
  /* Mobile: chỉ giữ Avatar + logout, nav ẩn (user vào dashboard.html sẽ thấy quick-tile) */
}



/* ============================================
   PHASE B — SOCIAL PROOF + FREEZE + MY COURSES
   ============================================ */

/* Social proof bar (top dashboard) */
.social-proof-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(74,222,128,0.12), rgba(212,175,110,0.12));
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 50px;
  padding: 10px 20px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #f4eddf;
  font-weight: 500;
  min-height: 40px;
  overflow: hidden;
}
.social-proof-text {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.sp-icon { font-size: 16px; }
.sp-time { color: #888; font-weight: 400; font-size: 12px; }

/* Freeze badge */
.freeze-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99,179,237,0.15);
  color: #63b3ed;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  cursor: help;
}

/* My Courses page */
.my-courses-header { margin: 24px 0 18px 0; }
.my-courses-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(212,175,110,0.2);
  margin-bottom: 24px;
  overflow-x: auto;
}
.mc-tab {
  background: transparent;
  border: none;
  color: #999;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.mc-tab:hover { color: #d4af6e; }
.mc-tab.active {
  color: #d4af6e;
  border-bottom-color: #d4af6e;
}
.mc-count {
  background: rgba(212,175,110,0.2);
  color: #d4af6e;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.mc-tab.active .mc-count {
  background: #d4af6e;
  color: #000;
}

.my-courses-cta-block {
  margin-top: 32px;
  text-align: center;
  padding: 28px;
  background: rgba(212,175,110,0.05);
  border: 1px dashed rgba(212,175,110,0.3);
  border-radius: 12px;
}
.my-courses-cta-block h3 { color: #d4af6e; margin: 0 0 8px; }
.my-courses-cta-block p { color: #aaa; margin: 0 0 16px; }

/* CTA chữ trong course card (Phase B) */
.course-cta {
  text-align: center;
  background: #d4af6e;
  color: #000;
  padding: 8px 0;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  margin-top: 10px;
}



/* ============================================
   PHASE C — TELEGRAM CARD
   ============================================ */
.telegram-card {
  background: linear-gradient(135deg, #1a1a1a 0%, rgba(99,179,237,0.05) 100%);
  border-color: rgba(99,179,237,0.2) !important;
}
.telegram-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.telegram-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.telegram-badge.linked {
  background: rgba(74,222,128,0.18);
  color: #4ade80;
}
.telegram-badge.unlinked {
  background: rgba(255,255,255,0.08);
  color: #999;
}



/* ============================================
   MOBILE RESPONSIVE PASS (Phase R)
   Breakpoints: 768px (tablet) · 480px (phone)
   ============================================ */

/* ----- HAMBURGER + MOBILE DRAWER ----- */
.hamburger-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(212,175,110,0.3);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #d4af6e;
  border-radius: 1px;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  animation: fadeIn .2s ease;
}
.mobile-drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: #1a1a1a;
  border-left: 1px solid rgba(212,175,110,0.2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  animation: slideInRight .25s ease;
}
.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(212,175,110,0.15);
}
.mobile-drawer-close {
  background: transparent;
  border: none;
  color: #f4eddf;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.mobile-drawer-nav .btn-header {
  display: block;
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  width: 100%;
  font-size: 15px;
}
.mobile-drawer-nav .btn-header.active {
  background: rgba(212,175,110,0.15);
  color: #d4af6e !important;
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideInRight {
  from { transform: translateX(100%) } to { transform: translateX(0) }
}

/* ----- TABLET (≤768px) ----- */
@media (max-width: 768px) {
  /* Header */
  .header-inner { padding: 12px 14px; }
  .header-nav { display: none !important; }
  .user-chip .name { display: none; }
  .user-chip .badge { display: none; }
  .desktop-only { display: none !important; }
  .hamburger-btn { display: inline-flex; }

  /* Containers */
  .container, .dashboard-layout, .settings-layout, .admin-layout {
    padding: 0 14px;
  }
  .page-title { font-size: 22px; }
  .page-subtitle { font-size: 14px; }

  /* Welcome card */
  .dash-welcome {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 14px;
  }
  .dash-welcome-right { width: 100%; }
  .dash-welcome-right .btn { width: 100%; text-align: center; }
  .dash-greet { font-size: 22px; }
  .dash-stat-row { gap: 16px; flex-wrap: wrap; }
  .dash-stat-num { font-size: 22px; }

  /* Level card */
  .dash-level-card { padding: 16px 18px; }
  .dash-level-num { font-size: 20px; }

  /* Grid */
  .dash-grid { grid-template-columns: 1fr; gap: 14px; }
  .dash-card { padding: 16px; }
  .recent-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Course grid */
  .course-grid { grid-template-columns: 1fr; gap: 12px; }
  .course-card { width: 100%; }

  /* Settings */
  .settings-card { padding: 18px; }
  .settings-tabs { gap: 4px; }
  .settings-tab { padding: 12px 14px; font-size: 13px; }
  .form-row { grid-template-columns: 1fr !important; gap: 12px; }
  .settings-actions { flex-direction: column; }
  .settings-actions .btn { width: 100%; }
  .profile-avatar-row { flex-direction: column; align-items: flex-start; }
  .telegram-card-head { flex-direction: column; align-items: flex-start; }
  .security-google-row, .danger-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .security-google-row .btn, .danger-row .btn { width: 100%; text-align: center; }

  /* My courses tabs */
  .my-courses-tabs { gap: 4px; }
  .mc-tab { padding: 10px 12px; font-size: 12px; }
  .mc-count { font-size: 10px; }

  /* Social proof bar */
  .social-proof-bar { font-size: 12px; padding: 8px 14px; }
}

@media (max-width: 768px) {
  /* Course player (course.html) */
  .course-layout { flex-direction: column !important; }
  .course-sidebar, .course-main {
    width: 100% !important;
    max-width: 100% !important;
  }
  .course-video, .course-video iframe, .course-video video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
  }
  .lesson-list { max-height: 280px; overflow-y: auto; }

  /* Admin layout */
  .admin-tabs { flex-wrap: wrap; gap: 4px; }
  .admin-tab { padding: 10px 12px; font-size: 13px; flex: 1; min-width: 0; }
  .admin-card { padding: 16px; }
  .admin-card-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-card-header .btn { width: 100%; }

  /* Admin tables: horizontal scroll on parent container */
  #users-container, #pendings-container, #payments-container,
  #courses-container, #coupons-container,
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .users-table, .payments-table { min-width: 560px; }
  table th, table td { padding: 10px 8px !important; font-size: 13px; }

  /* Modal */
  .modal-overlay { padding: 10px; }
  .modal {
    max-width: 95vw !important;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
  }
  .modal-body { padding: 14px; }
  .modal-footer { flex-direction: column; gap: 8px; }
  .modal-footer .btn { width: 100%; }

  /* Leaderboard */
  .leaderboard-table { font-size: 13px; }
  .leaderboard-table th, .leaderboard-table td { padding: 10px 6px; }

  /* Login / Landing */
  .login-card, .landing-hero {
    padding: 24px 18px;
    margin: 16px;
  }
  .login-card { width: auto; max-width: 100%; }
  .landing-hero h1 { font-size: 28px; }
  .landing-features { grid-template-columns: 1fr; }

  /* Payments table (settings tab Thanh toán) */
  .payments-table { font-size: 12px; }
  .payments-table th, .payments-table td { padding: 10px 6px; }

  /* Touch target: ensure buttons are tappable */
  .btn, .btn-header, .btn-sm { min-height: 40px; }
  input, textarea, select { font-size: 16px !important; } /* Avoid iOS zoom */
}

/* ----- PHONE (≤480px) ----- */
@media (max-width: 480px) {
  .header-inner { padding: 10px 12px; }
  .logo span:last-child { font-size: 18px; }
  .dash-stat { flex: 1 1 30%; min-width: 0; }
  .dash-stat-num { font-size: 20px; }
  .dash-stat-label { font-size: 11px; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick-tile { padding: 14px 10px; font-size: 12px; }
  .recent-grid { grid-template-columns: 1fr; }
  .dash-card-title { font-size: 14px; }
  .settings-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .settings-tab { white-space: nowrap; }
  .telegram-badge { align-self: flex-start; }
}

/* ----- IPHONE NOTCH SAFE AREA ----- */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-header { padding-top: env(safe-area-inset-top); }
  .site-footer { padding-bottom: env(safe-area-inset-bottom); }
}



/* ============================================
   VIDEO PROTECTION (chặn tải Drive + fullscreen custom)
   ============================================ */
.video-protect-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(212,175,110,0.15);
}
.video-protect-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Blocker che góc trên phải iframe (nút "↗" mở Drive page) */
.video-corner-blocker {
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 56px;
  background: transparent;
  z-index: 5;
  cursor: not-allowed;
  -webkit-touch-callout: none; /* iOS: chặn long-press menu */
  -webkit-user-select: none;
  user-select: none;
}

/* Custom fullscreen button (góc dưới phải) */
.video-fullscreen-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 1px solid rgba(212,175,110,0.4);
  cursor: pointer;
  font-size: 18px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  opacity: 0.7;
}
.video-fullscreen-btn:hover {
  opacity: 1;
  background: rgba(212,175,110,0.9);
  color: #000;
  transform: scale(1.08);
}

/* Fullscreen mode: làm full viewport */
.video-protect-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: unset;
  border-radius: 0;
}
.video-protect-wrap:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: unset;
  border-radius: 0;
}

@media (max-width: 768px) {
  .video-corner-blocker { width: 60px; height: 44px; }
  .video-fullscreen-btn { width: 44px; height: 44px; font-size: 20px; }
}



/* ===== PSEUDO-FULLSCREEN (CSS-based, work iOS Safari) ===== */
.video-protect-wrap.pseudo-fs {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  aspect-ratio: unset !important;
  border-radius: 0 !important;
  z-index: 99999 !important;
  background: #000 !important;
}
.video-protect-wrap.pseudo-fs .video-fullscreen-btn {
  width: 48px;
  height: 48px;
  font-size: 22px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  opacity: 1;
}

/* ===== MOBILE — chặn TOÀN bộ thanh top của Drive iframe ===== */
@media (max-width: 768px) {
  .video-corner-blocker {
    width: 100%;    /* full width chặn cả title + menu + open-external */
    height: 60px;
  }
  /* Khi fullscreen mobile, blocker vẫn che top */
  .video-protect-wrap.pseudo-fs .video-corner-blocker {
    height: 72px;
  }
}

/* iOS Safari: chặn long-press menu trên iframe vùng video */
.video-protect-wrap {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}



/* ============================================
   APP SHELL — Sidebar trái (Kohada-style)
   ============================================ */
:root {
  --sidebar-w: 260px;
  --topbar-h: 64px;
}

/* Khi shell active, body padding-left để content shift sang phải */
body.has-app-shell {
  padding-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  transition: padding .25s ease;
}

/* Hide legacy header */
body.has-app-shell .site-header { display: none !important; }

/* ===== SIDEBAR ===== */
.app-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #0f0f0f;
  border-right: 1px solid rgba(212,175,110,0.1);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Brand top */
.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(212,175,110,0.08);
  gap: 10px;
  position: relative;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}
.sidebar-logo .logo-mark {
  width: 36px;
  height: 36px;
  background: #d4af6e;
  color: #000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-brand-text { min-width: 0; }
.brand-name {
  font-weight: 700;
  font-size: 15px;
  color: #f4eddf;
  line-height: 1.2;
}
.brand-sub {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: #f4eddf;
  font-size: 26px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

/* Nav vertical */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  overflow-y: auto;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #bbb;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
}
.sidebar-nav-item:hover {
  background: rgba(212,175,110,0.08);
  color: #f4eddf;
}
.sidebar-nav-item.active {
  background: rgba(212,175,110,0.15);
  color: #d4af6e;
  font-weight: 600;
}
.sidebar-nav-icon { font-size: 18px; flex-shrink: 0; width: 22px; text-align: center; }
.sidebar-nav-label { flex: 1; }

/* Support card */
.sidebar-support {
  margin: 0 12px 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(212,175,110,0.12), rgba(74,222,128,0.06));
  border: 1px solid rgba(212,175,110,0.2);
  border-radius: 12px;
  text-align: center;
}
.sidebar-support .support-icon { font-size: 24px; margin-bottom: 6px; }
.sidebar-support .support-title {
  color: #d4af6e;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.sidebar-support .support-desc {
  color: #999;
  font-size: 11px;
  margin-bottom: 10px;
  line-height: 1.4;
}
.sidebar-support .btn { display: block; width: 100%; font-size: 12px; padding: 8px 10px; }

/* User chip bottom */
.sidebar-user {
  padding: 14px;
  border-top: 1px solid rgba(212,175,110,0.08);
}
.sidebar-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 8px;
}
.sidebar-user-chip img,
.sidebar-user-chip .avatar-fallback {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.avatar-fallback {
  background: #d4af6e;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.sidebar-user-text { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #f4eddf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-email {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.sidebar-logout:hover {
  background: rgba(239,68,68,0.1);
}

/* ===== TOP BAR ===== */
.app-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: rgba(15,15,15,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212,175,110,0.1);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  z-index: 90;
  transition: left .25s ease;
}
.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: #f4eddf;
  margin: 0;
}
.topbar-spacer { flex: 1; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,110,0.15);
  border-radius: 24px;
  cursor: pointer;
  max-width: 220px;
  flex-shrink: 0;
}
.topbar-user-chip img,
.topbar-user-chip .avatar-fallback {
  width: 30px; height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
}
.topbar-user-chip .name {
  font-size: 13px;
  font-weight: 600;
  color: #f4eddf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.topbar-user-chip .badge {
  background: #d4af6e;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Sidebar backdrop (mobile) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 95;
  animation: fadeIn .2s ease;
}
.sidebar-backdrop.open { display: block; }

/* Hamburger ẩn ở desktop */
.app-topbar .hamburger-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(212,175,110,0.3);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.app-topbar .hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #d4af6e;
}

/* ===== MOBILE: sidebar off-canvas ===== */
@media (max-width: 768px) {
  body.has-app-shell {
    padding-left: 0;
  }
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close { display: inline-flex; align-items: center; }
  .app-topbar {
    left: 0;
    padding: 0 14px;
  }
  .app-topbar .hamburger-btn { display: inline-flex; }
  .topbar-title { font-size: 15px; }
  .topbar-user-chip .name { display: none; }
  .topbar-user-chip { padding: 4px; }
}

/* ===== Cleanup styles cũ liên quan tới horizontal header ===== */
body.has-app-shell .mobile-drawer { display: none !important; }
body.has-app-shell .header-nav,
body.has-app-shell .user-chip,
body.has-app-shell .btn-header { display: none; }


/* ===== Custom scrollbar (sidebar + global) ===== */
.app-sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.app-sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(212,175,110,0.25);
  border-radius: 4px;
}
.app-sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(212,175,110,0.55);
}
.app-sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
/* Firefox */
.app-sidebar, .sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,110,0.3) transparent;
}

/* Global page scrollbar đẹp hơn */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: rgba(212,175,110,0.25);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212,175,110,0.5);
}
::-webkit-scrollbar-track { background: transparent; }
