/* Warna Dasar Tema Kuning */
:root {
    --primary-yellow: #ffc107;
    --dark-yellow: #ff9800;
    --background-color: #f8f9fa;
    --text-dark: #343a40;
    --text-light: #ffffff;
    --shadow-3d: 0 10px 30px rgba(0, 0, 0, 0.15);
}
/* KEYFRAMES untuk animasi slide-up dan fade-in */
@keyframes slideUpAndFade {
    0% {
        opacity: 0;
        transform: translateY(30px); /* Mulai 30px dari bawah */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyframes untuk animasi "hidup" pada logo (mirip widget jam) */
@keyframes logoPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0,0,0,0.2); }
    50% { transform: scale(1.02); box-shadow: 0 5px 15px rgba(0,0,0,0.4); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(0,0,0,0.2); }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto; /* FIX: Mengizinkan scrolling secara normal */
}

/* CONTAINER UTAMA SPLIT-SCREEN */
.login-main-wrapper {
    display: flex;
    width: 90%;
    max-width: 1100px;
    height: auto;
    max-height: 90vh; 
    min-height: 600px;
    box-shadow: var(--shadow-3d);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.5s ease;
    margin-top: auto;
    margin-bottom: auto;
}

/* SISI KIRI: GAMBAR DINAMIS */
.login-image-side {
    flex: 1;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../assets/admin-bg.jpg') no-repeat center center/cover;
    color: var(--text-light);
    /* PERBAIKAN: Mengatur distribusi ruang antara logo dan teks */
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    align-items: flex-start; 
    padding: 30px; /* Padding ini harus cukup */
}

/* PERBAIKAN: Styling untuk Area Logo - Centering Logo Vertikal dan Horizontal */
.logo-area-left {
    /* Mendorong logo ke tengah secara vertikal di ruang yang tersedia */
    margin-top: auto; 
    margin-bottom: auto; /* Memastikan logo mendapatkan ruang yang cukup di atas teks */
    width: 100%;
    text-align: center; 
}

/* PERBAIKAN UTAMA: Styling untuk Logo - Peningkatan Ukuran 5x Lipat & Animasi "Hidup" */
.corp-logo-left {
    /* Batas 5x Lipat */
    max-width: 400px; 
    height: auto;
    
    /* Memastikan logo tampil apa adanya */
    background-color: transparent; 
    padding: 0;
    box-shadow: none;
    
    object-fit: contain;
    
    /* Animasi fade in untuk logo saat halaman dimuat */
    animation: slideUpAndFade 0.8s ease-out 0.2s forwards; 
    opacity: 0; 

    /* Menambahkan animasi "hidup" seperti widget jam */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transisi untuk hover */
    /* Animasi berulang (opsional, bisa diaktifkan/dinonaktifkan) */
    /* animation: logoPulse 2s infinite ease-in-out; */ 
}

/* Efek saat logo di-hover */
.corp-logo-left:hover {
    transform: scale(1.05); /* Sedikit membesar */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); /* Efek bayangan */
    cursor: pointer;
}


.image-overlay {
    /* Pastikan teks tetap di pojok kiri bawah */
    text-align: left;
    width: 100%;
    padding: 0; /* Menghindari padding yang tidak perlu */
    /* Perbaikan: Memberikan sedikit margin-top agar tidak terlalu dekat dengan logo */
    margin-top: 20px; 
}

.corp-name-left {
    font-size: 2.5em;
    font-weight: 800;
    border-bottom: 4px solid var(--primary-yellow);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    
    /* FIX: Animasi Slide-up */
    animation: slideUpAndFade 0.8s ease-out 0.5s forwards; 
    opacity: 0; 
}

.slogan-left {
    font-size: 1.1em;
    font-weight: 300;
    /* PERBAIKAN: Menambah line-height agar baris tidak terpotong */
    line-height: 1.3; 
    
    /* FIX: Animasi Slide-up dengan delay */
    animation: slideUpAndFade 0.8s ease-out 1s forwards; 
    opacity: 0;
}


/* SISI KANAN: FORM LOGIN */
.login-form-side {
    flex: 1;
    background-color: var(--text-light);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

/* WIDGET TOP AREA */
.top-widget-area {
    margin-bottom: 40px;
    text-align: left;
}

/* === WIDGET JAM (iPhone Style Box - Sudah Benar) === */
.clock-widget-box {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    display: inline-flex; 
    flex-direction: column;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(255, 193, 7, 0.4); 
    transition: box-shadow 0.3s ease, transform 0.2s;
    margin-bottom: 15px;
}

.clock-widget-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.6);
}

.widget-time {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 2px;
}

.widget-date {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-dark);
}

.greeting-text {
    font-size: 2em;
    font-weight: 800;
    color: var(--text-dark);
}

/* === FORM PROFESSIONAL STYLE === */
.login-container {
    text-align: left;
    padding: 0;
    border: none;
    box-shadow: none;
}

h2 {
    color: var(--text-dark);
    margin-bottom: 30px;
    font-weight: 800;
    font-size: 2em;
    border-bottom: 4px solid var(--primary-yellow);
    display: inline-block;
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95em;
}

input[type="email"], input[type="password"] {
    width: 100%;
    padding: 14px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

#login-button {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 700;
    margin-top: 20px;
    transition: all 0.3s ease;
}

#login-button:hover {
    background-color: var(--dark-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* FIX: Link Lupa Password (Diposisikan ke kanan) */
.forgot-link {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    text-align: right; 
    display: block; 
    width: 100%;
    margin-top: 10px; 
    font-size: 0.85em; 
    transition: color 0.3s;
    padding-right: 5px;
}

.forgot-link:hover {
    color: var(--dark-yellow);
}


/* === FOOTER KONSISTEN === */
.admin-footer {
    width: 100%;
    background-color: var(--text-dark);
    color: #cccccc;
    padding: 15px 0;
    text-align: center;
    font-size: 0.85em;
    flex-shrink: 0; 
    margin-top: 15px; 
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
}

/* =============================================== */
/* 9. MEDIA QUERY (RESPONSIVE MOBILE)              */
/* =============================================== */

@media (max-width: 768px) {
    
    body {
        overflow-y: auto; 
        align-items: flex-start;
        min-height: auto;
        padding-top: 30px; 
    }

    .login-main-wrapper {
        flex-direction: column;
        width: 95%;
        height: auto; 
        min-height: 0;
        max-width: 450px;
        margin: 0 auto 20px auto; 
        box-shadow: var(--shadow-3d);
        border-radius: 10px;
    }

    .login-image-side {
        display: none; 
    }
    
    .login-form-side {
        width: 100%;
        padding: 30px 20px;
    }

    .clock-widget-box {
        margin: 0 auto 10px auto; 
    }

    .greeting-text {
        font-size: 1.5em; 
    }
    
    .admin-footer {
        position: static; 
        padding: 10px 0;
        margin-top: 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}