/* Thinkific Admin Dashboard & Course Builder Stylesheet */
:root {
  --admin-bg: #FAF8F5;
  --admin-surf: #ffffff;
  --admin-border: #EBE6DF;
  --admin-border-focus: #7A2B43;
  --admin-blue: #7A2B43;
  --admin-blue-hover: #631F34;
  --admin-blue-light: #FBF4F1;
  --admin-text: #231815;
  --admin-muted: #736966;
  --admin-success-bg: #E8EDE9;
  --admin-success-text: #2E4733;
  --admin-draft-bg: #F5F2EB;
  --admin-draft-text: #736966;
  --admin-danger: #dc2626;
  --admin-gold: #C5A880;
  --admin-gold-light: #FDFBF7;
  --admin-radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Thinkific Admin App Shell */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* Left Global Navigation Sidebar */
.admin-nav-sidebar {
  width: 240px;
  background: #ffffff;
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease;
}
.admin-nav-brand {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--admin-border);
}
.admin-brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--admin-text);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-nav-menu {
  list-style: none;
  padding: 1rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}
.admin-nav-item {
  position: relative;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.admin-nav-link:hover {
  background: #f3f4f6;
  color: var(--admin-text);
}
.admin-nav-link.active {
  background: var(--admin-blue-light);
  color: var(--admin-blue);
  font-weight: 600;
}
.admin-nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--admin-blue);
  border-radius: 0 3px 3px 0;
}
.admin-nav-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}
.admin-nav-sublist {
  list-style: none;
  padding-left: 2rem;
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.admin-nav-sublink {
  display: block;
  padding: 0.4rem 0.6rem;
  font-size: 0.8125rem;
  color: #4b5563;
  text-decoration: none;
  border-radius: 4px;
}
.admin-nav-sublink:hover {
  color: var(--admin-text);
  background: #f3f4f6;
}
.admin-nav-sublink.active {
  color: var(--admin-blue);
  font-weight: 600;
  background: #eff6ff;
}
.admin-nav-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--admin-border);
  background: #fafafa;
}

/* Main Content Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--admin-bg);
}

/* Top Action Header */
.admin-topbar {
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
}
.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Standard Buttons & Pills */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
}
.admin-btn-primary {
  background: var(--admin-blue);
  color: #ffffff;
  border-color: var(--admin-blue);
}
.admin-btn-primary:hover {
  background: var(--admin-blue-hover);
  border-color: var(--admin-blue-hover);
}
.admin-btn-outline {
  background: #ffffff;
  border-color: var(--admin-border);
  color: #374151;
}
.admin-btn-outline:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: var(--admin-text);
}
.admin-btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}
.admin-pill-published {
  background: var(--admin-success-bg);
  color: var(--admin-success-text);
}
.admin-pill-draft {
  background: var(--admin-draft-bg);
  color: var(--admin-draft-text);
}

/* Page Body Container */
.admin-body {
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Header with Tabs */
.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}
.admin-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--admin-text);
}
.admin-tabs-row {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 1.5rem;
}
.admin-tab {
  padding: 0.6rem 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--admin-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.admin-tab.active {
  color: var(--admin-blue);
  border-bottom-color: var(--admin-blue);
  font-weight: 600;
}

/* Toolbar (Search, Filter, Grid/List) */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.admin-search-input {
  width: 280px;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 0.875rem;
  background: #ffffff;
}
.admin-search-input:focus {
  outline: none;
  border-color: var(--admin-blue);
  box-shadow: 0 0 0 2px var(--admin-blue-light);
}
.admin-view-toggle {
  display: inline-flex;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}
.admin-view-btn {
  padding: 0.4rem 0.65rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--admin-muted);
  font-size: 0.875rem;
}
.admin-view-btn.active {
  background: #f3f4f6;
  color: var(--admin-text);
  font-weight: 600;
}

/* Courses Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.course-card-admin {
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.course-card-admin:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}
.course-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
  overflow: hidden;
}
.course-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.course-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}
.course-card-thumb-wrap:hover .course-card-overlay {
  opacity: 1;
}
.course-card-badge-camera {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  color: #374151;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.course-card-badge-camera:hover {
  background: #ffffff;
  color: var(--admin-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.course-card-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
.course-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.course-title-link:hover {
  color: var(--admin-blue);
  text-decoration: underline;
}
.course-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}
.course-card-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9e5743;
}
.course-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--admin-text);
  line-height: 1.3;
  margin: 0;
}
.course-card-subtitle {
  font-size: 0.8125rem;
  color: var(--admin-muted);
  line-height: 1.45;
  margin: 0;
}
.course-card-instructor-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
.course-instructor-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--admin-border);
}
.course-instructor-name {
  font-size: 0.78125rem;
  color: #4b5563;
  font-weight: 500;
}
.course-card-meta-row {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.course-card-enrollments {
  font-size: 0.8125rem;
  color: var(--admin-muted);
}

/* ========================================================= */
/* THINKIFIC COURSE BUILDER / CURRICULUM EDITOR LAYOUT       */
/* ========================================================= */
.builder-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #ede6da;
}
.builder-shell,
.builder-shell * {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
.builder-header {
  min-height: 54px;
  height: auto;
  background: #ede5da;
  border-bottom: 1px solid #d9cebf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  flex-shrink: 0;
  gap: 0.75rem;
  flex-wrap: wrap;
  z-index: 100;
}
.builder-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.builder-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.builder-course-select {
  padding: 0.4rem 0.75rem;
  border: 1px solid #d9cebf;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--admin-text);
  background: #ffffff;
  cursor: pointer;
}

/* Split Pane: Curriculum Sidebar + Editor Canvas */
.builder-split {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: #ede6da;
  padding: 1.25rem;
  gap: 1.25rem;
  box-sizing: border-box;
}

/* Left Pane: Curriculum Tree */
.builder-curriculum-pane {
  width: 340px;
  min-width: 300px;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #dcd3c4;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(35, 24, 21, 0.04);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}
.builder-curriculum-header {
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #ede7df;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.builder-curriculum-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--admin-muted);
}
.builder-curriculum-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Chapter Card */
.builder-chapter-card {
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.builder-chapter-header {
  padding: 0.75rem 0.85rem;
  background: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  user-select: none;
}
.builder-drag-handle {
  color: #9ca3af;
  cursor: grab;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  border-radius: 3px;
  user-select: none;
  touch-action: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.builder-drag-handle:hover {
  color: #1f2937;
  background: rgba(0, 0, 0, 0.06);
}
.builder-drag-handle:active {
  cursor: grabbing;
}
.builder-lesson-item.is-dragging {
  opacity: 0.45;
  background: #fdf2e9 !important;
  border: 1px dashed #7A2B43 !important;
}
.builder-lesson-item.drop-target-above {
  border-top: 2px solid #7A2B43 !important;
}
.builder-lesson-item.drop-target-below {
  border-bottom: 2px solid #7A2B43 !important;
}
.builder-chapter-card.is-dragging {
  opacity: 0.45;
  border: 2px dashed #7A2B43 !important;
}
.builder-chapter-card.drop-target-above {
  border-top: 3px solid #7A2B43 !important;
}
.builder-chapter-card.drop-target-below {
  border-bottom: 3px solid #7A2B43 !important;
}
.builder-lessons-sublist.drag-over-empty {
  min-height: 44px;
  background: #FAF8F5 !important;
  border: 2px dashed #7A2B43 !important;
  border-radius: 4px;
  margin: 0.25rem 0.5rem;
}
.builder-chapter-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #374151;
  flex: 1;
  letter-spacing: 0.03em;
  cursor: text;
}
.builder-chapter-title:hover {
  color: var(--wine);
}
.builder-chapter-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.btn-chapter-action {
  background: transparent;
  border: none;
  font-size: 0.8rem;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s ease;
}
.btn-chapter-action:hover {
  opacity: 1;
  background: #e5e7eb;
}
.btn-chapter-delete:hover {
  color: #dc2626;
  background: #fee2e2;
}
.builder-chapter-chevron {
  font-size: 0.75rem;
  color: #9ca3af;
  transition: transform 0.15s ease;
  cursor: pointer;
  padding: 0 0.25rem;
}
.builder-lesson-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  color: #374151;
  font-size: 0.8125rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  position: relative;
  transition: all 0.15s ease;
}
.builder-lesson-item:hover {
  background: #f4efea;
  color: #231815;
}
.builder-lesson-item.active {
  background: #f7ede9 !important;
  border-left-color: #7A2B43 !important;
  color: #7A2B43 !important;
  font-weight: 600 !important;
}
.btn-lesson-delete {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
  margin-left: auto;
}
.builder-lesson-item:hover .btn-lesson-delete {
  opacity: 0.6;
}
.btn-lesson-delete:hover {
  opacity: 1;
  background: #fee2e2;
  color: #dc2626;
}
.builder-lesson-icon {
  font-size: 0.95rem;
  opacity: 0.7;
}
.builder-lesson-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.builder-chapter-footer {
  padding: 0.5rem 0.75rem;
  background: #fafafa;
  display: flex;
  gap: 0.5rem;
}
.builder-add-lesson-btn {
  width: 100%;
  padding: 0.4rem;
  background: transparent;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
}
.builder-add-lesson-btn:hover {
  border-color: var(--admin-blue);
  color: var(--admin-blue);
  background: #ffffff;
}

/* Curriculum Footer Toolbar */
.builder-curriculum-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--admin-border);
  background: #ffffff;
  display: flex;
  gap: 0.5rem;
}

/* Right Pane: Context Editor Stage */
.builder-editor-stage {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: transparent;
}
.builder-editor-card {
  max-width: 820px;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}
.builder-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-border);
}
.builder-form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.builder-form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}
.builder-input, .builder-textarea, .builder-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--admin-text);
  background: #ffffff;
}
.builder-input:focus, .builder-textarea:focus, .builder-select:focus {
  outline: none;
  border-color: var(--admin-blue);
  box-shadow: 0 0 0 2px var(--admin-blue-light);
}
.builder-textarea {
  min-height: 140px;
  resize: vertical;
}

/* File Upload Dropzone */
.builder-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}
.builder-dropzone:hover {
  border-color: var(--admin-blue);
  background: #eff6ff;
}

/* 3x3 Add Lesson Type Picker Modal */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.admin-modal-backdrop.open {
  display: flex;
}
.admin-modal-card {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.admin-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}
.admin-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #9ca3af;
}
.admin-modal-body {
  padding: 1.5rem;
}

/* Thinkific Exact Add Lesson Modal Styles */
.tf-add-lesson-card {
  max-width: 980px !important;
  width: 92% !important;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.18), 0 2px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.tf-lesson-modal-header {
  padding: 1.25rem 1.75rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none !important;
}
.tf-modal-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.tf-modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #4b5563;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s ease;
}
.tf-modal-close-btn:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: #9ca3af;
}
.tf-lesson-modal-body {
  padding: 0.75rem 1.75rem 1.75rem;
}
.tf-lesson-types-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
}
@media (max-width: 900px) {
  .tf-lesson-types-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .tf-lesson-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.tf-lesson-type-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.tf-lesson-type-btn:hover {
  border-color: #7A2B43;
  background: #FAF5F2;
  box-shadow: 0 2px 8px rgba(122, 43, 67, 0.1);
  transform: translateY(-1px);
}
.tf-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  flex-shrink: 0;
}
.tf-lesson-type-btn:hover .tf-type-icon {
  color: #7A2B43;
}
.tf-type-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1f2937;
}
.tf-lesson-modal-footer {
  padding: 0.85rem 1.75rem;
  background: #faf8fd;
  border-top: 1px solid #f3e8ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #4b5563;
}
.tf-upgrade-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.tf-upgrade-badge {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.tf-chevron-down {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Thinkific Exact Lesson Editor System */
.tf-editor-canvas {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}
.tf-editor-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.tf-editor-badge-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.tf-editor-type-pill {
  display: inline-block;
  background: #7A2B43;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: capitalize;
  width: fit-content;
  letter-spacing: 0.02em;
}
.tf-editor-main-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.25;
}
.tf-editor-top-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 0.5rem;
}
.tf-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}
.tf-info-bubble {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-left: 0.2rem;
  cursor: help;
}

/* White Cards */
.tf-editor-card {
  background: #ffffff;
  border: 1px solid #dcd3c4;
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(35, 24, 21, 0.04);
}
.tf-card-section-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1.25rem 0;
}
.tf-form-field {
  margin-bottom: 1.25rem;
}
.tf-form-field:last-child {
  margin-bottom: 0;
}
.tf-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.4rem;
}
.tf-form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  transition: all 0.15s ease;
}
.tf-form-input:focus {
  border-color: #7A2B43;
  box-shadow: 0 0 0 3px rgba(122, 43, 67, 0.12);
}

/* Thinkific Upload Boxes */
.tf-upload-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
}
.tf-upload-status-text {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
}
.tf-btn-blue {
  background: #7A2B43;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.tf-btn-blue:hover {
  background: #631F34;
}
.tf-btn-white {
  background: #ffffff;
  color: #1f2937;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tf-btn-white:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Rich Toolbar */
.tf-rich-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
}
.tf-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.tf-toolbar-sep {
  width: 1px;
  height: 22px;
  background: #e5e7eb;
  margin: 0 0.35rem;
}
.tf-rich-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: all 0.12s ease;
}
.tf-rich-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #111827;
}
.tf-rich-btn:active {
  background: #e5e7eb;
}

/* Toolbar Dropdown Menus */
.tf-dropdown-container {
  position: relative;
  display: inline-block;
}
.tf-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid #dcd3c4;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(35, 24, 21, 0.12);
  min-width: 180px;
  z-index: 1050;
  padding: 0.35rem 0;
}
.tf-dropdown-menu.show {
  display: block;
}
.tf-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 0.84rem;
  color: #231815;
  cursor: pointer;
  transition: background 0.12s ease;
  font-family: inherit;
}
.tf-dropdown-item:hover {
  background: #f7ede9;
  color: #7A2B43;
}
.tf-dropdown-section-title {
  padding: 0.35rem 0.85rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8c7d75;
  border-top: 1px solid #f0eae1;
  margin-top: 0.25rem;
}
.tf-dropdown-section-title:first-child {
  border-top: none;
  margin-top: 0;
}
.tf-color-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  display: inline-block;
}
.tf-contenteditable {
  width: 100%;
  min-height: 220px;
  max-height: 550px;
  overflow-y: auto;
  padding: 0.9rem 1.1rem;
  font-size: 0.9375rem;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0 0 6px 6px;
  outline: none;
  line-height: 1.6;
}
.tf-contenteditable:focus {
  border-color: #7A2B43;
  box-shadow: 0 0 0 3px rgba(122, 43, 67, 0.12);
}
.tf-contenteditable:empty:before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}
.tf-contenteditable h1, .tf-contenteditable h2, .tf-contenteditable h3 {
  color: #111827;
  margin: 0.75rem 0 0.4rem;
  font-weight: 700;
}
.tf-contenteditable blockquote {
  border-left: 3px solid #7a2b43;
  padding-left: 0.85rem;
  margin: 0.75rem 0;
  color: #4b5563;
  font-style: italic;
  background: #faf7f5;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.tf-contenteditable ul, .tf-contenteditable ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.tf-contenteditable a {
  color: #7A2B43;
  text-decoration: underline;
}
.tf-contenteditable img {
  max-width: 100%;
  border-radius: 6px;
  margin: 0.5rem 0;
}
.tf-contenteditable table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
}
.tf-contenteditable th, .tf-contenteditable td {
  border: 1px solid #d1d5db;
  padding: 0.5rem;
}
.tf-contenteditable th {
  background: #f8fafc;
  font-weight: 600;
}
.tf-rich-textarea {
  width: 100%;
  min-height: 200px;
  padding: 0.85rem;
  font-size: 0.9375rem;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 0 0 6px 6px;
  outline: none;
  resize: vertical;
  font-family: inherit;
}

/* Collapsible Accordions in Card 1 */
.tf-accordion-section {
  border-top: 1px solid #e5e7eb;
  padding: 0.85rem 0;
}
.tf-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.tf-accordion-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}
.tf-accordion-optional {
  font-size: 0.8125rem;
  color: #9ca3af;
  font-weight: 400;
  margin-left: 0.35rem;
  font-style: italic;
}
.tf-accordion-body {
  padding-top: 0.85rem;
  display: none;
}

/* Lesson Settings Checklist */
.tf-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.tf-badge-purple-start {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.4rem;
}
.tf-badge-purple-grow {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.4rem;
}
.tf-icon-label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.tf-icon-box {
  width: 38px;
  height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  background: #f9fafb;
}

/* Upgrade Card */
.tf-upgrade-box {
  border: 1px solid #d8b4fe;
  background: #faf5ff;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
}
.tf-upgrade-box-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #581c87;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.tf-btn-upgrade-now {
  background: #ffffff;
  color: #6d28d9;
  border: 1px solid #c084fc;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
}

.tf-helper-text {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.5;
  margin-top: 0.5rem;
}
.tf-helper-text a {
  color: #7A2B43;
  text-decoration: underline;
}
.tf-helper-text a:hover {
  color: #C5A880;
}
input[type="radio"], input[type="checkbox"] {
  accent-color: #7A2B43;
}

.lesson-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.lesson-type-card {
  padding: 1.25rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #ffffff;
}
.lesson-type-card:hover {
  border-color: var(--admin-blue);
  background: var(--admin-blue-light);
  transform: translateY(-2px);
}
.lesson-type-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.lesson-type-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--admin-text);
}

/* Image Picker in Modal */
.image-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 0.65rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.25rem;
}
.image-picker-option {
  border: 2px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #f9fafb;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}
.image-picker-option:hover {
  border-color: var(--admin-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.image-picker-option.selected {
  border-color: var(--admin-blue);
  box-shadow: 0 0 0 2px var(--admin-blue);
  background: var(--admin-blue-light);
}
.image-picker-option img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.image-picker-option span {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.35rem 0.4rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

@media (max-width: 900px) {
  .admin-nav-sidebar { display: none; }
  .builder-curriculum-pane { width: 280px; }
}

@media (max-width: 680px) {
  .builder-split { flex-direction: column; }
  .builder-curriculum-pane { width: 100%; height: auto; max-height: 45vh; }
  .builder-editor-stage { padding: 1.5rem 1rem; }
}

/* ========================================================= */
/* SVETLANINA BAZA PROGRAMA - MINIMALISTIČKI THINKIFIC DIZAJN */
/* ========================================================= */
.tf-page-body {
  background: #f6f3ed;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #231815;
}
.tf-navbar {
  background: #ffffff;
  border-bottom: 1px solid #e7e2d9;
  padding: 1.1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.tf-navbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tf-brand-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.65rem;
  color: #231815;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tf-navbar-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.tf-nav-link {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.tf-nav-link:hover,
.tf-nav-link.active {
  color: #7a2b43;
  font-weight: 600;
}
.tf-user-dropdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.tf-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}
.tf-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d1d5db;
}
.tf-canvas {
  background: #f6f3ed;
  min-height: calc(100vh - 70px);
  padding: 3.5rem 1.5rem 6rem;
}
.tf-container {
  max-width: 1140px;
  margin: 0 auto;
}
.tf-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.tf-page-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 400;
  color: #231815;
  margin: 0;
  line-height: 1;
}
.tf-search-box {
  position: relative;
  width: 260px;
}
.tf-search-input {
  width: 100%;
  padding: 0.65rem 2.25rem 0.65rem 0.85rem;
  border: 1px solid #ded9cf;
  border-radius: 4px;
  background: #ffffff;
  font-size: 0.875rem;
  color: #374151;
  outline: none;
  box-sizing: border-box;
}
.tf-search-input:focus {
  border-color: #7a2b43;
}
.tf-search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.875rem;
  pointer-events: none;
}
.tf-subnav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.25rem;
}
.tf-link-more {
  color: #7a2b43;
  text-decoration: underline;
  font-size: 0.875rem;
  font-weight: 500;
}
.tf-filter-select {
  font-size: 0.875rem;
  color: #4b5563;
  font-weight: 500;
  cursor: pointer;
}
.tf-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 310px));
  gap: 1.75rem;
  justify-content: start;
}
.tf-course-card {
  max-width: 310px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e7e2d9;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.tf-course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.08);
}
.tf-card-media-wrap {
  position: relative;
  overflow: visible;
}
.tf-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: #e5e0d8;
}
.tf-card-media-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
.tf-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tf-card-img-reset {
  object-fit: contain;
  background: #59121a;
  padding: 0.25rem 0.5rem;
  box-sizing: border-box;
}
.tf-camera-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 3;
}
.tf-camera-btn:hover {
  background: #ffffff;
  color: #7a2b43;
  transform: scale(1.04);
}
.tf-progress-badge {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #e7e2d9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4b5563;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.tf-card-content {
  padding: 1.5rem 1.25rem 1.15rem;
  text-align: left;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.tf-negovanija-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: #4A3E39;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(6px);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(235, 230, 223, 0.95);
  z-index: 3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.tf-card-title {
  margin: 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  color: #231815;
  line-height: 1.25;
  text-align: left;
}
.tf-card-title-link {
  color: #231815;
  text-decoration: none;
  transition: color 0.15s ease;
}
.tf-card-title-link:hover {
  color: #7a2b43;
}
.tf-card-footer {
  display: flex;
  border-top: 1px solid #e7e2d9;
  height: 44px;
  background: #faf8f5;
}
.tf-footer-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
  transition: all 0.15s ease;
  border-right: 1px solid #e7e2d9;
}
.tf-footer-btn:last-child {
  border-right: none;
}
.tf-footer-btn:hover {
  background: #fbf9f6;
  color: #7a2b43;
}
.tf-footer-btn-primary {
  color: #1f2937;
}

/* Client Mode (when toggled on /manage) */
body.client-mode-active .tf-camera-btn {
  display: none !important;
}
body.client-mode-active .tf-footer-btn:not(.tf-footer-btn-primary) {
  display: none !important;
}
body.client-mode-active .tf-footer-btn-primary {
  width: 100% !important;
  flex: 1 1 100% !important;
  border-right: none !important;
  background: #ffffff !important;
  color: #7A2B43 !important;
  justify-content: space-between !important;
  padding: 0 1.25rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}
body.client-mode-active .tf-footer-btn-primary:hover {
  background: #f7ede9 !important;
}
.tf-footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid #e7e2d9;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tf-footer-links {
  display: flex;
  gap: 1.5rem;
}
.tf-footer-links a {
  font-size: 0.8125rem;
  color: #6b7280;
  text-decoration: none;
}
.tf-footer-links a:hover {
  color: #7a2b43;
}
.tf-footer-copy-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Chapter & Lesson Draft/Published Controls - Unified Luxury Wine Palette */
.btn-chapter-status {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-family: 'Inter', sans-serif !important;
}
.btn-chapter-status.status-draft {
  background: #F5F2EB;
  color: #736966;
  border-color: #EBE6DF;
}
.btn-chapter-status.status-draft:hover {
  background: #EFEBE4;
  color: #231815;
}
.btn-chapter-status.status-published {
  background: #FAF8F5;
  color: #7A2B43;
  border-color: #E4D8CC;
}
.btn-chapter-status.status-published:hover {
  background: #F7EDE9;
}

.lesson-badge-draft {
  background: #F5F2EB;
  color: #736966;
  border: 1px solid #EBE6DF;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.lesson-badge-pub {
  background: #FAF8F5;
  color: #7A2B43;
  border: 1px solid #E4D8CC;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.builder-prereq-pill {
  background: #FAF8F5;
  color: #7A2B43;
  border: 1px solid #E4D8CC;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* Editor Top Bar Publish Switch */
.tf-publish-status-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #FAF8F5;
  border: 1px solid #EBE6DF;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
}
.tf-status-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.tf-status-tag.tag-draft {
  background: #F5F2EB;
  color: #736966;
  border: 1px solid #EBE6DF;
}
.tf-status-tag.tag-published {
  background: #F7EDE9;
  color: #7A2B43;
  border: 1px solid #E4D8CC;
}
.tf-btn-publish-toggle {
  background: #7A2B43;
  color: #ffffff;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Inter', sans-serif !important;
}
.tf-btn-publish-toggle:hover {
  background: #5E1F32;
}
.tf-btn-publish-toggle.btn-unpublish {
  background: #FAF8F5;
  color: #7A2B43;
  border: 1px solid #EBE6DF;
}
.tf-btn-publish-toggle.btn-unpublish:hover {
  background: #F5F2EB;
}

/* Prerequisite Chapter Styling */
.builder-chapter-prereq-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  background: #FAF8F5;
  color: #7A2B43;
  border: 1px solid #E4D8CC;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.builder-chapter-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: #736966;
  background: #F5F2EB;
  border: 1px dashed #DCD6CD;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.btn-chapter-prereq-toggle {
  background: #FFFFFF;
  color: #736966;
  border: 1px solid #EBE6DF;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  font-family: 'Inter', sans-serif !important;
}
.btn-chapter-prereq-toggle:hover {
  background: #F5F2EB;
  color: #231815;
}
.btn-chapter-prereq-toggle.active {
  background: #FAF8F5;
  color: #7A2B43;
  border-color: #7A2B43;
  font-weight: 600;
}
