/* Authentication uses the same dark blue surfaces and controls as the client zone. */
.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; }
}
