@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-light: #f8f9fa;
    --bg-form: #FFFFFF;
    --text-dark: #212529;
    --text-secondary: #6C757D;
    --accent-color: #14B8A6;
    --accent-hover: #0F766E;
    --accent-gradient: linear-gradient(135deg, #14B8A6 0%, #0F766E 100%);
    --border-color: #DEE2E6;
    --input-bg: #F1F3F5;
    --font-family: 'Inter', sans-serif;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    overflow: hidden; /* Mencegah scrollbar dari elemen animasi */
}

.login-container {
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    display: flex;
    background-color: var(--bg-form);
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px var(--shadow-color);
    position: relative;
    overflow: hidden;
    animation: fadeInContainer 0.8s ease-out forwards;
}

@keyframes fadeInContainer {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Kolom Kiri - Branding */
.login-branding {
    flex: 1;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    z-index: 2;
    transform: translateX(-100%);
    animation: slideInLeft 1s ease-out 0.3s forwards;
}

@keyframes slideInLeft {
    to { transform: translateX(0); }
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -150px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transform: scale(0);
    animation: popIn 0.8s ease-out 1s forwards;
}

@keyframes popIn {
    to { transform: scale(1); }
}

.branding-content {
    text-align: center;
    animation: fadeInContent 0.6s ease-out 1.2s forwards;
    opacity: 0;
}

@keyframes fadeInContent {
    to { opacity: 1; }
}

.branding-content .logo {
    font-size: 3rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.branding-content .tagline {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 300px;
    opacity: 0.9;
}

/* Kolom Kanan - Form */
.login-form-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.login-form-content {
    width: 100%;
    max-width: 380px;
}

/* Animasi untuk elemen form */
.login-form-content > * {
    opacity: 0;
    animation: fadeInStagger 0.6s ease-out forwards;
}
.login-form-content .auth-header { animation-delay: 1.2s; }
.login-form-content .alert { animation-delay: 1.3s; }
.login-form-content form .form-group:nth-child(1) { animation-delay: 1.4s; }
.login-form-content form .form-group:nth-child(2) { animation-delay: 1.5s; }
.login-form-content form .auth-footer { animation-delay: 1.6s; }
.login-form-content form .btn-auth { animation-delay: 1.7s; }

@keyframes fadeInStagger {
    from { transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header { text-align: left; margin-bottom: 2rem; }
.auth-header h2 { font-size: 2rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.auth-header p { font-size: 1rem; }

.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; }
.input-wrapper { position: relative; }

.form-control {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 14px 20px 14px 50px;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    font-size: 1rem;
}
.form-control:focus {
    background-color: var(--bg-form);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
    outline: none;
}
.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: color 0.2s ease-in-out;
}
.form-control:focus ~ .input-icon { color: var(--accent-color); }
.toggle-password { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--text-secondary); }
.toggle-password:hover { color: var(--accent-color); }

.auth-footer { text-align: right; margin-bottom: 1.5rem; }
.auth-footer a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; }
.auth-footer a:hover { color: var(--accent-color); text-decoration: underline; }

.btn-auth {
    width: 100%;
    padding: 15px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(20, 184, 166, 0.3);
}
.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.4);
}

.alert { 
    padding: 0.8rem 1rem;
    border-radius: 0.5rem; 
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.alert-danger {
    background-color: #f8d7da; 
    border-color: #f5c6cb; 
    color: #721c24; 
}

/* Desain Responsif untuk Mobile */
@media (max-width: 992px) {
    .login-branding { display: none; } /* Sembunyikan kolom kiri pada tablet/mobile */
    .login-form-wrapper {
        flex: 1;
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    body { padding: 0; }
    .login-container {
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }
    .login-form-wrapper {
        padding: 2rem 1.5rem;
    }
    .auth-header h2 { font-size: 1.8rem; }
}