/* ============================================
   sparQ Auth Pages — Centered Single-Column
   ============================================ */

:root {
    --auth-bg: #fafafa;
    --auth-card-bg: #ffffff;
    --auth-card-width: 420px;
    --auth-card-padding: 2.25rem;
    --auth-primary: #2563eb;
    --auth-primary-hover: #1d4ed8;
    --auth-text: #0f172a;
    --auth-text-secondary: #64748b;
    --auth-border: #e2e8f0;
    --auth-border-focus: #2563eb;
    --auth-input-bg: #ffffff;
    --auth-radius: 12px;
    --auth-radius-sm: 8px;
    --auth-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    --auth-shadow-hover: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
    --auth-ring: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ============================================
   Page Shell
   ============================================ */

.auth-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--auth-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2rem 1.5rem;
}

/* ============================================
   Page-level Footer (pinned bottom)
   ============================================ */

.auth-page-footer {
    text-align: center;
    padding: 1rem 1.5rem;
}

.auth-page-footer small {
    color: #94a3b8;
    font-size: 0.6875rem;
    letter-spacing: 0.01em;
}

.auth-page-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-page-footer a:hover {
    color: var(--auth-text-secondary);
}

.auth-page-footer .version-text {
    color: #cbd5e1;
}

/* ============================================
   Auth Container — Centered Column
   ============================================ */

.auth-container {
    width: 100%;
    max-width: var(--auth-card-width);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: authFadeIn 0.4s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Branding
   ============================================ */

.auth-branding {
    text-align: center;
    margin-bottom: 0.25rem;
}

.auth-logo {
    height: 36px;
    width: auto;
    opacity: 0.9;
}

.company-name {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--auth-text-secondary);
    margin: 0.625rem 0 0 0;
    letter-spacing: -0.01em;
}

/* ============================================
   Auth Card
   ============================================ */

.auth-box {
    background: var(--auth-card-bg);
    padding: var(--auth-card-padding);
    border-radius: var(--auth-radius);
    border: 1px solid var(--auth-border);
    box-shadow: var(--auth-shadow);
    transition: box-shadow 0.2s ease;
}

.auth-box:hover {
    box-shadow: var(--auth-shadow-hover);
}

.auth-box h2 {
    margin: 0 0 0.25rem 0;
    text-align: center;
    color: var(--auth-text);
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.auth-box .text-muted {
    color: var(--auth-text-secondary) !important;
}

/* ============================================
   Demo Hint
   ============================================ */

.demo-hint {
    text-align: center;
    color: var(--auth-text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    padding: 0.625rem 0.75rem;
    background: #f0f4ff;
    border-radius: var(--auth-radius-sm);
    border: 1px solid #dbeafe;
    line-height: 1.5;
}

/* ============================================
   Form Controls
   ============================================ */

.auth-box .form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text);
    margin-bottom: 0.375rem;
    letter-spacing: 0.01em;
}

.auth-box .form-control {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: var(--auth-input-bg);
    color: var(--auth-text);
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.5;
}

.auth-box .form-control::placeholder {
    color: #94a3b8;
}

.auth-box .form-control:focus {
    border-color: var(--auth-border-focus);
    box-shadow: var(--auth-ring);
    outline: none;
}

.auth-box .form-check {
    margin: 0.75rem 0 0.25rem 0;
}

.auth-box .form-check-label {
    font-size: 0.8125rem;
    color: var(--auth-text-secondary);
    user-select: none;
}

.auth-box .form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

/* ============================================
   Buttons
   ============================================ */

.auth-box .btn-primary {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--auth-radius-sm);
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    letter-spacing: 0.01em;
}

.auth-box .btn-primary:hover {
    background-color: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.auth-box .btn-primary:active {
    transform: scale(0.985);
}

.auth-box .btn-primary:focus-visible {
    box-shadow: var(--auth-ring);
}

/* ============================================
   OAuth Buttons
   ============================================ */

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    border-radius: var(--auth-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    border: 1px solid var(--auth-border);
    background: var(--auth-card-bg);
    color: var(--auth-text);
}

.btn-oauth:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    text-decoration: none;
    color: var(--auth-text);
}

.btn-oauth i {
    font-size: 1rem;
}

/* Provider colors */
.btn-oauth-google i  { color: #4285F4; }
.btn-oauth-microsoft i { color: #00A4EF; }
.btn-oauth-github i { color: #24292f; }
.btn-oauth-linkedin i { color: #0A66C2; }

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--auth-border);
}

.auth-divider span {
    padding: 0 0.875rem;
    color: var(--auth-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Forgot Password Link */
.forgot-password-link {
    font-size: 0.8125rem;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.forgot-password-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* ============================================
   Auth Footer
   ============================================ */

.auth-footer {
    text-align: center;
    padding-top: 0.5rem;
}

.auth-footer small {
    color: #94a3b8;
    font-size: 0.6875rem;
    letter-spacing: 0.01em;
}

.auth-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-footer a:hover {
    color: var(--auth-text-secondary);
}

.auth-footer .version-text {
    color: #cbd5e1;
}

/* ============================================
   Links inside auth box
   ============================================ */

.auth-box a {
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-box a:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* ============================================
   Flash Messages
   ============================================ */

.flash-messages {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 440px;
    z-index: 1000;
    animation: flashSlideIn 0.3s ease-out;
}

@keyframes flashSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.flash-messages .alert {
    margin-bottom: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    text-align: center;
    border-radius: var(--auth-radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
}

/* ============================================
   Demo magic link
   ============================================ */

.demo-magic-link .alert-info {
    background: #f0f4ff;
    border: 1px solid #dbeafe;
    color: var(--auth-text);
    border-radius: var(--auth-radius-sm);
    font-size: 0.8125rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 480px) {
    .auth-wrapper {
        padding: 1.5rem 1rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .auth-box {
        padding: 1.75rem 1.5rem;
        border-radius: var(--auth-radius-sm);
    }

    .auth-logo {
        height: 30px;
    }
}
