/* Public authentication pages, aligned with the TurboGrading marketing system. */
.tg-auth-page {
    min-width: 320px;
}

.tg-auth-page .content-wrapper {
    overflow: clip;
}

.tg-auth-skip-link {
    position: fixed;
    z-index: 10000;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 0.7rem;
    color: #fff;
    background: var(--tg-ink);
    font-size: 0.82rem;
    font-weight: 800;
    transform: translateY(-180%);
}

.tg-auth-skip-link:focus {
    color: #fff;
    outline: 3px solid #f4b39f;
    outline-offset: 2px;
    transform: translateY(0);
}

.tg-auth-main {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 8%, rgba(255, 205, 181, 0.72), transparent 28rem),
        radial-gradient(circle at 94% 22%, rgba(183, 221, 232, 0.72), transparent 30rem),
        linear-gradient(135deg, #fffaf5 0%, #f5fafb 100%);
}

.tg-auth-main::before {
    position: absolute;
    z-index: -1;
    top: 2rem;
    right: -2rem;
    width: 12rem;
    height: 12rem;
    background-image: radial-gradient(rgba(33, 101, 131, 0.18) 1px, transparent 1px);
    background-size: 18px 18px;
    content: "";
    opacity: 0.55;
}

.tg-auth-main::after {
    position: absolute;
    z-index: -1;
    bottom: -8rem;
    left: -8rem;
    width: 22rem;
    height: 22rem;
    border: 1px solid rgba(200, 68, 29, 0.14);
    border-radius: 50%;
    content: "";
}

.tg-auth-stage {
    min-height: calc(100vh - 5.3rem);
}

.tg-auth-frame {
    display: grid;
    width: min(100%, 72rem);
    grid-template-columns: minmax(30rem, 1.1fr) minmax(0, 0.9fr);
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid rgba(23, 42, 58, 0.1);
    border-radius: 1.35rem;
    background: var(--tg-surface);
    box-shadow: var(--tg-shadow);
}

.tg-auth-story {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 39rem;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(2.25rem, 4.5vw, 4.4rem);
    color: rgba(255, 255, 255, 0.82);
    background:
        radial-gradient(circle at 90% 12%, rgba(72, 152, 173, 0.42), transparent 20rem),
        linear-gradient(150deg, #172a3a 0%, #123f52 100%);
}

.tg-auth-story::before,
.tg-auth-story::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.tg-auth-story::before {
    right: -7rem;
    bottom: 4rem;
    width: 17rem;
    height: 17rem;
}

.tg-auth-story::after {
    right: -3rem;
    bottom: 8rem;
    width: 9rem;
    height: 9rem;
}

.tg-auth-story__content,
.tg-auth-story__link {
    position: relative;
    z-index: 1;
}

.tg-auth-story h2 {
    max-width: 31rem;
    color: #fff;
    font-size: clamp(2.35rem, 4.5vw, 4rem);
    line-height: 1.04;
}

.tg-auth-story > .tg-auth-story__content > .lead {
    max-width: 31rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.06rem;
    line-height: 1.68;
}

.tg-auth-benefits {
    display: grid;
    gap: 1rem;
    max-width: 31rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-auth-benefits li {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.8rem;
}

.tg-auth-benefits li > span {
    display: inline-flex;
    width: 2.45rem;
    height: 2.45rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.75rem;
    color: #d7f3f7;
    background: rgba(255, 255, 255, 0.09);
    font-size: 1.15rem;
}

.tg-auth-benefits strong,
.tg-auth-benefits small {
    display: block;
}

.tg-auth-benefits strong {
    margin-top: 0.04rem;
    color: #fff;
    font-size: 0.93rem;
    font-weight: 800;
}

.tg-auth-benefits small {
    margin-top: 0.18rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.78rem;
    line-height: 1.5;
}

.tg-auth-story__link {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    margin-top: 2rem;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 800;
}

.tg-auth-story__link:hover,
.tg-auth-story__link:focus {
    color: #ffd4c5;
}

.tg-auth-form-pane {
    display: flex;
    min-width: 0;
    align-items: center;
    padding: clamp(2rem, 4.5vw, 4.35rem);
    background:
        linear-gradient(180deg, rgba(255, 250, 244, 0.45), rgba(255, 255, 255, 0) 12rem),
        #fff;
}

.tg-auth-card {
    width: 100%;
    max-width: 34rem;
    margin-inline: auto;
}

.tg-auth-card__heading {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.tg-auth-card__heading > div {
    min-width: 0;
}

.tg-auth-card__heading h1 {
    color: var(--tg-ink);
    font-size: clamp(1.65rem, 2.4vw, 2rem);
    line-height: 1.16;
}

.tg-auth-card__heading p:last-child {
    color: var(--tg-ink-soft);
    font-size: 0.92rem;
    line-height: 1.58;
}

.tg-auth-card__icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    color: var(--tg-blue);
    background: var(--tg-blue-soft);
    font-size: 1.35rem;
}

.tg-auth-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    border: 0;
    border-radius: 0.8rem;
    font-size: 0.84rem;
    line-height: 1.5;
}

.tg-auth-alert > i {
    margin-top: 0.05rem;
    font-size: 1.05rem;
}

.tg-auth-form {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.tg-auth-name-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.tg-auth-form .form-floating,
.tg-auth-form .form-check {
    min-width: 0;
    margin: 0;
}

.tg-auth-form .form-control {
    min-height: 3.75rem;
    border: 1px solid #cbd7dc;
    border-radius: 0.78rem;
    color: var(--tg-ink);
    background: #fff;
    box-shadow: 0 0.35rem 1rem rgba(23, 42, 58, 0.025);
}

.tg-auth-form .form-control:hover:not(:disabled) {
    border-color: #9eb2bc;
}

.tg-auth-form .form-control:focus {
    border-color: var(--tg-blue);
    box-shadow: 0 0 0 0.22rem rgba(33, 101, 131, 0.14);
}

.tg-auth-form .form-control.is-invalid:focus {
    border-color: #b3261e;
    box-shadow: 0 0 0 0.22rem rgba(179, 38, 30, 0.12);
}

.tg-auth-form .form-floating > label {
    color: #536879;
}

.tg-auth-form .password-field .form-control {
    padding-right: 3.6rem;
}

.tg-auth-form .password-toggle {
    position: absolute;
    z-index: 5;
    top: 0.55rem;
    right: 0.55rem;
    display: inline-flex;
    width: 2.65rem;
    height: 2.65rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0.65rem;
    color: #526778;
    background: transparent;
    font-size: 1rem;
    transform: none;
}

.tg-auth-form .password-toggle:hover:not(:disabled) {
    color: var(--tg-blue);
    background: var(--tg-blue-soft);
}

.tg-auth-form .password-toggle:focus-visible {
    outline: 3px solid var(--tg-blue);
    outline-offset: 1px;
}

.tg-auth-form .password-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.tg-auth-form .invalid-feedback {
    margin-top: 0.45rem;
    color: #9f221c;
    font-size: 0.76rem;
    line-height: 1.45;
}

.tg-auth-validation-summary {
    display: grid;
    gap: 0.18rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(179, 38, 30, 0.24);
    border-left: 0.28rem solid #b3261e;
    border-radius: 0.78rem;
    color: #76211d;
    background: #fff3f2;
    font-size: 0.8rem;
    line-height: 1.45;
}

.tg-auth-validation-summary strong {
    color: #691d19;
}

.tg-auth-field-hint {
    margin: -0.45rem 0 0;
    color: #5c6f7e;
    font-size: 0.75rem;
    line-height: 1.45;
}

.tg-auth-consent {
    padding: 0.85rem 0.9rem 0.85rem 2.45rem;
    border: 1px solid var(--tg-line);
    border-radius: 0.78rem;
    background: var(--tg-cream);
}

.tg-auth-consent .form-check-input {
    margin-left: -1.55rem;
}

.tg-auth-consent .form-check-label {
    color: var(--tg-ink-soft);
    font-size: 0.78rem;
    line-height: 1.5;
}

.tg-auth-consent a,
.tg-auth-links a {
    color: var(--tg-accent-dark);
    font-weight: 800;
}

.tg-auth-consent a:hover,
.tg-auth-consent a:focus,
.tg-auth-links a:hover,
.tg-auth-links a:focus {
    color: var(--tg-blue);
    text-decoration: underline;
}

.tg-auth-submit {
    gap: 0.45rem;
    min-height: 3.35rem !important;
    margin-top: 0.15rem;
}

.tg-auth-submit:disabled {
    cursor: not-allowed;
    opacity: 0.66;
    transform: none !important;
}

.tg-auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1.2rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--tg-line);
    color: var(--tg-ink-soft);
    font-size: 0.82rem;
}

.tg-auth-links--centered {
    justify-content: center;
    text-align: center;
}

.tg-auth-reassurance {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: #5b6f7d;
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

.tg-auth-reassurance i {
    flex: 0 0 auto;
    margin-top: 0.05rem;
    color: var(--tg-blue);
}

@media (max-width: 991.98px) {
    .tg-auth-stage {
        min-height: 0;
    }

    .tg-auth-frame {
        max-width: 44rem;
        grid-template-columns: 1fr;
    }

    .tg-auth-story {
        min-height: 0;
        padding: 2.75rem;
    }

    .tg-auth-story h2,
    .tg-auth-story > .tg-auth-story__content > .lead,
    .tg-auth-benefits {
        max-width: none;
    }

    .tg-auth-benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tg-auth-benefits li {
        grid-template-columns: 1fr;
    }

    .tg-auth-story__link {
        margin-top: 1.5rem;
    }

    .tg-auth-form-pane {
        padding: 2.75rem;
    }
}

@media (max-width: 767.98px) {
    .tg-auth-main::before {
        display: none;
    }

    .tg-auth-benefits {
        grid-template-columns: 1fr;
    }

    .tg-auth-benefits li {
        grid-template-columns: auto minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .tg-auth-stage > .container {
        padding-inline: 0.85rem;
    }

    .tg-auth-frame {
        border-radius: 1rem;
    }

    .tg-auth-story,
    .tg-auth-form-pane {
        padding: 1.65rem;
    }

    .tg-auth-story h2 {
        font-size: clamp(2rem, 10vw, 2.65rem);
    }

    .tg-auth-card__heading {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tg-auth-name-grid {
        grid-template-columns: 1fr;
    }

    .tg-auth-links {
        align-items: flex-start;
        flex-direction: column;
    }

    .tg-auth-links--centered {
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-auth-page *,
    .tg-auth-page *::before,
    .tg-auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .tg-auth-page .tg-site-header,
    .tg-auth-page .tg-marketing-footer,
    .tg-auth-page .progress-wrap,
    .tg-auth-story {
        display: none !important;
    }

    .tg-auth-main {
        background: #fff !important;
    }

    .tg-auth-frame {
        display: block;
        max-width: none;
        border: 0;
        box-shadow: none;
    }

    .tg-auth-form-pane {
        padding: 0;
    }
}
