/* static/auth.css — shared styles for auth pages */

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

:root {
    --primary: #2b5a8f;
    --primary-dark: #1e4270;
    --accent: #e8f2fc;
    --bg: #f8f9fb;
    --white: #ffffff;
    --text: #1a1f2e;
    --text-light: #5a6475;
    --border: #d4dbe6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --success: #16a34a;
    --success-bg: #f0fdf4;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand .avatar {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

.auth-brand h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.auth-brand p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 4px;
}

.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.auth-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--muted, #6b7280);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.2s ease;
    background: var(--bg);
    color: var(--text);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 90, 143, 0.1);
    background: var(--white);
}

/* Checkbox row (e.g. email-communication opt-in on sign-up). Kept separate
   from .form-group input so the checkbox isn't stretched full-width. */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin: 3px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}

.form-checkbox label {
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    color: var(--muted, #6b7280);
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.auth-submit:hover {
    background: var(--primary-dark);
}

.auth-submit:disabled {
    background: #8fa3bf;
    cursor: not-allowed;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    display: none;
}

.auth-error.visible {
    display: block;
}

.auth-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    display: none;
}

.auth-success.visible {
    display: block;
}

/* Sign-in "peek at the live feed" CTA for non-logged-in visitors. */
.auth-peek {
    width: 100%;
    max-width: 420px;
    margin: 20px auto 0;
    text-align: center;
}

.auth-peek-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.auth-peek-divider::before,
.auth-peek-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-peek-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.auth-peek-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-peek-link:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }
}
