/* ============================================
   MODUL AI — STYLESHEET
   Generator Administrasi Guru Kurikulum Merdeka
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:      #4f46e5;
    --primary-dark: #3730a3;
    --primary-light:#ede9fe;
    --accent:       #7c3aed;
    --success:      #059669;
    --warning:      #d97706;
    --danger:       #dc2626;
    --bg:           #f8fafc;
    --surface:      #ffffff;
    --border:       #e2e8f0;
    --text:         #1e293b;
    --text-muted:   #64748b;
    --text-light:   #94a3b8;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg:    0 8px 32px rgba(79,70,229,.12);
    --font-sans:    'Inter', system-ui, sans-serif;
    --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

/* --- NAVBAR --- */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,.95);
}
.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { font-size: 22px; }
.brand-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}
.nav-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 99px;
    letter-spacing: .3px;
}
.btn-back {
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: background .15s;
}
.btn-back:hover { background: var(--primary-light); }

/* --- ACCENT --- */
.accent { color: var(--primary); }

/* --- HERO --- */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    padding: 64px 24px 72px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; max-width: 680px; margin: 0 auto; }
.hero-label {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 99px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-title .accent { color: #fde68a; }
.hero-subtitle {
    color: rgba(255,255,255,.85);
    font-size: 16px;
    margin-bottom: 28px;
    line-height: 1.7;
}
.hero-features { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.feat-chip {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

/* --- MAIN CONTAINER --- */
.main-container {
    max-width: 900px;
    margin: -24px auto 40px;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* --- ALERT --- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
}
.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.alert-icon { font-size: 18px; flex-shrink: 0; }
.alert a { color: var(--primary); }

/* --- CARDS --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    background: #fafbff;
}
.card-icon { font-size: 24px; flex-shrink: 0; }
.card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.card-desc { font-size: 13px; color: var(--text-muted); }
.card-body { padding: 24px; }

/* --- FORM GRID --- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 640px) {
    .form-grid, .form-grid-4 { grid-template-columns: 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: .2px;
}
.req { color: var(--danger); }
.form-group input,
.form-group select,
.form-group textarea {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.input-hint { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* --- DOC OPTIONS --- */
.doc-group-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 10px;
    padding-left: 2px;
}
.doc-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
@media (max-width: 800px) { .doc-options { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .doc-options { grid-template-columns: 1fr 1fr; } }

.doc-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .18s;
    text-align: center;
    background: var(--surface);
    user-select: none;
}
.doc-option input[type="checkbox"] {
    /* checkbox tetap visible secara fungsional tapi disembunyikan visual */
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}
.doc-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    font-size: 11px;
    font-weight: 700;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    pointer-events: none; /* biarkan klik menembus ke input */
    z-index: 0;
}
.doc-option:hover { border-color: var(--primary); background: var(--primary-light); }
.doc-option:hover .doc-check { border-color: var(--primary); }
.doc-option.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.doc-option.active .doc-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.doc-select-hint {
    display: none;
    font-size: 13px;
    color: #dc2626;
    margin-top: 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
}
.doc-icon { font-size: 28px; }
.doc-label { font-size: 13px; font-weight: 700; color: var(--text); }
.doc-sub { font-size: 11px; color: var(--text-muted); }
.doc-badge {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
    margin-top: 2px;
}

/* --- SUBMIT --- */
.submit-area { text-align: center; margin-top: 8px; }
.btn-generate {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 99px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-display);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(79,70,229,.35);
    transition: transform .15s, box-shadow .15s, opacity .15s;
    letter-spacing: .3px;
}
.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(79,70,229,.45); }
.btn-generate:active { transform: translateY(0); }
.btn-generate:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-icon { font-size: 18px; }
.submit-hint { margin-top: 12px; font-size: 13px; color: var(--text-muted); }

/* --- LOADING OVERLAY --- */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.loading-overlay.active { display: flex; }
.loading-box {
    background: var(--surface);
    border-radius: 20px;
    padding: 40px 48px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,.25);
    max-width: 380px;
    width: 90%;
}
.loading-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.loading-sub { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.loading-dots span {
    display: inline-block;
    animation: blink 1.2s infinite;
    font-size: 20px;
    color: var(--primary);
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }

/* ============================================
   RESULT PAGE
   ============================================ */
body.result-page { background: #f1f5f9; }

.result-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    padding: 32px 24px 28px;
}
.result-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.result-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: #a5f3fc;
    border: 1px solid rgba(255,255,255,.2);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 99px;
    margin-bottom: 10px;
}
.result-title {
    font-family: var(--font-display);
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.result-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: rgba(255,255,255,.75);
    font-size: 13px;
    margin-bottom: 6px;
}
.result-info-row--sm { font-size: 12px; color: rgba(255,255,255,.55); }

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-copy   { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-copy:hover { background: rgba(255,255,255,.25); }
.btn-copy.copied { background: var(--success); border-color: var(--success); }
.btn-print  { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-print:hover { background: rgba(255,255,255,.25); }
.btn-docx   { background: #1d6f42; color: #fff; border: 1px solid #155734; }
.btn-docx:hover { background: #155734; }
.btn-docx:disabled { opacity: .7; cursor: wait; }
.btn-new    { background: #fff; color: var(--primary); }
.btn-new:hover { background: var(--primary-light); }
.docx-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

/* --- TOOLBAR --- */
.result-toolbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    position: sticky;
    top: 60px;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.result-toolbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.view-toggle { display: flex; gap: 4px; }
.view-btn {
    padding: 6px 16px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
    transition: all .15s;
}
.view-btn:hover { border-color: var(--primary); color: var(--primary); }
.view-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.toolbar-hint { font-size: 12px; color: var(--text-light); }

/* --- RESULT CONTAINER --- */
.result-container {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 24px;
}

/* --- MARKDOWN PREVIEW --- */
.doc-preview {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 48px;
}
@media (max-width: 640px) { .doc-preview { padding: 24px 16px; } }

.markdown-body { font-size: 14.5px; line-height: 1.8; color: var(--text); }
.markdown-body h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 36px 0 12px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
}
.markdown-body h1:first-child { margin-top: 0; }
.markdown-body h2 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin: 28px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border);
}
.markdown-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    margin: 20px 0 8px;
}
.markdown-body h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    margin: 16px 0 6px;
}
.markdown-body p { margin-bottom: 12px; }
.markdown-body ul, .markdown-body ol { padding-left: 22px; margin-bottom: 12px; }
.markdown-body li { margin-bottom: 4px; }

/* ── Soal Pilihan Ganda — pastikan A/B/C/D selalu baris baru ── */
/* Nomor soal (ordered list item) */
.markdown-body ol > li {
    margin-bottom: 16px;
    padding-left: 4px;
    line-height: 1.7;
}
/* Pilihan A/B/C/D (unordered list di dalam li soal) */
.markdown-body ol > li > ul {
    list-style: none;
    padding-left: 0;
    margin-top: 6px;
    margin-bottom: 0;
}
.markdown-body ol > li > ul > li {
    padding: 4px 10px 4px 32px;
    position: relative;
    margin-bottom: 4px;
    border-radius: 4px;
    line-height: 1.6;
}
.markdown-body ol > li > ul > li:hover {
    background: #f8faff;
}
/* Deteksi pilihan A. B. C. D. di paragraf dalam list */
.markdown-body ol > li > p + p,
.markdown-body ol > li > br + p {
    margin-top: 4px;
    margin-bottom: 4px;
}
/* Pastikan teks yang diawali A. B. C. D. tidak menempel ke soal */
.markdown-body ol > li {
    white-space: normal;
    word-break: break-word;
}
.markdown-body strong { font-weight: 700; color: var(--text); }
.markdown-body em { font-style: italic; color: var(--text-muted); }
.markdown-body code {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: var(--accent);
}
.markdown-body pre {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 16px;
}
.markdown-body pre code { background: none; border: none; color: inherit; padding: 0; }
.markdown-body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    color: var(--text-muted);
    font-style: italic;
}
.markdown-body hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 32px 0;
}
/* TTD BLOCK — tanda tangan dokumen */
.ttd-wrap {
    margin: 20px 0 16px;
}
.ttd-block {
    display: flex;
    gap: 0;
    margin: 0;
}
.ttd-label-row {
    margin-top: 8px;
}
.ttd-name-row {
    margin-top: 52px; /* ruang tanda tangan */
    margin-bottom: 8px;
}
.ttd-col {
    flex: 1;
    padding: 0 4px;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--text);
}
.ttd-col strong { font-weight: 700; }
.ttd-col u { text-decoration: underline; }
.ttd-nip { font-size: 12px; color: var(--text-muted); }

/* TABLES */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 16px 0 24px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.markdown-body thead tr { background: var(--primary); }
.markdown-body thead th {
    color: #fff;
    font-weight: 700;
    padding: 11px 14px;
    text-align: left;
    font-size: 13px;
    letter-spacing: .2px;
}
.markdown-body tbody tr { border-bottom: 1px solid var(--border); }
.markdown-body tbody tr:nth-child(even) { background: #f8fafc; }
.markdown-body tbody tr:last-child { border-bottom: none; }
.markdown-body tbody td { padding: 10px 14px; vertical-align: top; }

/* --- RAW VIEW --- */
.doc-raw {
    background: #1e293b;
    border-radius: var(--radius);
    border: 1px solid #334155;
    padding: 32px;
    overflow-x: auto;
}
.doc-raw pre {
    color: #e2e8f0;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* --- BOTTOM ACTIONS --- */
.bottom-actions {
    max-width: 1100px;
    margin: 0 auto 16px;
    padding: 0 24px;
    text-align: center;
}
.bottom-actions-inner { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bottom-actions .btn-copy, .bottom-actions .btn-print {
    background: var(--primary);
    color: #fff;
    border: none;
}
.bottom-actions .btn-copy:hover, .bottom-actions .btn-print:hover { background: var(--primary-dark); }
.bottom-actions .btn-docx {
    background: #1d6f42;
    color: #fff;
    border: none;
}
.bottom-actions .btn-docx:hover { background: #155734; }
.bottom-actions .btn-new { background: var(--surface); color: var(--primary); border: 1.5px solid var(--primary); }
.bottom-hint { font-size: 13px; color: var(--text-muted); }

/* --- FOOTER --- */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 20px 24px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 24px;
}
.footer-sub { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* --- GENERATE TP AREA --- */
.generate-tp-area {
    margin-top: 12px;
    background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%);
    border: 1.5px dashed #a78bfa;
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.generate-tp-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.gen-tp-icon {
    font-size: 22px;
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 1px;
}
.gen-tp-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 3px;
}
.gen-tp-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
}
.btn-generate-tp {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-display);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(124,58,237,.3);
    transition: transform .15s, box-shadow .15s, opacity .15s;
    align-self: flex-start;
}
.btn-generate-tp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(124,58,237,.45);
}
.btn-generate-tp:active { transform: translateY(0); }
.btn-generate-tp:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-gen-icon { font-size: 16px; }

/* --- TP PANEL GENERATING STATE --- */
.tp-generating {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
    background: linear-gradient(135deg, #faf5ff, #ede9fe);
    border-radius: var(--radius-sm);
    margin: 8px 0 4px;
}
.tp-gen-spinner {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 4px solid #ddd6fe;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.tp-gen-text {
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.6;
}
.tp-gen-text strong { color: var(--accent); }

/* --- TP SOURCE BADGE --- */
.tp-source-badge {
    padding: 8px 12px 4px;
}
.badge-ai, .badge-db {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
}
.badge-ai {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #fff;
}
.badge-db {
    background: #e0f2fe;
    color: #0369a1;
}

/* --- TP ITEM STYLE (enhanced) --- */
.tp-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .12s;
}
.tp-item:last-child { border-bottom: none; }
.tp-item:hover { background: #f8faff; }
.tp-item input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}
.tp-item-text {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.55;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}
.tp-item-body { color: var(--text); }
.tp-item-jp {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 8px;
    border-radius: 99px;
    white-space: nowrap;
}

/* --- TP PANEL HEADER (update) --- */
.tp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 10px;
    background: #f8faff;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    flex-wrap: wrap;
}
.tp-panel-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}
.tp-panel-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tp-action-btn {
    padding: 5px 12px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .14s;
    white-space: nowrap;
}
.tp-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
/* Generate ulang btn — lebih menonjol */
#btnGenerateTpAgain {
    border-color: var(--accent);
    color: var(--accent);
}
#btnGenerateTpAgain:hover {
    background: #faf5ff;
    border-color: var(--accent);
    color: var(--accent);
}

/* --- APPLY TP BUTTON --- */
.btn-apply-tp {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.btn-apply-tp:hover:not(:disabled) { background: var(--primary-dark); }
.btn-apply-tp:disabled { opacity: .5; cursor: not-allowed; }
.btn-apply-tp.applied { background: var(--success); }

/* --- PRINT STYLES --- */
@media print {
    .navbar, .hero, .result-header, .result-toolbar,
    .result-actions, .bottom-actions, .footer,
    #btnCopy, #btnRaw, .view-toggle { display: none !important; }
    body { background: #fff; font-size: 12px; }
    .result-container { max-width: 100%; margin: 0; padding: 0; }
    .doc-preview { border: none; box-shadow: none; padding: 0; }
    .markdown-body h1 { font-size: 18px; }
    .markdown-body h2 { font-size: 15px; }
    .markdown-body table { font-size: 11px; }
    .markdown-body thead tr { background: #4f46e5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ============================================
   CP/TP PICKER — Dropdown Database
   ============================================ */

/* Badge status DB di card-header */
.card-header { flex-wrap: wrap; }
.card-badge-db {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
}
.card-badge-db--off {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde68a;
}

/* Panel picker */
.cp-picker {
    background: linear-gradient(135deg, #f0f4ff 0%, #f5f3ff 100%);
    border: 1.5px solid #c7d2fe;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 4px;
}
.cp-picker-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.cp-picker-icon { font-size: 16px; }
.cp-picker-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}
.cp-picker-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.cp-picker-select {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.cp-picker-select label {
    font-size: 12px !important;
}

/* Loading spinner kecil di bawah select */
.select-loading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.spinner-xs {
    width: 12px;
    height: 12px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

/* Tombol "Isi CP & TP" */
.btn-load-cp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .12s, opacity .15s;
    white-space: nowrap;
    height: 40px;
    flex-shrink: 0;
}
.btn-load-cp:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.btn-load-cp:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-load-icon { font-size: 15px; }

/* Status bar */
.cp-picker-status {
    display: none;
    margin-top: 10px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
}
.cp-picker-status--success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.cp-picker-status--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.cp-picker-status--warning {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
}

/* Divider "atau ketik manual" */
.cp-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.cp-divider::before,
.cp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Alert danger (error session) */
.alert-danger {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    position: relative;
}
.alert-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #991b1b;
    line-height: 1;
    padding: 4px;
}
.error-list {
    margin: 6px 0 0 16px;
    padding: 0;
}
.error-list li { margin-bottom: 2px; }

/* Tombol Download .md */
.btn-download {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
}
.btn-download:hover { background: rgba(255,255,255,.25); }

/* Char counter */
.char-counter {
    color: var(--text-light);
    font-size: 11px;
    font-weight: 500;
}

@media (max-width: 640px) {
    .cp-picker-row { flex-direction: column; }
    .btn-load-cp { width: 100%; justify-content: center; }
}

/* ============================================
   TP CHECKLIST PANEL
   ============================================ */
.tp-panel {
    background: #fafbff;
    border: 1.5px solid #c7d2fe;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 4px;
}

.tp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    border-bottom: 1px solid #c7d2fe;
    flex-wrap: wrap;
    gap: 8px;
}
.tp-panel-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
}
.tp-panel-actions {
    display: flex;
    gap: 6px;
}
.tp-action-btn {
    padding: 4px 12px;
    border-radius: 99px;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.tp-action-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Daftar item TP */
.tp-checklist {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
}
.tp-checklist::-webkit-scrollbar { width: 5px; }
.tp-checklist::-webkit-scrollbar-track { background: #f1f5f9; }
.tp-checklist::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 99px; }

.tp-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.tp-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.tp-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}
.tp-item:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}
.tp-item-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text);
}

/* Footer panel */
.tp-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #c7d2fe;
    background: #f0f4ff;
    flex-wrap: wrap;
    gap: 8px;
}
.tp-selected-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-dark);
}
.btn-apply-tp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .12s;
}
.btn-apply-tp:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.btn-apply-tp:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-apply-tp.applied  { background: var(--success); }

/* Loading state di status bar */
.cp-picker-status--loading {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: center;
}

/* ============================================
   AUTH — LOGIN PAGE
   ============================================ */
body.login-page {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
body.login-page .footer {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.4);
    margin-top: 24px;
}

.login-wrap {
    width: 100%;
    max-width: 420px;
}
.login-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    text-align: center;
}
.login-logo { margin-bottom: 24px; }
.login-logo-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.login-logo-text {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
}
.login-logo-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.login-tagline {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
    padding: 14px 16px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
}
.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 20px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 99px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: box-shadow .15s, border-color .15s, transform .12s;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.btn-google-login:hover {
    border-color: #4285F4;
    box-shadow: 0 4px 16px rgba(66,133,244,.25);
    transform: translateY(-1px);
}
.google-icon { flex-shrink: 0; }
.login-divider {
    margin: 20px 0;
    font-size: 12px;
    color: var(--text-light);
}
.login-features {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.login-feat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 5px 10px;
    border-radius: 99px;
    border: 1px solid var(--border);
}
.login-feat-icon { font-size: 14px; }
.login-note {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   NAVBAR — User Info
   ============================================ */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-badge-gemini {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    letter-spacing: .3px;
    white-space: nowrap;
}
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}
.nav-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-logout {
    font-size: 12px;
    font-weight: 600;
    color: var(--danger);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #fecaca;
    transition: background .15s;
}
.nav-logout:hover { background: #fee2e2; }
.nav-setup-link {
    font-size: 16px;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: background .15s;
}
.nav-setup-link:hover { background: var(--primary-light); }

@media (max-width: 560px) {
    .nav-user-name, .nav-badge-gemini { display: none; }
}

/* ============================================
   SETUP PAGE
   ============================================ */
.setup-header {
    text-align: center;
    padding: 32px 0 24px;
}
.setup-icon { font-size: 48px; margin-bottom: 12px; }
.setup-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}
.setup-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
}

/* Alert success */
.alert-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* API Key input dengan tombol toggle */
.api-key-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.api-key-input-wrap input {
    padding-right: 44px !important;
}
.btn-toggle-key {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    line-height: 1;
}

/* Setup steps */
.setup-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.setup-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.6;
}
.step-num {
    width: 26px;
    height: 26px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.setup-note {
    margin-top: 16px;
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
}
.remove-key-link {
    color: var(--danger);
    font-size: 12px;
    text-decoration: none;
}
.remove-key-link:hover { text-decoration: underline; }

/* ============================================
   SETUP PAGE — REDESIGN
   ============================================ */
body.setup-body { background: var(--bg); }

.setup-main {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px 16px 60px;
}

/* Hero */
.setup-hero { text-align: center; margin-bottom: 32px; }
.setup-hero-icon { font-size: 48px; margin-bottom: 12px; }
.setup-hero-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}
.setup-hero-sub { font-size: 15px; color: var(--text-muted); }

/* Steps visual */
.setup-steps-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.setup-step-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
    transition: border-color .2s;
}
.setup-step-card--active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}
.setup-step-card.done {
    border-color: #22c55e;
    background: #f0fdf4;
}
.setup-step-num {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.setup-step-card.done .setup-step-num { background: #22c55e; }
.setup-step-body { flex: 1; }
.setup-step-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.setup-step-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.setup-step-check {
    display: none;
    width: 24px;
    height: 24px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Tombol ke Google AI Studio */
.btn-goto-studio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: box-shadow .15s, border-color .15s, transform .12s;
}
.btn-goto-studio:hover {
    border-color: #4285F4;
    box-shadow: 0 4px 16px rgba(66,133,244,.2);
    transform: translateY(-1px);
}

/* Mock preview tombol AI Studio */
.setup-step-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12px;
    flex-wrap: wrap;
}
.mock-button {
    background: var(--primary);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.mock-arrow { color: var(--text-muted); font-size: 14px; }
.mock-key {
    font-family: monospace;
    font-size: 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 4px;
}
.mock-dots { color: var(--text-light); }
.mock-copy {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: default;
    color: var(--text-muted);
}

/* API Key input field */
.apikey-field { margin-bottom: 14px; }
.apikey-input-wrap {
    display: flex;
    align-items: center;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}
.apikey-prefix {
    padding: 10px 10px 10px 14px;
    font-family: monospace;
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
    background: var(--primary-light);
    border-right: 2px solid var(--primary);
    white-space: nowrap;
}
.apikey-input-wrap input {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 8px !important;
    font-size: 13px;
    outline: none !important;
    box-shadow: none !important;
    font-family: monospace;
}
.apikey-paste-btn {
    padding: 8px 14px;
    background: var(--primary-light);
    border: none;
    border-left: 2px solid var(--primary);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.apikey-paste-btn:hover { background: #ddd6fe; }
.apikey-full-preview {
    margin-top: 6px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Tombol aktivasi */
.btn-activate {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #e2e8f0;
    color: #94a3b8;
    transition: all .2s;
}
.btn-activate.ready {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(99,102,241,.35);
    transform: none;
}
.btn-activate.ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99,102,241,.4);
}
.btn-activate:disabled { cursor: not-allowed; transform: none !important; }

/* Security note */
.setup-security-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 20px;
    line-height: 1.8;
}

/* Success state */
.setup-success-wrap {
    text-align: center;
    padding: 48px 0;
}
.setup-success-icon { font-size: 64px; margin-bottom: 16px; }
.setup-success-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}
.setup-success-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* apikey-input-simple — tanpa prefix, full width */
.apikey-input-simple {
    display: flex;
    align-items: center;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
    margin-bottom: 8px;
}
.apikey-input-simple input {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    padding: 11px 14px !important;
    font-size: 13px;
    outline: none !important;
    box-shadow: none !important;
}
.apikey-input-simple .apikey-paste-btn {
    padding: 9px 14px;
    background: var(--primary-light);
    border: none;
    border-left: 2px solid var(--primary);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}
.apikey-input-simple .apikey-paste-btn:hover { background: #ddd6fe; }
