/* DARK MODE OVERRIDES */
body.dark-mode .stat-card {
    background: var(--bg-card, #1e293b) !important;
    color: var(--text-primary, #e2e8f0) !important;
    border-color: #1e293b !important;
}
body.dark-mode .stat-card-value {
    color: #e2e8f0 !important;
}
body.dark-mode .stat-card-title {
    color: #94a3b8 !important;
}
body.dark-mode .stat-card-icon {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}
/* ============================================================================
   Dashboard Specific Styles
   ============================================================================ */

/* ============================================================================
   DASHBOARD LAYOUT
   ============================================================================ */

.dashboard-container {
    padding: 2rem 0;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-white) !important;
}

.dashboard-header p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dashboard-header i {
    color: var(--text-white) !important;
}

.dashboard-header .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

/* ============================================================================
   STATISTICS CARDS
   ============================================================================ */

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-dark);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.stat-card-icon.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.stat-card-icon.success {
    background: var(--success-bg);
    color: var(--success-color);
}

.stat-card-icon.warning {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.stat-card-icon.danger {
    background: var(--danger-bg);
    color: var(--danger-color);
}

.stat-card-icon.neutral {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.stat-card-title {
    font-size: 0.813rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.stat-card-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1;
    direction: ltr;
    unicode-bidi: bidi-override;
    word-break: keep-all;
    white-space: nowrap;
}

.stat-card-change {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.stat-card-change.positive {
    color: var(--success-color);
}

.stat-card-change.negative {
    color: var(--danger-color);
}

.stat-card-change.neutral {
    color: var(--text-secondary);
}

/* ============================================================================
   PORTFOLIO SUMMARY
   ============================================================================ */

.portfolio-summary {
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.portfolio-summary-header h3 {
    color: var(--text-white);
    margin: 0;
    font-weight: 700;
}

.portfolio-value {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-value-label {
    font-size: 0.875rem;
    opacity: 0.95;
    margin-bottom: var(--spacing-sm);
    color: var(--text-white);
}

.portfolio-value-amount {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-white);
}

.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-xl);
}

.portfolio-stat {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.portfolio-stat-label {
    font-size: 0.875rem;
    opacity: 0.95;
    margin-bottom: var(--spacing-xs);
    color: var(--text-white);
}

.portfolio-stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-white);
}

/* ============================================================================
   STOCK LIST
   ============================================================================ */

.stock-list-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.stock-list-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

.stock-list-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stock-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.stock-details h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stock-details p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stock-price-info {
    text-align: left;
}

.stock-current-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stock-price-change {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================================================
   WATCHLIST
   ============================================================================ */

.watchlist-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
}

.watchlist-header {
    background: linear-gradient(135deg, var(--info-color), var(--primary-color));
    color: white;
    padding: 1.25rem 1.5rem;
}

.watchlist-header h5 {
    margin: 0;
    color: white;
}

.watchlist-body {
    max-height: 400px;
    overflow-y: auto;
}

.watchlist-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 80px;
}

.watchlist-item:last-child {
    border-bottom: none;
}

.watchlist-item:hover {
    background-color: var(--bg-light);
    transform: translateX(-4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.watchlist-stock-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    color: var(--text-dark);
}

.watchlist-stock-symbol {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.watchlist-price {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    direction: ltr;
}
    min-width: 120px;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.watchlist-empty {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

/* ============================================================================
   ALERTS SECTION
   ============================================================================ */

.alert-item {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-right: 4px solid var(--warning-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 85px;
}

.alert-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(-4px);
}

.alert-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-icon.warning {
    background: rgba(255, 193, 7, 0.15);
    color: var(--warning-color);
}

.alert-icon.success {
    background: rgba(25, 135, 84, 0.15);
    color: var(--success-color);
}

.alert-icon.danger {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.375rem;
    font-size: 1rem;
    color: var(--text-dark);
}

.alert-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.alert-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================================
   MARKET OVERVIEW
   ============================================================================ */

.market-overview-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
}

.market-index {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.market-index:last-child {
    border-bottom: none;
}

.market-index-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.market-index-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.market-index-value {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    direction: ltr;
    unicode-bidi: isolate;
}

.market-index-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Ensure SAR currency icon displays LEFT of numbers globally */
img[alt="SAR"],
.sar-currency img,
.input-icon.sar-currency img {
    direction: ltr;
    unicode-bidi: isolate;
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* ============================================================================
   CHARTS CONTAINER
   ============================================================================ */

.chart-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

.chart-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.chart-tabs {
    display: flex;
    gap: var(--spacing-sm);
}

.chart-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    background: transparent;
    border: 2px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.chart-tab:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chart-tab.active {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-primary);
}

.chart-body {
    min-height: 300px;
}

/* ============================================================================
   QUICK ACTIONS
   ============================================================================ */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.quick-action-btn {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.quick-action-btn:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: all var(--transition-fast);
}

.quick-action-btn:hover .quick-action-icon {
    background: var(--primary-color);
    color: var(--text-white);
    transform: scale(1.1);
}

.quick-action-label {
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================================================
   RECENT ACTIVITY
   ============================================================================ */

.activity-timeline {
    position: relative;
    padding-right: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    right: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.activity-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.activity-item:last-child {
    padding-bottom: 0;
}

.activity-dot {
    position: absolute;
    right: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-color);
    z-index: 1;
}

.activity-dot.success {
    border-color: var(--success-color);
}

.activity-dot.warning {
    border-color: var(--warning-color);
}

.activity-dot.danger {
    border-color: var(--danger-color);
}

.activity-content {
    padding-right: 2.5rem;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================================================
   PORTFOLIO ALLOCATION CHART
   ============================================================================ */

.allocation-chart-legend {
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.legend-item:last-child {
    border-bottom: none;
}

.legend-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-name {
    font-weight: 600;
}

.legend-value {
    font-weight: 600;
    color: var(--text-primary);
}

.legend-percentage {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

/* ============================================================================
   TOP PERFORMERS
   ============================================================================ */

.performer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.performer-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.performer-rank {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-left: 1rem;
}

.performer-info {
    flex: 1;
}

.performer-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.performer-symbol {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.performer-change {
    text-align: left;
}

.performer-percentage {
    font-size: 1.125rem;
    font-weight: 700;
}

/* ============================================================================
   NEWS FEED
   ============================================================================ */

.news-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-header {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.news-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-source-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.news-source-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.news-time {
    margin-right: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.news-sentiment {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-sentiment.positive {
    background: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.news-sentiment.negative {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.news-sentiment.neutral {
    background: rgba(108, 117, 125, 0.1);
    color: var(--secondary-color);
}

.news-body {
    padding: 1.5rem;
}

.news-title {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-footer {
    display: flex;
    gap: 1rem;
}

.news-tag {
    padding: 0.375rem 0.75rem;
    background: var(--bg-light);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================================================
   PERFORMANCE METRICS
   ============================================================================ */

.metric-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.metric-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-trend {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.metric-trend-value {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================================================
   SEARCH BAR
   ============================================================================ */

.dashboard-search {
    position: relative;
    margin-bottom: 2rem;
}

.dashboard-search input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border-radius: 2rem;
    border: 2px solid var(--border-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dashboard-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
    outline: none;
}

.dashboard-search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
}

/* ============================================================================
   FILTER TABS
   ============================================================================ */

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    background: white;
    border: 2px solid var(--border-light);
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================================================
   LOADING SKELETON
   ============================================================================ */

.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-light) 25%, 
        #e9ecef 50%, 
        var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-card {
    height: 200px;
    border-radius: 1rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 992px) {
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    .portfolio-value-amount {
        font-size: 2rem;
    }
    
    .portfolio-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem 0;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .portfolio-summary {
        padding: 1.5rem;
    }
    
    .portfolio-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stock-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stock-price-info {
        width: 100%;
        text-align: right;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .chart-tabs {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-tabs {
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 576px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .news-header {
        flex-wrap: wrap;
    }
    
    .news-footer {
        flex-wrap: wrap;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   DARK MODE SUPPORT (Optional)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .dashboard-search,
    .filter-tabs,
    .quick-actions,
    .chart-tabs {
        display: none !important;
    }
}

/* LTR Display for Currency Values in Holdings */
.list-group-item .fw-bold {
    direction: ltr;
    unicode-bidi: bidi-override;
    display: inline-block;
    word-break: keep-all;
    white-space: nowrap;
}

.list-group-item .text-end {
    direction: ltr;
    unicode-bidi: bidi-override;
    text-align: left !important;
}
    
    .stat-card,
    .chart-container,
    .portfolio-summary {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .portfolio-summary {
        background: white !important;
        color: black !important;
        border: 2px solid var(--border-color);
    }
}