:root {
    --navy-900: #0B1120;
    --navy-800: #111827;
    --navy-700: #1E293B;
    --navy-600: #334155;
    --slate-500: #64748B;
    --slate-400: #94A3B8;
    --slate-300: #CBD5E1;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --gold-500: #FBAA06;
    --gold-400: #FBAA06;
    --gold-300: #FBAA06;
    --gold-200: #FBAA06;
    --gold-100: #FBAA06;
    --gold-gradient: linear-gradient(135deg, #D4A853 0%, #E2BE6E 50%, #D4A853 100%);
    --surface-white: #FFFFFF;
    --surface-50: #FAFBFC;
    --border-light: #E5E7EB;
    --border-focus: #D4A853;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);
    --shadow-gold: 0 4px 20px rgba(212, 168, 83, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Urbanist', sans-serif;
    background: var(--surface-white);
    min-height: 100vh;
    overflow: hidden;
}

/* ─── LAYOUT ─── */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ─── LEFT PANEL ─── */
.left-panel {
    position: relative;
    width: 52%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-shrink: 0;
}

.left-panel__bg {
    position: absolute;
    inset: 0;
    background: url('/assets/images/left-banner.jpg') center/cover no-repeat;
    transform: scale(1.08);
    transition: transform 8s ease;
}

.left-panel__bg.loaded {
    transform: scale(1);
}

.left-panel__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(11, 17, 32, 0.15) 0%,
            rgba(11, 17, 32, 0.4) 40%,
            rgba(11, 17, 32, 0.88) 75%,
            rgba(11, 17, 32, 0.96) 100%);
}

.left-panel__content {
    position: relative;
    z-index: 2;
    padding: 3.5rem 3.5rem 4rem;
    color: #fff;
}

.left-panel__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 12px;
    background: rgba(212, 168, 83, 0.15);
    border: 1px solid rgba(212, 168, 83, 0.3);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-300);
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

.left-panel__badge i {
    font-size: 0.6rem;
    color: var(--gold-500);
}

.left-panel__title {
    font-family: 'Urbanist', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: #fff;
}

.left-panel__title span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.left-panel__subtitle {
    font-family: 'Karla', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--slate-300);
    max-width: 420px;
    margin-bottom: 2.5rem;
}

.left-panel__features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.feature-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 168, 83, 0.3);
    transform: translateY(-2px);
}

.feature-chip__icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(212, 168, 83, 0.15);
    color: var(--gold-400);
    font-size: 0.85rem;
}

.feature-chip__text {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-200);
    letter-spacing: 0.01em;
}

/* ─── Decorative top-left branding ─── */
.left-panel__deco {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.deco-logo {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(12px);
    color: var(--gold-400);
    font-size: 1.1rem;
}

.deco-brand {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

/* ─── RIGHT PANEL ─── */
.right-panel {
    width: 48%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: var(--surface-white);
    position: relative;
}

.right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, var(--border-light) 30%, var(--border-light) 70%, transparent 100%);
}

.form-container {
    width: 100%;
    max-width: 420px;
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 2rem;
}

.form-logo__img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--navy-900);
    padding: 10px;
}

.form-logo__text {
    display: flex;
    flex-direction: column;
}

.form-logo__name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.form-logo__name span {
    color: var(--gold-500);
}

.form-logo__tag {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--slate-500);
}

.form-header__welcome {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-900);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.form-header__sub {
    font-family: 'Karla', sans-serif;
    font-size: 0.92rem;
    color: var(--slate-500);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-header__sub i {
    font-size: 0.75rem;
    color: var(--gold-500);
}

/* ─── ALERTS ─── */
.alert {
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
    padding: 12px 16px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert .close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
    padding: 0;
}

.alert .close:hover {
    opacity: 0.8;
}

.alert-warning {
    background: rgba(220, 53, 69, 0.05);
    border-color: rgba(220, 53, 69, 0.20);
    color: #b91c1c;
}

.alert-success {
    background: rgba(212, 168, 83, 0.08);
    border-color: rgba(212, 168, 83, 0.25);
    color: var(--gold-500);
}

/* ─── FORM ─── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group-custom {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group-custom label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--navy-700);
    letter-spacing: 0.03em;
}

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

.input-wrapper__icon {
    position: absolute;
    left: 16px;
    color: var(--slate-400);
    font-size: 0.9rem;
    transition: color 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 46px;
    font-family: 'Karla', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--navy-800);
    background: var(--surface-50);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input::placeholder {
    color: var(--slate-400);
    font-weight: 400;
}

.input-wrapper input:hover {
    border-color: var(--slate-300);
    background: #fff;
}

.input-wrapper input:focus {
    border-color: var(--gold-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.1);
}

.input-wrapper:focus-within .input-wrapper__icon {
    color: var(--gold-500);
}

/* Validation error state on input */
.input-wrapper input.is-invalid {
    border-color: #dc3545;
}

.input-wrapper input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.input-wrapper__toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    transition: color 0.2s;
    z-index: 2;
}

.input-wrapper__toggle:hover {
    color: var(--navy-700);
}

.invalid-feedback {
    font-size: 12px;
    color: #dc3545;
    margin-top: 4px;
}

/* ─── OPTIONS ROW ─── */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.checkbox-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-custom input[type="checkbox"] {
    display: none;
}

.checkbox-custom__box {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--slate-300);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-custom__box i {
    font-size: 0.55rem;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.checkbox-custom input:checked+.checkbox-custom__box {
    background: var(--gold-500);
    border-color: var(--gold-500);
}

.checkbox-custom input:checked+.checkbox-custom__box i {
    opacity: 1;
    transform: scale(1);
}

.checkbox-custom__label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--slate-500);
}

.forgot-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-500);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--navy-900);
}

/* ─── LOGIN BUTTON ─── */
.btn-login {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--navy-900);
    color: #fff;
    font-family: 'Urbanist', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-login:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-1px);
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login span,
.btn-login i {
    position: relative;
    z-index: 1;
}

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

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-login--loading {
    pointer-events: none;
}

.btn-login--loading .btn-text {
    opacity: 0;
}

.btn-login--loading .btn-spinner {
    opacity: 1;
}

.btn-spinner {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-spinner::after {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ─── DIVIDER ─── */
.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0.25rem 0;
}

.form-divider__line {
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.form-divider__text {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* ─── SSO BUTTON ─── */
.btn-sso {
    width: 100%;
    height: 50px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--navy-700);
    font-family: 'Urbanist', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-sso:hover {
    border-color: var(--slate-300);
    background: var(--surface-50);
    box-shadow: var(--shadow-sm);
}

.btn-sso svg {
    width: 18px;
    height: 18px;
}

/* ─── FOOTER ─── */
.form-footer {
    text-align: center;
    margin-top: 2.5rem;
}

.form-footer__text {
    font-size: 0.8rem;
    color: var(--slate-400);
}

.form-footer__link {
    font-weight: 600;
    color: var(--gold-500);
    text-decoration: none;
    transition: color 0.2s;
}

.form-footer__link:hover {
    color: var(--navy-900);
}

.right-panel-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
}

.right-panel-footer a {
    font-size: 0.72rem;
    color: var(--slate-400);
    text-decoration: none;
    transition: color 0.2s;
}

.right-panel-footer a:hover {
    color: var(--navy-700);
}

.right-panel-footer .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--slate-300);
}

/* ─── TOAST ─── */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-family: 'Urbanist', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    color: #fff;
    box-shadow: var(--shadow-xl);
    min-width: 280px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-msg.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: var(--navy-900);
}

.toast-success i {
    color: var(--gold-400);
}

.toast-error {
    background: #7F1D1D;
}

.toast-error i {
    color: #FCA5A5;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anim-in {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

.anim-delay-1 {
    animation-delay: 0.1s;
}

.anim-delay-2 {
    animation-delay: 0.2s;
}

.anim-delay-3 {
    animation-delay: 0.3s;
}

.anim-delay-4 {
    animation-delay: 0.4s;
}

.anim-delay-5 {
    animation-delay: 0.5s;
}

.anim-delay-6 {
    animation-delay: 0.6s;
}

.anim-delay-7 {
    animation-delay: 0.7s;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .left-panel {
        width: 45%;
    }

    .right-panel {
        width: 55%;
    }

    .left-panel__title {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        min-height: 280px;
        max-height: 320px;
    }

    .left-panel__content {
        padding: 2rem;
    }

    .left-panel__title {
        font-size: 2rem;
    }

    .left-panel__features {
        display: none;
    }

    .left-panel__subtitle {
        margin-bottom: 0;
        font-size: 0.95rem;
    }

    .right-panel {
        width: 100%;
        min-height: auto;
        padding: 2rem 1.5rem 4rem;
    }

    .right-panel::before {
        display: none;
    }

    .right-panel-footer {
        display: none;
    }
}

@media (max-width: 480px) {
    .left-panel {
        max-height: 240px;
    }

    .left-panel__content {
        padding: 1.5rem;
    }

    .left-panel__badge {
        display: none;
    }

    .left-panel__title {
        font-size: 1.6rem;
    }

    .form-header__welcome {
        font-size: 1.4rem;
    }

    .form-container {
        max-width: 100%;
    }

    .right-panel {
        padding: 1.5rem 1rem 3rem;
    }
}