/*
 * WESB - CMMS signed-out pages (login, forgot / reset password, Orbit refusal;
 * shell: resources/views/layouts/auth-split.blade.php). Plain static CSS.
 * Loaded after the Vite app.css, which supplies Inter + the reset. Every rule
 * is scoped under .lg-* so nothing leaks into the other auth pages.
 * Spec: docs/design/LOGIN-REDESIGN-SPEC.md (tokens after ATP 3.0).
 */
:root {
    --c-navy: #011D46;
    --c-navy-2: #06285A;
    --c-navy-deep: #021632;
    --c-blue: #0151A3;
    --c-gold: #FEBF18;
    --c-amber: #FDAB04;
    --c-navtext: #C9D2DD;
    --c-ink: #0F1B2D;
    --c-label: #132B40;
    --c-body: #4B5563;
    --c-muted: #5B6472;
    --c-field: #D6DEE8;
    --c-line: #E4E8EE;
    --c-canvas: #F7F9FC;
    --c-critical: #DC2626;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-inout: cubic-bezier(.65, 0, .35, 1);
    --lg-cover-w: 400px;
    --lg-form-w: 450px;
}

html.lg-html { height: 100%; }
body.lg-body {
    margin: 0;
    min-width: 0;
    min-height: 100%;
    min-height: 100dvh;
    background: #050E1A;
    color: var(--c-body);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.lg-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------ background */
.lg-bg {
    position: fixed; inset: 0; z-index: 0; overflow: hidden;
    background:
        radial-gradient(1200px 700px at 12% 8%, #0A2E5C, transparent 60%),
        linear-gradient(160deg, #011D46, #021632 55%, #010B1C);
}
.lg-bg__blur {
    position: absolute; inset: -40px;
    background: url('/images/login/bg-blur-32.webp') 35% 50% / cover no-repeat;
    filter: blur(24px); transform: scale(1.08);
}
.lg-bg picture, .lg-bg__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.lg-bg__img {
    object-fit: cover; object-position: 38% 50%;
    opacity: 0; transition: opacity .9s ease;
    transform-origin: 60% 45%;
}
.lg-bg__img.is-loaded { opacity: 1; animation: lg-kenburns 24s ease-in-out 0s infinite alternate; }
.no-js .lg-bg__img { opacity: 1; }
.lg-bg__overlay {
    position: absolute; inset: 0;
    background:
        radial-gradient(800px 500px at 85% 12%, rgba(254, 191, 24, .10), transparent 60%),
        linear-gradient(160deg, rgba(1, 29, 70, .82) 0%, rgba(1, 29, 70, .52) 52%, rgba(1, 14, 36, .86) 100%);
}
@keyframes lg-kenburns { from { transform: scale(1); } to { transform: scale(1.05); } }

/* ------------------------------------------------------------ page */
.lg-main {
    position: relative; z-index: 1;
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: 64px 24px;
    box-sizing: border-box;
}
.lg-card {
    position: relative;
    display: flex;
    width: 100%;
    max-width: calc(var(--lg-cover-w) + var(--lg-form-w));
    min-height: 540px;
    background: #fff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .05);
    animation: lg-rise .8s var(--ease-out) both;
}
@keyframes lg-rise { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: none; } }

/* The card is centred horizontally and vertically at every width (no left
   offset); the photo stays visible around it. */

/* ------------------------------------------------------------ cover (navy brand panel) */
.lg-cover {
    position: relative; z-index: 2;
    flex: 0 0 var(--lg-cover-w);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 36px 40px 56px;
    box-sizing: border-box;
    color: #fff;
    background:
        radial-gradient(420px 260px at 85% 6%, rgba(1, 81, 163, .45), transparent 70%),
        linear-gradient(180deg, #032654 0%, var(--c-navy) 42%, var(--c-navy-deep) 100%);
    border-radius: 0 32px 32px 0;
    box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 14px 0 32px -12px rgba(1, 14, 36, .45);
    overflow: hidden;
    isolation: isolate;
}
.lg-cover__grid {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(201, 210, 221, .065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 210, 221, .065) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: -1px -1px;
    -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 85%);
    mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 85%);
}
.lg-cover__rings {
    position: absolute; z-index: -1; pointer-events: none;
    width: 440px; height: 440px; right: -170px; bottom: -190px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at center, transparent 0 47px, rgba(254, 191, 24, .07) 47px 48px);
    -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%);
    mask-image: radial-gradient(circle, #000 55%, transparent 72%);
}
.lg-eyebrow {
    margin: 0 0 18px;
    font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--c-navtext);
    display: inline-flex; align-items: center; gap: 10px;
}
.lg-eyebrow::before, .lg-eyebrow::after { content: ''; width: 18px; height: 1px; background: rgba(254, 191, 24, .55); }

/* Lottie stage: the animated mark sits on a white medallion so the gear blue
   keeps its edges against the navy (the reason the full lockup never goes on navy). */
.lg-stage {
    position: relative;
    width: 188px; height: 188px;
    margin: 0 auto 26px;
    border-radius: 50%;
    display: grid; place-items: center;
}
.lg-stage::before {               /* soft halo */
    content: ''; position: absolute; inset: -26px; border-radius: 50%;
    background: radial-gradient(circle, rgba(1, 81, 163, .55) 0%, rgba(1, 81, 163, .12) 45%, transparent 70%);
    z-index: -1;
}
.lg-stage::after {                /* hairline orbit ring */
    content: ''; position: absolute; inset: -12px; border-radius: 50%;
    border: 1px solid rgba(254, 191, 24, .22);
}
.lg-stage__disc {
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #FFFFFF 0%, #F3F6FB 62%, #E3EAF4 100%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 -2px 6px rgba(1, 29, 70, .10), 0 0 0 6px rgba(255, 255, 255, .06);
}
#cmms-lottie {
    position: relative;
    width: 88%; height: 88%;
    display: grid; place-items: center;
}
#cmms-lottie svg { display: block; width: 100% !important; height: 100% !important; }
.lg-mark-fallback {
    display: block; width: 72%; height: auto; max-height: 100%; object-fit: contain;
    position: absolute; inset: 0; margin: auto;
}
#cmms-lottie.is-playing .lg-mark-fallback { opacity: 0; visibility: hidden; }

.lg-cover__title {
    margin: 0;
    font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em;
    color: #fff;
}
.lg-cover__title .lg-gold { color: var(--c-gold); }
.lg-cover__lead {
    margin: 12px auto 0; max-width: 300px;
    font-size: 13px; line-height: 1.6; color: var(--c-navtext);
}
.lg-ticker {
    position: relative;
    margin: 22px auto 0; padding: 0;
    list-style: none;
    height: 34px; width: 100%; max-width: 310px;
}
.lg-ticker li {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    font-size: 11.5px; color: #E6ECF3; white-space: nowrap;
    opacity: 0; transform: translateY(6px);
    transition: opacity .7s ease, transform .7s var(--ease-out);
}
.lg-ticker li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 1.5px; background: var(--c-gold); }
.lg-ticker li.is-active { opacity: 1; transform: none; }
.no-js .lg-ticker li:first-child { opacity: 1; transform: none; }

/* ------------------------------------------------------------ form column */
.lg-form {
    position: relative;
    flex: 1 1 var(--lg-form-w);
    min-width: 0;
    display: flex; flex-direction: column; justify-content: center;
    padding: 40px 48px 36px 52px;
    box-sizing: border-box;
    background: #fff;
}
.lg-form > * { animation: lg-fade-in .6s var(--ease-out) both; }
.lg-form > *:nth-child(1) { animation-delay: .28s; }
.lg-form > *:nth-child(2) { animation-delay: .34s; }
.lg-form > *:nth-child(3) { animation-delay: .40s; }
.lg-form > *:nth-child(4) { animation-delay: .46s; }
.lg-form > *:nth-child(5) { animation-delay: .52s; }
.lg-form > *:nth-child(n+6) { animation-delay: .58s; }
.lg-anim { animation: lg-fade-in .7s var(--ease-out) both; }
.lg-cover .lg-eyebrow { animation-delay: .12s; }
.lg-cover .lg-stage { animation: lg-pop .9s var(--ease-out) .08s both; }
.lg-cover .lg-cover__title { animation-delay: .22s; }
.lg-cover .lg-cover__lead { animation-delay: .3s; }
.lg-cover .lg-ticker { animation-delay: .38s; }
@keyframes lg-fade-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lg-pop { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }


/* Played once this session, or a validation round-trip: render static. */
.lg-played .lg-card, .lg-played .lg-form, .lg-played .lg-form > *, .lg-played .lg-anim, .lg-played .lg-stage,
.lg-static .lg-card, .lg-static .lg-form, .lg-static .lg-form > *, .lg-static .lg-anim, .lg-static .lg-stage { animation: none !important; }

.lg-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 28px; }
.lg-wordmark { display: block; width: 148px; height: auto; }
.lg-tagline {
    margin: 0;
    font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
    color: var(--c-muted);
    text-wrap: balance;
}
.lg-title {
    margin: 0;
    font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em;
    color: var(--c-ink);
}
.lg-sub { margin: 6px 0 22px; font-size: 13px; line-height: 1.6; color: var(--c-body); }
.lg-sub-gap { height: 18px; }
.lg-field--last { margin-bottom: 20px; }
.lg-ref { margin: 0 0 18px; font-size: 12.5px; line-height: 1.6; color: var(--c-body); }
.lg-ref code { font-size: 12.5px; color: var(--c-ink); }

.lg-alert {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 0 0 18px; padding: 11px 13px;
    border-radius: 10px;
    font-size: 12.5px; line-height: 1.5;
}
.lg-alert:focus { outline: none; box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }
.lg-alert__icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.lg-alert--error { background: #FEF2F2; color: #991B1B; box-shadow: inset 0 0 0 1px #FECACA; }
.lg-alert--info { background: #EFF6FF; color: #0B3D7A; box-shadow: inset 0 0 0 1px #BFDBFE; }
.lg-alert--info:focus { box-shadow: 0 0 0 3px rgba(1, 81, 163, .18); }

/* Buttons */
.lg-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 44px;
    padding: 0 18px;
    border: 0; border-radius: 10px;
    font: inherit; font-size: 13.5px; font-weight: 600; letter-spacing: -.005em;
    text-decoration: none; cursor: pointer;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
    box-sizing: border-box;
}
.lg-btn:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; }
.lg-btn--primary {
    background: var(--c-navy); color: #fff;
    box-shadow: 0 2px 6px rgba(1, 29, 70, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.lg-btn--primary:hover { background: var(--c-navy-2); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(1, 29, 70, .28); }
.lg-btn--primary:active { transform: none; }
.lg-btn--outline {
    background: #fff; color: var(--c-navy);
    box-shadow: inset 0 0 0 1px var(--c-field);
}
.lg-btn--outline:hover { box-shadow: inset 0 0 0 1px var(--c-blue); color: var(--c-navy); transform: translateY(-1px); background: #F8FAFD; }
.lg-btn__orbit { flex: none; width: 20px; height: 20px; }
.lg-btn__arrow { flex: none; width: 15px; height: 15px; transition: transform .18s ease; }
.lg-btn:hover .lg-btn__arrow { transform: translateX(2px); }
.lg-btn__spin {
    display: none; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: lg-spin .7s linear infinite;
}
.lg-btn.is-loading { pointer-events: none; opacity: .92; }
.lg-btn.is-loading .lg-btn__spin { display: inline-block; }
.lg-btn.is-loading .lg-btn__arrow, .lg-btn.is-loading .lg-btn__orbit { display: none; }
@keyframes lg-spin { to { transform: rotate(360deg); } }
.lg-orbit-note { margin: 8px 0 0; font-size: 11.5px; color: var(--c-muted); text-align: center; }

.lg-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0 18px;
    font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--c-muted);
}
.lg-divider::before, .lg-divider::after { content: ''; flex: 1; height: 1px; background: var(--c-line); }

/* Fields */
.lg-field { margin: 0 0 14px; }
.lg-label {
    display: block; margin: 0 0 6px;
    font-size: 12px; font-weight: 500; color: var(--c-label);
}
.lg-input-wrap { position: relative; }
.lg-input {
    display: block; width: 100%; height: 42px;
    padding: 0 13px;
    border: 1px solid var(--c-field); border-radius: 10px;
    background: #fff; color: var(--c-ink);
    font: inherit; font-size: 13.5px;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none; appearance: none;
}
.lg-input::placeholder { color: #8A94A3; }
.lg-input:hover { border-color: #B9C5D4; }
.lg-input:focus, .lg-input:focus-visible { outline: 2px solid transparent; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(1, 81, 163, .18); }
.lg-input[aria-invalid="true"] { border-color: var(--c-critical); box-shadow: 0 0 0 3px rgba(220, 38, 38, .10); }
.lg-input--pw { padding-right: 48px; }
.lg-input--pw::-ms-reveal { display: none; }
.lg-eye {
    position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border: 0; border-radius: 8px; background: transparent; color: #6B7280;
    cursor: pointer;
}
.lg-eye:hover { color: var(--c-navy); background: #F2F5F9; }
.lg-eye:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 0; }
.lg-eye svg { width: 18px; height: 18px; }
.lg-eye .lg-eye__off { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye__on { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye__off { display: block; }
.lg-field-error { margin: 6px 0 0; font-size: 12px; color: #B91C1C; }

.lg-check {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 2px 0 18px; min-height: 28px;
    font-size: 12.5px; color: var(--c-body); cursor: pointer;
    -webkit-user-select: none; user-select: none;
}
.lg-check input {
    flex: none; width: 17px; height: 17px; margin: 0;
    accent-color: var(--c-navy);
    cursor: pointer;
}
.lg-check input:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; }

.lg-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
    margin-top: 18px;
    font-size: 12px; color: var(--c-muted);
}
.lg-foot a {
    color: var(--c-blue); font-weight: 600; text-decoration: none;
    border-radius: 4px;
}
.lg-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lg-foot a:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; }
.lg-foot__lock { display: inline-flex; align-items: center; gap: 6px; }
.lg-foot__lock svg { width: 13px; height: 13px; flex: none; }

.lg-legal {
    position: fixed; left: 0; right: 0; bottom: 18px; z-index: 1;
    margin: 0; text-align: center;
    font-size: 11px; letter-spacing: .02em; color: var(--c-navtext);
    pointer-events: none;
}

/* ------------------------------------------------------------ 768–1199: centred, narrower cover */
@media (max-width: 1199px) {
    :root { --lg-cover-w: 370px; --lg-form-w: 430px; }
    .lg-cover { padding: 32px 32px 52px; }
    .lg-form { padding: 36px 40px 32px 44px; }
}

/* ------------------------------------------------------------ < 768: stacked, compressed cover */
@media (max-width: 767px) {
    .lg-main { align-items: center; padding: 16px 16px 56px; }
    .lg-card { flex-direction: column; min-height: 0; border-radius: 24px; max-width: 480px; margin: 0 auto; }
    .lg-cover {
        flex: none;
        flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px;
        text-align: left;
        padding: 22px 22px 24px;
        border-radius: 0 0 24px 24px;
        box-shadow: 0 12px 28px -14px rgba(1, 14, 36, .55);
    }
    .lg-cover__text { min-width: 0; }
    .lg-stage { flex: none; width: 92px; height: 92px; margin: 0; }
    .lg-stage::before { inset: -14px; }
    .lg-stage::after { inset: -7px; }
    .lg-eyebrow { margin: 0 0 6px; font-size: 9.5px; letter-spacing: .14em; gap: 0; }
    .lg-eyebrow::before, .lg-eyebrow::after { display: none; }
    .lg-cover__title { font-size: 24px; }
    .lg-cover__lead { margin: 6px 0 0; font-size: 12px; line-height: 1.5; max-width: none; }
    .lg-ticker { display: none; }
    .lg-cover__rings { width: 300px; height: 300px; right: -130px; bottom: -150px; }
    .lg-form { flex: none; padding: 26px 22px 24px; }
    .lg-brand { margin-bottom: 22px; }
    .lg-wordmark { width: 128px; }
    .lg-tagline { font-size: 9.5px; letter-spacing: .09em; }
    .lg-title { font-size: 20px; }
    .lg-sub { margin-bottom: 18px; }
    .lg-btn { height: 48px; font-size: 14.5px; }
    .lg-input { height: 48px; font-size: 16px; }   /* 16px stops iOS zoom-on-focus */
    .lg-input--pw { padding-right: 54px; }
    .lg-eye { width: 44px; height: 44px; right: 2px; }
    .lg-check { min-height: 44px; margin: 0 0 12px; font-size: 13.5px; }
    .lg-check input { width: 20px; height: 20px; }
    .lg-foot { flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 12px; font-size: 12.5px; }
    .lg-foot a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13.5px; }
    .lg-legal { position: static; padding: 20px 16px 22px; }
    .lg-main { min-height: 0; padding-bottom: 0; flex: 1 0 auto; }
    .lg-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; position: relative; z-index: 1; }
}
@media (max-width: 380px) {
    .lg-cover { gap: 14px; padding: 18px 18px 20px; }
    .lg-stage { width: 80px; height: 80px; }
    .lg-cover__title { font-size: 22px; }
    .lg-form { padding: 24px 18px 22px; }
}
@media (min-width: 768px) {
    .lg-cover__text { display: contents; }
}

/* Short landscape screens: let the card scroll instead of clipping. */
@media (min-width: 768px) and (max-height: 640px) {
    .lg-main { align-items: flex-start; }
    .lg-card { min-height: 0; }
    .lg-stage { width: 140px; height: 140px; margin-bottom: 18px; }
}

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lg-card, .lg-form, .lg-form > *, .lg-anim, .lg-stage, .lg-bg__img.is-loaded { animation: none !important; }
    .lg-bg__img { transition: opacity .2s linear; }
    .lg-ticker li { transition: opacity .2s linear; transform: none; }
    .lg-btn, .lg-btn__arrow { transition: none; }
    .lg-btn:hover, .lg-btn:hover .lg-btn__arrow { transform: none; }
    .lg-btn__spin { animation-duration: 1.6s; }
}
