/* Crypto Ticker Banner */
.crypto-ticker-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    padding: 12px 0;
}

.crypto-ticker-container {
    overflow: hidden;
    position: relative;
}

.crypto-ticker {
    display: flex;
    animation: scroll 30s linear infinite;
    white-space: nowrap;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.33%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
    flex-shrink: 0;
}

.ticker-symbol {
    font-weight: 700;
    color: #3b82f6;
    font-size: 14px;
}

.ticker-price {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 14px;
}

.ticker-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.ticker-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.ticker-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.crypto-ticker:hover {
    animation-play-state: paused;
}

.hero-section {
    padding: var(--space-xs) 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.88);
}

.container-tight {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--space-md);
}

@media (min-width: 769px) {
    .container-tight {
        padding: 0 var(--space-lg);
    }
}

.grid-hero {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
    align-items: center;
}

.section-dark {
    color: rgba(255, 255, 255, 0.88);
}

.card-dark {
    background: var(--primary-bg);
    color: rgba(255, 255, 255, 0.88);
}

.text-light {
    color: rgba(255, 255, 255, 0.88);
}

.text-light-strong {
    color: rgba(255, 255, 255, 0.9);
}

.section-spacious {
    padding: var(--space-xs) 0;
}

.bg-secondary {
    background: var(--secondary-bg);
}

.bg-primary {
    background: var(--primary-bg);
}

.bg-sidebar {
    background: var(--sidebar-bg);
}

.hero-heading {
    margin-bottom: var(--space-lg);
    color: white;
}

.hero-video-slider {
    position: relative;
    width: 360px;
    max-width: 520px;
    margin: var(--space-xl) auto 0;
    overflow: hidden;
}

.hero-video-slider .slick-list {
    overflow: hidden;
}

.hero-video-slider .slick-track {
    display: flex;
}

.hero-video-slider .slick-slide {
    display: flex !important;
    justify-content: center;
}

.hero-video-slide {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
}

.hero-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.6);
}

.hero-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #000;
    max-width: 100%;
}

.hero-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(4, 7, 14, 0.55), rgba(4, 7, 14, 0.7));
    border: none;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.hero-video-play[hidden] {
    display: none;
}

.hero-video-play-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-primary);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>') center / 50% 50% no-repeat;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>') center / 50% 50% no-repeat;
}

.hero-video-caption {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.hero-video-slider .slick-dots {
    position: static;
    margin-top: var(--space-md);
}

.hero-video-slider .slick-dots li button:before {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

.hero-video-slider .slick-dots li.slick-active button:before {
    color: var(--brand-primary);
}

@media (min-width: 992px) {
    .hero-video-slider {
        width: 100%;
        max-width: 720px; /* larger video on desktop */
        margin-inline: 0;
        margin-top: 0; /* align with hero content on desktop */
    }
}

@media (min-width: 768px) {
    .hero-video-slider {
        margin-top: var(--space-2xl);
    }

    .hero-video-caption {
        font-size: 1rem;
    }
}

.section-subtitle {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
}

.hero-stats-item {
    text-align: center;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.product-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.product-card {
    padding: var(--space-md);
}

.product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--space-md);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.benefit-card {
    border-left-width: 4px;
    border-left-style: solid;
    transition: var(--transition-base);
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-card:hover .benefit-icon-circle {
    transform: scale(1.05);
}

.benefit-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-md);
}

.benefit-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-md);
    transition: var(--transition-base);
}

.features-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-2xl);
}

.features-intro .kicker {
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand-primary);
    display: inline-block;
    margin-bottom: var(--space-sm);
}

.features-intro-copy {
    margin: 0;
    color: var(--text-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: var(--space-xl);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
}

.feature-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
}

.feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.25), transparent 55%);
    opacity: 0.75;
}

.feature-card > * {
    position: relative;
    z-index: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.18);
    color: var(--brand-primary);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
    flex-shrink: 0;
}

.feature-title {
    margin: 0;
    font-weight: 700;
    flex: 1;
}

.feature-copy {
    margin: 0;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.cta-panel {
    text-align: center;
    background: var(--primary-bg);
    padding: var(--space-2xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-base);
}

.trusted-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xl);
    opacity: 0.7;
}

.trusted-logo {
    height: 40px;
    filter: grayscale(100%);
    transition: var(--transition-fast);
}

.trusted-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.category-card {
    text-align: center;
    transition: var(--transition-base);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-md);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: var(--space-md);
}

.landing-section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.heading-spaced {
    margin-bottom: var(--space-md);
}

.section-subgrid {
    display: grid;
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .grid-hero {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .product-showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .product-showcase {
        grid-template-columns: 1fr;
    }
}
/* ==========================================================================
   w3metacoin.com - MODERN FINANCIAL DASHBOARD THEME
   60-30-10 Color Rule | Inter Font | Mobile-First Design
   ========================================================================== */

/* Import Inter Font from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* ==========================================================================
   CSS CUSTOM PROPERTIES (CSS Variables)
   ========================================================================== */

:root {
    /* TYPOGRAPHY */
    --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
    --font-mono: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace;

    /* PRIMARY COLORS (60% - Backgrounds & Main Content) */
    --primary-bg: #020436; /* Card/surface background */
    --secondary-bg: #030528; /* Global page background (user side) */
    --tertiary-bg: #0b157f; /* Subtle section bg on dark backdrop */
    --text-primary: #ffffff; /* Main text (global - user side on dark bg) */
    --text-secondary: rgba(255, 255, 255, 0.8); /* Secondary text on dark bg */
    --border-light: #e2e8f0; /* Light borders and dividers */
    --divider: rgba(255, 255, 255, 0.12); /* Divider on dark areas */

    /* SECONDARY COLORS (30% - Headers, Sections, Navigation) */
    --brand-primary: #2ec5ff; /* Cyan that pairs with deep navy */
    --brand-secondary: #60a5fa; /* Soft azure for hovers/gradients */
    --brand-tertiary: #e6f7ff; /* Very light blue for subtle backgrounds */
    --sidebar-bg: #030528; /* Dark blue matching dashboard background */
    --sidebar-text: #f1f5f9; /* Much lighter gray for better contrast */

    /* ACCENT COLORS (10% - CTAs, Alerts, Actions) */
    --success: #059669; /* Green for positive actions (deposits, profits) */
    --success-light: #ecfdf5; /* Light green backgrounds */
    --warning: #d97706; /* Orange for warnings */
    --warning-light: #fff7ed; /* Light orange backgrounds */
    --danger: #dc2626; /* Red for negative actions (withdrawals, losses) */
    --danger-light: #fef2f2; /* Light red backgrounds */
    --accent-gold: #f59e0b; /* Gold for premium features */
    --accent-purple: #7c3aed; /* Purple for special actions */

    /* LAYOUT DIMENSIONS */
    --sidebar-width: 280px;
    --header-height: 64px;
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;

    /* SPACING SCALE */
    --space-xs: 0.25rem; /* 4px */
    --space-sm: 0.5rem; /* 8px */
    --space-md: 1rem; /* 16px */
    --space-lg: 1.5rem; /* 24px */
    --space-xl: 2rem; /* 32px */
    --space-2xl: 3rem; /* 48px */

    /* SHADOWS */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* TRANSITIONS */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--secondary-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   UNIFIED LAYOUT SYSTEM
   ========================================================================== */

/* Base layout container */
.unified-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--secondary-bg);
}

/* Main content area that adjusts based on sidebar presence */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
}

/* Dashboard layout (authenticated users with sidebar) */
.main-content[data-layout="dashboard"] {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* Website layout (guest users, full width) */
.main-content[data-layout="website"] {
    width: 100%;
    margin-left: 0;
}

/* Content area that holds the main page content */
.content-area {
    flex: 1;
    padding: var(--space-lg);
    background-color: var(--secondary-bg);
    min-height: calc(100vh - var(--header-height));
}

/* ==========================================================================
   SIDEBAR COMPONENT
   ========================================================================== */

.sidebar-authenticated {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    z-index: 1000;
    transition: var(--transition-base);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Close button for mobile drawer - small, borderless, top-right */
.sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    padding: 4px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    z-index: 10;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    color: white;
    transform: scale(1.1);
}

/* Mobile overlay for sidebar */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1002;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-authenticated .sidebar-content {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Sidebar profile card */
.sidebar-profile-card {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    margin-top: var(--space-lg);
}

.profile-card-row {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.profile-card-right {
    flex: 1;
}

.summary-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.summary-identity {
    display: flex;
    flex-direction: column;
}

.summary-amount-row {
    margin-top: var(--space-sm);
}

/* Desktop-only adjustments: stack profile card vertically */
@media (min-width: 1024px) {
    .sidebar-profile-card.profile-card-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .sidebar-profile-card .profile-avatar {
        justify-content: flex-start;
        margin-bottom: var(--space-sm);
    }
    .sidebar-profile-card .profile-card-right {
        width: 100%;
    }
    .sidebar-profile-card .summary-top {
        width: 100%;
        margin-bottom: var(--space-sm);
    }
    .sidebar-profile-card .user-level-inline,
    .sidebar-profile-card .uid-inline,
    .sidebar-profile-card .summary-amount-row {
        margin-top: var(--space-sm);
    }
}

.user-level-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 6px;
}

.uid-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.profile-card-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: var(--space-md);
}

/* Profile Section */
.sidebar-profile {
    padding-bottom: var(--space-lg);
}

.profile-avatar {
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.profile-name {
    color: white;
    margin: 0;
}

.user-level-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    margin: var(--space-sm) 0;
}

.level-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.level-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    border-radius: var(--border-radius-sm);
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    animation: metallic-shine 3s linear infinite;
}

.level-name::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.4) 45%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.4) 55%, transparent 100%);
    mix-blend-mode: screen;
    transform: translateX(-100%);
    animation: metallic-sheen 3s linear infinite;
}

.level-name--silver {
    background: linear-gradient(135deg, #d7d7d7 0%, #f2f2f2 25%, #b5b5b5 50%, #f8f8f8 75%, #d1d1d1 100%);
}

.level-name--gold {
    background: linear-gradient(135deg, #b8860b 0%, #ffd700 25%, #f4c542 50%, #ffeb7a 75%, #c99700 100%);
}

.level-name--platinum {
    background: linear-gradient(135deg, #bcc6cc 0%, #e6eef5 30%, #a3adb3 55%, #eff4f7 75%, #b7c1c8 100%);
}

.level-name--default {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 25%, #475569 50%, #94a3b8 75%, #64748b 100%);
}

@keyframes metallic-shine {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes metallic-sheen {
    0% {
        transform: translateX(-100%);
    }
    60% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Sidebar profile card sizing overrides */
.sidebar-profile-card .profile-img {
    width: 96px;
    height: 96px;
}

.sidebar-profile-card .profile-name {
    font-size: 1rem;
}

.sidebar-profile-card .user-level-inline .level-name {
    font-size: 0.8rem;
}

.sidebar-profile-card .uid-inline .label,
.sidebar-profile-card .uid-inline .value {
    font-size: 0.7rem;
}

/* Balance and spacing alignment inside sidebar profile card */
.sidebar-profile-card .summary-amount-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.sidebar-profile-card .amount-large {
    font-size: 1rem; /* match name size */
    line-height: 1.4;
}

.sidebar-profile-card .summary-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-profile-card .user-level-inline {
    margin-top: var(--space-sm);
}
.sidebar-profile-card .uid-inline {
    margin-top: var(--space-sm);
}

.share-referral-btn {
    margin-left: var(--space-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: var(--transition-fast);
}

.share-referral-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.level-placeholder {
    color: #cbd5e1; /* Slightly darker for secondary text */
    opacity: 0.9;
}

.user-details {
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
}

.user-uid,
.user-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-uid .label,
.user-balance .label {
    color: #cbd5e1; /* Slightly darker for secondary text */
    opacity: 0.9;
}

.user-uid .value {
    color: #cbd5e1; /* Slightly darker for secondary text */
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: var(--space-lg) 0;
}

/* Navigation Styles */
.sidebar-navigation {
    flex: 1;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-section-header {
    margin: var(--space-md) 0 var(--space-sm) 0;
}

.section-title {
    color: #cbd5e1; /* Slightly darker for section headers */
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.nav-item {
    margin-bottom: 4px;
}

/* Sidebar specific nav-link styles */
.sidebar-authenticated .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.9) !important; /* Lighter white for better visibility */
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    font-family: var(--font-primary);
    font-weight: 500;
    position: relative;
    border-left: 3px solid transparent;
}

.sidebar-authenticated .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white !important;
    border-left-color: rgba(255, 255, 255, 0.3);
}

.sidebar-authenticated .nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: white !important;
    border-left-color: var(--brand-primary);
}

.sidebar-authenticated .nav-link.active::before {
    content: none;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.nav-text {
    font-size: 0.875rem;
    line-height: 1.4;
    color: inherit; /* Inherit the color from parent nav-link */
}

/* Small inline badge for coming soon labels inside nav links */
.coming-soon-badge {
    margin-left: 8px;
    padding: 2px 6px;
    font-size: 0.675rem;
    line-height: 1;
    color: white;
    background: linear-gradient(
        135deg,
        var(--brand-secondary),
        var(--brand-primary)
    );
    border-radius: 999px;
    opacity: 0.9;
}

/* Logout Section */
.sidebar-footer {
    margin-top: auto;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-form {
    margin: 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: var(--space-md);
    background: rgba(220, 38, 38, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: white;
    border-color: rgba(220, 38, 38, 0.4);
}

.logout-btn .nav-icon {
    color: currentColor;
}

/* ==========================================================================
   NAVIGATION COMPONENTS
   ========================================================================== */

/* Dashboard navigation (authenticated users) */
.nav-dashboard {
    height: var(--header-height);
    background-color: transparent;
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    padding: 0 var(--space-lg);
    box-shadow: var(--shadow-sm);
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Navigation Brand/Title */
.nav-brand {
    flex: 1;
}

.nav-title {
    color: #ffffff;
    margin: 0;
    font-weight: 600;
}

/* Breadcrumbs */
.nav-breadcrumbs {
    flex: 2;
    display: flex;
    justify-content: center;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.breadcrumb-item i {
    font-size: 0.75rem;
}

/* Navigation Actions */
.nav-actions {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-lg);
}

/* Quick Balance Display */
.quick-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: var(--space-sm) var(--space-md);
    background: var(--brand-tertiary);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--brand-primary);
}

.balance-label {
    color: var(--text-secondary);
    line-height: 1;
}

.balance-amount {
    color: var(--brand-primary);
    line-height: 1;
}

/* Notification Button */
.nav-action-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.nav-action-btn:hover {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

.nav-action-btn .nav-icon {
    width: 20px;
    height: 20px;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: none;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.user-menu-trigger:hover {
    background: var(--secondary-bg);
    border-color: var(--brand-primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    color: var(--text-primary);
}

.dropdown-icon {
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.user-menu-trigger:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* User Menu Content */
.user-menu-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--primary-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    z-index: 1000;
}

.user-menu-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu Header */
.menu-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.menu-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.menu-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.menu-user-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.menu-user-name {
    color: var(--text-primary);
    font-size: 1rem;
}

.menu-user-email {
    color: var(--text-secondary);
}

/* Menu Divider */
.menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0;
}

/* Menu Items */
.menu-items {
    padding: var(--space-sm) 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
}

.menu-item:hover {
    background: var(--secondary-bg);
    color: var(--brand-primary);
}

.menu-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.menu-item:hover .menu-icon {
    color: var(--brand-primary);
}

/* Logout Item */
.logout-item {
    color: var(--danger);
}

.logout-item:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.logout-item .menu-icon {
    color: var(--danger);
}

.menu-logout-form {
    margin: 0;
}

/* Guest header (marketing/auth pages) */
.header-guest {
    height: var(--header-height);
    background-color: var(--primary-bg);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1001;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Header Brand */
.header-brand {
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.brand-logo:hover {
    color: var(--brand-primary);
}

.brand-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    color: var(--brand-primary);
    margin: 0;
    line-height: 1;
}

.brand-suffix {
    color: var(--text-secondary);
    margin-left: 2px;
}

/* Header Navigation */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--brand-primary);
    background: var(--brand-tertiary);
}

.nav-link.active {
    color: var(--brand-primary);
    background: var(--brand-tertiary);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--brand-primary);
    border-radius: 1px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--secondary-bg);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 2px 0;
    transition: var(--transition-fast);
    border-radius: 1px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
}

.welcome-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logout-form {
    margin: 0;
}

/* Mobile Navigation - Full Screen */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--primary-bg);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Navigation Close Button - Top Right Corner */
.mobile-nav-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
    z-index: 10;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: rotate(90deg);
}

/* Global Mobile Bottom Tabbar */
.mobile-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-bg);
    border-top: 1px solid var(--divider);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 0.5rem 0;
    z-index: 100; /* sits below sidebar (1000) and overlay (999) */
}

.mobile-tabbar .tab-item {
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.mobile-tabbar .tab-item i {
    display: block;
    font-size: 1rem;
    margin-bottom: 2px;
}

.mobile-tabbar .tab-item.active {
    color: var(--brand-primary);
}

/* Hide bottom tabbar on tablet/desktop */
@media (min-width: 769px) {
    .mobile-tabbar {
        display: none;
    }
}

/* Prevent content from being covered by tabbar on mobile */
@media (max-width: 768px) {
    .content-area {
        padding-bottom: calc(var(--space-2xl) + 48px);
    }
}

.mobile-nav.active {
    transform: translateX(0);
}

/* Fade-in animation for mobile nav content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav.active .mobile-nav-menu {
    animation: fadeInUp 0.4s ease forwards;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: var(--space-2xl);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    width: 100%;
    max-width: 400px;
}

.mobile-nav-item {
    width: 100%;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-2xl);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    transition: var(--transition-fast);
    font-weight: 600;
    font-size: 1.25rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    cursor: pointer;
    font-family: var(--font-primary);
    text-align: center;
}

.mobile-nav-link i {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-link span {
    flex: 1;
    text-align: center;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.mobile-nav-link.active {
    background: var(--brand-tertiary);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.mobile-nav-link.primary {
    background: var(--brand-primary);
    border: 2px solid var(--brand-primary);
    color: white;
}

.mobile-nav-link.primary:hover {
    background: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: white;
    transform: translateY(-2px);
}

.logout-mobile {
    color: var(--danger);
    border-color: rgba(220, 53, 69, 0.3);
}

.logout-mobile:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
    transform: translateY(-2px);
}

.mobile-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: var(--space-lg) 0;
    width: 50%;
    align-self: center;
}

.mobile-logout-form {
    margin: 0;
    width: 100%;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Show overlay while mobile drawer is open */
body.mobile-menu-open .overlay {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
    }

    /* Hide all auth buttons on mobile (shown in drawer) */
    .header-actions .auth-buttons,
    .header-actions .btn-secondary-action,
    .header-actions .logout-form {
        display: none;
    }

    .header-container {
        padding: 0 var(--space-md);
    }
}

/* Desktop: Ensure mobile nav is hidden */
@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Dashboard Navigation Mobile Styles */
@media (min-width: 769px) {
    .nav-breadcrumbs {
        display: none;
    }

    .nav-brand {
        flex: 1;
        width: 100%;
    }

    .nav-container {
        justify-content: center;
    }

    .nav-title {
        text-align: center;
    }
}

/* ==========================================================================
   FOOTER COMPONENT
   ========================================================================== */

.footer-guest {
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: var(--space-2xl) var(--space-lg);
    margin-top: auto;
}

/* ==========================================================================
   CARD COMPONENTS
   ========================================================================== */

.card-modern {
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-base);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: var(--space-lg);
    transition: var(--transition-base);
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.card-financial {
    position: relative;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(3, 7, 45, 0.92) 0%, rgba(2, 4, 54, 0.96) 55%, rgba(1, 3, 34, 0.98) 100%);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(46, 197, 255, 0.22);
    padding: var(--space-xl);
    box-shadow: 0 24px 48px rgba(2, 4, 54, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.card-financial::before,
.card-financial::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0.78;
}

.card-financial::before {
    width: 180px;
    height: 180px;
    top: -90px;
    right: -70px;
    background: radial-gradient(circle, rgba(46, 197, 255, 0.35) 0%, transparent 68%);
    filter: blur(0.5px);
}

.card-financial::after {
    width: 220px;
    height: 220px;
    bottom: -120px;
    left: -110px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.28) 0%, transparent 70%);
    filter: blur(0.5px);
}

.card-financial > * {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   BUTTON COMPONENTS
   ========================================================================== */

/* Primary Actions: Invest, Complete Task, Deposit */
.btn-primary-action {
    background: linear-gradient(135deg, var(--success) 0%, #047857 100%);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 16px;
    border: none;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

/* Secondary Actions: View Details, Manage */
.btn-secondary-action {
    background: var(--brand-primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary-action:hover {
    background: var(--brand-secondary);
}

/* Warning Actions: Withdraw, Cancel */
.btn-warning-action {
    background: var(--warning);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-warning-action:hover {
    background: #b45309;
}

/* Outline buttons */
.btn-outline {
    background: transparent;
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
    padding: 8px 18px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: white;
}

/* ==========================================================================
   TYPOGRAPHY CLASSES
   ========================================================================== */

/* Headers - Using Inter for modern financial look */
.heading-xl {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.heading-lg {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.heading-md {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.015em;
    line-height: 1.4;
}

.heading-sm {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.5;
}

/* Body Text - Inter Regular */
.text-body {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: #ffffff;
}

.text-small {
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.text-xs {
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Financial Numbers - Monospace for clarity */
.amount-display {
    font-family: var(--font-mono);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
}

.amount-large {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
}

.amount-positive {
    color: var(--success);
}

.amount-negative {
    color: var(--danger);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Spacing utilities */
.mb-sm {
    margin-bottom: var(--space-sm);
}
.mb-md {
    margin-bottom: var(--space-md);
}
.mb-lg {
    margin-bottom: var(--space-lg);
}
.mb-xl {
    margin-bottom: var(--space-xl);
}

.mt-sm {
    margin-top: var(--space-sm);
}
.mt-md {
    margin-top: var(--space-md);
}
.mt-lg {
    margin-top: var(--space-lg);
}
.mt-xl {
    margin-top: var(--space-xl);
}

.p-sm {
    padding: var(--space-sm);
}
.p-md {
    padding: var(--space-md);
}
.p-lg {
    padding: var(--space-lg);
}
.p-xl {
    padding: var(--space-xl);
}

/* Text utilities */
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
.text-left {
    text-align: left;
}

.font-medium {
    font-weight: 500;
}
.font-semibold {
    font-weight: 600;
}
.font-bold {
    font-weight: 700;
}

/* Display utilities */
.flex {
    display: flex;
}
.flex-col {
    flex-direction: column;
}
.items-center {
    align-items: center;
}
.justify-center {
    justify-content: center;
}
.justify-between {
    justify-content: space-between;
}

/* ==========================================================================
   MOBILE HAMBURGER MENU
   ========================================================================== */

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    color: var(--text-primary);
}

.hamburger-menu .hamburger-icon {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ========================================================================== */

/* Mobile styles (default) */
@media (max-width: 767px) {
    /* Hide sidebar by default on mobile */
    .sidebar-authenticated {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
    }

    /* Show sidebar when active */
    .sidebar-authenticated.active {
        transform: translateX(0);
        width: 100vw;
    }

    /* Adjust main content for mobile */
    .main-content[data-layout="dashboard"] {
        margin-left: 0;
        width: 100%;
    }

    /* Show hamburger menu */
    .hamburger-menu {
        display: block;
    }

    /* Show close button only on mobile */
    .sidebar-close {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        z-index: 1001;
    }

    /* Adjust content padding for mobile */
    .content-area {
        padding: var(--space-md);
        /* Ensure content is not covered by the fixed bottom tabbar on mobile */
        padding-bottom: calc(var(--space-2xl) + 48px);
        /* Use safe-area inset when available (iOS) */
        padding-bottom: calc(
            var(--space-2xl) + 48px + env(safe-area-inset-bottom)
        );
    }

    /* Responsive typography */
    .heading-xl {
        font-size: 2rem;
    }

    .heading-lg {
        font-size: 1.5rem;
    }

    /* Stack button groups */
    .btn-group {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .btn-group > * {
        width: 100%;
    }

    /* Push profile card down so it doesn't sit under close/hamburger */
    .sidebar-profile-card {
        margin-top: var(--space-xl);
    }
}

/* Tablet and up */
@media (min-width: 768px) {
    .content-area {
        padding: var(--space-xl);
    }
}

/* Desktop and up */
@media (min-width: 1024px) {
    .content-area {
        padding: var(--space-2xl);
    }

    /* Larger financial amounts on desktop */
    .amount-large {
        font-size: 2.5rem;
    }
}

/* ==========================================================================
   FINANCIAL DASHBOARD SPECIFIC COMPONENTS
   ========================================================================== */

.balance-summary-card {
    color: white;
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
    background: linear-gradient(140deg, rgba(3, 7, 45, 0.93) 0%, rgba(2, 4, 54, 0.97) 52%, rgba(1, 3, 34, 0.98) 100%);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(46, 197, 255, 0.28);
    box-shadow: 0 28px 52px rgba(2, 4, 54, 0.5);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.balance-summary-card::before,
.balance-summary-card::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0.85;
}

.balance-summary-card::before {
    width: 260px;
    height: 260px;
    top: -140px;
    right: -130px;
    background: radial-gradient(circle, rgba(46, 197, 255, 0.42) 0%, transparent 70%);
    filter: blur(1px);
}

.balance-summary-card::after {
    width: 320px;
    height: 320px;
    bottom: -180px;
    left: -160px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.34) 0%, transparent 72%);
    filter: blur(1px);
}

.balance-summary-card > * {
    position: relative;
    z-index: 1;
}

.balance-amount {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    margin: var(--space-md) 0;
    font-variant-numeric: tabular-nums;
}

/* Ensure strong contrast for amount inside balance card */
.balance-summary-card .balance-amount {
    color: #ffffff;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.1;
}

.balance-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.investment-card {
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    padding: var(--space-lg);
    transition: var(--transition-base);
}

.investment-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.investment-card-compact {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(3, 7, 45, 0.9) 0%, rgba(2, 4, 54, 0.95) 60%, rgba(1, 3, 34, 0.98) 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.22);
    padding: var(--space-lg);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(1, 3, 34, 0.4);
}

.investment-card-compact::before,
.investment-card-compact::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0.72;
}

.investment-card-compact::before {
    width: 120px;
    height: 120px;
    top: -60px;
    right: -40px;
    background: radial-gradient(circle, rgba(46, 197, 255, 0.32) 0%, transparent 68%);
}

.investment-card-compact::after {
    width: 140px;
    height: 140px;
    bottom: -70px;
    left: -50px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.26) 0%, transparent 72%);
}

.investment-card-compact > * {
    position: relative;
    z-index: 1;
}

.investment-card-compact:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(1, 3, 34, 0.5);
}

/* Balance card responsive layout for mobile */
@media (max-width: 768px) {
    .balance-summary-card {
        margin-bottom: var(--space-xl);
        border-radius: var(--border-radius);
    }
    /* Stack the two columns defined inline in the blade */
    .balance-summary-card > div {
        display: flex;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: var(--space-md);
        width: 100%;
    }
    /* Reset right-aligned text block to left on mobile */
    .balance-summary-card [style*="text-align: right"] {
        text-align: left !important;
        width: 100%;
    }
    .balance-summary-card .balance-amount {
        font-size: 1.75rem;
    }
}

/* CTA card (light background) adjustments for readability and spacing */
.cta-invest-card .text-body {
    color: #0f172a !important; /* dark slate for contrast on light bg */
}
.cta-invest-card [style*="color: var(--text-secondary)"] {
    color: #334155 !important; /* slate-700 for secondary text */
}
.cta-invest-card .heading-md {
    line-height: 1.3;
}
@media (max-width: 768px) {
    .cta-invest-card {
        padding: var(
            --space-xl
        ) !important; /* override inline padding on mobile */
    }
    .cta-invest-card .heading-md {
        font-size: 1.25rem;
    }
    .cta-invest-card .text-body {
        font-size: 0.9375rem;
    }
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

.form-input {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-size: 1rem;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

/* Light grey placeholders for contrast on dark inputs */
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1; /* ensure consistent color across browsers */
}

/* Cross-browser placeholder selectors */
.form-input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.form-input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.form-input::-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.form-input:-moz-placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Ensure selects inherit readable text color and are clearly clickable */
select.form-input {
    color: var(--text-primary);
    background-color: var(--primary-bg);
    cursor: pointer;
}

/* Improve dropdown option readability across browsers that allow styling */
select.form-input option {
    color: #000000;
    background: #ffffff;
}

.form-label {
    display: block;
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   LOADING & STATES
   ========================================================================== */

.loading-spinner {
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--brand-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --border-light: #000000;
        --text-secondary: #000000;
    }
}
@media (forced-colors: active) {
    :root {
        --border-light: #000000;
        --text-secondary: #000000;
    }
}

/* ==========================================================================
   MODERN INVESTMENT CARDS - MATERIAL DESIGN
   ========================================================================== */

.investment-card-modern {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 
                0 4px 8px rgba(0, 0, 0, 0.05);
}

.investment-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 
                0 12px 24px rgba(0, 0, 0, 0.1);
}


.investment-card-brand-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(120, 199, 255, 0.35), transparent 45%),
                radial-gradient(circle at 80% 30%, rgba(255, 154, 255, 0.3), transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(255, 214, 165, 0.25), transparent 55%),
                linear-gradient(160deg, #0b1020 0%, #181b42 40%, #1f1459 100%);
    z-index: 0;
}

.investment-card-brand-bg::before,
.investment-card-brand-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.2;
}

.investment-card-brand-bg::before {
    background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 0);
    background-size: 18px 18px;
    mix-blend-mode: screen;
}

.investment-card-brand-bg::after {
    background-image: radial-gradient(rgba(255, 255, 255, 0.45) 0.8px, transparent 0);
    background-size: 50px 50px;
    mix-blend-mode: overlay;
    animation: twinkle 14s linear infinite;
}

@keyframes twinkle {
    0% {
        opacity: 0.15;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        opacity: 0.35;
        transform: translate3d(-1%, 1%, 0) scale(1.02);
    }
    100% {
        opacity: 0.15;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.investment-card-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.investment-card-content {
    position: relative;
    z-index: 2;
    padding: var(--space-lg);
}

.investment-description-short {
    display: block;
}

.investment-description-full {
    display: none;
}

.investment-description-full.expanded {
    display: block;
}

.investment-description-short.collapsed {
    display: none;
}

.read-more-link {
    color: var(--brand-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.read-more-link:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.investment-card-logo-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.investment-card-modern .btn-primary-action {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.investment-card-modern .btn-primary-action:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}
