/**
 * ============================================================
 * KỸ NĂNG VIỆT – DASHBOARD APP SHELL
 * Mockup tĩnh – chỉ dùng tokens từ design-system.css
 * ============================================================
 */

/* ===== 0. RESET cho dashboard body ===== */
body.dashboard {
  background: var(--bg);
  font-family: var(--font-sans);
}

body.dashboard-page {
  background: var(--bg);
  overscroll-behavior: contain;
  overflow-y: auto;
}

/* Lenis bị disable cho dashboard layout (xem sources/templates/css.php) — đảm bảo
   native scroll hoạt động bình thường, không có smooth-scroll wrapper conflict. */
html:has(body.dashboard-page) {
  scroll-behavior: auto;
}

body.dashboard-page #header,
body.dashboard-page #footer,
body.dashboard-page .lenis-scrollbar {
  display: none !important;
}

/* ===== 1. SHELL & FRAME ===== */
.dash-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

/* ===== 2. SIDEBAR ===== */
.dash-sidebar {
  width: 256px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition:
    width var(--transition-base),
    transform var(--transition-base);
}

.dash-sidebar__brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
  min-height: 80px;
}
.dash-sidebar__brand-icon-wrapper {
  width: 135px;
  height: 43px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition:
    width var(--transition-base),
    justify-content var(--transition-base);
}
.dash-sidebar__brand-icon {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base),
    transform var(--transition-base);
}
.dash-sidebar__brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.dash-sidebar__brand-icon-2 {
  width: 45px;
  height: 45px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  border-radius: 6px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85);
  pointer-events: none;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base),
    transform var(--transition-base);
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  -o-border-radius: 6px;
}
.dash-sidebar__brand-icon-2 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.dash-sidebar__brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-serif);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.dash-sidebar__collapse-btn {
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 11px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.dash-sidebar__collapse-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 94, 184, 0.25);
}

.dash-sidebar__collapse-icon--out {
  display: none;
}
.dash-sidebar.is-collapsed .dash-sidebar__collapse-icon--in {
  display: none;
}
.dash-sidebar.is-collapsed .dash-sidebar__collapse-icon--out {
  display: inline-flex;
}

.dash-sidebar__nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
  position: relative;
}

.dash-sidebar__nav::-webkit-scrollbar {
  width: 6px;
}

.dash-sidebar__nav::-webkit-scrollbar-track {
  background: transparent;
}

.dash-sidebar__nav::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

.dash-sidebar__nav::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.dash-sidebar__section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-sidebar__section + .dash-sidebar__section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.dash-sidebar__section-title {
  padding: 0 14px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.7;
}

.dash-sidebar.is-collapsed .dash-sidebar__section-title {
  display: none;
}

.dash-sidebar.is-collapsed .dash-sidebar__section + .dash-sidebar__section {
  margin-top: 12px;
  padding-top: 12px;
}

.dash-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.dash-sidebar__item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-sidebar__item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 94, 184, 0.2);
}

.dash-sidebar__item.active:hover {
  background: var(--primary-dark);
  color: #fff;
}

.dash-sidebar__item iconify-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.dash-sidebar__item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-sidebar__bottom {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-sidebar__logout {
  color: var(--secondary);
}

.dash-sidebar__logout:hover {
  background: var(--secondary-light);
  color: var(--secondary-hover);
}

/* Scroll hint: fade gradient at bottom of nav */
.dash-sidebar__scroll-hint {
  position: sticky;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 48px;
  margin-top: -48px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    var(--surface) 85%,
    var(--surface) 100%
  );
  transition: opacity 0.25s ease;
}

/* Hide hint when user has scrolled to bottom */
.dash-sidebar__nav.is-scrolled-to-bottom .dash-sidebar__scroll-hint {
  opacity: 0;
}

/* ===== SIDEBAR DROPDOWN ===== */
.dash-sidebar__dropdown {
  position: relative;
}

/* === Dropdown header — unified button with single background === */
.dash-sidebar__dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text-secondary, #64748b);
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    background var(--transition-fast, 0.15s),
    color var(--transition-fast, 0.15s);
}

.dash-sidebar__dropdown-header:hover {
  background: var(--primary-light, rgba(59, 130, 246, 0.08));
  color: var(--primary, #2563eb);
}

.dash-sidebar__dropdown-header.active {
  background: var(--primary-light, rgba(59, 130, 246, 0.08));
  color: var(--primary, #2563eb);
  font-weight: 600;
}

.dash-sidebar__dropdown-header__icon {
  font-size: 16px;
  flex-shrink: 0;
  color: inherit;
}

.dash-sidebar__dropdown-header__label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-sidebar__dropdown-header__chevron {
  font-size: 11px;
  flex-shrink: 0;
  color: var(--text-muted, #94a3b8);
  transition: transform var(--transition-fast, 0.15s);
}

.dash-sidebar__dropdown.is-open .dash-sidebar__dropdown-header__chevron {
  transform: rotate(180deg);
  color: inherit;
}

/* Dropdown menu - accordion style */
.dash-sidebar__dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 8px 0 44px;
  transition:
    max-height 0.3s ease,
    opacity 0.25s ease,
    padding 0.25s ease;
}

.dash-sidebar__dropdown.is-open .dash-sidebar__dropdown-menu {
  max-height: 200px;
  opacity: 1;
  padding: 4px 8px 6px 44px;
}

.dash-sidebar__dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dash-sidebar__dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-sidebar__dropdown-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.dash-sidebar__dropdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.dash-sidebar__dropdown-item:hover .dash-sidebar__dropdown-dot,
.dash-sidebar__dropdown-item.active .dash-sidebar__dropdown-dot {
  background: var(--primary);
}

/* Collapsed state - Flyout menu */
.dash-sidebar.is-collapsed .dash-sidebar__dropdown-header__chevron {
  display: none;
}

.dash-sidebar.is-collapsed .dash-sidebar__dropdown-menu {
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-hover);
  padding: 8px;
  max-height: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
  z-index: 1010;
}

.dash-sidebar.is-collapsed
  .dash-sidebar__dropdown:hover
  .dash-sidebar__dropdown-menu,
.dash-sidebar.is-collapsed
  .dash-sidebar__dropdown.is-open
  .dash-sidebar__dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.dash-sidebar.is-collapsed .dash-sidebar__dropdown-item {
  padding: 9px 12px;
  font-size: 13px;
}

/* Mobile: dropdown hoạt động bình thường */
@media (max-width: 991.98px) {
  .dash-sidebar__dropdown-menu {
    padding-left: 52px;
  }
  .dash-sidebar__dropdown.is-open .dash-sidebar__dropdown-menu {
    padding-left: 52px;
  }
}

/* Collapsed state (desktop) */
.dash-sidebar.is-collapsed {
  width: 80px;
}
.dash-sidebar.is-collapsed .dash-sidebar__brand {
  padding: 18px 12px;
  justify-content: center;
}
.dash-sidebar.is-collapsed .dash-sidebar__brand-text,
.dash-sidebar.is-collapsed .dash-sidebar__item span {
  display: none;
}
.dash-sidebar.is-collapsed .dash-sidebar__item {
  justify-content: center;
  padding: 12px;
}
.dash-sidebar.is-collapsed .dash-sidebar__item iconify-icon {
  font-size: 20px;
}
.dash-sidebar.is-collapsed .dash-sidebar__nav {
  padding: 14px 8px;
}
.dash-sidebar.is-collapsed .dash-sidebar__bottom {
  padding: 14px 8px;
}

/* Collapsed logo transition */
.dash-sidebar.is-collapsed .dash-sidebar__brand-icon-wrapper {
  width: 45px;
  height: 45px;
  justify-content: center;
}
.dash-sidebar.is-collapsed .dash-sidebar__brand-icon {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  pointer-events: none;
}
.dash-sidebar.is-collapsed .dash-sidebar__brand-icon::after {
  opacity: 0;
}
.dash-sidebar.is-collapsed .dash-sidebar__brand-icon-2 {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

/* ===== 3. MAIN WRAPPER ===== */
.dash-main-wrap {
  flex: 1;
  margin-left: 256px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-base);
  -webkit-transition: margin-left var(--transition-base);
  -moz-transition: margin-left var(--transition-base);
  -ms-transition: margin-left var(--transition-base);
  -o-transition: margin-left var(--transition-base);
  max-width: 100%;
  overflow-x: hidden;
}

.dash-shell.is-collapsed .dash-main-wrap {
  margin-left: 80px;
}

.dash-main {
  flex: 1;
  padding: 20px 22px 22px;
}

/* ===== 4. TOPBAR ===== */
.dash-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dash-topbar__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.dash-topbar__hamburger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 18px;
}

.dash-topbar__hamburger:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-topbar__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.2px;
}

.dash-topbar__search-wrap {
  position: relative;
  flex: 1;
  max-width: 460px;
  margin: 0 auto;
}

.dash-topbar__search {
  position: relative;
}

.dash-topbar__search input {
  width: 100%;
  padding: 11px 44px 11px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  background: var(--surface-alt);
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: all var(--transition-base);
}

.dash-topbar__search input::placeholder {
  color: var(--text-muted);
}

.dash-topbar__search input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.08);
}

.dash-topbar__search > iconify-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.dash-topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.dash-topbar__search-icon {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--surface-alt);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
}

.dash-topbar__bell {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 18px;
}

.dash-topbar__bell:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-light);
}

.dash-topbar__bell-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 9px;
  height: 9px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.dash-topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px 14px 5px 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.dash-topbar__user:hover {
  background: var(--surface-alt);
  border-color: var(--primary-light);
}

.dash-topbar__avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
}

.dash-topbar__user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  min-width: 0;
}

.dash-topbar__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-topbar__role-badge {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--white-color);
  white-space: nowrap;
}

.dash-topbar__role-badge--member {
  background: var(--primary);
}

.dash-topbar__role-badge--mod {
  background: var(--info);
}

.dash-topbar__role-badge--admin {
  background: var(--danger);
}

.dash-topbar__chevron {
  color: var(--text-muted);
  font-size: 12px;
  transition: transform var(--transition-fast);
}

.dash-topbar__user-wrap {
  position: relative;
}

.dash-topbar__user-wrap.is-open .dash-topbar__chevron {
  transform: rotate(180deg);
}

.dash-topbar__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: 6px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base),
    transform var(--transition-base);
  display: flex;
  flex-direction: column;
}

.dash-topbar__user-wrap.is-open .dash-topbar__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dash-topbar__dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.dash-topbar__dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-topbar__dropdown-item iconify-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.dash-topbar__dropdown-item--danger {
  color: var(--danger);
}

.dash-topbar__dropdown-item--danger:hover {
  background: var(--secondary-light);
  color: var(--secondary-hover);
}

.dash-topbar__dropdown-divider {
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* ===== Notifications Dropdown ===== */
.dash-topbar__bell-wrap {
  position: relative;
}

.dash-topbar__notifications {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base),
    transform var(--transition-base);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dash-topbar__bell-wrap.is-open .dash-topbar__notifications {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dash-topbar__notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.dash-topbar__notifications-mark {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.dash-topbar__notifications-mark:hover {
  background: var(--primary-light);
}

.dash-topbar__notifications-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}

.dash-topbar__notifications-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  gap: 8px;
}

.dash-topbar__notifications-empty iconify-icon {
  font-size: 32px;
  opacity: 0.4;
}

.dash-topbar__notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.dash-topbar__notification-item:hover {
  background: var(--primary-light);
}

.dash-topbar__notification-item--unread {
  background: rgba(0, 94, 184, 0.04);
}

.dash-topbar__notification-item--unread:hover {
  background: var(--primary-light);
}

.dash-topbar__notification-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--primary-light);
  color: var(--primary);
}

.dash-topbar__notification-icon--success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.dash-topbar__notification-icon--warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.dash-topbar__notification-content {
  flex: 1;
  min-width: 0;
}

.dash-topbar__notification-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 2px;
}

.dash-topbar__notification-time {
  font-size: 11px;
  color: var(--text-muted);
}

.dash-topbar__notifications-footer {
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  text-align: center;
}

.dash-topbar__notifications-footer-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.dash-topbar__notifications-footer-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== Search Results Dropdown ===== */
.dash-topbar__search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base),
    transform var(--transition-base);
  max-height: 400px;
  overflow-y: auto;
}

.dash-topbar__search-wrap.is-searching .dash-topbar__search-results {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dash-topbar__search-loading {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-topbar__search-skeleton {
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    90deg,
    var(--surface-alt) 25%,
    var(--primary-light) 50%,
    var(--surface-alt) 75%
  );
  background-size: 200% 100%;
  animation: dash-skeleton-shimmer 1.5s infinite;
}

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

.dash-topbar__search-list {
  padding: 4px;
}

.dash-topbar__search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.dash-topbar__search-item:hover {
  background: var(--primary-light);
}

.dash-topbar__search-item-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--primary-light);
  color: var(--primary);
}

.dash-topbar__search-item-icon--exam {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.dash-topbar__search-item-icon--subject {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.dash-topbar__search-item-content {
  flex: 1;
  min-width: 0;
}

.dash-topbar__search-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-topbar__search-item-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dash-topbar__search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  gap: 8px;
}

.dash-topbar__search-empty iconify-icon {
  font-size: 32px;
  opacity: 0.4;
}

/* ===== 5. GRID LAYOUTS ===== */
.dash-hero-row,
.dash-stats-row,
.dash-bottom-row {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.dash-hero-row {
  grid-template-columns: 1.15fr 1fr 1fr;
}
.dash-stats-row {
  grid-template-columns: repeat(3, 1fr);
}
.dash-bottom-row {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0;
}

/* ===== 6. CARDS ===== */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.dash-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.dash-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.dash-card__title--lg {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 700;
}

.dash-card__link {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.dash-card__link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-card__value {
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

/* ===== 7. CHART CARD (Study Time) ===== */
.dash-chart-legend {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
}

.dash-chart-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.dash-chart-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dash-chart-legend__dot--primary {
  background: var(--primary);
}
.dash-chart-legend__dot--secondary {
  background: var(--secondary);
}

.dash-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding-bottom: 24px;
  position: relative;
  margin-top: auto;
}

.dash-bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  min-width: 0;
}

.dash-bar-chart__track {
  flex: 1;
  width: 100%;
  max-width: 14px;
  background: var(--surface-alt);
  border-radius: 999px;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: visible;
}

.dash-bar-chart__bar {
  width: 100%;
  border-radius: 999px;
  background: var(--primary-light);
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
}

.dash-bar-chart__col:hover .dash-bar-chart__bar {
  background: var(--primary);
}
.dash-bar-chart__bar.active {
  background: var(--primary);
}

.dash-bar-chart__tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(1, 42, 74, 0.25);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
  pointer-events: none;
}

.dash-bar-chart__bar:hover .dash-bar-chart__tooltip {
  opacity: 1;
  visibility: visible;
}

.dash-bar-chart__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--navy);
}

.dash-bar-chart__label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

/* ===== 8. PROGRESS CIRCLE ===== */
.dash-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 4px;
}

.dash-progress-circle {
  position: relative;
  width: 150px;
  height: 150px;
}

.dash-progress-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.dash-progress-circle__bg {
  fill: none;
  stroke: var(--primary-light);
  stroke-width: 6;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
}

.dash-progress-circle__progress {
  fill: none;
  stroke: url(#progressGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 68;
  transition: stroke-dashoffset 1s ease;
}

.dash-progress-circle__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.dash-progress-circle__percent {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.dash-progress-circle__label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.dash-progress-caption {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.dash-progress-caption:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== 9. SCHEDULE CARD ===== */
.dash-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.dash-schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.dash-schedule-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.dash-schedule-item:first-child {
  padding-top: 4px;
}

.dash-schedule-item__icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
  flex-shrink: 0;
}

.dash-schedule-item__icon--gold {
  background: var(--secondary-light);
  color: var(--secondary);
}

.dash-schedule-item__info {
  flex: 1;
  min-width: 0;
}

.dash-schedule-item__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dash-schedule-item__time {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.dash-schedule-item__btn {
  flex-shrink: 0;
}

/* ===== 10. STAT CARDS ===== */
.dash-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
}

.dash-stat-card__icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 22px;
  flex-shrink: 0;
}

.dash-stat-card__icon--gold {
  background: var(--secondary-light);
  color: var(--secondary);
}

.dash-stat-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-stat-card__label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.dash-stat-card__value {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.dash-stat-card__sparkline {
  width: 70px;
  height: 28px;
  flex-shrink: 0;
}

.dash-stat-card__sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dash-stat-card__sparkline path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-stat-card__sparkline--gold path {
  stroke: var(--secondary);
}

/* ===== 11. RECENT COURSE CARD (left bottom) ===== */
.dash-course-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.dash-course-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-course-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dash-course-card__icon--blue {
  background: var(--primary);
  color: #fff;
}

.dash-course-card__info {
  flex: 1;
  min-width: 0;
}

.dash-course-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dash-course-card__progress {
  font-size: 12px;
  color: var(--text-muted);
}

.dash-course-card__progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.dash-course-card__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-pill);
  transition: width 0.5s ease;
}

/* ===== 12. RESOURCE LIST ===== */
.dash-resource-list {
  display: flex;
  flex-direction: column;
}

.dash-resource-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.dash-resource-item:last-child {
  border-bottom: none;
}

.dash-resource-item__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dash-resource-item__icon--pdf {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-resource-item__icon--zip {
  background: var(--secondary-light);
  color: var(--secondary);
}

.dash-resource-item__icon--video {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-resource-item__info {
  flex: 1;
  min-width: 0;
}

.dash-resource-item__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-resource-item__note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

.dash-resource-item__size {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.dash-resource-item__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.dash-resource-item__link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== 13. COURSE LIST (My Courses) ===== */
.dash-course-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-course-list__tabs {
  display: flex;
  gap: 4px;
}

.dash-course-list__tab {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.dash-course-list__tab:hover {
  color: var(--primary);
}

.dash-course-list__tab.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
  font-weight: 600;
}

.dash-course-list__skeleton {
  padding: 4px 0;
}

.dash-skeleton-row {
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--surface-alt) 25%,
    var(--border) 50%,
    var(--surface-alt) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  margin-bottom: 8px;
}

.dash-skeleton-row:last-child {
  margin-bottom: 0;
}

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

.dash-course-list__content {
  transition: opacity 0.15s ease;
}

.dash-course-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.dash-course-row:last-child {
  border-bottom: none;
}

.dash-course-row__icon {
  width: 42px;
  height: 42px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}

.dash-course-row__icon--gold {
  background: var(--secondary);
  color: #1e293b;
}

.dash-course-row__icon--text {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.dash-course-row__icon--text span {
  font-size: 11px;
}

.dash-course-row__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-course-row__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.dash-course-row__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--secondary);
  font-weight: 600;
}

.dash-course-row__rating iconify-icon {
  font-size: 12px;
}

.dash-course-row__meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.dash-course-row__btn {
  flex-shrink: 0;
}

/* ===== 14. LINK ARROW ===== */
.dash-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-top: 16px;
  align-self: flex-start;
  transition: gap var(--transition-fast);
  -webkit-transition: gap var(--transition-fast);
  -moz-transition: gap var(--transition-fast);
  -ms-transition: gap var(--transition-fast);
  -o-transition: gap var(--transition-fast);
}

.dash-link-arrow iconify-icon {
  font-size: 11px;
}

.dash-link-arrow:hover {
  gap: 10px;
  color: var(--primary-dark);
}

/* ===== 15. BUTTONS ===== */
.dash-btn-blue,
.dash-btn-gold,
.dash-btn-outline,
.dash-btn-outline-gold {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  white-space: nowrap;
}

.dash-btn-blue {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.dash-btn-blue:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white-color);
}

.dash-btn-gold {
  background: var(--secondary);
  color: var(--white-color);
  border-color: var(--secondary);
}

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

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

.dash-btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.dash-btn-outline-gold {
  background: transparent;
  color: var(--secondary);
  border-color: var(--secondary);
}

.dash-btn-outline-gold:hover {
  background: var(--secondary);
  color: #1e293b;
}

/* ===== 16. OFFCANVAS BACKDROP ===== */
.dash-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.dash-sidebar-backdrop.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ===== 17. RESPONSIVE ===== */
@media (max-width: 1199.98px) {
  .dash-hero-row {
    grid-template-columns: 1fr 1fr;
  }
  .dash-hero-row .dash-card--chart {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991.98px) {
  /* Sidebar becomes offcanvas */
  .dash-sidebar {
    transform: translateX(-100%);
    width: 280px !important;
  }
  .dash-sidebar.show {
    transform: translateX(0);
  }

  /* Force expanded look inside offcanvas even if was collapsed */
  .dash-sidebar.is-collapsed {
    width: 280px !important;
  }
  .dash-sidebar.is-collapsed .dash-sidebar__brand {
    justify-content: flex-start;
    padding: 18px 20px;
  }
  .dash-sidebar.is-collapsed .dash-sidebar__brand-text,
  .dash-sidebar.is-collapsed .dash-sidebar__item span {
    display: block;
  }
  .dash-sidebar.is-collapsed .dash-sidebar__collapse-btn {
    display: none;
  }
  .dash-sidebar.is-collapsed .dash-sidebar__item {
    justify-content: flex-start;
    padding: 11px 14px;
  }

  /* Mobile: always show large logo, hide small logo */
  .dash-sidebar.is-collapsed .dash-sidebar__brand-icon-wrapper,
  .dash-sidebar .dash-sidebar__brand-icon-wrapper {
    width: 135px;
    height: 40px;
    justify-content: flex-start;
  }
  .dash-sidebar.is-collapsed .dash-sidebar__brand-icon,
  .dash-sidebar .dash-sidebar__brand-icon {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
  }
  .dash-sidebar.is-collapsed .dash-sidebar__brand-icon::after,
  .dash-sidebar .dash-sidebar__brand-icon::after {
    opacity: 1;
  }
  .dash-sidebar.is-collapsed .dash-sidebar__brand-icon-2,
  .dash-sidebar .dash-sidebar__brand-icon-2 {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.85);
    pointer-events: none;
  }

  .dash-sidebar__collapse-btn {
    display: none;
  }

  .dash-main-wrap,
  .dash-shell.is-collapsed .dash-main-wrap {
    margin-left: 0;
  }

  .dash-topbar__hamburger {
    display: flex;
  }
  .dash-topbar {
    padding: 14px 20px;
  }
  .dash-main {
    padding: 20px;
  }

  .dash-hero-row {
    grid-template-columns: 1fr 1fr;
  }
  .dash-hero-row .dash-card--chart {
    grid-column: 1 / -1;
  }
  .dash-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .dash-bottom-row {
    grid-template-columns: 1fr;
  }

  .dash-main {
    max-width: 100vw;
    overflow: hidden;
  }
}

@media (max-width: 767.98px) {
  .dash-topbar {
    padding: 12px 10px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .dash-topbar__title {
    font-size: 18px;
    max-width: 125px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dash-topbar__search-wrap {
    display: none;
  }

  .dash-topbar__search-wrap.mobile-show {
    display: block;
    flex: 0 0 100%;
    order: 99;
    max-width: 100%;
    width: 100%;
    margin: 2px 0 0;
  }

  .dash-topbar__search-icon {
    display: flex;
  }

  .dash-topbar__user-text,
  .dash-topbar__chevron {
    display: none;
  }

  .dash-topbar__user {
    padding: 4px;
    border-radius: 50%;
  }

  /* Notifications dropdown mobile */
  .dash-topbar__notifications {
    position: fixed;
    top: 56px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 68px);
    border-radius: var(--radius-lg);
  }

  /* Search results dropdown mobile */
  .dash-topbar__search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: calc(100vh - 148px);
    border-radius: var(--radius-lg);
  }

  .dash-topbar__search-wrap.is-searching .dash-topbar__search {
    position: relative;
    z-index: 201;
  }

  .dash-main {
    padding: 10px;
  }

  .dash-hero-row,
  .dash-stats-row,
  .dash-bottom-row {
    gap: 16px;
    margin-bottom: 16px;
  }

  .dash-hero-row,
  .dash-stats-row {
    grid-template-columns: 1fr;
  }

  .dash-hero-row .dash-card--chart {
    grid-column: auto;
  }

  .dash-card {
    padding: 18px;
  }
  .dash-stat-card {
    padding: 16px;
  }

  .dash-bar-chart {
    height: 130px;
    gap: 5px;
  }
  .dash-bar-chart__track {
    max-width: 12px;
  }
  .dash-bar-chart__label {
    font-size: 10px;
  }

  .dash-progress-circle {
    width: 130px;
    height: 130px;
  }
  .dash-progress-circle__percent {
    font-size: 26px;
  }

  .dash-course-list__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-schedule-item {
    flex-wrap: wrap;
  }
  .dash-schedule-item__btn {
    width: 100%;
    margin-top: 4px;
  }
  .dash-schedule-item__btn button {
    width: 100%;
  }

  .dash-course-row {
    flex-wrap: wrap;
  }
  .dash-course-row__btn {
    width: 100%;
  }
  .dash-course-row__btn button {
    width: 100%;
  }

  .dash-resource-item__name {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .dash-card__value {
    font-size: 22px;
  }
  .dash-progress-circle {
    width: 120px;
    height: 120px;
  }
  .dash-progress-circle__percent {
    font-size: 24px;
  }
  .dash-stat-card__icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  .dash-bar-chart {
    height: 110px;
  }
}

/* ============================================================
   === Profile page ===
   ============================================================ */

/* ----- Profile Hero ----- */
.dash-profile-hero {
  padding: 24px 32px;
}

.dash-profile-hero__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.dash-profile-hero__avatar-wrap {
  flex-shrink: 0;
}

.dash-profile-hero__avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.dash-profile-hero__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}

.dash-profile-hero__camera-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 3px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 14px;
}

.dash-profile-hero__camera-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.dash-profile-hero__info {
  flex: 1;
  min-width: 0;
}

.dash-profile-hero__info-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.dash-profile-hero__name-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-profile-hero__name {
  font-size: clamp(1.25rem, 1.2rem + 0.23vw, 1.4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.dash-profile-hero__role-badge {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.dash-profile-hero__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.dash-profile-hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}

.dash-profile-hero__code {
  font-family: "SF Mono", Monaco, monospace;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-alt);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.dash-profile-hero__meta-divider {
  color: var(--text-muted);
}

/* ----- Profile Form ----- */
.dash-profile-form-card {
  padding: 24px 32px;
}

.dash-profile-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.dash-profile-input {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--surface);
  transition: all var(--transition-base);
}

.dash-profile-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.15);
}

.dash-profile-input[readonly] {
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: not-allowed;
}

.dash-profile-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.dash-profile-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-size: 12px;
  font-weight: 500;
}

.dash-profile-verified iconify-icon {
  font-size: 14px;
}

.dash-profile-input-wrap {
  position: relative;
}

.dash-profile-input-wrap .dash-profile-input {
  padding-right: 42px;
}

.dash-profile-feedback {
  display: none;
  margin-bottom: 16px;
}

.dash-profile-feedback:not(:empty) {
  display: block;
}

.dash-profile-alert {
  border-radius: 12px;
  padding: 12px 16px;
}

.dash-profile-alert ul {
  margin: 0;
  padding-left: 18px;
}

.dash-btn-blue .spinner-border,
.dash-btn-gold .spinner-border {
  vertical-align: -2px;
}

.dash-profile-copy-btn,
.dash-profile-eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-size: 14px;
}

.dash-profile-copy-btn:hover,
.dash-profile-eye-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-profile-radio-group {
  display: flex;
  gap: 16px;
  padding-top: 6px;
}

.dash-profile-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.dash-profile-radio input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.dash-profile-form-footer {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ----- Password Strength ----- */
.dash-profile-strength {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-profile-strength__bar {
  height: 4px;
  flex: 1;
  background: var(--border);
  border-radius: var(--radius-pill);
  transition: all var(--transition-base);
}

.dash-profile-strength__text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 60px;
  text-align: right;
}

/* ----- Activity Card ----- */
.dash-profile-activity {
  padding: 24px 32px;
}

.dash-profile-activity__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-profile-activity__item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-profile-activity__icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
  flex-shrink: 0;
}

.dash-profile-activity__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-profile-activity__label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.dash-profile-activity__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ----- Avatar Modal ----- */
.dash-avatar-modal .modal-content {
  border: none;
  border-radius: var(--radius-xl);
}

.dash-avatar-modal .modal-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}

.dash-avatar-modal .modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.dash-avatar-modal .modal-body {
  padding: 24px;
}

.dash-avatar-modal .modal-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  gap: 8px;
}

.dash-avatar-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-secondary);
}

.dash-avatar-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.dash-avatar-dropzone iconify-icon {
  font-size: 40px;
}

.dash-avatar-dropzone span {
  font-size: 14px;
  font-weight: 600;
}

.dash-avatar-dropzone small {
  font-size: 12px;
  color: var(--text-muted);
}

.dash-avatar-cropper__canvas {
  height: 360px;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dash-avatar-cropper__canvas img {
  max-width: 100%;
  display: block;
}

.dash-avatar-cropper__controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.dash-avatar-cropper__controls .btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 16px;
}

.dash-avatar-cropper__controls .btn-icon:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.dash-avatar-cropper__preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.dash-avatar-cropper__preview-wrap span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.dash-avatar-cropper__preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary);
  background: var(--surface-alt);
}

.dash-avatar-cropper__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----- Profile Responsive ----- */
@media (max-width: 991.98px) {
  .dash-profile-hero {
    padding: 20px 24px;
  }
  .dash-profile-hero__inner {
    flex-direction: column;
    text-align: center;
  }
  .dash-profile-hero__info-top {
    flex-direction: column;
    align-items: center;
  }
  .dash-profile-hero__actions {
    width: 100%;
    justify-content: center;
  }
  .dash-profile-hero__meta {
    justify-content: center;
  }
  .dash-profile-form-card,
  .dash-profile-security,
  .dash-profile-activity {
    padding: 20px 24px;
  }
  .dash-avatar-cropper__canvas {
    height: 280px;
  }
}

@media (max-width: 768px) {
  .dash-profile-hero__avatar {
    width: 88px;
    height: 88px;
  }
  .dash-profile-hero__camera-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .dash-profile-form-footer {
    flex-direction: column;
  }
  .dash-profile-form-footer button {
    width: 100%;
  }
  .dash-avatar-cropper__canvas {
    height: 240px;
  }
  .dash-avatar-cropper__controls {
    flex-wrap: wrap;
  }
  .dash-topbar__actions {
    margin-left: auto;
  }
}

@media (max-width: 576px) {
  .dash-topbar__notifications {
    top: 52px;
    left: 8px;
    right: 8px;
  }

  .dash-topbar__search-results {
    left: 0;
    right: 0;
  }

  .dash-profile-hero,
  .dash-profile-form-card,
  .dash-profile-security,
  .dash-profile-activity {
    padding: 16px 20px;
  }
  .dash-profile-hero__name-wrap {
    flex-direction: column;
    gap: 8px;
  }
  .dash-profile-radio-group {
    flex-direction: column;
    gap: 10px;
  }
  .dash-avatar-modal .modal-dialog {
    margin: 0.5rem;
  }
}

@media (max-width: 350px) {
  .dash-profile-hero__avatar {
    width: 72px;
    height: 72px;
  }
}

/* ============================================================
   === Đề thi thử (de-thi-thu) ===
   Bootstrap 5 grid only · max-width media queries · iconify icons
   ============================================================ */

.dash-exam {
  padding: 24px 24px 32px;
}

/* ============================================================
   === (A) HERO CARD – Light Luxury Gradient ===
   ============================================================ */
.dash-exam-hero {
  background: var(--white-color);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-slow);
}

.dash-exam-hero:hover {
  box-shadow: var(--shadow-card-hover);
}

.dash-exam-hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(0, 94, 184, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Step indicator with connector */
.dash-exam-hero__steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 18px;
}

.dash-exam-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 2px solid var(--border);
  transition: all var(--transition-base);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.dash-exam-step--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 94, 184, 0.12);
}

.dash-exam-step--done {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.dash-exam-hero__steps .dash-exam-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 2px;
  background: var(--border);
  margin-left: 4px;
  z-index: 1;
}

.dash-exam-hero__steps .dash-exam-step--active:not(:last-child)::after,
.dash-exam-hero__steps .dash-exam-step--done:not(:last-child)::after {
  background: linear-gradient(90deg, var(--primary), var(--border));
}

.dash-exam-hero__title {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.dash-exam-hero__desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 22px;
  max-width: 440px;
}

.dash-exam-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-exam-cta {
  padding: 10px 22px;
  font-size: 14px;
}

.dash-exam-hero__illust {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.dash-exam-hero__illust iconify-icon {
  font-size: 180px;
  line-height: 1;
}

/* Outline gold – glassmorphism touch */
.dash-exam-btn-outline-gold {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(196, 163, 90, 0.45);
  color: var(--secondary);
  transition: all var(--transition-base);
}

.dash-exam-btn-outline-gold:hover {
  background: var(--secondary-light);
  color: var(--secondary-hover);
  border-color: var(--secondary-hover);
  box-shadow: 0 4px 16px rgba(196, 163, 90, 0.15);
  transform: translateY(-2px);
}

/* ============================================================
   === (B) MODE CARDS – Elevate + Glow Border ===
   ============================================================ */
.dash-exam-modes {
  margin-bottom: 24px;
}

.dash-exam-mode {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-slow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dash-exam-mode::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.dash-exam-mode:hover {
  transform: translateY(-6px);
  box-shadow:
    var(--shadow-card-hover),
    0 0 0 3px rgba(0, 94, 184, 0.08);
  border-color: var(--border-active);
}

.dash-exam-mode__body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.dash-exam-mode__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.dash-exam-mode--blue .dash-exam-mode__icon {
  background: rgba(0, 94, 184, 0.1);
  color: var(--primary);
}

.dash-exam-mode--gold .dash-exam-mode__icon {
  background: rgba(196, 163, 90, 0.14);
  color: var(--secondary);
}

.dash-exam-mode__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

/* Mode selected – glow ring */
.dash-exam-mode.is-active {
  border-width: 2px;
  box-shadow:
    var(--shadow-card-hover),
    0 0 0 4px rgba(0, 94, 184, 0.12);
}

.dash-exam-mode--blue.is-active {
  border-color: var(--primary);
  background: rgba(0, 94, 184, 0.04);
}

.dash-exam-mode--gold.is-active {
  border-color: var(--secondary);
  background: rgba(196, 163, 90, 0.06);
  box-shadow:
    var(--shadow-card-hover),
    0 0 0 4px rgba(196, 163, 90, 0.15);
}

.dash-exam-mode__check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 94, 184, 0.3);
}

.dash-exam-mode.is-active .dash-exam-mode__check {
  opacity: 1;
  transform: scale(1);
}

.dash-exam-mode--gold.is-active .dash-exam-mode__check {
  background: var(--secondary);
  box-shadow: 0 2px 8px rgba(196, 163, 90, 0.35);
}

/* Dimming unselected modes */
.dash-exam-modes.has-selection .dash-exam-mode:not(.is-active) {
  opacity: 0.4;
  filter: grayscale(0.5);
  transform: scale(0.98);
}

.dash-exam-modes.has-selection .dash-exam-mode:not(.is-active):hover {
  opacity: 0.6;
  filter: grayscale(0.3);
}

/* ============================================================
   === (C) SECTION TITLE ===
   ============================================================ */
.dash-exam-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px;
  letter-spacing: -0.3px;
}

/* ============================================================
   === (C) GRADE CARDS – Elevate + Glow ===
   ============================================================ */
.dash-exam-grades {
  margin-bottom: 24px;
}

.dash-exam-grades__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dash-exam-grades__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  transition: opacity 0.3s ease;
}

.dash-exam-grades__hint iconify-icon {
  font-size: 14px;
  color: var(--text-muted);
}

.dash-exam-grades:not(.is-disabled) .dash-exam-grades__hint {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.dash-exam-grade {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-slow);
  height: 100%;
  overflow: hidden;
}

.dash-exam-grade:hover {
  border-color: var(--border-active);
  box-shadow:
    var(--shadow-card-hover),
    0 0 0 3px rgba(0, 94, 184, 0.08);
  transform: translateY(-4px);
}

.dash-exam-grade:hover::before {
  opacity: 0.6;
}

.dash-exam-grade__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(0, 94, 184, 0.1);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.dash-exam-grade__body {
  flex: 1;
  min-width: 0;
}

.dash-exam-grade__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.dash-exam-grade__sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

.dash-exam-grade__check {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--primary);
  font-size: 18px;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Active states */
.dash-exam-grade.is-active {
  border-color: var(--primary);
  background: rgba(0, 94, 184, 0.04);
  box-shadow:
    0 4px 20px rgba(0, 94, 184, 0.12),
    0 0 0 3px rgba(0, 94, 184, 0.1);
}

.dash-exam-grade.is-active::before {
  opacity: 1;
}

.dash-exam-grade.is-active .dash-exam-grade__icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 94, 184, 0.25);
}

.dash-exam-grade.is-active .dash-exam-grade__check {
  opacity: 1;
  transform: scale(1);
}

/* Disabled state */
.dash-exam-grades.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.6);
  transition:
    opacity 0.5s ease,
    filter 0.5s ease;
}

.dash-exam-grades:not(.is-disabled) {
  opacity: 1;
  pointer-events: auto;
  filter: grayscale(0);
  transition:
    opacity 0.5s ease,
    filter 0.5s ease;
}

.dash-exam-grade.is-disabled {
  opacity: 0.35;
  filter: grayscale(0.6);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.dash-exam-grade.is-disabled:hover {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

/* ============================================================
   === (D) FEATURED / EXAM CARDS ===
   ============================================================ */
.dash-exam-featured__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-exam-link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dash-exam-link-more:hover {
  color: var(--primary-dark);
  gap: 8px;
}

.dash-exam-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 11px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all var(--transition-slow);
}

.dash-exam-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-active);
}

.dash-exam-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(0, 94, 184, 0.08);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all var(--transition-base);
}

.dash-exam-card:hover .dash-exam-card__icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 94, 184, 0.2);
}

.dash-exam-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
  min-height: 40px;
  letter-spacing: -0.2px;
}
.dash-exam-list-section .dash-exam-card__title {
  min-height: auto;
}
.dash-exam-card__meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-exam-card__meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dash-exam-card__meta iconify-icon {
  font-size: 13px;
}

.dash-exam-card__badge {
  align-self: flex-start;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.dash-exam-card__badge--easy {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.dash-exam-card__badge--medium {
  background: rgba(0, 94, 184, 0.12);
  color: var(--primary);
}

.dash-exam-card__badge--hard {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warning);
}

.dash-exam-card__badge--vhard {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.dash-exam-card__cta {
  margin-top: auto;
  font-size: 13px;
  padding: 8px 16px;
}
.dash-exam-card__cta--closed {
  background: var(--bg, #f3f6fb);
  color: var(--text-muted, #8896a6);
  cursor: not-allowed;
  pointer-events: none;
  border: 1px solid var(--border, #e3e8ef);
}
.dash-exam-card__cta--closed iconify-icon {
  color: var(--text-muted, #8896a6);
}
.dash-exam-card__cta--exhausted {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
  cursor: not-allowed;
  pointer-events: none;
}
.dash-exam-card__cta--exhausted iconify-icon {
  color: var(--danger);
}
.dash-exam-card__meta li.is-exhausted {
  color: var(--danger);
  font-weight: 600;
}
.dash-exam-card[data-closed="true"] {
  opacity: 0.75;
}

/* ============================================================
   === (R) RIGHT RAIL – Stats + CTA ===
   ============================================================ */
.dash-exam-rail-card,
.dash-exam-rail-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-slow);
}

.dash-exam-rail-card:hover,
.dash-exam-rail-cta:hover {
  box-shadow: var(--shadow-card-hover);
}

.dash-exam-rail-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
  letter-spacing: -0.2px;
}

.dash-exam-stat-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.dash-exam-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  position: relative;
}

.dash-exam-stat:not(:last-child) {
  border-bottom: 0;
}

.dash-exam-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 56px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.dash-exam-stat__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dash-exam-stat__icon--blue {
  background: rgba(0, 94, 184, 0.1);
  color: var(--primary);
}

.dash-exam-stat__icon--blue-soft {
  background: rgba(14, 165, 233, 0.12);
  color: var(--info);
}

.dash-exam-stat__icon--gold {
  background: rgba(196, 163, 90, 0.14);
  color: var(--secondary);
}

.dash-exam-stat__body {
  flex: 1;
  min-width: 0;
}

.dash-exam-stat__label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

.dash-exam-stat__value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
  letter-spacing: -0.5px;
}

.dash-exam-stat__delta {
  text-align: right;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}

.dash-exam-stat__delta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}

.dash-exam-stat__delta small {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.2;
}

.dash-exam-stat__delta--up span {
  color: var(--success);
}

.dash-exam-stat__delta--down span {
  color: var(--danger);
}

.dash-exam-rail-card__cta {
  font-size: 13px;
  padding: 10px 18px;
}

/* CTA cards – gradient mesh */
.dash-exam-rail-cta {
  text-align: left;
}

.dash-exam-rail-cta--blue {
  background: linear-gradient(
    135deg,
    rgba(0, 94, 184, 0.04) 0%,
    rgba(0, 94, 184, 0.1) 100%
  );
  border-color: rgba(0, 94, 184, 0.18);
}

.dash-exam-rail-cta--blue::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -20%;
  width: 160px;
  height: 160px;
  background: radial-gradient(
    circle,
    rgba(0, 94, 184, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.dash-exam-rail-cta--gold {
  background: linear-gradient(
    135deg,
    rgba(196, 163, 90, 0.06) 0%,
    rgba(196, 163, 90, 0.16) 100%
  );
  border-color: rgba(196, 163, 90, 0.25);
}

.dash-exam-rail-cta--gold::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -20%;
  width: 160px;
  height: 160px;
  background: radial-gradient(
    circle,
    rgba(196, 163, 90, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.dash-exam-rail-cta__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0, 94, 184, 0.2);
  position: relative;
  z-index: 1;
}

.dash-exam-rail-cta__icon--gold {
  background: var(--secondary);
  box-shadow: 0 4px 16px rgba(196, 163, 90, 0.25);
}

.dash-exam-rail-cta__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  position: relative;
  z-index: 1;
}

.dash-exam-rail-cta__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}

.dash-exam-rail-cta__btn {
  font-size: 13px;
  padding: 10px 18px;
  position: relative;
  z-index: 1;
  transition: all var(--transition-base);
}

.dash-exam-rail-cta__btn:hover {
  transform: translateY(-2px);
}

/* ============================================================
   === START BUTTON – Shimmer + Glow Crown Jewel ===
   ============================================================ */
.dash-exam-start-wrap {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px 0 8px;
}

.dash-exam-start-wrap.is-visible {
  display: flex;
  animation: dashExamStartAppear 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.dash-exam-start-btn {
  position: relative;
  overflow: hidden;
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 800;
  gap: 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  cursor: pointer;
  letter-spacing: -0.2px;
  box-shadow:
    0 0 20px rgba(0, 94, 184, 0.3),
    0 4px 11px rgba(0, 94, 184, 0.25);
  transition: all var(--transition-base);
}

.dash-exam-start-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  animation: dashExamShimmer 2.5s infinite;
}

@keyframes dashExamShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

.dash-exam-start-btn:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow:
    0 0 30px rgba(0, 94, 184, 0.45),
    0 12px 40px rgba(0, 94, 184, 0.3);
}

.dash-exam-start-btn:hover::before {
  animation-duration: 1.8s;
}

.dash-exam-start-btn iconify-icon {
  font-size: 20px;
  position: relative;
  z-index: 1;
}

.dash-exam-start-btn span {
  position: relative;
  z-index: 1;
}

.dash-exam-start-btn:disabled,
.dash-exam-start-btn.is-disabled {
  background: linear-gradient(90deg, var(--text-muted), #94a3b8);
  cursor: not-allowed;
  opacity: 0.4;
  box-shadow: none;
  transform: none;
}

.dash-exam-start-btn:disabled::before,
.dash-exam-start-btn.is-disabled::before {
  animation: none;
  display: none;
}

.dash-exam-start-btn:disabled:hover,
.dash-exam-start-btn.is-disabled:hover {
  box-shadow: none;
  transform: none;
}

/* ============================================================
   === TOPBAR FILTERS (desktop) ===
   ============================================================ */
.dash-exam-topbar {
  flex-wrap: wrap;
  row-gap: 10px;
}

.dash-exam-topbar__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-exam-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dash-exam-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.dash-exam-chip iconify-icon {
  font-size: 14px;
  color: var(--text-secondary);
}

.dash-exam-chip:hover iconify-icon {
  color: var(--primary);
}

.dash-exam-topbar__search {
  flex: 1;
  max-width: 280px;
  margin: 0 0 0 auto;
}

/* Mặc định (desktop ≥992px): ẩn nút "Bộ lọc" icon + bottom-sheet */
.dash-exam-filter-toggle {
  display: none;
}
.dash-exam-sheet {
  display: none;
}

/* ----- Bottom nav (mobile only) ----- */
.dash-bottom-nav {
  display: none;
}

/* ============================================================
   === Đề thi thử – Responsive (max-width only) ===
   ============================================================ */

@media (max-width: 1199.98px) {
  .dash-exam-rail {
    margin-top: 8px;
  }
}

@media (max-width: 991.98px) {
  .dash-exam {
    padding: 20px 20px 100px;
  }

  .dash-exam-hero {
    padding: 24px;
  }

  .dash-exam-hero__illust iconify-icon {
    font-size: 140px;
  }

  /* Topbar mobile */
  .dash-exam-topbar {
    padding: 12px 18px;
  }
  .dash-exam-topbar__filters {
    display: none !important;
  }
  .dash-exam-topbar__search {
    display: none;
  }
  .dash-exam-topbar__search.mobile-show {
    display: block;
    order: 100;
    flex: 0 0 100%;
    max-width: 100%;
    margin: 8px 0 0;
  }
  .dash-exam-topbar .dash-topbar__search-icon {
    display: inline-flex;
  }

  .dash-exam-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: auto;
  }
  .dash-exam-filter-toggle:hover,
  .dash-exam-filter-toggle[aria-expanded="true"] {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
  }
  .dash-exam-filter-toggle iconify-icon {
    font-size: 16px;
  }

  /* Bottom-sheet */
  .dash-exam-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
  }
  .dash-exam-sheet[aria-hidden="false"] {
    pointer-events: auto;
  }
  .dash-exam-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    transition: opacity 0.22s ease;
  }
  .dash-exam-sheet[aria-hidden="false"] .dash-exam-sheet__backdrop {
    opacity: 1;
  }
  .dash-exam-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-radius: 18px 18px 0 0;
    padding: 14px 18px max(18px, env(safe-area-inset-bottom));
    max-height: 82vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.26s ease-out;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12);
  }
  .dash-exam-sheet[aria-hidden="false"] .dash-exam-sheet__panel {
    transform: translateY(0);
  }
  .dash-exam-sheet__handle {
    width: 42px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 4px auto 14px;
  }
  .dash-exam-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }
  .dash-exam-sheet__header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
  }
  .dash-exam-sheet__close {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
  }
  .dash-exam-sheet__close:hover {
    color: var(--primary);
    background: var(--primary-light);
  }
  .dash-exam-sheet__group {
    margin-bottom: 18px;
  }
  .dash-exam-sheet__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
  }
  .dash-exam-sheet__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dash-exam-sheet__chips .dash-exam-chip {
    flex: 0 0 auto;
  }
  .dash-exam-chip--active,
  .dash-exam-chip--active:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }
  .dash-exam-chip--active iconify-icon,
  .dash-exam-chip--active:hover iconify-icon {
    color: #fff;
  }
  .dash-exam-sheet__footer {
    display: flex;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .dash-exam-sheet__footer .knv-btn {
    flex: 1;
  }

  /* Bottom nav visible */
  .dash-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 6px 4px max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.05);
  }
  .dash-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  .dash-bottom-nav__item iconify-icon {
    font-size: 20px;
  }
  .dash-bottom-nav__item.active,
  .dash-bottom-nav__item:hover {
    color: var(--primary);
  }
}

@media (max-width: 768px) {
  .dash-exam {
    padding: 16px 16px 100px;
  }

  .dash-exam-hero {
    padding: 22px;
    text-align: center;
  }
  .dash-exam-hero__title {
    font-size: clamp(18px, 5vw, 22px);
  }
  .dash-exam-hero__desc {
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
  }
  .dash-exam-hero__cta {
    justify-content: center;
  }
  .dash-exam-hero__illust {
    display: none;
  }

  .dash-exam-hero__steps {
    justify-content: center;
  }

  .dash-exam-mode {
    padding: 16px;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .dash-exam-mode__body {
    flex-direction: column;
    gap: 8px;
  }

  .dash-exam-card {
    padding: 16px;
  }
  .dash-exam-card__title {
    font-size: 14px;
    min-height: 36px;
  }

  .dash-exam-rail-card,
  .dash-exam-rail-cta {
    padding: 20px;
  }

  .dash-exam-start-btn {
    padding: 14px 36px;
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .dash-exam-section-title {
    font-size: 16px;
  }
  .dash-exam-mode__title {
    font-size: 14px;
  }
  .dash-exam-mode__features {
    gap: 8px 14px;
  }
  .dash-exam-stat__value {
    font-size: 18px;
  }
  .dash-exam-rail-cta__title {
    font-size: 15px;
  }

  .dash-exam-hero__cta .knv-btn {
    flex: 1 1 calc(50% - 5px);
  }

  .dash-exam-step {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .dash-exam-grades__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .dash-exam-start-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 28px;
    font-size: 16px;
  }

  .dash-exam-mode {
    padding: 14px 12px;
  }
  .dash-exam-mode__icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .dash-exam-mode__check {
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .dash-exam-grade {
    padding: 12px 14px;
  }
  .dash-exam-grade__icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

@media (max-width: 350px) {
  .dash-exam-hero__cta .knv-btn {
    flex: 0 0 100%;
  }
  .dash-bottom-nav__item span {
    font-size: 10px;
  }
  .dash-exam-chip span {
    font-size: 12px;
  }

  .dash-exam-mode__title {
    font-size: 13px;
  }
  .dash-exam-grade__title {
    font-size: 13px;
  }
}

/* ============================================================
   === Exam Prep / Flow – Light Luxury Confirmation ===
   ============================================================ */

.dash-prep {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: dashExamStartAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dash-prep::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(0, 94, 184, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Header */
.dash-prep__header {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.dash-prep__title {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.dash-prep__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius-pill);
  margin: 0;
}

/* Info Pills – micro cards */
.dash-prep__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.dash-prep__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
  transition: all var(--transition-base);
}

.dash-prep__pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dash-prep__pill iconify-icon {
  font-size: 15px;
}

.dash-prep__pill--violet {
  background: rgba(139, 92, 246, 0.08);
  color: #7c3aed;
  border-color: rgba(139, 92, 246, 0.2);
}

.dash-prep__pill--blue {
  background: rgba(0, 94, 184, 0.08);
  color: var(--primary);
  border-color: rgba(0, 94, 184, 0.2);
}

.dash-prep__pill--green {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.dash-prep__pill--orange {
  background: rgba(245, 158, 11, 0.08);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.dash-prep__pill--cyan {
  background: rgba(14, 165, 233, 0.08);
  color: #0891b2;
  border-color: rgba(14, 165, 233, 0.2);
}

/* Info Sections */
.dash-prep__section {
  background: linear-gradient(
    135deg,
    var(--surface-alt) 0%,
    var(--surface) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  height: 100%;
  position: relative;
  z-index: 1;
  transition: all var(--transition-slow);
}

.dash-prep__section:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-active);
  transform: translateY(-4px);
}

.dash-prep__section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 18px;
  letter-spacing: -0.2px;
}

.dash-prep__section-title iconify-icon {
  font-size: 20px;
  color: var(--primary);
}

.dash-prep__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dash-prep__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid transparent;
  position: relative;
  transition: all var(--transition-fast);
}

.dash-prep__list li:not(:last-child) {
  border-bottom-color: var(--border);
}

.dash-prep__list li:hover {
  color: var(--text-primary);
}

.dash-prep__list li:hover iconify-icon {
  color: var(--primary);
  transform: scale(1.1);
}

.dash-prep__list li iconify-icon {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

/* Actions */
.dash-prep__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.dash-prep__actions .knv-btn-outline-primary {
  transition: all var(--transition-base);
}

.dash-prep__actions .knv-btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 94, 184, 0.1);
}

/* Start button – shimmer crown jewel */
.dash-prep-start-btn {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 16px rgba(0, 94, 184, 0.25),
    0 6px 24px rgba(0, 94, 184, 0.2);
  transition: all var(--transition-base);
}

.dash-prep-start-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: dashExamShimmer 2.5s infinite;
}

.dash-prep-start-btn:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow:
    0 0 24px rgba(0, 94, 184, 0.4),
    0 8px 32px rgba(0, 94, 184, 0.25);
}

.dash-prep-start-btn:hover::before {
  animation-duration: 1.8s;
}

.dash-prep-start-btn iconify-icon,
.dash-prep-start-btn span {
  position: relative;
  z-index: 1;
}

/* ============================================================
   === Exam Prep – Responsive ===
   ============================================================ */

@media (max-width: 768px) {
  .dash-prep {
    padding: 24px;
  }

  .dash-prep__title {
    font-size: clamp(18px, 5vw, 22px);
  }

  .dash-prep__pills {
    gap: 8px;
  }

  .dash-prep__pill {
    padding: 6px 12px;
    font-size: 12px;
  }

  .dash-prep__section {
    padding: 20px;
  }

  .dash-prep__actions {
    flex-direction: column;
    gap: 10px;
  }

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

@media (max-width: 576px) {
  .dash-prep {
    padding: 20px 15px;
    border-radius: var(--radius-xl);
  }

  .dash-prep__pill {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .dash-prep__section-title {
    font-size: 15px;
  }

  .dash-prep__list li {
    font-size: 13px;
    padding: 8px 0;
  }
}

@media (max-width: 350px) {
  .dash-prep__pill {
    flex: 0 0 100%;
  }
}

/* ============================================================
   === Guide Modal ===
   ============================================================ */

.dash-exam-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.dash-exam-guide-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.dash-exam-guide-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(0px);
  transition:
    backdrop-filter 0.4s ease,
    background 0.4s ease;
}

.dash-exam-guide-modal[aria-hidden="false"] .dash-exam-guide-modal__backdrop {
  backdrop-filter: blur(6px);
  background: rgba(15, 23, 42, 0.6);
}

.dash-exam-guide-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}

.dash-exam-guide-modal[aria-hidden="false"] .dash-exam-guide-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Header */
.dash-exam-guide-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dash-exam-guide-modal__head-text {
  flex: 1 1 auto;
  min-width: 0;
}

.dash-exam-guide-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-exam-guide-modal__title iconify-icon {
  color: var(--primary);
  font-size: 20px;
}

.dash-exam-guide-modal__subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.dash-exam-guide-modal__close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.dash-exam-guide-modal__close:hover {
  background: var(--surface-alt);
  color: var(--text-primary);
}

/* Body */
.dash-exam-guide__body {
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
  min-height: 0;
}

/* Sidebar TOC */
.dash-exam-guide__sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--surface-alt);
  overflow-y: auto;
}

.dash-exam-guide__nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-exam-guide__nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1.5px solid transparent;
}

.dash-exam-guide__nav-item:hover {
  background: var(--surface);
  color: var(--primary);
}

.dash-exam-guide__nav-item.is-active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(0, 94, 184, 0.15);
  font-weight: 600;
}

.dash-exam-guide__nav-item iconify-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* Mobile nav (hidden on desktop) */
.dash-exam-guide__mobilenav {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--surface-alt);
  flex-shrink: 0;
}

.dash-exam-guide__mobilenav::-webkit-scrollbar {
  display: none;
}

.dash-exam-guide__mobilenav-item {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border: 1.5px solid var(--border);
  background: var(--surface);
}

.dash-exam-guide__mobilenav-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dash-exam-guide__mobilenav-item.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 94, 184, 0.25);
  font-weight: 600;
}

/* Content area */
.dash-exam-guide__content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 28px;
  scroll-behavior: smooth;
}

.dash-exam-guide__content::-webkit-scrollbar {
  width: 6px;
}

.dash-exam-guide__content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* Sections */
.dash-exam-guide__section {
  margin-bottom: 32px;
  padding: 0;
}

.dash-exam-guide__section:last-child {
  margin-bottom: 0;
}

.dash-exam-guide__section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.dash-exam-guide__section-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dash-exam-guide__section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.dash-exam-guide__section-body {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.dash-exam-guide__section-body p {
  margin: 0 0 12px;
}

.dash-exam-guide__section-body ol,
.dash-exam-guide__section-body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.dash-exam-guide__section-body li {
  margin-bottom: 6px;
}

.dash-exam-guide__section-body strong {
  color: var(--text-primary);
}

/* Steps preview */
.dash-exam-guide__steps-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  margin: 16px 0;
  flex-wrap: wrap;
}

.dash-exam-guide__step-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.dash-exam-guide__step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.dash-exam-guide__step-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

/* Options */
.dash-exam-guide__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.dash-exam-guide__option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.dash-exam-guide__option-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dash-exam-guide__option-icon--blue {
  background: rgba(0, 94, 184, 0.1);
  color: var(--primary);
}

.dash-exam-guide__option-icon--gold {
  background: rgba(196, 163, 90, 0.14);
  color: var(--secondary);
}

.dash-exam-guide__option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-exam-guide__option-text strong {
  font-size: 14px;
  color: var(--text-primary);
}

.dash-exam-guide__option-text span {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Tips */
.dash-exam-guide__tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(0, 94, 184, 0.06);
  border: 1px solid rgba(0, 94, 184, 0.12);
  border-radius: var(--radius-md);
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dash-exam-guide__tip iconify-icon {
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.dash-exam-guide__tip--info {
  background: rgba(14, 165, 233, 0.06);
  border-color: rgba(14, 165, 233, 0.12);
}

.dash-exam-guide__tip--info iconify-icon {
  color: var(--info);
}

/* Tip list */
.dash-exam-guide__tip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-exam-guide__tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dash-exam-guide__tip-item iconify-icon {
  color: var(--success);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   === Bottom-sheet xác nhận đề (dash-exam-confirm-sheet) ===
   ============================================================ */

.dash-exam-confirm-sheet {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}

.dash-exam-confirm-sheet[aria-hidden="false"] {
  pointer-events: auto;
}

.dash-exam-confirm-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.dash-exam-confirm-sheet[aria-hidden="false"]
  .dash-exam-confirm-sheet__backdrop {
  opacity: 1;
}

.dash-exam-confirm-sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 24px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  transition: transform 0.28s ease;
}

.dash-exam-confirm-sheet[aria-hidden="false"] .dash-exam-confirm-sheet__panel {
  transform: translate(-50%, 0);
}

.dash-exam-confirm-sheet__handle {
  width: 42px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  margin: 4px auto 18px;
}

.dash-exam-confirm-sheet__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
}

.dash-exam-confirm-sheet__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.dash-exam-confirm-sheet__eyebrow {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 2px;
  font-weight: 600;
}

.dash-exam-confirm-sheet__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.dash-exam-confirm-sheet__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dash-exam-confirm-sheet__close:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.dash-exam-confirm-sheet__body {
  margin-bottom: 20px;
}

.dash-exam-confirm-sheet__summary {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}

.dash-exam-confirm-sheet__summary li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.dash-exam-confirm-sheet__summary li:last-child {
  border-bottom: none;
}

.dash-exam-confirm-sheet__sum-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.dash-exam-confirm-sheet__sum-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.dash-exam-confirm-sheet__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.dash-exam-confirm-sheet__hint iconify-icon {
  color: var(--primary);
  font-size: 14px;
  flex-shrink: 0;
}

.dash-exam-confirm-sheet__footer {
  display: flex;
  gap: 12px;
}

.dash-exam-confirm-sheet__footer > * {
  flex: 1;
}

/* Mobile: full width bottom sheet */
@media (max-width: 991.98px) {
  .dash-exam-confirm-sheet__panel {
    left: 0;
    right: 0;
    transform: translate(0, 100%);
    max-width: none;
    border-radius: 24px 24px 0 0;
    padding: 18px 20px max(18px, env(safe-area-inset-bottom));
  }

  .dash-exam-confirm-sheet[aria-hidden="false"]
    .dash-exam-confirm-sheet__panel {
    transform: translate(0, 0);
  }
}

/* ============================================================
   === Trang chuẩn bị làm bài (dash-exam-prep) ===
   ============================================================ */

.dash-exam-prep {
  padding: 24px 20px 32px;
}

.dash-exam-prep__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  box-shadow: var(--shadow-card);
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
}

.dash-exam-prep__badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.dash-exam-prep__eyebrow {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 8px;
  font-weight: 500;
}

.dash-exam-prep__title {
  text-align: center;
  font-family: var(--title-font);
  color: var(--navy);
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 24px;
  line-height: 1.3;
}

.dash-exam-prep__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.dash-exam-prep-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.dash-exam-prep-pill iconify-icon {
  font-size: 15px;
}

/* Tone colors for pills */
.dash-exam-prep-pill--violet iconify-icon {
  color: #7c3aed;
}
.dash-exam-prep-pill--blue iconify-icon {
  color: var(--primary);
}
.dash-exam-prep-pill--green iconify-icon {
  color: var(--success);
}
.dash-exam-prep-pill--orange iconify-icon {
  color: var(--warning);
}
.dash-exam-prep-pill--cyan iconify-icon {
  color: var(--info);
}

.dash-exam-prep__cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  height: 56px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.dash-exam-prep__cta-primary iconify-icon {
  font-size: 20px;
}

.dash-exam-prep__cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  height: 48px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 32px;
}

.dash-exam-prep__divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 0 0 32px;
}

.dash-exam-prep__info {
  text-align: left;
  margin-bottom: 8px;
}

.dash-exam-prep__info-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.dash-exam-prep__info-title iconify-icon {
  color: var(--primary);
  font-size: 16px;
}

.dash-exam-prep__info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-exam-prep__info-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.dash-exam-prep__info-list li iconify-icon {
  color: var(--primary);
  font-size: 14px;
  flex-shrink: 0;
}

.dash-exam-prep__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin: 32px 0 0;
}

.dash-exam-prep__note iconify-icon {
  color: var(--primary);
  font-size: 14px;
}

/* ========================================================================
   DASH QUIZ — Trang làm bài thi trắc nghiệm (mockup tĩnh)
   ======================================================================== */

.dash-main.dash-quiz {
  padding: 16px;
}

/* (1) META CHIPS BAR ----------------------------------------------------- */
.dash-quiz-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dash-quiz-meta__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  color: var(--text-primary);
}
.dash-quiz-meta__chip iconify-icon {
  color: var(--primary);
  font-size: 18px;
}
.dash-quiz-meta__chip strong {
  color: var(--primary);
  font-weight: 700;
}
.dash-quiz-meta__chip--timer .dash-quiz-meta__time {
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
.dash-quiz-meta__time.is-warning {
  color: #d97706;
}

/* (2) QUESTION CARD ------------------------------------------------------ */
.dash-quiz-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.dash-quiz-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.dash-quiz-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-quiz-card__title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.dash-quiz-report {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--surface);
  background: #fff;
  border-radius: 999px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.dash-quiz-report:hover {
  background: #f7f9fc;
}
.dash-quiz-card__rule {
  color: var(--text-muted);
  margin: 4px 0 16px;
}

.dash-quiz-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #eaf3ff;
  border-radius: 12px;
  color: #1e40af;
  font-size: 14px;
  margin-bottom: 16px;
}
.dash-quiz-prompt p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0 0 6px;
}

/* Options ---------------------------------------------------------------- */
.dash-quiz-options {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-quiz-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1.5px solid var(--surface);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}
.dash-quiz-option:hover {
  border-color: #c9d4e3;
}
.dash-quiz-option.is-selected {
  border-color: var(--primary);
  background: #f0f6ff;
  box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.08);
}
.dash-quiz-option__letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
  flex: 0 0 32px;
}
.dash-quiz-option.is-selected .dash-quiz-option__letter {
  border-color: var(--primary);
  color: var(--primary);
}
.dash-quiz-option__text {
  flex: 1;
  font-size: 15px;
  color: var(--text-primary);
}
.dash-quiz-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dash-quiz-option__radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #c9d4e3;
  flex: 0 0 22px;
  position: relative;
}
.dash-quiz-option.is-selected .dash-quiz-option__radio {
  border-color: var(--primary);
  background: var(--primary);
}
.dash-quiz-option.is-selected .dash-quiz-option__radio::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

/* Action buttons --------------------------------------------------------- */
.dash-quiz-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.dash-quiz-actions > * {
  flex: 1 1 0;
  min-width: 0;
}

/* (3) RAIL --------------------------------------------------------------- */
.dash-quiz-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Progress donut + stats */
.dash-quiz-progress {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.dash-quiz-progress__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}
.dash-quiz-progress__body {
  display: flex;
  align-items: center;
  gap: 16px;
}
.dash-quiz-donut {
  position: relative;
  width: 120px;
  height: 120px;
  flex: 0 0 120px;
}
.dash-quiz-donut__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dash-quiz-donut__text strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}
.dash-quiz-donut__text span {
  font-size: 11px;
  color: var(--text-muted);
}

.dash-quiz-progress__stats {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-quiz-progress__stats li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.dash-quiz-progress__stats .lbl {
  color: var(--text-muted);
  flex: 1;
}
.dash-quiz-progress__stats strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Status dots dùng chung cho legend + stats + grid */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
  display: inline-block;
}
.dot--done {
  background: var(--primary);
}
.dot--current {
  background: #fff;
  border: 2px solid #d4a017;
}
.dot--todo {
  background: #d6dde7;
}
.dot--marked {
  background: #d4a017;
}

/* Question grid 5×7 (desktop), 10 cols (mobile) -------------------------- */
.dash-quiz-list {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.dash-quiz-list__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dash-quiz-list__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.dash-quiz-legend {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.dash-quiz-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-quiz-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.dash-quiz-cell {
  position: relative;
  flex: 0 0 calc((100% - 36px) / 7);
  aspect-ratio: 1/1;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--surface);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s;
}
.dash-quiz-cell:hover {
  transform: translateY(-1px);
}
.dash-quiz-cell--done {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.dash-quiz-cell--current {
  background: #fff;
  color: var(--text-primary);
  border: 2px solid #d4a017;
}
.dash-quiz-cell--todo {
  background: #f1f4f9;
  color: var(--text-muted);
  border-color: #f1f4f9;
}
.dash-quiz-cell--marked {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.dash-quiz-cell__flag {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 10px 0;
  border-color: transparent #d4a017 transparent transparent;
  border-top-right-radius: 6px;
}

.dash-quiz-list__more {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

/* Submit button + autosave note ------------------------------------------ */
.dash-quiz-submit {
  width: 100%;
  background: linear-gradient(180deg, #d4a017 0%, #b8860b 100%);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.25);
}
.dash-quiz-submit:hover {
  filter: brightness(1.05);
}
.dash-quiz-autosave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* Responsive cho dash-exam-prep */
@media (max-width: 1199.98px) {
  .dash-quiz-grid:not(.is-expanded) .dash-quiz-cell:nth-child(n + 31) {
    display: none;
  } /* mobile/tablet: chỉ show 30 đầu */
  /* Mobile/tablet: 10 cells per row */
  .dash-quiz-cell {
    flex: 0 0 calc((100% - 54px) / 10);
  }
}
@media (max-width: 991.98px) {
  /* Guide modal responsive */
  .dash-exam-guide-modal {
    padding: 0;
    align-items: flex-end;
  }
  .dash-exam-guide-modal__dialog {
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    max-width: 100%;
  }
  .dash-exam-guide-modal[aria-hidden="false"] .dash-exam-guide-modal__dialog {
    animation: guideModalSlideUp 0.35s ease forwards;
  }
  @keyframes guideModalSlideUp {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .dash-exam-guide__sidebar {
    display: none;
  }
  .dash-exam-guide__mobilenav {
    display: flex;
  }
  .dash-exam-guide__content {
    padding: 20px;
  }
  .dash-exam-guide__steps-preview {
    gap: 8px;
    padding: 16px 12px;
  }
  .dash-exam-guide__step-arrow {
    transform: rotate(90deg);
  }

  .dash-exam-prep__card {
    padding: 36px 28px;
  }
  .dash-exam-prep__title {
    font-size: 28px;
  }
  .dash-main.dash-quiz {
    padding: 12px;
  }
  /* Trên mobile: rail xuống dưới question card. Action buttons giữ nguyên trong card. */
  .dash-quiz-card {
    padding: 16px;
  }
  .dash-quiz-card__title {
    font-size: 26px;
  }
  .dash-quiz-progress__body {
    gap: 12px;
  }
  .dash-quiz-donut,
  .dash-quiz-donut svg {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 768px) {
  .dash-exam-prep {
    padding: 20px 16px 96px;
  }
  .dash-exam-prep__card {
    padding: 28px 20px;
  }
  .dash-exam-prep__badge {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  .dash-exam-prep__title {
    font-size: 22px;
  }
  .dash-exam-prep__pills {
    gap: 8px;
  }
  .dash-exam-prep-pill {
    padding: 8px 14px;
    font-size: 12px;
  }
  .dash-exam-prep__cta-primary {
    height: 52px;
    font-size: 15px;
  }
  .dash-exam-prep__cta-secondary {
    height: 44px;
  }
}

@media (max-width: 576px) {
  .dash-exam-prep__card {
    padding: 24px 16px;
    border-radius: var(--radius-lg);
  }
  .dash-exam-prep__title {
    font-size: 20px;
  }
  .dash-exam-prep__info-title {
    font-size: 14px;
  }
  .dash-exam-prep__info-list li {
    font-size: 12px;
    padding: 8px 12px;
  }
  .dash-quiz-meta {
    gap: 8px;
  }
  .dash-quiz-meta__chip {
    padding: 8px 10px;
    font-size: 13px;
    flex: 1 0 calc(50% - 4px);
  }
  .dash-quiz-meta__chip--timer {
    flex: 1 0 100%;
    justify-content: center;
  }
  .dash-quiz-actions > * {
    flex: 1 1 calc(50% - 5px);
  }
  .dash-quiz-actions__next {
    flex: 1 1 100%;
    order: 99;
  }
  .dash-quiz-card__title {
    font-size: 22px;
  }
  .dash-quiz-prompt p {
    font-size: 14px;
  }
  .dash-quiz-cell {
    flex: 0 0 calc((100% - 36px) / 7);
    min-height: 36px;
  }
}

@media (max-width: 350px) {
  .dash-exam-prep__card {
    padding: 20px 14px;
  }
  .dash-exam-prep__title {
    font-size: 18px;
  }
  .dash-exam-prep__badge {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  .dash-quiz-cell {
    flex: 0 0 calc((100% - 30px) / 6);
  }
}

/* ============================================================
   GUIDE PAGE
   ============================================================ */
.knv-guide-page {
  margin: 0 auto;
}

/* Hero */
.knv-guide-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.knv-guide-hero__subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0;
}

/* Quick Nav Cards */
.knv-guide-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition-base);
}
.knv-guide-nav-card iconify-icon {
  font-size: 1.5rem;
  color: var(--primary);
  transition: color var(--transition-base);
}
.knv-guide-nav-card:hover,
.knv-guide-nav-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.knv-guide-nav-card:hover iconify-icon,
.knv-guide-nav-card.active iconify-icon {
  color: var(--primary);
}

/* Tutorial Sections */
.knv-guide-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: border-color var(--transition-base);
}
.knv-guide-section:hover {
  border-color: var(--border-active);
}

.knv-guide-section__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.knv-guide-section__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.knv-guide-section__icon iconify-icon {
  font-size: 1.3rem;
  color: var(--primary);
}
.knv-guide-section__header h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.knv-guide-section__header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  width: 100%;
  padding-left: calc(48px + 1rem);
}

/* Steps */
.knv-guide-section__steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.knv-guide-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.knv-guide-step__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.knv-guide-step__content h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}
.knv-guide-step__content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Tips */
.knv-guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  background: var(--secondary-light);
  border-radius: var(--radius-md);
  -webkit-border-radius: var(--radius-md);
  -moz-border-radius: var(--radius-md);
  -ms-border-radius: var(--radius-md);
  -o-border-radius: var(--radius-md);
}
.knv-guide-tip iconify-icon {
  font-size: 1.1rem;
  color: var(--secondary);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.knv-guide-tip span {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.knv-guide-tip--warning {
  background: #fef3c7;
  border-left-color: var(--warning);
}
.knv-guide-tip--warning iconify-icon {
  color: var(--warning);
}

/* Footer CTA */
.knv-guide-cta {
  padding: 2rem 0;
}
.knv-guide-cta h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.knv-guide-cta p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Responsive */
@media (max-width: 991.98px) {
  .knv-guide-section {
    padding: 1.5rem;
  }
  .knv-guide-section__header p {
    padding-left: 0;
  }
}

@media (max-width: 768px) {
  .knv-guide-section {
    padding: 1.25rem;
  }
  .knv-guide-section__icon {
    width: 40px;
    height: 40px;
  }
  .knv-guide-section__icon iconify-icon {
    font-size: 1.1rem;
  }
  .knv-guide-section__header h2 {
    font-size: 1.15rem;
  }
  .knv-guide-step__number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .knv-guide-section {
    padding: 1rem;
    border-radius: var(--radius-md);
  }
  .knv-guide-section__header {
    gap: 0.75rem;
  }
  .knv-guide-nav-card {
    padding: 0.75rem 0.25rem;
    font-size: 0.8rem;
  }
  .knv-guide-nav-card iconify-icon {
    font-size: 1.25rem;
  }
}

/* ============================================================
   === Dashboard Chart Animations ===
   ============================================================ */

/* ============================================================
   === Dashboard Chart Animations (JS-driven) ===
   All chart animations are now handled by JavaScript in dashboard.php
   CSS only provides transition support for stat card entrance
   ============================================================ */

/* ============================================================
   === Dashboard Stat Card Entrance Animations ===
   ============================================================ */

/* Stat cards start hidden */
.dash-stats-row .dash-stat-card {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

/* Animate in sequentially */
.dash-stats-row .dash-stat-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.dash-stats-row .dash-stat-card:nth-child(1) {
  transition-delay: 0.1s;
}
.dash-stats-row .dash-stat-card:nth-child(2) {
  transition-delay: 0.25s;
}
.dash-stats-row .dash-stat-card:nth-child(3) {
  transition-delay: 0.4s;
}

/* ============================================================
   === Dashboard Counter Animation Support ===
   ============================================================ */

/* Counter values need inline-block for smooth rendering */
.dash-stat-card__value,
.dash-card__value,
.dash-progress-circle__percent {
  display: inline-block;
  min-width: 1ch;
}
