/* css/login.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    /* Latar belakang split-screen (Gradien Biru) */
    background: linear-gradient(135deg, #0c074e, #000000);
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Bahagian Kiri: Hiasan Teks */
.left-decoration {
    flex: 1;
    padding: 4rem;
    color: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 0;
}

.left-decoration h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.left-decoration p {
    font-size: 1.2rem;
    font-weight: 300;
}

/* CONTAINER BORANG (Kanan) */
.login-container {
    width: 50%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
    padding: 40px;
    overflow-y: auto;
    
    /* Animasi Masuk */
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Trigger Animasi bila body ada class 'loaded' */
body.loaded .login-container {
    transform: translateX(0);
    opacity: 1;
}

.login-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Header & Logo */
.login-header {
    margin-bottom: 2.5rem;
}

.logo-container {
    width: 80px;
    height: 80px;
    /* Background gradient digantikan dengan warna solid telus atau hex */
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 200, 120, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #4a90e2;
    font-size: 2rem;
    border: 2px solid rgba(74, 144, 226, 0.2);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.2);
}

.logo-container:hover {
    transform: rotate(15deg) scale(1.1);
}

.login-header h2 {
    color: #333;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Form Group & Input */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 8px;
    color: #4a90e2;
    width: 20px;
    text-align: center;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 0.8rem;
    border: 2px solid #eef2f7;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    background-color: #f9fbfd;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: #fff;
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
    outline: none;
}

/* Button */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(90deg, #4a90e2, #357abd);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    font-family: 'Poppins', sans-serif;
    margin-top: 1rem;
}

.btn i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
    /* Warna hover sedikit lebih gelap */
    background: linear-gradient(90deg, #357abd, #2a6bb0);
}

.btn:active {
    transform: translateY(0);
}

/* Alert Error */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    animation: slideDown 0.4s ease-out;
    border-left: 4px solid #c33;
}

.alert-danger {
    color: #c33;
    background-color: #fee;
    border: 1px solid #f5c6cb;
}

.alert-danger i {
    margin-right: 10px;
    font-size: 1.1rem;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsif untuk Mobile */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
    }
    
    .left-decoration {
        display: none;
    }
    
    .login-container {
        width: 100%;
        position: relative;
        height: auto;
        min-height: 100vh;
        right: auto;
        transform: none;
        opacity: 1;
    }
}