/*
 * AC platform authentication shell.
 *
 * This file is the reusable visual contract for AC product login and public
 * authentication screens. Keep its markup contract and geometry unchanged
 * between products. Product identity belongs in the page content and in the
 * replaceable /assets/ac-auth-hero.png image, not in this stylesheet.
 */

.auth-screen {
    --ac-auth-bg: #09152c;
    --ac-auth-topbar: #0d1b38;
    --ac-auth-surface: #ffffff;
    --ac-auth-text: #1b2433;
    --ac-auth-muted: #657086;
    --ac-auth-line: #dce2ec;
    --ac-auth-input-line: #bec8d8;
    --ac-auth-accent: #007e96;
    --ac-auth-accent-dark: #006778;
    --ac-auth-danger: #a3212c;
    --ac-auth-danger-bg: #fff1f2;
    --ac-auth-success: #11643a;
    --ac-auth-success-bg: #ebf9f1;
    min-height: 100vh;
    margin: 0;
    background: var(--ac-auth-bg);
    color: var(--ac-auth-text);
    font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-screen * {
    box-sizing: border-box;
}

.auth-screen a {
    color: var(--ac-auth-accent);
}

.auth-screen .skip-link {
    position: fixed;
    z-index: 10000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff;
    color: var(--ac-auth-accent-dark);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-150%);
    box-shadow: 0 12px 34px rgba(20, 36, 72, .16);
}

.auth-screen .skip-link:focus {
    transform: translateY(0);
}

.auth-screen :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.auth-screen .auth-topbar {
    position: relative;
    z-index: 10;
    min-height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: var(--ac-auth-topbar);
    color: #fff;
}

.auth-screen .brand {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #fff;
    font-family: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", system-ui, sans-serif;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.025em;
    text-decoration: none;
}

.auth-screen .brand-word {
    color: #fff;
}

.auth-screen .brand-ac {
    min-width: 35px;
    height: 33px;
    padding: 0 5px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 4px;
    background: var(--ac-auth-accent);
    color: #fff;
    font-weight: 850;
    letter-spacing: -.045em;
    box-shadow: 0 0 0 1px rgba(0, 126, 150, .36), 0 4px 14px rgba(3, 14, 28, .28);
}

.auth-screen .brand-ac-label {
    display: block;
    transform: translate(-1px, -1px);
}

.auth-screen .auth-topbar .topbar-actions,
.auth-screen .languages {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-screen .languages {
    gap: 6px;
}

.auth-screen .languages a {
    padding: 4px 7px;
    border-radius: 6px;
    color: #cbd6f2;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.auth-screen .languages a[aria-current="page"] {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.auth-screen .auth-page-shell {
    width: 100%;
    min-height: calc(100vh - 64px);
    margin: 0;
}

.auth-screen .auth-experience {
    position: relative;
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(488px, 28.5vw, 548px);
    overflow: hidden;
    background: var(--ac-auth-bg);
}

.auth-screen .auth-visual {
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding: clamp(24px, 4vw, 64px);
    display: flex;
    align-items: flex-end;
    background: var(--ac-auth-bg) url('/assets/ac-auth-hero.png') center center / cover no-repeat;
}

.auth-screen .auth-visual::before {
    position: absolute;
    z-index: -1;
    inset: 50% 0 0;
    content: '';
    background: linear-gradient(transparent, rgba(9, 21, 44, .79));
}

.auth-screen .auth-visual-copy {
    display: grid;
    gap: 12px;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .65);
}

.auth-screen .auth-visual-kicker {
    font-size: clamp(11px, .85vw, 14px);
    font-weight: 800;
    letter-spacing: .16em;
}

.auth-screen .auth-visual-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-screen .auth-visual-badges span {
    min-height: 30px;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(7, 18, 38, .62);
    color: #eaf1ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    backdrop-filter: blur(8px);
}

.auth-screen .auth-visual-badges i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #55dd91;
    box-shadow: 0 0 0 4px rgba(85, 221, 145, .13), 0 0 12px rgba(85, 221, 145, .75);
}

.auth-screen .auth-panel {
    min-width: 0;
    padding: 24px 0;
    display: grid;
    place-items: center;
    background: var(--ac-auth-bg);
}

.auth-screen .auth-card {
    width: min(440px, 100%);
    margin: 0;
    padding: 36px;
    border: 1px solid var(--ac-auth-line);
    border-radius: 14px;
    background: var(--ac-auth-surface);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
}

.auth-screen h1,
.auth-screen p {
    margin-top: 0;
}

.auth-screen .auth-card h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.auth-screen .auth-login-card h1 {
    margin-bottom: 24px;
    font-size: clamp(25px, 2.2vw, 32px);
    line-height: 1.15;
}

.auth-screen .eyebrow {
    margin-bottom: 8px;
    color: var(--ac-auth-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.auth-screen .muted {
    color: var(--ac-auth-muted);
}

.auth-screen .form-stack {
    display: grid;
    gap: 20px;
}

.auth-screen label {
    display: grid;
    gap: 7px;
    font-weight: 650;
}

.auth-screen label:has(> input[required]) > span:first-child::after {
    content: ' *';
    color: var(--ac-auth-danger);
    font-weight: 850;
}

.auth-screen input,
.auth-screen select,
.auth-screen textarea {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--ac-auth-input-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ac-auth-text);
    font: inherit;
}

.auth-screen input:focus,
.auth-screen select:focus,
.auth-screen textarea:focus {
    border-color: var(--ac-auth-accent);
    outline: 3px solid rgba(12, 113, 140, .17);
}

.auth-screen input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--ac-auth-accent);
}

.auth-screen label:has(> input[type="checkbox"]) {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
}

.auth-screen .button {
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.auth-screen .button-primary {
    background: var(--ac-auth-accent);
    color: #fff;
    box-shadow: 0 9px 22px rgba(12, 113, 140, .24);
}

.auth-screen .button-primary:hover {
    background: var(--ac-auth-accent-dark);
    box-shadow: 0 11px 26px rgba(12, 113, 140, .32);
}

.auth-screen .alert {
    margin-bottom: 20px;
    padding: 12px 15px;
    border: 1px solid;
    border-radius: 9px;
}

.auth-screen .alert-error {
    border-color: #efb4ba;
    background: var(--ac-auth-danger-bg);
    color: var(--ac-auth-danger);
}

.auth-screen .alert-success {
    border-color: #a9dfbf;
    background: var(--ac-auth-success-bg);
    color: var(--ac-auth-success);
}

/*
 * Approved ServiceAC transparent-card treatment.
 * The exact teal token is rendered on its own 30%-opacity layer so the
 * photograph remains visible while form content stays fully opaque.
 * Remove the auth-inverted-card class from <body> to restore the canonical
 * white authentication card without changing this stylesheet.
 */
.auth-screen.auth-inverted-card .auth-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: rgba(255, 255, 255, .28);
    background: transparent;
    color: #fff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
}

.auth-screen.auth-inverted-card .auth-card::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--ac-auth-accent);
    opacity: .30;
    pointer-events: none;
}

.auth-screen.auth-inverted-card .auth-login-card > p:last-child {
    margin: 12px 0 0;
}

.auth-screen.auth-inverted-card .auth-card h1,
.auth-screen.auth-inverted-card .auth-card label,
.auth-screen.auth-inverted-card .auth-card .muted,
.auth-screen.auth-inverted-card .auth-card a {
    color: #fff;
}

.auth-screen.auth-inverted-card .auth-card label:has(> input[required]) > span:first-child::after {
    color: #ffd6dc;
}

.auth-screen.auth-inverted-card .auth-card input,
.auth-screen.auth-inverted-card .auth-card select,
.auth-screen.auth-inverted-card .auth-card textarea {
    border-color: rgba(9, 21, 44, .22);
    background: #fff;
    color: var(--ac-auth-text);
}

.auth-screen.auth-inverted-card .auth-card input[type="checkbox"] {
    accent-color: #fff;
}

.auth-screen.auth-inverted-card .auth-card .button:not(.button-primary) {
    border-color: rgba(255, 255, 255, .52);
    color: #fff;
}

.auth-screen.auth-inverted-card .auth-card .button-primary {
    border-color: var(--ac-auth-topbar);
    background: var(--ac-auth-topbar);
    color: #fff;
    box-shadow: 0 9px 22px rgba(9, 21, 44, .24);
}

.auth-screen.auth-inverted-card .auth-card .button-primary:hover {
    border-color: var(--ac-auth-bg);
    background: var(--ac-auth-bg);
    color: #fff;
    box-shadow: 0 11px 26px rgba(9, 21, 44, .32);
}

/*
 * Approved ServiceAC full-bleed panorama treatment.
 * Remove the auth-fullbleed class from <body> to restore the canonical split
 * photo/rail composition without changing this stylesheet.
 */
@media (min-width: 1024px) {
    .auth-screen.auth-fullbleed .auth-experience {
        isolation: isolate;
        background: var(--ac-auth-bg) url('/assets/ac-auth-hero-fullbleed.png') center center / cover no-repeat;
    }

    .auth-screen.auth-fullbleed .auth-experience::after {
        position: absolute;
        z-index: 0;
        inset: 0;
        content: '';
        pointer-events: none;
        background: linear-gradient(
            90deg,
            rgba(9, 21, 44, 0) 0%,
            rgba(9, 21, 44, 0) 52%,
            rgba(9, 21, 44, .18) 62%,
            rgba(9, 21, 44, .68) 71.5%,
            rgba(9, 21, 44, .92) 82%,
            rgba(9, 21, 44, .98) 100%
        );
    }

    .auth-screen.auth-fullbleed .auth-visual,
    .auth-screen.auth-fullbleed .auth-panel {
        position: relative;
        z-index: 1;
        background: transparent;
    }

    .auth-screen.auth-fullbleed .auth-visual::before {
        z-index: 0;
    }

    .auth-screen.auth-fullbleed .auth-visual-copy {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 720px) {
    .auth-screen .auth-topbar {
        min-height: 60px;
        padding: 10px 16px;
        align-items: center;
    }

    .auth-screen .brand {
        font-size: 20px;
    }

    .auth-screen .brand-ac {
        min-width: 32px;
        height: 30px;
        padding: 0 4px;
    }

    .auth-screen .auth-topbar .topbar-actions {
        width: auto;
        flex-direction: row;
        align-items: center;
    }

    .auth-screen .auth-page-shell {
        width: 100%;
        min-height: calc(100vh - 60px);
        margin: 0;
    }

    .auth-screen .auth-experience {
        min-height: calc(100vh - 60px);
        grid-template-columns: 1fr;
        grid-template-rows: minmax(168px, 26vh) auto;
        overflow: visible;
    }

    .auth-screen .auth-visual {
        min-height: 168px;
        padding: 16px;
        background-position: 35% center;
    }

    .auth-screen .auth-visual-copy {
        gap: 8px;
    }

    .auth-screen .auth-visual-kicker {
        max-width: 22rem;
        font-size: 10px;
    }

    .auth-screen .auth-visual-badges span {
        min-height: 26px;
        padding: 4px 8px;
        font-size: 9px;
    }

    .auth-screen .auth-panel {
        align-items: start;
        padding: 18px 12px 32px;
        background: #f5f7fb;
    }

    .auth-screen .auth-card {
        padding: 24px;
        box-shadow: 0 14px 34px rgba(20, 36, 72, .12);
    }
}
