/* ============================================
   FINANCIAL TERMINAL - SCALED VERSION
   40% larger fonts throughout
   ============================================ */

:root {
    /* TradingView Color Palette */
    --bg-primary: #0E1217;
    --bg-secondary: #161A1E;
    --bg-tertiary: #1E222D;
    --bg-elevated: #232731;
    
    /* Accent Colors */
    --accent-primary: #2962FF;
    --accent-secondary: #1E88E5;
    --accent-gold: #FFB300;
    
    /* Chart Colors */
    --green: #26A69A;
    --red: #EF5350;
    --blue: #42A5F5;
    --orange: #FF9800;
    
    /* Text Colors */
    --text-primary: #D1D4DC;
    --text-secondary: #868993;
    --text-tertiary: #5E6167;
    --text-white: #FFFFFF;
    
    /* Border Colors */
    --border-primary: #2A2E39;
    --border-secondary: #363A45;
    --border-highlight: #3C4147;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.7);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* ============================================
   BASE STYLES - SCALED
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 19.6px; /* 14px * 1.4 = 19.6px */
    overflow-x: hidden;
}

/* Larger fonts for desktop */
@media (min-width: 1024px) {
    body {
        font-size: 21px; /* 15px * 1.4 = 21px */
    }
}

/* ============================================
   HEADER - SCALED
   ============================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0.75rem var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 22.4px; /* 16px * 1.4 */
    font-weight: 600;
    color: var(--text-white);
    text-decoration: none;
}

.logo-icon {
    font-size: 28px; /* 20px * 1.4 */
}

.logo-text {
    color: var(--accent-primary);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(38, 166, 154, 0.1);
    border: 1px solid rgba(38, 166, 154, 0.3);
    border-radius: var(--radius-sm);
}

.status-dot {
    width: 8px; /* 6px * 1.33 */
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 15.4px; /* 11px * 1.4 */
    font-weight: 600;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   SEARCH - SCALED
   ============================================ */

.search-container {
    position: relative;
    flex: 1;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1.225rem; /* scaled padding */
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 18.2px; /* 13px * 1.4 */
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

/* Search Results Dropdown - SCALED */
#search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 600px;
    overflow-y: auto;
    z-index: 2000;
    display: none;
}

.search-result-item {
    padding: 1.225rem 1.75rem; /* scaled */
    border-bottom: 1px solid var(--border-primary);
    cursor: pointer;
    transition: background 0.15s;
}

.result-name {
    font-size: 18.2px; /* 13px * 1.4 */
    font-weight: 500;
    color: var(--text-primary);
}

.result-symbol {
    font-size: 15.4px; /* 11px * 1.4 */
    color: var(--text-secondary);
}

.result-price {
    font-size: 18.2px;
    font-weight: 600;
    color: var(--text-white);
    font-variant-numeric: tabular-nums;
}

.result-change {
    font-size: 16.8px; /* 12px * 1.4 */
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   NAVIGATION - SCALED
   ============================================ */

.nav-links {
    display: flex;
    gap: var(--spacing-sm);
}

.nav-link {
    padding: 0.7rem 1.225rem; /* scaled */
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 18.2px; /* 13px * 1.4 */
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--text-white);
    background: var(--accent-primary);
}

/* ============================================
   HEADER ACTIONS - SCALED
   ============================================ */

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.last-update {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.update-label {
    font-size: 14px; /* 10px * 1.4 */
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.update-time {
    font-size: 16.8px; /* 12px * 1.4 */
    font-weight: 600;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
}

.refresh-btn {
    padding: 0.7rem; /* scaled */
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn svg {
    width: 22px; /* 16px * 1.375 */
    height: 22px;
}

.account-btn {
    padding: 0.7rem 1.4rem; /* scaled */
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 18.2px; /* 13px * 1.4 */
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.account-btn:hover {
    background: var(--accent-secondary);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard {
    padding: var(--spacing-lg);
    max-width: 1920px;
    margin: 0 auto;
}

/* ============================================
   MARKET OVERVIEW & MOVERS - FORCED SCALING
   Using !important to ensure styles apply
   ============================================ */

.market-section {
    margin-bottom: 2rem !important;
}

.market-section .section-header,
#market-overview-grid + .section-header,
.section-header {
    margin-bottom: 1.5rem !important;
}

.market-section .section-title,
.section-title {
    display: flex !important;
    align-items: center !important;
    gap: 0.7rem !important;
    font-size: 28px !important; /* FORCED 28px */
    font-weight: 700 !important;
    color: var(--text-white) !important;
    line-height: 1.2 !important;
}

.market-section .section-icon,
.section-icon {
    font-size: 30.8px !important; /* FORCED 30.8px */
}

/* MARKET OVERVIEW GRID - FORCED */
#market-overview-grid,
.compact-market-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 1.4rem !important;
    margin-bottom: 2.8rem !important;
}

/* MARKET CARDS - FORCED SCALING */
#market-overview-grid .compact-market-item,
#gainers-list .compact-market-item,
#losers-list .compact-market-item,
.compact-market-item {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.4rem !important; /* FORCED 1.4rem */
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.compact-market-item:hover {
    border-color: var(--accent-primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(41, 98, 255, 0.25) !important;
}

/* CARD HEADER */
.compact-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0.7rem !important;
}

/* SYMBOL - FORCED */
.compact-symbol {
    font-size: 18.2px !important; /* FORCED 18.2px */
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
    font-family: 'Courier New', monospace !important;
    letter-spacing: 0.02em !important;
}

/* ASSET NAME - FORCED */
.compact-name {
    font-size: 16.8px !important; /* FORCED 16.8px */
    color: var(--text-tertiary) !important;
    margin-bottom: 0.7rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
}

/* PRICE - FORCED LARGE */
.compact-price {
    font-size: 28px !important; /* FORCED 28px - BIGGEST */
    font-weight: 700 !important;
    color: var(--text-white) !important;
    margin-bottom: 0.35rem !important;
    line-height: 1.2 !important;
    font-variant-numeric: tabular-nums !important;
}

/* CHANGE PERCENTAGE - FORCED */
.compact-change {
    font-size: 18.2px !important; /* FORCED 18.2px */
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums !important;
}

.compact-change.positive {
    color: var(--green) !important;
}

.compact-change.negative {
    color: var(--red) !important;
}

/* TOP MOVERS SUBSECTIONS - FORCED */
h3[style*="font-size: 16px"],
.movers-title,
div[style*="font-size: 16px"][style*="font-weight: 700"] {
    font-size: 22.4px !important; /* FORCED 22.4px */
    font-weight: 700 !important;
    margin-bottom: 1.4rem !important;
}

/* GAINERS AND LOSERS LISTS - FORCED */
#gainers-list,
#losers-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 1.4rem !important;
}

/* Override any inline styles on market cards */
[onclick*="details.html"] {
    font-size: inherit !important;
}

[onclick*="details.html"] .compact-price {
    font-size: 28px !important;
}

[onclick*="details.html"] .compact-symbol {
    font-size: 18.2px !important;
}

[onclick*="details.html"] .compact-name {
    font-size: 16.8px !important;
}

[onclick*="details.html"] .compact-change {
    font-size: 18.2px !important;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS FOR SCALED CONTENT
   Mobile-optimized with working hamburger menu
   ============================================ */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px !important; /* Scaled for touch */
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

/* Tablet Breakpoint */
@media (max-width: 1200px) {
    .compact-market-grid,
    #market-overview-grid,
    #gainers-list,
    #losers-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    }
    
    .section-title {
        font-size: 25.2px !important; /* 18px * 1.4 */
    }
    
    .compact-price {
        font-size: 25.2px !important;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Base font size for mobile */
    body {
        font-size: 17.5px !important; /* 12.5px * 1.4 - good for mobile */
    }
    
    /* Show hamburger menu */
    .mobile-menu-toggle {
        display: block !important;
    }
    
    /* Hide desktop nav by default on mobile */
    .nav-links {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        background: var(--bg-secondary) !important;
        border-bottom: 1px solid var(--border-primary) !important;
        flex-direction: column !important;
        padding: 1rem !important;
        transform: translateY(-150%) !important;
        transition: transform 0.3s ease !important;
        z-index: 999 !important;
        box-shadow: var(--shadow-lg) !important;
        max-height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
    }
    
    /* Show nav when open */
    .nav-links.mobile-open {
        transform: translateY(0) !important;
    }
    
    .nav-link {
        width: 100% !important;
        text-align: left !important;
        padding: 1rem 1.5rem !important;
        font-size: 19.6px !important; /* 14px * 1.4 */
        border-bottom: 1px solid var(--border-primary) !important;
    }
    
    .nav-link:last-child {
        border-bottom: none !important;
    }
    
    /* Header adjustments */
    .header-content {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    .logo {
        font-size: 19.6px !important; /* 14px * 1.4 */
    }
    
    .logo-icon {
        font-size: 25.2px !important; /* 18px * 1.4 */
    }
    
    .search-container {
        order: 3 !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
    
    .search-input {
        font-size: 16.8px !important; /* 12px * 1.4 */
        padding: 0.75rem 1rem !important;
    }
    
    /* Hide some header elements on mobile */
    .last-update,
    .status-indicator {
        display: none !important;
    }
    
    /* Compact market grids on mobile */
    .compact-market-grid,
    #market-overview-grid,
    #gainers-list,
    #losers-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 0.875rem !important; /* 1.4 / 1.6 */
    }
    
    .compact-market-item {
        padding: 1rem !important; /* Slightly less padding on mobile */
    }
    
    /* Section titles on mobile */
    .section-title {
        font-size: 22.4px !important; /* 16px * 1.4 - still prominent */
    }
    
    .section-icon {
        font-size: 25.2px !important; /* 18px * 1.4 */
    }
    
    /* Card content on mobile */
    .compact-symbol {
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
    
    .compact-name {
        font-size: 14px !important; /* 10px * 1.4 */
        margin-bottom: 0.5rem !important;
    }
    
    .compact-price {
        font-size: 22.4px !important; /* 16px * 1.4 - still prominent */
    }
    
    .compact-change {
        font-size: 15.4px !important; /* 11px * 1.4 */
    }
    
    /* News panels on mobile */
    .content-grid {
        grid-template-columns: 1fr !important;
    }
    
    .panel-title {
        font-size: 17.5px !important; /* 12.5px * 1.4 */
    }
    
    .panel-icon {
        font-size: 19.6px !important; /* 14px * 1.4 */
    }
    
    .news-title {
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
    
    .news-meta {
        font-size: 14px !important; /* 10px * 1.4 */
    }
    
    /* Crypto list on mobile */
    .crypto-icon {
        width: 36.4px !important; /* 26px * 1.4 */
        height: 36.4px !important;
    }
    
    .crypto-name {
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
    
    .crypto-symbol {
        font-size: 14px !important; /* 10px * 1.4 */
    }
    
    .crypto-price {
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
    
    .crypto-change {
        font-size: 15.4px !important; /* 11px * 1.4 */
    }
    
    /* Watchlist on mobile */
    .watchlist-panel {
        width: calc(100% - 2rem) !important;
        right: 1rem !important;
        left: 1rem !important;
        max-height: 70vh !important;
    }
    
    .watchlist-count {
        font-size: 12.6px !important; /* 9px * 1.4 */
    }
    
    /* Buttons on mobile */
    .account-btn {
        padding: 0.625rem 1rem !important;
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
    
    .refresh-btn {
        padding: 0.625rem !important;
    }
    
    .refresh-btn svg {
        width: 19.6px !important; /* 14px * 1.4 */
        height: 19.6px !important;
    }
    
    /* Toast notifications on mobile */
    .toast-container {
        top: auto !important;
        bottom: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
    }
    
    .toast {
        min-width: auto !important;
        width: 100% !important;
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
    
    /* Search results on mobile */
    #search-results {
        max-height: 60vh !important;
    }
    
    .result-name {
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
    
    .result-symbol {
        font-size: 14px !important; /* 10px * 1.4 */
    }
    
    .result-price {
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    body {
        font-size: 16.8px !important; /* 12px * 1.4 */
    }
    
    .compact-market-grid,
    #market-overview-grid,
    #gainers-list,
    #losers-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 0.7rem !important;
    }
    
    .section-title {
        font-size: 19.6px !important; /* 14px * 1.4 */
    }
    
    .compact-price {
        font-size: 19.6px !important; /* 14px * 1.4 */
    }
    
    .logo {
        font-size: 17.5px !important; /* 12.5px * 1.4 */
    }
}

/* Landscape mobile orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .nav-links {
        max-height: 50vh !important;
    }
    
    .watchlist-panel {
        max-height: 50vh !important;
    }
}

/* ============================================
   CONTENT PANELS - SCALED
   ============================================ */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 19.6px; /* 14px * 1.4 */
    font-weight: 600;
    color: var(--text-white);
}

.panel-icon {
    font-size: 22.4px; /* 16px * 1.4 */
}

.panel-badge {
    padding: 0.35rem 0.7rem; /* scaled */
    border-radius: var(--radius-sm);
    font-size: 14px; /* 10px * 1.4 */
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(41, 98, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(41, 98, 255, 0.3);
}

.panel-content {
    padding: var(--spacing-md);
    max-height: 500px;
    overflow-y: auto;
}

/* ============================================
   NEWS LISTS - SCALED
   ============================================ */

.news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-item {
    border-bottom: 1px solid var(--border-primary);
    transition: background 0.15s;
}

.news-item:hover {
    background: var(--bg-tertiary);
}

.news-link {
    display: block;
    padding: 1.225rem; /* 0.875rem * 1.4 */
    color: inherit;
    text-decoration: none;
}

.news-title {
    font-size: 18.2px; /* 13px * 1.4 */
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.7rem;
    line-height: 1.4;
}

.news-meta {
    display: flex;
    gap: 1.05rem; /* 0.75rem * 1.4 */
    font-size: 15.4px; /* 11px * 1.4 */
    color: var(--text-tertiary);
}

.news-source {
    font-weight: 600;
    color: var(--accent-primary);
}

/* ============================================
   CRYPTO LIST - SCALED
   ============================================ */

.crypto-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.crypto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.225rem; /* 0.875rem * 1.4 */
    border-bottom: 1px solid var(--border-primary);
    transition: background 0.15s;
    cursor: pointer;
}

.crypto-item:hover {
    background: var(--bg-tertiary);
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 1.05rem;
}

.crypto-icon {
    width: 44.8px; /* 32px * 1.4 */
    height: 44.8px;
    border-radius: 50%;
}

.crypto-name {
    font-size: 18.2px; /* 13px * 1.4 */
    font-weight: 600;
    color: var(--text-primary);
}

.crypto-symbol {
    font-size: 15.4px; /* 11px * 1.4 */
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.crypto-price {
    font-size: 18.2px; /* 13px * 1.4 */
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.175rem;
    font-variant-numeric: tabular-nums;
}

.crypto-change {
    font-size: 16.8px; /* 12px * 1.4 */
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.crypto-change.positive {
    color: var(--green);
}

.crypto-change.negative {
    color: var(--red);
}

/* ============================================
   SECTION HEADERS - SCALED
   ============================================ */

.market-section .section-header,
.section-header {
    margin-bottom: 1.5rem;
}

.market-section .section-title,
.section-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 28px; /* 20px * 1.4 */
    font-weight: 700;
    color: var(--text-white);
}

.market-section .section-icon,
.section-icon {
    font-size: 30.8px; /* 22px * 1.4 */
}

/* Sub-headers for gainers/losers */
h3.movers-subtitle {
    font-size: 22.4px; /* 16px * 1.4 */
    font-weight: 700;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

/* Economic data labels */
.economic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Wider */
    gap: 1.4rem; /* scaled */
}

.economic-item {
    padding: 1.4rem; /* scaled */
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

.economic-item:hover {
    border-color: var(--border-secondary);
}

.economic-label {
    font-size: 15.4px; /* 11px * 1.4 */
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.7rem;
}

.economic-value {
    font-size: 28px; /* 20px * 1.4 */
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.35rem;
    font-variant-numeric: tabular-nums;
}

.economic-change {
    font-size: 16.8px; /* 12px * 1.4 */
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.economic-change.positive {
    color: var(--green);
}

.economic-change.negative {
    color: var(--red);
}

/* ============================================
   WATCHLIST PANEL - SCALED
   ============================================ */

.watchlist-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-primary);
    color: white;
    font-size: 14px; /* 10px * 1.4 */
    font-weight: 700;
    padding: 2px 7px; /* scaled */
    border-radius: 10px;
    min-width: 25px;
    text-align: center;
}

.watchlist-panel {
    position: fixed;
    top: 70px;
    right: 1.5rem;
    width: 400px; /* 350px * 1.14 */
    max-height: 500px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2500;
    display: none;
}

.watchlist-panel.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.watchlist-header {
    padding: 1.4rem; /* scaled */
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
}

.watchlist-header h3 {
    font-size: 19.6px; /* 14px * 1.4 */
    font-weight: 600;
    color: var(--text-white);
}

.watchlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.225rem 1.4rem; /* scaled */
    border-bottom: 1px solid var(--border-primary);
    transition: background 0.15s;
    font-size: 18.2px; /* scaled */
}

.watchlist-item:hover {
    background: var(--bg-tertiary);
}

/* ============================================
   TOAST NOTIFICATIONS - SCALED
   ============================================ */

.toast-container {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    padding: 1.4rem 2.1rem; /* scaled */
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 350px;
    animation: slide-in 0.3s ease-out;
    color: var(--text-primary);
    font-size: 18.2px; /* 13px * 1.4 */
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    body {
        font-size: 16.8px; /* 12px * 1.4 */
    }
    
    .compact-market-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
    
    .nav-links {
        display: none;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

::selection {
    background: var(--accent-primary);
    color: white;
}

/* ============================================
   RESPONSIVE UPDATES
   ============================================ */

@media (max-width: 768px) {
    .details-panel {
        width: 100%;
    }
    
    .watchlist-panel {
        width: calc(100% - 3rem);
        right: 1.5rem;
    }
    
    .details-stats {
        grid-template-columns: 1fr;
    }
}