/* ===================================================================
   WiSpyAlert — shared auth styling
   Matches memberpage.php / index.php (paper editorial theme, navy top
   bar, Fraunces + IBM Plex, amber accent, signal-red alerts). Used by
   login, register (membership_index), reset, resetPassword, activate
   via includes/auth_header.php + includes/auth_footer.php.
   =================================================================== */

:root {
    --navy-950: #060f1f;
    --navy-900: #0a1628;
    --paper: #fbf8f1;
    --paper-2: #f3eee2;
    --ink: #0a1628;
    --ink-soft: #3a4a63;
    --rule: rgba(10, 22, 40, 0.12);
    --rule-strong: rgba(10, 22, 40, 0.25);
    --rule-dark: rgba(251, 248, 241, 0.12);
    --amber: #f59e0b;
    --amber-deep: #c2700a;
    --signal: #ef4444;
    --signal-soft: rgba(239, 68, 68, 0.08);
    --mint: #34d399;
    --mint-deep: #166534;
    --mint-soft: rgba(52, 211, 153, 0.1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: 'IBM Plex Sans', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ===== Top bar (mirrors memberpage) ===== */
.auth-topbar {
    background: var(--navy-950);
    color: var(--paper);
    padding: 14px 0;
    border-bottom: 1px solid var(--rule-dark);
}
.auth-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.auth-topbar .logo {
    font-family: 'Fraunces', serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    margin: 0;
}
.auth-topbar .logo a { text-decoration: none; color: var(--paper); }
.auth-topbar .logo .accent { color: var(--amber); font-style: italic; }
.auth-topbar .topbar-links {
    margin-left: auto;
    display: flex;
    gap: 18px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.05em;
}
.auth-topbar .topbar-links a {
    color: rgba(251, 248, 241, 0.7);
    text-decoration: none;
    transition: color .15s;
}
.auth-topbar .topbar-links a:hover { color: var(--amber); }

/* ===== Centered card shell ===== */
.auth-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}
.auth-card {
    background: var(--paper);
    border: 1px solid var(--ink);
    box-shadow: 8px 8px 0 var(--paper-2);
    padding: 40px;
    max-width: 440px;
    width: 100%;
}

/* ===== Headings ===== */
.auth-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--amber-deep);
    margin-bottom: 12px;
}
.auth-card h1, .auth-card h2 {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: 32px;
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
    color: var(--ink);
}
.auth-sub {
    color: var(--ink-soft);
    font-size: 15px;
    margin: 0 0 28px;
}
.auth-welcome {
    font-size: 15px;
    color: var(--mint-deep);
    margin: 0 0 20px;
}

/* ===== Form ===== */
.auth-field { margin-bottom: 18px; }
.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.auth-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--rule-strong);
    border-radius: 0;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px var(--amber-soft, rgba(245, 158, 11, 0.18));
}
.auth-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--ink-soft);
}

/* ===== Buttons ===== */
.auth-btn {
    display: inline-block;
    width: 100%;
    padding: 13px 24px;
    margin-top: 6px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    text-decoration: none;
    color: var(--paper);
    background: var(--navy-950);
    border: 1px solid var(--navy-950);
    border-radius: 0;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.auth-btn:hover { background: var(--amber-deep); border-color: var(--amber-deep); color: #fff; }
.auth-btn.is-inline { width: auto; }

/* ===== Row helper (e.g. password + confirm side by side) ===== */
.auth-row { display: flex; gap: 14px; }
.auth-row .auth-field { flex: 1; }
@media (max-width: 480px) { .auth-row { flex-direction: column; gap: 0; } }

/* ===== Remember / forgot line ===== */
.auth-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -4px 0 18px;
    font-size: 14px;
}
.auth-remember { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.auth-remember input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--navy-950); }
.auth-meta-row a { color: var(--amber-deep); text-decoration: none; }
.auth-meta-row a:hover { text-decoration: underline; }

/* ===== Alerts ===== */
.auth-alert {
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 3px solid;
}
.auth-alert p { margin: 0; }
.auth-alert-error { background: var(--signal-soft); border-color: var(--signal); color: #b91c1c; }
.auth-alert-success { background: var(--mint-soft); border-color: var(--mint); color: var(--mint-deep); }

/* ===== Footer links under the card ===== */
.auth-foot {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    text-align: center;
    font-size: 14px;
    color: var(--ink-soft);
}
.auth-foot a { color: var(--amber-deep); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.auth-username-chip {
    background: var(--paper-2);
    border: 1px solid var(--rule);
    padding: 10px 12px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--ink-soft);
}
.auth-username-chip code {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--ink);
    font-weight: 600;
}

@media (max-width: 480px) {
    .auth-card { padding: 28px 22px; box-shadow: 5px 5px 0 var(--paper-2); }
    .auth-card h1, .auth-card h2 { font-size: 27px; }
}
