/* ==========================================================================
   1. LAYOUT CONFIGURATION & HEADER
   ========================================================================== */
:root {
    --primary-navy: #1e3a8a;
    --primary-light: #2563eb;
    --accent-green: #10b981;
    --accent-hover: #059669;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --danger-red: #ef4444;
    --danger-bg: #fef2f2;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    color: var(--text-dark);
}

.page-header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-light) 100%);
    color: var(--white);
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.page-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

/* ==========================================================================
   2. DASHBOARD GRID LAYOUT (2 KOLOM: KIRI SISI GEJALA, KANAN SISI DIAGNOSIS)
   ========================================================================== */
.container {
    max-width: 1100px;
    margin: 0 auto 60px auto;
    display: grid;
    grid-template-columns: 1fr 2fr; /* Kolom kiri lebih ringkas, kanan lebih lebar */
    gap: 30px;
    padding: 0 20px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
    height: fit-content;
}

h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-navy);
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 10px;
}

h4 {
    color: var(--text-dark);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

/* Sidebar Badges Gejala */
.badge-symptom {
    padding: 12px 14px;
    background: var(--bg-light);
    border-left: 4px solid var(--accent-green);
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
}

/* ==========================================================================
   3. DIAGNOSIS CARDS & REKOMENDASI SOLUSI
   ========================================================================== */
.diagnosis-block {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 25px;
    background: var(--white);
}

.diag-header {
    background: var(--danger-bg);
    border-left: 4px solid var(--danger-red);
    padding: 16px 20px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diag-title {
    color: #991b1b;
    font-size: 1.15rem;
    font-weight: 700;
}

.accuracy {
    background: #fee2e2;
    color: #991b1b;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(153, 27, 27, 0.2);
}

/* Kotak Langkah Perbaikan Terstruktur */
.step-box {
    background: var(--bg-light);
    padding: 14px 18px;
    border-left: 4px solid var(--primary-light);
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Kotak Terminal CMD/CLI Moderen */
.terminal-box {
    font-family: 'Consolas', 'Courier New', monospace;
    background: #0f172a;
    color: #38bdf8; /* Warna teks cyan agar lebih mudah dibaca dibanding hijau tua */
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.9rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
}

.terminal-box::before {
    content: "C:\\> ";
    color: #64748b;
    margin-right: 10px;
    font-weight: bold;
}

/* Kotak Warning Jika Tidak Ada Gejala yang Cocok */
.alert-empty {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid #d97706;
    padding: 20px;
    border-radius: 8px;
    color: #92400e;
    line-height: 1.6;
}

/* ==========================================================================
   4. NAVIGATION BUTTONS
   ========================================================================== */
#action-buttons {
    grid-column: span 2;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 14px 28px;
    border: none;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    margin: 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-blue { background: var(--primary-light); color: white; }
.btn-blue:hover { background: #1d4ed8; transform: translateY(-1px); }

.btn-green { background: var(--accent-green); color: white; }
.btn-green:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-slate { background: #64748b; color: white; }
.btn-slate:hover { background: #475569; transform: translateY(-1px); }

/* ==========================================================================
   5. PRINT RULES (UNTUK DOKUMEN LAPORAN TA FORMAL)
   ========================================================================== */
@media print {
    @page { size: A4; margin: 20mm 15mm; }
    body { background: white; color: black; padding: 0; }
    .page-header { display: none !important; }
    .container { display: flex; flex-direction: column; gap: 20px; padding: 0; }
    .card { box-shadow: none; border: 1px solid #cbd5e1; width: 100%; page-break-inside: avoid; }
    .diagnosis-block { border: 1px solid #cbd5e1; page-break-inside: avoid; }
    .terminal-box { background: #f1f5f9; color: #0f172a; border: 1px solid #cbd5e1; box-shadow: none; }
    #action-buttons { display: none !important; }
}

/* Responsive Layout Ponsel */
@media (max-width: 850px) {
    .container { grid-template-columns: 1fr; }
    #action-buttons { grid-column: span 1; display: flex; flex-direction: column; gap: 10px; }
    .btn { width: 100%; justify-content: center; margin: 0; }
}