/* css/editor.css — Course Editor Styles */
:root {
  --ed-bg: #0f0f23;
  --ed-sidebar: rgba(20, 20, 45, 0.95);
  --ed-card: rgba(30, 30, 60, 0.85);
  --ed-accent: #4ecdc4;
  --ed-accent2: #ff6b6b;
  --ed-text: #e0e0e0;
  --ed-muted: #888;
  --ed-border: rgba(78, 205, 196, 0.2);
  --ed-input-bg: rgba(15, 15, 35, 0.9);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.editor-body {
  font-family: 'Noto Sans TC', 'Segoe UI', sans-serif;
  background: var(--ed-bg);
  color: var(--ed-text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.ed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--ed-sidebar);
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.ed-header h1 {
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--ed-accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ed-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--ed-muted);
}
.ed-header .user-info .username { color: var(--ed-accent); font-weight: 600; }

/* ── Login overlay ── */
.ed-login-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.ed-login-box {
  background: var(--ed-card);
  border: 1px solid var(--ed-border);
  border-radius: 12px;
  padding: 32px;
  width: 380px;
  backdrop-filter: blur(10px);
}
.ed-login-box h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--ed-accent);
}
.ed-login-box input {
  width: 100%;
  padding: 10px 14px;
  background: var(--ed-input-bg);
  border: 1px solid var(--ed-border);
  border-radius: 8px;
  color: var(--ed-text);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.ed-login-box .ed-error {
  color: var(--ed-accent2);
  font-size: 0.8rem;
  margin-bottom: 10px;
  min-height: 1.2em;
}

/* ── Main layout ── */
.ed-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── Sidebar ── */
.ed-sidebar {
  width: 280px;
  background: var(--ed-sidebar);
  border-right: 1px solid var(--ed-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}
/* Mode toggle */
.ed-mode-toggle {
  display: flex;
  padding: 8px 10px 0;
  gap: 4px;
}
.ed-mode-btn {
  flex: 1;
  padding: 6px 0;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ed-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}
.ed-mode-btn:hover {
  background: rgba(78, 205, 196, 0.1);
}
.ed-mode-btn.active {
  background: rgba(78, 205, 196, 0.15);
  border-color: var(--ed-accent);
  color: var(--ed-accent);
  font-weight: 600;
}
.ed-sidebar section { padding: 12px 14px; }
.ed-sidebar section + section { border-top: 1px solid var(--ed-border); }
.ed-sidebar label {
  display: block;
  font-size: 0.75rem;
  color: var(--ed-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ed-sidebar select, .ed-sidebar input[type="text"] {
  width: 100%;
  padding: 7px 10px;
  background: var(--ed-input-bg);
  border: 1px solid var(--ed-border);
  border-radius: 6px;
  color: var(--ed-text);
  font-size: 0.85rem;
}

/* Slide list */
.ed-slide-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}
.ed-slide-list .slide-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.3;
  transition: background 0.15s;
}
.ed-slide-list .slide-item:hover { background: rgba(78, 205, 196, 0.08); }
.ed-slide-list .slide-item.active {
  background: rgba(78, 205, 196, 0.15);
  border-left: 3px solid var(--ed-accent);
}
.ed-slide-list .slide-item .num {
  flex-shrink: 0;
  width: 28px;
  text-align: right;
  color: var(--ed-muted);
  font-size: 0.75rem;
}
.ed-slide-list .slide-item .title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ed-slide-list .slide-item .restricted-badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  background: var(--ed-accent2);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
}
.ed-slide-list .slide-item.modified .title-text {
  color: #f59e0b;
}
.ed-slide-list .slide-item .modified-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
}
.ed-action-bar .modified-count {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* Sidebar footer */
.ed-sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--ed-border);
}
.ed-sidebar-footer .toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

/* ── Content area ── */
.ed-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Title bar */
.ed-title-bar {
  display: flex;
  gap: 12px;
  padding: 10px 20px;
  background: var(--ed-card);
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.ed-title-bar .field-group {
  flex: 1;
  margin: 0;
}
.ed-title-bar .field-group label {
  display: block;
  font-size: 0.7rem;
  color: var(--ed-accent);
  margin-bottom: 3px;
  text-transform: uppercase;
}
.ed-title-bar input[type="text"] {
  width: 100%;
  padding: 6px 10px;
  background: var(--ed-input-bg);
  border: 1px solid var(--ed-border);
  border-radius: 6px;
  color: var(--ed-text);
  font-size: 0.88rem;
  font-family: inherit;
}

/* WYSIWYG Toolbar */
.ed-wysiwyg-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 16px;
  background: rgba(20, 20, 45, 0.85);
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.toolbar-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--ed-text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.12s;
}
.toolbar-btn:hover {
  background: rgba(78, 205, 196, 0.15);
  border-color: var(--ed-border);
}
.toolbar-btn:active,
.toolbar-btn.active {
  background: rgba(78, 205, 196, 0.25);
  border-color: var(--ed-accent);
  color: var(--ed-accent);
}
.toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--ed-border);
  margin: 0 4px;
}
.toolbar-label {
  font-size: 0.72rem;
  color: var(--ed-accent);
  font-weight: 600;
  white-space: nowrap;
  margin-right: 2px;
}
.table-ctx-danger:hover {
  background: rgba(255, 77, 79, 0.2) !important;
  border-color: rgba(255, 77, 79, 0.5) !important;
  color: #ff6b6b !important;
}

/* WYSIWYG content area */
.ed-wysiwyg-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.ed-wysiwyg-content {
  min-height: 100%;
  padding: 24px 28px;
  background: #f8f9fa;
  color: #222;
  font-size: 0.95rem;
  line-height: 1.7;
  font-family: 'Noto Sans TC', 'Segoe UI', sans-serif;
  outline: none;
}
.ed-wysiwyg-content:focus {
  box-shadow: inset 0 0 0 2px rgba(78, 205, 196, 0.4);
}
.ed-wysiwyg-content h4 { margin: 0.8em 0 0.4em; color: #1a1a2e; }
.ed-wysiwyg-content ul,
.ed-wysiwyg-content ol { padding-left: 24px; margin: 0.5em 0; }
.ed-wysiwyg-content li { margin-bottom: 4px; }
.ed-wysiwyg-content table { border-collapse: collapse; width: 100%; margin: 0.5em 0; }
.ed-wysiwyg-content table th,
.ed-wysiwyg-content table td { border: 1px solid #ccc; padding: 6px 10px; text-align: left; }
.ed-wysiwyg-content table th { background: #e9ecef; font-weight: 600; }
.ed-wysiwyg-content table td.table-cell-active,
.ed-wysiwyg-content table th.table-cell-active {
  outline: 2px solid #4ecdc4;
  outline-offset: -2px;
  background: rgba(78, 205, 196, 0.08);
}
.ed-wysiwyg-content a { color: #0d6efd; }
.ed-wysiwyg-content .wysiwyg-notice {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 40px 20px;
}

/* ── SVG Dual-Pane Editor ── */
.ed-svg-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ed-svg-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 16px;
  background: rgba(20, 20, 45, 0.85);
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.ed-svg-panes {
  flex: 1;
  display: flex;
  min-height: 0;
}
.ed-svg-preview {
  flex: 1;
  overflow: auto;
  background: #1a1a2e;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.ed-svg-preview svg {
  max-width: 100%;
  height: auto;
  cursor: pointer;
}
.ed-svg-preview .svg-el-selected {
  outline: 2px dashed #4ecdc4;
  outline-offset: 2px;
}
.ed-svg-code-pane {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--ed-border);
}
.ed-svg-code-pane textarea {
  width: 100%;
  height: 100%;
  background: #0d0d1a;
  color: #e0e0e0;
  border: none;
  padding: 12px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  tab-size: 2;
}
.ed-svg-props {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(20, 20, 45, 0.9);
  border-top: 1px solid var(--ed-border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.ed-svg-props label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--ed-muted);
}
.ed-svg-props input[type="text"] {
  width: 140px;
  padding: 2px 6px;
  background: var(--ed-input-bg);
  color: var(--ed-text);
  border: 1px solid var(--ed-border);
  border-radius: 4px;
  font-size: 0.8rem;
}
.ed-svg-props input[type="number"] {
  width: 60px;
  padding: 2px 6px;
  background: var(--ed-input-bg);
  color: var(--ed-text);
  border: 1px solid var(--ed-border);
  border-radius: 4px;
  font-size: 0.8rem;
}
.ed-svg-props input[type="color"] {
  width: 28px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--ed-border);
  border-radius: 4px;
  cursor: pointer;
}

/* ── Book Editor ── */
.ed-book-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ed-book-chapter-title {
  padding: 12px 24px;
  background: rgba(20, 20, 45, 0.85);
  border-bottom: 1px solid var(--ed-border);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ed-accent);
  flex-shrink: 0;
}
.ed-book-content {
  font-family: "Noto Serif TC", "PMingLiU", serif;
  line-height: 1.9;
  font-size: 1rem;
}
.ed-book-content svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
}
.ed-book-content blockquote {
  border-left: 3px solid #ddd;
  padding-left: 16px;
  color: #555;
  font-style: italic;
  margin: 1em 0;
}
.ed-book-content .figure {
  margin: 1.5em 0;
  text-align: center;
}
.ed-book-content .figure figcaption,
.ed-book-content .figure .fig-title {
  font-size: 0.85rem;
  color: #666;
  margin-top: 6px;
}

/* ── Workflow Steps (WYSIWYG) ── */
.wysiwyg-steps-container {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
}
.wysiwyg-step-arrow {
  display: flex;
  align-items: center;
  font-size: 1.3em;
  color: #90a4ae;
  padding: 0 2px;
}
.wysiwyg-step-card {
  flex: 1;
  min-width: 140px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  position: relative;
}
.wysiwyg-step-icon {
  display: block;
  font-size: 1.8em;
  margin-bottom: 6px;
}
.wysiwyg-step-badge {
  display: inline-block;
  background: var(--ed-accent, #4ecdc4);
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  font-weight: 600;
}
.wysiwyg-step-title {
  margin: 4px 0;
  font-size: 0.95em;
  color: #1a1a2e;
  outline: none;
  border-bottom: 1px dashed transparent;
}
.wysiwyg-step-title:focus {
  border-bottom-color: var(--ed-accent, #4ecdc4);
}
.wysiwyg-step-desc {
  margin: 4px 0 0;
  font-size: 0.82em;
  color: #555;
  outline: none;
  border: 1px dashed transparent;
  border-radius: 4px;
  padding: 2px 4px;
  min-height: 1.5em;
}
.wysiwyg-step-desc:focus {
  border-color: var(--ed-accent, #4ecdc4);
  background: #fff;
}

/* ── Demo Showcase (WYSIWYG) ── */
.wysiwyg-demo-showcase {
  padding: 12px;
}
.wysiwyg-demo-placeholder {
  pointer-events: none;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
}
.wysiwyg-demo-placeholder * {
  pointer-events: none;
}
.wysiwyg-demo-desc {
  outline: none;
  border: 1px dashed #ccc;
  border-radius: 6px;
  padding: 8px 12px;
  min-height: 2em;
  font-size: 0.9em;
  color: #333;
}
.wysiwyg-demo-desc:focus {
  border-color: var(--ed-accent, #4ecdc4);
  background: #fafffe;
}
.wysiwyg-demo-url {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.85em;
}

/* Status bar */
.ed-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 20px;
  background: var(--ed-sidebar);
  border-top: 1px solid var(--ed-border);
  flex-shrink: 0;
  font-size: 0.8rem;
}
.slide-type-label {
  color: var(--ed-muted);
  font-size: 0.75rem;
  margin: 0;
}
.slide-type-select {
  background: var(--ed-bg);
  color: var(--ed-text);
  border: 1px solid var(--ed-border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  cursor: pointer;
}
.slide-type-select:focus {
  border-color: var(--ed-accent);
  outline: none;
}
.ed-status-bar .slide-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  background: rgba(78, 205, 196, 0.15);
  color: var(--ed-accent);
  padding: 2px 8px;
  border-radius: 4px;
}
.ed-status-bar .char-count { color: var(--ed-muted); }
.ed-status-bar .char-status.ok { color: var(--ed-accent); }
.ed-status-bar .char-status.warn { color: #f59e0b; }

/* Empty state */
.ed-empty-state {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--ed-muted);
  overflow-y: auto;
  padding: 1rem 0;
}

/* Tab bar spacer + raw toggle */
.ed-tab-spacer { flex: 1; }
.ed-raw-toggle {
  font-family: 'Consolas', 'Courier New', monospace !important;
  font-size: 0.8rem !important;
  letter-spacing: 0;
}
.ed-raw-toggle.active {
  color: #f59e0b !important;
  border-bottom-color: #f59e0b !important;
}

/* Edit panel */
.ed-edit-panel {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  background: var(--ed-card);
}
.ed-edit-panel .field-group {
  margin-bottom: 14px;
}
.ed-edit-panel .field-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--ed-accent);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.ed-edit-panel input[type="text"],
.ed-edit-panel textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--ed-input-bg);
  border: 1px solid var(--ed-border);
  border-radius: 6px;
  color: var(--ed-text);
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
}
.ed-edit-panel textarea { min-height: 80px; }
.ed-edit-panel .bullet-row {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.ed-edit-panel .bullet-row input { flex: 1; }
.ed-edit-panel .bullet-row .bullet-num {
  flex-shrink: 0;
  width: 24px;
  line-height: 34px;
  text-align: center;
  color: var(--ed-muted);
  font-size: 0.75rem;
}

/* Action bar */
.ed-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: var(--ed-sidebar);
  border-top: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.ed-action-bar .status {
  font-size: 0.8rem;
  color: var(--ed-muted);
}
.ed-action-bar .status.success { color: var(--ed-accent); }
.ed-action-bar .status.error { color: var(--ed-accent2); }
.ed-action-bar .actions { display: flex; gap: 10px; }

/* ── Buttons ── */
.btn {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--ed-accent), #45b7aa);
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ed-text);
  border: 1px solid var(--ed-border);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }
.btn-danger {
  background: rgba(255, 107, 107, 0.15);
  color: var(--ed-accent2);
  border: 1px solid rgba(255, 107, 107, 0.3);
}
.btn-danger:hover { background: rgba(255, 107, 107, 0.25); }
.btn-sm { padding: 4px 10px; font-size: 0.75rem; }

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}
.toggle .slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.toggle input:checked + .slider { background: var(--ed-accent); }
.toggle input:checked + .slider::before { transform: translateX(16px); }

/* Smaller toggle for dashboard tables */
.toggle-sm { width: 30px; height: 16px; }
.toggle-sm .slider { border-radius: 8px; }
.toggle-sm .slider::before { width: 12px; height: 12px; }
.toggle-sm input:checked + .slider::before { transform: translateX(14px); }

/* Course list hover */
.course-list-row:hover { background: rgba(255, 255, 255, 0.05); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(78, 205, 196, 0.3); border-radius: 3px; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--ed-accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tab bar ── */
.ed-tab-bar {
  display: flex;
  background: var(--ed-sidebar);
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
  padding: 0 16px;
  gap: 2px;
}
.ed-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ed-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.ed-tab:hover { color: var(--ed-text); }
.ed-tab.active {
  color: var(--ed-accent);
  border-bottom-color: var(--ed-accent);
}

/* Lecture panel meta */
.lecture-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.8rem;
}
.lecture-meta .char-count { color: var(--ed-muted); }
.lecture-meta .char-status.ok { color: var(--ed-accent); }
.lecture-meta .char-status.warn { color: #f59e0b; }

/* ── PDF Export Dialog ── */
.ed-pdf-dialog {
  background: #1a1a2e;
  color: #fff;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 0;
  max-width: 520px;
  width: 90vw;
}
.ed-pdf-dialog::backdrop { background: rgba(0,0,0,0.6); }
.ed-pdf-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ed-pdf-header h2 { margin: 0; font-size: 1.2rem; }
.ed-pdf-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
}
.ed-pdf-close:hover { color: #fff; }
.ed-pdf-body { padding: 1.5rem; }
.ed-pdf-info {
  padding: 0.8rem 1rem;
  background: rgba(78,205,196,0.08);
  border: 1px solid rgba(78,205,196,0.2);
  border-radius: 8px;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.ed-pdf-field {
  margin-bottom: 1.2rem;
}
.ed-pdf-field label:first-child {
  display: block;
  font-size: 0.85rem;
  color: var(--ed-muted, #888);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.ed-pdf-radios {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ed-pdf-radios label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.ed-pdf-radios label:hover { border-color: var(--ed-accent); }
.ed-pdf-radios input[type="radio"] { accent-color: var(--ed-accent); }
.ed-pdf-note {
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--ed-muted);
}
.ed-pdf-note p { margin: 0; }
.ed-pdf-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #333;
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

/* PDF page/chapter selection */
.ed-pdf-select-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.ed-pdf-count {
  font-size: 0.82rem;
  color: var(--ed-muted);
  margin-left: auto;
}
.btn-xs {
  padding: 3px 10px !important;
  font-size: 0.75rem !important;
}
.ed-pdf-checklist {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 4px;
}
.ed-pdf-checklist::-webkit-scrollbar { width: 6px; }
.ed-pdf-checklist::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
.ed-pdf-check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.1s;
}
.ed-pdf-check-item:hover { background: rgba(255,255,255,0.05); }
.ed-pdf-check-item input[type="checkbox"] { accent-color: var(--ed-accent); }
.ed-pdf-check-item .idx { color: var(--ed-muted); font-size: 0.75rem; min-width: 28px; }
.ed-pdf-check-item .title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
