/* =========================================
   1. GLOBAL RESET & BACKGROUND SETUP
   ========================================= */
:root {
    --primary-blue: #004aad;
    --secondary-blue: #007bff;
    --accent-yellow: #ffcc00;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Inter', "Segoe UI", sans-serif;
    overflow: hidden;
    /* Background Dasar Biru Erablue agar animasi terlihat */
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================
   2. ANIMASI BACKGROUND (DARI FIGMA)
   ========================================= */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Di belakang login container */
    overflow: hidden;
    pointer-events: none; /* Agar tidak mengganggu klik */
}

/* --- Orbs (Bola Cahaya) --- */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.orb-1 {
    width: 24rem; height: 24rem;
    background: linear-gradient(45deg, #ffcc00, #f5c400);
    top: 10%; left: 15%;
    animation: floatOrb1 8s infinite;
}
.orb-2 {
    width: 20rem; height: 20rem;
    background: linear-gradient(135deg, #004aad, #007bff);
    bottom: 10%; right: 10%;
    opacity: 0.4;
    animation: floatOrb2 10s infinite;
}
.orb-3 {
    width: 16rem; height: 16rem;
    background: linear-gradient(45deg, #ffcc00, #f5c400);
    top: 50%; right: 20%;
    opacity: 0.3;
    animation: floatOrb3 12s infinite;
}

@keyframes floatOrb1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(50px, 30px) scale(1.1); } }
@keyframes floatOrb2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, -50px) scale(1.2); } }
@keyframes floatOrb3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-40px, 40px) scale(1.15); } }

/* --- SVG Lines --- */
.abstract-lines {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.3;
}
.draw-path {
    fill: none;
    stroke-width: 2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 8s linear infinite;
}
.path-1 { animation-duration: 6s; }
.path-2 { animation-duration: 8s; animation-delay: 0.5s; }
.path-3 { animation-duration: 10s; animation-delay: 1s; }

@keyframes drawLine {
    0% { stroke-dashoffset: 1000; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1000; }
}

/* --- Geometric Shapes --- */
.geo-shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1;
}
.square-spin {
    top: 20%; left: 70%;
    width: 8rem; height: 8rem;
    border-color: rgba(253, 224, 71, 0.3);
    animation: spin 20s linear infinite;
}
.circle-pulse {
    bottom: 30%; left: 10%;
    width: 6rem; height: 6rem;
    border-radius: 50%;
    animation: spinPulse 15s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spinPulse { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(-180deg) scale(1.2); } 100% { transform: rotate(-360deg) scale(1); } }

/* --- Particles --- */
.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: rgba(253, 224, 71, 0.4);
    border-radius: 50%;
    animation: floatParticle 8s ease-in-out infinite;
}
.p-1 { left: 10%; top: 20%; animation-duration: 6s; }
.p-2 { left: 80%; top: 10%; animation-duration: 9s; animation-delay: 1s; }
.p-3 { left: 40%; top: 60%; animation-duration: 7s; animation-delay: 2s; }
.p-4 { left: 70%; top: 80%; animation-duration: 11s; animation-delay: 0.5s; }
.p-5 { left: 20%; top: 90%; animation-duration: 8s; animation-delay: 3s; }
@keyframes floatParticle {
    0%, 100% { transform: translateY(0); opacity: 0.2; }
    50% { transform: translateY(-100px); opacity: 0.8; }
}


/* =========================================
   3. LOGIN CONTAINER (DESIGN LAMA/ORIGINAL)
   ========================================= */
.login-container {
    position: relative;
    z-index: 10; /* Pastikan di atas background */
    
    /* STYLE KARTU LAMA: Solid White, Bersih, Tegas */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 40px;
    border-radius: 16px;
    width: 350px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); /* Shadow sedikit lebih gelap biar kontras sama background biru */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    
    /* TIDAK ADA ANIMASI PADA CONTAINER */
}

.logo {
    width: 300px;
    margin-bottom: 10px;
}

.login-container h2 {
    color: #004aad;
    font-weight: 800;
    margin-bottom: 5px;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
}

.login-container h3 {
    color: #666;
    font-size: 15px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 30px;
}

/* BUTTON */
button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #004aad 0%, #0066cc 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    margin-top: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 74, 173, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 74, 173, 0.4);
}

/* INPUT FIELDS (STYLE LAMA) */
.floating-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.floating-input {
    width: 100%;
    padding: 14px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #f9f9f9; /* Solid Grey */
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
    font-weight: 500;
}

.floating-input:focus {
    border-color: #004aad;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 74, 173, 0.1);
}

.floating-label {
    position: absolute;
    left: 14px;
    top: 16px;
    color: #999;
    font-size: 14px;
    pointer-events: none;
    transition: all 0.2s;
    background: transparent;
    font-weight: 500;
}

.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label,
.floating-input:-webkit-autofill + .floating-label {
    top: -9px;
    left: 10px;
    font-size: 12px;
    color: #004aad;
    background: white;
    padding: 0 4px;
    font-weight: 700;
}

/* 7. FOOTER */
.footer {
    font-size: 0.8em;
    margin-top: 20px;
    color: #0066cc;
    font-weight: bold;
}

.copyright {
    font-size: 0.7em;
    margin-top: 20px;
    color: #888;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    margin-bottom: 15px;
    border-left: 4px solid #c62828;
    text-align: left;
    font-size: 0.9rem;
}

/* Password container */
#passwordInput {
    padding-right: 45px; 
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px; 
    transform: translateY(-50%); 
    cursor: pointer;
    color: #999; 
    font-size: 18px;
    z-index: 10;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #004aad;
}

/* Mobile Responsive */
@media screen and (max-width: 720px) {
    body { 
        padding: 0px; 
        align-items: center !important; 
    }

    .login-container { 
        width: 80%;
        padding: 30px 20px;
    }

    .login-container h2 {
        font-size: 1.4rem;
    }
    .floating-input {
        font-size: 16px; 
    }
    
    .floating-label {
        font-size: 14px;
    }
}

/* CHANGE PASSWORD PAGE */
.floating-input[type="password"],
.floating-input[type="text"] {
    padding-right: 45px !important;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 18px;
    z-index: 10;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #004aad;
}

.change-password-page .login-container {
    max-width: 400px; 
    padding-top: 30px;
    padding-bottom: 30px;
}

.change-password-page .login-container h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.change-password-page button {
    margin-top: 25px;
}

@media screen and (max-width: 480px) {
    .change-password-page .login-container {
        width: 85%;
        max-width: 100%;
        padding: 25px 20px;
    }
    
    .change-password-page {
        padding-bottom: 50px; 
    }
}