:root {
    --primary: #0056b3;
    --primary-dark: #004494;
    --accent: #00c4cc;
    --bg-body: #f4f7fe;
    --white: #ffffff;
    --text-main: #2b3674;
    --text-muted: #a3aed0;
    --shadow: 0 20px 27px 0 rgba(0, 0, 0, 0.05);
    --radius: 16px;
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.main-container {
    display: flex;
    flex-direction: row;
    background: var(--white);
    width: 100%;
    max-width: 1000px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 600px;
}

/* Bagian Kiri (Branding) */
.brand-section {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    padding: 10px;
    margin-bottom: 25px;
    object-fit: contain;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.brand-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 5px; }
.brand-subtitle { font-size: 1rem; opacity: 0.9; font-weight: 300; margin-bottom: 30px; }

.wave-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,224C672,245,768,267,864,250.7C960,235,1056,181,1152,165.3C1248,149,1344,171,1392,181.3L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: bottom;
}

/* Bagian Kanan (Form) */
.form-section {
    flex: 1.2;
    padding: 50px;
    overflow-y: auto;
}

.form-header { margin-bottom: 30px; }
.form-header h2 { font-size: 1.5rem; color: var(--text-main); margin-bottom: 5px; }
.form-header p { color: var(--text-muted); font-size: 0.9rem; }

.input-group { margin-bottom: 20px; position: relative; }
.input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e5f2;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fcfcfc;
}

.form-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
}

/* --- UPDATE CSS UPLOAD BOX --- */
.file-upload-box {
    border: 2px dashed #cbd5e0; /* Garis putus-putus */
    border-radius: 12px;
    min-height: 180px; /* Tinggi minimum agar proporsional */
    width: 100%;
    display: flex; /* Memusatkan konten secara vertikal & horizontal */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fcfcfc;
    position: relative;
    overflow: hidden; /* Agar gambar preview tidak keluar dari kotak */
}

.file-upload-box:hover {
    border-color: var(--primary);
    background-color: #f0f7ff;
}

/* Efek saat file dipilih (ada preview gambar) */
.file-upload-box.has-file {
    border-style: solid;
    border-color: var(--primary);
    background-color: #000; /* Hitam transparan jika mau, atau putih */
}

.file-upload-box input[type="file"] {
    display: none;
}

.file-content {
    text-align: center;
    z-index: 2; /* Di atas gambar preview */
    pointer-events: none; /* Agar klik tembus ke label */
}

.file-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.file-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Styling untuk Gambar Preview di dalam kotak */
#previewImage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Agar gambar penuh dan tidak gepeng */
    display: none; /* Sembunyikan default */
    opacity: 0.6; /* Agar teks/icon di atas masih terlihat */
    z-index: 1;
}
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 86, 179, 0.2);
}
.text-periode{
    background-color: #e0e7ff;
    color: #4338ca; 
    font-weight:bold; 
    cursor: not-allowed; 
    border-color: #c7d2fe;
}

.btn-submit:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-submit:active { transform: translateY(0); }

/* Responsive Mobile */
@media (max-width: 768px) {
    .main-container { flex-direction: column; min-height: auto; }
    .brand-section { padding: 40px 20px; }
    .form-section { padding: 30px 20px; }
}
