/* ===== AUTH PAGE CSS (Login & Register) ===== */
/* Background: Gradient Hijau-Kuning seperti gambar */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* ===== CONTAINER ===== */
.auth-container {
    display: flex;
    height: 100vh;
    background: linear-gradient(135deg, #e8f5e9 0%, #f4f4a3 50%, #fff9c4 100%);
}

/* ===== LEFT SECTION (Form) ===== */
.auth-left {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.auth-left.register-form {
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 60px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 50px 45px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.login-title {
    font-size: 42px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.login-subtitle {
    font-size: 15px;
    color: #718096;
    margin-bottom: 35px;
}

.link-primary {
    color: #2d3748;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.link-primary:hover {
    color: #4a5568;
}

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideDown 0.4s ease;
}

.alert-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.alert i {
    font-size: 18px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 10px;
}

.required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: #2d3748;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: #6B5FAB;
    background: white;
    box-shadow: 0 0 0 4px rgba(107, 95, 171, 0.1);
}

.form-control::placeholder {
    color: #a0aec0;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #718096;
}

.form-text.error {
    color: #ef4444;
}

.form-text.success {
    color: #10b981;
}

/* ===== PASSWORD WRAPPER ===== */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 90px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    background: #f1f5f9;
    color: #2d3748;
}

.toggle-password i {
    font-size: 14px;
}

/* ===== FORM FOOTER ===== */
.form-footer {
    margin-bottom: 30px;
}

.forgot-password {
    font-size: 14px;
    color: #2d3748;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #4a5568;
}

/* ===== BUTTON ===== */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: #9e9e9e;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-login:hover {
    background: #757575;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 18px;
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== RIGHT SECTION (Brand) ===== */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.9) 0%, rgba(205, 220, 57, 0.8) 100%);
    position: relative;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.brand-section {
    text-align: center;
    z-index: 1;
    position: relative;
}

.logo-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.logo-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.brand-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    font-size: 18px;
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 40px;
}

.register-info {
    text-align: left;
    max-width: 400px;
    margin: 40px auto 0;
}

.register-info p {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #1a202c;
    margin-bottom: 16px;
    font-weight: 500;
}

.register-info i {
    color: #2d5016;
    font-size: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .auth-left {
        flex: 0 0 50%;
    }
    
    .login-card {
        padding: 40px 35px;
    }
    
    .login-title {
        font-size: 36px;
    }
    
    .brand-title {
        font-size: 30px;
    }
    
    .logo-container {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-left {
        flex: 1;
        padding: 30px 20px;
    }
    
    .auth-left.register-form {
        padding-top: 30px;
    }
    
    .login-card {
        padding: 30px 25px;
        max-width: 100%;
    }
    
    .login-title {
        font-size: 28px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .auth-right {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
        border-radius: 16px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .btn-login {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ===== LOADING STATE ===== */
.btn-login.loading {
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== VALIDATION STATES ===== */
.form-control.is-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-control.is-valid {
    border-color: #10b981;
    background: #f0fdf4;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}
