/**
 * LOGIN.CSS - Desain Halaman Login (Glassmorphism & Background)
 * Prefix class unik: lgn-
 */

.lgn-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Background setup using bg.png */
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 1.5rem;
    position: relative;
}

/* Optional overlay to make text more readable if bg.png is too bright/dark */
.lgn-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 1;
}

.lgn-card {
    position: relative;
    z-index: 2; /* Put above the overlay */
    
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px; /* Disesuaikan dengan aturan card global 12px */
    padding: 2rem; /* Disesuaikan dengan aturan padding global 2rem */
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Micro-animation on load */
    animation: lgnFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lgnFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lgn-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.lgn-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.lgn-header h1 {
    color: #1f2937; /* Dark gray for contrast on light glass */
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.lgn-header p {
    color: #4b5563;
    font-size: 0.95rem;
}

.lgn-error {
    background-color: rgba(254, 226, 226, 0.9);
    color: #dc2626;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid #fca5a5;
    animation: lgnShake 0.4s ease-in-out;
}

@keyframes lgnShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.lgn-error .material-symbols-rounded {
    font-size: 20px;
}

.lgn-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lgn-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lgn-input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.lgn-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.lgn-input-icon {
    position: absolute;
    left: 1.2rem;
    color: #6b7280;
    font-size: 20px;
    transition: color 0.3s ease;
}

.lgn-input-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    transition: all 0.3s ease;
}

.lgn-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 215, 96, 0.15);
    background-color: #ffffff;
}

.lgn-input-wrapper input:focus + .lgn-input-icon {
    color: var(--primary);
}

.lgn-btn {
    width: 100%;
    padding: 0.85rem;
    background-color: var(--primary);
    color: #000000;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s cubic-bezier(0.3, 0, 0, 1);
    box-shadow: 0 4px 12px rgba(30, 215, 96, 0.2);
}

.lgn-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 215, 96, 0.3);
}

.lgn-btn:active {
    transform: translateY(0);
}

.lgn-footer {
    text-align: center;
    margin-top: 2rem;
    color: #6b7280;
}
