/* Requires design-tokens.css (loaded before this file in _AuthShellLayout). */

/* Shell (layout) */
.gtc-auth-body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--gtc-font-family);
    font-size: 1rem;
    color: var(--gtc-color-text);
    background-color: var(--gtc-color-page);
    -webkit-font-smoothing: antialiased;
}

.gtc-auth-page {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--gtc-space-page-y) var(--gtc-space-page-x);
    overflow-x: hidden;
}

.gtc-auth-page__decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.gtc-auth-page__blob {
    position: absolute;
    border-radius: 50%;
    background: var(--gtc-color-brand-blob);
    filter: blur(0.5px);
}

.gtc-auth-page__blob--tl {
    width: clamp(12rem, 35vw, 22rem);
    height: clamp(12rem, 35vw, 22rem);
    top: -4rem;
    left: -5rem;
}

.gtc-auth-page__blob--br {
    width: clamp(14rem, 40vw, 26rem);
    height: clamp(14rem, 40vw, 26rem);
    bottom: -6rem;
    right: -6rem;
}

.gtc-auth-page__dots {
    position: absolute;
    width: 7rem;
    height: 7rem;
    opacity: 0.35;
    background-image: radial-gradient(var(--gtc-color-brand) 1.5px, transparent 1.5px);
    background-size: 10px 10px;
}

.gtc-auth-page__dots--tr {
    top: 2rem;
    right: clamp(0.5rem, 8vw, 4rem);
}

.gtc-auth-page__dots--bl {
    bottom: 4rem;
    left: clamp(0.5rem, 6vw, 3rem);
}

.gtc-auth-page__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--gtc-auth-content-max);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

/* Brand */
.gtc-auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}

.gtc-auth-brand__logo {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}

.gtc-auth-brand__name {
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gtc-auth-brand__name-strong {
    color: var(--gtc-color-text);
}

.gtc-auth-brand__name-accent {
    color: var(--gtc-color-brand);
}

/* Card */
.gtc-auth-card {
    width: var(--gtc-auth-card-width);
    background: var(--gtc-color-surface);
    border-radius: var(--gtc-radius-card);
    box-shadow: var(--gtc-shadow-card);
    padding: clamp(1.5rem, 4vw, 2rem);
}

.gtc-auth-card__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 4vw, 1.75rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
}

.gtc-auth-card__subtitle {
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    text-align: center;
    color: var(--gtc-color-text-muted);
}

.gtc-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gtc-auth-validation {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: var(--gtc-radius-control);
    background: #fff5f5;
    color: var(--gtc-color-danger);
    font-size: 0.875rem;
    list-style: none;
}

.gtc-auth-validation:empty {
    display: none;
}

/* Fields */
.gtc-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.gtc-field__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gtc-color-text);
}

.gtc-field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.gtc-field__icon {
    position: absolute;
    left: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gtc-color-text-muted);
    pointer-events: none;
}

.gtc-field__icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.gtc-field__input {
    width: 100%;
    min-height: var(--gtc-control-min-height);
    padding: 0.65rem 2.75rem 0.65rem 2.65rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--gtc-color-text);
    background: var(--gtc-color-input-bg);
    border: 1px solid var(--gtc-color-border);
    border-radius: var(--gtc-radius-control);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gtc-field__input--password {
    padding-right: 3rem;
}

.gtc-field__input::placeholder {
    color: #9aa5b1;
}

.gtc-field__input:hover {
    border-color: #b8c2cc;
}

.gtc-field__input:focus {
    outline: none;
    border-color: var(--gtc-color-brand);
    box-shadow: 0 0 0 3px rgba(61, 154, 74, 0.2);
}

.gtc-field__toggle {
    position: absolute;
    right: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gtc-color-text-muted);
    border-radius: 6px;
    cursor: pointer;
}

.gtc-field__toggle:hover {
    color: var(--gtc-color-text);
    background: rgba(0, 0, 0, 0.04);
}

.gtc-field__toggle:focus-visible {
    outline: 2px solid var(--gtc-color-brand);
    outline-offset: 2px;
}

.gtc-field__error {
    font-size: 0.8125rem;
    color: var(--gtc-color-danger);
}

.gtc-auth-forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.25rem;
}

.gtc-auth-forgot a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gtc-color-link);
    text-decoration: none;
}

.gtc-auth-forgot a:hover {
    color: var(--gtc-color-link-hover);
    text-decoration: underline;
}

.gtc-auth-turnstile {
    display: flex;
    justify-content: center;
    min-height: 4rem;
}

.gtc-auth-turnstile .cf-turnstile {
    width: 100%;
    max-width: 100%;
}

/* Submit */
.gtc-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 3rem;
    margin-top: 0.25rem;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--gtc-color-brand);
    border: none;
    border-radius: var(--gtc-radius-control);
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.gtc-auth-submit:hover:not(:disabled) {
    background: var(--gtc-color-brand-hover);
}

.gtc-auth-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.gtc-auth-submit:focus-visible {
    outline: 2px solid var(--gtc-color-text);
    outline-offset: 2px;
}

.gtc-auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.gtc-auth-submit svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* Below card */
.gtc-auth-help {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--gtc-color-text-muted);
    text-align: center;
}

.gtc-auth-help a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: var(--gtc-color-brand);
    text-decoration: none;
}

.gtc-auth-help a:hover {
    text-decoration: underline;
}

.gtc-auth-help a svg {
    width: 0.9rem;
    height: 0.9rem;
}

.gtc-auth-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--gtc-color-text-muted);
    text-align: center;
}

.gtc-auth-footer a {
    color: var(--gtc-color-brand);
    text-decoration: none;
    font-weight: 500;
}

.gtc-auth-footer a:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {
    .gtc-auth-page__blob--tl {
        top: -2rem;
        left: -3rem;
    }

    .gtc-auth-page__blob--br {
        bottom: -3rem;
        right: -3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gtc-field__input,
    .gtc-auth-submit {
        transition: none;
    }
}
