/* Path: Frontend/src/routes/auth/login.module.scss */

.login-page {
    min-height: 100dvh;
    width: 100%;
    overflow: clip;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top left, var(--page-glow-primary), transparent 30%),
        radial-gradient(circle at bottom right, var(--page-glow-secondary), transparent 28%),
        linear-gradient(135deg, var(--page-gradient-start), var(--page-gradient-end));
}

.login-shell {
    width: min(100%, 70rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;

    @include respond(tablet) {
        grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 28rem);
        align-items: center;
        gap: 4rem;
    }
}

.login-copy {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 32rem;
}

.back-link,
.description,
.card-header p,
.field-group label,
.field-group input,
.field-header a,
.checkbox-row,
.footer-copy,
.benefit-item p {
    @include text-smallest;
}

.back-link,
.field-header a,
.footer-copy a {
    color: var(--primary);
}

.back-link {
    width: fit-content;
    font-weight: 500;
}

.eyebrow {
    @include text-smallest;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.title {
    font-size: clamp(2.8rem, 2.2rem + 1.9vw, 4.5rem);
    line-height: 1.05;
    max-width: 10ch;
}

.description,
.footer-copy,
.card-header p,
.benefit-item p {
    color: var(--text-muted);
}

.benefit-list {
    display: grid;
    gap: 1rem;
    margin-top: 0.75rem;
}

.benefit-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.875rem;
    align-items: start;
    padding: 1rem 1.1rem;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
}

.benefit-number {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    color: var(--primary);
    background: var(--surface-accent-soft);
    font-size: 0.9rem;
    font-weight: 600;
}

.benefit-item h2 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.login-card {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    padding: 2rem;
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    border-radius: 1.75rem;
    box-shadow: var(--shadow-elevated);
    backdrop-filter: blur(14px);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
}

.card-header h2 {
    font-size: 1.65rem;
    font-weight: 500;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-grid {
    display: grid;
    gap: 0.85rem;

    @media (min-width: 540px) {
        grid-template-columns: 1fr 1fr;
    }
}

.field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.field-group input {
    width: 100%;
    padding: 0.95rem 1rem;
    color: var(--text);
    background: var(--surface-field);
    border: 1px solid var(--border-field);
    border-radius: 1rem;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;

    &:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px var(--focus-ring-primary);
        background: var(--surface-field-focus);
    }
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.checkbox-row input {
    width: 1rem;
    height: 1rem;
}

.login-card button {
    width: 100%;
    padding: 0.95rem 1.25rem;
    color: var(--action-primary-text);
    background: linear-gradient(135deg, var(--action-primary-start), var(--action-primary-end));
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: var(--action-primary-shadow);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;

    &:hover {
        transform: translateY(-1px);
        box-shadow: var(--action-primary-shadow-hover);
        filter: brightness(1.03);
    }
}

.footer-copy {
    text-align: center;
}

.support-copy {
    text-align: center;
    color: var(--text-muted);

    a {
        color: var(--primary);
    }
}
