:root {
    --login-primary: #083C71;
    --login-secondary: #1C75A5;
    --login-gradient: linear-gradient(270deg, #083C71 0%, #1C75A5 100%);
    --login-text-muted: #6b7280;
    --login-white: #ffffff;
    --login-shadow: 0 8px 32px rgba(8, 60, 113, 0.12);
    --login-card-bg: rgba(255, 255, 255, 0.12);
    --login-card-border: rgba(255, 255, 255, 0.2);
    --login-space-xs: 0.375rem;
    --login-space-sm: 0.625rem;
    --login-space-md: 1rem;
    --login-space-lg: 1.5rem;
    --login-space-xl: 2rem;
}

body.login-body {
    min-height: 100vh;
    height: 100vh;
    margin: 0;
    font-family: 'Poppins', 'Ubuntu', sans-serif;
    background: var(--login-white);
    overflow-x: hidden;
}

.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    max-height: 100vh;
}

/* Left showcase panel — marketing layout */
.login-showcase {
    position: relative;
    flex: 0 0 58%;
    height: 100%;
    background: var(--login-gradient);
    color: var(--login-white);
    padding: clamp(2rem, 5vh, 3.5rem) clamp(2rem, 4vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.login-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.06' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.showcase-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.showcase-deco--top {
    top: 8%;
    left: 6%;
    width: clamp(48px, 6vw, 72px);
    height: clamp(48px, 6vw, 72px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

.showcase-deco--bottom {
    bottom: -8%;
    right: -5%;
    width: clamp(180px, 28vw, 320px);
    height: clamp(180px, 28vw, 320px);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
}

.showcase-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    max-height: 100%;
    width: 100%;
    max-width: 560px;
    gap: 0;
}

.showcase-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.78rem, 1.3vh, 0.88rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.9;
    margin-bottom: clamp(1rem, 2.5vh, 1.5rem);
}

.showcase-eyebrow-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5ec8f2;
    box-shadow: 0 0 0 3px rgba(94, 200, 242, 0.25);
}

.showcase-title {
    font-size: clamp(1.75rem, 4vh, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 clamp(1rem, 2.5vh, 1.35rem);
    letter-spacing: -0.02em;
    color: var(--login-white);
}

.showcase-lead {
    font-size: clamp(0.9rem, 1.6vh, 1.05rem);
    line-height: 1.65;
    margin: 0 0 clamp(1.5rem, 3.5vh, 2.25rem);
    opacity: 0.82;
    max-width: 480px;
}

.feature-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.feature-step {
    display: flex;
    align-items: flex-start;
    gap: clamp(0.85rem, 2vw, 1.25rem);
    padding: clamp(0.85rem, 2vh, 1.15rem) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.feature-step:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.feature-step-num {
    flex-shrink: 0;
    font-size: clamp(0.8rem, 1.4vh, 0.9rem);
    font-weight: 700;
    opacity: 0.55;
    letter-spacing: 0.04em;
    min-width: 1.5rem;
    padding-top: 0.15rem;
}

.feature-step-body {
    flex: 1;
    min-width: 0;
}

.feature-step-title {
    display: block;
    font-size: clamp(0.95rem, 1.7vh, 1.1rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.feature-step-desc {
    margin: 0;
    font-size: clamp(0.92rem, 1.4vh, 0.92rem);
    line-height: 1.5;
    opacity: 0.78;
}

.showcase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: clamp(1.5rem, 3.5vh, 2.25rem);
    padding: 0.55rem 1rem;
    background: rgba(4, 40, 78, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: clamp(0.68rem, 1.2vh, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: fit-content;
}

.showcase-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--login-white);
    opacity: 0.9;
}

/* Right login panel */
.login-panel {
    flex: 0 0 42%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 3vh, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
    background: var(--login-white);
    overflow: hidden;
}

.login-panel-inner {
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-panel-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.login-panel .panel-logo {
    display: block;
    height: clamp(52px, 7vh, 68px);
    width: auto;
    max-width: 100%;
    margin: 0 0 var(--login-space-lg);
    align-self: flex-start;
    object-fit: contain;
    object-position: left center;
}

.login-panel h2 {
    font-size: clamp(1.5rem, 3vh, 1.85rem);
    font-weight: 700;
    color: var(--login-primary);
    margin: 0 0 var(--login-space-sm);
    letter-spacing: 0.01em;
    line-height: 1.2;
    width: 100%;
    text-align: left;
}

.login-panel .panel-subtitle {
    font-size: 0.95rem;
    color: var(--login-text-muted);
    margin: 0 0 var(--login-space-md);
    line-height: 1.5;
    width: 100%;
    text-align: left;
}

.login-panel .panel-description {
    font-size: 0.925rem;
    color: var(--login-text-muted);
    line-height: 1.6;
    margin: 0 0 var(--login-space-lg);
    width: 100%;
    text-align: left;
}

.login-panel .alert {
    width: 100%;
    margin-bottom: var(--login-space-md);
}

.login-form {
    width: 100%;
    margin-bottom: 0;
}

.login-panel .btn-primary {
    background: var(--login-gradient);
    border: none;
}

.login-panel .btn-primary:hover,
.login-panel .btn-primary:focus {
    background: var(--login-primary);
    border: none;
}

.login-panel .form-control:focus {
    border-color: var(--login-secondary);
    box-shadow: 0 0 0 0.2rem rgba(28, 117, 165, 0.2);
}

.login-panel .footer-text {
    margin-top: var(--login-space-xl);
    font-size: 0.875rem;
    color: var(--login-text-muted);
    text-align: left;
    width: 100%;
}

.btn-office365 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--login-white);
    text-decoration: none;
    background: var(--login-gradient);
    border: none;
    border-radius: 0.5rem;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(8, 60, 113, 0.25);
}

.btn-office365:hover,
.btn-office365:focus {
    color: var(--login-white);
    background: var(--login-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(8, 60, 113, 0.3);
}

.btn-office365:focus-visible {
    outline: 2px solid var(--login-secondary);
    outline-offset: 2px;
}

.btn-office365 i {
    font-size: 1.15rem;
}

.login-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: var(--login-space-md) 0;
    width: 100%;
    color: var(--login-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: lowercase;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.btn-login-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--login-primary);
    text-decoration: none;
    background: var(--login-white);
    border: 2px solid var(--login-primary);
    border-radius: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login-email:hover,
.btn-login-email:focus {
    color: var(--login-white);
    background: var(--login-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(8, 60, 113, 0.2);
}

.btn-login-email:focus-visible {
    outline: 2px solid var(--login-secondary);
    outline-offset: 2px;
}

.btn-login-email i {
    font-size: 1rem;
}

/* Desktop: horizontal split, login on right, no scrollbars */
@media (min-width: 992px) {
    body.login-body {
        overflow: hidden;
    }

    .login-page {
        flex-direction: row;
    }

    .login-showcase {
        order: 1;
        max-height: 100vh;
    }

    .login-panel {
        order: 2;
        max-height: 100vh;
        box-shadow: -4px 0 24px rgba(8, 60, 113, 0.06);
    }
}

/* Shorter desktop viewports */
@media (min-width: 992px) and (max-height: 860px) {
    .login-showcase {
        padding: 1.5rem 2rem;
    }

    .showcase-title {
        font-size: 1.65rem;
        margin-bottom: 0.75rem;
    }

    .showcase-lead {
        margin-bottom: 1.25rem;
        font-size: 0.88rem;
    }

    .feature-step {
        padding: 0.65rem 0;
    }

    .showcase-badge {
        margin-top: 1.25rem;
    }
}

/* Tablet & mobile: allow natural page scroll */
@media (max-width: 991.98px) {
    body.login-body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .login-page {
        height: auto;
        max-height: none;
        min-height: 100vh;
    }

    .login-showcase {
        flex: none;
        height: auto;
        padding: 2rem 1.5rem;
        max-height: none;
    }

    .showcase-deco--bottom {
        display: none;
    }

    .showcase-content {
        height: auto;
        max-height: none;
        justify-content: flex-start;
    }

    .login-panel {
        flex: none;
        order: -1;
        height: auto;
        padding: 2rem 1.25rem;
        min-height: auto;
        max-height: none;
        overflow-y: visible;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .login-panel h2 {
        font-size: 1.5rem;
    }

    .login-showcase {
        padding: 1.25rem 1rem;
    }
}

/* Accessibility */
.login-panel .btn-primary:focus-visible,
.login-panel .form-control:focus-visible,
.btn-office365:focus-visible,
.btn-login-email:focus-visible {
    outline: 2px solid var(--login-secondary);
    outline-offset: 2px;
}
