/* Sign-in and sign-up pages: a brand panel beside one form card. They load styles.css (tokens,
   buttons, .response messages) and this file only. Below 900 px the brand panel shrinks to a
   strip above the form. */

.auth-page {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
    margin: 0;
    background: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-sans);
}

/* Brand panel */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-6);
    padding: 3rem 3.5rem;
    overflow: hidden;
    background: linear-gradient(150deg, #2a2023 0%, var(--color-charcoal) 45%, var(--color-primary-dark) 130%);
    color: #fff;
}

.auth-brand::after {
    content: "";
    position: absolute;
    right: -8rem;
    bottom: -8rem;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 87, 126, 0.35), rgba(232, 87, 126, 0) 70%);
    pointer-events: none;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}

.auth-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--radius);
    background: var(--color-primary);
    font-size: 1.1rem;
}

.auth-logo small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--text-xs);
    font-weight: 400;
}

.auth-pitch h2 {
    max-width: 30rem;
    margin: 0 0 var(--space-4);
    font-size: 2.1rem;
    line-height: 1.2;
}

.auth-pitch p {
    max-width: 30rem;
    margin: 0 0 var(--space-6);
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--text-lg);
    line-height: 1.5;
}

.auth-points {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: flex;
    gap: var(--space-3);
    max-width: 30rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.45;
}

.auth-points i {
    flex: 0 0 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary-pale);
}

.auth-points strong {
    display: block;
    color: #fff;
}

.auth-brand-foot {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-xs);
}

/* Form side */
.auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 1.5rem;
    background: var(--color-bg);
}

.auth-card {
    width: 100%;
    max-width: 25rem;
}

.auth-card h1 {
    margin: 0 0 var(--space-2);
    color: var(--color-text);
    font-size: 1.7rem;
}

.auth-card .auth-lead {
    margin: 0 0 var(--space-6);
    color: var(--color-text-muted);
}

.auth-field {
    margin-bottom: var(--space-4);
}

.auth-field label {
    display: block;
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
    font-weight: 600;
}

.auth-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    font: inherit;
    font-size: var(--text-base);
}

.auth-field input:focus-visible {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: var(--focus-ring);
}

.auth-field-hint {
    display: block;
    margin-top: var(--space-1);
    color: var(--color-text-subtle);
    font-size: var(--text-xs);
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--space-3);
}

/* Password box with a show/hide button inside it */
.auth-password {
    position: relative;
}

.auth-password input {
    padding-right: 2.75rem;
}

.auth-password button {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    width: 2.2rem;
    height: 2.2rem;
    transform: translateY(-50%);
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--color-text-subtle);
    cursor: pointer;
}

.auth-password button:hover,
.auth-password button:focus-visible {
    background: var(--color-chip);
    color: var(--color-text);
    outline: none;
}

.auth-submit {
    width: 100%;
    margin-top: var(--space-2);
    padding: 0.75rem 1rem;
    font-size: var(--text-base);
    justify-content: center;
}

.auth-card .response-container {
    margin-top: var(--space-4);
}

.auth-switch {
    margin: var(--space-6) 0 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    text-align: center;
}

.auth-switch a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-legal {
    margin-top: var(--space-6);
    color: var(--color-text-subtle);
    font-size: var(--text-xs);
    text-align: center;
}

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

    .auth-brand {
        padding: 1.5rem;
    }

    .auth-pitch,
    .auth-brand-foot {
        display: none;
    }

    .auth-main {
        justify-content: flex-start;
        padding: 2rem 1rem;
    }
}

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