/* auth.css — login, register, and shared auth page styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


/* ── Auth card (login / register) ─────────────────────────────────────────── */

a[href="forgot-password"],
.auth-link a[href=register],
.auth-link a[href="/login"] {
    color: #c94663 !important;
    text-decoration: underline !important;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
}

.auth-card h1 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -.01em;
    margin-bottom: .25rem;
}

.subtitle {
    margin-bottom: 1.75rem;
    font-size: .9rem;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */

label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: 1.25rem;
    margin-bottom: .35rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,91,219,.15);
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group input {
    border-radius: 7px 0 0 7px;
    flex: 1;
}

.toggle-pw {
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 7px 7px 0;
    padding: .6rem .9rem;
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s;
}
.toggle-pw:hover { background: var(--border); }

.hint {
    font-size: .8rem;
    color: var(--muted);
    margin-top: .3rem;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 1rem;
}

.row-between a {
    font-size: .85rem;
    color: var(--accent);
    text-decoration: none;
}
.row-between a:hover { text-decoration: underline; }

/* ── Checkbox labels ──────────────────────────────────────────────────────── */

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .9rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
    cursor: pointer;
    margin-top: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: .15rem;
    accent-color: var(--accent);
}

/* ── Group fieldset ───────────────────────────────────────────────────────── */

.group-fieldset {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-top: 1.25rem;
}

.group-fieldset legend {
    font-size: .8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    padding: 0 .5rem;
}

.group-option {
    padding: .4rem 0;
    border-bottom: 1px solid var(--border);
}
.group-option:last-child { border-bottom: none; }
.group-option strong { font-size: .9rem; }
.group-option small  { color: var(--muted); font-size: .8rem; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */

.alert {
    padding: .7rem .9rem;
    border-radius: 7px;
    font-size: .88rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.alert-error {
    background: #fff5f5;
    border-color: #ffc9c9;
    color: var(--danger);
}

.alert-success {
    background: #ebfbee;
    border-color: #b2f2bb;
    color: var(--success);
}

@media (prefers-color-scheme: dark) {
    .alert-error   { background: #2c1515; border-color: #6b2020; color: #ff8787; }
    .alert-success { background: #132015; border-color: #1c4225; color: #69db7c; }
}

/* ── Auth link ────────────────────────────────────────────────────────────── */

.auth-link {
    text-align: center;
    font-size: .88rem;
    color: var(--muted);
    margin-top: 1.5rem;
}
.auth-link a { color: var(--accent); text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }
