/* ============================================
   OrthoExpert — Print / Cetak Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;400;500;600;700&display=swap');

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

body {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 11pt;
    color: #1a1a2e;
    background: white;
    line-height: 1.5;
}

/* ── KOP SURAT ─────────────────────────────── */
.kop-surat {
    border-bottom: 3px solid #0d9488;
    padding-bottom: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.kop-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.kop-text { flex: 1; }

.kop-title {
    font-family: 'DM Serif Display', serif;
    font-size: 20pt;
    color: #0a1628;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.kop-subtitle {
    font-size: 9.5pt;
    color: #475569;
    margin-top: 2px;
}

.kop-info {
    font-size: 8.5pt;
    color: #64748b;
    margin-top: 5px;
    line-height: 1.6;
}

.kop-right {
    text-align: right;
    font-size: 8.5pt;
    color: #64748b;
    border-left: 1px solid #e2e8f0;
    padding-left: 16px;
}

.kop-right strong { display: block; font-size: 9pt; color: #0a1628; }

/* ── JUDUL LAPORAN ─────────────────────────── */
.report-title {
    text-align: center;
    margin-bottom: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.report-title h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 14pt;
    color: #0a1628;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.report-title p {
    font-size: 9pt;
    color: #64748b;
    margin-top: 4px;
}

/* ── INFO BOX ──────────────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    background: #f8faff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 9.5pt;
}

.info-item label {
    font-weight: 700;
    color: #64748b;
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
}

.info-item span {
    color: #0a1628;
    font-weight: 600;
}

/* ── HASIL UTAMA ───────────────────────────── */
.hasil-box {
    border: 2px solid #0d9488;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
    background: #f0fdfa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hasil-box.berat   { border-color: #ef4444; background: #fff5f5; }
.hasil-box.sedang  { border-color: #f59e0b; background: #fffbeb; }
.hasil-box.ringan  { border-color: #10b981; background: #f0fdf4; }

.hasil-label {
    font-size: 8pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-bottom: 4px;
}

.hasil-nama {
    font-family: 'DM Serif Display', serif;
    font-size: 16pt;
    color: #0a1628;
    line-height: 1.1;
}

.hasil-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 8pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 5px;
}

.badge-ringan { background: #dcfce7; color: #166534; }
.badge-sedang { background: #fef3c7; color: #92400e; }
.badge-berat  { background: #fee2e2; color: #991b1b; }

.hasil-cf-box {
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 18px;
    background: white;
    min-width: 110px;
}

.cf-persen {
    font-family: 'DM Serif Display', serif;
    font-size: 24pt;
    color: #0d9488;
    line-height: 1;
}

.cf-label { font-size: 7.5pt; color: #64748b; margin-top: 2px; }
.cf-value { font-size: 8pt; color: #94a3b8; }

/* ── CF BAR ────────────────────────────────── */
.cf-bar-wrap {
    margin-bottom: 16px;
}

.cf-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.cf-bar-label { width: 160px; font-size: 9pt; font-weight: 600; color: #1a1a2e; flex-shrink: 0; }
.cf-bar-track { flex: 1; background: #f1f5f9; border-radius: 4px; height: 9px; }
.cf-bar-fill  { height: 9px; border-radius: 4px; }
.cf-bar-pct   { width: 50px; text-align: right; font-size: 9pt; font-weight: 700; }

/* ── TABLES ────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-bottom: 14px; }
thead th {
    background: #0a1628;
    color: white;
    padding: 7px 10px;
    text-align: left;
    font-size: 8pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
tbody tr { border-bottom: 1px solid #e2e8f0; }
tbody tr:nth-child(even) { background: #f8faff; }
tbody td { padding: 7px 10px; vertical-align: middle; }

/* ── SECTION TITLE ─────────────────────────── */
.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 11pt;
    color: #0a1628;
    border-left: 3px solid #0d9488;
    padding-left: 10px;
    margin: 14px 0 8px;
}

/* ── GEJALA LIST ───────────────────────────── */
.gejala-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 14px;
}

.gejala-item {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 8.5pt;
    display: flex;
    gap: 6px;
    align-items: flex-start;
    background: #fafbff;
}

.gejala-check { color: #0d9488; font-weight: 700; flex-shrink: 0; }

/* ── REKOMENDASI ───────────────────────────── */
.rekomendasi-box {
    border: 1px solid #fde68a;
    background: #fffbeb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 9.5pt;
    line-height: 1.7;
}

.rekomendasi-box strong { display: block; color: #92400e; margin-bottom: 4px; font-size: 9pt; }

/* ── CATATAN / DISCLAIMER ──────────────────── */
.disclaimer {
    font-size: 8pt;
    color: #94a3b8;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
    margin-top: 14px;
    line-height: 1.6;
    text-align: center;
}

/* ── TTD AREA ──────────────────────────────── */
.ttd-area {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.ttd-box {
    text-align: center;
    font-size: 9.5pt;
}

.ttd-space {
    height: 60px;
    width: 180px;
    border-bottom: 1px solid #1a1a2e;
    margin: 8px auto 4px;
}

/* ── PAGE BREAK ────────────────────────────── */
.page-break { page-break-after: always; }

/* ── NOMOR HALAMAN & FOOTER ────────────────── */
.print-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid #e2e8f0;
    padding: 6px 20px;
    font-size: 7.5pt;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    background: white;
}

@page {
    size: A4;
    margin: 18mm 18mm 22mm 18mm;
}

@media print {
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .no-print { display: none !important; }
    a { text-decoration: none; color: inherit; }
}

/* ── TANDA TANGAN (TTD) ────────────────────────────────────────────────── */
.ttd-section {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
}

.ttd-lokasi {
    text-align: right;
    font-size: 9.5pt;
    color: #475569;
    margin-bottom: 18px;
}

.ttd-grid {
    display: grid;
    gap: 0 30px;
    align-items: start;
}

.ttd-col {
    text-align: center;
}

.ttd-label {
    font-size: 8.5pt;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    min-height: 22px;
    line-height: 1.3;
}

.ttd-space-box {
    height: 70px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ttd-stempel {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7pt;
    color: #cbd5e1;
    letter-spacing: 0.1em;
}

.ttd-garis {
    border-bottom: 1.5px solid #0a1628;
    width: 80%;
    margin: 0 auto 5px;
}

.ttd-nama {
    font-size: 9.5pt;
    font-weight: 700;
    color: #0a1628;
    font-family: 'DM Serif Display', serif;
    margin-bottom: 2px;
    min-height: 16px;
}

.ttd-jabatan {
    font-size: 8pt;
    color: #475569;
    margin-bottom: 2px;
}

.ttd-nip {
    font-size: 7.5pt;
    color: #94a3b8;
}

/* Login badge di kop — pengguna yang mencetak */
.kop-printer {
    margin-top: 8px;
    padding: 5px 10px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    font-size: 7.5pt;
    color: #0d9488;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
