/* Authentication base styles; the neutral client palette is applied below. */
.auth-layout {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: #e8f1ff;
    background: #01040a;
}

.auth-back-link {
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 10px;
    color: #c8d8ec;
    background: #142034;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.auth-back-link:hover {
    color: #fff;
    background: #18263c;
    transform: translateY(-1px);
}

.auth-main {
    display: flex;
    flex: 1 0 auto;
    min-height: 0;
}

.auth-page {
    position: relative;
    width: 100%;
    min-height: 100svh;
    padding: 64px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #01040a;
}

.auth-login-shell {
    width: min(100%, 520px);
    margin: 0 auto;
    display: grid;
    justify-items: center;
    gap: 24px;
}

.auth-page-logo {
    width: 220px;
    height: 44px;
    display: block;
}

.auth-page-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-back-link--below {
    min-width: 150px;
}

.auth-panel {
    position: relative;
    width: min(100%, 520px);
    margin-right: auto;
    margin-left: auto;
    border: 0;
    border-radius: 22px;
    background: #06101c;
    box-shadow: none;
}

.auth-panel__heading {
    margin-bottom: 30px;
    display: grid;
    gap: 10px;
}

.auth-panel__heading h1 {
    margin: 0;
    font-size: clamp(2.15rem, 4vw, 2.55rem);
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.auth-panel__heading p { margin: 0; }

.auth-form,
.auth-fields {
    display: grid;
}

.auth-form { gap: 22px; }
.auth-fields { gap: 18px; }
.auth-field { display: grid; gap: 8px; }

.auth-label {
    color: #dbe7f7;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 500;
}

.auth-input {
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    border: 0;
    border-radius: 11px;
    outline: none;
    color: #f5f8ff;
    background: #142034;
    caret-color: #8eb7ff;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    box-shadow: none;
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.auth-input::placeholder { color: #71849e; }
.auth-input:hover { background: #1a2b42; }

.auth-input:focus {
    background: #1b2d45;
    box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.48);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f5f8ff;
    -webkit-box-shadow: 0 0 0 1000px #142034 inset;
    transition: background-color 9999s ease-out;
}

.auth-input.input-validation-error {
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.72);
}

.auth-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.auth-remember {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.auth-remember__box {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 5px;
    background: #142034;
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.auth-remember input:focus-visible + .auth-remember__box {
    box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.5);
}

.auth-remember input:checked + .auth-remember__box { background: #0875ee; }

.auth-remember input:checked + .auth-remember__box::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.auth-forgot-password {
    color: #8cb5ff;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.5;
    font-weight: 500;
    text-align: right;
    transition: color 180ms ease;
}

.auth-forgot-password:hover { color: #fff; }

.auth-forgot-password:focus-visible {
    outline: 2px solid rgba(79, 140, 255, 0.72);
    outline-offset: 3px;
    border-radius: 3px;
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    padding: 7px 8px 7px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: #0875ee;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(31, 91, 203, 0.22);
    transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.auth-submit:hover {
    background: #1689ff;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(31, 91, 203, 0.3);
}

.auth-submit__arrow {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(4, 25, 63, 0.3);
    font-size: 1.1rem;
}

.auth-external { margin-top: 26px; }
.auth-external--first { margin-top: 0; }

.auth-separator {
    margin: 20px 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.auth-separator span { height: 1px; background: rgba(99, 130, 167, 0.18); }
.auth-separator strong { color: #6f829c; font-family: 'Inter Tight', sans-serif; font-size: 0.75rem; font-weight: 400; }

.auth-provider {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 11px;
    color: #dbe8f8;
    background: #142034;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease;
}

.auth-provider:hover { color: #fff; background: #18263c; }

.auth-legal-copy {
    margin-top: 20px;
    color: #6f829c;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.75rem;
    line-height: 1.65;
    text-align: center;
}

.auth-legal-copy a {
    color: #91b8ff;
    text-decoration: underline;
    text-decoration-color: rgba(145, 184, 255, 0.42);
    text-underline-offset: 3px;
    transition: color 180ms ease;
}

.auth-legal-copy a:hover { color: #fff; }

.auth-register-link {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(99, 130, 167, 0.16);
    color: #70839d;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.5;
    text-align: center;
}

.auth-register-link a { margin-left: 3px; color: #8cb5ff; font-weight: 500; }

.auth-field-validation,
.auth-validation-summary {
    display: block;
    margin-top: 0.35rem;
    color: rgb(252 165 165);
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.auth-field-validation:empty,
.auth-validation-summary.validation-summary-valid {
    display: none;
}

.auth-validation-summary ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-layout > footer { flex: 0 0 auto; }

@media (max-height: 820px) and (min-width: 768px) {
    .auth-page { padding: 44px 0; align-items: flex-start; }
}

@media (max-width: 767px) {
    .auth-back-link { min-height: 40px; padding: 0 12px; font-size: 0.8125rem; }
    .auth-page { padding: 40px 0; align-items: flex-start; }
    .auth-page-logo { width: 190px; height: 40px; }
}

@media (max-width: 639px) {
    .auth-panel { border-radius: 18px; }
    .auth-panel__heading { margin-bottom: 25px; }
}

/* Sign-in and password recovery theme: matches the neutral ClientZone palette. */
.auth-layout { background: #030303; color: #f7f7f7; }
.auth-layout .auth-page {
    background: #030303;
    padding: 48px 20px;
    overflow: visible;
}
.auth-layout .auth-page .main-container { padding: 0; }
.auth-layout .auth-login-shell { width: min(100%, 440px); gap: 28px; }
.auth-layout .auth-page-logo { width: 186px; height: 40px; }
.auth-layout .auth-panel {
    width: 100%;
    padding: 32px;
    border: 0;
    border-radius: 24px;
    background: #111;
    box-shadow: none;
}
.auth-layout .auth-panel__heading { gap: 12px; margin-bottom: 28px; }
.auth-layout .auth-panel__heading h1 {
    color: #fafafa;
    font-size: clamp(28px, 5vw, 34px);
    line-height: 1.18;
    letter-spacing: -.035em;
    font-weight: 600;
}
.auth-layout .auth-panel__heading p { color: #a0a0a0; font-size: 14px; line-height: 1.65; }
.auth-layout .auth-form { gap: 22px; }
.auth-layout .auth-fields { gap: 18px; }
.auth-layout .auth-label { color: #dedede; font-size: 13px; }
.auth-layout .auth-input {
    min-height: 52px;
    border-radius: 12px;
    background: #202020;
    color: #fff;
    caret-color: #008ee8;
    padding: 14px 16px;
    font-size: 15px;
}
.auth-layout .auth-input::placeholder { color: #808080; }
.auth-layout .auth-input:hover { background: #252525; }
.auth-layout .auth-input:focus { background: #252525; box-shadow: 0 0 0 2px #008ee8; }
.auth-layout .auth-input:-webkit-autofill,
.auth-layout .auth-input:-webkit-autofill:hover,
.auth-layout .auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #202020 inset;
}
.auth-layout .auth-input.input-validation-error { box-shadow: 0 0 0 2px #dc7272; }
.auth-layout .auth-login-options { gap: 12px; flex-wrap: wrap; }
.auth-layout .auth-remember { gap: 8px; }
.auth-layout .auth-remember > span:last-child { color: #a0a0a0; }
.auth-layout .auth-remember__box { background: #333; }
.auth-layout .auth-remember input:checked + .auth-remember__box { background: #008ee8; }
.auth-layout .auth-remember input:focus-visible + .auth-remember__box { box-shadow: 0 0 0 2px #008ee8; }
.auth-layout .auth-forgot-password { color: #c4c4c4; font-size: 12px; }
.auth-layout .auth-submit {
    min-height: 50px;
    border-radius: 12px;
    padding: 12px 18px;
    background: #008ee8;
    color: #fff;
    box-shadow: none;
    font-weight: 600;
}
.auth-layout .auth-submit:hover { background: #24a6f5; box-shadow: none; transform: none; }
.auth-layout .auth-submit__arrow { width: 24px; height: 24px; background: transparent; color: #000; font-size: 22px; }
.auth-layout .auth-provider { background: #222; color: #eee; border-radius: 12px; }
.auth-layout .auth-provider:hover { background: #2b2b2b; }
.auth-layout .auth-external { display: grid; gap: 10px; }
.auth-layout .auth-separator { margin: 22px 0; }
.auth-layout .auth-separator span { background: #303030; }
.auth-layout .auth-separator strong { color: #929292; }
.auth-layout .auth-legal-copy { color: #929292; font-size: 11px; line-height: 1.75; margin-top: 22px; }
.auth-layout .auth-legal-copy a { color: #bbb; text-decoration-color: #666; }
.auth-layout .auth-register-link { border: 0; padding-top: 0; margin-top: 24px; color: #a0a0a0; }
.auth-layout .auth-register-link a { color: #fff; }
.auth-layout .auth-back-link { background: transparent; color: #929292; font-size: 13px; padding: 0 12px; }
.auth-layout .auth-back-link:hover { background: transparent; color: #fff; transform: none; }
.auth-layout :is(.auth-forgot-password, .auth-legal-copy a, .auth-register-link a):hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.auth-layout :is(button, a):focus-visible { outline: 2px solid #008ee8; outline-offset: 4px; }
.auth-layout .auth-recovery__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
    border-radius: 16px;
    background: #222;
    color: #dcc82d;
}
.auth-layout .auth-recovery .auth-register-link { margin-top: 18px; }
.auth-layout .auth-recovery .auth-register-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin-left: 0;
}
@media(max-width:480px) {
    .auth-layout .auth-page { padding: 32px 16px; }
    .auth-layout .auth-panel { padding: 26px 20px; border-radius: 20px; }
    .auth-layout .auth-login-shell { gap: 22px; }
}
@media(prefers-reduced-motion:reduce) {
    .auth-layout :is(.auth-input, .auth-submit, .auth-provider, .auth-back-link) { transition: none; }
}
