/* =========================================================
   SKOOL DESIGN SYSTEM - 1:1 PIXEL PERFECT REPLICA
   ========================================================= */
:root {
  --skool-canvas: #f8f7f5;
  --skool-card: #ffffff;
  --skool-text: #202124;
  --skool-muted: #70757a;
  --skool-border: #e4e4e4;
  --skool-hover: #e4e4e4;
  --skool-active-lesson: #fae3ac;
  --skool-active-text: #202124;
  --skool-badge: #e74c3c;
  --skool-font: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --line: #e4e4e4;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--skool-canvas);
  color: var(--skool-text);
  font-family: var(--skool-font);
  -webkit-font-smoothing: antialiased;
}

/* --- Left Floating Community Switcher (Desktop >= 1200px) --- */
.skool-switcher {
  position: fixed;
  left: 16px;
  top: 136px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 990;
}
.switcher-item {
  position: relative;
  cursor: pointer;
}
.switcher-pill {
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: #202124;
  border-radius: 0 4px 4px 0;
  display: none;
}
.switcher-item.active .switcher-pill {
  display: block;
}
.switcher-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #202124;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.switcher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.switcher-add {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--skool-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}
.switcher-add:hover {
  background: #f1f3f4;
  color: #202124;
}
@media (max-width: 1199px) {
  .skool-switcher {
    display: none !important;
  }
}

/* --- Two-Tier Sticky Topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--skool-border);
}
.topbar-tier-1 {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #f0f0f0;
  gap: 16px;
}
.tier-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #202124;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.class-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--skool-border);
  background: #ffffff;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.class-switch:hover {
  background: #f8f9fa;
  border-color: #dadce0;
}
.class-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34a853;
  flex-shrink: 0;
}
.chevron-icon {
  color: #5f6368;
}

.search-wrap {
  flex: 1;
  max-width: 480px;
  height: 44px;
  background: #f1f3f4;
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  color: #5f6368;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.search-wrap:focus-within {
  background: #ffffff;
  border-color: #d0d0d0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  color: #202124;
}
.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  font-size: 15px;
  color: #202124;
  font-family: inherit;
}
.search-icon {
  flex-shrink: 0;
}

.tier-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.icon-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.icon-action-btn:hover {
  background: #f1f3f4;
  color: #202124;
}
.notif-btn {
  position: relative;
}
.notif-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  background: var(--skool-badge);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  line-height: 1.2;
  box-shadow: 0 0 0 2px #ffffff;
}
.user-avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: #202124;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}
.admin-btn {
  border: 1px solid var(--skool-border);
  background: #ffffff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #202124;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  margin-left: 4px;
}
.admin-btn:hover {
  background: #f1f3f4;
}

.topbar-tier-2 {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}
.nav-tab {
  height: 100%;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: #70757a;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 4px;
  position: relative;
  font-family: inherit;
  transition: color 0.15s ease;
}
.nav-tab:hover {
  color: #202124;
}
.nav-tab.active {
  color: #202124;
  font-weight: 700;
}
.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #202124;
  border-radius: 2px 2px 0 0;
}

/* --- Layout Views --- */
.view {
  max-width: 1085px;
  margin: auto;
  padding: 32px 20px 60px;
}
.course-view {
  max-width: 1085px;
  margin: auto;
  padding: 24px 20px 60px;
}
.course-page-head {
  margin-bottom: 20px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  color: #5f6368;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}
.back:hover {
  background: var(--skool-hover);
  color: #202124;
}

.course-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* --- Sidebar --- */
.lesson-sidebar {
  width: 328px;
  max-width: 360px;
  min-width: 274px;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  padding: 0;
  position: sticky;
  top: 130px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.course-sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  margin-bottom: 12px;
  line-height: 1.3;
}
.sidebar-progress-capsule {
  height: 24px;
  border-radius: 33px;
  background: var(--skool-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.sidebar-progress-capsule .progress-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #202124;
  border-radius: 33px;
  transition: width 0.3s ease;
}
.sidebar-progress-capsule .progress-percentage-label {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  mix-blend-mode: difference;
}

.nav-module {
  margin-bottom: 14px;
}
.nav-module-head {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 700;
  color: #202124;
  cursor: pointer;
  padding: 8px 6px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  font-family: inherit;
}
.module-arrow {
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
}
.nav-module.collapsed .module-arrow {
  transform: rotate(-90deg);
}
.nav-module.collapsed .nav-lessons {
  display: none;
}
.nav-lessons {
  padding-top: 4px;
}
.nav-lesson {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: #202124;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  margin: 3px 0;
  font-family: inherit;
}
.nav-lesson:hover {
  background: var(--skool-hover);
}
.nav-lesson.active {
  background: var(--skool-active-lesson) !important;
  color: var(--skool-active-text) !important;
  font-weight: 700;
}
.lesson-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #bdc1c6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: all 0.15s ease;
}
.lesson-check-icon.checked {
  background: #202124;
  border-color: #202124;
  color: #ffffff;
}
.nav-lesson-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* --- Right Lesson Panel --- */
.lesson-panel {
  flex: 1;
  min-width: 0;
  max-width: 725px;
  background: #ffffff;
  border: 1px solid var(--skool-border);
  border-radius: 10px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.lesson-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.lesson-top h1 {
  font-size: 23px;
  font-weight: 700;
  color: #202124;
  margin: 0;
  line-height: 1.3;
}
.lesson-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lesson-complete-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #202124;
  background: #ffffff;
  color: #202124;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}
.lesson-complete-circle-btn:hover {
  background: #f1f3f4;
}
.lesson-complete-circle-btn.done {
  background: #202124;
  color: #ffffff;
}

.video-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0 24px;
  position: relative;
}
.video-frame iframe,
.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: contain;
}

.student-note {
  font-size: 16px;
  line-height: 1.7;
  color: #202124;
  margin-bottom: 24px;
}
.student-note p {
  margin: 0.8em 0;
}
.student-note h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 1.4em 0 0.5em;
  color: #202124;
}
.student-note h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 1.3em 0 0.5em;
  color: #202124;
}
.student-note h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 1.2em 0 0.5em;
  color: #202124;
}
.student-note ul,
.student-note ol {
  padding-left: 24px;
  margin: 0.8em 0;
}
.student-note blockquote {
  border-left: 3px solid #202124;
  margin: 1em 0;
  padding-left: 16px;
  color: #5f6368;
  font-style: italic;
}
.student-note a {
  color: #1a73e8;
  text-decoration: none;
}
.student-note a:hover {
  text-decoration: underline;
}
.student-note img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}

/* --- Classroom Home & Course Grid --- */
.classroom-head {
  margin-bottom: 25px;
}
.classroom-head h1 {
  font-size: 32px;
  font-weight: 700;
  color: #202124;
  margin: 4px 0;
}
.home-classroom-switcher {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.home-classroom-switcher button {
  border: 1px solid var(--skool-border);
  background: #ffffff;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #5f6368;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.home-classroom-switcher button.active,
.home-classroom-switcher button:hover {
  background: #202124;
  color: #ffffff;
  border-color: #202124;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.course-card {
  background: #ffffff;
  border: 1px solid var(--skool-border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.course-image {
  height: 160px;
  background: #202124;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 22px;
  text-align: center;
  padding: 16px;
}
.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-body {
  padding: 18px;
}
.course-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #202124;
}
.course-body p {
  margin: 0 0 14px;
  color: #5f6368;
  font-size: 13px;
  line-height: 1.4;
  min-height: 36px;
}
.course-body .progress {
  height: 6px;
  border-radius: 99px;
  background: #e5e9f2;
  overflow: hidden;
}
.course-body .progress i {
  display: block;
  height: 100%;
  background: #202124;
}

/* Modals & Overlays */
.hidden {
  display: none !important;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  padding: 40px 20px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  max-width: 720px;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  margin: auto;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.smallmodal {
  max-width: 400px;
}
.close {
  position: absolute;
  right: 18px;
  top: 14px;
  border: 0;
  background: none;
  font-size: 26px;
  cursor: pointer;
  color: #5f6368;
}
.close:hover {
  color: #202124;
}
.classroom-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.classroom-card {
  border: 1px solid var(--skool-border);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.classroom-card:hover {
  background: #f8f9fa;
  border-color: #202124;
}
.primary, .secondary, .danger {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.primary {
  background: #202124;
  color: #ffffff;
}
.primary:hover {
  background: #3c4043;
}
.secondary {
  background: #f1f3f4;
  color: #202124;
}
.secondary:hover {
  background: #e4e4e4;
}
.danger {
  background: #fce8e6;
  color: #c5221f;
}
.danger:hover {
  background: #fad2cf;
}
.wide {
  width: 100%;
  margin-top: 12px;
}
.error {
  color: #d93025;
  font-size: 13px;
  margin-top: 8px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #202124;
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  display: none;
  z-index: 3000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Resources */
.resources {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}
.resources h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}
.resource-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.resource {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f3f4;
  color: #202124;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}
.resource:hover {
  background: #e4e4e4;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .course-layout {
    flex-direction: column;
  }
  .lesson-sidebar {
    width: 100%;
    max-width: none;
    position: static;
    max-height: none;
  }
  .lesson-panel {
    max-width: none;
    width: 100%;
  }
}
@media (max-width: 600px) {
  .course-grid {
    grid-template-columns: 1fr;
  }
  .classroom-cards {
    grid-template-columns: 1fr;
  }
  .topbar-tier-1 {
    padding: 0 12px;
    gap: 8px;
  }
  .brand-title {
    display: none;
  }
  .topbar-tier-2 {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 12px;
  }
  .top-nav {
    gap: 16px;
  }
  .lesson-panel {
    padding: 20px 16px;
  }
  .lesson-top h1 {
    font-size: 19px;
  }
}



.lesson-copy{margin:16px 0;line-height:1.8;white-space:pre-wrap}.lesson-heading{font-size:22px;margin:22px 0 10px}.lesson-image{margin:18px 0}.lesson-image img{display:block;width:100%;max-height:720px;object-fit:contain;border-radius:12px;background:#f4f4f4}.lesson-image figcaption{font-size:12px;color:#777;margin-top:6px}.lesson-empty-note{padding:25px;background:#f7f7f7;border-radius:10px;color:#777}.block-toolbar{display:flex;gap:7px;flex-wrap:wrap;align-items:center;padding:10px;background:#f1f1f1;border-radius:9px;margin:12px 0}.block-toolbar span{font-size:12px;font-weight:800;color:#666}.content-block-admin{background:#fff;border:1px solid #ddd;border-radius:10px;padding:10px;margin:9px 0}.block-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}.block-actions{display:flex;gap:5px}.content-block-admin textarea,.content-block-admin input[type=text]{width:100%;border:1px solid #ddd;border-radius:8px;padding:9px;font:inherit;margin-top:5px}.content-block-admin textarea{min-height:100px;resize:vertical}.image-upload{display:inline-flex!important;width:auto!important;align-items:center;gap:8px;background:#eee;border-radius:8px;padding:8px 10px;margin:6px 0!important;cursor:pointer}.image-upload input{display:none}.block-preview{display:block;width:100%;max-height:260px;object-fit:contain;border-radius:8px;background:#f5f5f5;margin:7px 0}.lesson-head{display:flex;gap:10px;align-items:center}.lesson-head .ltitle{flex:1}.lesson-head .admin-buttons{margin:0}.lesson-admin{margin:12px 0}.module-admin>.admin-buttons{margin-bottom:8px}@media(max-width:560px){.lesson-head{display:block}.lesson-head .admin-buttons{margin-top:7px}.block-actions .small{padding:6px 8px}}
.image-wrap{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.block-actions{display:flex;gap:6px;flex-wrap:wrap}.content-block-admin{border:1px solid var(--line);border-radius:12px;padding:12px;margin:10px 0;background:var(--card)}
.image-settings{display:grid;gap:4px;margin-top:6px}.image-settings label{margin:6px 0}.image-settings input[type=range]{padding:0}.image-settings select{display:block;width:100%;margin-top:6px;border:1px solid #ddd;border-radius:9px;padding:10px;background:#fff;font:inherit}.lesson-image{max-width:100%;}.lesson-image-title{font-size:18px;font-weight:800;margin:0 0 8px;color:#222}.lesson-image figcaption{font-size:12px;color:#777;margin-top:6px}
.rich-toolbar,.heading-style,.image-title-style{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}.rich-toolbar{padding:8px;background:#f7f8fb;border:1px solid #e5e7eb;border-radius:10px}.rich-toolbar label,.heading-style label,.image-title-style label{font-size:12px;color:#5f6368;display:flex;align-items:center;gap:5px}.color-pick input,.heading-style input[type=color],.image-title-style input[type=color]{width:34px;height:30px;padding:2px;border:1px solid #ddd;border-radius:6px}.rich-editor{min-height:130px;padding:14px;border:1px solid #d9dce3;border-radius:10px;background:#fff;outline:none;line-height:1.65}.rich-editor:empty:before{content:attr(data-placeholder);color:#9aa0a6}.rich-editor:focus{border-color:#7c3aed;box-shadow:0 0 0 3px rgba(124,58,237,.1)}.lesson-copy{line-height:1.7;white-space:normal}.lesson-copy p{margin:.6em 0}.lesson-copy mark{padding:.05em .2em;border-radius:3px}.lesson-heading{margin:1.2em 0 .6em}.image-title-style{padding:8px 10px;background:#f8fafc;border-radius:8px}.lesson-image-title{margin:0 0 8px;line-height:1.25}.lesson-image img{display:block;height:auto;max-width:100%;border-radius:10px}.lesson-image figcaption{margin-top:6px;color:#6b7280;font-size:13px}.content-block-admin{overflow:hidden}

/* Professional lesson note editor */
.toolbar-label{font-size:12px;font-weight:800;color:#4b5563;margin-right:2px}.rich-toolbar .small{min-width:34px}.rich-toolbar select{border:1px solid #d9dce3;border-radius:7px;background:#fff;padding:6px 8px;font:inherit}.rich-toolbar .color-pick{background:#fff;border:1px solid #e5e7eb;border-radius:7px;padding:4px 7px}.rich-editor b,.rich-editor strong{font-weight:800}.rich-editor u{text-decoration:underline}.rich-editor em,.rich-editor i{font-style:italic}


/* =========================================================
   FINAL RICH LESSON EDITOR STYLES
   ========================================================= */
.final-rich-editor{
  border:1px solid #d9dde5;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.rich-toolbar{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
  padding:10px;
  border-bottom:1px solid #e5e7eb;
  background:#f8fafc;
}
.rich-toolbar button,
.rich-toolbar select,
.rich-color{
  min-height:34px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  padding:5px 9px;
  cursor:pointer;
  font-size:13px;
}
.rich-color{
  display:flex;
  align-items:center;
  gap:4px;
}
.rich-color input{
  width:26px;
  height:26px;
  padding:0;
  border:0;
  background:transparent;
}
.rich-edit-area{
  min-height:360px;
  padding:18px;
  outline:none;
  line-height:1.65;
  font-size:16px;
}
.rich-edit-area:focus{
  box-shadow:inset 0 0 0 2px rgba(59,130,246,.15);
}
.rich-image-wrap{
  position:relative;
  margin:18px 0;
  padding:8px;
}
.rich-inline-image{
  max-width:100%;
  height:auto;
  display:inline-block;
  vertical-align:middle;
  border-radius:8px;
}
.rich-image-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:7px;
  padding:7px;
  border:1px solid #e5e7eb;
  border-radius:9px;
  background:#f8fafc;
}
.rich-image-actions button,
.rich-image-actions label{
  font-size:12px;
  border:1px solid #d1d5db;
  border-radius:7px;
  background:#fff;
  padding:5px 8px;
}
.rich-image-actions label{
  display:flex;
  gap:5px;
  align-items:center;
}
.rich-image-actions input[type=range]{width:100px}
.rich-image-title,
.rich-image-caption{
  margin-top:7px;
  padding:4px 2px;
  outline:none;
}
.rich-image-title{
  font-size:17px;
  font-weight:700;
}
.rich-image-caption{
  font-size:13px;
  color:#667085;
}
@media(max-width:700px){
  .rich-edit-area{min-height:300px;padding:13px}
  .rich-toolbar{gap:4px;padding:7px}
  .rich-toolbar button,.rich-toolbar select,.rich-color{font-size:12px;padding:4px 6px}
}
/* v6 professional editor */
button{font:inherit}.admin-layout{align-items:start}.admin-room,.admin-course,.admin-module,.admin-lesson{border:1px solid #e5e7eb;border-radius:14px;background:#fff}.admin-room{display:flex;width:100%;justify-content:space-between;text-align:left;padding:12px;margin-bottom:8px}.admin-room span{color:#6b7280;font-size:12px}.admin-room.active{background:#f3f4f6}.admin-course{margin:14px 0;overflow:hidden}.admin-course-head,.module-head,.lesson-row{display:flex;gap:8px;align-items:center;padding:10px 12px}.admin-course-head{background:#fafafa;border-bottom:1px solid #eee}.admin-course-head .course-title,.module-title,.lesson-title{flex:1;min-width:0}.admin-course-body{padding:12px}.admin-course.collapsed .admin-course-body{display:none}.admin-module{margin:10px 0}.module-head{background:#fafafa}.module-title{font-weight:650}.module-icon{width:60px}.admin-module.collapsed .module-lessons,.admin-module.collapsed .add-lesson{display:none}.admin-lesson{margin:8px 0;background:#fcfcfd}.lesson-row{background:#fff}.lesson-row .lesson-title{border:0;background:transparent;font-weight:550}.drag{color:#9ca3af}.lesson-editor{border-top:1px solid #eee;background:#fff}.editor-sticky{position:sticky;top:0;z-index:5;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);padding:12px;border-bottom:1px solid #eee}.editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-bottom:10px}.big-lesson-title{font-size:22px;font-weight:700;border:0;outline:0;width:100%;padding:6px 0}.editor-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,.7fr);gap:16px;padding:14px}.rich-toolbar{display:flex;flex-wrap:wrap;gap:5px;padding:8px;border:1px solid #ddd;border-bottom:0;border-radius:10px 10px 0 0;background:#f8fafc;position:sticky;top:70px;z-index:4}.rich-toolbar button,.rich-toolbar label{border:1px solid #e5e7eb;background:white;border-radius:7px;padding:5px 8px;cursor:pointer;font-size:13px}.rich-toolbar input[type=color]{width:20px;height:20px;border:0;padding:0;vertical-align:middle}.rich-toolbar select{border:1px solid #e5e7eb;border-radius:7px;background:white;padding:5px}.rich-editor{min-height:420px;border:1px solid #ddd;border-radius:0 0 10px 10px;padding:18px;font-size:16px;line-height:1.7;outline:none;background:white}.rich-editor:focus{border-color:#aab4c3;box-shadow:0 0 0 2px rgba(59,130,246,.08)}.rich-editor img{max-width:100%;height:auto;border-radius:8px;display:block;margin:10px 0}.rich-editor p{margin:0 0 10px}.lesson-settings{display:flex;flex-direction:column;gap:14px}.lesson-settings textarea{min-height:100px;width:100%;resize:vertical}.video-preview{border:1px solid #eee;border-radius:10px;overflow:hidden;background:#111;min-height:40px}.video-preview iframe,.video-preview video{display:block;width:100%;aspect-ratio:16/9;border:0}.resources-editor{border:1px solid #eee;border-radius:10px;padding:10px}.setting-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.resource-row{display:grid;grid-template-columns:1fr 1.5fr auto;gap:6px;margin:7px 0}.resource-row input{min-width:0}.course-image{margin:10px 0}.course-image img{max-width:none!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:0!important;display:block!important}.picker-card{display:flex;flex-direction:column;text-align:left;padding:15px;border:1px solid #eee;background:#fff;border-radius:12px;margin:8px 0;width:100%}.picker-card span{font-size:12px;color:#6b7280;margin-top:4px}.complete-btn{margin-top:25px}.student-note img{max-width:100%;height:auto}.student-note a{color:#2563eb}.student-note iframe{max-width:100%;width:100%;aspect-ratio:16/9;border:0}.student-note video{width:100%;max-width:100%}.resources a{display:block;margin:7px 0}.hidden{display:none!important}@media(max-width:900px){.editor-grid{grid-template-columns:1fr}.lesson-settings{order:-1}.resource-row{grid-template-columns:1fr}.rich-toolbar{top:0}.admin-course-head,.module-head{flex-wrap:wrap}.module-title{min-width:160px}}
/* Bulk video importer */
.bulk-modal{width:min(1100px,96vw);max-height:92vh;overflow:auto}
.bulk-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px;margin-top:18px}
.bulk-input{width:100%;min-height:230px;resize:vertical;font:14px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;padding:14px;border:1px solid #d9dee8;border-radius:12px;background:#fbfcfe}
.bulk-hints{display:flex;gap:12px;flex-wrap:wrap;margin-top:9px;color:#667085;font-size:12px}
.bulk-help{border:1px solid #e6e9ef;border-radius:14px;padding:16px;background:#fafbfc;color:#475467;font-size:13px;line-height:1.6}
.bulk-help ol{padding-left:18px;margin:10px 0 0}
.bulk-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px;padding-top:14px;border-top:1px solid #edf0f4}
.bulk-summary{margin-top:14px;padding:10px 12px;border-radius:10px;background:#f4f7fb;color:#344054;font-size:13px}
.bulk-group{margin-top:14px;border:1px solid #e7eaf0;border-radius:14px;overflow:hidden}
.bulk-group-head{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;background:#fafbfc;border-bottom:1px solid #e7eaf0}
.bulk-group-head h3{margin:0;font-size:13px}
.bulk-group-head span{font-size:12px;color:#667085}
.bulk-row{display:flex;gap:11px;padding:12px 14px;border-bottom:1px solid #edf0f4;align-items:flex-start}
.bulk-row:last-child{border-bottom:0}
.bulk-check{padding-top:2px}.bulk-check input{width:16px;height:16px}
.bulk-row-main{min-width:0;flex:1}.bulk-title{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.bulk-title b{font-size:13px}.bulk-path,.bulk-url,.bulk-alts{font-size:11px;color:#667085;margin-top:3px;overflow-wrap:anywhere}.bulk-url{color:#344054}.bulk-alts{color:#9a6700}
.match-badge{font-size:10px;font-weight:700;padding:3px 7px;border-radius:999px;background:#eef2f6;color:#475467}.match-badge.exact,.match-badge.high{background:#eaf7ee;color:#16743a}.match-badge.review{background:#fff6dd;color:#8a5a00}.match-badge.missing{background:#fdecec;color:#b42318}
@media(max-width:800px){.bulk-grid{grid-template-columns:1fr}.bulk-modal{padding:18px}.bulk-actions{justify-content:stretch}.bulk-actions button{flex:1}}
/* Admin V8: editor modeled on the supplied reference screenshots. Student styles are untouched. */
.admin-v8{max-width:none!important;padding:0!important}
.admin-v8-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:18px 24px;border-bottom:1px solid #e7e7e7;background:#fff}
.admin-v8-head h1{margin:2px 0 4px;font-size:28px}.admin-v8-head p{margin:0}.admin-v8-actions{display:flex;gap:8px;flex-wrap:wrap}
.admin-v8-shell{display:grid;grid-template-columns:300px minmax(0,1fr);min-height:calc(100vh - 150px);background:#f7f7f5}
.admin-v8-sidebar{background:#fff;border-right:1px solid #e5e5e5;display:flex;flex-direction:column;min-width:0}
.admin-v8-sidebar-top{padding:14px;border-bottom:1px solid #eee;display:flex;gap:8px;align-items:end}.admin-v8-sidebar-top>div{min-width:0;flex:1}.tiny-label{font-size:10px;font-weight:800;letter-spacing:.1em;color:#888;margin-bottom:5px}.admin-v8-sidebar-top select{width:100%;padding:9px;border:1px solid #ddd;border-radius:8px;background:#fff;font-weight:700}.icon-btn{border:1px solid #ddd;background:#fff;border-radius:8px;height:36px;width:38px;font-size:20px}
.admin-v8-tree{padding:10px 8px;overflow:auto;flex:1}.tree-course,.tree-module{margin-bottom:3px}.tree-course-row,.tree-module-row{display:grid;grid-template-columns:26px 20px minmax(0,1fr) 30px;align-items:center;min-height:38px;border-radius:7px}.tree-course-row{grid-template-columns:26px minmax(0,1fr) 30px}.tree-course-row:hover,.tree-module-row:hover{background:#f4f4f2}.tree-course-name,.tree-module-name,.tree-lesson{border:0;background:none;text-align:left;cursor:pointer;font:inherit;min-width:0}.tree-course-name{font-weight:800}.tree-module-name{font-weight:650}.tree-chevron,.tree-more{border:0;background:transparent;color:#777;cursor:pointer}.tree-more{font-size:11px}.tree-lessons{padding-left:26px}.tree-lesson{display:flex;gap:7px;align-items:center;width:100%;padding:7px 8px;border-radius:7px;color:#555;font-size:13px}.tree-lesson:hover{background:#f3f3f1}.tree-lesson.active{background:#ffe9a8;color:#161616;font-weight:750}.lesson-dot{width:12px;font-size:8px}.tree-add-child{border:0;background:none;color:#777;padding:7px 8px;cursor:pointer;font-size:12px}.admin-v8-sidebar-bottom{padding:10px;border-top:1px solid #eee}.tree-add{width:100%;border:1px dashed #ccc;background:#fff;border-radius:8px;padding:9px;text-align:left;cursor:pointer}
.admin-v8-main{padding:26px;overflow:auto}.admin-v8-empty{min-height:60vh;display:grid;place-content:center;text-align:center;color:#777}.empty-icon{margin:auto;width:50px;height:50px;border-radius:50%;background:#eee;display:grid;place-content:center;font-size:22px}.admin-v8-editor{max-width:1000px;margin:0 auto}.editor-topline{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.editor-breadcrumb{font-size:12px;color:#888}.editor-top-actions{display:flex;gap:8px;align-items:center}.save-status{font-size:12px;color:#777}.v8-title{width:100%;font-size:30px;font-weight:750;border:0;background:transparent;outline:none;padding:6px 0 14px}.v8-editor-card{background:#fff;border:1px solid #ddd;border-radius:10px;box-shadow:0 1px 2px rgba(0,0,0,.04);overflow:visible}.v8-toolbar{display:flex;align-items:center;gap:3px;flex-wrap:wrap;padding:8px 10px;border-bottom:1px solid #eee}.v8-toolbar button{border:0;background:transparent;border-radius:5px;min-width:30px;height:30px;cursor:pointer;color:#555}.v8-toolbar button:hover{background:#f0f0ee}.toolbar-sep{width:1px;height:20px;background:#ddd;margin:0 4px}.v8-note-editor{min-height:390px;padding:22px 24px;outline:none;line-height:1.65;font-size:16px}.v8-note-editor img{display:block;max-width:100%;height:auto;margin:14px 0;border-radius:6px}.v8-footer{display:flex;align-items:center;gap:16px;padding:12px 14px;border-top:1px solid #eee}.v8-add-wrap{position:relative}.add-menu-btn{border:1px solid #ddd;background:#fff;border-radius:6px;padding:8px 12px;font-weight:700}.add-menu{position:absolute;bottom:42px;left:0;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 8px 25px rgba(0,0,0,.12);padding:6px;min-width:190px;z-index:20}.add-menu button{display:block;width:100%;border:0;background:#fff;text-align:left;padding:10px;border-radius:5px;cursor:pointer}.add-menu button:hover{background:#f3f3f1}.publish-control{display:flex;align-items:center;gap:8px;margin-left:auto;font-size:13px;color:#258a6a;font-weight:700}.toggle{width:42px;height:24px;border:0;border-radius:20px;background:#bbb;padding:3px;cursor:pointer}.toggle i{display:block;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}.toggle.on{background:#64c49b}.toggle.on i{transform:translateX(18px)}.cancel-btn,.save-btn{border:0;background:transparent;padding:9px 14px;font-weight:750;cursor:pointer}.save-btn{background:#f6d15a;border-radius:5px}.v8-video-card,.v8-resources{margin-top:14px;background:#fff;border:1px solid #ddd;border-radius:10px;padding:14px}.video-card-head{display:flex;justify-content:space-between;gap:10px;align-items:start}.video-card-head span{display:block;color:#888;font-size:12px;word-break:break-all;margin-top:3px}.video-frame{margin-top:12px}.video-frame iframe{width:100%;min-height:420px;border:0;border-radius:8px}.resources-title{font-weight:800;margin-bottom:10px}.v8-resource{display:grid;grid-template-columns:180px 1fr auto;gap:8px;margin-bottom:8px}.v8-resource input{padding:9px;border:1px solid #ddd;border-radius:6px}.v8-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);display:grid;place-items:center;z-index:1000}.v8-modal{width:min(430px,calc(100vw - 32px));background:#fff;border-radius:10px;padding:26px;box-shadow:0 20px 60px rgba(0,0,0,.25)}.v8-modal h2{margin:0 0 7px}.v8-modal p{color:#777;font-size:14px}.v8-modal input{width:100%;box-sizing:border-box;padding:13px;border:1px solid #999;border-radius:5px;margin:10px 0 18px}.v8-modal-actions{display:flex;justify-content:flex-end;gap:8px}.hidden{display:none!important}
@media(max-width:800px){.admin-v8-head{align-items:flex-start;flex-direction:column}.admin-v8-shell{grid-template-columns:1fr}.admin-v8-sidebar{max-height:42vh;border-right:0;border-bottom:1px solid #ddd}.admin-v8-main{padding:14px}.v8-note-editor{min-height:300px}.v8-footer{flex-wrap:wrap}.publish-control{margin-left:0}.v8-resource{grid-template-columns:1fr}.admin-v8-actions{width:100%}}

/* ===== Student experience v9: screenshot-matched classroom UI ===== */
:root{--sk-border:#e7e8ec;--sk-muted:#7a7d85;--sk-text:#25272b;--sk-soft:#f6f7f9;--sk-highlight:#f7e2c9;--sk-green:#65c7a5}
body{background:#fff;color:var(--sk-text)}
.topbar{height:96px;padding:0;background:#fff;position:sticky;top:0;border-bottom:1px solid var(--sk-border);box-shadow:0 1px 0 rgba(0,0,0,.02)}
.topbar-inner{width:100%;max-width:1280px;margin:0 auto;display:grid;grid-template-columns:auto auto minmax(220px,1fr) auto auto;grid-template-rows:52px 44px;align-items:center;padding:0 20px;gap:0 18px}
.brand{font-size:15px;color:#202124;padding:0}.brand-mark{width:27px;height:27px;border-radius:7px;background:#111;font-size:10px}.class-switch{font-size:13px;color:#303236;padding:8px 4px;display:flex;align-items:center;gap:8px}.class-dot{width:20px;height:20px;border-radius:6px;background:linear-gradient(135deg,#5b63d8,#f39a65);display:inline-block}.class-switch .chevron{color:#85878c;margin-left:2px}.search-wrap{height:36px;max-width:430px;border:1px solid #e5e6ea;background:#f5f6f8;border-radius:9px;color:#8b8d92}.search-wrap input{font-size:13px}.top-nav{grid-column:1 / -1;display:flex;align-items:center;gap:26px;height:44px}.top-nav button{height:44px;border:0;background:transparent;color:#70737a;font-size:12px;font-weight:600;padding:0;cursor:pointer;position:relative}.top-nav button.active{color:#24262a}.top-nav button.active:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:#24262a;border-radius:2px}.admin-btn{justify-self:end;grid-column:5;grid-row:1;border:0;background:#f3f3f5;color:#555;border-radius:8px;padding:7px 9px;font-size:11px}
#homeView{max-width:1280px;padding:30px 32px;margin:auto}.classroom-head{margin:0 0 24px}.classroom-head .eyebrow{display:none}.classroom-head h1{font-size:20px;font-weight:750;margin:0 0 5px}.classroom-head p{font-size:13px;margin:0;color:#81838a}
.course-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 20px}.course-card{padding:0;text-align:left;background:transparent;border:0;border-radius:8px;box-shadow:none;overflow:visible}.course-card:hover .course-image{transform:translateY(-1px);box-shadow:0 7px 20px rgba(20,20,30,.08)}.course-image{height:178px;border-radius:7px;background:#252633;overflow:hidden;transition:.15s}.course-image img{display:block;width:100%;height:100%;object-fit:cover}.course-body,.course-card-body{padding:10px 1px 0}.course-card-body h3{font-size:14px;line-height:1.3;margin:0;font-weight:750;color:#303238}.course-card-body p{font-size:11px;line-height:1.4;min-height:30px;margin:4px 0 9px;color:#85878c}.course-progress-line{display:flex;align-items:center;gap:8px}.course-progress-line>span{font-size:10px;color:#777;min-width:22px}.course-progress-line .progress{height:5px;flex:1;background:#edf0f5}.course-progress-line .progress i{background:#b8cbe9}.course-meta{display:none}.placeholder{height:100%;display:grid;place-items:center;color:#aaa;font-size:13px}
.course-view{max-width:1280px;margin:auto;padding:0 32px 50px}.course-page-head{height:42px;display:flex;align-items:center}.course-page-head .back{font-size:12px;color:#7a7d84;margin:0;padding:4px 0}.course-layout{grid-template-columns:250px minmax(0,1fr);gap:34px;align-items:start}.lesson-sidebar{border:0;border-radius:0;padding:5px 0 30px;position:sticky;top:105px;max-height:calc(100vh - 115px);background:#fff;box-shadow:none}.course-sidebar-title{font-size:14px;font-weight:750;margin:0 0 10px;color:#2e3035}.sidebar-progress{margin-bottom:15px}.sidebar-progress .progress{height:5px;background:#e7eaf0}.sidebar-progress .progress i{background:#8eb6e8}.progress-row{font-size:10px;color:#777;justify-content:flex-start;margin:0 0 5px}.nav-module{margin:1px 0}.nav-module-head{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;background:#fff;color:#393b40;font-size:12px;font-weight:700;padding:9px 4px;border-radius:7px;cursor:pointer;text-align:left}.nav-module-head:hover{background:#f8f8f9}.nav-module-head .module-arrow{color:#92949a;font-size:12px}.nav-lessons{padding:1px 0 4px}.nav-module.collapsed .nav-lessons{display:none}.nav-lesson{width:100%;display:flex;align-items:flex-start;gap:8px;border:0;background:#fff;color:#676a71;font-size:11px;line-height:1.35;padding:7px 7px 7px 14px;border-radius:7px;text-align:left;cursor:pointer}.nav-lesson:hover{background:#f7f7f8}.nav-lesson.active{background:var(--sk-highlight);color:#393735;font-weight:700}.nav-lesson .check{width:13px;height:13px;flex:0 0 13px;border-radius:50%;border:1px solid #cfd2d7;color:#fff;background:#fff;font-size:8px;display:grid;place-items:center;margin-top:1px}.nav-lesson:not(.active) .check{color:#65b99e}.nav-lesson.active .check{border-color:#e3b97f}.nav-lesson-title{min-width:0}
.lesson-panel{border:0;border-radius:0;padding:0 0 60px;background:#fff;min-height:620px;max-width:760px;margin:0 auto;width:100%}.lesson-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:3px 0 16px}.lesson-top h1{font-size:20px;line-height:1.25;margin:0;font-weight:750;color:#292b30}.lesson-complete-icon{width:25px;height:25px;border:1px solid #dfe1e5;background:#fff;border-radius:50%;font-size:12px;color:#4a4d52;cursor:pointer}.video-frame{position:relative;width:100%;aspect-ratio:16/9;background:#15171d;border-radius:7px;overflow:hidden;margin:0 0 18px}.video-frame iframe,.video-frame video{position:absolute;inset:0;width:100%;height:100%;border:0;object-fit:contain}.student-note{font-size:12px;line-height:1.7;color:#4e5158}.student-note img{max-width:100%;height:auto;border-radius:6px}.student-note h1,.student-note h2,.student-note h3{color:#282a2f}.student-note a{color:#456fc0}.resources{margin-top:25px;padding-top:16px;border-top:1px solid #eee}.resources h3{font-size:12px;margin:0 0 10px}.resource-list{display:flex;flex-wrap:wrap;gap:6px}.resource{font-size:11px!important;padding:7px 9px!important;border-radius:6px!important;margin:0!important;background:#f4f5f7!important;color:#3e4147!important;text-decoration:none}.complete-btn{display:none}.lesson-placeholder{padding:35px}
@media(max-width:900px){.topbar-inner{grid-template-columns:auto auto 1fr auto;grid-template-rows:52px 44px}.top-nav{gap:16px;overflow:auto}.admin-btn{grid-column:4}.course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.course-layout{grid-template-columns:230px minmax(0,1fr);gap:24px}#homeView,.course-view{padding-left:20px;padding-right:20px}}
@media(max-width:650px){.topbar{height:88px}.topbar-inner{grid-template-columns:auto 1fr auto;grid-template-rows:48px 40px;padding:0 12px;gap:0 10px}.brand span:last-child{display:none}.class-switch{font-size:12px}.search-wrap{max-width:none;height:34px}.class-switch{order:2}.search-wrap{order:3}.top-nav{grid-column:1 / -1;grid-row:2;gap:18px;overflow-x:auto;white-space:nowrap}.top-nav button{font-size:11px}.admin-btn{grid-column:3;grid-row:1;padding:6px 7px}#homeView{padding:22px 13px}.course-grid{grid-template-columns:1fr;gap:24px}.course-image{height:auto;aspect-ratio:16/8.2}.course-view{padding:0 13px 35px}.course-page-head{height:40px}.course-layout{grid-template-columns:1fr;gap:14px}.lesson-sidebar{position:relative;top:auto;max-height:none;padding-bottom:4px}.lesson-sidebar #sidebarModules{max-height:360px;overflow:auto;border-top:1px solid #f0f0f0}.lesson-panel{max-width:none;padding-top:6px}.lesson-top h1{font-size:18px}.video-frame{border-radius:6px}.nav-lesson{font-size:12px}}

/* =========================================================
   V10 STUDENT UI - Skool-inspired, based on public UI references
   Admin styles above are intentionally left intact.
   ========================================================= */
:root{--sk-bg:#f7f7f5;--sk-card:#fff;--sk-line:#e5e5e5;--sk-text:#222;--sk-muted:#777;--sk-green:#08a66a;--sk-active:#f8dfa8}
body{background:var(--sk-bg);color:var(--sk-text);font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Arial,sans-serif}
.topbar{height:106px;background:#fff;border-bottom:1px solid #ddd;padding:0;display:block;position:sticky;top:0;z-index:50}
.topbar-inner{max-width:1160px;height:100%;margin:0 auto;display:grid;grid-template-columns:auto minmax(240px,1fr) auto;grid-template-rows:58px 48px;column-gap:18px;align-items:center;padding:0 18px}
.brand{grid-column:1;grid-row:1;min-width:190px;justify-content:flex-start;color:#202020;font-size:14px}
.brand-mark{width:34px;height:34px;border-radius:9px;background:#f0f0f0;color:#555;font-size:13px}
.class-switch{grid-column:1;grid-row:1;margin-left:190px;display:none}
.search-wrap{grid-column:2;grid-row:1;justify-self:stretch;max-width:none;height:38px;border-radius:8px;background:#f1f1f1;border:1px solid #ececec}
.top-nav{grid-column:1 / 4;grid-row:2;display:flex;align-items:end;gap:26px;height:48px;overflow:auto;white-space:nowrap}
.top-nav button{height:48px;border:0;background:transparent;color:#666;font-weight:600;font-size:13px;padding:0 1px;cursor:pointer;border-bottom:3px solid transparent}
.top-nav button.active{color:#222;border-bottom-color:#222}
.admin-btn{grid-column:3;grid-row:1;border:0;background:#fff;color:#666;padding:8px 10px;border-radius:8px;font-size:12px}
.view{max-width:1160px;padding:30px 18px 60px}
.classroom-head{margin:0 0 22px}
.classroom-head .eyebrow{display:none}
.classroom-head h1{font-size:24px;line-height:1.2;margin:0 0 5px;font-weight:800}
.classroom-head p{font-size:14px;margin:0;color:#777}
.course-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 20px}
.course-card{display:block;text-align:left;width:100%;border:1px solid #dedede;border-radius:7px;background:#fff;overflow:hidden;box-shadow:none;padding:0;transition:transform .12s ease,box-shadow .12s ease}
.course-card:hover{transform:translateY(-1px);box-shadow:0 3px 12px rgba(0,0,0,.07)}
.course-image{height:auto;aspect-ratio:1.62;background:#262626;border-radius:0;overflow:hidden}
.course-image img{object-fit:cover}
.course-card-body{padding:13px 14px 14px}
.course-card-title-row h3{font-size:16px;line-height:1.25;margin:0 0 5px;font-weight:750;color:#222}
.course-card-body p{font-size:12px;line-height:1.45;min-height:0;margin:0 0 12px;color:#777}
.course-progress-line{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:8px}
.course-progress-line>span{font-size:11px;color:#777}
.course-progress-line .progress{height:7px;background:#e6e6e6}
.course-progress-line .progress i{background:var(--sk-green)}

.course-view{max-width:1160px;margin:0 auto;padding:24px 18px 60px}
.course-page-head{height:28px}
.course-page-head .back{font-size:12px;margin:0;color:#777}
.course-layout{grid-template-columns:260px minmax(0,1fr);gap:30px;align-items:start}
.lesson-sidebar{background:transparent;border:0;border-radius:0;padding:0;position:sticky;top:125px;max-height:calc(100vh - 145px);overflow:auto}
.course-sidebar-title{font-size:18px;font-weight:800;margin:0 0 12px}
.sidebar-progress{margin-bottom:18px;padding-right:10px}
.sidebar-progress .progress-row{justify-content:flex-start;margin:0 0 5px;color:#555;font-size:12px}
.sidebar-progress .progress{height:7px;background:#ddd}
.sidebar-progress .progress i{background:var(--sk-green)}
.nav-module{margin:0 0 13px}
.nav-module-head{width:100%;display:flex;align-items:center;justify-content:space-between;border:0;background:transparent;padding:4px 4px 6px 2px;color:#333;font-weight:750;font-size:13px;text-align:left;cursor:pointer}
.nav-module-head span:first-child{overflow:hidden;text-overflow:ellipsis}
.module-arrow{font-size:15px;color:#888;flex:0 0 auto}
.nav-lessons{display:grid;gap:1px}
.nav-module.collapsed .nav-lessons{display:none}
.nav-lesson{width:100%;border:0;background:transparent;display:grid;grid-template-columns:20px 1fr;align-items:center;gap:5px;padding:8px 9px;border-radius:6px;text-align:left;color:#555;font-size:12px;line-height:1.35;cursor:pointer}
.nav-lesson:hover{background:#f0f0f0}
.nav-lesson.active{background:var(--sk-active);color:#222;font-weight:650}
.nav-lesson .check{font-size:15px;line-height:1;color:var(--sk-green);text-align:center}
.lesson-panel{background:#fff;border:1px solid #dedede;border-radius:7px;padding:24px 26px 30px;min-height:540px;box-shadow:none}
.lesson-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}
.lesson-top h1{font-size:22px;line-height:1.25;margin:0;font-weight:800;color:#222}
.lesson-complete-icon{width:27px;height:27px;border:0;background:transparent;color:var(--sk-green);font-size:24px;cursor:pointer;line-height:1}
.video-frame{position:relative;aspect-ratio:16/9;background:#111;border-radius:6px;overflow:hidden;margin:0 0 22px}
.video-frame iframe,.video-frame video{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.student-note{font-size:15px;line-height:1.7;color:#303030}
.student-note p{margin:0 0 13px}
.student-note h1,.student-note h2,.student-note h3{color:#202020;margin:25px 0 10px}
.student-note img{max-width:100%;height:auto;display:block;margin:18px auto;border-radius:6px}
.resources{margin-top:28px;padding-top:18px;border-top:1px solid #eee}
.resources h3{font-size:13px;margin:0 0 10px;font-weight:800}
.resources .resource-list{display:flex;flex-wrap:wrap;gap:8px}
.resources .resource{margin:0;background:#f4f4f4;border:1px solid #e6e6e6;border-radius:6px;padding:8px 10px;font-size:12px;color:#333}

/* classroom switch popup */
.classroom-cards{grid-template-columns:1fr 1fr}
.classroom-card{background:#fff;border:1px solid #ddd;border-radius:8px;padding:16px}

@media(max-width:900px){
  .course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .topbar-inner{grid-template-columns:auto minmax(120px,1fr) auto}
  .top-nav{gap:18px}
  .course-layout{grid-template-columns:230px minmax(0,1fr);gap:22px}
}
@media(max-width:700px){
  .topbar{height:92px}
  .topbar-inner{grid-template-columns:1fr auto;grid-template-rows:48px 44px;padding:0 12px;column-gap:8px}
  .brand{grid-column:1;grid-row:1;min-width:0}
  .brand span:last-child{display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis}
  .search-wrap{grid-column:1;grid-row:2;height:34px}
  .admin-btn{grid-column:2;grid-row:1}
  .top-nav{grid-column:2;grid-row:2;gap:14px;height:44px;overflow-x:auto;justify-self:end;max-width:100%}
  .top-nav button{height:44px;font-size:11px}
  .course-grid{grid-template-columns:1fr}
  .view{padding:22px 12px 45px}
  .course-view{padding:18px 12px 45px}
  .course-layout{grid-template-columns:1fr;gap:16px}
  .lesson-sidebar{position:static;max-height:none;padding-bottom:4px}
  .nav-lessons{max-height:300px;overflow:auto}
  .lesson-panel{padding:18px 16px 24px}
  .lesson-top h1{font-size:19px}
  .classroom-cards{grid-template-columns:1fr}
}

/* ===== V10 PROFESSIONAL PASS ===== */
:root{
  --p-bg:#fff;
  --p-card:#fff;
  --p-text:#171717;
  --p-muted:#6b6b6b;
  --p-line:#e6e6e6;
  --p-soft:#f7f7f7;
  --p-active:#f3e2c8;
  --p-green:#15966b;
}
html{background:#fff}
body{background:#fff!important;color:var(--p-text)!important}
.topbar{background:#fff!important;border-bottom:1px solid var(--p-line)!important;box-shadow:0 1px 2px rgba(0,0,0,.03)!important}
.topbar-inner{max-width:1240px!important;padding-left:24px!important;padding-right:24px!important}
.top-nav button{color:#666!important;font-weight:600!important}
.top-nav button.active{color:#171717!important}
.search-wrap{background:#f7f7f7!important;border-color:#e5e5e5!important}

/* Student classroom */
#homeView{max-width:1240px!important;padding:38px 24px 72px!important;background:#fff}
.classroom-head{margin-bottom:30px!important}
.classroom-head h1{font-size:28px!important;letter-spacing:-.02em!important;color:#171717!important}
.classroom-head p{font-size:14px!important;color:#6b6b6b!important}
.course-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:34px 24px!important}
.course-card{background:#fff!important;border:1px solid #dedede!important;border-radius:10px!important;box-shadow:0 1px 2px rgba(0,0,0,.025)!important}
.course-card:hover{transform:translateY(-2px)!important;box-shadow:0 8px 24px rgba(0,0,0,.08)!important}
.course-image{aspect-ratio:16/9!important;height:auto!important;min-height:190px!important;background:#ededed!important}
.course-image img{object-fit:cover!important}
.course-card-body{padding:16px 17px 17px!important}
.course-card-title-row h3{font-size:17px!important;color:#171717!important;margin-bottom:7px!important}
.course-card-body p{font-size:13px!important;line-height:1.55!important;color:#666!important;margin-bottom:15px!important}
.course-progress-line{grid-template-columns:38px 1fr!important;gap:9px!important}
.course-progress-line>span{font-size:12px!important;color:#666!important}
.course-progress-line .progress{height:7px!important;background:#e8e8e8!important}
.course-progress-line .progress i{background:var(--p-green)!important}

/* Student lesson */
.course-view{max-width:1240px!important;padding:28px 24px 72px!important;background:#fff}
.course-layout{grid-template-columns:285px minmax(0,900px)!important;gap:38px!important;justify-content:center!important}
.lesson-sidebar{background:#fff!important;top:120px!important}
.course-sidebar-title{font-size:18px!important;color:#171717!important}
.nav-module{margin-bottom:16px!important}
.nav-module-head{font-size:13px!important;color:#222!important}
.nav-lesson{font-size:13px!important;padding:9px 10px!important;color:#555!important}
.nav-lesson.active{background:var(--p-active)!important;color:#171717!important}
.lesson-panel{max-width:900px!important;width:100%!important;background:#fff!important;border:0!important;padding:2px 0 60px!important;min-height:600px!important}
.lesson-top{margin:0 0 18px!important}
.lesson-top h1{font-size:28px!important;line-height:1.25!important;letter-spacing:-.02em!important;color:#171717!important}
.video-frame{width:100%!important;aspect-ratio:16/9!important;border-radius:9px!important;margin-bottom:28px!important;background:#111!important;box-shadow:0 2px 8px rgba(0,0,0,.08)!important}
.student-note{font-size:16px!important;line-height:1.78!important;color:#2d2d2d!important;max-width:850px!important}
.student-note h1{font-size:28px!important}.student-note h2{font-size:23px!important}.student-note h3{font-size:19px!important}
.student-note p{margin:0 0 16px!important}
.student-note img{max-width:100%!important;height:auto!important;margin:24px auto!important;border-radius:8px!important}
.resources{margin-top:34px!important;padding-top:22px!important}
.resources h3{font-size:14px!important}
.resources .resource{font-size:13px!important;padding:9px 12px!important;background:#f7f7f7!important}

/* Admin: cleaner, more spacious, still the same workflow */
.admin-v8{background:#fff!important}
.admin-v8-head{padding:22px 30px!important;background:#fff!important;border-bottom:1px solid #e7e7e7!important}
.admin-v8-head h1{font-size:27px!important;color:#171717!important;letter-spacing:-.02em}
.admin-v8-shell{grid-template-columns:310px minmax(0,1fr)!important;background:#fff!important}
.admin-v8-sidebar{border-right:1px solid #e5e5e5!important;background:#fff!important}
.admin-v8-sidebar-top{padding:16px!important}
.admin-v8-tree{padding:12px 10px!important}
.tree-lesson{font-size:13px!important;padding:8px 10px!important}
.tree-lesson.active{background:#f3e2c8!important}
.admin-v8-main{padding:34px 42px!important;background:#fafafa!important}
.admin-v8-editor{max-width:980px!important}
.editor-topline{margin-bottom:12px!important}
.v8-title{font-size:32px!important;font-weight:750!important;color:#171717!important;padding:8px 0 18px!important}
.v8-editor-card{border:1px solid #dedede!important;border-radius:10px!important;box-shadow:0 2px 8px rgba(0,0,0,.035)!important}
.v8-toolbar{padding:9px 11px!important;background:#fff!important}
.v8-toolbar button{min-width:32px!important;height:32px!important}
.v8-note-editor{min-height:480px!important;padding:28px 32px!important;background:#fff!important;font-size:16px!important;line-height:1.75!important;color:#222!important}
.v8-note-editor img{max-width:100%!important;height:auto!important;border-radius:7px!important;margin:18px auto!important}
.v8-footer{padding:13px 15px!important;background:#fff!important}
.save-btn{background:#171717!important;color:#fff!important;border-radius:7px!important;padding:9px 16px!important}
.cancel-btn{color:#555!important}
.v8-video-card,.v8-resources{border-radius:10px!important;background:#fff!important}
.video-frame iframe{min-height:500px!important}

@media(max-width:950px){
  .course-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .course-layout{grid-template-columns:245px minmax(0,1fr)!important;gap:26px!important}
  .admin-v8-shell{grid-template-columns:270px minmax(0,1fr)!important}
  .admin-v8-main{padding:26px!important}
}
@media(max-width:700px){
  #homeView{padding:26px 15px 50px!important}
  .course-grid{grid-template-columns:1fr!important;gap:26px!important}
  .course-image{min-height:0!important}
  .course-view{padding:20px 15px 50px!important}
  .course-layout{grid-template-columns:1fr!important;gap:18px!important}
  .lesson-sidebar{position:static!important}
  .lesson-panel{padding-top:4px!important}
  .lesson-top h1{font-size:23px!important}
  .student-note{font-size:15px!important}
  .admin-v8-main{padding:16px!important}
  .v8-title{font-size:26px!important}
  .v8-note-editor{min-height:360px!important;padding:20px!important}
}

/* ===== V10 PROFESSIONAL BLACK + WHITE REFINEMENT ===== */
:root{
  --ink:#0a0a0a;
  --paper:#ffffff;
  --surface:#ffffff;
  --soft:#f5f5f5;
  --line:#dedede;
  --muted:#666666;
}
html,body{background:var(--paper)!important;color:var(--ink)!important}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;-webkit-font-smoothing:antialiased!important}
button,input,textarea,select{font-family:inherit!important}

/* Strong black brand/header area, clean white content area */
.topbar{background:#080808!important;border-bottom:1px solid #080808!important;box-shadow:none!important;color:#fff!important}
.topbar-inner{max-width:1320px!important;min-height:68px!important}
.brand,.brand span,.top-nav button{color:#fff!important}
.top-nav button{font-size:13px!important;font-weight:600!important;opacity:.78!important}
.top-nav button:hover,.top-nav button.active{opacity:1!important;color:#fff!important}
.search-wrap{background:#171717!important;border:1px solid #303030!important;color:#fff!important}
.search-wrap input{color:#fff!important}
.search-wrap input::placeholder{color:#aaa!important}
.admin-btn{background:#fff!important;color:#080808!important;border:1px solid #fff!important;font-weight:700!important}

/* Classroom landing */
#homeView{background:#fff!important;max-width:1320px!important;padding:52px 32px 90px!important}
.classroom-head h1{font-size:34px!important;font-weight:750!important;color:#080808!important;letter-spacing:-.035em!important}
.classroom-head p{font-size:15px!important;line-height:1.65!important;color:#555!important;max-width:760px!important}
.course-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:38px 28px!important}
.course-card{background:#fff!important;border:1px solid #d7d7d7!important;border-radius:12px!important;overflow:hidden!important;box-shadow:0 2px 6px rgba(0,0,0,.05)!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important}
.course-card:hover{transform:translateY(-4px)!important;border-color:#aaa!important;box-shadow:0 14px 34px rgba(0,0,0,.11)!important}
.course-image{aspect-ratio:16/9!important;min-height:205px!important;background:#090909!important;overflow:hidden!important}
.course-image img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.course-card-body{padding:20px 20px 21px!important}
.course-card-title-row h3{font-size:19px!important;line-height:1.3!important;font-weight:700!important;color:#080808!important;letter-spacing:-.015em!important}
.course-card-body p{font-size:14px!important;line-height:1.6!important;color:#5d5d5d!important}
.course-progress-line>span{font-size:12px!important;font-weight:600!important;color:#555!important}
.course-progress-line .progress{height:6px!important;background:#e7e7e7!important;border-radius:999px!important;overflow:hidden!important}
.course-progress-line .progress i{background:#090909!important;border-radius:999px!important}

/* Course / lesson workspace */
.course-view{background:#fff!important;max-width:1320px!important;padding:34px 32px 90px!important}
.course-layout{grid-template-columns:292px minmax(0,920px)!important;gap:44px!important;justify-content:center!important}
.lesson-sidebar{background:#fff!important;border-right:1px solid #e3e3e3!important;padding-right:20px!important}
.course-sidebar-title{font-size:18px!important;font-weight:750!important;color:#080808!important}
.nav-module-head{font-size:13px!important;font-weight:700!important;color:#171717!important}
.nav-lesson{font-size:13px!important;line-height:1.4!important;color:#555!important;border-radius:6px!important;margin:2px 0!important}
.nav-lesson:hover{background:#f3f3f3!important;color:#111!important}
.nav-lesson.active{background:#080808!important;color:#fff!important}
.lesson-panel{background:#fff!important;max-width:920px!important;padding:4px 0 70px!important}
.lesson-top h1{font-size:32px!important;line-height:1.22!important;font-weight:750!important;color:#080808!important;letter-spacing:-.03em!important;margin-bottom:20px!important}
.video-frame{aspect-ratio:16/9!important;width:100%!important;height:auto!important;min-height:0!important;background:#000!important;border-radius:10px!important;overflow:hidden!important;box-shadow:0 8px 26px rgba(0,0,0,.14)!important}
.video-frame iframe{width:100%!important;height:100%!important;min-height:0!important;border:0!important}
.student-note{font-size:16px!important;line-height:1.82!important;color:#111!important;max-width:860px!important}
.student-note h1,.student-note h2,.student-note h3,.student-note h4{color:#080808!important;font-weight:750!important;letter-spacing:-.02em!important}
.student-note h2{font-size:25px!important;margin-top:34px!important}
.student-note h3{font-size:20px!important;margin-top:28px!important}
.student-note a{color:#080808!important;text-decoration:underline!important;text-underline-offset:3px!important}
.student-note blockquote{border-left:3px solid #080808!important;background:#f6f6f6!important;color:#333!important;padding:14px 18px!important;border-radius:0 6px 6px 0!important}
.student-note pre,.student-note code{background:#0a0a0a!important;color:#fff!important;border-radius:6px!important}
.student-note img{max-width:100%!important;height:auto!important;display:block!important;margin:28px auto!important;border-radius:8px!important}
.resources{border-top:1px solid #e3e3e3!important;margin-top:42px!important;padding-top:24px!important}
.resources h3{color:#080808!important;font-size:15px!important;font-weight:750!important}
.resources .resource{background:#f7f7f7!important;border:1px solid #e1e1e1!important;color:#111!important;border-radius:7px!important}

/* Admin: premium black header + clean white editor */
.admin-v8{background:#f6f6f6!important;color:#080808!important}
.admin-v8-head{background:#080808!important;color:#fff!important;border-bottom:1px solid #080808!important;padding:20px 30px!important}
.admin-v8-head h1,.admin-v8-head *{color:#fff!important}
.admin-v8-shell{background:#f6f6f6!important;grid-template-columns:300px minmax(0,1fr)!important}
.admin-v8-sidebar{background:#fff!important;border-right:1px solid #dcdcdc!important}
.admin-v8-sidebar-top{padding:18px!important;border-bottom:1px solid #e6e6e6!important}
.admin-v8-tree{padding:14px 12px!important}
.tree-lesson{font-size:13px!important;color:#333!important;border-radius:6px!important}
.tree-lesson:hover{background:#f2f2f2!important}
.tree-lesson.active{background:#080808!important;color:#fff!important}
.admin-v8-main{background:#f6f6f6!important;padding:34px 48px 70px!important}
.admin-v8-editor{max-width:1040px!important;margin:0 auto!important}
.editor-topline{color:#555!important}
.v8-title{font-size:34px!important;line-height:1.2!important;font-weight:750!important;color:#080808!important;letter-spacing:-.03em!important}
.v8-editor-card{background:#fff!important;border:1px solid #d8d8d8!important;border-radius:10px!important;box-shadow:0 3px 14px rgba(0,0,0,.05)!important;overflow:hidden!important}
.v8-toolbar{background:#fafafa!important;border-bottom:1px solid #dedede!important;padding:10px 12px!important}
.v8-toolbar button{background:#fff!important;color:#171717!important;border:1px solid #ddd!important;border-radius:5px!important;min-width:34px!important;height:34px!important}
.v8-toolbar button:hover{background:#080808!important;color:#fff!important;border-color:#080808!important}
.v8-note-editor{background:#fff!important;color:#111!important;min-height:540px!important;padding:34px 38px!important;font-size:16px!important;line-height:1.8!important}
.v8-note-editor h1,.v8-note-editor h2,.v8-note-editor h3{color:#080808!important;font-weight:750!important}
.v8-note-editor a{color:#080808!important;text-decoration:underline!important}
.v8-note-editor blockquote{border-left:3px solid #080808!important;background:#f5f5f5!important}
.v8-note-editor img{max-width:100%!important;height:auto!important;border-radius:8px!important}
.v8-footer{background:#fff!important;border-top:1px solid #dedede!important;padding:14px 16px!important}
.save-btn{background:#080808!important;color:#fff!important;border:1px solid #080808!important;border-radius:6px!important;font-weight:700!important;padding:10px 20px!important}
.cancel-btn{color:#333!important}
.v8-video-card,.v8-resources{background:#fff!important;border:1px solid #ddd!important;border-radius:9px!important}

@media(max-width:1000px){
  .course-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .course-layout{grid-template-columns:250px minmax(0,1fr)!important;gap:28px!important}
  .admin-v8-shell{grid-template-columns:260px minmax(0,1fr)!important}
  .admin-v8-main{padding:28px!important}
}
@media(max-width:720px){
  .topbar-inner{min-height:60px!important;padding:10px 14px!important}
  #homeView{padding:34px 16px 60px!important}
  .classroom-head h1{font-size:28px!important}
  .course-grid{grid-template-columns:1fr!important;gap:24px!important}
  .course-image{min-height:0!important}
  .course-view{padding:22px 16px 60px!important}
  .course-layout{grid-template-columns:1fr!important;gap:18px!important}
  .lesson-sidebar{border-right:0!important;border-bottom:1px solid #e3e3e3!important;padding:0 0 14px!important}
  .lesson-top h1{font-size:25px!important}
  .student-note{font-size:15.5px!important}
  .admin-v8-shell{grid-template-columns:1fr!important}
  .admin-v8-sidebar{display:none!important}
  .admin-v8-main{padding:16px!important}
  .v8-title{font-size:27px!important}
  .v8-note-editor{min-height:420px!important;padding:22px!important}
}

/* =========================================================
   SKOOL REFERENCE MATCH — PROFESSIONAL V10 UI
   Based on the supplied reference source/UI. Student + Admin.
   ========================================================= */
:root{
  --sk-ink:#202124;
  --sk-muted:#909090;
  --sk-bg:#F8F7F5;
  --sk-card:#FFFFFF;
  --sk-line:#E4E4E4;
  --sk-yellow:#FAE3AC;
  --sk-blue:#2E6EF5;
}
html,body{background:var(--sk-bg)!important;color:var(--sk-ink)!important}
body{font-family:'Roboto','Helvetica','Arial',sans-serif!important;font-size:16px!important;line-height:1.5!important;-webkit-font-smoothing:antialiased!important}
button,input,textarea,select{font-family:'Roboto','Helvetica','Arial',sans-serif!important}

/* Header: same two-row proportions as the reference */
.topbar{height:112px!important;background:#fff!important;border-bottom:1px solid var(--sk-line)!important;padding:0!important;position:sticky!important;top:0!important;z-index:50!important;display:block!important}
.topbar-inner{height:112px!important;max-width:1085px!important;margin:0 auto!important;display:grid!important;grid-template-columns:auto 1fr auto!important;grid-template-rows:60px 52px!important;align-items:center!important;gap:0 16px!important;padding:0!important}
.brand{font-size:18px!important;font-weight:500!important;color:var(--sk-ink)!important;gap:9px!important}
.brand-mark{width:40px!important;height:40px!important;border-radius:10px!important;background:#111!important;color:#fff!important;font-size:14px!important}
.class-switch{font-size:18px!important;font-weight:500!important;color:var(--sk-ink)!important;padding:0!important}
.search-wrap{height:48px!important;max-width:none!important;width:100%!important;background:#E4E4E4!important;border-radius:10px!important;border:0!important;color:#909090!important;padding:0 16px!important}
.search-wrap input{font-size:16px!important;color:#202124!important}
.search-wrap input::placeholder{color:#909090!important}
.admin-btn{height:40px!important;border:1px solid var(--sk-line)!important;background:#fff!important;border-radius:8px!important;color:#202124!important;padding:0 14px!important;font-size:14px!important;font-weight:700!important}
.top-nav{grid-column:1 / -1!important;grid-row:2!important;display:flex!important;align-items:flex-end!important;gap:0!important;height:52px!important;overflow:visible!important}
.top-nav button{height:40px!important;padding:0 16px!important;border:0!important;border-bottom:4px solid transparent!important;background:transparent!important;color:#909090!important;font-size:16px!important;font-weight:500!important;border-radius:0!important}
.top-nav button:first-child{padding-left:0!important}
.top-nav button:hover{color:#202124!important}
.top-nav button.active{border-bottom-color:#202124!important;color:#202124!important}

/* Classroom home */
.view{max-width:1085px!important;margin:0 auto!important;padding:32px 0 60px!important}
#homeView{max-width:1085px!important;background:var(--sk-bg)!important}
.classroom-head{margin:0 0 30px!important}
.classroom-head .eyebrow{display:none!important}
.classroom-head h1{font-size:22px!important;font-weight:500!important;line-height:1.5!important;letter-spacing:0!important;color:#202124!important;margin:0 0 4px!important}
.classroom-head p{font-size:16px!important;color:#555!important;margin:0!important}
.course-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:28px 20px!important}
.course-card{background:#fff!important;border:1px solid var(--sk-line)!important;border-radius:10px!important;box-shadow:0 1px 2px rgba(60,64,67,.12)!important;overflow:hidden!important}
.course-card:hover{transform:none!important;box-shadow:0 2px 8px rgba(60,64,67,.18)!important;border-color:#d8d8d8!important}
.course-image{height:187px!important;width:100%!important;aspect-ratio:auto!important;object-fit:cover!important;min-height:0!important;background:#222!important;display:block!important}
.course-card-body{padding:16px!important}
.course-card-title-row h3,.course-body h3{font-size:18px!important;font-weight:500!important;line-height:1.45!important;color:#202124!important;margin:0 0 5px!important}
.course-card-body p,.course-body p{font-size:14px!important;line-height:1.5!important;color:#666!important;margin:0 0 14px!important;min-height:0!important}
.course-progress-line>span,.pct{font-size:13px!important;color:#202124!important;font-weight:500!important}
.course-progress-line .progress,.progress{height:24px!important;background:#E4E4E4!important;border-radius:33px!important}
.course-progress-line .progress i,.progress i{background:#009E5D!important}

/* Lesson workspace */
.course-view{max-width:1085px!important;margin:0 auto!important;padding:32px 0 70px!important;background:var(--sk-bg)!important}
.course-page-head{display:none!important}
.course-layout{grid-template-columns:274px minmax(494px,725px)!important;gap:32px!important;justify-content:center!important;align-items:start!important}
.lesson-sidebar{background:transparent!important;border:0!important;border-radius:0!important;padding:0 16px 0 0!important;position:sticky!important;top:125px!important;max-height:calc(100vh - 145px)!important;overflow:auto!important}
.course-sidebar-title{font-size:18px!important;font-weight:500!important;line-height:1.5!important;color:#202124!important;margin:0 0 4px!important}
.sidebar-progress{margin:0 0 24px!important}
.progress-row{font-size:13px!important;margin-bottom:6px!important}
.nav-module-head,.module-title{font-size:16px!important;font-weight:500!important;line-height:1.5!important;color:#202124!important;padding:10px!important}
.nav-module{margin:0 0 18px!important}
.nav-lesson,.lesson-link{min-height:48px!important;padding:12px 10px!important;border-radius:10px!important;font-size:15px!important;line-height:1.45!important;color:#202124!important;font-weight:400!important}
.nav-lesson:hover,.lesson-link:hover{background:#f0f0f0!important}
.nav-lesson.active,.lesson-link.active{background:var(--sk-yellow)!important;color:#202124!important;font-weight:500!important}
.check{color:#009E5D!important;font-size:16px!important}
.lesson-panel{background:#fff!important;border:1px solid var(--sk-line)!important;border-radius:10px!important;padding:24px 26px 34px!important;min-height:540px!important;box-shadow:0 1px 2px rgba(60,64,67,.08)!important}
.lesson-top{margin:0 0 16px!important}
.lesson-top h1{font-size:23px!important;line-height:1.5!important;font-weight:500!important;color:#202124!important;letter-spacing:0!important}
.lesson-complete-icon{width:28px!important;height:28px!important;border:1px solid #909090!important;color:#777!important}
.video-frame{width:100%!important;aspect-ratio:16/9!important;height:auto!important;min-height:0!important;background:#000!important;border-radius:6px!important;overflow:hidden!important;margin:0 0 18px!important;box-shadow:none!important}
.video-frame iframe,.video-frame video{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border:0!important;object-fit:contain!important}
.student-note{font-family:'Roboto','Helvetica','Arial',sans-serif!important;font-size:16px!important;line-height:1.7!important;color:#202124!important;max-width:none!important}
.student-note p{margin:1em 0!important}
.student-note h1{font-size:23px!important;line-height:1.5!important;color:#202124!important;font-weight:700!important}
.student-note h2{font-size:20px!important;line-height:1.5!important;color:#202124!important;font-weight:700!important;margin:28px 0 12px!important}
.student-note h3{font-size:18px!important;line-height:1.5!important;color:#202124!important;font-weight:500!important;margin:24px 0 10px!important}
.student-note a{color:var(--sk-blue)!important;text-decoration:none!important}
.student-note a:hover{text-decoration:underline!important}
.student-note img{max-width:100%!important;height:auto!important;border-radius:4px!important;margin:16px 0!important;display:block!important}
.student-note blockquote{background:#F8F7F5!important;margin:16px 8px!important;border-left:3px solid #202124!important;padding:8px 16px!important;color:#202124!important}
.student-note pre{background:#F8F7F5!important;padding:16px!important;border-radius:5px!important;overflow:auto!important;color:#202124!important}
.resources{margin-top:28px!important;padding-top:18px!important;border-top:1px solid var(--sk-line)!important}
.resources h3{font-size:16px!important;font-weight:700!important;color:#202124!important;margin:0 0 10px!important}
.resource{font-size:14px!important;padding:9px 12px!important;background:#E4E4E4!important;color:#202124!important;border-radius:8px!important;margin:4px!important}

/* Admin: reference-style editor, not a separate generic dashboard */
.admin-v8{background:var(--sk-bg)!important;color:#202124!important;min-height:calc(100vh - 112px)!important}
.admin-v8-head{max-width:1085px!important;margin:0 auto!important;padding:24px 0 18px!important;background:transparent!important;border-bottom:0!important;color:#202124!important}
.admin-v8-head h1,.admin-v8-head *{color:#202124!important}
.admin-v8-head h1{font-size:23px!important;font-weight:500!important;letter-spacing:0!important;margin:0!important}
.admin-v8-head .muted{font-size:14px!important;color:#666!important}
.admin-v8-actions{gap:8px!important}
.admin-v8-actions .secondary,.admin-v8-actions .danger{height:40px!important;border-radius:8px!important;font-size:14px!important}
.admin-v8-shell{max-width:1085px!important;margin:0 auto!important;grid-template-columns:360px minmax(494px,725px)!important;gap:0!important;background:transparent!important;min-height:calc(100vh - 210px)!important}
.admin-v8-sidebar{background:transparent!important;border-right:0!important;padding-right:28px!important}
.admin-v8-sidebar-top{padding:0 0 14px!important;border-bottom:0!important}
.admin-v8-tree{padding:0!important}
.tree-course-row,.tree-module-row{min-height:48px!important;border-radius:10px!important}
.tree-course-name,.tree-module-name{font-size:16px!important;font-weight:500!important;color:#202124!important}
.tree-lesson{min-height:48px!important;padding:12px 10px!important;font-size:15px!important;line-height:1.45!important;color:#202124!important;border-radius:10px!important}
.tree-lesson:hover{background:#eee!important}
.tree-lesson.active{background:var(--sk-yellow)!important;color:#202124!important}
.tree-add-child,.tree-add{font-size:14px!important;color:#666!important;padding:9px 10px!important}
.admin-v8-main{background:transparent!important;padding:0 0 70px!important}
.admin-v8-editor{max-width:725px!important;margin:0!important}
.editor-topline{min-height:36px!important;margin-bottom:8px!important}
.editor-breadcrumb{font-size:13px!important;color:#909090!important}
.v8-editor-card{background:#fff!important;border:1px solid var(--sk-line)!important;border-radius:10px!important;box-shadow:0 1px 2px rgba(60,64,67,.12)!important;overflow:hidden!important}
.v8-toolbar{display:flex!important;align-items:center!important;gap:4px!important;flex-wrap:wrap!important;padding:10px 12px!important;background:#fff!important;border-bottom:1px solid var(--sk-line)!important}
.v8-toolbar button,.v8-toolbar select{min-width:32px!important;height:34px!important;border:0!important;border-radius:6px!important;background:transparent!important;color:#202124!important;font-size:15px!important}
.v8-toolbar button:hover{background:#E4E4E4!important}
.v8-toolbar .toolbar-sep{height:24px!important;border-left:1px solid #e4e4e4!important;margin:0 4px!important}
.v8-title{display:block!important;width:100%!important;border:0!important;outline:0!important;background:#fff!important;color:#202124!important;font-size:23px!important;font-weight:700!important;line-height:1.5!important;padding:24px 24px 8px!important;letter-spacing:0!important}
.v8-title::placeholder{color:#909090!important}
.v8-note-editor{min-height:430px!important;padding:10px 24px 34px!important;background:#fff!important;color:#202124!important;font-size:16px!important;line-height:1.7!important}
.v8-note-editor p{margin:1em 0!important}
.v8-note-editor h1{font-size:23px!important;font-weight:700!important}
.v8-note-editor h2{font-size:20px!important;font-weight:700!important}
.v8-note-editor h3{font-size:18px!important;font-weight:500!important}
.v8-note-editor img{max-width:100%!important;height:auto!important;border-radius:4px!important;margin:16px 0!important}
.v8-footer{display:flex!important;align-items:center!important;gap:16px!important;background:#fff!important;border-top:1px solid var(--sk-line)!important;padding:12px 16px!important;min-height:64px!important}
.v8-add-wrap{margin-right:auto!important;position:relative!important}
.add-menu-btn{height:40px!important;background:#fff!important;border:1px solid var(--sk-line)!important;border-radius:6px!important;color:#202124!important;font-weight:500!important;padding:0 13px!important}
.add-menu{bottom:48px!important;top:auto!important;background:#fff!important;border:1px solid var(--sk-line)!important;border-radius:10px!important;box-shadow:0 2px 8px rgba(60,64,67,.2)!important;overflow:hidden!important;min-width:210px!important}
.add-menu button{font-size:14px!important;padding:11px 13px!important;text-align:left!important;background:#fff!important;color:#202124!important}
.add-menu button:hover{background:#f5f5f5!important}
.publish-control{font-size:14px!important;color:#009E5D!important;font-weight:500!important}
.toggle{width:44px!important;height:24px!important;background:#ccc!important}
.toggle.on{background:#009E5D!important}
.cancel-btn{font-size:14px!important;font-weight:500!important;background:transparent!important;color:#666!important;border:0!important}
.save-btn{font-size:14px!important;font-weight:700!important;background:#202124!important;color:#fff!important;border:0!important;border-radius:6px!important;padding:10px 20px!important}
.v8-video-card,.v8-resources{background:#fff!important;border:1px solid var(--sk-line)!important;border-radius:10px!important;margin-top:16px!important;padding:16px!important}
.v8-video-card .video-frame{margin-top:12px!important}
.v8-resource{display:grid!important;grid-template-columns:1fr 1.4fr auto!important;gap:8px!important;margin:8px 0!important}
.v8-resource input{height:40px!important;border:1px solid var(--sk-line)!important;border-radius:6px!important;padding:0 10px!important;font-size:14px!important}

/* Reference-style Add Video modal */
.v8-modal-overlay{position:fixed!important;inset:0!important;background:rgba(0,0,0,.58)!important;z-index:1000!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:20px!important}
.v8-modal{width:min(430px,100%)!important;background:#fff!important;border-radius:10px!important;padding:24px!important;box-shadow:0 12px 40px rgba(0,0,0,.25)!important}
.v8-modal h2{font-size:20px!important;color:#202124!important;margin:0 0 8px!important;font-weight:700!important}
.v8-modal p{font-size:14px!important;color:#555!important;margin:0 0 16px!important}
.v8-video-input-wrap{height:48px!important;border:1px solid #202124!important;border-radius:5px!important;display:flex!important;align-items:center!important;gap:8px!important;padding:0 12px!important}
.v8-video-input-wrap span{color:#909090!important}
.v8-video-input-wrap input{border:0!important;outline:0!important;width:100%!important;font-size:15px!important;color:#202124!important}
.v8-dropzone{border:2px dashed #d5d5d5!important;border-radius:8px!important;margin-top:16px!important;min-height:120px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;color:#777!important;text-align:center!important;cursor:pointer!important}
.v8-dropzone .drop-icon{font-size:24px!important;color:#909090!important}
.v8-dropzone b{font-size:14px!important;color:#666!important}
.v8-dropzone span{font-size:13px!important;color:#909090!important}
.v8-dropzone input{display:none!important}
.v8-dropzone.dragging,.v8-dropzone.has-file{border-color:#202124!important;background:#f7f7f7!important}
.v8-modal-actions{display:flex!important;justify-content:flex-end!important;gap:18px!important;margin-top:18px!important}

/* Keep the two classrooms and classroom switch visually obvious */
.classroom-cards{grid-template-columns:1fr 1fr!important;gap:14px!important}
.classroom-card{background:#fff!important;border:1px solid var(--sk-line)!important;border-radius:10px!important;padding:18px!important}
.classroom-card:hover{background:#f7f7f7!important;border-color:#bbb!important}

@media(max-width:1100px){
  .topbar-inner,.view,.course-view,.admin-v8-head,.admin-v8-shell{max-width:calc(100% - 32px)!important}
  .course-layout{grid-template-columns:250px minmax(0,1fr)!important}
  .admin-v8-shell{grid-template-columns:300px minmax(0,1fr)!important}
}
@media(max-width:760px){
  .topbar{height:104px!important}
  .topbar-inner{height:104px!important;grid-template-columns:auto 1fr auto!important;grid-template-rows:58px 46px!important}
  .top-nav{overflow-x:auto!important}
  .top-nav button{font-size:14px!important;padding:0 12px!important}
  .course-grid{grid-template-columns:1fr!important}
  .course-layout{grid-template-columns:1fr!important;gap:18px!important}
  .lesson-sidebar{position:static!important;border-bottom:1px solid var(--sk-line)!important;padding:0 0 12px!important;max-height:none!important}
  .lesson-panel{padding:18px!important}
  .admin-v8-shell{grid-template-columns:1fr!important}
  .admin-v8-sidebar{padding:0 0 18px!important;border-bottom:1px solid var(--sk-line)!important}
  .admin-v8-main{padding-top:18px!important}
  .v8-resource{grid-template-columns:1fr!important}
  .v8-footer{flex-wrap:wrap!important}
}

/* ===== FINAL SKOOL-REFERENCE PASS ===== */
:root{--sk-yellow:#f7d84a;--sk-text:#171717;--sk-muted:#6b6b6b;--sk-line:#e5e5e5;--sk-bg:#fff}
html,body{background:#fff!important;color:#171717!important;font-family:Roboto,Arial,Helvetica,sans-serif!important;font-size:16px!important}
body{min-width:320px!important}
button,input,textarea,select{font-family:inherit!important}

/* Student top navigation */
.topbar{height:82px!important;background:#fff!important;border-bottom:1px solid #e6e6e6!important;box-shadow:none!important;position:sticky!important;top:0!important}
.topbar-inner{max-width:1180px!important;height:82px!important;grid-template-columns:auto minmax(220px,1fr) auto!important;grid-template-rows:46px 36px!important;gap:0 20px!important;padding:0 20px!important}
.brand{font-size:17px!important;color:#171717!important;font-weight:700!important}
.brand-mark{color:#171717!important}
.class-switch{font-size:14px!important;color:#333!important;justify-self:start!important}
.search-wrap{height:36px!important;max-width:360px!important;border:1px solid #dedede!important;border-radius:7px!important;background:#fff!important}
.search-wrap input{font-size:14px!important;color:#171717!important}
.top-nav{grid-column:1/-1!important;grid-row:2!important;justify-content:flex-start!important;gap:28px!important;overflow:visible!important}
.top-nav button{height:36px!important;padding:0!important;font-size:14px!important;color:#666!important;background:transparent!important;border:0!important}
.top-nav button.active{color:#171717!important;font-weight:600!important;border-bottom:2px solid #171717!important}
.admin-btn{font-size:13px!important;border:1px solid #d8d8d8!important;border-radius:7px!important;background:#fff!important;color:#333!important;padding:8px 12px!important}

/* Classroom landing */
#homeView,.course-view{max-width:1180px!important;margin:0 auto!important;padding-left:20px!important;padding-right:20px!important}
.classroom-head{padding:34px 0 26px!important}
.classroom-head .eyebrow{font-size:11px!important;letter-spacing:.08em!important;color:#777!important}
.classroom-head h1{font-size:30px!important;line-height:1.2!important;color:#171717!important;font-weight:700!important;margin:7px 0 8px!important}
.classroom-head .muted{font-size:15px!important;color:#6b6b6b!important;max-width:760px!important;line-height:1.55!important}
.course-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:26px 22px!important}
.course-card{border:1px solid #dedede!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;overflow:hidden!important}
.course-card:hover{transform:none!important;box-shadow:0 3px 12px rgba(0,0,0,.08)!important}
.course-image{width:100%!important;height:187px!important;aspect-ratio:auto!important;object-fit:cover!important;display:block!important;background:#f2f2f2!important}
.course-card-body{padding:15px 16px 16px!important}
.course-card-title-row h3,.course-body h3{font-size:18px!important;line-height:1.35!important;color:#171717!important;font-weight:600!important}
.course-card-body p,.course-body p{font-size:14px!important;line-height:1.55!important;color:#666!important}
.course-card .progress{height:6px!important;border-radius:999px!important;background:#ececec!important}
.course-card .progress i{background:#202124!important;border-radius:999px!important}

/* Course / lesson layout */
.course-page-head{height:52px!important;display:flex!important;align-items:center!important}
.back{font-size:14px!important;color:#555!important;background:transparent!important;border:0!important;padding:0!important}
.course-layout{grid-template-columns:270px minmax(0,820px)!important;gap:38px!important;justify-content:center!important;align-items:start!important}
.lesson-sidebar{background:#fff!important;border:0!important;border-right:1px solid #e8e8e8!important;padding:0 20px 30px 0!important;position:sticky!important;top:102px!important;max-height:calc(100vh - 122px)!important;overflow:auto!important}
.course-sidebar-title{font-size:18px!important;font-weight:700!important;color:#171717!important;margin-bottom:10px!important}
.sidebar-progress{margin-bottom:16px!important}
.progress-row{font-size:13px!important;color:#666!important}
.progress{height:6px!important;background:#ececec!important;border-radius:999px!important;overflow:hidden!important}
.progress i{background:#202124!important}
.nav-module{border-top:1px solid #f0f0f0!important}
.nav-module-head{width:100%!important;min-height:42px!important;padding:10px 4px!important;background:#fff!important;border:0!important;color:#333!important;font-size:14px!important;font-weight:600!important;text-align:left!important}
.nav-lessons{padding-bottom:5px!important}
.nav-lesson{width:100%!important;min-height:38px!important;padding:8px 8px!important;border:0!important;border-radius:5px!important;background:#fff!important;color:#555!important;font-size:13px!important;line-height:1.35!important;text-align:left!important;display:flex!important;align-items:flex-start!important;gap:8px!important}
.nav-lesson:hover{background:#f4f4f4!important}
.nav-lesson.active{background:var(--sk-yellow)!important;color:#171717!important;font-weight:600!important}
.nav-lesson .check{flex:0 0 15px!important;margin-top:1px!important}
.lesson-panel{background:#fff!important;border:0!important;border-radius:0!important;box-shadow:none!important;max-width:820px!important;width:100%!important;min-height:600px!important;padding:0 0 70px!important}
.lesson-top{margin:0 0 18px!important}
.lesson-top h1{font-size:28px!important;line-height:1.25!important;font-weight:700!important;color:#171717!important;letter-spacing:-.01em!important}
.lesson-complete-icon{width:30px!important;height:30px!important;font-size:14px!important}
.video-frame{width:100%!important;aspect-ratio:16/9!important;background:#111!important;border-radius:7px!important;margin:0 0 28px!important;overflow:hidden!important}
.student-note{font-size:16px!important;line-height:1.75!important;color:#171717!important}
.student-note p{margin:0 0 18px!important}
.student-note h1{font-size:27px!important;line-height:1.25!important;margin:30px 0 14px!important}
.student-note h2{font-size:23px!important;line-height:1.3!important;margin:28px 0 12px!important}
.student-note h3{font-size:19px!important;line-height:1.4!important;margin:22px 0 10px!important}
.student-note ul,.student-note ol{padding-left:25px!important;margin:14px 0 20px!important}
.student-note li{margin:7px 0!important}
.student-note img{display:block!important;max-width:100%!important;width:auto!important;height:auto!important;margin:22px auto!important;border-radius:6px!important}
.resources{margin-top:32px!important;padding-top:20px!important;border-top:1px solid #e5e5e5!important}
.resources h3{font-size:17px!important;color:#171717!important;margin-bottom:12px!important}
.resource{font-size:14px!important;padding:9px 12px!important;border:1px solid #dedede!important;border-radius:6px!important;background:#fff!important;color:#333!important}

/* Classroom picker */
.classroom-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
.classroom-card{border:1px solid #dedede!important;border-radius:8px!important;background:#fff!important;color:#171717!important}

/* Owner Admin: keep the complete editor, make it feel like a real desktop editor */
.admin-v8{background:#fff!important;color:#171717!important}
.admin-v8-head{max-width:1280px!important;margin:0 auto!important;padding:28px 0 20px!important}
.admin-v8-head h1{font-size:28px!important;color:#171717!important;margin:4px 0 6px!important}
.admin-v8-head .muted{font-size:14px!important;color:#666!important}
.admin-v8-actions{gap:8px!important}
.admin-v8-actions button,.import-btn{font-size:13px!important;border-radius:7px!important}
.admin-v8-shell{max-width:1280px!important;margin:0 auto!important;grid-template-columns:300px minmax(0,1fr)!important;gap:28px!important}
.admin-v8-sidebar{background:#fff!important;border:1px solid #e1e1e1!important;border-radius:8px!important;overflow:hidden!important;position:sticky!important;top:102px!important;max-height:calc(100vh - 122px)!important}
.admin-v8-sidebar-top{padding:14px!important;border-bottom:1px solid #e8e8e8!important}
.admin-v8-tree{padding:8px!important}
.admin-v8-sidebar-bottom{padding:10px!important;border-top:1px solid #e8e8e8!important}
.tree-course-row,.tree-module-row{min-height:44px!important}
.tree-course-name,.tree-module-name{font-size:14px!important;color:#202124!important}
.tree-lesson{min-height:40px!important;font-size:14px!important;padding:9px 10px!important;color:#333!important}
.tree-lesson.active{background:#f7d84a!important;color:#171717!important}
.admin-v8-main{min-width:0!important}
.admin-v8-editor{max-width:900px!important;margin:0!important}
.v8-editor-card{border:1px solid #dedede!important;border-radius:8px!important;box-shadow:none!important}
.v8-toolbar{min-height:50px!important;padding:8px 12px!important;gap:3px!important}
.v8-toolbar button,.v8-toolbar select{height:34px!important;font-size:14px!important;color:#202124!important}
.v8-title{font-size:25px!important;padding:22px 26px 8px!important;color:#171717!important}
.v8-note-editor{min-height:520px!important;padding:10px 26px 38px!important;font-size:16px!important;line-height:1.75!important;color:#171717!important}
.v8-note-editor h1{font-size:25px!important}.v8-note-editor h2{font-size:22px!important}.v8-note-editor h3{font-size:19px!important}
.v8-footer{min-height:64px!important;padding:12px 16px!important}
.save-btn{background:#171717!important;border-radius:7px!important;padding:10px 22px!important}
.add-menu-btn{border-radius:7px!important}

@media(max-width:900px){
  .course-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .course-layout{grid-template-columns:235px minmax(0,1fr)!important;gap:24px!important}
  .admin-v8-shell{grid-template-columns:260px minmax(0,1fr)!important}
}
@media(max-width:680px){
  .topbar{height:106px!important}.topbar-inner{height:106px!important;grid-template-columns:1fr auto!important;grid-template-rows:54px 52px!important;padding:0 14px!important}.search-wrap{grid-column:1/-1!important;grid-row:2!important;max-width:none!important;width:100%!important}.top-nav{display:none!important}
  #homeView,.course-view{padding-left:14px!important;padding-right:14px!important}.classroom-head{padding-top:25px!important}.classroom-head h1{font-size:26px!important}
  .course-grid{grid-template-columns:1fr!important}.course-layout{grid-template-columns:1fr!important;gap:18px!important}.lesson-sidebar{position:static!important;border-right:0!important;border-bottom:1px solid #e8e8e8!important;padding:0 0 14px!important;max-height:none!important}.lesson-sidebar #sidebarModules{max-height:360px!important;overflow:auto!important}.lesson-panel{padding-top:4px!important}.lesson-top h1{font-size:24px!important}.student-note{font-size:16px!important}
  .admin-v8-shell{grid-template-columns:1fr!important}.admin-v8-sidebar{position:static!important;max-height:none!important}.admin-v8-head{padding-left:14px!important;padding-right:14px!important}.admin-v8-main{padding-left:0!important;padding-right:0!important}.v8-note-editor{min-height:420px!important}
}


/* Final refinement: make classroom switching obvious and keep lesson video above writing in Admin. */
.home-classroom-switcher{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 24px;padding:4px 0}
.home-classroom-tab{display:flex;align-items:center;gap:10px;border:1px solid #dedede;background:#fff;color:#171717;border-radius:8px;padding:11px 14px;cursor:pointer;text-align:left;transition:.15s ease}
.home-classroom-tab:hover{border-color:#bdbdbd;background:#fafafa}
.home-classroom-tab.active{border-color:#171717;box-shadow:0 0 0 1px #171717;background:#fff}
.home-classroom-tab strong{font-size:14px;font-weight:700}
.home-classroom-tab span{font-size:12px;color:#666}

/* Admin lesson editor: video/resources first, writing editor below. */
.admin-v8 .editor-grid{display:flex!important;flex-direction:column!important;gap:18px!important}
.admin-v8 .lesson-settings{order:0!important;width:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,.45fr)!important;gap:14px!important;align-items:start!important}
.admin-v8 .lesson-settings>label{grid-column:1!important}
.admin-v8 .lesson-settings .video-preview{grid-column:1 / -1!important;width:100%!important;max-width:100%!important}
.admin-v8 .lesson-settings .resources-editor{grid-column:2!important;grid-row:1 / span 2!important}
.admin-v8 .editor-grid>section{order:1!important;width:100%!important}
.editor-grid .lesson-settings{order:0!important}
.editor-grid>section{order:1!important}

@media(max-width:900px){
  .admin-v8 .lesson-settings{display:flex!important;flex-direction:column!important}
  .admin-v8 .lesson-settings>*,.admin-v8 .lesson-settings>label,.admin-v8 .lesson-settings .video-preview,.admin-v8 .lesson-settings .resources-editor{width:100%!important;max-width:none!important}
}

/* V10 FINAL LESSON FLOW: title -> video -> writing -> resources */
.admin-v8 .v8-editor-card{display:flex!important;flex-direction:column!important}
.admin-v8 .v8-title{order:2!important}
.admin-v8 #v8VideoCard{order:3!important;width:100%!important;margin:0 0 20px!important}
.admin-v8 #v8NoteEditor{order:4!important}
.admin-v8 .v8-footer{order:5!important}
.admin-v8 #v8Resources{order:6!important}
.admin-v8 .v8-video-card{background:#fff!important;border:0!important;border-radius:0!important;padding:0!important}
.admin-v8 .v8-video-card .video-card-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin:0 0 10px!important;padding:0!important}
.admin-v8 .v8-video-card .video-card-head b{font-size:14px!important;color:#111!important}
.admin-v8 .v8-video-card .video-card-head span{font-size:12px!important;color:#666!important;display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.admin-v8 .v8-video-card .video-frame{width:100%!important;aspect-ratio:16/9!important;background:#111!important;border-radius:8px!important;overflow:hidden!important}
.admin-v8 .v8-video-card .video-frame iframe,.admin-v8 .v8-video-card .video-frame video{width:100%!important;height:100%!important;display:block!important;border:0!important}
.admin-v8 #v8NoteEditor{min-height:420px!important;font-size:16px!important;line-height:1.75!important;color:#111!important}
.admin-v8 #v8Resources{margin-top:18px!important}

/* Student lesson flow: title -> video -> writing -> resources */
.lesson-panel .lesson-top{margin-bottom:18px!important}
.lesson-panel .video-frame{order:2!important;margin-bottom:24px!important}
.lesson-panel .student-note{order:3!important}
.lesson-panel .resources{order:4!important}

/* V10 SKOOL-STYLE INLINE ADMIN EDITING PASS */
.admin-inline-edit{border:1px solid #d8d8d8!important;background:#fff!important;color:#111!important;border-radius:7px!important;padding:7px 12px!important;font-size:13px!important;font-weight:700!important;cursor:pointer!important}
.admin-inline-edit:hover{background:#f4f4f2!important}
.lesson-top-actions{display:flex!important;align-items:center!important;gap:8px!important}

/* Keep the admin editor visually close to the student lesson: toolbar -> title -> video -> writing -> resources. */
.admin-v8 .v8-editor-card{border:1px solid #dedede!important;border-radius:10px!important;background:#fff!important;box-shadow:0 1px 3px rgba(0,0,0,.04)!important;overflow:hidden!important}
.admin-v8 .v8-toolbar{background:#fff!important;padding:8px 10px!important;border-bottom:1px solid #e7e7e7!important;gap:2px!important;position:sticky!important;top:0!important;z-index:5!important}
.admin-v8 .v8-toolbar button{font-size:13px!important;color:#3f3f3f!important;min-width:30px!important;height:30px!important;border-radius:5px!important}
.admin-v8 .v8-toolbar select{height:30px!important;border:1px solid #ddd!important;border-radius:5px!important;background:#fff!important;color:#444!important}
.admin-v8 .v8-title{font-size:23px!important;line-height:1.25!important;font-weight:750!important;color:#111!important;padding:22px 24px 14px!important;background:#fff!important}
.admin-v8 #v8VideoCard{padding:0 24px 4px!important;margin:0!important;background:#fff!important}
.admin-v8 #v8VideoCard .video-card-head{padding:0 0 8px!important}
.admin-v8 #v8VideoCard .video-frame{border-radius:8px!important;overflow:hidden!important;background:#111!important;aspect-ratio:16/9!important;min-height:0!important}
.admin-v8 #v8VideoCard .video-frame iframe,.admin-v8 #v8VideoCard .video-frame video{min-height:0!important;width:100%!important;height:100%!important;display:block!important}
.admin-v8 #v8NoteEditor{min-height:420px!important;padding:18px 24px 30px!important;font-size:16px!important;line-height:1.7!important;color:#171717!important;background:#fff!important}
.admin-v8 #v8NoteEditor:focus{box-shadow:inset 0 0 0 2px rgba(246,209,90,.28)!important}
.admin-v8 .v8-footer{background:#fff!important;border-top:1px solid #ededed!important;padding:10px 14px!important}
.admin-v8 #v8Resources{background:#fff!important;border:0!important;border-top:1px solid #ededed!important;border-radius:0!important;padding:16px 24px 20px!important;margin:0!important}
.admin-v8 .v8-resources .v8-resource{grid-template-columns:180px minmax(0,1fr) auto!important}

/* Easy, professional settings modals for course/module editing. */
.v8-editor-modal-overlay{position:fixed!important;inset:0!important;background:rgba(0,0,0,.42)!important;display:grid!important;place-items:center!important;z-index:3000!important;padding:20px!important}
.v8-editor-modal{width:min(620px,calc(100vw - 40px))!important;background:#fff!important;border:1px solid #ddd!important;border-radius:12px!important;box-shadow:0 24px 70px rgba(0,0,0,.24)!important;padding:22px!important;color:#111!important}
.v8-editor-modal.small{width:min(470px,calc(100vw - 40px))!important}
.v8-editor-modal .modal-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;margin-bottom:18px!important}
.v8-editor-modal .modal-head h2{margin:3px 0 0!important;font-size:22px!important}
.v8-editor-modal .modal-x{border:0!important;background:#f4f4f2!important;border-radius:50%!important;width:32px!important;height:32px!important;font-size:20px!important;cursor:pointer!important;color:#555!important}
.v8-editor-modal label{display:block!important;font-size:13px!important;font-weight:700!important;margin:0 0 15px!important}
.v8-editor-modal input,.v8-editor-modal textarea{display:block!important;width:100%!important;box-sizing:border-box!important;margin-top:7px!important;padding:11px 12px!important;border:1px solid #d5d5d5!important;border-radius:7px!important;background:#fff!important;color:#111!important;font:inherit!important;outline:none!important}
.v8-editor-modal textarea{resize:vertical!important;min-height:90px!important}
.v8-editor-modal input:focus,.v8-editor-modal textarea:focus{border-color:#aaa!important;box-shadow:0 0 0 3px rgba(246,209,90,.2)!important}
.v8-editor-modal .course-image-editor{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:15px!important;padding:13px!important;border:1px solid #e4e4e4!important;border-radius:8px!important;margin-bottom:18px!important}
.v8-editor-modal .course-image-editor b,.v8-editor-modal .course-image-editor span{display:block!important}
.v8-editor-modal .course-image-editor span{font-size:12px!important;color:#777!important;margin-top:3px!important}
.v8-editor-modal .modal-actions{display:flex!important;justify-content:flex-end!important;gap:8px!important;border-top:1px solid #eee!important;padding-top:14px!important}

@media(max-width:800px){
  .admin-v8 .v8-title{padding-left:16px!important;padding-right:16px!important}
  .admin-v8 #v8VideoCard{padding-left:16px!important;padding-right:16px!important}
  .admin-v8 #v8NoteEditor{padding-left:16px!important;padding-right:16px!important}
  .admin-v8 #v8Resources{padding-left:16px!important;padding-right:16px!important}
  .admin-v8 .v8-resources .v8-resource{grid-template-columns:1fr!important}
}

/* Owner edit refinements: Skool-style sidebar actions + compact resource area */
.tree-lesson-row{display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:center;width:100%;border-radius:10px;}
.tree-lesson-row.active{background:var(--sk-yellow,#f7d84a);}
.tree-lesson-row .tree-lesson{background:transparent!important;}
.tree-lesson-more{border:0;background:transparent;color:#777;opacity:0;cursor:pointer;height:32px;border-radius:6px;}
.tree-lesson-row:hover .tree-lesson-more,.tree-lesson-row.active .tree-lesson-more{opacity:1;}
.tree-lesson-more:hover{background:#e8e8e8;color:#111;}
.v8-resources{margin-top:12px!important;padding:12px 14px!important;}
.v8-resource{display:grid!important;grid-template-columns:minmax(150px,auto) minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;}
.v8-resource-name{font-weight:650;color:#222;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.v8-resource-url{font-size:12px;color:#777;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.v8-video-modal{width:min(430px,calc(100vw - 32px))!important;}
.v8-video-modal .v8-video-input-wrap input{margin:10px 0 8px!important;}
.v8-dropzone.compact{border:1px dashed #cfcfcf;border-radius:6px;padding:12px;text-align:center;background:#fafafa;cursor:pointer;margin:4px 0 14px;}
.v8-dropzone.compact b,.v8-dropzone.compact span{display:block;}
.v8-dropzone.compact span{font-size:12px;color:#777;margin-top:3px;}
.v8-dropzone.compact.dragging{background:#f3f3f3;border-color:#888;}
.v8-dropzone.compact.has-file{background:#f7f7f7;}

/* FINAL RESOURCE MENU REFERENCE MATCH - preserve the original Skool-style ADD menu */
.admin-v8 .v8-footer{background:#fff!important;min-height:64px!important;padding:12px 16px!important;border-top:1px solid #e5e5e5!important;}
.admin-v8 .v8-add-wrap{position:relative!important;margin-right:auto!important;}
.admin-v8 .add-menu-btn{height:40px!important;min-width:82px!important;padding:0 12px!important;border:1px solid #777!important;border-radius:4px!important;background:#fff!important;color:#222!important;font-size:14px!important;font-weight:600!important;}
.admin-v8 .add-menu{position:absolute!important;left:0!important;bottom:48px!important;top:auto!important;min-width:154px!important;padding:0!important;background:#fff!important;border:1px solid #ddd!important;border-radius:7px!important;box-shadow:0 3px 10px rgba(0,0,0,.18)!important;overflow:hidden!important;z-index:100!important;}
.admin-v8 .add-menu button{display:block!important;width:100%!important;box-sizing:border-box!important;padding:12px 12px!important;border:0!important;border-radius:0!important;background:#fff!important;color:#222!important;text-align:left!important;font-size:14px!important;font-weight:500!important;line-height:1.2!important;}
.admin-v8 .add-menu button:hover{background:#f3f3f3!important;}
.admin-v8 .add-menu button:first-child{background:#f7f7f7!important;}
.admin-v8 .save-btn{background:#f6d15a!important;color:#202124!important;border-radius:5px!important;padding:10px 20px!important;}


/* V10 PROFESSIONAL UX PASS — fixed workspace, independent scrolling, sticky editing controls */
.admin-v8{
  height:calc(100vh - 64px)!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#f7f7f7!important;
}
.admin-v8-head{
  position:sticky!important;
  top:0!important;
  z-index:50!important;
  max-width:none!important;
  padding:14px 24px!important;
  background:rgba(247,247,247,.96)!important;
  backdrop-filter:blur(10px)!important;
  border-bottom:1px solid #e7e7e7!important;
}
.admin-v8-head>div:first-child{min-width:0!important}
.admin-v8-head h1{font-size:21px!important}
.admin-v8-head .muted{margin-top:3px!important}
.admin-v8-shell{
  max-width:1180px!important;
  height:calc(100vh - 143px)!important;
  min-height:0!important;
  grid-template-columns:310px minmax(0,1fr)!important;
  overflow:hidden!important;
}
.admin-v8-sidebar{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:0 18px 0 0!important;
  border-right:1px solid #e7e7e7!important;
}
.admin-v8-sidebar-top{position:sticky!important;top:0!important;z-index:4!important;background:#f7f7f7!important;padding:12px 0 12px!important}
.admin-v8-tree{height:calc(100% - 74px)!important;overflow:auto!important;padding:2px 4px 24px 0!important;scrollbar-width:thin!important}
.admin-v8-sidebar-bottom{position:sticky!important;bottom:0!important;background:linear-gradient(transparent,#f7f7f7 22%)!important;padding:18px 0 10px!important}
.admin-v8-main{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  scroll-behavior:auto!important;
  padding:16px 18px 80px!important;
  scrollbar-width:thin!important;
}
.admin-v8-editor{width:min(760px,100%)!important;max-width:none!important;margin:0 auto!important}
.editor-topline{position:sticky!important;top:0!important;z-index:30!important;background:#f7f7f7!important;padding:4px 0 10px!important;margin:0!important}
.v8-editor-card{overflow:visible!important}
.v8-toolbar{
  position:sticky!important;top:42px!important;z-index:25!important;
  box-shadow:0 1px 0 rgba(0,0,0,.05)!important;
}
.v8-title{font-size:24px!important;padding:22px 24px 8px!important}
.v8-video-card{margin:4px 24px 8px!important}
.v8-video-card .video-frame{aspect-ratio:16/9!important;background:#111!important;border-radius:7px!important;overflow:hidden!important}
.v8-video-card .video-frame iframe,.v8-video-card .video-frame video{width:100%!important;height:100%!important;display:block!important;border:0!important;object-fit:contain!important}
.v8-note-editor{min-height:360px!important;padding:8px 24px 36px!important}
.v8-footer{
  position:sticky!important;bottom:0!important;z-index:28!important;
  box-shadow:0 -1px 0 #e5e5e5,0 -8px 20px rgba(0,0,0,.025)!important;
}
.v8-resources{margin:0 0 18px!important;border-radius:0 0 10px 10px!important;border-top:0!important;padding:14px 16px!important}
.v8-resource{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) auto!important;align-items:center!important}
.tree-popover{
  position:fixed!important;z-index:5000!important;min-width:190px!important;max-width:250px!important;
  padding:6px!important;background:#fff!important;border:1px solid #ddd!important;border-radius:8px!important;
  box-shadow:0 8px 24px rgba(0,0,0,.14)!important;
}
.tree-popover button{
  display:block!important;width:100%!important;border:0!important;background:#fff!important;color:#202124!important;
  text-align:left!important;padding:10px 11px!important;border-radius:6px!important;font-size:14px!important;cursor:pointer!important;
}
.tree-popover button:hover{background:#f1f1f1!important}
.tree-popover .danger-item{color:#d93025!important}
.tree-popover .danger-item:hover{background:#fce8e6!important}

/* Resource menu stays the classic four-item menu from the reference. */
.add-menu{z-index:100!important;min-width:190px!important;padding:4px!important}
.add-menu button{height:40px!important;white-space:nowrap!important}

@media(max-width:900px){
  .admin-v8{height:calc(100vh - 104px)!important}
  .admin-v8-head{padding:10px 16px!important}
  .admin-v8-shell{height:calc(100vh - 166px)!important;grid-template-columns:270px minmax(0,1fr)!important}
  .admin-v8-main{padding:12px 12px 70px!important}
}
@media(max-width:700px){
  .admin-v8{height:auto!important;min-height:calc(100vh - 104px)!important;overflow:visible!important}
  .admin-v8-head{position:relative!important}
  .admin-v8-shell{height:auto!important;min-height:0!important;grid-template-columns:1fr!important;overflow:visible!important}
  .admin-v8-sidebar{height:auto!important;overflow:visible!important;border-right:0!important;border-bottom:1px solid #e5e5e5!important;padding:0!important}
  .admin-v8-tree{height:auto!important;max-height:280px!important;overflow:auto!important}
  .admin-v8-main{height:auto!important;overflow:visible!important;padding:12px 0 70px!important}
  .editor-topline{position:sticky!important;top:0!important}
  .v8-toolbar{top:42px!important}
  .v8-footer{position:sticky!important;bottom:0!important}
  .v8-resource{grid-template-columns:1fr!important}
}


/* COMBINED OWNER INLINE EDITOR — professional fixed workspace */
body.owner-mode .course-card{position:relative}
body.owner-mode .course-card::after{content:'OWNER';position:absolute;top:10px;right:10px;padding:4px 8px;border-radius:999px;background:#111;color:#fff;font-size:9px;font-weight:800;letter-spacing:.06em;opacity:.9}
.owner-edit-button{border:1px solid #d9d9d9;background:#fff;color:#202124;border-radius:7px;padding:6px 11px;font-size:11px;font-weight:700;cursor:pointer}
.owner-edit-button:hover{background:#f6f6f6}
.owner-nav-row{display:flex;align-items:stretch;gap:2px;position:relative}
.owner-nav-row .nav-lesson{flex:1;min-width:0}
.owner-side-edit{width:25px;flex:0 0 25px;border:0;background:transparent;color:#a1a1a1;border-radius:6px;cursor:pointer;font-size:11px;opacity:0;transition:opacity .12s,background .12s}
.owner-nav-row:hover .owner-side-edit,.owner-side-edit:focus{opacity:1}
.owner-side-edit:hover{background:#f0f0f0;color:#222}

/* Keep editing on the same lesson page. Desktop has independent scrolling. */
.course-view.owner-editing{height:calc(100vh - 68px);overflow:hidden;padding-bottom:0!important}
.course-view.owner-editing .course-page-head{height:44px}
.course-view.owner-editing .course-layout{height:calc(100% - 44px);min-height:0;align-items:stretch}
.course-view.owner-editing .lesson-sidebar{height:100%;max-height:none;overflow:auto}
.course-view.owner-editing .lesson-panel{height:100%;min-height:0;max-height:none;overflow:auto;padding:0 0 80px!important;scroll-behavior:auto;overscroll-behavior:contain}
.owner-editor-shell{width:min(900px,100%);margin:0 auto;padding:0 0 22px}
.owner-editor-head{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;background:#fff;border-bottom:1px solid #e8e8e8}
.owner-badge{display:inline-flex;align-items:center;background:#202124;color:#fff;border-radius:999px;padding:4px 7px;font-size:9px;font-weight:800;letter-spacing:.08em;margin-right:8px}
.owner-save-status{font-size:11px;color:#777}
.owner-editor-actions{display:flex;align-items:center;gap:7px}
.owner-editor-actions button{border:1px solid #ddd;background:#fff;color:#333;border-radius:6px;padding:7px 11px;font-size:11px;font-weight:700;cursor:pointer}
.owner-editor-actions .owner-delete{color:#b3261e;border-color:#f0c8c5}
.owner-editor-actions .owner-save{background:#f2d064;border-color:#e5c14f;color:#202124}
.owner-editor-card{background:#fff;border:1px solid #ddd;border-radius:9px;overflow:visible;margin-top:12px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.owner-toolbar{position:sticky;top:42px;z-index:25;display:flex;align-items:center;flex-wrap:wrap;gap:2px;padding:7px 10px;background:#fff;border-bottom:1px solid #e7e7e7;border-radius:9px 9px 0 0;box-shadow:0 1px 0 rgba(0,0,0,.03)}
.owner-toolbar button{min-width:30px;height:31px;border:0;background:transparent;border-radius:5px;color:#4b4d52;cursor:pointer;font-size:13px;font-weight:600}
.owner-toolbar button:hover{background:#f0f0f0}
.owner-toolbar span{width:1px;height:20px;background:#e2e2e2;margin:0 4px}
.owner-title-input{display:block;width:100%;border:0;outline:0;padding:25px 26px 10px;background:#fff;color:#202124;font-size:24px;font-weight:750;line-height:1.25}
.owner-video-slot{padding:4px 26px 12px}
.owner-video-slot iframe,.owner-video-slot video{display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:7px;background:#111;object-fit:contain}
.owner-video-empty{display:grid;place-items:center;min-height:150px;border:1px dashed #d7d7d7;border-radius:8px;background:#fafafa;color:#888;font-size:12px}
.owner-video-add-placeholder{width:100%;min-height:110px;border:1px dashed #cfcfcf;background:#fafafa;border-radius:8px;color:#666;font-size:13px;font-weight:700;cursor:pointer}
.owner-video-add-placeholder:hover{background:#f5f5f5;border-color:#bbb}
.owner-rich-editor{min-height:360px;padding:8px 26px 35px;outline:0;color:#202124;font-size:16px;line-height:1.65}
.owner-rich-editor:focus{outline:0}
.owner-rich-editor h1,.owner-rich-editor h2,.owner-rich-editor h3{color:#202124}
.owner-rich-editor img{max-width:100%;height:auto;border-radius:6px}
.owner-rich-editor a{color:#3f6fc4}
.owner-add-wrap{padding:0 26px 15px;position:relative}
.owner-add-button{border:1px solid #d5d5d5;background:#fff;color:#222;border-radius:5px;padding:9px 13px;font-size:12px;font-weight:700;cursor:pointer}
.owner-add-button:hover{background:#f5f5f5}
.owner-add-menu{position:absolute;left:26px;bottom:58px;min-width:185px;background:#fff;border:1px solid #ddd;border-radius:7px;box-shadow:0 5px 18px rgba(0,0,0,.15);padding:4px;z-index:1000}
.owner-add-menu button{display:block;width:100%;border:0;background:#fff;color:#222;text-align:left;border-radius:4px;padding:11px 12px;font-size:12px;cursor:pointer}
.owner-add-menu button:hover{background:#f2f2f2}
.owner-resource-list{padding:0 26px 18px}
.owner-resource-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #eee;padding:10px 0}
.owner-resource-main{min-width:0;display:flex;flex-direction:column;gap:3px}
.owner-resource-main strong{font-size:12px;color:#222}
.owner-resource-main span{font-size:10px;color:#888;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.owner-remove-resource{width:28px;height:28px;border:1px solid #efc8c5;background:#fff;color:#b3261e;border-radius:5px;cursor:pointer}
.owner-publish-bar{position:sticky;bottom:0;z-index:28;display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:11px 0;background:linear-gradient(transparent,#fff 18%);border-top:0}
.owner-published{display:flex;align-items:center;gap:8px!important;margin:0!important;font-size:12px!important;font-weight:700!important;color:#438d6d!important;cursor:pointer}
.owner-published input{display:none!important}
.owner-published i{width:34px;height:20px;border-radius:99px;background:#cfd5d1;position:relative;display:inline-block}
.owner-published i:after{content:'';position:absolute;width:16px;height:16px;top:2px;left:2px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0003;transition:left .15s}
.owner-published input:checked+i{background:#2eaa72}
.owner-published input:checked+i:after{left:16px}
.owner-save-hint{font-size:10px;color:#999;margin-right:auto}
.owner-or{text-align:center;color:#aaa;font-size:10px;font-weight:700;margin:8px 0}
.owner-video-drop{cursor:pointer;transition:border-color .15s,background .15s}
.owner-video-drop.dragging{border-color:#333!important;background:#f5f5f5!important}
.owner-video-drop.has-file{border-color:#9ac7b0!important;background:#f4fbf7!important}
.owner-modal-overlay{z-index:10000!important}
.owner-video-modal{width:min(480px,calc(100vw - 30px))!important}
.owner-resource-modal{width:min(480px,calc(100vw - 30px))!important}
.owner-resource-modal label{display:block!important;margin:12px 0!important;font-size:11px!important;color:#444!important}
.owner-resource-modal input,.owner-resource-modal textarea{display:block!important;width:100%!important;box-sizing:border-box!important;margin-top:6px!important;border:1px solid #bbb!important;border-radius:5px!important;padding:10px!important;font:inherit!important;background:#fff!important}

@media(max-width:700px){
  .course-view.owner-editing{height:auto;overflow:visible}
  .course-view.owner-editing .course-layout{height:auto;min-height:0}
  .course-view.owner-editing .lesson-sidebar{height:auto;max-height:300px;overflow:auto}
  .course-view.owner-editing .lesson-panel{height:auto;max-height:none;overflow:visible;padding-bottom:25px!important}
  .owner-editor-head{position:sticky;top:0;flex-wrap:wrap}
  .owner-toolbar{top:75px}
  .owner-editor-actions{width:100%;justify-content:flex-end}
  .owner-title-input{font-size:21px;padding:20px 16px 9px}
  .owner-video-slot,.owner-rich-editor,.owner-add-wrap,.owner-resource-list{padding-left:16px;padding-right:16px}
  .owner-add-menu{left:16px}
  .owner-save-hint{display:none}
}

/* V10 expert owner controls: additive only, preserves the existing student layout */
.owner-logo-button{width:30px;height:30px;border:1px solid #ddd;background:#fff;border-radius:7px;color:#555;cursor:pointer;font-size:13px;display:inline-grid;place-items:center;margin-left:-6px}
.owner-logo-button:hover{background:#f5f5f5;color:#111}
.brand-mark.has-logo{overflow:hidden;padding:0!important;background:#fff!important;border:1px solid #ddd!important}
.brand-mark.has-logo img{width:100%;height:100%;object-fit:cover;display:block}
.owner-add-course-card{min-height:260px;border:1px dashed #cfcfcf!important;border-radius:12px!important;background:#fff!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;color:#444!important;cursor:pointer!important}
.owner-add-course-card:hover{background:#fafafa!important;border-color:#aaa!important}
.owner-add-course-card span{font-size:28px;line-height:1;color:#777}.owner-add-course-card strong{font-size:14px}.owner-add-course-card small{font-size:11px;color:#888}
.owner-course-tools{display:flex;align-items:center;gap:4px;padding:2px 2px 9px;border-bottom:1px solid #eee;margin-bottom:7px}
.owner-side-course-name{flex:1;min-width:0;border:0;background:transparent;text-align:left;font-weight:700;color:#222;font-size:13px;padding:5px 4px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.owner-side-more,.owner-module-more,.owner-side-edit{border:0;background:transparent;color:#777;cursor:pointer;border-radius:5px}
.owner-side-more{width:28px;height:28px}.owner-side-more:hover,.owner-module-more:hover,.owner-side-edit:hover{background:#eee;color:#222}
.owner-module-head{display:flex;align-items:center;gap:3px}.owner-module-head .nav-module-head{flex:1;min-width:0}.owner-module-more{width:28px;height:28px;flex:none;font-size:13px}
.owner-nav-row{display:flex;align-items:center;gap:2px}.owner-nav-row .nav-lesson{flex:1;min-width:0}.owner-side-edit{width:28px;height:28px;flex:none;font-size:12px;opacity:.7}.owner-nav-row:hover .owner-side-edit,.owner-nav-row .nav-lesson.active+.owner-side-edit{opacity:1}
.owner-add-sidebar{width:100%;margin:5px 0 8px;padding:8px 9px;border:1px dashed #d0d0d0;background:#fff;border-radius:6px;text-align:left;color:#666;font-size:12px;cursor:pointer}.owner-add-sidebar:hover{background:#f7f7f7;color:#222}.owner-add-module{margin-top:10px}
.owner-structure-menu{position:fixed;z-index:12000;min-width:170px;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 10px 28px rgba(0,0,0,.16);padding:4px}
.owner-structure-menu button{display:block;width:100%;padding:9px 11px;border:0;background:#fff;text-align:left;color:#222;font-size:12px;border-radius:5px;cursor:pointer}.owner-structure-menu button:hover{background:#f2f2f2}.owner-structure-menu button.danger{color:#b3261e}.owner-structure-menu button.danger:hover{background:#fce8e6}
.owner-logo-preview{height:110px;border:1px dashed #d3d3d3;border-radius:8px;background:#fafafa;display:flex;align-items:center;justify-content:center;gap:10px;color:#888;font-size:12px;margin:10px 0 14px;overflow:hidden}.owner-logo-preview img{width:90px;height:90px;object-fit:contain;border-radius:8px;background:#fff}.logo-actions,.owner-image-actions{display:flex;gap:7px;flex-wrap:wrap}
.danger-outline{color:#b3261e!important;border-color:#efc8c5!important}
@media(max-width:700px){.owner-logo-button{display:none}.owner-add-course-card{min-height:180px}.owner-structure-menu{min-width:160px}.owner-course-tools{padding-bottom:7px}}


/* Upload Monitor Spinner & M3U8 Video Styles */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.upload-spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #38bdf8;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.classroom-hls-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  border-radius: 8px;
}
