/* aplikasi/materi-ajar/app.css — Admin Guru | v1.0 | 2026-07-15 */
/* Module-specific styling untuk Materi Ajar */

@import url('../../shared/form-base.css');
@import url('../../shared/dokumen-list.css');
@import url('../../shared/components.css');

/* ═══════════════════════════════════════════════════
   WIZARD HEADER OVERRIDE
   ═══════════════════════════════════════════════════ */

body.wizard-layout .app-header[data-shared-header="v1"] {
  display: none;
}

/* ═══════════════════════════════════════════════════════
   GENERIC BUTTON BASE
   ═══════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.3;
  min-height: 40px;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Action button — primary, full-width, dominant */
.btn-action {
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(101, 146, 135, 0.35);
  background: var(--accent, #659287);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  min-height: 48px;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: var(--color-accent-hover, #51746b);
  box-shadow: 0 6px 20px rgba(101, 146, 135, 0.45);
  transform: translateY(-2px);
}

.btn-action:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(101, 146, 135, 0.3);
}

.btn-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Secondary action — less dominant, neutral */
.btn-action-secondary {
  width: 100%;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  background: var(--color-btn-neutral, #f1f5f9);
  color: var(--color-btn-neutral-txt, #334155);
  border: 1px solid var(--color-border-panel, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  min-height: 44px;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  transition: all 0.15s ease;
}

.btn-action-secondary:hover {
  background: var(--color-btn-neutral-hv, #e2e8f0);
  border-color: var(--color-border-input, #94a3b8);
}

[data-theme="dark"] .btn-action-secondary {
  background: var(--color-btn-neutral, #1f2937);
  color: var(--color-btn-neutral-txt, #f1f5f9);
  border-color: var(--color-border-panel, #334155);
}

[data-theme="dark"] .btn-action-secondary:hover {
  background: var(--color-btn-neutral-hv, #374151);
  border-color: var(--color-border-input, #64748b);
}

/* Success action — green, for final/merge steps */
.btn-action-success {
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  min-height: 48px;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  transition: all 0.2s ease;
}

.btn-action-success:hover {
  background: #15803d;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
  transform: translateY(-2px);
}

.btn-action-success:active {
  transform: translateY(0);
}

.btn-action-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ═══════════════════════════════════════════════════
   SKEMA WARNA — Biru Lembut (khas Materi Ajar)
   ═══════════════════════════════════════════════════ */

body.wizard-layout {
  background: #78A4CB;
}

.wizard-content {
  background: #95BDD7;
  border-color: #B4E1EB;
}

.form-section {
  background: #B4E1EB;
  border: none;
  --ink-faint: #475569;
  --color-text-muted: #475569;
}

.section-title::before {
  background: #6a9cc7;
}

.section-title {
  color: #1a3a55;
}

.section-header:hover .section-title {
  color: #0d2a40;
}

/* ═══════════════════════════════════════════════════
   INFO BANNER — Tips di setiap section
   ═══════════════════════════════════════════════════ */

.info-banner--compact {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #e8f0f8;
  border-left: 3px solid #7aacd7;
  border-radius: 8px;
  color: #1a3a55;
}

.info-banner--compact .banner-icon {
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(122, 172, 215, 0.2);
  border-radius: 50%;
  margin-top: 1px;
}

.info-banner--compact .banner-icon i[data-lucide] {
  width: 16px;
  height: 16px;
  color: #4a7aaf;
}

.info-banner--compact .banner-content {
  flex: 1;
  min-width: 0;
}

.info-banner--compact .banner-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-light, #475569);
}

.info-banner--compact .banner-content strong {
  color: var(--ink, #0f172a);
  font-weight: 600;
}

[data-theme="dark"] .info-banner--compact {
  background: #1e2a42;
  border-left-color: #6a9cc7;
  color: #b8d0e8;
}

[data-theme="dark"] .info-banner--compact .banner-icon {
  background: rgba(106, 156, 199, 0.15);
}

[data-theme="dark"] .info-banner--compact .banner-icon i[data-lucide] {
  color: #7aacd7;
}

[data-theme="dark"] .info-banner--compact .banner-content p {
  color: #94a3b8;
}

[data-theme="dark"] .info-banner--compact .banner-content strong {
  color: #e2e8f0;
}

/* Responsive — mobile */
@media (max-width: 480px) {
  .info-banner--compact {
    padding: 10px 12px;
    gap: 10px;
  }

  .info-banner--compact .banner-icon {
    width: 24px;
    height: 24px;
  }

  .info-banner--compact .banner-icon i[data-lucide] {
    width: 14px;
    height: 14px;
  }

  .info-banner--compact .banner-content p {
    font-size: 12px;
  }
}

/* ===== BUTTON MUAT MODUL AJAR ===== */
.btn-muat-ma {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: var(--accent, #659287);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  box-shadow: 0 3px 10px rgba(101, 146, 135, 0.25);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-muat-ma:hover {
  background: var(--color-accent-hover, #51746b);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(101, 146, 135, 0.35);
}

.btn-muat-ma:active {
  transform: translateY(0);
}

.btn-hapus-konteks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-bg-panel, #ffffff);
  border: 1px solid var(--color-btn-danger, #dc2626);
  color: var(--color-btn-danger, #dc2626);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
}

.btn-hapus-konteks:hover {
  background: var(--color-btn-danger, #dc2626);
  color: #fff;
}

/* ═══════════════════════════════════════════════════
   WIZARD PROGRESS CARD
   ═══════════════════════════════════════════════════ */

.wizard-progress-card {
  background: var(--color-bg-panel, #ffffff);
  border: 1px solid var(--color-border-panel, #e2e8f0);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.wizard-progress-card-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-panel, #e2e8f0);
}

.wizard-card-app-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary, #0f172a);
  margin: 0;
  letter-spacing: -0.02em;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
}

.wizard-card-app-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted, #94a3b8);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
}

.wizard-progress-card-identity {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--color-border-panel, #e2e8f0);
  font-size: 11px;
  color: var(--color-text-muted, #94a3b8);
  flex-wrap: wrap;
}

.wizard-progress-card-identity.visible {
  display: flex;
}

.wiz-id-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.wiz-id-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.wiz-id-item i[data-lucide] {
  flex-shrink: 0;
  opacity: 0.5;
}

.wiz-id-sep {
  opacity: 0.35;
  font-weight: 300;
  flex-shrink: 0;
}

.wizard-progress-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.wizard-progress-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 3px 10px;
  background: var(--color-accent, #659287);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  transition: all 0.25s ease;
}

.wizard-progress-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary, #0f172a);
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  transition: color 0.25s ease;
}

.wizard-progress-card-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.wizard-progress-card-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border: 1px solid var(--color-border-panel, #e2e8f0);
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted, #94a3b8);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.wizard-progress-card-step:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.04));
  color: var(--color-text-primary, #0f172a);
}

.wizard-progress-card-step.active {
  background: var(--color-accent, #659287);
  border-color: var(--color-accent, #659287);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(101, 146, 135, 0.3);
}

.wizard-progress-card-step.done {
  background: var(--color-success-bg, #f0fdf4);
  border-color: var(--color-success-border, #86efac);
  color: #16a34a;
  font-weight: 600;
}

.wizard-progress-card-arrow {
  display: flex;
  align-items: center;
  color: var(--color-text-muted, #94a3b8);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   STEP 1 — MUAT MODUL AJAR
   ═══════════════════════════════════════════════════ */

/* Status identitas terpilih dari MA */
.ma-identitas-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  border-radius: 6px;
  margin-top: 8px;
}

.ma-identitas-status .status-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.ma-identitas-status .status-text {
  flex: 1;
  font-size: 13px;
  color: var(--color-success-text);
  font-weight: 500;
}

/* Ringkasan Modul Ajar yang dipilih */
.ma-ringkasan-card {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border-panel);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.ma-ringkasan-card strong {
  display: inline-block;
  min-width: 110px;
  color: var(--color-text-label);
}

.ma-ringkasan-card .ma-pt-list {
  margin-top: 8px;
  border-top: 1px dashed var(--color-border-panel);
  padding-top: 8px;
}

.ma-ringkasan-card .ma-pt-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
}

.ma-ringkasan-card .ma-pt-item .pt-nomor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   STEP 2 — PROMPT CARD (KOMPONEN BARU)
   ═══════════════════════════════════════════════════ */

.prompt-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.prompt-card {
  background: var(--color-bg-panel, #ffffff);
  border: 2px solid var(--color-border-panel, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.prompt-card.status-valid {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1);
}

.prompt-card.status-error {
  border-color: #dc2626;
}

.prompt-card.status-copied {
  border-color: var(--color-accent, #659287);
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(135deg, #2c5282, #3182ce);
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.prompt-card-title-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.prompt-card-badge {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  width: fit-content;
  font-weight: 500;
}

.prompt-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  margin: 0;
}

.prompt-card-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.idle { background: #94a3b8; }
.status-dot.copied { background: #f59e0b; }
.status-dot.pasted { background: #3b82f6; }
.status-dot.valid { background: #16a34a; }
.status-dot.error { background: #dc2626; }

.prompt-card-status.idle { color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.15); }
.prompt-card-status.copied { color: #fff; background: rgba(245,158,11,0.3); }
.prompt-card-status.pasted { color: #fff; background: rgba(59,130,246,0.3); }
.prompt-card-status.valid { color: #fff; background: #16a34a; }
.prompt-card-status.error { color: #fff; background: #dc2626; }

.prompt-card-body {
  padding: 12px 14px;
}

.prompt-card-textarea {
  width: 100%;
  min-height: 70px;
  font-family: var(--mono-font, 'JetBrains Mono', monospace);
  font-size: 11px;
  line-height: 1.5;
  padding: 10px;
  border: 1px solid var(--color-border-input);
  border-radius: 6px;
  background: var(--color-bg-section, #f8fafc);
  color: var(--color-text-primary);
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.prompt-card-textarea[readonly] {
  cursor: default;
  opacity: 0.9;
}

.prompt-card-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-label);
  margin-bottom: 6px;
}

.prompt-card-paste {
  width: 100%;
  min-height: 100px;
  font-family: var(--mono-font, 'JetBrains Mono', monospace);
  font-size: 11px;
  line-height: 1.5;
  padding: 10px;
  border: 1px solid var(--color-border-input);
  border-radius: 6px;
  background: var(--color-bg-panel);
  color: var(--color-text-primary);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.prompt-card-paste:focus {
  outline: none;
  border-color: var(--color-accent, #659287);
  box-shadow: 0 0 0 2px rgba(101, 146, 135, 0.15);
}

.prompt-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-copy-prompt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-accent, #659287);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(101, 146, 135, 0.3);
}

.btn-copy-prompt:hover {
  background: var(--color-accent-hover, #51746b);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(101, 146, 135, 0.4);
}

.btn-copy-prompt.copy-sukses {
  background: #16a34a !important;
  pointer-events: none;
}

.btn-validate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  transition: all 0.15s ease;
}

.btn-validate:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.prompt-card-result {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  display: none;
}

.prompt-card-result.visible {
  display: block;
}

.prompt-card-result.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
}

.prompt-card-result.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ═══════════════════════════════════════════════════
   FLOATING SIDEBAR, DRAWER, FAB, BOTTOM SHEET
   ═══════════════════════════════════════════════════ */

.floating-sidebar {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--color-bg-panel, #ffffff);
  border: 1px solid var(--color-border-panel, #e2e8f0);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.floating-sidebar.visible {
  opacity: 1;
  pointer-events: auto;
}

.floating-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary, #475569);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.floating-sidebar-btn:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.04));
  color: var(--color-text-primary, #0f172a);
}

.floating-sidebar-btn-primary {
  background: var(--color-accent, #659287);
  color: #ffffff;
}

.floating-sidebar-btn-primary:hover {
  background: var(--color-accent-hover, #51746b);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(101, 146, 135, 0.3);
}

.floating-sidebar-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  line-height: 1.3;
}

.floating-sidebar-btn:hover .floating-sidebar-tooltip {
  opacity: 1;
}

.floating-sidebar-divider {
  width: 24px;
  height: 1px;
  background: var(--color-border-panel, #e2e8f0);
  margin: 4px 0;
}

/* Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 80;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: drawerFadeIn 0.2s ease;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 85vw);
  max-width: 480px;
  background: var(--color-bg-panel, #ffffff);
  z-index: 90;
  box-shadow: -4px 0 24px rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  animation: drawerSlideIn 0.25s ease-out;
  overflow: hidden;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border-panel, #e2e8f0);
  flex-shrink: 0;
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary, #0f172a);
  margin: 0;
}

.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary, #475569);
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-close:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.04));
  color: var(--color-text-primary, #0f172a);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

@keyframes drawerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawerSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* FAB */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--color-accent, #659287);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(101, 146, 135, 0.35);
  transition: all 0.2s ease;
}

.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(101, 146, 135, 0.45);
}

.fab:active {
  transform: scale(0.93);
}

/* Bottom Sheet */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 90;
  animation: drawerFadeIn 0.2s ease;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  background: var(--color-bg-panel, #ffffff);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.10);
  animation: bottomSheetSlideUp 0.3s ease-out;
  max-height: 70vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--color-border-panel, #e2e8f0);
  border-radius: 2px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}

.bottom-sheet-actions {
  padding: 8px 16px 16px;
}

.bottom-sheet-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-primary, #0f172a);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  cursor: pointer;
  transition: background 0.15s ease;
}

.bottom-sheet-action:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.04));
}

.bottom-sheet-action span {
  flex: 1;
  text-align: left;
}

.bottom-sheet-divider {
  height: 1px;
  background: var(--color-border-panel, #e2e8f0);
  margin: 6px 16px;
}

@keyframes bottomSheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Responsive sidebar/FAB */
@media (min-width: 1024px) {
  .floating-sidebar {
    opacity: 1;
    pointer-events: auto;
  }

  .fab,
  .bottom-sheet,
  .bottom-sheet-overlay {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .floating-sidebar {
    display: none !important;
  }

  .fab {
    display: flex;
  }
}

/* ═══════════════════════════════════════════════════
   PREVIEW AREA — Step 3
   ═══════════════════════════════════════════════════ */

body.wizard-layout .wizard-preview {
  max-height: none;
  overflow: visible;
  background: transparent;
  min-height: 200px;
  padding: 0;
  position: relative;
}

body.wizard-layout .wizard-preview .page {
  transform: scale(0.92);
  transform-origin: top center;
  margin-left: auto !important;
  margin-right: auto !important;
  box-shadow: 0 4px 28px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  max-width: 100%;
  animation: docRenderIn 0.35s ease-out;
}

@keyframes docRenderIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(0.92) translateY(0);
  }
}

@media (max-width: 1200px) {
  body.wizard-layout .wizard-preview .page {
    transform: scale(0.85);
  }
}

@media (max-width: 768px) {
  body.wizard-layout .wizard-preview {
    max-height: 70vh;
    overflow-y: auto;
    min-height: 250px;
  }

  body.wizard-layout .wizard-preview .page {
    transform: scale(0.75);
    animation: none;
  }
}

/* Preview theme bar */
.preview-theme-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 12px;
  background: var(--color-bg-panel, #ffffff);
  border: 1px solid var(--color-border-panel, #e2e8f0);
  border-radius: 8px;
}

.preview-theme-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary, #475569);
  white-space: nowrap;
  flex-shrink: 0;
}

.preview-theme-bar .theme-select {
  flex: 1;
  min-width: 0;
  padding: 5px 10px;
  font-size: 13px;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  border: 1px solid var(--color-border-panel, #e2e8f0);
  border-radius: 6px;
  background: var(--color-bg-input, #ffffff);
  color: var(--color-text-primary, #0f172a);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════ */

[data-theme="dark"] body.wizard-layout {
  background: #0d1520;
}

[data-theme="dark"] .wizard-content {
  background: #1a2533;
  border-color: #2a4053;
}

[data-theme="dark"] .form-section {
  background: #2a4053;
}

[data-theme="dark"] .section-title::before {
  background: #6a9cc7;
}

[data-theme="dark"] .section-title {
  color: #b8d0e8;
}

[data-theme="dark"] .section-header:hover .section-title {
  color: #d0e0f2;
}

[data-theme="dark"] .info-banner--compact {
  background: #1e2a42;
  border-left-color: #6a9cc7;
}

[data-theme="dark"] .wizard-progress-card {
  background: var(--color-bg-panel, #111827);
  border-color: var(--color-border-panel, #1f2937);
}

[data-theme="dark"] .wizard-progress-card-step {
  border-color: var(--color-border-panel, #1f2937);
}

[data-theme="dark"] .wizard-progress-card-step:hover {
  background: var(--color-bg-hover, rgba(255,255,255,0.05));
}

[data-theme="dark"] .wizard-progress-card-step.done {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.3);
}

[data-theme="dark"] .floating-sidebar {
  background: var(--color-bg-panel, #111827);
  border-color: var(--color-border-panel, #1f2937);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

[data-theme="dark"] .floating-sidebar-btn:hover {
  background: var(--color-bg-hover, rgba(255,255,255,0.05));
}

[data-theme="dark"] .floating-sidebar-tooltip {
  background: #1e293b;
  color: #f1f5f9;
}

[data-theme="dark"] .bottom-sheet {
  background: var(--color-bg-panel, #111827);
}

[data-theme="dark"] .bottom-sheet-action:hover {
  background: var(--color-bg-hover, rgba(255,255,255,0.05));
}

[data-theme="dark"] .prompt-card {
  background: var(--color-bg-panel, #111827);
  border-color: var(--color-border-panel, #1f2937);
}

[data-theme="dark"] .prompt-card-header {
  background: linear-gradient(135deg, #1e3a5f, #2c5282);
}

[data-theme="dark"] .prompt-card-textarea {
  background: var(--color-bg-section, #1e293b);
  border-color: var(--color-border-panel, #334155);
  color: var(--color-text-primary, #f1f5f9);
}

[data-theme="dark"] .prompt-card-paste {
  background: var(--color-bg-panel, #1e293b);
  border-color: var(--color-border-panel, #334155);
  color: var(--color-text-primary, #f1f5f9);
}

[data-theme="dark"] .preview-theme-bar {
  background: var(--color-bg-panel, #111827);
  border-color: var(--color-border-panel, #1f2937);
}

[data-theme="dark"] .preview-theme-bar .theme-select {
  background: var(--color-bg-input, #1e293b);
  border-color: var(--color-border-panel, #334155);
  color: var(--color-text-primary, #f1f5f9);
}

/* ═══════════════════════════════════════════════════
   DARK MODE — New Button Classes
   ═══════════════════════════════════════════════════ */

[data-theme="dark"] .btn-action {
  background: #659287;
  box-shadow: 0 4px 14px rgba(101, 146, 135, 0.25);
}

[data-theme="dark"] .btn-action:hover {
  background: #7aad9e;
  box-shadow: 0 6px 20px rgba(101, 146, 135, 0.35);
}

[data-theme="dark"] .btn-action-success {
  background: #16a34a;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .btn-action-success:hover {
  background: #22c55e;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.3);
}

[data-theme="dark"] .btn-muat-ma {
  background: #659287;
  box-shadow: 0 3px 10px rgba(101, 146, 135, 0.2);
}

[data-theme="dark"] .btn-muat-ma:hover {
  background: #7aad9e;
}

[data-theme="dark"] .btn-hapus-konteks {
  background: var(--color-bg-panel, #1e293b);
  border-color: #ef4444;
  color: #ef4444;
}

[data-theme="dark"] .btn-hapus-konteks:hover {
  background: #ef4444;
  color: #fff;
}

/* Mobile: allow button text to wrap on small screens */
@media (max-width: 480px) {
  .btn,
  .btn-action,
  .btn-action-success,
  .btn-action-secondary {
    white-space: normal;
    word-break: break-word;
    padding-left: 14px;
    padding-right: 14px;
    font-size: 13px;
  }

  .btn-action,
  .btn-action-success {
    min-height: 52px;
  }

  .btn-muat-ma {
    white-space: normal;
    word-break: break-word;
  }
}

/* ═══════════════════════════════════════════════════
   IMAGE EDITOR — Upload & Warning Banner
   ═══════════════════════════════════════════════════ */

/* Warning banner */
.image-editor-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
}

.image-editor-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
  margin-top: 1px;
}

.image-editor-banner-icon i[data-lucide] {
  color: #d97706;
}

.image-editor-banner-content {
  flex: 1;
  min-width: 0;
}

.image-editor-banner-content strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 6px;
}

.image-editor-banner-content p {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.5;
  color: #78350f;
}

.image-editor-banner-content p:last-child {
  margin-bottom: 0;
}

[data-theme="dark"] .image-editor-banner {
  background: #2a1f0e;
  border-color: #78350f;
  border-left-color: #f59e0b;
}

[data-theme="dark"] .image-editor-banner-content strong {
  color: #fbbf24;
}

[data-theme="dark"] .image-editor-banner-content p {
  color: #fde68a;
}

/* Image section per bab */
.image-section {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--color-bg-section);
  border: 1px solid var(--color-border-panel);
  border-radius: var(--radius-md);
}

.image-section-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.image-section-desc {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Upload section */
.image-upload-section {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--color-bg-panel);
  border: 1.5px dashed var(--color-border-input);
  border-radius: var(--radius-md);
}

.image-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-image-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--color-accent, #659287);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-image-upload:hover {
  background: var(--color-accent-hover, #51746b);
  transform: translateY(-1px);
}

.image-file-preview {
  font-size: 11px;
  color: var(--color-text-muted);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-image-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-image-clear:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.image-upload-hint {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 6px;
  font-family: var(--font-mono);
}

/* Pemisah "atau" */
.image-or-divider {
  display: flex;
  align-items: center;
  margin: 10px 0;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 500;
}

.image-or-divider::before,
.image-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-panel);
}

.image-or-divider span {
  padding: 0 12px;
  color: var(--color-text-muted);
  opacity: 0.6;
}

/* URL input */
.image-input-group {
  margin-bottom: 8px;
}

.image-input-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-label);
  margin-bottom: 4px;
}

.image-url-input {
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  background: var(--color-bg-panel);
  color: var(--color-text-primary);
  transition: border-color 0.15s ease;
  font-family: var(--font-mono);
}

.image-url-input:focus {
  outline: none;
  border-color: var(--color-accent, #659287);
  box-shadow: 0 0 0 2px rgba(101, 146, 135, 0.15);
}

.image-input-hint {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 3px;
}

/* Tombol terapkan */
.image-apply-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-panel);
}

.btn-image-apply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--color-accent, #659287);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(101, 146, 135, 0.25);
}

.btn-image-apply:hover {
  background: var(--color-accent-hover, #51746b);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(101, 146, 135, 0.35);
}

/* Empty state */
.image-editor-empty {
  font-size: 12px;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  padding: 20px;
}

.image-editor-empty code {
  background: var(--color-bg-section);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

/* ═══════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════ */

@media print {
  .floating-sidebar,
  .fab,
  .drawer,
  .drawer-overlay,
  .bottom-sheet,
  .bottom-sheet-overlay,
  .wizard-progress-card,
  .wizard-step-header,
  .wizard-nav,
  .preview-theme-bar {
    display: none !important;
  }

  body.wizard-layout .wizard-preview .page {
    transform: none !important;
    animation: none !important;
    box-shadow: none !important;
    max-width: none !important;
  }
}
