*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body.auth-page {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #101828;
    background: #fff;
    overflow-x: hidden;
}

/* Full-width split layout: form panel + fluid hero (no gap on wide screens) */
.auth-login {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

.auth-login__panel {
    flex: 0 1 718px;
    width: 100%;
    max-width: 718px;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 30px clamp(24px, 4vw, 48px) 24px;
}

.auth-login__logo {
    display: block;
    align-self: flex-start;
    flex-shrink: 0;
}

.auth-login__logo img {
    display: block;
    width: 114px;
    height: 58.5545px;
    object-fit: contain;
}

.auth-login__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: clamp(24px, 6vh, 48px) 0;
}

.auth-login__form-wrap {
    width: 100%;
    max-width: 360px;
}

.auth-login__content {
    width: 100%;
}

.auth-login__content[hidden] {
    display: none !important;
}

.auth-login__content--microsoft:not([hidden]) {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.auth-login__title {
    margin: 0 0 12px;
    font-size: clamp(24px, 4vw, 30px);
    font-weight: 600;
    line-height: 1.27;
    color: #101828;
}

.auth-login__subtitle {
    margin: 0 0 32px;
    font-size: 16px;
    line-height: 24px;
    color: #475467;
}

.auth-login__alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fef3f2;
    border: 1px solid #fecdca;
    color: #b42318;
    font-size: 14px;
    line-height: 20px;
}

.auth-login__alert-meta {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}

.auth-login__diag {
    width: 100%;
    max-width: 360px;
    margin-top: 24px;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 18px;
    color: #344054;
    background: #f9fafb;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.auth-login__diag-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #101828;
}

.auth-login__diag-list {
    margin: 0;
}

.auth-login__diag-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
    margin-bottom: 4px;
}

.auth-login__diag-row dt {
    margin: 0;
    font-weight: 500;
    color: #475467;
}

.auth-login__diag-row dd {
    margin: 0;
    word-break: break-word;
}

.auth-login__diag-row--message dd {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 11px;
}

.auth-login__diag-ok {
    color: #067647;
    font-weight: 600;
}

.auth-login__diag-fail {
    color: #b42318;
    font-weight: 600;
}

.auth-login__diag-hint {
    margin: 10px 0 0;
    font-size: 11px;
    color: #667085;
}

.auth-login__diag-hint code {
    font-size: 11px;
}

.auth-login__field {
    margin-bottom: 20px;
}

.auth-login__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: #344054;
}

.auth-login__input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.auth-login__input-wrap img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-login__input-wrap input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    font-size: 16px;
    line-height: 24px;
    color: #101828;
    background: transparent;
}

.auth-login__input-wrap input::placeholder {
    color: #667085;
}

.auth-login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 24px;
    gap: 12px;
}

.auth-login__remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #344054;
}

.auth-login__remember input {
    width: 16px;
    height: 16px;
    accent-color: #c41230;
}

.auth-login__forgot {
    font-size: 14px;
    font-weight: 600;
    color: #c41230;
    text-decoration: none;
    white-space: nowrap;
}

.auth-login__forgot:hover {
    text-decoration: underline;
}

.auth-login__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: #c41230;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.auth-login__btn:hover {
    background: #a30f28;
}

.auth-login__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #475467;
    font-size: 14px;
}

.auth-login__divider::before,
.auth-login__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e4e7ec;
}

.auth-login__ms-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.auth-login__ms-link:hover {
    background: #f9fafb;
}

/* Hero fills all remaining viewport width */
.auth-login__hero {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    background: #1a1a1a;
}

.auth-login__hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.auth-login__footer {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 24px;
    font-size: 14px;
    line-height: 20px;
    color: #475467;
    flex-shrink: 0;
}

/* Large desktops: cap form column at Figma proportions, hero still grows */
@media (min-width: 1441px) {
    .auth-login__panel {
        flex: 0 0 718px;
        max-width: 718px;
    }
}

/* Tablet: narrower form column, smaller hero */
@media (max-width: 1200px) {
    .auth-login {
        flex-direction: column;
    }

    .auth-login__panel {
        flex: none;
        max-width: none;
        min-height: auto;
        padding: 24px 24px 32px;
    }

    .auth-login__main {
        padding: 24px 0;
    }

    .auth-login__form-wrap {
        max-width: 480px;
    }

    .auth-login__hero {
        flex: none;
        width: 100%;
        min-height: 280px;
        max-height: 40vh;
        order: -1;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .auth-login__panel {
        padding: 20px 16px 24px;
    }

    .auth-login__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-login__hero {
        min-height: 200px;
        max-height: 32vh;
    }
}

/* Microsoft sign-in — inline panel (matches auth-login__* aesthetics) */
.auth-ms__panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
}

.auth-ms__logo-wrap {
    margin: 0 0 32px;
    flex-shrink: 0;
}

.auth-ms__logo {
    display: block;
    width: 240px;
    height: auto;
    max-width: 100%;
}

.auth-ms__sign-in {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.auth-ms__sign-in:hover {
    background: #f9fafb;
}

.auth-ms__sign-in img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
}

.auth-ms__switch {
    display: block;
    margin-top: 24px;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: #106cbc;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
}

.auth-ms__switch:hover {
    text-decoration: underline;
    color: #0d5a9c;
}

.auth-ms__switch--after-form {
    margin-top: 20px;
}

.auth-ms__forgot-row {
    display: inline-block;
    margin-bottom: 24px;
}

.auth-ms__footer {
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 20px;
    color: #475467;
}

.auth-ms__footer a {
    font-weight: 600;
    color: #c41230;
    text-decoration: none;
}

.auth-ms__footer a:hover {
    text-decoration: underline;
}

/* Legacy — unused after Microsoft panel simplification */
.auth-ms__back {
    display: block;
    margin-top: auto;
    padding: 24px 0 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: #106cbc;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
}

.auth-ms__back:hover {
    text-decoration: underline;
    color: #0d5a9c;
}
