.mke-dropdown-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin-bottom: 1rem;
}

.mke-dropdown-trigger {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #1d1d1f;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mke-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.mke-dropdown-trigger:active {
  transform: scale(0.98);
}

.mke-dropdown-trigger.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.mke-dropdown-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-height: 400px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0,0,0,0.05);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.mke-dropdown-popup.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mke-search-bar {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.6);
  z-index: 2;
}

.mke-search-bar input {
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
  transition: background 0.2s;
}

.mke-search-bar input:focus {
  background: rgba(0, 0, 0, 0.08);
}

.mke-options-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mke-option-card {
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  user-select: none;
}

.mke-option-card:hover {
  background: rgba(0, 0, 0, 0.04);
}

.mke-option-card.selected {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
  font-weight: 600;
}

.mke-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e0eafc, #cfdef3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.mke-option-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mke-option-title {
  font-size: 0.95rem;
  line-height: 1.2;
}

.mke-source-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-block;
  font-weight: 600;
  width: fit-content;
}

.mke-source-badge.specialist {
  background: rgba(52, 199, 89, 0.15);
  color: #248a3d;
}

.mke-source-badge.ai {
  background: rgba(255, 149, 0, 0.15);
  color: #b36b00;
}

.mke-source-badge.official {
  background: rgba(88, 86, 214, 0.15);
  color: #3b398f;
}

.mke-loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #007aff;
  border-radius: 50%;
  animation: mke-spin 1s linear infinite;
  margin: 20px auto;
}

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

.mke-error-banner {
  background: rgba(255, 59, 48, 0.1);
  color: #d70015;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 59, 48, 0.2);
  text-align: center;
}

/* PREMIUM UNIFIED CURRICULUM BROWSER MODAL */
.curriculum-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 11000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.curriculum-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.curriculum-modal-content {
  width: 92%;
  max-width: 1150px;
  height: 82vh;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px) saturate(210%);
  -webkit-backdrop-filter: blur(40px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 32px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  color: #1d1d1f;
  transform: scale(0.96) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header */
.curriculum-header {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.curriculum-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.curriculum-close-btn {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s;
}

.curriculum-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Search bar & quick filters */
.curriculum-filter-bar {
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.curriculum-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.curriculum-search-wrapper input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  font-size: 1rem;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  transition: all 0.25s ease;
}

.curriculum-search-wrapper input:focus {
  border-color: #007aff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.curriculum-search-wrapper svg {
  position: absolute;
  left: 18px;
  color: #8e8e93;
}

.curriculum-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.curriculum-chip {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.curriculum-chip:hover {
  background: rgba(0, 122, 255, 0.08);
  border-color: #007aff;
  color: #007aff;
}

.curriculum-chip.active {
  background: #007aff;
  border-color: #007aff;
  color: #fff;
}

/* curriculum View Wrapper & Sliding slides */
.curriculum-view-wrapper {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.2);
}

.curriculum-grid {
  display: flex;
  flex: 1;
  height: 100%;
  overflow: hidden;
}

.curriculum-slides {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.curriculum-slide {
  width: 33.333%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Nav header inside slides on mobile */
.slide-nav-header {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
}

.slide-back-btn {
  background: rgba(0, 122, 255, 0.1);
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: #007aff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  transition: all 0.2s;
}

.slide-back-btn:hover {
  background: rgba(0, 122, 255, 0.18);
}

.slide-breadcrumbs {
  font-size: 0.8rem;
  color: #8e8e93;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.col-header {
  padding: 16px 24px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8e8e93;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10;
}

/* Pulse animation for shimmering skeletons */
.skeleton-item {
  animation: pulse-shimmer 1.5s infinite ease-in-out;
}

@keyframes pulse-shimmer {
  0% { opacity: 0.6; }
  50% { opacity: 0.35; }
  100% { opacity: 0.6; }
}

/* Desktop overrides */
@media (min-width: 768px) {
  .curriculum-slides {
    width: 100% !important;
    transform: none !important;
  }
  
  .curriculum-slide {
    width: 33.333% !important;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
  }
  
  .curriculum-slide:last-child {
    border-right: none;
  }
  
  .slide-nav-header {
    display: none !important;
  }
}

.curriculum-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.curriculum-item {
  position: relative;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.curriculum-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.curriculum-item.active {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
  font-weight: 600;
}

.curriculum-item.is-free {
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.06);
}

.curriculum-item.has-owned-topic {
  border: 1px solid rgba(20, 184, 166, 0.34);
  background: rgba(20, 184, 166, 0.07);
}

.curriculum-item.is-locked {
  color: rgba(29, 29, 31, 0.58);
  background: rgba(29, 29, 31, 0.035);
}

.curriculum-access-badge {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.05em;
}

.curriculum-access-badge.is-free {
  color: #057a4f;
  background: rgba(34, 197, 94, 0.16);
}

.curriculum-access-badge.is-pro {
  color: #0b7f6e;
  background: rgba(45, 212, 191, 0.18);
}

.curriculum-access-badge.is-owned {
  color: #075985;
  background: rgba(14, 165, 233, 0.16);
}

.curriculum-access-badge.is-locked {
  color: #7a5b11;
  background: rgba(246, 197, 83, 0.22);
}

.curriculum-lock-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center end;
  padding-right: 16px;
  color: transparent;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
}

/* Unified selector triggers styling */
.curriculum-browser-trigger {
  width: 100%;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1d1d1f;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.curriculum-browser-trigger:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* ADMIN PANEL STYLING */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 12000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.admin-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal-content {
  width: 95%;
  max-width: 1300px;
  height: 88vh;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 28px;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.3);
  display: flex;
  overflow: hidden;
  transform: scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal.active .admin-modal-content {
  transform: scale(1);
}

.admin-sidebar {
  width: 250px;
  background: rgba(0, 0, 0, 0.03);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 8px;
}

.admin-sidebar-header {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-left: 12px;
}

.admin-tab-btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: #8e8e93;
  transition: all 0.2s;
}

.admin-tab-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #1d1d1f;
}

.admin-tab-btn.active {
  background: #007aff;
  color: #fff;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-header {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.admin-table th, .admin-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.admin-table th {
  font-weight: 600;
  color: #8e8e93;
  background: rgba(0,0,0,0.01);
}

.review-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.review-badge.ai {
  background: rgba(255, 149, 0, 0.12);
  color: #b36b00;
}

.review-badge.edited {
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
}

.review-badge.reviewed {
  background: rgba(52, 199, 89, 0.12);
  color: #248a3d;
}

.admin-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.admin-btn:hover {
  background: rgba(0,0,0,0.03);
}

.admin-btn.danger {
  color: #ff3b30;
  border-color: rgba(255,59,48,0.2);
}

.admin-btn.primary {
  background: #007aff;
  color: #fff;
  border-color: #007aff;
}

/* Dark Mode tweaks */
body.dark-mode .curriculum-modal-content,
body.dark-mode .admin-modal-content {
  background: rgba(30, 30, 30, 0.75);
  border-color: rgba(255,255,255,0.1);
  color: #f5f5f7;
}

body.dark-mode .curriculum-item:hover,
body.dark-mode .admin-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .col-header {
  background: rgba(30, 30, 30, 0.85);
}

body.dark-mode .curriculum-search-wrapper input {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}

/* Checklist and Pills additions */
.curriculum-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  accent-color: #007aff;
  flex-shrink: 0;
}

.selected-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.selected-topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 122, 255, 0.1);
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #007aff;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.05);
}

.selected-topic-pill .remove-pill-btn {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: #007aff;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.selected-topic-pill .remove-pill-btn:hover {
  color: #ff3b30;
}

/* Admin Queue Progress layout */
.admin-queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  max-height: 250px;
  overflow-y: auto;
  padding: 8px;
}

.admin-queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.04);
}

.admin-queue-status {
  font-weight: 600;
  font-size: 0.85rem;
}

.admin-queue-status.generating {
  color: #ff9500;
  animation: pulse-shimmer 1s infinite alternate;
}

.admin-queue-status.completed {
  color: #34c759;
}

.admin-queue-status.queued {
  color: #8e8e93;
}

/* Enhanced Curriculum Catalog UI & Mobile Responsiveness */
.curriculum-footer {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.curriculum-item {
  min-height: 44px;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-border;
}

.curriculum-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.slide-breadcrumbs {
  white-space: normal !important;
  word-break: break-word !important;
  max-width: 100%;
}

@media (max-width: 767px) {
  .curriculum-modal-content {
    width: 100vw;
    height: 94vh;
    border-radius: 24px 24px 0 0;
  }
  .curriculum-item {
    min-height: 48px;
    padding: 12px 14px;
  }
}

