/* ═══════════════════════════════════════════════════════════
   AUTH PAGES — PBI Score
   Dark glassmorphism theme consistent with main site
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --auth-bg: #F9FAFB;
    --auth-card-bg: #FFFFFF;
    --auth-card-border: #E5E7EB;
    --auth-input-bg: #FFFFFF;
    --auth-input-border: #D1D5DB;
    --auth-input-focus: #0891B2;
    --auth-text: #111827;
    --auth-muted: #6B7280;
    --auth-cyan: #0891B2;
    --auth-blue: #3B82F6;
    --auth-gradient: linear-gradient(135deg, #2563EB, #1D4ED8);
    --auth-error-bg: rgba(239, 68, 68, 0.1);
    --auth-error-border: rgba(239, 68, 68, 0.3);
    --auth-success-bg: rgba(16, 185, 129, 0.1);
    --auth-success-border: rgba(16, 185, 129, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.auth-page {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ─── Card ─────────────────────────────────────────────── */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Logo ─────────────────────────────────────────────── */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}

.auth-logo-icon {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.auth-logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.01em;
}

/* ─── Headings ──────────────────────────────────────────── */
.auth-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--auth-text);
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtext {
    font-size: 0.875rem;
    color: var(--auth-muted);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ─── Icon hero ─────────────────────────────────────────── */
.auth-icon-hero {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-icon-hero i {
    font-size: 48px;
    color: var(--auth-cyan);
}

/* ─── Form ──────────────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--auth-text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.auth-input:focus {
    border-color: var(--auth-input-focus);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.auth-input::placeholder {
    color: rgba(107, 114, 128, 0.6);
}

.auth-input.has-toggle {
    padding-right: 44px;
}

.auth-eye-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.auth-eye-toggle:hover {
    color: var(--auth-cyan);
}

/* ─── Password strength ─────────────────────────────────── */
.strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.strength-segment {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s;
}

.strength-label {
    font-size: 0.72rem;
    color: var(--auth-muted);
    margin-top: 4px;
}

/* ─── Forgot link ───────────────────────────────────────── */
.auth-forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
}

.auth-forgot a {
    font-size: 0.8rem;
    color: var(--auth-cyan);
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-forgot a:hover {
    opacity: 0.75;
}

/* ─── Submit button ─────────────────────────────────────── */
.auth-btn {
    width: 100%;
    padding: 13px 24px;
    background: var(--auth-gradient);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(7, 182, 213, 0.15);
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.auth-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: authShimmer 3s ease-in-out infinite;
}

@keyframes authShimmer {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.auth-btn:active {
    transform: translateY(0);
}

/* ─── Divider ───────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(17, 24, 39, 0.1);
}

/* ─── Bottom link ───────────────────────────────────────── */
.auth-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-bottom a {
    color: var(--auth-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-bottom a:hover {
    opacity: 0.75;
}

/* ─── Privacy note ──────────────────────────────────────── */
.auth-privacy {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(139, 156, 182, 0.6);
    margin-top: 4px;
}

/* ─── Back link ─────────────────────────────────────────── */
.auth-back {
    text-align: center;
    font-size: 0.85rem;
}

.auth-back a {
    color: var(--auth-muted);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-back a:hover {
    color: var(--auth-cyan);
}

/* ─── Alerts ────────────────────────────────────────────── */
.auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.auth-alert.error {
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: #FCA5A5;
}

.auth-alert.success {
    background: var(--auth-success-bg);
    border: 1px solid var(--auth-success-border);
    color: #6EE7B7;
}

/* ─── Security note ─────────────────────────────────────── */
.auth-security-note {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(139, 156, 182, 0.6);
    margin-top: 8px;
}

/* ─── Back to home link (fixed top-left, outside card) ─── */
.auth-back-home {
    position: fixed;
    top: 24px;
    left: 28px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--auth-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid var(--auth-card-border);
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.auth-back-home:hover {
    color: var(--auth-cyan);
    background: #F9FAFB;
    border-color: rgba(8, 145, 178, 0.25);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

/* ─── Logo anchor clickability ──────────────────────────── */
a.auth-logo {
    cursor: pointer;
    transition: opacity 0.2s;
}

a.auth-logo:hover {
    opacity: 0.85;
}