/* =============================================================================
   HYPERLEAP-INSPIRED PROFESSIONAL THEME
   Clean, modern, and mobile-responsive design
   ============================================================================= */

/* =============================================================================
   CSS VARIABLES - Design System Tokens
   ============================================================================= */
:root {
    /* Primary Colors */
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;
    
    /* Accent Colors - Cyan/Teal */
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --accent-gradient-hover: linear-gradient(135deg, #00e5ff 0%, #8b5cf6 100%);
    
    /* Neutral Colors - Dark Theme */
    --bg-primary: #030712;
    --bg-secondary: #0a0f1a;
    --bg-tertiary: #111827;
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --bg-elevated: rgba(30, 41, 59, 0.5);
    
    /* Surface Colors */
    --surface-100: rgba(255, 255, 255, 0.02);
    --surface-200: rgba(255, 255, 255, 0.04);
    --surface-300: rgba(255, 255, 255, 0.06);
    --surface-400: rgba(255, 255, 255, 0.08);
    --surface-500: rgba(255, 255, 255, 0.12);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-disabled: #64748b;
    
    /* Border Colors */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.15);
    --border-accent: rgba(0, 212, 255, 0.3);
    
    /* Status Colors */
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --error: #ef4444;
    --error-light: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.15);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);
    --shadow-glow-accent: 0 0 60px rgba(0, 212, 255, 0.2);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

/* =============================================================================
   GLOBAL RESET & BASE STYLES
   ============================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Enable scrolling on mobile */
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    /* Enable mobile scrolling */
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

/* Beautiful gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.25rem); }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-300);
}

/* =============================================================================
   PROFESSIONAL NAVIGATION BAR
   ============================================================================= */
.navbar {
    background: rgba(10, 15, 26, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 0.75rem 1.5rem !important;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: all var(--transition-normal);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.navbar .nav-link:hover {
    color: var(--text-primary) !important;
    background: var(--surface-200);
}

.navbar .nav-link.active {
    color: var(--accent-primary) !important;
    background: rgba(0, 212, 255, 0.1);
}

/* =============================================================================
   PROFESSIONAL SIDEBAR
   ============================================================================= */
#desktop-sidebar,
.sidebar {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 26, 0.98) 100%) !important;
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-subtle) !important;
    min-height: 100vh;
    padding: 0 !important;
}

/* Sidebar Brand - hidden to save space */
.sidebar-brand {
    display: none !important;
}

.sidebar-brand img {
    display: none;
}

.sidebar-brand .brand-title {
    display: none;
}

.sidebar-brand .brand-sub {
    display: none;
}

/* Sidebar Navigation Items */
.list-group {
    padding: 0.5rem;
    padding-top: 0.25rem;
}

.list-group-item {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    padding: 0.75rem 1rem !important;
    margin: 0.125rem 0 !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.list-group-item:hover {
    background: var(--surface-200) !important;
    color: var(--text-primary) !important;
    transform: translateX(4px);
}

.list-group-item.active {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%) !important;
    color: var(--accent-primary) !important;
    border-left: 3px solid var(--accent-primary) !important;
    font-weight: 600;
}

.list-group-item i {
    width: 20px;
    font-size: 1rem;
    opacity: 0.8;
}

.list-group-item:hover i,
.list-group-item.active i {
    opacity: 1;
}

/* =============================================================================
   PROFESSIONAL CARDS
   ============================================================================= */
.card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-hover) !important;
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-2px);
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 1rem 1.25rem !important;
    font-weight: 600;
    color: var(--text-primary) !important;
}

.card-body {
    padding: 1.25rem !important;
    color: var(--text-secondary) !important;
}

.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 1rem 1.25rem !important;
}

/* Featured/Highlighted Card */
.card-featured {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.05) 100%) !important;
    border-color: var(--border-accent) !important;
}

.card-featured:hover {
    box-shadow: var(--shadow-glow) !important;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */
.btn {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

/* Primary Button - Gradient */
.btn-primary {
    background: var(--accent-gradient) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    background: var(--surface-300) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-default) !important;
}

.btn-secondary:hover {
    background: var(--surface-400) !important;
    border-color: var(--border-hover) !important;
}

/* Outline Button */
.btn-outline-primary {
    background: transparent !important;
    color: var(--accent-primary) !important;
    border: 1px solid var(--accent-primary) !important;
}

.btn-outline-primary:hover {
    background: rgba(0, 212, 255, 0.1) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

/* Ghost Button */
.btn-ghost {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: none !important;
}

.btn-ghost:hover {
    background: var(--surface-200) !important;
    color: var(--text-primary) !important;
}

/* Icon Button */
.btn-icon {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
}

/* Success/Warning/Error Buttons */
.btn-success {
    background: var(--success) !important;
    color: white !important;
}

.btn-success:hover {
    background: #059669 !important;
}

.btn-warning {
    background: var(--warning) !important;
    color: #1a1a1a !important;
}

.btn-danger {
    background: var(--error) !important;
    color: white !important;
}

/* =============================================================================
   FORM INPUTS
   ============================================================================= */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
    background: var(--surface-200) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    background: var(--surface-300) !important;
    border-color: var(--accent-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15) !important;
}

.form-control::placeholder,
input::placeholder {
    color: var(--text-disabled) !important;
}

/* Search Input */
.search-input {
    background: var(--surface-100) !important;
    border: 1px solid var(--border-subtle) !important;
    padding-left: 2.5rem !important;
}

/* =============================================================================
   BADGES & TAGS
   ============================================================================= */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

.badge-primary {
    background: rgba(0, 212, 255, 0.15) !important;
    color: var(--accent-primary) !important;
}

.badge-success {
    background: var(--success-light) !important;
    color: var(--success) !important;
}

.badge-warning {
    background: var(--warning-light) !important;
    color: var(--warning) !important;
}

.badge-danger {
    background: var(--error-light) !important;
    color: var(--error) !important;
}

.badge-info {
    background: var(--info-light) !important;
    color: var(--info) !important;
}

/* =============================================================================
   TABLES
   ============================================================================= */
.table {
    color: var(--text-secondary);
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--surface-200);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--surface-100);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: var(--surface-100);
}

/* =============================================================================
   MODALS
   ============================================================================= */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-xl) !important;
}

.modal-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 1.25rem 1.5rem !important;
}

.modal-title {
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem !important;
    color: var(--text-secondary);
}

.modal-footer {
    background: transparent !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 1rem 1.5rem !important;
}

.btn-close {
    filter: invert(1);
    opacity: 0.6;
}

.btn-close:hover {
    opacity: 1;
}

/* =============================================================================
   PROGRESS BARS
   ============================================================================= */
.progress {
    background: var(--surface-200) !important;
    border-radius: var(--radius-full) !important;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    background: var(--accent-gradient) !important;
    border-radius: var(--radius-full) !important;
    transition: width var(--transition-slow);
}

/* =============================================================================
   TABS
   ============================================================================= */
.nav-tabs {
    border-bottom: 1px solid var(--border-subtle) !important;
    gap: 0.25rem;
}

.nav-tabs .nav-link {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem 1rem !important;
    transition: all var(--transition-fast);
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
    border-bottom-color: var(--border-hover) !important;
}

.nav-tabs .nav-link.active {
    color: var(--accent-primary) !important;
    border-bottom-color: var(--accent-primary) !important;
    background: transparent !important;
}

/* Pills */
.nav-pills .nav-link {
    background: transparent !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-muted) !important;
    padding: 0.5rem 1rem !important;
}

.nav-pills .nav-link:hover {
    background: var(--surface-200) !important;
    color: var(--text-primary) !important;
}

.nav-pills .nav-link.active {
    background: var(--accent-gradient) !important;
    color: white !important;
}

/* =============================================================================
   ALERTS & NOTIFICATIONS
   ============================================================================= */
.alert {
    border-radius: var(--radius-lg) !important;
    border: 1px solid !important;
    padding: 1rem 1.25rem !important;
    font-size: 0.9rem;
}

.alert-success {
    background: var(--success-light) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: var(--success) !important;
}

.alert-warning {
    background: var(--warning-light) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: var(--warning) !important;
}

.alert-danger {
    background: var(--error-light) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: var(--error) !important;
}

.alert-info {
    background: var(--info-light) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: var(--info) !important;
}

/* =============================================================================
   TOOLTIPS
   ============================================================================= */
.tooltip-inner {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    box-shadow: var(--shadow-lg);
}

/* =============================================================================
   DROPDOWN MENUS
   ============================================================================= */
.dropdown-menu {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl) !important;
    padding: 0.5rem !important;
    min-width: 200px;
}

.dropdown-item {
    color: var(--text-secondary) !important;
    padding: 0.625rem 1rem !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--surface-200) !important;
    color: var(--text-primary) !important;
}

.dropdown-divider {
    border-color: var(--border-subtle) !important;
    margin: 0.5rem 0 !important;
}

/* =============================================================================
   SCROLLBARS
   ============================================================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--surface-500);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-400) transparent;
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.2); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.4); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.4s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-glow {
    animation: glow 2s infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--surface-200) 25%, var(--surface-300) 50%, var(--surface-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */
/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle) !important;
}

/* Gradient Text */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Effect */
.glow {
    box-shadow: var(--shadow-glow);
}

.glow-accent {
    box-shadow: var(--shadow-glow-accent);
}

/* Status Text */
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--error) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Spacing Utilities */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* =============================================================================
   STOCK/PORTFOLIO SPECIFIC STYLES
   ============================================================================= */
/* Stock Tile */
.stock-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.stock-tile:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stock-tile-profit {
    border-left: 3px solid var(--success) !important;
}

.stock-tile-loss {
    border-left: 3px solid var(--error) !important;
}

/* Price Display */
.price-display {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.25rem;
}

.price-change {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.875rem;
}

.price-up { color: var(--success) !important; }
.price-down { color: var(--error) !important; }

/* Market Summary Card */
.market-summary-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.05) 100%);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

/* Chart Container */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem;
    overflow: hidden;
}

/* =============================================================================
   MOBILE RESPONSIVE STYLES
   ============================================================================= */

/* Mobile First - Base styles are for mobile */
@media (max-width: 575.98px) {
    body {
        font-size: 14px;
    }
    
    .navbar {
        padding: 0.35rem 0.5rem !important;
    }
    
    /* Compact navbar icons on mobile */
    .navbar-icon-btn {
        padding: 0 !important;
        margin: 0 0.15rem !important;
    }
    
    .navbar-icon-btn .navbar-icon,
    .navbar-icon-btn i {
        font-size: 1rem !important;
    }
    
    .navbar-icons-container {
        gap: 0.15rem !important;
    }
    
    /* Make navbar title smaller */
    .navbar-title {
        font-size: 0.95rem !important;
    }
    
    /* Compact badges */
    .bell-notification-badge,
    .navbar-icon-btn .badge {
        font-size: 0.45rem !important;
        padding: 0.05rem 0.15rem !important;
        min-width: 0.7rem !important;
        height: 0.7rem !important;
        top: -1px !important;
        right: -1px !important;
    }
    
    /* Hamburger menu button */
    .navbar-menu-btn {
        padding: 0.25rem !important;
        margin-right: 0.25rem !important;
    }
    
    /* Refresh button compact */
    #refresh-portfolio-button {
        margin-right: 0.15rem !important;
    }
    
    #refresh-portfolio-button i {
        font-size: 0.95rem !important;
    }
    
    .card {
        border-radius: var(--radius-md) !important;
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    .stock-tile {
        padding: 0.75rem;
    }
    
    .price-display {
        font-size: 1rem;
    }
    
    /* Hide sidebar on mobile - use offcanvas */
    #desktop-sidebar {
        display: none !important;
    }
    
    /* Full width content on mobile */
    #page-content {
        padding: 0.75rem !important;
        margin-left: 0 !important;
    }
    
    /* Stack elements vertically */
    .d-flex.flex-row {
        flex-direction: column !important;
    }
    
    /* Smaller badges on mobile */
    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Extra small phones (under 380px) */
@media (max-width: 379.98px) {
    .navbar {
        padding: 0.25rem 0.35rem !important;
    }
    
    .navbar-icon-btn {
        margin: 0 0.1rem !important;
    }
    
    .navbar-icon-btn .navbar-icon,
    .navbar-icon-btn i,
    #open-basket-btn {
        font-size: 0.9rem !important;
    }
    
    .navbar-title {
        font-size: 0.85rem !important;
    }
    
    .navbar-menu-btn {
        padding: 0.15rem !important;
        margin-right: 0.15rem !important;
    }
    
    /* Hide badges on very small screens */
    .bell-notification-badge,
    .notifications-badge,
    #basket-badge {
        display: none !important;
    }
}

/* Small tablets */
@media (min-width: 576px) and (max-width: 767.98px) {
    #desktop-sidebar {
        display: none !important;
    }
    
    #page-content {
        padding: 1rem !important;
        margin-left: 0 !important;
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    #desktop-sidebar {
        width: 200px !important;
        min-width: 200px !important;
    }
    
    .list-group-item {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    
    #page-content {
        margin-left: 200px;
    }
}

/* Desktop */
@media (min-width: 992px) {
    #desktop-sidebar {
        width: 240px !important;
        min-width: 240px !important;
    }
    
    #page-content {
        margin-left: 240px;
    }
    
    .container-fluid {
        max-width: 1600px;
        margin: 0 auto;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    #desktop-sidebar {
        width: 260px !important;
    }
    
    #page-content {
        margin-left: 260px;
        padding: 2rem !important;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
}

/* =============================================================================
   OFFCANVAS MOBILE MENU
   ============================================================================= */
.offcanvas {
    background: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-subtle) !important;
}

.offcanvas-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 1.25rem;
}

.offcanvas-title {
    font-weight: 600;
    color: var(--text-primary);
}

.offcanvas-body {
    padding: 0;
}

/* =============================================================================
   CHAT PANEL STYLES
   ============================================================================= */
#chat-window {
    background: var(--bg-secondary) !important;
    border-left: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-xl) !important;
}

#chat-messages-container {
    background: var(--bg-primary);
}

.chat-bubble-user {
    background: var(--accent-gradient) !important;
    color: white !important;
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg) !important;
    max-width: 80%;
    padding: 0.75rem 1rem;
}

.chat-bubble-bot {
    background: var(--surface-200) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm) !important;
    max-width: 80%;
    padding: 0.75rem 1rem;
}

/* =============================================================================
   PORTFOLIO TILE REFRESH ANIMATIONS
   Modern staggered animations for professional refresh experience
   ============================================================================= */

/* Tile refresh animation - slide in from left with fade */
@keyframes tileSlideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px) scale(0.95);
    }
    60% {
        transform: translateX(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Shimmer loading effect for tiles */
@keyframes tileShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Pulse animation for refresh icon */
@keyframes refreshPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Spin animation for refresh icon */
@keyframes refreshSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Tile refresh class - applied during refresh */
.tile-refreshing {
    animation: tileSlideInFromLeft 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

/* Staggered animation delays for each tile */
.tile-refreshing:nth-child(1) { animation-delay: 0ms; }
.tile-refreshing:nth-child(2) { animation-delay: 60ms; }
.tile-refreshing:nth-child(3) { animation-delay: 120ms; }
.tile-refreshing:nth-child(4) { animation-delay: 180ms; }
.tile-refreshing:nth-child(5) { animation-delay: 240ms; }
.tile-refreshing:nth-child(6) { animation-delay: 300ms; }
.tile-refreshing:nth-child(7) { animation-delay: 360ms; }
.tile-refreshing:nth-child(8) { animation-delay: 420ms; }
.tile-refreshing:nth-child(9) { animation-delay: 480ms; }
.tile-refreshing:nth-child(10) { animation-delay: 540ms; }
.tile-refreshing:nth-child(11) { animation-delay: 600ms; }
.tile-refreshing:nth-child(12) { animation-delay: 660ms; }
.tile-refreshing:nth-child(13) { animation-delay: 720ms; }
.tile-refreshing:nth-child(14) { animation-delay: 780ms; }
.tile-refreshing:nth-child(15) { animation-delay: 840ms; }
.tile-refreshing:nth-child(n+16) { animation-delay: 900ms; }

/* Shimmer loading placeholder for tiles */
.tile-shimmer {
    background: linear-gradient(
        90deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 50%,
        rgba(30, 41, 59, 0.6) 100%
    );
    background-size: 200% 100%;
    animation: tileShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    min-height: 140px;
}

/* Refresh button active state */
.refresh-btn-active .fa-sync-alt {
    animation: refreshSpin 1s linear infinite;
}

/* Summary cards refresh animation */
@keyframes summaryCardRefresh {
    0% {
        opacity: 0.5;
        transform: scale(0.98);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.01);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.summary-card-refreshing {
    animation: summaryCardRefresh 0.4s ease-out forwards;
}

/* Flip animation alternative for tiles */
@keyframes tileFlipIn {
    0% {
        opacity: 0;
        transform: perspective(400px) rotateY(-15deg) translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: perspective(400px) rotateY(0deg) translateX(0);
    }
}

.tile-flip-refreshing {
    animation: tileFlipIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

/* Staggered delays for flip animation */
.tile-flip-refreshing:nth-child(1) { animation-delay: 0ms; }
.tile-flip-refreshing:nth-child(2) { animation-delay: 80ms; }
.tile-flip-refreshing:nth-child(3) { animation-delay: 160ms; }
.tile-flip-refreshing:nth-child(4) { animation-delay: 240ms; }
.tile-flip-refreshing:nth-child(5) { animation-delay: 320ms; }
.tile-flip-refreshing:nth-child(6) { animation-delay: 400ms; }
.tile-flip-refreshing:nth-child(7) { animation-delay: 480ms; }
.tile-flip-refreshing:nth-child(8) { animation-delay: 560ms; }
.tile-flip-refreshing:nth-child(9) { animation-delay: 640ms; }
.tile-flip-refreshing:nth-child(10) { animation-delay: 720ms; }
.tile-flip-refreshing:nth-child(11) { animation-delay: 800ms; }
.tile-flip-refreshing:nth-child(12) { animation-delay: 880ms; }
.tile-flip-refreshing:nth-child(n+13) { animation-delay: 960ms; }

/* Fade out animation when refreshing starts */
@keyframes tileFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

.tile-fade-out {
    animation: tileFadeOut 0.2s ease-out forwards;
}

/* 3D Flip animation for tile value updates */
@keyframes tileFlip3D {
    0% {
        transform: perspective(1000px) rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: perspective(1000px) rotateY(90deg);
        opacity: 0.5;
    }
    100% {
        transform: perspective(1000px) rotateY(0deg);
        opacity: 1;
    }
}

/* Horizontal flip card animation */
@keyframes cardFlipHorizontal {
    0% {
        transform: perspective(600px) rotateY(0deg);
    }
    100% {
        transform: perspective(600px) rotateY(360deg);
    }
}

/* Vertical flip for values */
@keyframes valueFlipVertical {
    0% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
    50% {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    100% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

/* Tile flip class for refresh */
.tile-flip-update {
    animation: tileFlip3D 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Staggered flip delays */
.tile-flip-update:nth-child(1) { animation-delay: 0ms; }
.tile-flip-update:nth-child(2) { animation-delay: 50ms; }
.tile-flip-update:nth-child(3) { animation-delay: 100ms; }
.tile-flip-update:nth-child(4) { animation-delay: 150ms; }
.tile-flip-update:nth-child(5) { animation-delay: 200ms; }
.tile-flip-update:nth-child(6) { animation-delay: 250ms; }
.tile-flip-update:nth-child(7) { animation-delay: 300ms; }
.tile-flip-update:nth-child(8) { animation-delay: 350ms; }
.tile-flip-update:nth-child(9) { animation-delay: 400ms; }
.tile-flip-update:nth-child(10) { animation-delay: 450ms; }
.tile-flip-update:nth-child(11) { animation-delay: 500ms; }
.tile-flip-update:nth-child(12) { animation-delay: 550ms; }
.tile-flip-update:nth-child(n+13) { animation-delay: 600ms; }

/* Card inner content flip */
.card-flip-inner {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-flip-inner.flipping {
    animation: cardFlipHorizontal 0.8s ease-in-out;
}

/* Loading overlay for tiles container */
.tiles-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

/* Modern loading spinner */
.tiles-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: refreshSpin 0.8s linear infinite;
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */
@media print {
    body::before {
        display: none;
    }
    
    .navbar,
    #desktop-sidebar,
    .btn,
    .offcanvas {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible Styles */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-subtle: rgba(255, 255, 255, 0.2);
        --border-default: rgba(255, 255, 255, 0.3);
    }
    
    .card {
        border-width: 2px !important;
    }
}
