/**
 * assets/css/paper-view.css
 * =========================================================================
 * RENATA MASTER EXECUTIVE ACADEMIC DOCUMENT VIEWER & SYNTHESIS STYLESHEET
 * =========================================================================
 * Standar Publikasi & Akademik Resmi:
 *  1. JURNAL / ARTIKEL ILMIAH (IMRaD Standard - SINTA 1-2 & Scopus Layout)
 *  2. PROPOSAL PENELITIAN SKRIPSI (Format Baku Pedoman UKMC Palembang)
 *  3. SKRIPSI LENGKAP BAB I–V (Format Sidang Komprehensif & Tim Penguji)
 *
 * Fitur Tampilan:
 *  - 3 Tema Kertas: Putih Cetak Baku, Sepia Eye-Care Nyaman, Dark Slate Canvas
 *  - 3 Mode View: Lembar A4 (Page), Gulir Mengalir (Stream), & Jurnal 2-Kolom (IMRaD)
 *  - Toolbar Navigasi Eksekutif Lengkap (Jump Bab, Theme, Zoom/Font Size)
 *  - Tabel Akademik APA 7th Edition (3 Garis Horizontal)
 *  - Running Header & Running Footer Otentik per Halaman
 *  - Live AI Synthesis Studio Card dengan Metrik Realtime
 * =========================================================================
 */

/* =========================================================================
   1. WORKSPACE CANVAS & BACKGROUND THEMES
   ========================================================================= */
.paper-wrap {
    position: relative;
    background: #eef2f6 !important;
    background-image:
        radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.04) 0px, transparent 50%) !important;
    border-radius: 24px;
    padding: 36px 20px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 520px;
    box-sizing: border-box;
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* Tema Kertas: Sepia Eye-Care (Nyaman di Mata untuk Baca Naskah Panjang) */
body.paper-theme-sepia .paper-wrap {
    background: #ede6d6 !important;
    background-image: radial-gradient(at 50% 0%, rgba(180, 140, 90, 0.08) 0px, transparent 60%) !important;
}
body.paper-theme-sepia .word-page {
    background: #fbf8f1 !important;
    color: #26211c !important;
    box-shadow: 0 4px 6px -1px rgba(68,54,38,0.06), 0 20px 45px -4px rgba(68,54,38,0.12), 0 0 0 1px rgba(180,160,130,0.2) !important;
}
body.paper-theme-sepia .word-page * {
    color: #26211c !important;
}
body.paper-theme-sepia .word-page-running-head,
body.paper-theme-sepia .word-page-footer {
    color: #786c5e !important;
    border-color: rgba(120, 108, 94, 0.25) !important;
}
body.paper-theme-sepia .journal-abstract-card {
    background: #f3ecd9 !important;
    border-color: #d8cbb5 !important;
}
body.paper-theme-sepia .journal-timeline-badge {
    background: #f3ecd9 !important;
    border-color: #d8cbb5 !important;
    color: #5c4f3d !important;
}

/* Tema Kertas: Dark Slate Executive (Mode Malam Nyaman) */
body.dark-paper-mode .paper-wrap,
[data-theme="dark"] .paper-wrap {
    background: #080c14 !important;
    background-image:
        radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 27, 75, 0.2) 0px, transparent 50%) !important;
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
body.dark-paper-mode .word-page,
[data-theme="dark"] body.dark-paper-mode .word-page {
    background: #182030 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6), 0 0 0 1.5px rgba(124,58,237,0.3) !important;
}
body.dark-paper-mode .word-page *,
[data-theme="dark"] body.dark-paper-mode .word-page * {
    color: #f1f5f9 !important;
}
body.dark-paper-mode .word-page-running-head,
body.dark-paper-mode .word-page-footer,
[data-theme="dark"] body.dark-paper-mode .word-page-running-head,
[data-theme="dark"] body.dark-paper-mode .word-page-footer {
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}
body.dark-paper-mode .journal-abstract-card,
[data-theme="dark"] body.dark-paper-mode .journal-abstract-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}
body.dark-paper-mode .journal-timeline-badge,
[data-theme="dark"] body.dark-paper-mode .journal-timeline-badge {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
body.dark-paper-mode .word-page-content table th {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-bottom-color: #475569 !important;
}
body.dark-paper-mode .word-page-content table td {
    border-bottom-color: #334155 !important;
}

/* =========================================================================
   2. LEMBAR KERTAS A4 BAKU (210mm x 297mm) DENGAN MARGIN AKADEMIK
   ========================================================================= */
.word-pages-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    margin: 0 auto;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top center;
}

/* Mode Naskah Mengalir (Continuous Stream): Halaman menyatu mulus */
.word-pages-container.mode-continuous-stream {
    gap: 16px;
}
.word-pages-container.mode-continuous-stream .word-page {
    margin-bottom: 0;
    min-height: auto;
}
.word-page-divider-stream {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 21cm;
    margin: 14px auto;
    color: #94a3b8;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.word-page-divider-stream::before,
.word-page-divider-stream::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1 50%, transparent);
}
[data-theme="dark"] .word-page-divider-stream::before,
[data-theme="dark"] .word-page-divider-stream::after {
    background: linear-gradient(90deg, transparent, #334155 50%, transparent);
}

.word-page {
    background: #ffffff;
    width: 21cm;
    max-width: 100%;
    min-height: 29.7cm;
    box-sizing: border-box;
    padding: 3.5cm 3cm 3cm 3.5cm; /* Standar Margin UKMC: Kiri 3.5cm, Atas 3.5cm, Kanan 3cm, Bawah 3cm */
    border-radius: 4px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.02),
        0 12px 36px -4px rgba(15,23,42,0.12),
        0 28px 64px -8px rgba(15,23,42,0.08),
        0 0 0 1px rgba(15,23,42,0.05);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.word-page:hover {
    box-shadow:
        0 4px 10px rgba(0,0,0,0.04),
        0 20px 50px -4px rgba(15,23,42,0.16),
        0 36px 80px -8px rgba(124,58,237,0.1),
        0 0 0 1px rgba(124,58,237,0.2);
}

/* Hardcover Preview Style untuk Sampul Depan Skripsi */
.word-page.hardcover-preview {
    background: linear-gradient(135deg, #090c15 0%, #111927 60%, #1e1b4b 100%) !important;
    color: #fbbf24 !important;
    border: 2px solid #d97706 !important;
    box-shadow:
        0 16px 45px rgba(0,0,0,0.4),
        0 0 30px rgba(245,158,11,0.2),
        inset 0 0 0 3px rgba(245,158,11,0.3) !important;
}
.word-page.hardcover-preview * {
    color: #fef08a !important;
}
.word-page.hardcover-preview h1,
.word-page.hardcover-preview .doc-cover-title {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 15px rgba(245,158,11,0.4);
}

/* Running Academic Header (Kop Lembar Atas) */
.word-page-running-head {
    position: absolute;
    top: 1.4cm;
    left: 3.5cm;
    right: 3cm;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 8pt;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 0.75pt solid #cbd5e1;
    padding-bottom: 4pt;
    pointer-events: none;
}
.word-page-running-head span:last-child {
    color: #7c3aed;
}

/* Running Academic Footer (Nomor Halaman Bawah) */
.word-page-footer {
    position: absolute;
    bottom: 1.5cm;
    left: 3.5cm;
    right: 3cm;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Times New Roman', Times, serif;
    font-size: 10pt;
    color: #475569;
    border-top: 0.5pt solid rgba(203, 213, 225, 0.6);
    padding-top: 6pt;
    pointer-events: none;
}
.word-page-footer .page-num-box {
    margin-left: auto;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.08);
    color: #6d28d9;
    padding: 1.5px 8px;
    border-radius: 6px;
    font-size: 9.5pt;
}

/* =========================================================================
   3. TIPOGRAFI AKADEMIK STANDAR BAKU (TIMES NEW ROMAN 12PT 1.5 SPASI)
   ========================================================================= */
.word-page-content {
    font-family: "Times New Roman", Times, "Cambria", Georgia, serif;
    font-size: 12pt;
    line-height: 1.65;
    color: #111827;
    text-align: justify;
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

.word-page-content h1 {
    font-family: "Times New Roman", Times, serif;
    font-size: 13.5pt;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    color: #0f172a;
    margin: 0 0 22pt;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.word-page-content h2 {
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    font-weight: 700;
    color: #0f172a;
    margin: 20pt 0 8pt;
    text-align: left;
    line-height: 1.45;
}

.word-page-content h3 {
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    font-weight: 600;
    color: #1e293b;
    margin: 14pt 0 6pt;
    text-align: left;
    line-height: 1.4;
}

.word-page-content h4 {
    font-family: "Times New Roman", Times, serif;
    font-size: 11.5pt;
    font-weight: 600;
    font-style: italic;
    color: #334155;
    margin: 10pt 0 4pt;
}

.word-page-content p {
    margin: 0 0 10pt;
    text-indent: 1.27cm; /* Indentasi Paragraf Baku 0.5 Inchi */
    line-height: 1.7;
}

.word-page-content p.no-indent,
.word-page-content .no-indent {
    text-indent: 0 !important;
}

.word-page-content ul,
.word-page-content ol {
    padding-left: 2.2rem;
    margin: 0 0 12pt;
    text-align: left;
}
.word-page-content li {
    margin: 4pt 0;
    line-height: 1.6;
}

/* Callout Box Kutipan & Kebaruan Riset */
.academic-callout-box {
    background: #f8faff;
    border: 1px solid #dbeafe;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    padding: 12pt 16pt;
    margin: 14pt 0;
    font-size: 11pt;
    line-height: 1.55;
    color: #1e3a8a;
}
[data-theme="dark"] .academic-callout-box {
    background: #0f172a !important;
    border-color: #1e3a8a !important;
    color: #93c5fd !important;
}

/* Tabel Akademik Standar APA 7th (3 Garis Horizontal Baku) */
.word-page-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-family: 'Times New Roman', Times, serif;
    font-size: 10.5pt;
    margin: 16pt 0 20pt;
    text-align: left;
    display: table;
    border-top: 1.5pt solid #0f172a;
    border-bottom: 1.5pt solid #0f172a;
}
.word-page-content th {
    border: none;
    border-bottom: 1pt solid #0f172a;
    padding: 8pt 10pt;
    font-weight: 700;
    background: transparent;
    color: #0f172a;
    text-align: left;
}
.word-page-content td {
    border: none;
    border-bottom: 0.5pt solid #e2e8f0;
    padding: 6pt 10pt;
    line-height: 1.45;
}
.word-page-content tr:last-child td {
    border-bottom: none;
}
.table-caption {
    font-family: 'Times New Roman', Times, serif;
    font-size: 10.5pt;
    font-weight: 700;
    margin-bottom: 5pt;
    text-align: left;
    color: #0f172a;
}
.figure-caption {
    font-family: 'Times New Roman', Times, serif;
    font-size: 10pt;
    text-align: center;
    margin-top: 8pt;
    margin-bottom: 16pt;
    color: #334155;
}

/* =========================================================================
   3.5. BINGKAI SAMPUL & DOKUMEN AKADEMIK BAKU (COVER & PRELIMINARY APPARATUS)
   ========================================================================= */
.academic-cover-container {
    height: 100%;
    min-height: 23cm;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
}

.academic-cover-border {
    position: absolute;
    inset: 0.8cm;
    border: 2pt solid #0f172a;
    pointer-events: none;
    padding: 3pt;
    box-sizing: border-box;
}
.academic-cover-border::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border: 0.75pt solid #0f172a;
    box-sizing: border-box;
}
[data-theme="dark"] .academic-cover-border,
[data-theme="dark"] .academic-cover-border::after {
    border-color: #cbd5e1 !important;
}

/* Badge Tipe Dokumen Sampul */
.academic-cover-badge {
    display: inline-block;
    padding: 5px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(99,102,241,0.08));
    border: 1.5px solid rgba(124,58,237,0.35);
    font-size: 12.5pt;
    font-weight: 900;
    text-transform: uppercase;
    color: #6d28d9;
    letter-spacing: 0.08em;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 14px rgba(124,58,237,0.12);
}
[data-theme="dark"] .academic-cover-badge {
    background: rgba(124,58,237,0.25) !important;
    border-color: rgba(124,58,237,0.5) !important;
    color: #c4b5fd !important;
}

/* Kotak Simulasi Meterai Tempel Rp 10.000 Resmi */
.academic-stamp-box {
    width: 130px;
    height: 75px;
    border: 1.5px dashed #0284c7;
    background: #f0f9ff;
    border-radius: 6px;
    margin: 8pt auto 10pt;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 2px 8px rgba(2,132,199,0.12);
}
.academic-stamp-box::before {
    content: 'METERAI TEMPEL';
    font-size: 7pt;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #0369a1;
    font-family: 'Inter', sans-serif;
}
.academic-stamp-box .stamp-amount {
    font-size: 11pt;
    font-weight: 900;
    color: #0284c7;
    font-family: 'Outfit', sans-serif;
    margin: 2px 0;
}
.academic-stamp-box .stamp-code {
    font-size: 6.5pt;
    font-family: 'Courier New', monospace;
    color: #075985;
    font-weight: 700;
    letter-spacing: 0.05em;
}
[data-theme="dark"] .academic-stamp-box {
    background: #0c4a6e !important;
    border-color: #38bdf8 !important;
}
[data-theme="dark"] .academic-stamp-box::before,
[data-theme="dark"] .academic-stamp-box .stamp-amount,
[data-theme="dark"] .academic-stamp-box .stamp-code {
    color: #e0f2fe !important;
}

/* Tabel Tanda Tangan Pembimbing & Penguji */
.academic-sig-table {
    width: 100%;
    margin-top: 32pt;
    font-size: 11pt;
    text-align: center;
    border-collapse: collapse;
}
.academic-sig-table td {
    padding: 8pt;
    vertical-align: top;
    border: none;
}
.academic-sig-space {
    height: 55pt;
}
.academic-sig-line {
    font-weight: 700;
    border-bottom: 1.5px solid #0f172a;
    display: inline-block;
    min-width: 200px;
    padding-bottom: 2pt;
}
[data-theme="dark"] .academic-sig-line {
    border-bottom-color: #cbd5e1 !important;
}

/* =========================================================================
   4. FORMAT PUBLIKASI ARTIKEL ILMIAH JURNAL (SINTA / SCOPUS LAYOUT)
   ========================================================================= */
.journal-article-sheet {
    max-width: 21cm;
    margin: 0 auto;
}

.journal-header-banner {
    border-bottom: 2pt solid #0f172a;
    padding-bottom: 16pt;
    margin-bottom: 18pt;
}

.journal-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 8.5pt;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 14pt;
    flex-wrap: wrap;
}
.journal-badge-sinta {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white !important;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 8pt;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(16,185,129,0.3);
}

.journal-article-title {
    font-family: 'Outfit', 'Times New Roman', serif;
    font-size: 16pt;
    font-weight: 900;
    color: #0f172a;
    text-align: center;
    line-height: 1.35;
    margin: 0 0 14pt;
    letter-spacing: -0.01em;
}

.journal-authors-block {
    text-align: center;
    margin-bottom: 16pt;
    font-family: 'Inter', sans-serif;
}
.journal-author-names {
    font-weight: 800;
    font-size: 11pt;
    color: #1e293b;
    margin-bottom: 4pt;
}
.journal-author-affil {
    font-size: 9.5pt;
    color: #64748b;
    line-height: 1.45;
}
.journal-author-email {
    font-size: 9pt;
    color: #7c3aed;
    font-weight: 600;
    margin-top: 3pt;
}

.journal-timeline-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6pt 12pt;
    font-size: 8pt;
    color: #475569;
    font-family: 'Inter', sans-serif;
    margin-bottom: 18pt;
    flex-wrap: wrap;
}

.journal-abstract-card {
    background: #f8f7ff;
    border: 1px solid #ddd6fe;
    border-left: 4.5px solid #7c3aed;
    border-radius: 12px;
    padding: 16pt 18pt;
    margin-bottom: 22pt;
}
.journal-abstract-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 10.5pt;
    color: #6d28d9;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6pt;
    display: flex;
    align-items: center;
    gap: 6px;
}
.journal-abstract-body {
    font-family: 'Times New Roman', Times, serif;
    font-size: 10pt;
    line-height: 1.6;
    color: #1e293b;
    text-align: justify;
    margin-bottom: 8pt;
}
.journal-keywords {
    font-size: 9.5pt;
    color: #475569;
    font-family: 'Times New Roman', serif;
}
.journal-keywords b {
    color: #6d28d9;
}

.journal-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(124,58,237,0.08);
    color: #6d28d9;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 9pt;
    padding: 3px 9px;
    border-radius: 6px;
    margin-bottom: 8pt;
}

/* Mode 2 Kolom Publikasi Jurnal (IMRaD 2-Column Classic) */
.journal-2col-flow {
    column-count: 2;
    column-gap: 24pt;
    column-rule: 0.75pt solid #e2e8f0;
    text-align: justify;
}
.journal-2col-flow p {
    text-indent: 0.8cm;
    margin-bottom: 8pt;
}
.journal-2col-flow h2,
.journal-2col-flow h3 {
    break-after: avoid;
    column-span: all;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4pt;
}
.journal-2col-flow table,
.journal-2col-flow .journal-callout,
.journal-2col-flow img {
    column-span: all;
}
[data-theme="dark"] .journal-2col-flow {
    column-rule-color: #334155;
}

/* =========================================================================
   5. EXECUTIVE TOOLBAR NAV CONTROLS
   ========================================================================= */
#wordDocNavControls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #0f172a;
    border-radius: 18px;
    border: 1.5px solid #e0e7ff;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.08), 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 22px;
    position: sticky;
    top: 66px;
    z-index: 35;
    flex-wrap: wrap;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

[data-theme="dark"] #wordDocNavControls {
    background: rgba(15, 23, 42, 0.94) !important;
    border-color: rgba(124, 58, 237, 0.35) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
}

.doc-nav-page-title {
    font-weight: 800;
    font-size: 13px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Outfit', sans-serif;
}
[data-theme="dark"] .doc-nav-page-title {
    color: #f8fafc !important;
}
.doc-nav-page-meta {
    font-size: 11px;
    color: #64748b;
}
[data-theme="dark"] .doc-nav-page-meta {
    color: #94a3b8 !important;
}
.doc-nav-page-pill {
    color: #6d28d9;
    font-weight: 800;
    background: rgba(124,58,237,0.1);
    padding: 1px 7px;
    border-radius: 5px;
}
[data-theme="dark"] .doc-nav-page-pill {
    color: #c4b5fd !important;
    background: rgba(124,58,237,0.25) !important;
}

.doc-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 11px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    min-height: 38px;
    user-select: none;
}
.doc-nav-btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(124,58,237,0.4);
}
.doc-nav-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(124,58,237,0.55);
}
.doc-nav-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.doc-nav-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}
[data-theme="dark"] .doc-nav-btn-secondary {
    background: rgba(255,255,255,0.1) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.15) !important;
}
[data-theme="dark"] .doc-nav-btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
}
.doc-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

.doc-nav-select {
    padding: 8px 12px;
    border-radius: 11px;
    background: #f8fafc;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    outline: none;
    min-height: 38px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.doc-nav-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}
[data-theme="dark"] .doc-nav-select {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

.doc-zoom-widget {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    overflow: hidden;
    min-height: 38px;
}
[data-theme="dark"] .doc-zoom-widget {
    background: #1e293b !important;
    border-color: #475569 !important;
}
.doc-zoom-btn {
    background: transparent;
    border: none;
    color: #475569;
    padding: 6px 11px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition: background 0.15s ease;
}
.doc-zoom-btn:hover {
    background: rgba(124,58,237,0.1);
    color: #7c3aed;
}
[data-theme="dark"] .doc-zoom-btn {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .doc-zoom-btn:hover {
    background: rgba(124,58,237,0.2) !important;
    color: #c4b5fd !important;
}
.doc-zoom-label {
    font-size: 11px;
    font-weight: 800;
    color: #6d28d9;
    padding: 0 4px;
    font-family: 'Courier New', monospace;
    min-width: 38px;
    text-align: center;
}
[data-theme="dark"] .doc-zoom-label {
    color: #c4b5fd !important;
}

.doc-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.doc-type-jurnal {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
    color: #34d399;
    border: 1.5px solid #10b981;
}
.doc-type-proposal {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(79, 70, 229, 0.35));
    color: #a5b4fc;
    border: 1.5px solid #6366f1;
}
.doc-type-skripsi {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
    color: #fcd34d;
    border: 1.5px solid #f59e0b;
}

/* =========================================================================
   6. LIVE AI SYNTHESIS STUDIO & STREAMING VIEW (EXECUTIVE REDESIGN)
   ========================================================================= */
.executive-studio-console {
    background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%) !important;
    border: 1.5px solid #ede9fe !important;
    border-radius: 22px !important;
    padding: 20px 22px 16px !important;
    box-shadow:
        0 16px 45px rgba(124, 58, 237, 0.12),
        0 2px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    position: sticky;
    top: 10px;
    z-index: 30;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: studioFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes studioFadeIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}
[data-theme="dark"] .executive-studio-console {
    background: linear-gradient(180deg, rgba(24, 32, 47, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border-color: #334155 !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 58, 237, 0.25) !important;
}

.studio-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.studio-engine-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.studio-logo-pulse {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
    overflow: hidden;
}
.studio-glow-orb {
    position: absolute;
    inset: -3px;
    border-radius: 18px;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    opacity: 0;
    filter: blur(6px);
    animation: studioOrbPulse 2.5s ease-in-out infinite alternate;
    z-index: -1;
}
@keyframes studioOrbPulse {
    0% { transform: scale(0.95); opacity: 0.3; }
    100% { transform: scale(1.1); opacity: 0.6; }
}
.studio-sparkle-svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
    animation: studioSparkle 3s ease-in-out infinite;
}
@keyframes studioSparkle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.08); }
}

.studio-heading-text {
    min-width: 0;
    flex: 1;
}
.studio-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.studio-phase-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(99, 102, 241, 0.12));
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #6d28d9;
    font-size: 11px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
[data-theme="dark"] .studio-phase-badge {
    background: rgba(124, 58, 237, 0.25);
    color: #c4b5fd;
    border-color: rgba(124, 58, 237, 0.4);
}
.studio-live-radar {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: liveBlink 1s infinite alternate;
}
.studio-doctype-pill {
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}
[data-theme="dark"] .studio-doctype-pill {
    background: #0f172a;
    color: #94a3b8;
}

.studio-live-status-title {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.02em;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
[data-theme="dark"] .studio-live-status-title {
    color: #f8fafc !important;
}
.studio-live-status-sub {
    font-size: 12.5px;
    color: #64748b;
    margin: 3px 0 0;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
[data-theme="dark"] .studio-live-status-sub {
    color: #94a3b8 !important;
}

/* Metric Boxes di Kanan */
.studio-metrics-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.studio-metric-card {
    background: #f8faff;
    border: 1.5px solid #e0e7ff;
    border-radius: 14px;
    padding: 8px 14px;
    text-align: center;
    min-width: 72px;
    transition: all 0.25s ease;
}
.studio-metric-card:hover {
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
    transform: translateY(-1px);
}
[data-theme="dark"] .studio-metric-card {
    background: #0f172a;
    border-color: #334155;
}
.studio-metric-label {
    display: block;
    font-size: 9.5px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-family: 'Inter', sans-serif;
}
.studio-metric-val {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 22px;
    line-height: 1;
    color: #0f172a;
}
.studio-metric-val-purple {
    color: #7c3aed;
    text-shadow: 0 2px 10px rgba(124, 58, 237, 0.25);
}
[data-theme="dark"] .studio-metric-val {
    color: #f8fafc;
}
[data-theme="dark"] .studio-metric-val-purple {
    color: #c4b5fd;
}

/* Stepper 5-Tahap */
.studio-stepper-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none;
}
.studio-stepper-track::-webkit-scrollbar {
    display: none;
}
.studio-stage-node {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}
[data-theme="dark"] .studio-stage-node {
    background: #0f172a;
    color: #64748b;
}
.studio-stage-num {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #1e293b;
    font-size: 9.5px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
[data-theme="dark"] .studio-stage-num {
    background: #334155;
    color: #cbd5e1;
}
.studio-stage-node.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(99, 102, 241, 0.15));
    border-color: rgba(124, 58, 237, 0.4);
    color: #6d28d9;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
    transform: scale(1.04);
}
.studio-stage-node.active .studio-stage-num {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}
[data-theme="dark"] .studio-stage-node.active {
    background: rgba(124, 58, 237, 0.25);
    color: #c4b5fd;
    border-color: rgba(124, 58, 237, 0.5);
}
.studio-stage-node.complete {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #059669;
    font-weight: 800;
}
.studio-stage-node.complete .studio-stage-num {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}
[data-theme="dark"] .studio-stage-node.complete {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}
.studio-stage-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    min-width: 8px;
    border-radius: 999px;
    transition: background 0.3s ease;
}
[data-theme="dark"] .studio-stage-connector {
    background: #334155;
}
.studio-stage-connector.active {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
}

/* Progress Track Berkilau */
.studio-progress-track {
    height: 12px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
    padding: 2.5px;
    border: 1.5px solid rgba(124, 58, 237, 0.22);
    position: relative;
}
[data-theme="dark"] .studio-progress-track {
    background: #0f172a;
    border-color: rgba(124, 58, 237, 0.35);
}
.studio-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #7c3aed 0%, #6366f1 45%, #a855f7 75%, #38bdf8 100%);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.7);
    transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.studio-progress-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: studioShimmer 1.8s infinite;
}
@keyframes studioShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Bottom Meta Bar */
.studio-bottom-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 11.5px;
    color: #64748b;
    flex-wrap: wrap;
    gap-x: 16px;
}
[data-theme="dark"] .studio-bottom-meta {
    border-top-color: #334155;
    color: #94a3b8;
}
.studio-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.studio-meta-icon {
    font-size: 13px;
    flex-shrink: 0;
}
.studio-meta-right {
    color: #7c3aed;
    font-weight: 700;
}
[data-theme="dark"] .studio-meta-right {
    color: #c4b5fd;
}

/* Atom Orbit Loader saat awal terhubung */
.studio-loader-atom {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
}
.studio-atom-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.8);
}
.studio-atom-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #7c3aed;
    border-right-color: #a855f7;
}
.studio-atom-ring.ring-1 {
    animation: atomRotate1 1.4s linear infinite;
}
.studio-atom-ring.ring-2 {
    border-top-color: #38bdf8;
    border-right-color: #6366f1;
    animation: atomRotate2 1.8s linear infinite reverse;
}
@keyframes atomRotate1 { to { transform: rotate(360deg); } }
@keyframes atomRotate2 { to { transform: rotate(-360deg); } }

.studio-security-banner {
    max-width: 680px;
    margin: 18px auto 0;
    padding: 12px 18px;
    background: rgba(124, 58, 237, 0.06);
    border-radius: 14px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    display: flex;
    align-items: center;
    gap: 12px;
}
[data-theme="dark"] .studio-security-banner {
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.3);
}

.live-synthesis-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1.5px solid #ede9fe;
    box-shadow: 0 16px 40px rgba(124,58,237,0.1);
    padding: 24px;
    margin-bottom: 24px;
}
[data-theme="dark"] .live-synthesis-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5) !important;
}

.live-typing-cursor {
    display: inline-block;
    width: 3.5px;
    height: 1.18em;
    background: #7c3aed;
    margin-left: 3px;
    vertical-align: text-bottom;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(124,58,237,0.8);
    animation: liveBlink 0.75s ease-in-out infinite alternate;
}
@keyframes liveBlink {
    0% { opacity: 0.15; transform: scaleY(0.85); }
    100% { opacity: 1; transform: scaleY(1.1); }
}

/* Live Synthesis Studio Header */
.live-synthesis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
[data-theme="dark"] .live-synthesis-header {
    border-bottom-color: #334155 !important;
}

.live-synthesis-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-family: 'Inter', sans-serif;
    flex-wrap: wrap;
}
.live-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 11px;
}
.live-stat-pill-purple {
    background: rgba(124,58,237,0.1);
    color: #7c3aed;
    border: 1px solid rgba(124,58,237,0.25);
}
.live-stat-pill-emerald {
    background: rgba(16,185,129,0.1);
    color: #059669;
    border: 1px solid rgba(16,185,129,0.25);
}
.live-stat-pill-indigo {
    background: rgba(99,102,241,0.1);
    color: #4f46e5;
    border: 1px solid rgba(99,102,241,0.25);
}

/* =========================================================================
   7. MOBILE & ANDROID RESPONSIVENESS (PERFECT VIEWPORT ADAPTATION)
   ========================================================================= */
@media (max-width: 860px) {
    .word-page {
        width: 100% !important;
        max-width: 21cm !important;
        min-height: auto !important;
        padding: 2.2cm 1.8cm 2.2cm 1.8cm !important;
    }
    .word-page-running-head {
        left: 1.8cm;
        right: 1.8cm;
    }
    .word-page-footer {
        left: 1.8cm;
        right: 1.8cm;
    }
}

@media (max-width: 720px) {
    .executive-studio-console {
        padding: 16px 14px 14px !important;
        border-radius: 18px !important;
    }
    .studio-engine-info {
        gap: 10px;
    }
    .studio-logo-pulse {
        width: 42px;
        height: 42px;
    }
    .studio-logo-pulse svg {
        width: 22px;
        height: 22px;
    }
    .studio-phase-badge {
        font-size: 10.5px;
        padding: 3px 9px;
    }
    .studio-doctype-pill {
        font-size: 10px;
        padding: 3px 8px;
    }
    .studio-live-status-title {
        font-size: 14.5px;
    }
    .studio-live-status-sub {
        font-size: 11.5px;
    }
    .studio-metric-card {
        padding: 6px 10px;
        min-width: 60px;
    }
    .studio-metric-label {
        font-size: 9px;
    }
    .studio-metric-val {
        font-size: 18px;
    }
    .studio-stage-node {
        padding: 4px 8px;
        font-size: 10.5px;
    }
    .studio-stage-num {
        width: 15px;
        height: 15px;
        font-size: 8.5px;
    }
    .studio-bottom-meta {
        font-size: 11px;
        gap: 8px 14px;
    }
    .studio-meta-item {
        font-size: 11px;
    }
    .studio-meta-right {
        font-size: 11px;
    }
    .studio-progress-track {
        height: 10px;
    }
}

@media (max-width: 640px) {
    .paper-wrap {
        padding: 12px 6px !important;
        border-radius: 16px !important;
    }
    .word-page {
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        padding: 28px 18px 24px 18px !important;
        border-radius: 14px !important;
        box-shadow: 0 4px 16px rgba(15,23,42,0.06), 0 0 0 1px rgba(15,23,42,0.04) !important;
    }
    .word-page.live-stream-paper {
        padding: 24px 16px !important;
    }
    .word-page-running-head {
        position: static !important;
        width: 100% !important;
        margin-bottom: 16px !important;
        padding-bottom: 6px !important;
        font-size: 7.5pt !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    [data-theme="dark"] .word-page-running-head {
        border-bottom-color: #334155 !important;
    }
    .word-page-footer {
        position: static !important;
        width: 100% !important;
        margin-top: 24px !important;
        padding-top: 8px !important;
        font-size: 8pt !important;
        border-top: 1px solid #e2e8f0 !important;
    }
    [data-theme="dark"] .word-page-footer {
        border-top-color: #334155 !important;
    }
    .word-page-content {
        font-size: 11pt !important;
        line-height: 1.6 !important;
    }
    .word-page-content p {
        text-indent: 0.5cm !important;
        margin-bottom: 8pt !important;
    }
    .academic-cover-container {
        min-height: auto !important;
        padding: 18px 10px !important;
    }
    .academic-cover-border {
        inset: 4px !important;
        border-width: 1.5pt !important;
    }
    #wordDocNavControls {
        top: 56px;
        padding: 10px 12px;
        border-radius: 14px;
        gap: 8px;
    }
    .doc-nav-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 36px;
    }
    .doc-nav-select {
        font-size: 11px;
        padding: 6px 8px;
        min-height: 36px;
        max-width: 115px;
    }
    .journal-2col-flow {
        column-count: 1 !important; /* Single column on mobile for effortless reading */
    }
    .journal-article-title {
        font-size: 13.5pt !important;
        margin-bottom: 10pt !important;
    }
    .journal-abstract-card {
        padding: 12pt 14pt !important;
        margin-bottom: 16pt !important;
    }
    .executive-studio-console {
        padding: 14px 12px 12px !important;
        border-radius: 16px !important;
    }
    .studio-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .studio-metrics-panel {
        width: 100%;
        justify-content: space-between;
    }
    .studio-metric-card {
        flex: 1;
        text-align: center;
    }
    .studio-stepper-track {
        gap: 4px;
        padding: 2px 0 6px;
    }
    .studio-stage-node {
        padding: 4px 7px;
        font-size: 10px;
    }
}

@media (max-width: 420px) {
    .word-page {
        padding: 20px 12px 18px 12px !important;
        border-radius: 10px !important;
    }
    .word-page-content {
        font-size: 10.5pt !important;
        line-height: 1.55 !important;
    }
    .word-page-content p {
        text-indent: 0.4cm !important;
    }
    .executive-studio-console {
        padding: 12px 10px 10px !important;
    }
    .studio-logo-pulse {
        width: 38px;
        height: 38px;
    }
    .studio-metric-card {
        padding: 5px 8px;
        min-width: 56px;
    }
    .studio-metric-label {
        font-size: 8px;
    }
    .studio-metric-val {
        font-size: 16px;
    }
}
