/* Split-screen login — Bake Mission IMS */

:root {
    --login-theme: #43301e;
    --login-theme-dark: #2e2114;
    --login-theme-mid: #5a4028;
    --login-theme-light: #6b4f35;
    --login-brand-text: #ffffff;
    --login-brand-text-muted: rgba(255, 255, 255, 0.92);
    --login-brand-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.55);
    --login-brand-title-shadow: 0 2px 4px rgba(0, 0, 0, 0.85), 0 4px 14px rgba(0, 0, 0, 0.6);
    --login-brand-logo-width: 130px;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.login-page,
.login-page * {
    font-family: "Inter", "Muli", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#page-container.main-content-boxed,
#main-container {
    max-width: none;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.login-page {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
}

.login-card {
    display: flex;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/* ── Left branding panel ── */

.login-brand {
    flex: 0 0 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    height: 100%;
    min-height: 0;
    max-height: 100vh;
    padding: 48px 24px 48px 56px;
    background-color: var(--login-theme-dark);
    background-image: url('../media/images/login-left-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
    overflow-y: auto;
}

.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(46, 33, 20, 0.35) 0%,
        rgba(67, 48, 30, 0.2) 50%,
        rgba(46, 33, 20, 0.4) 100%
    );
    pointer-events: none;
}

.login-brand-bottom {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    transform: translateX(40px);
}

.login-brand-header {
    text-align: center;
}

.login-brand-logo {
    display: inline-block;
    margin-bottom: 28px;
    transition: transform 0.2s;
}

.login-brand-logo:hover {
    transform: translateY(-2px);
}

.login-brand-logo img {
    display: block;
    width: var(--login-brand-logo-width);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.login-glass-title {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: var(--login-brand-text);
    text-shadow: var(--login-brand-title-shadow);
}

.login-glass-subtitle {
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

.login-glass-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 60px;
    width: 100%;
    text-align: left;
}

.login-glass-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 500;
    color: var(--login-brand-text);
    margin-bottom: 14px;
    line-height: 1.55;
    text-shadow: var(--login-brand-text-shadow);
}

.login-glass-features li span:last-child {
    flex: 1;
    color: var(--login-brand-text-muted);
}

.login-glass-features li:last-child {
    margin-bottom: 0;
}

.login-glass-features-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(20, 12, 6, 0.72);
    color: #fff;
    font-size: 0.875rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    text-shadow: none;
}

.login-glass-features-icon i {
    display: block;
    line-height: 1;
}

.login-brand-copyright {
    margin: 20px 0 0 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
    text-shadow: var(--login-brand-text-shadow);
}

/* ── Right form panel ── */

.login-form-panel {
    flex: 0 0 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    min-height: 0;
    max-height: 100vh;
    padding: 0 40px 48px;
    background-color: #e8eef5;
    background-image: url('../media/images/login-right-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    overflow-y: auto;
}

.login-form-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 320px;
    margin-top: clamp(72px, 14vh, 140px);
}

.login-form-bokeh {
    display: none;
}

.login-form-mobile-brand {
    display: none;
}

.login-form-heading {
    text-align: center;
    margin-bottom: 32px;
}

.login-form-heading h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 4px;
}

.login-form-heading h2 {
    font-size: 1.125rem;
    font-weight: 400;
    color: #718096;
    margin: 0;
}

.login-field {
    position: relative;
    margin-bottom: 16px;
    padding-bottom: 22px;
}

.login-field-icon {
    position: absolute;
    left: 14px;
    top: 22px;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1;
}

.login-field input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #2d3748;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.login-field input.is-invalid,
.login-field.has-error input {
    border-color: #e53e3e;
}

.login-field-error {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.25rem;
    color: #e53e3e;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 24px;
    font-size: 0.875rem;
    color: #4a5568;
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.login-submit {
    width: 100%;
    padding: 13px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.login-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-forgot {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.15s;
}

.login-forgot:hover {
    color: #2563eb;
    text-decoration: underline;
}

.login-recaptcha-error {
    min-height: 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.25rem;
    color: #e53e3e;
    margin: 0 0 12px;
    text-align: center;
}

.login-disclaimer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #a0aec0;
    text-align: center;
    line-height: 1.5;
}

/* ── Responsive ── */

@media (min-width: 1400px) {
    .login-brand {
        padding: 56px 32px 56px 72px;
    }

    .login-brand-bottom {
        max-width: 560px;
    }

    .login-form-inner {
        margin-top: clamp(88px, 16vh, 160px);
    }
}

@media (max-width: 1100px) {
    .login-brand {
        padding: 36px 16px 36px 40px;
    }
}

@media (max-width: 767px) {
    html, body {
        overflow: auto;
    }

    #page-container.main-content-boxed,
    #main-container,
    .login-page,
    .login-card {
        height: auto;
        min-height: 100vh;
        max-height: none;
    }

    .login-card {
        flex-direction: column;
    }

    .login-brand {
        flex: none;
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        padding: 32px 24px;
        justify-content: center;
        align-items: center;
    }

    .login-brand-bottom {
        max-width: 400px;
        margin-left: 0;
        transform: none;
    }

    .login-glass-features {
        margin-left: 0;
    }

    .login-brand-copyright {
        margin-left: 0;
    }

    .login-form-panel {
        position: relative;
        flex: 1;
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        padding: 32px 20px 48px;
        flex-direction: column;
        gap: 24px;
        align-items: center;
        justify-content: flex-start;
        background-color: #e8eef5;
        background-image: url('../media/images/login-right-background.png');
        background-size: cover;
        background-position: center;
        overflow: hidden;
    }

    .login-form-inner {
        margin-top: 0;
        max-width: 400px;
        padding: 0;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .login-form-mobile-brand {
        display: none;
    }

    .login-form-heading {
        margin-bottom: 28px;
    }

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

    .login-form-heading h2 {
        font-size: 1rem;
    }
}

.login-form-alerts {
    min-height: 0;
}

.login-form-alerts:not(:empty) {
    margin-bottom: 20px;
}

.session-expiry-warning {
    margin-bottom: 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.session-expiry-warning + .session-expiry-warning {
    margin-top: 12px;
}

.login-form-inner .session-expiry-warning {
    background-color: #fff8e6;
    border: 1px solid #f0d78c;
    color: #7a5c00;
}

.login-form-inner .session-expiry-warning .close {
    color: #7a5c00;
    opacity: 0.6;
}

.login-form-inner .session-expiry-warning .close:hover {
    opacity: 1;
}
