/* ==========================================================================
   Modern Login & Auth System - USNL FUND
   Ultra-Modern Responsive Glassmorphism & Gradient System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --usnl-primary: #3b82f6;
    --usnl-primary-dark: #1d4ed8;
    --usnl-primary-glow: rgba(59, 130, 246, 0.35);
    --usnl-secondary: #06b6d4;
    --usnl-accent: #6366f1;
    --usnl-bg-gradient: linear-gradient(135deg, #0b132b 0%, #1c2541 45%, #0f172a 100%);
    --usnl-glass-bg: rgba(255, 255, 255, 0.94);
    --usnl-glass-border: rgba(255, 255, 255, 0.8);
    --usnl-glass-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --usnl-card-radius: 1.25rem;
    --usnl-input-radius: 0.75rem;
    --usnl-btn-radius: 0.75rem;
}

/* Base auth wrapper override */
.modern-auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #0f172a;
    background: radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.25) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(99, 102, 241, 0.25) 0%, transparent 45%),
                radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.15) 0%, transparent 60%),
                linear-gradient(135deg, #090e1a 0%, #0f172a 50%, #1e293b 100%);
    position: relative;
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Ambient animated light orbs */
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    animation: floatOrb 12s ease-in-out infinite alternate;
}
.orb-1 {
    width: 320px;
    height: 320px;
    top: 5%;
    left: 10%;
    background: linear-gradient(45deg, #2563eb, #06b6d4);
}
.orb-2 {
    width: 380px;
    height: 380px;
    bottom: 10%;
    right: 10%;
    background: linear-gradient(45deg, #6366f1, #a855f7);
    animation-duration: 16s;
    animation-delay: -3s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.08); }
    100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Modern Auth Content */
.modern-auth-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem 1rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Logo Card */
.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.auth-brand-badge i {
    color: #38bdf8;
    font-size: 1rem;
}

/* Auth Card Styling */
.modern-auth-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--usnl-card-radius);
    box-shadow: var(--usnl-glass-shadow);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.modern-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #06b6d4, #6366f1);
}

.modern-card-header {
    text-align: center;
    padding: 1.75rem 1.75rem 0.5rem 1.75rem;
}

.modern-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.modern-card-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 400;
    margin-bottom: 0;
}

/* Input Styles */
.modern-form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.modern-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.45rem;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper .field-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 1.15rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 4;
}

.modern-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--usnl-input-radius);
    transition: all 0.25s ease;
}

.modern-input:focus {
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

.modern-input:focus + .field-icon,
.input-icon-wrapper:focus-within .field-icon {
    color: #2563eb;
}

.input-icon-wrapper.has-toggle .modern-input {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.4rem;
    font-size: 1.15rem;
    border-radius: 0.375rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.password-toggle-btn:hover {
    color: #2563eb;
}

/* Custom Checkbox */
.modern-form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modern-form-check .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 0.35rem;
    border: 1.5px solid #cbd5e1;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-form-check .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.modern-form-check .form-check-label {
    font-size: 0.88rem;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

/* Sign In Button */
.btn-modern-submit {
    position: relative;
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0284c7 100%);
    border: none;
    border-radius: var(--usnl-btn-radius);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.45);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-modern-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.75s ease;
}

.btn-modern-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -5px rgba(37, 99, 235, 0.55);
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 50%, #0ea5e9 100%);
    color: #ffffff;
}

.btn-modern-submit:hover::after {
    left: 140%;
}

.btn-modern-submit:active {
    transform: translateY(0);
    box-shadow: 0 6px 15px -3px rgba(37, 99, 235, 0.4);
}

/* Membership Link Container */
.membership-callout {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e2e8f0;
    text-align: center;
}

.membership-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
}

.membership-link:hover {
    color: #2563eb;
    background: #f1f5f9;
}

/* Trust / Feature Badges Section */
.seo-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.seo-feature-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    color: #cbd5e1;
    transition: background 0.3s ease, transform 0.2s ease;
}

.seo-feature-item:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.seo-feature-icon {
    font-size: 1.35rem;
    color: #38bdf8;
    margin-bottom: 0.25rem;
    display: block;
}

.seo-feature-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.1rem;
}

.seo-feature-desc {
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.2;
    margin: 0;
}

/* SEO Narrative Block (Non-intrusive, rich keyword content) */
.seo-narrative-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.85rem;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    color: #94a3b8;
    font-size: 0.78rem;
    line-height: 1.55;
}

.seo-narrative-card h6 {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.seo-narrative-card h6 i {
    color: #10b981;
}

/* Error messages styling */
label.error, .error-message, span.error {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #ef4444;
    animation: fadeInError 0.2s ease-in;
}

.modern-input.error {
    border-color: #ef4444 !important;
    background-color: #fff5f5 !important;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer Styling */
.modern-footer {
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.modern-footer a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.modern-footer a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
    .modern-auth-content {
        padding: 1.5rem 0.75rem;
    }
    .modern-auth-card {
        border-radius: 1rem;
    }
    .modern-card-header {
        padding: 1.25rem 1.25rem 0.25rem 1.25rem;
    }
    .modern-card-title {
        font-size: 1.4rem;
    }
    .seo-features-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .seo-feature-item {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 0.75rem;
        padding: 0.6rem 0.85rem;
    }
    .seo-feature-icon {
        margin-bottom: 0;
    }
    .orb-1 {
        width: 220px;
        height: 220px;
    }
    .orb-2 {
        width: 240px;
        height: 240px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .modern-auth-card {
        max-width: 480px;
        margin: 0 auto;
    }
}
