/* ==========================================================================
   1. Konfigurasi Dasar & Variabel (Dari Desain Baru)
   ========================================================================== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --background-start: #f8f9fa;
    --background-end: #e9ecef;
    --card-shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-start);
}

/* ==========================================================================
   2. Layout Utama (Dari Desain Baru)
   ========================================================================== */
.main-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    /* Gradasi latar belakang yang halus */
    background: linear-gradient(135deg, var(--background-start) 0%, var(--background-end) 100%);
}

/* ==========================================================================
   3. Komponen Card (Gabungan Lama & Baru)
   ========================================================================== */
/* Style card umum (dari CSS lama) */
.card {
    border-radius: 0.75rem;
}

.card-header {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

/* Style khusus untuk kartu aplikasi utama (dari desain baru) */
.app-card {
    border-radius: 1rem; /* Sudut lebih bulat untuk card utama */
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
}

/* Header kartu dengan logo (dari desain baru) */
.app-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem !important;
}

.app-logo {
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

/* Style untuk card soal spesifik (dari CSS lama) */
.soal-card {
    transition: box-shadow 0.3s ease-in-out;
}

.soal-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--bs-primary);
}

/* ==========================================================================
   4. Elemen Interaktif (Gabungan Lama & Baru)
   ========================================================================== */
/* Progress Bar (dari desain baru) */
.progress {
    border-radius: 0.5rem;
}

.progress-bar {
    background-color: var(--primary-color);
    transition: width 0.4s ease-in-out; 
    border-radius: 0.5rem;
}

/* Label form (dari CSS lama) */
.form-check-label {
    cursor: pointer;
    width: 100%;
}

/* Tombol Primary (dari desain baru) */
.btn-primary {
    box-shadow: 0 4px 15px -2px rgba(13, 110, 253, 0.4);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -2px rgba(13, 110, 253, 0.5);
}

/* Animasi ikon panah di tombol (dari CSS lama) */
.btn-lg .fa-arrow-right {
    transition: transform 0.2s ease-in-out;
}

.btn-lg:hover .fa-arrow-right {
    transform: translateX(5px);
}

/* ==========================================================================
   5. Utility Classes & Print Styles (Dari CSS Lama - Sangat Detail)
   ========================================================================== */
.print-only {
    display: none;
}

@media print {
    @page {
        size: legal portrait;
        margin: 0.3cm;
    }

    /* RESET UNIVERSAL UNTUK PRINT (PENTING!) */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html, body {
        width: 100%;
        height: 100%;
        background: #fff !important;
        font-family: 'Times New Roman', Times, serif;
        font-size: 11pt;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: none !important;
    }

    .print-only {
        display: block !important;
        page-break-inside: avoid !important;
        /* Mengatur skala agar muat dalam 1 halaman legal */
        transform: scale(0.95);
        transform-origin: center top;
        width: 100%;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }

    #hasil-cetak {
        padding: 0.5cm;
    }
    
    .kop-surat {
        text-align: center;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 30px;
    }
    
    .kop-surat img {
        max-width: 100%;
        height: auto;
        margin-bottom: 10px;
    }

    .kop-surat h4, .kop-surat p {
        display: none;
    }

    .surat-body {
        line-height: 1.25;
    }

    .surat-body .data-siswa {
        margin: 15px 15px;
        text-align: left;
    }
    
    .surat-body .data-siswa td {
        padding: 2px 8px;
        vertical-align: top;
    }
    
    .hasil-jurusan-print {
        text-align: center;
        font-size: 1.3rem;
        font-weight: bold;
        margin: 15px 0;
        padding: 10px;
        border: 1px solid #000;
    }
    
    .ttd-section {
        margin-top: 40px;
        width: 100%;
    }

    .ttd-row-print {
        display: flex;
        justify-content: space-between;
        width: 100%;
        margin-top: 5px;
    }
    
    .ttd-col-print {
        width: 32%;
        text-align: center;
    }
    
    .ttd-section p {
        margin-bottom: 0;
    }

    .footer-surat img {
        max-height: 150px;
        width: 100%;
        object-fit: contain;
    }
}