/* General Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #007bff;
    padding-bottom: 15px;
    margin-bottom: 25px;
    position: sticky;
    top: 0;
    z-index: 35; 
    background-color: #fff;
}

.header-title h1 {
    font-size: 1.5em;
    color: #007bff;
    margin: 0;
}

.header-title .subtitle {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.confidential {
    background-color: #ffc107;
    color: #333;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #e9ecef;
    border-radius: 6px;
    position: sticky;
    top: 70px; /* Jarak di bawah header (sekitar tinggi header) */
    z-index: 30; 
}

.pagination-controls button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-controls button:hover:not(:disabled) {
    background-color: #0056b3;
}

.pagination-controls button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}

#page-info {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1em;
}

/* Form Pages */
.form-page {
    display: none;
    animation: fadeIn 0.5s;
}

.form-page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.block-title {
    font-size: 1.8em;
    color: #007bff;
    border-bottom: 2px solid #ced4da;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.mt-40 { margin-top: 40px; }

.subsection-title {
    font-size: 1.3em;
    color: #495057;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Form Fields */
.form-group-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
/* General Styling (Tidak Berubah) */
/* ... */

/* Form Fields (Perbaikan/Penyesuaian di sini) */
.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
}

/* Penanda input required (Khusus Blok 3B input required) */
.required-field-label::after {
    content: " *";
    color: #dc3545;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="number"],
.form-field textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
    text-align: left;
}

/* HAPUS GAYA LAMA yang membuat input BPS RI menyatu dengan teks */
/* .form-field.contact-bps-ri p {
    margin: 5px 0;
    font-size: 0.9em;
} */
/* .form-field.contact-bps-ri input {
    border: none;
    padding: 0;
    background: none;
    width: auto;
    display: inline;
    text-align: left;
} */


.form-field .readonly-input {
    /* Membuat input readonly terlihat seperti input biasa tapi disabled */
    background-color: #e9ecef !important; /* Warna abu-abu lembut untuk menandakan tidak bisa diubah */
    color: #495057 !important;
    border: 1px solid #ced4da !important;
    padding: 8px 10px !important; /* Dibuat sedikit lebih kecil agar lebih rapi */
    border-radius: 4px !important;
    cursor: default !important; /* Kursor default, bukan kursor teks */
    width: 100%; /* Menggunakan lebar penuh seperti input BPS Provinsi */
    box-sizing: border-box;
    display: block; /* Memastikan input berada di baris baru agar tampilannya seragam */
    margin-top: 2px;
}
/* Menghilangkan box-shadow saat di-focus untuk input readonly */
.form-field .readonly-input:focus {
    box-shadow: none !important;
    border-color: #ced4da !important;
    outline: none;
}


.form-field input:focus, .form-field textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}

/* ... (Sisa CSS tidak perlu diubah, atau pastikan CSS untuk halaman sukses sudah ditambahkan) ... */
.full-width {
    grid-column: 1 / -1;
}

/* Radio/Checklist Group */
.form-group-radio {
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 20px;
}

.form-group-radio > label {
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    color: #343a40;
}

.radio-options {
    /* 1. Mengubah dari 'flex' ke 'grid' atau 'block' untuk memungkinkan opsi per baris (yang sudah Anda atur di HTML dengan <div>) */
    /* 2. Menggunakan properti margin untuk menengahkan seluruh blok opsi. */
    display: block; /* Memastikan setiap div opsi mengambil baris baru */
    width: fit-content; /* Memastikan lebar total kontainer hanya selebar konten terpanjang */
    margin: 0 auto; /* MENGENGAHKAN SELURUH BLOK OPSI */
    padding: 5px 0;
}

.radio-options.column-2 {
    /* MENGUBAH: Menghapus display: flex/grid default, menggunakan flexbox untuk kontrol gap */
    display: flex;
    gap: 10px; /* Jarak antar opsi */
    align-items: flex-start; /* Meratakan semua item ke kiri */
}

.radio-options.column-3 {
    display: flex;
    gap: 20px;
}

.radio-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
}
/* Kustomisasi Checkmark Radio Button */
.radio-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #007bff;
    border-radius: 50%;
    outline: none;
    margin-right: 5px;
    position: relative;
    top: 0;
}
.radio-options input[type="radio"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}
.radio-options input[type="radio"]:checked::before {
    content: ''; 
    display: block;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.note {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 5px solid #ffc107;
    font-size: 0.9em;
}

.note-explanation {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 10px;
    line-height: 1.4;
}

/* --- Info Toggle Button Styling --- */
.info-toggle-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 1em;
    margin-left: 10px;
    padding: 0;
    vertical-align: middle;
}

.info-content {
    display: none;
    padding: 10px;
    background-color: #f0f8ff;
    border-left: 3px solid #007bff;
    margin-top: 10px;
    border-radius: 4px;
}

.info-content.show {
    display: block;
}


/* Checklist Group */
.checklist-group p {
    font-weight: bold;
    color: #343a40;
    margin-bottom: 8px;
}

.checklist {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 5px;
    font-size: 0.9em;
}

.checklist.column-2 {
    grid-template-columns: repeat(2, 1fr);
}

.checklist li::before {
    content: "\2713"; /* Checkmark symbol */
    color: #28a745;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Inventory/Expense Section Styling */
.inventory-section, .expense-section {
    border: 1px solid #e9ecef;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
}

.inventory-section h4, .expense-section h4 {
    margin-top: 0;
    color: #007bff;
    font-size: 1.1em;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.inventory-fields {
    display: flex;
    gap: 20px;
}

.inventory-fields .half-width {
    flex: 1;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group input {
    flex-grow: 1;
    text-align: left;
}

.input-group .currency {
    padding: 10px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-left: none;
    border-radius: 0 4px 4px 0;
    font-weight: bold;
    color: #6c757d;
}

.row-total {
    background-color: #e6f0ff;
    border-left: 5px solid #007bff;
}

/* Table Styling (for BLOK 3 and 5) */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.85em;
    min-width: 1300px; 
}

table th, table td {
    border: 1px solid #dee2e6;
    padding: 8px 5px;
    text-align: center;
    vertical-align: middle;
}

/* Sticky Header Table Fix */

table thead th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0; /* Sticky header for better scrolling */
    z-index: 10;
}

.highlight-q {
    background-color: #0056b3 !important;
}

.row-total td {
    font-weight: bold;
    background-color: #cfe2ff !important;
}

/* Input styles within tables */
table input[type="text"],
table input[type="number"],
table textarea {
    width: 95%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
    text-align: left; 
}

/* Table 301 specific */
#produksi-table th, #produksi-table td {
    white-space: nowrap;
}
#produksi-table input {
    min-width: 50px;
}
#produksi-table td:nth-child(2) input {
    text-align: left;
}
#produksi-table td:nth-child(3) {
    width: 80px; 
}
.input-nilai { background-color: #f1f8ff; }
.input-banyak { background-color: #f7f7f7; }
.input-harga { background-color: #fff9e6; }

.add-row td {
    background-color: #e9ecef;
}
#add-item-301 {
    background: none;
    border: 1px dashed #007bff;
    color: #007bff;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}
#add-item-301:hover {
    background-color: #e6f0ff;
}


/* R5 Prospect Table Specifics */
.prospect-table {
    min-width: 1000px;
}

.prospect-table td {
    text-align: left;
}

.prospect-table .radio-cell {
    text-align: center;
    min-width: 90px;
    padding: 5px;
}

.prospect-table .radio-cell label {
    display: block;
    margin: 3px 0;
    text-align: left;
    white-space: nowrap;
    font-size: 0.9em;
}

.prospect-table .radio-cell input {
    margin-right: 5px;
}

/* Submit Button */
.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.submit-btn:hover:not(:disabled) {
    background-color: #1e7e34;
}

.submit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* --- FEEDBACK/SUCCESS PAGE STYLING --- */

.feedback-container {
    max-width: 600px;
    margin: 80px auto;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.8s ease-out;
}

/* Success Styling (Green theme) */
.success-container {
    background-color: #e6ffec; /* Light mint green background */
    border: 3px solid #28a745; /* Green border */
}

.success-icon {
    font-size: 4em;
    margin-bottom: 15px;
    color: #28a745; /* Main green color */
}

.success-message {
    font-size: 2em;
    color: #1e7e34;
    margin: 10px 0;
    font-weight: 700;
}

.feedback-container p {
    font-size: 1.1em;
    color: #495057;
    margin: 15px 0;
}

.feedback-container .back-link a {
    display: inline-block;
    margin-top: 25px;
    padding: 10px 20px;
    background-color: #007bff; /* Blue button for navigation */
    color: white;
    text-decoration: none;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.feedback-container .back-link a:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Optional: Styling for error message (if any) */
.error-container {
    background-color: #fff0f0; /* Light red background */
    border: 3px solid #dc3545; /* Red border */
}
.error-container h2 {
    color: #dc3545;
}
.error-container p {
    color: #dc3545;
}

/* Animation for smooth appearance */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styling untuk bagian Export */
.export-section {
    max-width: 600px;
    margin: 50px auto 20px auto;
    padding: 25px;
    border: 2px dashed #007bff;
    border-radius: 8px;
    background-color: #f0f8ff;
    text-align: center;
}

.export-section h2 {
    color: #0056b3;
    font-size: 1.5em;
    margin-top: 0;
}

.export-btn {
    background-color: #20b2aa; /* Warna hijau kebiruan untuk export */
    padding: 10px 15px;
    font-size: 1em;
    margin-top: 15px;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    background-color: #1a7a72;
}

.export-section .form-field {
    width: 100%;
    margin-bottom: 15px;
}

.export-section input[type="password"] {
    width: 100%;
    box-sizing: border-box;
}