/* ============================================
   PREMIUM FINANCIAL DESIGN SYSTEM
   Sophisticated, Trustworthy, Professional
   ============================================ */

:root {
    /* theInvestor Brand Colors - Forest Green Identity */
    --color-primary: #0f3a22;        /* Deep Forest Green - brand core */
    --color-primary-light: #1d5638;  /* Emerald - logo green */
    --color-accent: #1d5638;         /* Emerald - primary accent */
    --color-accent-bright: #3ea96d;  /* Bright emerald - highlights */
    --color-gold: #b8860b;           /* Subtle accent gold (rare use) */
    --color-gold-light: #daa520;
    
    /* Financial Semantic Colors */
    --color-profit: #10b981;         /* Green - Gains */
    --color-profit-bg: #d1fae5;
    --color-loss: #ef4444;           /* Red - Losses */
    --color-loss-bg: #fee2e2;
    --color-neutral: #6b7280;
    
    /* Premium Neutrals */
    --color-surface: #ffffff;
    --color-surface-elevated: #f8fafc;
    --color-border-light: #f1f5f9;
    
    /* Premium Shadows - Depth & Elevation */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px 0 rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 8px 24px 0 rgba(15, 23, 42, 0.15);
    --shadow-xl: 0 16px 48px 0 rgba(15, 23, 42, 0.2);
    --shadow-2xl: 0 24px 64px 0 rgba(15, 23, 42, 0.25);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
    
    /* Premium Typography */
    --font-display: 'Inter', -apple-system, system-ui, sans-serif;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    
    /* Spacing - Refined Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius - Sophisticated */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions - Smooth & Premium */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Text & Border Tokens */
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --color-border: #e2e8f0;

    /* Brand Tokens */
    --brand-name-color: #ffffff;
    --brand-tagline-color: rgba(220, 240, 228, 0.78);
    --brand-accent: #3ea96d;
    --brand-gold: #daa520;
    --brand-green: #1d5638;
    --brand-green-deep: #0f3a22;
    --brand-green-bright: #3ea96d;
    --brand-cream: #f5f1e6;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-display);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ============================================
   PREMIUM NAVIGATION
   ============================================ */
.navbar.bg-primary {
    background: linear-gradient(135deg, #0f3a22 0%, #1d5638 100%) !important;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(62, 169, 109, 0.18);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    color: #ffffff !important;
    transition: transform var(--transition-base);
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    transition: transform var(--transition-base);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.navbar-brand:hover img {
    transform: scale(1.1);
}

.nav-link {
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0.25rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3ea96d, transparent);
    transition: transform var(--transition-base);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    background: rgba(62, 169, 109, 0.22);
    color: #ffffff !important;
}

/* ============================================
   PREMIUM CARDS - Glassmorphism & Depth
   ============================================ */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0f3a22, #3ea96d, #0f3a22);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(29, 86, 56, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: linear-gradient(135deg, var(--color-surface-elevated) 0%, var(--color-surface) 100%);
    border-bottom: 1px solid var(--color-border-light);
    padding: 1.5rem 2rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--color-text-primary);
}

.card-body {
    padding: 2rem;
}

.card-footer {
    background: var(--color-surface-elevated);
    border-top: 1px solid var(--color-border-light);
    padding: 1.5rem 2rem;
}

/* Glass Card Variant */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

/* Premium Stats Card */
.stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-left: 4px solid var(--color-accent);
    transition: all var(--transition-base);
}

.stats-card:hover {
    border-left-width: 6px;
    transform: translateX(4px);
}

/* ============================================
   PREMIUM BUTTONS
   ============================================ */
.btn {
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #1d5638 0%, #0f3a22 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(15, 58, 34, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 58, 34, 0.45);
    background: linear-gradient(135deg, #3ea96d 0%, #1d5638 100%);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-outline-primary:hover {
    background: var(--color-accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(29, 86, 56, 0.3);
}

.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* ============================================
   PREMIUM FORMS
   ============================================ */
.form-control, .form-select {
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all var(--transition-base);
    background: var(--color-surface);
    min-height: 48px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(62, 169, 109, 0.15);
    outline: none;
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   PREMIUM TABLES
   ============================================ */
.table {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--color-text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 1.25rem 1.5rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
}

.table tbody tr:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.table tbody td {
    padding: 1.25rem 1.5rem;
    border: none;
    vertical-align: middle;
}

.table tbody td:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.table tbody td:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* ============================================
   FINANCIAL BADGES & INDICATORS
   ============================================ */
.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.badge-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Financial Number Display */
.financial-number {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.financial-number.positive {
    color: var(--color-profit);
}

.financial-number.negative {
    color: var(--color-loss);
}

/* ============================================
   PREMIUM ALERTS
   ============================================ */
.alert {
    border-radius: var(--radius-lg);
    border: none;
    border-left: 4px solid;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
    animation: slideInRight var(--transition-base);
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, rgba(209, 250, 229, 0.9) 0%, rgba(167, 243, 208, 0.9) 100%);
    border-color: var(--color-profit);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9) 0%, rgba(254, 202, 202, 0.9) 100%);
    border-color: var(--color-loss);
    color: #991b1b;
}

/* ============================================
   PREMIUM ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   PREMIUM UTILITIES
   ============================================ */
.container-fluid {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: linear-gradient(135deg, #0f3a22 0%, #3ea96d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-premium {
    box-shadow: var(--shadow-xl);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.letter-spacing-1 {
    letter-spacing: 0.05em;
}

.text-capitalize {
    text-transform: capitalize;
}

/* Ensure equal height cards */
.row.g-4 > [class*="col-"] {
    display: flex;
}

.row.g-4 > [class*="col-"] > .card {
    width: 100%;
}

/* ============================================
   DROPDOWN MENUS - Premium Style
   ============================================ */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.dropdown-item {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.dropdown-item i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--color-primary);
    transform: translateX(4px);
}

.dropdown-item:active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--color-border-light);
}

.nav-link.dropdown-toggle::after {
    margin-left: 0.5rem;
    transition: transform var(--transition);
}

.nav-link.dropdown-toggle:hover::after {
    transform: translateY(2px);
}

.dropdown-menu.show {
    animation: dropdownFadeIn var(--transition-base);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Profile Dropdown */
#userDropdown {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

#userDropdown:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-item.text-danger {
    color: #ef4444 !important;
}

.dropdown-item.text-danger:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626 !important;
}

.dropdown-item button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

/* ============================================
   PREMIUM FOOTER
   ============================================ */
.premium-footer {
    background: linear-gradient(135deg, #0f3a22 0%, #1d5638 100%);
    color: #e2e8f0;
    padding: 5rem 0 2rem;
    margin-top: auto;
    border-top: 3px solid rgba(62, 169, 109, 0.45);
    width: 100%;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content .container-fluid {
    max-width: 1600px;
    padding: 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-brand img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.footer-description {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
}

.footer-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.footer-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(62, 169, 109, 0.45);
    display: block;
    width: auto;
    max-width: 100%;
    text-align: left;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 0.5rem;
    width: 100%;
    text-align: left;
}

.footer-links li {
    margin-bottom: 0.75rem;
    text-align: left;
    padding-left: 0;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all var(--transition);
    display: block;
    font-weight: 500;
    text-align: left;
}

.footer-links a:hover {
    color: #3ea96d;
    transform: translateX(6px);
    text-shadow: 0 0 8px rgba(62, 169, 109, 0.35);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(62, 169, 109, 0.15);
    border: 2px solid rgba(62, 169, 109, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    text-decoration: none;
    transition: all var(--transition);
    font-size: 1.25rem;
}

.social-link:hover {
    background: linear-gradient(135deg, #1d5638 0%, #3ea96d 100%);
    border-color: #3ea96d;
    color: #ffffff;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(62, 169, 109, 0.45);
}

.footer-newsletter-text {
    color: #cbd5e1;
    font-size: 0.875rem;
    line-height: 1.5;
}

.newsletter-form input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 0.5rem;
}

.newsletter-form input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #3ea96d;
    box-shadow: 0 0 0 3px rgba(62, 169, 109, 0.25);
    color: #ffffff;
}

.newsletter-form input::placeholder {
    color: #94a3b8;
}

.newsletter-form .btn-primary {
    background: linear-gradient(135deg, #1d5638 0%, #0f3a22 100%);
    border: none;
}

.newsletter-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 58, 34, 0.45);
}

.footer-logo {
    text-align: left;
}

.footer-logo img {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.footer-bottom {
    border-top: 2px solid rgba(74, 144, 196, 0.3);
    margin-top: 3rem !important;
    padding-top: 2rem !important;
}

.footer-copyright {
    color: #ffffff !important;
    font-size: 1.0625rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer-copyright i {
    margin-right: 0.5rem;
    color: #3ea96d;
    font-size: 1.125rem;
}

.footer-badges {
    color: #ffffff !important;
    font-size: 1.0625rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer-badges i {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.footer-badges .bi-shield-check {
    color: #10b981;
}

.footer-badges .bi-clock-history {
    color: #3ea96d;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }
    
    .financial-number {
        font-size: 1.25rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    /* Footer responsive */
    .premium-footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-brand {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .footer-title {
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .social-links {
        margin-top: 1rem;
        margin-bottom: 2rem;
    }
    
    .footer-bottom {
        margin-top: 2rem;
        padding-top: 2rem;
    }
    
    .footer-bottom .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* ============================================
   BRAND IDENTITY — theInvestor Logo Lockup
   ============================================ */
.navbar.bg-primary {
    padding: 0.75rem 0;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    padding: 0.25rem 0.25rem;
    border-radius: var(--radius-md);
    transition: transform var(--transition-base);
}

.brand-lockup:hover {
    transform: translateY(-1px);
}

/* Full logo image — icon + "THE INVESTOR" wordmark (matches SVG exactly) */
.brand-logo {
    height: 64px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.footer-brand-logo { height: 80px; }
.auth-brand-logo { height: 96px; }

@media (max-width: 768px) {
    .brand-logo { height: 48px; }
    .footer-brand-logo { height: 64px; }
    .auth-brand-logo { height: 72px; }
}

/* On dark surfaces (navbar, footer, auth pages) recolour the logo to white.
   logo2.svg is a true vector (green on transparent) so a CSS invert filter
   flips green ink -> white ink without introducing any background box. */
.navbar .brand-logo,
.premium-footer .brand-logo,
body.auth-page .brand-logo {
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

/* Live market pill */
.market-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #d1fae5;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-left: 0.75rem;
}

.market-status-pill .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ============================================
   USER AVATAR in NAV
   ============================================ */
.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.875rem 0.375rem 0.375rem !important;
    border-radius: var(--radius-full) !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.nav-user:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}

.nav-user .avatar-initial {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-accent) 0%, #1e3a5f 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.25);
    letter-spacing: 0;
}

.nav-user .user-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
}

.nav-user.dropdown-toggle::after {
    color: rgba(255, 255, 255, 0.8);
    margin-left: 0.25rem;
}

/* ============================================
   NAVBAR LINKS — tighter, quieter premium
   ============================================ */
.navbar .nav-link {
    padding: 0.55rem 0.95rem !important;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.navbar .nav-link i {
    opacity: 0.85;
    margin-right: 0.35rem;
}

.navbar-nav .nav-item + .nav-item {
    margin-left: 2px;
}

/* ============================================
   PAGE HEADER — reusable premium header
   ============================================ */
.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-gold-light) 100%);
}

.page-header .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.page-header h1, .page-header .page-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.page-header .page-subtitle {
    color: var(--color-text-secondary);
    font-size: 1rem;
    margin-bottom: 0;
}

/* Page header with icon + actions slot */
.page-header__row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.page-header__main { flex: 1 1 auto; min-width: 0; }
.page-header__actions { flex: 0 0 auto; display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }

.page-header__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary-light) 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(15, 58, 34, 0.25);
}

.page-header h1 .live-badge,
.page-header .page-title .live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #047857;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    vertical-align: middle;
}

/* ============================================
   SKELETON / EMPTY / ERROR STATES
   ============================================ */
@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    display: block;
    background: linear-gradient(90deg, #eef2f6 0%, #f8fafc 50%, #eef2f6 100%);
    background-size: 800px 100%;
    border-radius: var(--radius-md);
    animation: skeleton-shimmer 1.4s infinite linear;
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}

.skeleton-line { height: 0.875rem; margin-bottom: 0.5rem; }
.skeleton-line.lg { height: 1.25rem; }
.skeleton-line.sm { height: 0.625rem; }
.skeleton-line.w-25 { width: 25%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-100 { width: 100%; }

.skeleton-card {
    padding: 1.25rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.empty-state,
.error-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface-elevated);
    color: var(--color-text-secondary);
}

.empty-state .icon,
.error-state .icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.empty-state h3,
.error-state h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 0.5rem;
}

.empty-state p,
.error-state p {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
}

.error-state {
    border-color: rgba(239, 68, 68, 0.4);
    background: #fef2f2;
}
.error-state .icon { color: #ef4444; }
.error-state h3 { color: #b91c1c; }

/* ============================================
   UTILITY CLASSES (replaces ad-hoc inline styles)
   ============================================ */
.brand-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(220, 240, 228, 0.8);
}

.brand-eyebrow--muted { color: rgba(220, 240, 228, 0.72); }

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #047857;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Improve outline button contrast (was hard to read on light bg) */
.btn-outline-primary {
    border-width: 2px;
    color: var(--color-primary);          /* deep forest, AA on white */
    border-color: var(--color-primary);
    font-weight: 600;
}

.btn-outline-primary:focus,
.btn-outline-primary:focus-visible {
    outline: 3px solid rgba(62, 169, 109, 0.45);
    outline-offset: 2px;
}

/* ============================================
   AUTH — Premium split-hero
   ============================================ */
body.auth-page {
    background: linear-gradient(135deg, #0b2a18 0%, #0f3a22 40%, #1d5638 100%);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    color: #e8f5ee;
    overflow-x: hidden;
}

body.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(60% 60% at 20% 10%, rgba(62, 169, 109, 0.28) 0%, transparent 60%),
        radial-gradient(50% 50% at 90% 85%, rgba(245, 241, 230, 0.12) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.auth-shell {
    width: 100%;
    max-width: 1180px;
    margin: auto;
    padding: 3rem 1.5rem;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.auth-hero .brand-lockup .brand-name { font-size: 1.625rem; }
.auth-hero .brand-lockup .brand-tagline { color: rgba(226, 232, 240, 0.7); }

.auth-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #ffffff;
    line-height: 1.15;
    margin: 1.75rem 0 1rem;
}

.auth-hero h1 .accent {
    background: linear-gradient(135deg, #ffffff 0%, #9fe3bc 55%, var(--brand-green-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-hero p.lead {
    color: rgba(226, 232, 240, 0.8);
    font-size: 1.0625rem;
    line-height: 1.65;
    max-width: 480px;
}

.auth-hero .feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    gap: 0.875rem;
    max-width: 460px;
}

.auth-hero .feature-list li {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: #e2e8f0;
    font-size: 0.9375rem;
    font-weight: 500;
}

.auth-hero .feature-list li i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(62, 169, 109, 0.20);
    border: 1px solid rgba(62, 169, 109, 0.40);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9fe3bc;
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    color: var(--color-text-primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
    color: var(--color-text-primary);
}

.auth-card .auth-sub {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.75rem;
}

.auth-card .form-label {
    color: var(--color-text-secondary);
}

.auth-card .btn-primary {
    width: 100%;
    justify-content: center;
}

.auth-card .auth-foot {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.auth-card .auth-foot a {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-card .auth-foot a:hover { text-decoration: underline; }

.trust-badges {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    color: rgba(220, 240, 228, 0.65);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
}

.trust-badges span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.trust-badges i { color: #9fe3bc; }

@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    .auth-hero { text-align: center; }
    .auth-hero .feature-list { margin-inline: auto; }
    .trust-badges { justify-content: center; }
}

/* ============================================
   FOOTER — refined brand lockup for dark bg
   ============================================ */
.premium-footer .brand-lockup .brand-name { font-size: 1.375rem; }
.premium-footer .brand-lockup .brand-tagline { color: rgba(226, 232, 240, 0.6); }

/* Tighter link caret for navbar dropdowns */
.navbar .dropdown-menu {
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    min-width: 260px;
}

