/* aplikasi/tujuan-pembelajaran-kemenag/app.css — Admin Guru | v3.0 Wizard | 2026-07-10 */
@import url('../../shared/wizard.css');
@import url('../../shared/form-base.css');
@import url('../../shared/dokumen-list.css');
@import url('../../shared/components.css');

/* ===== HEADER OVERRIDE (wizard-layout) ===== */
body.wizard-layout .app-header[data-shared-header="v1"] { height: 44px; padding: 0 16px; }
body.wizard-layout .app-header[data-shared-header="v1"] .header-actions { display: none !important; }

/* ===== BOBOT SELECT ===== */
.bobot-select {
    width: 140px;
    padding: 7px 10px;
    font-size: 13px;
    font-family: var(--font-ui);
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-md);
    background: var(--color-bg-panel);
    color: var(--color-text-primary);
    cursor: pointer;
    appearance: auto;
    transition: border-color var(--transition-fast);
}

.bobot-select:hover {
    border-color: var(--color-accent);
}

.bobot-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-light);
}

/* ===== BOBOT BANNER ===== */
.bobot-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--color-info-bg, #e8f4fd);
    border: 1px solid var(--color-info-border, #b3d4f7);
    border-left: 5px solid var(--color-info, #2196f3);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.bobot-banner-icon {
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
    color: var(--color-info, #2196f3);
}

.bobot-banner-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-primary);
    line-height: 1.6;
}

.bobot-banner-content strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.bobot-banner-levels {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 4px 0;
}

.bobot-level {
    font-size: 12px;
    color: var(--color-text-secondary);
    padding: 4px 8px;
    background: var(--color-bg-hover, rgba(33, 150, 243, 0.08));
    border-radius: var(--radius-sm);
}

.bobot-banner-note {
    font-size: 11px;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .bobot-banner {
        padding: 12px 14px;
        gap: 10px;
    }
    .bobot-banner-content { font-size: 12px; }
}

/* ===== REKOMENDASI CARD ===== */
.rekomendasi-card {
    background: var(--color-success-bg, #f0fdf4);
    border: 1px solid var(--color-success-border, #86efac);
    border-left: 5px solid var(--color-success, #22c55e);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.rekomendasi-card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rekomendasi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.rekomendasi-table th,
.rekomendasi-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-panel);
}

.rekomendasi-table th {
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg-section);
}

.bobot-badge-1,
.bobot-badge-2,
.bobot-badge-3 {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    min-width: 60px;
}

.bobot-badge-1 { background: #e8f5e9; color: #2e7d32; }
.bobot-badge-2 { background: #fff8e1; color: #f57f17; }
.bobot-badge-3 { background: #fbe9e7; color: #c62828; }

[data-theme="dark"] .bobot-badge-1 { background: rgba(46,125,50,0.2); color: #66bb6a; }
[data-theme="dark"] .bobot-badge-2 { background: rgba(245,127,23,0.2); color: #ffb74d; }
[data-theme="dark"] .bobot-badge-3 { background: rgba(198,40,40,0.2); color: #ef5350; }
[data-theme="dark"] .bobot-banner { background: rgba(33,150,243,0.1); border-color: rgba(33,150,243,0.2); }
[data-theme="dark"] .rekomendasi-card { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.2); }

/* ===== BUTTONS ===== */
.btn {
    font-family: var(--font-ui);
    font-size: 13px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

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

.btn-generate {
    background: var(--color-btn-primary);
    color: var(--color-btn-primary-txt);
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    margin-top: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-generate:hover {
    background: var(--color-btn-primary-hv);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-render {
    background: var(--color-btn-success);
    color: var(--color-btn-success-txt);
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    margin-top: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-render:hover {
    background: var(--color-btn-success-hv);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-render-dokumen {
    width: 100%;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-top: 12px;
    background: var(--color-btn-success);
    color: var(--color-btn-success-txt);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-render-dokumen:hover {
    background: var(--color-btn-success-hv);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-add {
    background: var(--color-btn-secondary);
    color: var(--color-btn-secondary-txt);
    border: none;
    padding: 12px 16px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add:hover {
    background: var(--color-btn-secondary-hv);
    transform: translateY(-1px);
}

.btn-muat-elemen {
    background: var(--color-btn-primary);
    color: var(--color-btn-primary-txt);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-ui);
}

.btn-muat-elemen:hover {
    background: var(--color-btn-primary-hv);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-hapus {
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--color-btn-danger);
    color: var(--color-btn-danger);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    font-size: 12px;
    font-family: var(--font-ui);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 1px;
}

.btn-hapus:hover {
    background: var(--color-btn-danger);
    color: var(--color-btn-danger-txt);
}

.btn-hapus-konteks {
    background: var(--color-btn-danger);
    color: var(--color-btn-danger-txt);
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
    min-width: 80px;
    justify-content: center;
}

.btn-hapus-konteks:hover {
    background: var(--color-btn-danger-hv);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.btn-wrapper {
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px dashed var(--color-border-panel);
}

/* ===== GENERATE ROW & PROMPT STATUS ===== */
.generate-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prompt-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border-panel);
    background: var(--color-bg-section);
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1;
    min-height: 30px;
    min-width: 160px;
    box-sizing: border-box;
}

.prompt-status:empty { display: none; }

.prompt-status.is-loading {
    background: var(--color-warning-bg);
    border-color: var(--color-warning-border);
    color: var(--color-warning-text);
}

.prompt-status.is-success {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success-text);
}

.prompt-status.is-error {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error-text);
}

/* ===== KONTEKS STATUS ===== */
.konteks-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-top: 8px;
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    border-radius: var(--radius-md);
    min-height: 40px;
}

.konteks-status-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-success-text);
    flex: 1;
}

@media (max-width: 768px) {
    .konteks-status { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 10px; }
    .konteks-status-text { justify-content: center; text-align: center; }
    .btn-hapus-konteks { width: 100%; min-width: 0; padding: 8px 12px; }
}

/* ===== ELEMEN LIST ===== */
.elemen-list {
    margin-top: 12px;
    padding: 10px;
    background: var(--color-bg-section);
    border: 1px solid var(--color-border-panel);
    border-radius: var(--radius-md);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 13px;
}

.elemen-list:not(:empty) {
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
}

.elemen-item {
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border-panel);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--color-text-primary);
    font-size: 13px;
    text-align: justify;
    margin-bottom: 5px;
}

.elemen-nomor {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: var(--color-accent);
    color: var(--color-btn-primary-txt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

.elemen-text { flex: 1; line-height: 1.6; padding: 0 4px; }

.elemen-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.elemen-desc {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* ===== TP ROW (JUMLAH TP PER ELEMEN) ===== */
.tp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-panel);
    font-size: 14px;
}

.tp-row:last-of-type { border-bottom: none; }

.tp-label {
    flex: 1;
    color: var(--color-text-primary);
    font-size: 14px;
    line-height: 1.4;
}

.tp-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tp-input-group input {
    width: 60px;
    text-align: center;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-md);
    background: var(--color-bg-panel);
    color: var(--color-text-primary);
}

.tp-satuan {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.tp-total {
    text-align: center;
    margin-top: 12px;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-bg-section);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-panel);
}

.tp-empty-msg {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 14px;
    margin: 20px 0;
    line-height: 1.6;
}

/* ===== TP TIPS BANNER ===== */
.tp-tips-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--color-warning-bg, #fff8e1);
    border: 1px solid var(--color-warning-border, #ffcc02);
    border-left: 5px solid var(--color-warning, #f59e0b);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.tp-tips-banner-icon {
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
    color: var(--color-warning, #f59e0b);
}

.tp-tips-banner-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-primary);
    line-height: 1.6;
}

.tp-tips-banner-content strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.tp-tips-banner-content .tp-tips-highlight {
    background: var(--color-bg-hover, rgba(245, 158, 11, 0.15));
    border-radius: 6px;
    padding: 10px 14px;
    font-weight: 600;
    border: 1px dashed var(--color-warning, #f59e0b);
}

.tp-tips-banner-content .tp-tips-rekomendasi {
    font-size: 12px;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .tp-tips-banner {
        padding: 12px 14px;
        gap: 10px;
    }
    .tp-tips-banner-icon { font-size: 20px; }
    .tp-tips-banner-content { font-size: 12px; }
    .tp-tips-banner-content .tp-tips-highlight { padding: 8px 12px; font-size: 12px; }
}

/* ===== MUAT ELEMEN CONTROLS ===== */
.muat-elemen-group { margin-bottom: 16px; }
.elemen-input-group { margin-bottom: 16px; }

.muat-elemen-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.muat-elemen-controls select {
    flex: 1;
    height: 40px;
}

.muat-elemen-controls .btn-muat-elemen {
    width: auto;
    min-width: 96px;
    height: 40px;
}

@media (max-width: 768px) {
    .muat-elemen-controls { flex-direction: column; align-items: stretch; }
    .muat-elemen-controls .btn-muat-elemen { width: 100%; min-width: 0; height: auto; }
}

/* ===== INPUT WITH ICON ===== */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input[type="text"] {
    width: 100%;
    padding-right: 44px;
}

.btn-icon-add {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.btn-icon-add:hover {
    background: var(--color-bg-section);
    color: var(--color-accent);
    transform: scale(1.1);
}

.btn-icon-add:active { transform: scale(0.95); }

/* ===== DROPDOWN CUSTOM ARROW ===== */
#jp-per-minggu,
#total-minggu-efektif {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 36px;
}

/* ===== FORM SECTION GROUP ===== */
.form-section-group {
    margin-bottom: 8px;
    border: 1px solid var(--color-border-panel);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-section);
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
}

.form-section-group:last-child { margin-bottom: 0; }

.form-section-group .section-header {
    background: var(--color-bg-section);
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border-panel);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition-fast);
}

.form-section-group .section-header:hover { background: var(--color-bg-hover); }

.form-section-group .section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.form-section-group .section-title::before { display: none; }

.form-section-group .section-body { padding: 8px 12px; }

/* ===== TOGGLE ICON ===== */
.toggle-icon {
    font-size: 14px;
    color: var(--color-text-muted);
    transition: transform var(--transition-normal);
}

/* ===== TAB GRUP DIVIDER ===== */
.tab-grup-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.tab-grup-divider--top { margin-top: 0; }

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

/* ===== FIELD BADGES ===== */
.field-required { color: var(--color-accent); font-weight: 700; font-size: 14px; }

.field-optional {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-bg-section);
    border: 1px solid var(--color-border-panel);
    border-radius: var(--radius-sm);
    padding: 1px 6px;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 4px;
}

.form-section-opsional {
    border: 1px dashed var(--color-border-panel) !important;
    background: transparent !important;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.form-section-opsional:hover { opacity: 1; }

.form-legend {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 12px;
    margin-bottom: 0;
    font-style: italic;
}

/* ===== TTD TOGGLE CARD ===== */
.ttd-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border-panel);
    border-radius: var(--radius-md);
    margin-bottom: 4px;
}

.ttd-toggle-info { display: flex; flex-direction: column; gap: 2px; }
.ttd-toggle-label { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
.ttd-toggle-desc { font-size: 11px; color: var(--color-text-muted); line-height: 1.3; }

/* ===== TEXTAREA RENDER ===== */
.textarea-render {
    min-height: 200px !important;
    resize: vertical;
    font-family: var(--font-mono) !important;
    font-size: 12px !important;
    line-height: 1.5;
}

/* ===== DOKUMEN KOSONG EXTENDED ===== */
.dokumen-kosong-icon { font-size: 32px; opacity: 0.4; margin-bottom: 4px; }
.dokumen-kosong-hint {
    font-size: 11px;
    color: var(--color-text-muted);
    font-style: italic;
    line-height: 1.4;
    max-width: 220px;
}

/* ===== READONLY FIELDS ===== */
select[readonly], input[readonly] {
    background-color: var(--color-bg-section);
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════
   PREVIEW OPTIMIZATION — Wizard Preview A4
   ═══════════════════════════════════════════════════ */

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

body.wizard-layout .wizard-preview #document-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

body.wizard-layout .wizard-preview .page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 4px 28px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  animation: docRenderIn 0.3s ease-out;
}

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

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

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

/* ── Render Loading Overlay ── */
.render-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10;
  border-radius: var(--radius-lg, 12px);
  transition: opacity 0.25s ease;
}

[data-theme="dark"] .render-loading-overlay {
  background: rgba(15, 23, 42, 0.85);
}

.render-loading-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted, #64748b);
  text-align: center;
}

/* ═══════════════════════════════════════════════════
   CARD STEPPER — 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);
}

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

.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;
}

.wiz-id-ttd-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.wiz-id-ttd-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.wiz-id-ttd-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  user-select: none;
}

.wiz-id-ttd-hint-text {
  font-size: 9px;
  color: var(--color-text-muted, #94a3b8);
  white-space: nowrap;
  line-height: 1;
  background: var(--color-accent-light, #E6F2DD);
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--color-accent, #659287) 20%, transparent);
}

[data-theme="dark"] .wiz-id-ttd-hint-text {
  background: rgba(101, 146, 135, 0.1);
  border-color: rgba(101, 146, 135, 0.2);
}

.wiz-id-date {
  padding: 3px 6px;
  font-size: 10px;
  border: 1px solid var(--color-border-panel, #e2e8f0);
  border-radius: 5px;
  background: var(--color-bg-input, #ffffff);
  color: var(--color-text-primary, #0f172a);
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  width: 112px;
  height: 26px;
}

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

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

.toggle-switch-sm {
  width: 32px;
  height: 18px;
}

.toggle-switch-sm .toggle-slider::before {
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
}

.toggle-switch-sm input:checked + .toggle-slider::before {
  transform: translateX(14px);
}

.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;
}

[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);
}

@media (max-width: 600px) {
  .wizard-progress-card {
    padding: 10px 12px;
    border-radius: 10px;
  }
  .wizard-progress-card-title { font-size: 12px; }
  .wizard-progress-card-badge { font-size: 11px; min-width: 34px; padding: 2px 8px; }
  .wizard-progress-card-step { font-size: 11px; padding: 4px 8px; }
  .wizard-progress-card-identity { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wiz-id-ttd-controls { margin-left: 0; width: 100%; justify-content: flex-end; }
  .wiz-id-item { max-width: 160px; }
}

@media print {
  .wizard-progress-card { display: none !important; }
}

/* ===== PREVIEW THEME BAR ===== */
.preview-theme-bar { display:flex; align-items:center; gap:10px; padding:8px 14px; margin-bottom:12px; background:var(--color-bg-panel); border:1px solid var(--color-border-panel); border-radius:8px; }
.preview-theme-label { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:500; color:var(--color-text-secondary); white-space:nowrap; }
.preview-theme-bar .theme-select { flex:1; }
@media print { .preview-theme-bar { display:none !important; } }

/* ═══════════════════════════════════════════════════
   FLOATING SIDEBAR
   ═══════════════════════════════════════════════════ */

.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:active {
  transform: scale(0.95);
}

.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-btn-primary:active {
  transform: scale(0.95);
}

.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 — Dokumen Tersimpan
   ═══════════════════════════════════════════════════ */

.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 — Floating Action Button (mobile)
   ═══════════════════════════════════════════════════ */

.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 (mobile)
   ═══════════════════════════════════════════════════ */

.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); }
}

/* ===== COPY PROMPT BUTTON (standalone) ===== */
.btn-copy {
  background: var(--color-accent, #659287);
  color: #fff;
  border: none;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-md);
  letter-spacing: 0.02em;
}

.btn-copy:hover {
  background: var(--color-accent-hover, #51746b);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-copy.copy-sukses {
  background: var(--color-btn-neutral, #e2e8f0) !important;
  color: var(--color-btn-neutral-txt, #475569) !important;
}

/* ===== MATERI BUKU PAKET (collapsible) ===== */
.materi-buku-paket-body textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: var(--font-ui);
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-md);
    background: var(--color-bg-panel);
    color: var(--color-text-primary);
    resize: vertical;
    line-height: 1.5;
}

/* ===== DARK MODE OVERRIDES ===== */
[data-theme="dark"] .ttd-toggle-card { background: var(--color-bg-section); }
[data-theme="dark"] .konteks-status {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
}
[data-theme="dark"] .konteks-status-text { color: var(--color-success-text); }

[data-theme="dark"] .materi-buku-paket {
    background: var(--color-bg-section);
    border-color: var(--color-border-panel);
}

/* ===== RESPONSIVE SIDEBAR/DRAWER/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;
  }
}

[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"] .drawer {
  background: var(--color-bg-panel, #111827);
}

[data-theme="dark"] .drawer-header {
  border-bottom-color: var(--color-border-panel, #1f2937);
}

[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));
}

/* ===== PRINT STYLES ===== */
@media print {
    @page { size: A4 portrait; margin: 0mm; }

    html { height: auto !important; min-height: 0 !important; }

    body {
        height: auto !important;
        min-height: 0 !important;
        display: block !important;
        flex-direction: unset !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body { background: white !important; margin: 0 !important; padding: 0 !important; }

    .app-header, .wizard-container,
    .floating-sidebar, .fab, .drawer, .drawer-overlay,
    .bottom-sheet, .bottom-sheet-overlay {
        display: none !important;
    }

    .page {
        width: 210mm !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: white !important;
        border: none !important;
        outline: none !important;
    }

    .doc-footer { page-break-before: avoid !important; page-break-after: avoid !important; }
    .section-title { page-break-after: avoid !important; page-break-inside: avoid !important; }
    table.main, table.fase, table.ppp { page-break-before: avoid !important; }
    table { page-break-inside: auto !important; }
    tr { page-break-inside: avoid !important; page-break-after: auto !important; }
    thead { display: table-header-group !important; }
    html, body { height: auto !important; overflow: visible !important; }
}

/* ═══════════════════════════════════════════════════
   KEMENAG — Skema Warna Sage & Cream
   Halaman:    #778873 (sage)
   Container:  #A1BC98 (sage medium)
   Card:       #DCCFC0 (cream)
   ═══════════════════════════════════════════════════ */

/* 1. Page background → sage */
body.wizard-layout {
  background: #778873;
}

/* 2. Container background → sage medium */
.wizard-content {
  background: #A1BC98;
  border-color: #DCCFC0;
  --ink-faint: #1e293b;
  --color-text-muted: #1e293b;
}

/* 3. Form section card → cream hangat */
.form-section {
  background: #DCCFC0;
  border: none;
  --ink-faint: #1e293b;
  --color-text-muted: #1e293b;
}

/* 4. Section header accent bar → sage tua */
.section-title::before {
  background: #6a8d62;
}

/* 5. Warna teks judul section → forest dark */
.section-title {
  color: #2d4a2a;
}

/* 6. Warna hover section title */
.section-header:hover .section-title {
  color: #1a3418;
}

/* 7. Info banner — light cream kontras dengan section */
.info-banner--compact {
  background: #e8e0d4;
  border-left-color: #8aa87e;
}

/* 8. Elemen list putih dengan border sage soft */
.elemen-list {
  background: #ffffff;
  border-color: #c5d8c8;
}

/* ═══════════════════════════════════════
   DARK MODE — Sage Gelap
   ═══════════════════════════════════════ */

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

[data-theme="dark"] .wizard-content {
  background: #2a3a28;
  border-color: #3a4a38;
}

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

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

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

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

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

[data-theme="dark"] .elemen-list {
  background: #1a2318;
  border-color: #2a4030;
}

