/* =========================================================================
   EBTIKAR SOFT 3D ANIMATED LOGIN STYLES (Regular & Multi-Tenant)
   ========================================================================= */
:root {
    --ebtikar-blue: #002B7F;
    --ebtikar-label-blue: #003380;
    --ebtikar-btn-blue: #003399;
    --ebtikar-btn-hover: #002266;
    --ebtikar-green: #1EB500;
    --ebtikar-cyan: #0284c7;
    --ebtikar-red-accent: #ef4444;
    --ebtikar-bg: #ffffff;
    --ebtikar-text: #1e293b;
    --ebtikar-border: #cbd5e1;
}

body.login-page {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: var(--ebtikar-bg) !important;
    background-image: none !important;
    color: var(--ebtikar-text);
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Main Split-Screen Layout Container (38% Login / 62% 3D Brand Stage) */
.ebtikar-page-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 32px;
    background-color: #ffffff;
    direction: ltr;
}

/* Left Column: Login Form (38% width on desktop) */
.ebtikar-login-column {
    width: 38%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    z-index: 10;
}

.ebtikar-login-card {
    width: 100%;
    max-width: 310px;
}

/* Padlock & Login Title Header */
.ebtikar-login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
}

.ebtikar-padlock-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ebtikar-cyan);
    margin-bottom: 6px;
    transition: transform 0.25s ease;
}

.ebtikar-padlock-icon svg {
    width: 21px;
    height: 21px;
}

.ebtikar-login-title {
    margin: 0;
    font-family: 'Inter', 'Cairo', -apple-system, sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--ebtikar-text);
    letter-spacing: -0.01em;
}

/* Serenity LoginPanel Form Overrides */
#LoginPanel .s-Form,
#LoginPanel form {
    width: 100%;
}

#LoginPanel .s-PropertyGrid .categories,
#LoginPanel .s-PropertyGrid .category {
    margin: 0;
    padding: 0;
    border: none;
}

#LoginPanel .s-PropertyGrid .category-title {
    display: none;
}

#LoginPanel .field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 !important;
    margin-bottom: 14px !important;
    width: 100%;
}

#LoginPanel .caption,
#LoginPanel .s-Form label.caption {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    text-align: left !important;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--ebtikar-label-blue);
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    float: none !important;
    user-select: none;
}

html[dir="rtl"] #LoginPanel .caption,
html[dir="rtl"] #LoginPanel .s-Form label.caption,
body.rtl #LoginPanel .caption,
body.rtl #LoginPanel .s-Form label.caption,
html[lang^="ar"] #LoginPanel .caption,
html[lang^="ar"] #LoginPanel .s-Form label.caption {
    text-align: right !important;
    direction: rtl !important;
}

#LoginPanel .caption sup {
    color: var(--ebtikar-red-accent);
    margin-right: 2px;
}

#LoginPanel input.editor,
#LoginPanel input[type="text"],
#LoginPanel input[type="password"],
#LoginPanel select.form-control {
    width: 100% !important;
    height: 35px !important;
    padding: 4px 11px !important;
    font-size: 13px !important;
    font-family: 'Inter', 'Cairo', sans-serif;
    color: #334155;
    background-color: #ffffff;
    border: 1px solid var(--ebtikar-border);
    border-left: 3.5px solid #cbd5e1;
    border-radius: 3px;
    outline: none;
    text-align: right;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#LoginPanel input[type="password"],
#LoginPanel input.editor.required {
    border-left: 3.5px solid var(--ebtikar-red-accent);
}

#LoginPanel input.editor:focus,
#LoginPanel input[type="text"]:focus,
#LoginPanel input[type="password"]:focus,
#LoginPanel select.form-control:focus {
    border-color: var(--ebtikar-blue);
    border-left: 3.5px solid var(--ebtikar-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 43, 127, 0.08);
}

/* Select2 Lookups inside RegularLogin (Company / FiscalYear) */
#LoginPanel .select2-container {
    width: 100% !important;
    display: block;
}

#LoginPanel .select2-container .select2-choice {
    height: 35px !important;
    line-height: 27px !important;
    padding: 3px 11px !important;
    font-size: 13px;
    font-family: 'Inter', 'Cairo', sans-serif;
    color: #334155;
    background: #ffffff !important;
    border: 1px solid var(--ebtikar-border) !important;
    border-left: 3.5px solid var(--ebtikar-red-accent) !important;
    border-radius: 3px !important;
    text-align: right;
    box-shadow: none !important;
}

#LoginPanel .select2-container.select2-dropdown-open .select2-choice,
#LoginPanel .select2-container.select2-container-active .select2-choice {
    border-color: var(--ebtikar-blue) !important;
    border-left: 3.5px solid var(--ebtikar-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 43, 127, 0.08) !important;
}

/* Submit & Step Buttons */
#LoginPanel .btn-primary,
#LoginPanel .SignInButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 112px;
    height: 34px;
    padding: 0 22px;
    margin-top: 6px;
    background-color: var(--ebtikar-btn-blue) !important;
    color: #ffffff !important;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border: none !important;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 51, 153, 0.18);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    user-select: none;
}

#LoginPanel .btn-primary:hover,
#LoginPanel .SignInButton:hover {
    background-color: var(--ebtikar-btn-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 34, 102, 0.25);
}

#LoginPanel .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 18px;
    margin-top: 6px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 3px;
}

#LoginPanel form {
    text-align: center;
}

/* Right Column: 3D Brand Showcase & Typography (62% width on desktop) */
.ebtikar-brand-column {
    width: 62%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

/* Dedicated Three.js 3D Canvas Container */
.ebtikar-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 680px;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.ebtikar-canvas-wrap:active {
    cursor: grabbing;
}

#ebtikar-3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

/* Floating Module Name Tooltip on 3D Square Hover */
.ebtikar-module-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -135%) scale(0.92);
    padding: 6px 14px;
    background: rgba(0, 43, 127, 0.94);
    color: #ffffff;
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 6px;
    border-bottom: 2.5px solid var(--ebtikar-green);
    box-shadow: 0 8px 20px rgba(0, 43, 127, 0.25);
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 30;
}

.ebtikar-module-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -145%) scale(1);
}

.ebtikar-module-tooltip.is-green {
    background: rgba(20, 118, 0, 0.95);
    border-bottom-color: #ffffff;
}

/* Brand Typography Block beneath the 3D Logo */
.ebtikar-brand-typography {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -12px;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.6s ease;
    direction: ltr;
}

.ebtikar-title-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    line-height: 1;
}

.ebtikar-title-en {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 50px;
    color: var(--ebtikar-blue);
    letter-spacing: 0.04em;
    transform: scaleX(1.08);
    display: inline-block;
}

.ebtikar-title-soft {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 31px;
    color: var(--ebtikar-green);
    letter-spacing: 0.05em;
    transform: scaleX(1.06);
    display: inline-block;
}

.ebtikar-title-ar {
    font-family: 'Alexandria', 'Cairo', sans-serif;
    font-weight: 500;
    font-size: 33px;
    color: var(--ebtikar-blue);
    margin-top: 6px;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .ebtikar-page-wrapper {
        flex-direction: column;
        padding: 20px 16px 36px;
        gap: 18px;
    }

    .ebtikar-brand-column {
        width: 100%;
        order: 1;
    }

    .ebtikar-login-column {
        width: 100%;
        order: 2;
        padding: 8px 16px;
    }

    .ebtikar-canvas-wrap {
        height: 300px;
    }

    .ebtikar-title-en {
        font-size: 36px;
    }

    .ebtikar-title-soft {
        font-size: 22px;
    }

    .ebtikar-title-ar {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .ebtikar-canvas-wrap {
        height: 250px;
    }

    .ebtikar-title-en {
        font-size: 29px;
    }

    .ebtikar-title-soft {
        font-size: 18px;
    }

    .ebtikar-title-ar {
        font-size: 20px;
    }
}
