/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto:wght@400;700&display=swap');

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Body Styling dengan background gradient dan tekstur halus */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #5c8ebf, #0f2663) !important;
    /* Overlay pattern menggunakan radial gradient */
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.6) 1px, transparent 1px);
    background-size: 40px 40px;
    background-color: #dfe9f3;
    color: #333;
    transition: background 0.5s ease-in-out;
}

/* Login Container */
.login-container {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 900px;
    animation: fadeIn 1s ease-in-out;
    margin: auto;
    /* Pastikan margin auto agar terpusat */
    padding: 0;
}

/* Login Left (Ilustrasi) */
.login-left {
    background: linear-gradient(135deg, #3e406d, #41425b);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-left img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Login Right (Formulir) */
.login-right {
    background-color: #89d6f5;
}

/* Form Login */
.login-form h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 34px;
    color: #333;
}

/* Input Group & Form Control */
.input-group {
    margin-bottom: 20px;
}

.input-group-text {
    background-color: #fff;
}

.form-control {
    padding: 14px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control::placeholder {
    color: #aaa;
}

.form-control:focus {
    border-color: #4e54c8;
    box-shadow: 0 0 8px rgba(78, 84, 200, 0.4);
}

/* Validasi */
.is-invalid {
    border-color: #e74c3c;
    background-color: #fdecea;
}

.invalid-feedback {
    font-size: 14px;
}

/* Tombol Primary */
.btn-primary {
    padding: 14px 0;
    background-color: #4e54c8;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.btn-primary:hover {
    background-color: #3f44a5;
    transform: translateY(-3px);
}

.btn-primary:disabled {
    background-color: #a0a4d0;
    cursor: not-allowed;
}

.btn-primary .spinner-border {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Tombol Toggle Password (Eye) */
.toggle-password-btn {
    border: none;
    background: #e0e0e0;
    /* Warna abu-abu */
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-btn i {
    color: #555;
    /* Warna ikon */
}

.toggle-password-btn:hover {
    background: #ccc;
    /* Warna abu-abu lebih gelap saat hover */
}

.toggle-password-btn:hover i {
    color: #333;
    /* Gelapkan warna ikon saat hover */
}

/* Alert Message */
.alert {
    padding: 15px 20px;
    background-color: #e74c3c;
    color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    font-size: 15px;
    animation: fadeIn 0.5s ease-in-out;
}

/* Link Kembali ke Beranda */
.back-link {
    margin-top: 20px;
    text-align: center;
}

.back-link a {
    color: #4e54c8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link a:hover {
    color: #3f44a5;
}

#usernameIconBtn {
    background: #e0e0e0;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#usernameIconBtn:hover {
    background: #ccc;
}

#usernameIconBtn i {
    color: #555;
}

/* Animasi */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsif */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
    }

    .login-left,
    .login-right {
        padding: 20px;
    }

    .login-left {
        height: auto;
    }
}

@media (max-width: 576px) {
    .login-left {
        display: none;
        /* sembunyikan logo di layar sangat kecil, jika diinginkan */
    }

    .login-form h2 {
        font-size: 28px;
    }

    .btn-primary {
        font-size: 14px;
    }
}