.adminMain { max-width: 920px; }
.adminTitle { flex: 1; text-align: center; padding-right: 68px; }
.adminIntro { padding: 34px 0 8px; }
.adminIntro h1 { font-size: 34px; letter-spacing: -0.8px; }
.adminIntro p { max-width: 680px; margin-top: 8px; color: var(--text2); font-size: 16px; }
.adminActions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 10px; }
.primaryAction, .secondaryAction, .dangerAction, .iconAction, .closeButton, .smallAction, .dragHandle {
  border: 0; border-radius: 11px; font: 600 15px/1.2 inherit; cursor: pointer;
}
.primaryAction { padding: 11px 17px; background: var(--accent); color: #fff; }
.secondaryAction { padding: 11px 17px; background: #E9E9EB; color: var(--text); }
.editAppLink { display: inline-flex; align-items: center; text-decoration: none; background: #E7F1FF; color: #075EBF; }
.dangerAction { padding: 9px 12px; background: #FFE8E8; color: #B42318; }
.iconAction { width: 38px; height: 38px; background: #F2F2F7; color: var(--text); font-size: 18px; }
.iconAction:disabled { opacity: 0.3; cursor: default; }
.dragHandle {
  min-width: 60px; min-height: 42px; padding: 8px 10px; flex: none;
  background: #F2F2F7; color: #4A4A4F; font-size: 12px; touch-action: none;
}
.dragHandle:active, .dragHandle[aria-pressed=true] { background: #DDEBFC; color: #075EBF; }
.dragging { opacity: 0.62; outline: 2px solid var(--accent); outline-offset: -2px; position: relative; z-index: 5; }
.isSorting { user-select: none; }
.status { min-height: 24px; margin: 13px 0; color: var(--text2); font-size: 14px; }
.status.error { color: #B42318; }
.manageCourse { background: #fff; border-radius: 18px; margin-top: 14px; box-shadow: 0 5px 24px rgba(0,0,0,0.05); overflow: hidden; }
.manageCourseHead { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid #ECECEF; }
.manageBadge { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.manageBadge.hasImage { background-position: center; background-size: cover; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.manageCourseName { flex: 1; min-width: 0; }
.manageCourseName strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manageCourseName span { color: var(--text2); font-size: 13px; }
.manageTools { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.lessonDetails summary { padding: 13px 16px; color: var(--accent); font-size: 14px; font-weight: 650; cursor: pointer; list-style-position: inside; }
.lessonDetails[open] summary { border-bottom: 1px solid #ECECEF; }
.lessonManager { padding: 4px 16px 14px; }
.lessonLine { display: flex; align-items: center; gap: 9px; min-height: 52px; border-bottom: 1px solid #F0F0F2; }
.lessonLine:last-of-type { border-bottom: 0; }
.lessonIndex { color: var(--text2); width: 26px; text-align: center; font-size: 13px; }
.lessonTitle { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.lessonType { color: var(--text2); font-size: 10px; font-weight: 700; }
.lessonActions { display: flex; gap: 4px; }
.smallAction { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; background: #F2F2F7; color: var(--text); font-size: 12px; text-decoration: none; }
.smallDanger { padding: 8px 10px; font-size: 12px; }
.sourceLink { background: #EAF3FF; color: #075EBF; }
.lessonType.warning { color: #9A5B00; max-width: 100px; text-align: right; }
.addLessons { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.addLessons input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.filePickerLabel { display: inline-flex; padding: 10px 14px; border-radius: 10px; background: #EAF3FF; color: var(--accent); font-weight: 600; cursor: pointer; }
.adminDialog { width: min(520px, calc(100% - 28px)); border: 0; border-radius: 20px; padding: 22px; box-shadow: 0 24px 80px rgba(0,0,0,0.24); }
.adminDialog::backdrop { background: rgba(0,0,0,0.35); backdrop-filter: blur(4px); }
.adminDialog h2 { font-size: 23px; margin-bottom: 15px; }
.adminDialog label { display: grid; gap: 6px; margin-top: 13px; font-size: 14px; font-weight: 600; }
.adminDialog input, .adminDialog select { width: 100%; min-height: 45px; border: 1px solid #D6D6DA; border-radius: 10px; padding: 8px 11px; font: 16px inherit; background: #fff; }
.adminDialog input[type=color] { width: 70px; padding: 4px; }
.adminDialog input[type=file] { padding: 8px; }
.coverPreview { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px; border: 1px solid #E3E3E7; border-radius: 12px; }
.coverPreview[hidden] { display: none; }
.coverPreview img { width: 92px; height: 68px; object-fit: cover; border-radius: 9px; background: #F2F2F7; }
.formHint { color: var(--text2); font-size: 13px; margin-top: 9px; }
.dialogActions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.wideDialog { width: min(680px, calc(100% - 28px)); max-height: 80vh; overflow: auto; }
.dialogHead { display: flex; align-items: center; }
.dialogHead h2 { flex: 1; }
.closeButton { width: 38px; height: 38px; background: #E9E9EB; font-size: 23px; }
.restoreLine { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #ECECEF; }
.restoreLine .restoreCopy { flex: 1; }
.restoreLine strong, .restoreLine span { display: block; }
.restoreLine span { color: var(--text2); font-size: 13px; margin-top: 2px; }
.auditSummary { display: grid; gap: 3px; padding: 14px; border-radius: 14px; margin-bottom: 18px; }
.auditSummary.healthy { background: #EAF7ED; color: #146C2E; }
.auditSummary.needsAttention { background: #FFF3DD; color: #805400; }
.auditSummary span { font-size: 13px; opacity: 0.86; }
.auditSection { margin-top: 18px; }
.auditSection h3 { font-size: 17px; margin-bottom: 5px; }
.auditIssue { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ECECEF; }
.auditIssue > div { flex: 1; min-width: 0; }
.auditIssue strong, .auditIssue span { display: block; }
.auditIssue span { color: var(--text2); font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; }
.auditIssue.stacked { display: grid; gap: 2px; }
.compactAction { flex: none; padding: 9px 11px; font-size: 13px; }
.auditHealthyNote { color: var(--text2); line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 14px; width: min(460px, calc(100% - 28px)); padding: 13px 15px; border-radius: 14px; background: #1D1D1F; color: #fff; box-shadow: 0 14px 50px rgba(0,0,0,0.3); }
.toast[hidden] { display: none; }
.toast span { flex: 1; font-size: 14px; }
.toast button { border: 0; background: none; color: #6AB1FF; font: 700 14px inherit; cursor: pointer; }
@media (max-width: 680px) {
  .adminMain { padding: 0 12px 60px; }
  .adminIntro { padding-top: 24px; }
  .adminIntro h1 { font-size: 29px; }
  .manageCourseHead { align-items: flex-start; flex-wrap: wrap; }
  .manageCourseName { min-width: calc(100% - 126px); }
  .manageTools { width: 100%; justify-content: flex-start; }
  .lessonManager { padding-left: 10px; padding-right: 10px; }
  .lessonLine { flex-wrap: wrap; padding: 7px 0; }
  .lessonTitle { min-width: calc(100% - 164px); }
  .lessonType { margin-left: 70px; }
  .lessonActions { width: 100%; padding-left: 70px; flex-wrap: wrap; }
  .adminDialog { padding: 18px; }
  .auditIssue { align-items: flex-start; flex-direction: column; }
}
