/* Academy Auth */
.login-layout-root {
    min-height: 100vh;
    color-scheme: light;

    /* Auth pages stay visually fixed regardless of the selected shell theme/mode. */
    --academy-accent: #666b73;
    --academy-accent-strong: #474c55;
    --academy-accent-soft: rgba(102, 107, 115, 0.12);
    --academy-bg: #e5e8e4;
    --academy-bg-2: #f1f2ef;
    --academy-surface: #ffffff;
    --academy-surface-2: #f6f7f5;
    --academy-surface-glass: rgba(255, 255, 255, 0.82);
    --academy-surface-soft: rgba(103, 109, 118, 0.08);
    --academy-surface-softer: rgba(255, 255, 255, 0.68);
    --academy-text: #1b1d22;
    --academy-text-muted: #676d76;
    --academy-label: rgba(27, 29, 34, 0.84);
    --academy-border: rgba(27, 29, 34, 0.10);
    --academy-border-strong: rgba(27, 29, 34, 0.16);
    --academy-focus: rgba(103, 109, 118, 0.12);
    --academy-shell: linear-gradient(180deg, #747983 0%, #555b65 34%, #343942 68%, #1b1d22 100%);
    --academy-shell-text: rgba(255, 255, 255, 0.92);
    --academy-success-bg: #ecf7ef;
    --academy-success-text: #0f6b45;
    --academy-warning-bg: #fff7e7;
    --academy-warning-text: #9f6500;
    --academy-danger-bg: #fff2f2;
    --academy-danger-text: #b64242;
}

.auth-shell {
    min-height: 100vh;
    padding: 22px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 34%),
        linear-gradient(180deg, var(--academy-bg-2) 0%, var(--academy-bg) 100%);
}

.auth-shell--compact {
    padding-block: 40px;
}

.auth-box {
    width: min(700px, 100%);
    min-height: 332px;
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    background: var(--academy-surface);
    border: 1px solid var(--academy-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10), 0 8px 20px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.auth-box--single {
    width: min(520px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
}

.auth-left {
    position: relative;
    padding: 22px;
    background: var(--academy-shell);
    color: var(--academy-shell-text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(6px);
}

.auth-brand-copy {
    max-width: 274px;
}

.auth-brand-copy h2 {
    font-size: var(--academy-fs-auth-hero);
    line-height: 1.18;
    margin-bottom: 8px;
    color: inherit;
}

.auth-brand-copy p,
.auth-left-footer,
.auth-brand-eyebrow {
    color: rgba(255, 255, 255, 0.82);
}

.auth-brand-eyebrow,
.auth-panel__eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: var(--academy-fs-eyebrow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.auth-right {
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, var(--academy-surface-2) 100%);
}

.auth-right--single {
    padding: 22px;
}

.auth-panel {
    width: 100%;
    max-width: 292px;
}

.auth-panel--loading {
    max-width: 100%;
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.auth-panel__header {
    margin-bottom: 14px;
}

.auth-panel__header p {
    color: var(--academy-text-muted);
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block: 10px 12px;
}

.auth-dev-hint {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--academy-border);
    color: var(--academy-text-muted);
}

.input-password-wrap {
    position: relative;
}

.input-password-wrap .input {
    padding-right: 82px;
}

.input-password-toggle {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--academy-accent-strong);
    font-weight: 600;
    cursor: pointer;
}

.button-row--auth {
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .auth-box {
        grid-template-columns: 1fr;
    }

    .auth-left {
        min-height: 200px;
    }
}

@media (max-width: 640px) {
    .auth-shell {
        padding: 16px;
    }

    .auth-left,
    .auth-right,
    .auth-right--single {
        padding: 22px 18px;
    }

    .auth-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .button-row--auth {
        flex-direction: column;
        align-items: stretch;
    }
}

.auth-panel__header h1 {
    font-size: var(--academy-fs-auth-title);
    line-height: 1.15;
    margin-bottom: 6px;
}

.auth-panel__header p {
    font-size: 11.5px;
    line-height: 1.45;
}

.auth-brand-copy p,
.auth-left-footer {
    font-size: 11.5px;
    line-height: 1.45;
}

.auth-panel .field-group label {
    font-size: var(--academy-fs-label);
}

.auth-panel .input,
.auth-panel .button,
.auth-panel .checkbox-row,
.auth-panel .text-link,
.input-password-toggle,
.auth-dev-hint {
    font-size: var(--academy-fs-body);
}

.auth-left--global {
    align-items: center;
    justify-content: center;
}

.auth-brand-center {
    flex: 1;
    width: 100%;
    display: grid;
    place-items: center;
}

.auth-brand-logo {
    width: min(270px, 88%);
    height: auto;
    display: block;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.10));
}

.auth-left-footer--center {
    width: 100%;
    text-align: center;
    letter-spacing: 0.04em;
}


/* Login refinements */
.auth-left--global {
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #747983 0%, #555b65 34%, #343942 68%, #1b1d22 100%);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-left--global .auth-left-footer {
    color: #747983;
}

.auth-left--global .auth-brand-logo {
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.38));
}

.auth-brand-logo {
    width: min(274px, 100%);
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.auth-left-footer--center {
    width: 100%;
    text-align: center;
    letter-spacing: 0.04em;
    font-size: 11.5px;
}

.input-password-wrap .input {
    padding-right: 40px;
}

.input-password-toggle {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: calc(100% - 4px);
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(54, 61, 71, 0.72);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.input-password-toggle:hover {
    background: rgba(54, 61, 71, 0.06);
    color: rgba(54, 61, 71, 0.9);
}

.input-password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(54, 61, 71, 0.12);
}

.input-password-icon {
    width: 18px;
    height: 18px;
}

.auth-text-link,
.auth-text-link:visited {
    color: rgba(54, 61, 71, 0.78);
}

.auth-text-link:hover {
    color: rgba(54, 61, 71, 0.94);
}

.button--primary.login-submit-button {
    color: #fff;
    background: linear-gradient(180deg, #666b73 0%, #474c55 100%);
    border-color: rgba(27, 29, 34, 0.18);
    box-shadow: 0 10px 22px rgba(27, 29, 34, 0.18);
}

.button--primary.login-submit-button:hover {
    background: linear-gradient(180deg, #828892 0%, #5b616b 100%);
    border-color: rgba(27, 29, 34, 0.24);
    box-shadow: 0 12px 24px rgba(27, 29, 34, 0.2);
}

.button--primary.login-submit-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 97, 107, 0.18), 0 12px 24px rgba(27, 29, 34, 0.18);
}

.button--primary.login-submit-button:disabled {
    background: linear-gradient(180deg, #7a7f87 0%, #595f67 100%);
}


.auth-status-line {
    min-height: 24px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--academy-border);
    color: transparent;
    font-size: var(--academy-fs-body);
    font-weight: 700;
}

.auth-status-line--error {
    color: var(--academy-danger-text);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Login final neutral refinements */
.auth-shell {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.76), transparent 34%),
        linear-gradient(180deg, #f1f2ef 0%, #e5e8e4 100%);
}

.auth-panel .input:focus,
.auth-panel .input:focus-visible {
    border-color: rgba(96, 102, 110, 0.46);
    box-shadow: 0 0 0 4px rgba(103, 109, 118, 0.12);
}

.auth-panel .valid.modified:not([type=checkbox]) {
    outline: 1px solid rgba(96, 102, 110, 0.58);
}

.auth-panel input[type="checkbox"] {
    accent-color: #666b73;
}


/* Forgot password premium refinements */
.auth-box--forgot {
    width: min(700px, 100%);
    min-height: 332px;
}

.auth-panel--forgot {
    max-width: 292px;
}

.auth-helper-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(96, 102, 110, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(242, 244, 244, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.auth-helper-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(180deg, #777d87 0%, #525861 100%);
    box-shadow: 0 8px 18px rgba(27, 29, 34, 0.16);
}

.auth-helper-card__icon svg {
    width: 18px;
    height: 18px;
}

.auth-helper-card__title {
    display: block;
    margin-bottom: 2px;
    color: rgba(27, 29, 34, 0.92);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.auth-helper-card__text {
    margin: 0;
    color: var(--academy-text-muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.auth-inline-alert {
    margin-top: 10px;
}

.button-row--auth-forgot {
    margin-top: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-submit-button {
    min-width: 168px;
}

.auth-back-button {
    min-width: 110px;
    border-color: rgba(96, 102, 110, 0.22);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.auth-back-button:hover {
    border-color: rgba(96, 102, 110, 0.3);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(245, 246, 246, 1) 100%);
}

@media (max-width: 640px) {
    .auth-box--forgot {
        min-height: auto;
    }

    .auth-panel--forgot,
    .auth-submit-button,
    .auth-back-button {
        max-width: 100%;
        width: 100%;
    }
}

/* Activation experience */
.auth-panel--activation {
    max-width: 292px;
}

.auth-loader {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 3px solid rgba(96, 102, 110, 0.16);
    border-top-color: #59606a;
    animation: auth-spin 0.9s linear infinite;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-state-card {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(96, 102, 110, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 246, 246, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.auth-state-card--success {
    border-color: rgba(74, 163, 122, 0.24);
    background: linear-gradient(180deg, rgba(244, 251, 246, 0.98) 0%, rgba(236, 246, 239, 0.98) 100%);
}

.auth-state-card--warning {
    border-color: rgba(184, 134, 11, 0.24);
    background: linear-gradient(180deg, rgba(255, 250, 240, 0.98) 0%, rgba(248, 243, 228, 0.98) 100%);
}

.auth-state-card--danger {
    border-color: rgba(186, 80, 80, 0.22);
    background: linear-gradient(180deg, rgba(255, 247, 247, 0.98) 0%, rgba(250, 240, 240, 0.98) 100%);
}

.auth-state-card--muted {
    border-color: rgba(96, 102, 110, 0.18);
    background: linear-gradient(180deg, rgba(249, 250, 250, 0.98) 0%, rgba(242, 244, 244, 0.98) 100%);
}

.auth-state-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.auth-state-card__title {
    font-size: 12px;
    font-weight: 800;
    color: rgba(27, 29, 34, 0.92);
}

.auth-state-card__text {
    margin: 0;
    color: var(--academy-text-muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.auth-state-meta {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.auth-state-meta div {
    display: grid;
    gap: 2px;
}

.auth-state-meta span {
    color: var(--academy-text-muted);
    font-size: var(--academy-fs-eyebrow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-state-meta strong {
    font-size: 11.5px;
    color: rgba(27, 29, 34, 0.92);
    font-weight: 700;
}


.auth-brand-logo--login {
    width: min(165px, 55%);
    max-width: 165px;
    margin: 0 auto;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.34));
}

.auth-left-footer--center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.auth-footer-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.auth-footer-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 4px;
    border-radius: 999px;
}

.auth-footer-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.auth-footer-copy {
    color: #747983;
}
