/* Sign-in pages: the account login and the OAuth login (which the login form designer also shows as its live
   preview). Everything is drawn from a few variables on .Auth; a custom OAuth design sets them inline (see
   OAuthDesignView.ThemeStyle) and every other shade is mixed from its text colour, so light and dark designs both
   work. Rules are scoped under .Auth so the site's and Bootstrap's element styles cannot leak in. */

.Auth {
    --auth-text: #ffffff;
    --auth-accent: #b99be6;
    --auth-button: linear-gradient(137deg, #9a77cf 24%, #a13670 88%);
    --auth-button-text: #ffffff;
    --auth-button-radius: 999px;
    --auth-good: #67e08f;
    --auth-shadow: rgba(4, 3, 20, 0.55);
    --auth-muted: color-mix(in srgb, var(--auth-text) 68%, transparent);
    --auth-line: color-mix(in srgb, var(--auth-text) 14%, transparent);
    --auth-line-strong: color-mix(in srgb, var(--auth-text) 26%, transparent);
    --auth-field: color-mix(in srgb, var(--auth-text) 6%, transparent);
    --auth-field-hover: color-mix(in srgb, var(--auth-text) 10%, transparent);
    --auth-error: color-mix(in srgb, #ff5c6c 78%, var(--auth-text));
    --auth-radius: 12px;

    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    color: var(--auth-text);
    font-family: var(--font1), system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    color-scheme: dark;
}

.Auth--custom {
    color-scheme: normal;
    --auth-accent: var(--auth-text);
    --auth-good: var(--auth-text);
    --auth-shadow: rgba(0, 0, 0, 0.3);
}

/* A soft brand glow behind the card; custom designs keep their own background clean. */
.Auth:not(.Auth--custom)::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -40px;
    left: -60px;
    right: -60px;
    height: 340px;
    background:
        radial-gradient(closest-side at 30% 50%, rgba(154, 119, 207, 0.45), transparent),
        radial-gradient(closest-side at 72% 45%, rgba(236, 65, 119, 0.3), transparent);
    filter: blur(24px);
    pointer-events: none;
}

/* Page frames */
:root:has(.Auth-page .Auth:not(.Auth--custom)) {
    color-scheme: dark;
}

.Auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px 20px;
}

.Auth-section {
    padding: 1rem 20px 5rem;
}

/* Card */
.Auth .Auth-card {
    position: relative;
    width: 100%;
    padding: 40px 36px 32px;
    border: 1px solid var(--auth-line);
    border-radius: 24px;
    background: color-mix(in srgb, var(--auth-text) 5%, transparent);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, var(--auth-text) 10%, transparent),
        0 32px 80px -32px var(--auth-shadow);
}

.Auth .Auth-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 40px;
    right: 40px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #9a77cf, #ec4177 55%, #ffa35c);
}

.Auth--custom .Auth-card::before {
    background: var(--auth-button);
    opacity: 0.8;
}

/* Header */
.Auth .Auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
    text-align: center;
}

.Auth .Auth-logo {
    display: block;
    max-width: 220px;
    max-height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}

.Auth .Auth-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: var(--auth-button);
    color: var(--auth-button-text);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 12px 28px -14px var(--auth-shadow);
}

.Auth .Auth-avatar > .Auth-icon {
    width: 24px;
    height: 24px;
}

.Auth .Auth-avatar--brand {
    background: linear-gradient(160deg, #241f5c, #12102e);
    box-shadow: inset 0 0 0 1px rgba(185, 155, 230, 0.35), 0 12px 28px -14px var(--auth-shadow);
}

.Auth .Auth-avatar--brand img {
    width: 30px;
    height: 30px;
}

.Auth .Auth-connect {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.Auth .Auth-connect .Auth-avatar {
    margin-bottom: 0;
}

.Auth .Auth-connect-link {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px dashed var(--auth-line-strong);
    border-radius: 50%;
    color: var(--auth-muted);
}

.Auth .Auth-connect-link .Auth-icon {
    width: 15px;
    height: 15px;
}

.Auth .Auth-title {
    margin: 0;
    color: inherit;
    font-family: inherit;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.Auth .Auth-subtitle {
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.Auth .Auth-subtitle strong {
    color: var(--auth-text);
    font-weight: 600;
}

/* Form */
.Auth .Auth-form {
    display: grid;
    gap: 18px;
    margin: 0;
}

.Auth .Auth-field {
    display: grid;
    gap: 8px;
}

.Auth .Auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.Auth .Auth-label {
    margin: 0;
    color: inherit;
    font-size: 0.875rem;
    font-weight: 500;
}

.Auth .Auth-control {
    position: relative;
    display: flex;
    align-items: center;
}

.Auth .Auth-control > .Auth-icon {
    position: absolute;
    left: 15px;
    color: var(--auth-muted);
    pointer-events: none;
}

.Auth .Auth-input {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 16px 0 44px;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    background: var(--auth-field);
    color: inherit;
    caret-color: var(--auth-accent);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.Auth .Auth-input::placeholder {
    color: var(--auth-muted);
    opacity: 0.75;
}

.Auth .Auth-input:hover {
    border-color: var(--auth-line-strong);
}

.Auth .Auth-input:focus {
    outline: none;
    border-color: var(--auth-accent);
    background: var(--auth-field-hover);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-accent) 22%, transparent);
}

/* Keep the browser's autofill colours from painting a light box on the dark card. */
.Auth .Auth-input:-webkit-autofill {
    -webkit-text-fill-color: var(--auth-text);
    transition: background-color 600000s 0s, color 600000s 0s;
}

.Auth .Auth-input--reveal {
    padding-right: 50px;
}

.Auth .Auth-reveal {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--auth-muted);
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}

.Auth .Auth-reveal:hover {
    background: var(--auth-field-hover);
    color: var(--auth-text);
}

.Auth .Auth-reveal:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 1px;
}

.Auth .Auth-reveal > span {
    display: grid;
}

.Auth .Auth-reveal .Auth-reveal-hide,
.Auth .Auth-reveal[aria-pressed="true"] .Auth-reveal-show {
    display: none;
}

.Auth .Auth-reveal[aria-pressed="true"] .Auth-reveal-hide {
    display: grid;
}

.Auth .Auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
    margin: 0;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.Auth .Auth-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #9a77cf;
    cursor: pointer;
}

.Auth .Auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    margin-top: 6px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--auth-button-radius);
    background: var(--auth-button);
    color: var(--auth-button-text);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 30px -14px rgba(154, 119, 207, 0.9);
    transition: filter 0.2s, box-shadow 0.2s, transform 0.1s;
}

/* A link styled as the main button (the status pages: check your inbox, payment received). */
.Auth a.Auth-submit,
.Auth a.Auth-submit:hover {
    color: var(--auth-button-text);
    text-decoration: none;
}

.Auth--custom .Auth-submit {
    box-shadow: 0 12px 30px -16px var(--auth-shadow);
}

.Auth .Auth-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 16px 36px -14px rgba(154, 119, 207, 1);
}

.Auth--custom .Auth-submit:hover {
    box-shadow: 0 16px 36px -16px var(--auth-shadow);
}

.Auth .Auth-submit:active {
    transform: translateY(1px);
}

.Auth .Auth-submit:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
}

/* Messages */
.Auth .Auth-error {
    color: var(--auth-error);
    font-size: 0.8rem;
}

.Auth .Auth-error:empty,
.Auth .validation-summary-valid {
    display: none;
}

.Auth .validation-summary-errors {
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #ec414c 50%, transparent);
    border-radius: var(--auth-radius);
    background: color-mix(in srgb, #ec414c 12%, transparent);
    color: var(--auth-error);
    font-size: 0.875rem;
}

.Auth .validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

/* Links */
.Auth .Auth-link {
    color: var(--auth-accent);
    font-weight: 500;
    text-decoration: none;
    text-underline-offset: 3px;
}

.Auth--custom .Auth-link {
    text-decoration: underline;
    text-decoration-color: var(--auth-line-strong);
}

.Auth .Auth-link:hover {
    text-decoration: underline;
    text-decoration-color: currentColor;
}

.Auth .Auth-link:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

.Auth .Auth-link--small {
    font-size: 0.825rem;
}

/* "or continue with" and the external providers (the shared _ExternalLoginProviders markup) */
.Auth .Auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 18px;
    color: var(--auth-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.Auth .Auth-divider::before,
.Auth .Auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

.Auth .SocialLogin,
.Auth .SocialLogin-list,
.Auth .SocialLogin-list form {
    margin: 0;
    padding: 0;
}

.Auth .SocialLogin-list {
    display: block;
    list-style: none;
}

.Auth .SocialLogin-item {
    display: grid;
    gap: 10px;
}

.Auth .SocialLogin-item > button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: var(--auth-radius);
    background: none;
    cursor: pointer;
}

.Auth .SocialLogin-item > button:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

.Auth .SocialLogin-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    background: var(--auth-field);
    color: var(--auth-text);
    font-size: 0.925rem;
    font-weight: 500;
    opacity: 1;
    transition: background-color 0.15s, border-color 0.15s;
}

.Auth .SocialLogin-button::before,
.Auth .SocialLogin-button::after {
    display: none;
}

.Auth .SocialLogin-item > button:hover .SocialLogin-button {
    border-color: var(--auth-line-strong);
    background: var(--auth-field-hover);
}

.Auth .SocialLogin-button svg {
    flex: none;
    width: 20px;
    height: 20px;
}

.Auth .SocialLogin-button--facebook svg path {
    fill: #1877f2;
}

.Auth .SocialLogin-button--microsoft svg path,
.Auth .SocialLogin-button--apple svg path {
    fill: currentColor;
}

/* What the application asks for */
.Auth .Auth-consent {
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--auth-text) 4%, transparent);
}

.Auth .Auth-consent-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: inherit;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
}

.Auth .Auth-consent-title strong {
    font-weight: 600;
}

.Auth .Auth-consent-title .Auth-icon {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--auth-good);
}

.Auth .Auth-consent-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.Auth .Auth-consent-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 0.875rem;
}

.Auth .Auth-consent-list .Auth-icon {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    color: var(--auth-good);
}

.Auth .Auth-consent-note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--auth-line);
    color: var(--auth-muted);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.Auth .Auth-consent-note strong {
    color: var(--auth-text);
    font-weight: 500;
}

/* Footer */
.Auth .Auth-footer {
    margin: 24px 0 0;
    color: var(--auth-muted);
    font-size: 0.9rem;
    text-align: center;
}

.Auth .Auth-footer--small {
    margin-top: 6px;
    font-size: 0.8rem;
}

.Auth .Auth-powered {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.75rem;
}

.Auth .Auth-powered img {
    display: block;
    height: 12px;
    width: auto;
    opacity: 0.8;
}

@media (max-width: 480px) {
    .Auth-page { padding: 24px 12px; }
    .Auth .Auth-card { padding: 32px 20px 24px; border-radius: 20px; }
    .Auth .Auth-title { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .Auth .Auth-input,
    .Auth .Auth-reveal,
    .Auth .Auth-submit,
    .Auth .SocialLogin-button { transition: none; }
}
