/* Auth-page styles — shared by /login, /auth/forgot-password,
   /auth/register, /auth/set-password.

   These rules used to live as duplicated inline <style> blocks inside each
   route's f-string. Extracted during the Jinja2 migration (see
   tasks/plan.md) so each auth template is just markup. design.css ships
   first; this file ships second so the auth-card overrides take effect on
   pages that link both. */

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --accent: #0d9488;
    --background: #ffffff;
    --foreground: #0a0a0f;
    --card: #ffffff;
    --border: #e4e4e7;
    --muted: #71717a;
    --error: #ef4444;
    --success: #0d9488;
    --radius: 0.25rem;
}

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

body {
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    background: var(--background);
    min-height: 100vh;
    color: var(--foreground);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Subtle page-wide grid pattern; sits behind the auth card. */
.grid-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

/* Centered card hosting the form. Used on every auth page. Replaces the
   page-specific `.login-card` / `.card` from the legacy inline styles. */
.auth-card {
    position: relative;
    z-index: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 4);
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.02), 0 8px 16px rgba(0,0,0,0.01);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 48px; height: 48px;
    background: var(--primary);
    border-radius: calc(var(--radius) * 3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
}

h1 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--foreground);
}

.subtitle {
    color: var(--muted);
    margin-bottom: 2rem;
    text-align: center;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.success {
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.3);
    color: var(--success);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    color: var(--foreground);
}

.input-group input::placeholder {
    color: var(--muted);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 0.5rem;
}

.btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04), 0 0 15px rgba(124, 58, 237, 0.08);
}

/* Footer link below the form (forgot-password / register / back-to-login).
   Replaces the per-page `.forgot-link` / `.back-link`. */
.auth-footer-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.auth-footer-link:hover {
    color: var(--primary);
}
