@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    --bg-gradient: linear-gradient(135deg, #e0e7ff 0%, #fae8ff 100%);
    --dark-bg: linear-gradient(135deg, #1e1e38 0%, #2d2b55 100%);
    --font-poppins: 'Poppins', sans-serif;
    --font-inter: 'Inter', sans-serif;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

body.login-page-custom {
    background: var(--bg-gradient);
    font-family: var(--font-inter);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* Wrapper Utama */
.login-container-custom {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card */
.login-card-custom {
    width: 900px;
    height: 520px;
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    display: flex;
}

/* Panel Kiri (Desktop Only) */
.login-left-custom {
    position: relative;
    width: 55%;
    height: 100%;
    background: var(--dark-bg);
    clip-path: polygon(0 0, 100% 0, 68% 100%, 0 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px;
    color: #ffffff;
    z-index: 2;
    box-sizing: border-box;
}

.login-left-content {
    max-width: 72%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Logo */
.login-logo-custom {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img-custom {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.logo-text-app {
    font-family: var(--font-poppins);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.logo-text-app span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Main Text & Slogan */
.login-slogan-area {
    margin-top: -20px;
}

.login-slogan-title {
    font-family: var(--font-poppins);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.login-slogan-desc {
    font-size: 13.5px;
    color: #cbd5e1;
    line-height: 1.6;
    font-weight: 300;
}

/* Tombol Panduan */
.login-left-footer .btn-guide-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.login-left-footer .btn-guide-custom:hover {
    background: #ffffff;
    color: #1e1e38;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Divider Badge (Overlapping Circle) */
.divider-badge-custom {
    position: absolute;
    left: 46.5%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    z-index: 10;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 1), 0 8px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.divider-badge-custom i {
    transition: transform 0.3s ease;
}

.divider-badge-custom:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 1), 0 10px 25px rgba(99, 102, 241, 0.4);
}

.divider-badge-custom:hover i {
    transform: translateX(2px);
}

/* Panel Kanan (Formulir Login) */
.login-right-custom {
    width: 45%;
    height: 100%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: auto;
    z-index: 1;
    box-sizing: border-box;
}

.login-right-header {
    margin-bottom: 30px;
}

.login-right-title {
    font-family: var(--font-poppins);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.login-right-subtitle {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0;
}

/* Form Styling */
.form-group-custom {
    position: relative;
    margin-bottom: 20px;
}

.form-group-custom .input-icon-left {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-group-custom .input-control-custom {
    width: 100%;
    box-sizing: border-box;
    border-radius: 50px;
    border: 1.5px solid var(--border-color);
    padding: 12px 20px 12px 46px;
    font-size: 14px;
    color: #334155;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    font-family: var(--font-inter);
}

.form-group-custom select.input-control-custom {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.form-group-custom select.input-control-custom + .input-icon-right-select {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none;
}

.form-group-custom .input-control-custom:focus {
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-group-custom .input-control-custom:focus ~ .input-icon-left {
    color: #6366f1;
}

/* Toggle Password Visibility */
.form-group-custom .password-toggle-custom {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s ease;
}

.form-group-custom .password-toggle-custom:hover {
    color: #6366f1;
}

/* Checkbox & Links Area */
.form-options-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
    color: var(--text-secondary);
}

.remember-me-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-me-custom input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

.forgot-link-custom {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link-custom:hover {
    text-decoration: underline;
    color: #4f46e5;
}

/* Submit Button */
.btn-submit-custom {
    width: 100%;
    padding: 12px 24px;
    border-radius: 50px;
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    font-weight: 600;
    font-size: 15px;
    font-family: var(--font-poppins);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-submit-custom:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-submit-custom:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit-custom:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* Spinner */
.spinner-custom {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

.btn-submit-custom:disabled .spinner-custom {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer Copyright */
.login-right-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 11.5px;
    color: #a0aec0;
}

/* Toast Notification Kustom */
.custom-toast {
    position: fixed;
    top: -100px;
    right: 20px;
    background: #ffffff;
    border-left: 5px solid #ef4444;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    width: calc(100% - 40px);
    max-width: 420px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-sizing: border-box;
}

.custom-toast.show {
    top: 20px;
}

.custom-toast.success {
    border-left-color: #22c55e;
}

.custom-toast.info {
    border-left-color: #3b82f6;
}

.custom-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.custom-toast.error .custom-toast-icon {
    color: #ef4444;
}

.custom-toast.success .custom-toast-icon {
    color: #22c55e;
}

.custom-toast.info .custom-toast-icon {
    color: #3b82f6;
}

.custom-toast-message {
    font-size: 13.5px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

/* Responsive / Mobile View */
@media (max-width: 991px) {
    .login-card-custom {
        width: 100%;
        max-width: 440px;
        height: auto;
        flex-direction: column;
        border-radius: 20px;
    }

    .login-left-custom {
        display: none;
    }

    .divider-badge-custom {
        display: none;
    }

    .login-right-custom {
        width: 100%;
        padding: 40px 30px;
    }
    
    .login-right-title {
        font-size: 22px;
    }
}
