/* ================================================================
   auth.css — Login & Registration pages (shared auth-* classes)
   Loaded by: security/login.html.twig, security/register.html.twig
   ================================================================ */

/* ── Design tokens ── */

/* ── Auth page layout ── */
.auth-page {
    min-height: calc(100vh - 120px);
    background: var(--page-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}
.auth-card {
    background: var(--surface-bg);
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(var(--shadow-color-rgb), 0.10);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}
.auth-card-accent {
    height: 5px;
    background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-primary-tint) 100%);
}
.auth-card-body {
    padding: 36px 40px 32px;
}
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-primary-subtle);
    color: var(--brand-primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    border-radius: 20px;
    padding: 4px 10px;
    margin-bottom: 14px;
}
.auth-title {
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
    line-height: 1.2;
}
.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ── Inputs ── */
.auth-card .form-floating > .form-control {
    background: var(--page-bg);
    border: 1.5px solid var(--field-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-card .form-floating > .form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-subtle);
    background: var(--surface-bg);
}
.auth-card .form-floating > label {
    color: var(--text-muted);
    font-size: 0.88rem;
}
/* Bootstrap fades the floated label to .65, on top of the muted colour. */
.auth-card .form-floating > .form-control:focus ~ label,
.auth-card .form-floating > .form-control:not(:placeholder-shown) ~ label,
.auth-card .form-floating > .form-control:-webkit-autofill ~ label {
    opacity: 1;
}

/* ── Field errors (register) ── */
.auth-card .form-error,
.auth-card ul.form-error li {
    font-size: 0.8rem;
    color: var(--brand-primary);
    margin: -8px 0 8px 2px;
    list-style: none;
    padding: 0;
}

/* ── Agree to terms (register) ── */
.auth-agree-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.auth-agree-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--brand-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Primary button ── */
.auth-btn-primary {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--brand-primary);
    color: var(--text-on-brand);
    font-weight: 700;
    font-size: 0.97rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.2px;
}
.auth-btn-primary:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
}

/* ── Forgot link ── */
.auth-forgot {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.12s;
}
.auth-forgot:hover { color: var(--brand-primary); }

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--surface-muted);
}

/* ── OAuth buttons ── */
.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 10px 16px;
    background: var(--surface-bg);
    border: 1.5px solid var(--surface-muted);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.13s, border-color 0.13s;
}
.auth-oauth-btn:hover {
    background: var(--page-bg);
    border-color: var(--text-muted);
}

/* ── OAuth brand icon colors ──
   Deliberately literal: these are the providers' own marks, and a theme must
   not recolour them. GitHub's is a token only because GitHub ships a light
   mark for dark backgrounds. */
.auth-oauth-icon--google   { color: #EA4335; }
.auth-oauth-icon--facebook { color: #1877F2; }
.auth-oauth-icon--github   { color: var(--oauth-github-mark); }

/* ── Alert (error / beta notice) ── */
.auth-alert {
    background: rgba(var(--brand-primary-rgb), 0.1);
    color: var(--brand-primary);
    border: 1.5px solid rgba(var(--brand-primary-rgb), 0.2);
    font-size: 0.87rem;
}
.auth-beta-notice {
    background: rgba(var(--accent-primary-rgb), 0.1);
    border: 1.5px solid rgba(var(--accent-primary-rgb), 0.3);
    font-size: 0.9rem;
    color: var(--status-warning-fg);
}
.auth-beta-notice-icon {
    color: var(--accent-primary);
}

/* ── Footer ── */
.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--surface-muted);
    font-size: 0.83rem;
    color: var(--text-muted);
}
.auth-footer-text a {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}
.auth-footer-text a:hover { text-decoration: underline; }

.auth-policy-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}
.auth-policy-text a { color: var(--brand-primary); text-decoration: underline; }
