/* =============================================================
   AUTH.CSS — Obsidian design system
   Covers: Sign In, Register, Forgot Password, Reset Password,
           and all confirmation / status pages.
   No Bootstrap dependency.
   ============================================================= */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --color-bg:       #0E0C0A;
    --color-surface:  #1A1612;
    --color-accent:   #C8872A;
    --color-text:     #F0E8D5;
    --color-muted:    #A89880;
    --color-danger:   #c0392b;
    --color-success:  #4caf50;

    --font-display:   "Bebas Neue", sans-serif;
    --font-accent:    "Cinzel", serif;
    --font-body:      "Inter", system-ui, -apple-system, sans-serif;
    --font-brush:     "Caveat Brush", cursive;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
}

/* ── Background texture ─────────────────────────────────────── */
.auth-bg {
    position: fixed;
    inset: 0;
    background: url('/images/brick-wall.jpg') center / cover no-repeat;
    opacity: 0.22;
    z-index: 0;
    pointer-events: none;
}

/* ── Shell (full-page centering) ────────────────────────────── */
.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ── Card ───────────────────────────────────────────────────── */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(26, 22, 18, 0.94);
    border: 1px solid rgba(200, 135, 42, 0.35);
    border-radius: 18px;
    padding: 2.25rem 2rem 2rem;
    box-shadow:
        0 0 0 1px rgba(200, 135, 42, 0.06),
        0 0 40px rgba(200, 135, 42, 0.07),
        0 24px 56px rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

/* ── Logo ───────────────────────────────────────────────────── */
.auth-logo-link {
    display: block;
    text-align: center;
    margin-bottom: 0.25rem;
    text-decoration: none;
}

.auth-logo {
    max-height: 150px;
    width: auto;
    display: inline-block;
}

/* ── Headings ───────────────────────────────────────────────── */
.auth-heading {
    font-family: var(--font-brush);
    font-size: 2.1rem;
    color: var(--color-accent);
    text-align: center;
    margin-bottom: 0.3rem;
    line-height: 1.1;
    text-shadow: 0 0 28px rgba(200, 135, 42, 0.22);
}

.auth-subheading {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-muted);
    text-align: center;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

/* ── Validation errors ──────────────────────────────────────── */
.auth-errors {
    background: rgba(140, 58, 46, 0.14);
    border: 1px solid rgba(192, 57, 43, 0.38);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #e57373;
}

.auth-errors:empty { display: none; }

.auth-errors ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* ── Form ───────────────────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* First / Last name on one row */
.auth-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.75rem;
}

.auth-label {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    letter-spacing: 0.09em;
    color: var(--color-muted);
    text-transform: uppercase;
}

.auth-input {
    width: 100%;
    padding: 0.72rem 0.9rem;
    background: rgba(14, 12, 10, 0.65);
    border: 1.5px solid rgba(200, 135, 42, 0.28);
    border-radius: 9px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.4;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    caret-color: var(--color-accent);
    appearance: none;
}

.auth-input::placeholder { color: rgba(168, 152, 128, 0.45); }

.auth-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(200, 135, 42, 0.14);
}

.auth-input.input-validation-error {
    border-color: rgba(192, 57, 43, 0.55);
}

.auth-field-error {
    font-size: 0.78rem;
    color: #e57373;
}

.auth-field-error:empty { display: none; }

/* ── Remember-me row ────────────────────────────────────────── */
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-check-label {
    font-size: 0.875rem;
    color: var(--color-muted);
    cursor: pointer;
    user-select: none;
}

/* ── Primary button ─────────────────────────────────────────── */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, #e8a040 100%);
    border: none;
    border-radius: 999px;
    color: #000;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    margin-top: 0.25rem;
}

.auth-btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 20px rgba(200, 135, 42, 0.38);
    transform: scale(1.01);
    color: #000;
    text-decoration: none;
}

.auth-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* ── Footer links ───────────────────────────────────────────── */
.auth-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.auth-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

a.auth-link, .auth-link {
    font-size: 0.85rem;
    color: var(--color-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

a.auth-link:hover, .auth-link:hover {
    color: var(--color-accent);
    text-shadow: none;
    text-decoration: none;
}

/* ── Divider ────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(168, 152, 128, 0.35);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0.15rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(200, 135, 42, 0.12);
}

/* ── Turnstile ──────────────────────────────────────────────── */
.auth-turnstile {
    display: flex;
    justify-content: center;
    margin: 0.25rem 0;
}

/* ── Status / confirmation pages ────────────────────────────── */
.auth-status {
    text-align: center;
    padding: 0.25rem 0 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.auth-status-icon {
    font-size: 2.6rem;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.auth-status-icon.success { color: var(--color-success); }

.auth-status p {
    font-size: 0.925rem;
    color: var(--color-muted);
    line-height: 1.65;
    max-width: 340px;
    margin: 0;
}

p.auth-hint {
    font-size: 0.82rem !important;
    color: rgba(168, 152, 128, 0.55) !important;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 14px;
    }

    .auth-heading { font-size: 1.85rem; }
    .auth-logo { max-height: 110px; }
    .auth-name-row { grid-template-columns: 1fr; }
}
