/* Import font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    
    /* === BACKGROUND BARU: PUTIH / ABU-ABU MUDA === */
    background-color: #f0f2f5; /* Warna abu-abu muda yang bersih */
    overflow: hidden;
    position: relative;
}

/* === METEOR & TECH LINES BACKGROUND === */
.tech-lines-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden;
}
.tech-line {
    position: absolute; background: linear-gradient(90deg, transparent, #004a99, transparent);
    height: 2px; width: 150px; opacity: 0.3; border-radius: 2px; box-shadow: 0 0 10px #004a99;
}
.meteor-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; transform: rotateZ(-45deg);
}
.meteor {
    position: absolute; top: 50%; left: 50%; height: 2px;
    background: linear-gradient(to right, rgba(0,74,153,0), rgba(0,74,153,1));
    opacity: 0; animation: meteor-fall linear infinite;
}
@keyframes meteor-fall {
    0% { transform: translateX(0); opacity: 1; }
    70% { opacity: 1; }
    100% { transform: translateX(-800px); opacity: 0; }
}

/* Wrapper utama untuk menampung 2 panel */
.login-wrapper {
    width: 900px;
    max-width: 95%;
    height: 580px; /* Ditambah sedikit agar muat tanpa scroll */
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    
    /* Bayangan yang lebih lembut untuk tema putih */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    background-color: #ffffff; /* Latar belakang utama jadi putih */
}

/* === PANEL KIRI (BRANDING) === */
.left-panel {
    flex: 1;
    padding: 2rem; /* Dikurangi sedikit */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* === GRADASI BARU: PUTIH / LIGHT MODE === */
    /* Gradasi lembut dari biru muda ke hijau muda */
    background: linear-gradient(135deg, #E6F7FF 0%, #EBF9F1 100%); 
    
    /* Teks harus gelap di latar belakang terang */
    color: #004a99; /* Warna biru tua dari logo */
}

.left-panel .logo {
    width: 280px; /* Diperkecil sedikit agar proporsional */
}

.left-panel .welcome-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.left-panel .tagline {
    font-size: 1rem;
    color: #0056b3;
}

/* === PANEL KANAN (FORM LOGIN) === */
.right-panel {
    flex: 1;
    padding: 2.5rem 3rem; /* Dikurangi agar tidak sesak */
    background: #ffffff;
    color: #333;
    overflow: hidden; /* Paksa hilangkan scrollbar */
}

.right-panel h2 {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.2rem;
    color: #333;
}

/* Tombol Tab Pilihan */
.tab-buttons {
    display: flex;
    background-color: #e9ecef;
    border-radius: 10px;
    margin-bottom: 1.5rem; /* Dikurangi */
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 0.8rem; /* Dikurangi */
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background-color: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    /* === GRADASI BARU: AKTIP TAB === */
    background: linear-gradient(90deg, #004a99 0%, #00BFFF 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

/* --- Style untuk Form --- */
.login-form { display: none; }
.login-form.active { display: block; }

.input-group { margin-bottom: 1.2rem; } /* Dikurangi */

.input-group label {
    display: block;
    margin-bottom: 0.4rem; /* Dikurangi */
    font-weight: 500;
    color: #555;
}

.input-with-icon { position: relative; }

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.input-with-icon input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem; /* Dikurangi sedikit */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #f7f7f7;
    color: #333;
    transition: all 0.3s ease;
}

.input-with-icon input::placeholder {
    color: #aaa;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #004a99;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 74, 153, 0.1);
}
.input-with-icon input:focus + i {
    color: #004a99;
}

/* Tombol Login (Hijau) */
.login-button {
    width: 100%;
    padding: 1rem; /* Dikurangi */
    border: none;
    border-radius: 8px;
    
    /* === GRADASI BARU: TOMBOL LOGIN === */
    background: linear-gradient(90deg, #5aab5e 0%, #66BB6A 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem; /* Dikurangi */
    box-shadow: 0 5px 15px rgba(102, 187, 106, 0.4);
}

.login-button:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 187, 106, 0.5);
}

.forgot-password {
    display: block;
    margin-top: 1.2rem;
    text-align: center;
    color: #004a99; /* Warna Biru Tua */
    text-decoration: none;
    font-size: 0.95rem;
}

/* --- Form RFID --- */
.rfid-form {
    text-align: center;
    padding: 1rem 0;
}

.rfid-icon {
    fill: #004a99; /* Ikon RFID Biru Tua */
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
}

.rfid-form h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.rfid-form p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    color: #666;
}

.scanner-animation {
    width: 80%;
    height: 5px;
    background-color: #e9ecef;
    overflow: hidden;
    border-radius: 5px;
    margin: 0 auto;
}

.scanner-line {
    width: 100%;
    height: 5px;
    /* === GRADASI BARU: SCANNER === */
    background: linear-gradient(to right, transparent, #66BB6A, transparent); /* Gradasi Hijau */
    box-shadow: 0 0 15px #66BB6A, 0 0 8px #66BB6A;
    animation: scan 2s infinite linear;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Tambahan Fitur Login Baru --- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #004a99;
}

.remember-me label {
    margin-bottom: 0 !important;
    cursor: pointer;
}

.forgot-password {
    margin-top: 0 !important;
    color: #004a99;
    font-weight: 500;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.register-link a {
    color: #004a99;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

.register-link a:hover {
    color: #00BFFF;
    text-decoration: underline;
}

/* Penyesuaian untuk layar kecil (Mobile) */
@media (max-width: 900px) {
    body {
        align-items: flex-start; /* Biar bisa scroll */
    }
    .login-wrapper {
        flex-direction: column;
        width: 95%;
        height: auto;
        max-width: 450px;
        margin: 2rem 0;
    }
    .left-panel { border-radius: 20px 20px 0 0; padding: 2rem; }
    .right-panel { border-radius: 0 0 20px 20px; padding: 2rem; }
}