/* KL-002: Login Page Two-Column Layout & Product Carousel */

.login-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #f8f8f9;
}

.dark .login-shell {
    background-color: #111827;
}

/* Left Column: Sign-in Form */
.login-left {
    flex: 1 1 480px;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 10;
    overflow-y: auto;
}

.login-left #sec1 {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Right Column: Full Viewport Carousel */
.login-right {
    flex: 1 1 55%;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background-color: #0f172a;
}

.kl-carousel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Slides */
.kl-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.02);
    will-change: opacity, transform;
}

.kl-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

/* Scrim Gradient Overlay for text contrast */
.kl-slide-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.45) 45%, rgba(15, 23, 42, 0.92) 100%);
    pointer-events: none;
}

/* Caption Content */
.kl-slide-content {
    position: absolute;
    bottom: 4rem;
    left: 4rem;
    right: 4rem;
    color: #ffffff;
    z-index: 5;
    max-width: 600px;
    pointer-events: none;
}

.kl-slide-headline {
    font-size: 2rem;
    line-height: 2.375rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.02em;
}

.kl-slide-subtext {
    font-size: 1.0625rem;
    line-height: 1.625rem;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
    margin: 0;
}

/* Indicator Dots */
.kl-dots {
    position: absolute;
    bottom: 2rem;
    left: 4rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.kl-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.35);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kl-dot:hover {
    background-color: rgba(255, 255, 255, 0.75);
}

.kl-dot.is-active {
    width: 28px;
    background-color: #ffffff;
    border-radius: 9999px;
}

/* RTL Support */
[dir="rtl"] .kl-slide-content,
[dir="rtl"] .kl-dots {
    left: auto;
    right: 4rem;
    text-align: right;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .login-right {
        display: none !important;
    }
    .login-left {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        justify-content: center;
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 1.5rem 0.75rem;
    }
    .login-left #sec1 {
        padding: 30px 20px !important;
        width: 100% !important;
        border-radius: 8px;
    }
}

/* Initialize-database wizard (sign up / company / role / stages) renders a
   900px .sec1 card inside .login-left. Give it the full width and hide the
   carousel while it is on screen so the card isn't clipped. */
.login-shell:has(.login-left .sec1) .login-right {
    display: none !important;
}
.login-shell:has(.login-left .sec1) .login-left {
    flex: 1 1 100%;
    max-width: 100%;
}
.login-left .sec1 {
    width: 100% !important;
    max-width: 900px;
}
