/* =================================================================
   VARIABEL & KONFIGURASI GLOBAL
   ================================================================= */
:root {
    --md-primary: #1976D2;
    --md-primary-light: #63A4FF;
    --md-primary-dark: #004BA0;
    --md-secondary: #03DAC6;
    --md-on-primary: #FFFFFF;
    --md-on-secondary: #000000;
    --md-surface: #FFFFFF;
    --md-background: #F5F5F5;
    --md-error: #B00020;
    --md-on-error: #FFFFFF;
    --md-text-primary: rgba(0, 0, 0, 0.87);
    --md-text-secondary: rgba(0, 0, 0, 0.60);
    --md-text-disabled: rgba(0, 0, 0, 0.38);
    --md-divider: rgba(0, 0, 0, 0.12);
    --shadow-1: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
    --shadow-2: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
    --shadow-3: 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12);
    --shadow-4: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
    --shadow-6: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);
    --shadow-8: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);
}

/* =================================================================
   BASE STYLES & ANIMATIONS
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Open Sans', sans-serif;
    font-size: 14px;
    background: linear-gradient(-45deg, #f7f9fc, #a3e4ff, #82cff4, #ffffff);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--md-text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes ripple-animation {
    to { transform: scale(4); opacity: 0; }
}

/* =================================================================
   KOMPONEN UTAMA (KONTAINER & KARTU)
   ================================================================= */
.main-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    background-color: var(--md-surface);
    border-radius: 16px;
    box-shadow: var(--shadow-8);
    overflow: hidden;
    min-height: 600px;
}

.info-section {
    flex: 1;
    background: linear-gradient(135deg, var(--md-primary), var(--md-primary-light));
    color: var(--md-on-primary);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0.6;
}

.info-content { position: relative; z-index: 1; }

.info-logo {
    width: 80px; height: 80px; font-size: 36px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: var(--md-on-primary);
    box-shadow: var(--shadow-2);
    backdrop-filter: blur(10px);
    animation: float 3s ease-in-out infinite;
}

.info-title { font-size: 32px; font-weight: 500; margin-bottom: 16px; animation: slideInLeft 0.6s ease-out; }
.info-subtitle { font-size: 18px; margin-bottom: 32px; opacity: 0.9; animation: slideInLeft 0.8s ease-out; }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-item {
    display: flex; align-items: center;
    margin-bottom: 16px; font-size: 16px;
}
.feature-item i {
    margin-right: 12px; font-size: 20px;
    background: rgba(255, 255, 255, 0.2);
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 48px 32px;
    display: flex; flex-direction: column; justify-content: center;
    background-color: var(--md-surface);
}

.login-card {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
}

/* =================================================================
   FORM LOGIN
   ================================================================= */
.login-header {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeIn 0.6s ease-out;
}

.login-logo {
    width: 64px; height: 64px; font-size: 24px;
    margin: 0 auto 16px;
    background: var(--md-primary);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: var(--md-on-primary);
    box-shadow: var(--shadow-2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-title { font-size: 24px; font-weight: 500; color: var(--md-text-primary); margin-bottom: 8px; }
.login-subtitle { color: var(--md-text-secondary); font-size: 14px; }

.login-form { margin-bottom: 16px; }

.form-floating {
    margin-bottom: 24px;
    position: relative;
}

.form-floating > .form-control {
    height: 56px;
    padding-left: 48px;
    font-size: 16px;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--md-divider);
    color: var(--md-text-primary);
    border-radius: 0;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-floating > .form-control:focus {
    border-bottom-color: var(--md-primary);
    box-shadow: none;
    color: var(--md-text-primary);
    outline: none;
    background-color: rgba(25, 118, 210, 0.04);
}

.form-floating > label {
    padding-left: 48px;
    font-size: 16px;
    color: var(--md-text-secondary);
    transform: translateY(12px) scale(1);
    transition: all 0.2s ease;
    pointer-events: none;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~label {
    transform: translateY(-6px) scale(0.85);
    color: var(--md-primary);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 18px;
    color: var(--md-text-secondary);
    z-index: 10;
    font-size: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.form-floating > .form-control:focus ~ .input-icon {
    color: var(--md-primary);
    transform: scale(1.1);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 18px;
    color: var(--md-text-secondary);
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.form-check { display: flex; align-items: center; }
.form-check-input { margin-right: 8px; width: 18px; height: 18px; cursor: pointer; }
.form-check-label { font-size: 14px; color: var(--md-text-secondary); cursor: pointer; }

.forgot-password {
    color: var(--md-primary);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease, color 0.2s ease;
}

/* =================================================================
   TOMBOL & SPINNER
   ================================================================= */
.login-btn {
    width: 100%;
    height: 50px;
    border-radius: 24px;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-2);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-2);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

/* Efek Ripple */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

/* =================================================================
   KOMPONEN TAMBAHAN
   ================================================================= */
.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}
.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--md-divider);
}
.divider span {
    background-color: var(--md-surface);
    padding: 0 16px;
    color: var(--md-text-secondary);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.social-login {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.social-btn {
    flex: 1;
    height: 48px;
    border-radius: 24px;
    border: 1px solid var(--md-divider);
    background-color: var(--md-surface);
    color: var(--md-text-primary);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-1);
}

/* =================================================================
   NOTIFIKASI TOAST
   ================================================================= */
#toastNotif {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 260px;
    background-color: var(--md-surface);
    color: var(--md-text-primary);
    padding: 16px;
    border-radius: 4px;
    box-shadow: var(--shadow-6);
    font-size: 14px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 9999;
}
#toastNotif i { font-size: 20px; }
.toast-success { border-left: 4px solid var(--md-secondary); }
.toast-error { border-left: 4px solid var(--md-error); }
.toast-info { border-left: 4px solid var(--md-primary); }

/* =================================================================
   RESPONSIVE & UTILITAS
   ================================================================= */
@media (max-width: 992px) {
    .main-container {
        max-width: 500px;
        background: linear-gradient(135deg, #2563eb, #38bdf8, #0ea5e9);
        min-height: auto;
        flex-direction: column;
        box-shadow: none;
    }
    .info-section { display: none; }
    .login-container {
        max-width: 100%;
        padding: 32px 24px;
    }
    .login-card {
        background-color: var(--md-surface);
        border-radius: 16px;
        padding: 24px;
        box-shadow: none;
    }
}

@media (max-width: 576px) {
    body { padding: 10px; }
    .login-container { padding: 24px 16px; }
    .login-card { padding: 20px; }
    .login-header { margin-bottom: 24px; }
    .social-login { flex-direction: row; gap: 12px; }
    .social-btn { flex: 1; font-size: 13px; }
    .main-container, .login-card, .login-logo, .login-btn, .social-btn, #toastNotif {
        box-shadow: none !important;
    }
}

.form-disabled { opacity: 0.6; pointer-events: none; }
.form-floating.focused > label { color: var(--md-primary) !important; }
.form-floating.focused > .input-icon { color: var(--md-primary) !important; }

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--md-background); }
::-webkit-scrollbar-thumb { background: var(--md-primary); border-radius: 4px; }