:root {
    --wall-color: #f4f4f4;
    --accent-gold: #c28000;
    --accent-gold-glow: rgba(197, 160, 89, 0.2);
    --accent-emerald: var(--app-primary, #3FA66B);
    --accent-emerald-glow: rgba(var(--app-primary-rgb, 63, 166, 107), 0.28);
    --elevator-metal: linear-gradient(180deg, #64748b 0%, #475569 50%, #334155 100%);
    --form-bg: #ffffff;
    --input-field-bg: #ffffff;
    --input-field-border: #d1d5db;
    --input-text: #111827;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: var(--wall-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.scene-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: url("../../media/wall-2.jpg") center / cover no-repeat;
}

.wall {
    height: 100vh;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5% 0 6%;
}

/* --- LEFT SIDE: BRANDING & FEATURE CARDS --- */
.brand-section {
    width: 48%;
    color: #ffffff;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.brand-header-block {
    animation: fadeInDown 0.8s ease-out;
}

.brand-logo-container {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 1.15rem;
}

.brand-logo {
    min-width: 90px;
    max-width: 180px;
    height: 90px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    max-width: 180px;
    max-height: 90px;
    width: auto;
    height: auto;
    border: 1px solid rgba(51, 51, 51, 0.28);
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.brand-logo i {
    font-size: 1.9rem;
    color: var(--accent-gold);
}

.brand-title {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #333333;
    margin: 0;
}

.brand-headline {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.25;
    color: #333333;
    margin: 0;
}

.brand-headline span {
    color: var(--accent-emerald);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 560px;
}

.feature-node {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.2rem;
    background: rgba(22, 19, 28, 0.10);
    border-left: 3px solid var(--accent-gold);
    border-right: 3px solid var(--accent-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease;
}

.feature-node.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-node:hover {
    background: rgba(22, 19, 28, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-gold-glow);
}

.node-icon-box {
    font-size: 1.2rem;
    color: var(--accent-gold);
    background: rgba(197, 160, 89, 0.1);
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.node-text-content {
    font-size: 0.92rem;
    font-weight: 500;
    color: #545454;
}

/* --- RIGHT SIDE: BOTTOM-ALIGNED ELEVATOR --- */
.elevator-frame {
    position: absolute;
    bottom: 48px;
    right: 8%;
    width: 540px;
    height: 89%;
    background: linear-gradient(180deg, #64748b 0%, #475569 50%, #334155 100%);
    border: 2px solid #94a3b8;
    box-shadow: -10px 15px 35px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 38px 24px 0 24px;
    display: flex;
    border-radius: 16px;
}

.indicator-panel {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 26px;
    background-color: #0b0f19;
    border: 1.5px solid #475569;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 20;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(255, 255, 255, 0.1);
}

.arrow-indicator {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #334155;
    transition: all 0.3s;
}

.indicator-panel div:first-child.arrow-indicator {
    border-bottom-color: var(--accent-emerald);
    filter: drop-shadow(0 0 6px var(--accent-emerald));
}

.indicator-panel div:last-child.arrow-indicator {
    border-top-color: #ef4444;
    filter: drop-shadow(0 0 5px #ef4444);
}

.elevator-shaft {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #334155;
    background-size: cover;
    background-position: center;
    perspective: 1200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.elevator-shaft::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    pointer-events: none;
    z-index: 1;
}

/* --- SLIDING LIFTS MECHANICAL DOORS --- */
.door {
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 50%, #94a3b8 100%);
    border-right: 1.5px solid #64748b;
    position: absolute;
    top: 0;
    transition: transform 2.2s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 5;
}

.door-right {
    right: 0;
    background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 50%, #94a3b8 100%);
    border-right: none;
    border-left: 1.5px solid #64748b;
}

.door-left {
    left: 0;
}

.doors-open .door-left {
    transform: translateX(-100%);
}

.doors-open .door-right {
    transform: translateX(100%);
}

/* --- FORM CARD CONFIGURATION --- */
.elevator-form-card {
    width: 100%;
    max-width: 420px;
    padding: 30px 26px;
    color: #111827;
    z-index: 6;
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.swal2-popup.login-alert-compact {
    width: min(420px, calc(100vw - 2rem));
    padding: 2rem 2rem 1.75rem;
    border-radius: 14px;
}

.swal2-popup.login-alert-compact .swal2-icon {
    width: 5em;
    height: 5em;
    font-size: 0.85rem;
    margin: 0.45rem auto 1rem;
}

.swal2-popup.login-alert-compact .swal2-html-container {
    margin: 0.35rem 0 1rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.swal2-popup.login-alert-compact .swal2-actions {
    margin-top: 0.25rem;
}

.swal2-popup.login-alert-compact .swal2-confirm {
    min-width: 104px;
    height: 40px;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
}

.doors-open .elevator-form-card {
    opacity: 1;
    transform: scale(1);
    transition-delay: 1.6s;
}

.form-heading h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111827;
    margin-bottom: 4px;
}

.form-heading p {
    font-size: 0.88rem;
    color: #6b7280;
    font-weight: 500;
}

.form-label-custom {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.4rem;
    display: block;
}

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

.input-group-container i:not(.bi-eye):not(.bi-eye-slash):not(.bi-arrow-clockwise) {
    position: absolute;
    left: 13px;
    color: #6b7280;
    z-index: 10;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.input-group-container:focus-within i:not(.bi-eye):not(.bi-eye-slash):not(.bi-arrow-clockwise) {
    color: var(--app-primary, #3FA66B);
}

.custom-auth-input {
    background-color: var(--input-field-bg) !important;
    border: 1.5px solid var(--input-field-border) !important;
    color: var(--input-text) !important;
    padding-left: 38px !important;
    padding-right: 38px;
    height: 46px;
    font-size: 0.94rem;
    font-weight: 600;
    border-radius: 10px !important;
    transition: all 0.2s ease;
}

.custom-auth-input:focus {
    border-color: var(--app-primary, #3FA66B) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb, 63, 166, 107), 0.2) !important;
}

.custom-auth-input::placeholder {
    color: #9ca3af !important;
    font-weight: 500;
    opacity: 1;
}

.custom-auth-input.is-invalid,
.auth-input.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.2) !important;
    background-image: none !important;
}

.elevator-form-card .error-message,
.elevator-form-card .error-text {
    color: #ef4444 !important;
    font-size: 0.8rem;
    font-weight: 600;
    display: block;
    margin-top: 0.35rem;
    line-height: 1.3;
}

.input-pass-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6b7280;
    cursor: pointer;
    z-index: 10;
    transition: all 0.15s ease;
}

.input-pass-toggle:hover {
    color: #111827;
    background: #f3f4f6;
}

.captcha-row-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.auth-captcha-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1.5px solid var(--input-field-border);
    border-radius: 10px;
    padding: 3px 10px;
    height: 46px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.auth-captcha-image:hover {
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.auth-captcha-image img {
    height: 30px;
    margin-right: 6px;
}

.auth-captcha-image i {
    color: var(--app-primary, #3FA66B);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.auth-captcha-image:hover i {
    transform: rotate(90deg);
}

.submit-btn-custom {
    background: var(--app-primary, #3FA66B) !important;
    border: none !important;
    width: 100%;
    height: 46px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-radius: 10px;
    box-shadow: 0 6px 20px -2px rgba(var(--app-primary-rgb, 63, 166, 107), 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff !important;
    cursor: pointer;
}

.submit-btn-custom:hover {
    background: var(--app-primary, #3FA66B) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -2px rgba(var(--app-primary-rgb, 63, 166, 107), 0.55);
    filter: brightness(0.92);
}

.submit-btn-custom:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(var(--app-primary-rgb, 63, 166, 107), 0.25);
}

.custom-auth-link {
    color: var(--app-primary, #3FA66B);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.custom-auth-link:hover {
    filter: brightness(0.85);
    text-decoration: underline;
}

.auth-remember-label,
.elevator-form-card .text-white {
    color: #374151 !important;
    font-weight: 600;
}

.elevator-form-card .form-check-input {
    background-color: #ffffff !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 4px;
    cursor: pointer;
}

.elevator-form-card .form-check-input:checked {
    background-color: var(--app-primary, #3FA66B) !important;
    border-color: var(--app-primary, #3FA66B) !important;
}

.call-panel {
    position: absolute;
    bottom: 40%;
    right: 2.5%;
    width: 28px;
    height: 64px;
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 8px;
    border: 1.5px solid #64748b;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 6px 14px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    z-index: 15;
}

.button-light {
    width: 15px;
    height: 15px;
    background-color: #f1f5f9;
    border-radius: 50%;
    border: 1.5px solid #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: bold;
    color: #475569;
}

.doors-open .button-light {
    background-color: var(--accent-emerald);
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 0 10px var(--accent-emerald);
}

@keyframes pulseGlowGold {
    0%, 100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.6); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

        /* --- RESPONSIVE MOBILE HANDLERS --- */
        @media (max-width: 991px) {

            body,
            html {
                overflow-x: hidden !important;
                overflow-y: auto !important;
                height: auto !important;
                min-height: 100% !important;
            }

            .scene-container {
                height: auto !important;
                min-height: 100vh !important;
                min-height: 100dvh !important;
                overflow-x: hidden !important;
                background-attachment: scroll !important;
            }

            .wall {
                flex-direction: column !important;
                height: auto !important;
                min-height: 100vh !important;
                min-height: 100dvh !important;
                padding: 1.5rem 1rem 2.5rem !important;
                gap: 1.25rem !important;
                justify-content: flex-start !important;
                align-items: center !important;
                box-sizing: border-box !important;
            }

            /* Unroll brand-section container so header is first, form is second, features are third */
            .brand-section {
                display: contents !important;
            }

            .brand-header-block {
                order: 1 !important;
                width: 100% !important;
                max-width: 440px !important;
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                text-align: center !important;
                margin-bottom: 0 !important;
            }

            .brand-logo-container {
                justify-content: center !important;
                gap: 14px !important;
                margin-bottom: 0.6rem !important;
            }

            .brand-logo {
                min-width: 65px !important;
                max-width: 130px !important;
                height: 60px !important;
            }

            .brand-logo img {
                max-width: 130px !important;
                max-height: 60px !important;
                padding: 4px !important;
            }

            .brand-title {
                font-size: 1.35rem !important;
                letter-spacing: 0.5px !important;
                text-align: left !important;
            }

            .brand-headline {
                font-size: 1.15rem !important;
                line-height: 1.35 !important;
                max-width: 420px !important;
                margin: 0 auto !important;
                text-align: center !important;
            }

            /* Center and prioritize the elevator login frame */
            .elevator-frame {
                order: 2 !important;
                position: relative !important;
                right: auto !important;
                bottom: auto !important;
                width: 100% !important;
                max-width: 440px !important;
                height: auto !important;
                min-height: auto !important;
                margin: 0 auto !important;
                padding: 38px 12px 16px 12px !important;
                border-radius: 12px !important;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
                box-sizing: border-box !important;
            }

            .elevator-shaft {
                height: auto !important;
                min-height: auto !important;
                overflow: visible !important;
                border-radius: 8px !important;
                display: block !important;
            }

            .elevator-shaft::before {
                border-radius: 8px !important;
            }

            .indicator-panel {
                top: 10px !important;
            }

            /* Hide doors & side call panel on mobile to prevent blocking or horizontal overflow */
            .door {
                display: none !important;
            }

            .call-panel {
                display: none !important;
            }

            /* Form card: immediately visible with no animation lag or clipping */
            .elevator-form-card,
            .doors-open .elevator-form-card {
                opacity: 1 !important;
                transform: none !important;
                transition: none !important;
                transition-delay: 0s !important;
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 !important;
                padding: 24px 18px !important;
                box-sizing: border-box !important;
                background: var(--form-bg) !important;
                color: #0f172a !important;
                border: 1px solid rgba(226, 232, 240, 0.9) !important;
                box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12) !important;
            }

            .form-heading {
                margin-bottom: 1rem !important;
            }

            .form-heading h1 {
                font-size: 1.5rem !important;
            }

            .form-heading p {
                font-size: 0.82rem !important;
            }

            /* Prevent iOS automatic input zoom (requires font-size >= 16px) */
            .custom-auth-input {
                font-size: 16px !important;
                height: 44px !important;
            }

            /* Ensure Captcha image and input sit side by side without overlapping */
            .captcha-row-wrapper {
                display: flex !important;
                gap: 8px !important;
                width: 100% !important;
            }

            .auth-captcha-image {
                flex: 0 0 auto !important;
                padding: 2px 8px !important;
                height: 44px !important;
            }

            .auth-captcha-image img {
                max-width: 90px !important;
                height: 28px !important;
            }

            .form-options-row {
                flex-wrap: wrap !important;
                gap: 8px !important;
                margin-bottom: 1.25rem !important;
            }

            /* Features Grid: displays below the login form as secondary info */
            .features-grid {
                order: 3 !important;
                display: grid !important;
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 0.65rem !important;
                width: 100% !important;
                max-width: 440px !important;
                margin: 0.5rem auto 0 !important;
            }

            .feature-node {
                opacity: 1 !important;
                transform: none !important;
                padding: 0.55rem 0.75rem !important;
                gap: 0.55rem !important;
            }

            .node-icon-box {
                font-size: 1rem !important;
                padding: 4px 8px !important;
            }

            .node-text-content {
                font-size: 0.78rem !important;
                line-height: 1.25 !important;
            }
        }

        /* Extra small devices (phones <= 480px) */
        @media (max-width: 480px) {
            .wall {
                padding: 1rem 0.75rem 2rem !important;
                gap: 1rem !important;
            }

            .brand-headline {
                font-size: 1rem !important;
            }

            .elevator-frame {
                padding: 36px 8px 12px 8px !important;
            }

            .elevator-form-card {
                padding: 16px 12px !important;
            }

            .features-grid {
                grid-template-columns: 1fr !important;
                gap: 0.5rem !important;
            }
        }
