/* ==========================================================================
   auth.css — Shared auth form styles (login, register, etc.)
   Used by teamvault, timelog, and future sub-sites
   ========================================================================== */

/* ── Alerts ── */
.alert {
    font-size: 0.78rem;
    padding: 0.6em 0.8em;
    margin-bottom: 1.2em;
    border-left: 2px solid;
}
.alert-error {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(204,85,68,0.06);
}
.alert-success {
    color: var(--success);
    border-color: var(--success);
    background: rgba(90,154,90,0.06);
}

/* ── Auth forms ── */
.auth-form .field {
    margin-bottom: 1.2em;
}
.auth-form label {
    display: block;
    font-size: 0.72rem;
    text-transform: lowercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.35em;
}
.auth-form label::before {
    content: '> ';
    color: var(--text-faint);
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.55em 0.7em;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.auth-form input:focus {
    border-color: var(--text);
    color: var(--text-glow);
    box-shadow: 0 0 8px rgba(200,120,48,0.15);
}
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-surface) inset;
    border-color: var(--border);
    transition: background-color 5000s ease-in-out 0s;
}
.auth-form .btn-submit {
    display: inline-block;
    padding: 0.55em 1.6em;
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-bright);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5em;
}
.auth-form .btn-submit:hover {
    border-color: var(--text-bright);
    color: var(--text-glow);
    box-shadow: 0 0 12px rgba(232,148,60,0.25);
    text-shadow: 0 0 8px rgba(255,168,84,0.3);
}
.auth-link {
    margin-top: 1.8em;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.auth-link a {
    color: var(--text);
    transition: color 0.2s ease;
}
.auth-link a:hover {
    color: var(--text-glow);
    text-shadow: 0 0 10px rgba(255,168,84,0.3);
}
.validation-error {
    font-size: 0.7rem;
    color: var(--danger);
    margin-top: 0.25em;
}

/* ── Policy links & modals ── */
.policy-link { color: var(--info); }
.policy-link:hover { color: #7db8e8; }

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--modal-bg); z-index: 200;
    justify-content: center; align-items: center;
}
.modal-overlay.open { display: flex; }
.modal-content {
    background: var(--bg-raised); border: 1px solid var(--border); border-radius: 4px;
    max-width: 860px; width: 100%; max-height: 80vh; padding: 2em;
    position: relative; overflow-y: auto; margin-top: 2em;
}
.modal-close {
    position: absolute; top: 1em; right: 1em; background: none; border: none;
    color: var(--text-dim); cursor: pointer; font-family: 'Fira Code', monospace; font-size: 1rem;
}
.modal-close:hover { color: var(--text-bright); }

.md-rendered h1 { font-size: 1.1rem; font-weight: 600; color: var(--text-bright); margin-bottom: 0.5em; }
.md-rendered h2 { font-size: 0.82rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-top: 1.5em; margin-bottom: 0.5em; }
.md-rendered h2::before { content: '# '; color: var(--text-muted); }
.md-rendered p, .md-rendered li { font-size: 0.78rem; color: var(--text-dim); line-height: 1.7; margin-bottom: 0.5em; }
.md-rendered em { color: var(--text-muted); }
.md-rendered strong { color: var(--text); font-weight: 500; }
.md-rendered ul { list-style: none; padding-left: 0; margin-bottom: 0.6em; }
.md-rendered li::before { content: '- '; color: var(--text-muted); }
.md-rendered a { color: var(--info); }
.md-rendered hr { border: none; border-top: 1px solid var(--border); margin: 1em 0; }
