/* ==========================================================================
   Login page — split layout (video left, form right)
   Page-specific rules only; linked after base.css from
   templates/registration/login.html. Uses --s- tokens throughout so the
   right (form) panel follows light/dark theme automatically. The left
   (video) panel's overlay/text colours are deliberately fixed dark/white,
   not token-driven — they composite over arbitrary video frames, not
   themed UI chrome, the same choice Monti's equivalent page makes.
   ========================================================================== */

html, body.login-body {
    height: 100%;
}

body.login-body {
    margin: 0;
    overflow: hidden;
    background: var(--s-color-bg);
}

.login-split {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* ---- Left panel: video + brand copy ---- */
.login-video-panel {
    position: relative;
    width: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--s-sidebar-bg);
}
.login-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.login-video-fallback {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--s-sidebar-bg) 0%, var(--s-color-accent-hover) 100%);
}
.login-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.5) 100%);
}
.login-video-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--s-space-8) var(--s-space-6);
    color: #ffffff;
}
.login-brand {
    font-size: var(--s-font-size-xl);
    font-weight: var(--s-font-weight-bold);
    letter-spacing: 0.03em;
    margin-bottom: var(--s-space-6);
}
.login-video-content h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: var(--s-font-weight-bold);
    line-height: var(--s-line-height-tight);
    margin: 0 0 var(--s-space-4);
}
.login-video-content p {
    font-size: var(--s-font-size-lg);
    line-height: var(--s-line-height);
    opacity: 0.85;
    max-width: 26rem;
    margin: 0;
}
.login-video-credit {
    position: absolute;
    z-index: 3;
    bottom: var(--s-space-3);
    right: var(--s-space-3);
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    padding: 0.25rem 0.6rem;
    border-radius: var(--s-radius-md);
    font-size: var(--s-font-size-xs);
}
.login-video-credit a {
    color: #ffffff;
    text-decoration: underline;
}
.login-video-credit a:hover {
    color: #ffffff;
    opacity: 0.85;
}

/* ---- Right panel: the form ---- */
.login-form-panel {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: var(--s-space-8) var(--s-space-5);
}
.login-form-inner {
    width: 100%;
    max-width: 26rem;
}
.login-card {
    margin-bottom: 0;
    padding: var(--s-space-6);
    box-shadow: var(--s-shadow-lg);
}
.login-card h1 {
    text-align: center;
    margin-bottom: var(--s-space-5);
}
.login-error {
    color: var(--s-color-danger-text);
    background: var(--s-color-danger-bg);
    border: 1px solid var(--s-color-border);
    border-radius: var(--s-radius-md);
    padding: var(--s-space-2) var(--s-space-3);
    margin: 0 0 var(--s-space-3);
    font-size: var(--s-font-size-md);
}
.login-turnstile {
    display: flex;
    justify-content: center;
    margin: var(--s-space-4) 0 var(--s-space-1);
}
.login-submit {
    width: 100%;
    padding: 0.6rem;
    font-size: var(--s-font-size-lg);
    margin-top: var(--s-space-2);
}

/* ---- Mobile: stack vertically, video collapses to a top banner ---- */
@media (max-width: 767px) {
    body.login-body {
        overflow: auto;
        height: auto;
    }
    .login-split {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .login-video-panel {
        width: 100%;
        height: 220px;
        flex-shrink: 0;
    }
    .login-video-content {
        padding: var(--s-space-5) var(--s-space-4);
    }
    .login-brand {
        margin-bottom: var(--s-space-2);
        font-size: var(--s-font-size-lg);
    }
    .login-video-content h1 {
        font-size: 1.35rem;
        margin-bottom: var(--s-space-2);
    }
    .login-video-content p {
        font-size: var(--s-font-size-md);
    }
    .login-form-panel {
        width: 100%;
        align-items: flex-start;
        padding: var(--s-space-5) var(--s-space-4);
    }
}
