:root {
    --color-primary-bg: #1e222d;
    --color-secondary-bg: #2a2e39;
    --color-tertiary-bg: #363a45;
    --color-accent-green: #0ecb81;
    --color-accent-red: #f6465d;
    --color-accent-gold: #f0b90b;
    --color-accent-blue: #3b82f6;
    --color-text-primary: #ffffff;
    --color-text-secondary: #8a8f9d;
    --color-border: #3a3f4b;
    --color-input-bg: rgba(255, 255, 255, 0.05);
    --shadow-modal: 0 4px 20px rgba(0, 0, 0, 0.2);
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-primary-bg);
    color: white;
    height: var(--vh);
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /*line-height: 1.6;*/
    overflow: hidden;
    font-size: smaller;
}

.price-display {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #f0f0f0;
}

.atr-container {
    margin-left: auto;
    margin-right: 15px;
}

.chart-placeholder {
    height: 200px;
    background-color: var(--color-border);
    margin-bottom: 15px;
    border-radius: 4px;
    position: relative;
}

.time-markers {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.order-form {
    display: none;
    background-color: var(--color-border);
    padding: 15px;
    border-radius: 8px;
    margin-top: 2px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center;
}

@media (max-width: 768px) {
  #buyOrderForm .form-row,
  #sellOrderForm .form-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
}

.form-label {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.form-input {
    background-color: var(--color-secondary-bg);
    border: 1px solid #4a4f5b;
    color: white;
    padding: 8px;
    border-radius: 4px;
    width: 100px;
    text-align: right;
}

.direction-buttons {
    display: flex;
    margin-bottom: 15px;
}

.buy-btn,
.sell-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.buy-btn {
    background-color: var(--color-accent-green);
    color: white;
    margin-right: 5px;
}

.orderType-btn {
    background-color: #3540e3;
    color: white;
    margin-left: 5px;
}

.sell-btn {
    background-color: var(--color-accent-red);
    color: white;
    margin-left: 5px;
}

.buy-btn:hover {
    background-color: #0dbd77;
}

.sell-btn:hover {
    background-color: #e53c54;
}

.tp-sl-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--color-text-secondary);
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-left: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4a4f5b;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--color-accent-green);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--color-accent-red);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #e53c54;
}


/* Interval Selector Styles */
.interval-selector select {
    background-color: #2a3042;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
}

.interval-selector select:focus {
    outline: none;
}

/* Candlestick chart specific styles */
.price-chart-container {
    position: relative;
    /*height: 300px;
    margin-bottom: 15px;*/
}

/* Tooltip styling */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    color: white;
    padding: 8px;
    pointer-events: none;
}

.header {
    /*justify-content: space-between;*/
    align-items: center;
    margin-bottom: 0px;
}

.pair-selector {
    font-weight: bold;
    font-size: 18px;
}

.timeframe {
    background-color: #2a3042;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
}



#chart {
    width: 100% !important;
}

.chart-container {
    flex: 1 1 auto;
    position: relative;
}

.time-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}

.promo-banner {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: bold;
}

.price-info {
    margin-bottom: 2px;
}

.current-price {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.price {
    font-size: 24px;
    font-weight: bold;
    margin-right: 10px;
}

.change {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 5px;
}

.change.positive {
    background-color: #10b981;
    color: white;
}

.change.negative {
    background-color: #ef4444;
    color: white;
}

.price-range {
    display: flex;
    font-size: 14px;
}

.low {
    color: #ef4444;
    margin-right: 15px;
}

.high {
    color: #10b981;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.button {
    flex: 1;
    padding: 5px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.sell-btn {
    background-color: #ef4444;
    color: white;
}

.advice-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
}

.ai-advice-overlay {
    position: fixed;
    top: 84px;
    right: 30%;
    left: 30%;
    /*width: 350px;*/
    max-width: calc(100vw - 32px);
    max-height: 70vh;
    background: rgba(20, 24, 33, 0.97);
    border: 1px solid #2a4a7f;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 5000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.ai-advice-overlay[style*="display: block"] {
    display: flex !important;
}

.ai-advice-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-advice-panel-header {
    padding: 11px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2a4a7f;
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4a7f 100%);
    color: #e2e8f0;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.ai-advice-panel-close {
    cursor: pointer;
    font-size: 18px;
    color: #94a3b8;
    padding: 4px;
}

.ai-advice-panel-close:hover {
    color: #e2e8f0;
}

.ai-advice-content {
    padding: 16px;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.6;
    overflow-y: auto;
    max-height: 60vh;
    flex: 1;
}

.orderTypeBtn {
    background-color: #2a3042;
    color: white;
}

.buy-btn {
    background-color: #10b981;
    color: white;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    background-color: var(--color-secondary-bg);
    border-top: 1px solid var(--color-border);
    width: 100%;
    height: 9vh;
    max-height: 50px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item {
    flex: 1;
    text-align: center;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.nav-item.active {
    color: var(--color-accent-green);
    border-top: 2px solid var(--color-accent-green);
}

.nav-item i {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item-more {
    position: relative;
}

.nav-overflow-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--color-secondary-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    min-width: 160px;
    z-index: 1001;
    overflow: hidden;
}

.nav-overflow-menu.show {
    display: block;
}

.overflow-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.overflow-item:hover {
    background: var(--color-tertiary-bg);
    color: var(--color-text-primary);
}

.overflow-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.tabs-sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--color-secondary-bg);
}

.position-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}

.position-tab {
    padding: 12px 0;
    flex: 1;
    text-align: center;
    color: var(--color-text-secondary);
}

.position-tab.active {
    color: white;
    border-bottom: 2px solid var(--color-accent-green);
}




.position-item {
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    margin-bottom: 10px;
    /* Add spacing between items */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;

}

/* Flexbox layout for content inside each position item */
.position-content {
    display: flex;
    justify-content: space-between;
    /* Space between details and actions */
    align-items: flex-start;
    /* Align items at the top */
    flex-wrap: wrap;
    /* Allow wrapping if necessary */
}

/* Details section (left side) */
.position-details {
    flex: 1;
    /* Take up available space */
    min-width: 0;
    /* Prevent overflow */
    margin-right: 10px;
    /* Add spacing between details and actions */
    word-wrap: break-word;
    /* Allow wrapping of long text */
}

.instrument {
    font-weight: bold;
    margin-bottom: 5px;
}

.position-meta {
    display: block;
    /* Allow wrapping to the next line */
    font-size: 0.9em;
    /* Slightly smaller font for meta details */
    color: #666;
}

/* Actions section (right side) */
.position-actions {
    flex-shrink: 0;
    /* Prevent shrinking of the close button */
}

/* Direction indicator styling */
.direction-indicator {
    font-weight: bold;
    margin-right: 5px;
}

.direction-indicator.bullish {
    color: green;
}
.direction-indicator.bearish {
    color: red;
}






.neutral {
    color: var(--color-text-secondary);
}

.profit {
    color: var(--color-accent-green);
}

.loss {
    color: var(--color-accent-red);
}





/* Button styling */
.btn {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-close {
    background-color: #ff4d4d;
    color: white;
    font-size: 0.9em;
    /* Reduce font size */
    padding: 5px 8px;
    /* Reduce padding */
    width: auto;
    /* Ensure the button width is minimal */
}

.btn-close:hover {
    background-color: #e60000;
}

.btn-edit {
    background-color: var(--color-border);
    color: white;
}

.market-container,
.trades-container,
.journal-container,
.wallet-container,
.news-container,
.walloffame-container,
.account-container,
.admin-container {
    align-self: center;
    display: none;
    width: 95%;
    background-color: var(--color-secondary-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    height: auto;
}

.market-container,
.trades-container,
.journal-container,
.news-container,
.wallet-container,
.walloffame-container,
.account-container,
.admin-container {
    /*height: var(--vh);*/
    max-height: calc(109vh - 9vh - 50px);
    overflow-y: auto;
    width: 99%;
}

.news-header,
.account-header,
.wallet-header,
.trades-header,
.walloffame-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--color-secondary-bg);
    text-align: center;
    margin-bottom: 24px;
}

.wallet2-container,
.account,
.walloffame {
    height: auto;
}

.wallet-balance {
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.wallet-label {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.wallet-details {
    background-color: var(--color-secondary-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.balances-grid {
    background-color: var(--color-secondary-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.wallet-tabs {
    gap: 0;
    background: #252a36;
    border-bottom: 1px solid var(--color-border);
    padding: 0 8px;
}

.wallet-tabs .position-tab {
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 14px 16px;
    flex: 0 1 auto;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.wallet-tabs .position-tab:hover {
    color: #d0d4e0;
    background: rgba(255, 255, 255, 0.03);
}

.wallet-tabs .position-tab.active {
    color: var(--color-accent-green);
    border-bottom-color: var(--color-accent-green);
    background: rgba(14, 203, 129, 0.06);
    font-weight: 600;
}

.wallet-tab-content {
    padding: 24px 4px;
    animation: walletFadeIn 0.3s ease;
}

@keyframes walletFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wallet-tab-pane {
    display: none;
}

.wallet-tab-pane.active {
    display: block;
}

.performance-section {
    background-color: var(--color-secondary-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.performance-section h2 {
    margin-bottom: 15px;
    color: #ffffff;
}

.alpha-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.metric-card {
    padding: 12px;
    background: var(--color-primary-bg);
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.metric-card-blue { border-left-color: #3b82f6; }
.metric-card-green { border-left-color: var(--color-accent-green); }
.metric-card-gray { border-left-color: #6b7280; }
.metric-card-gold { border-left-color: #f0b90b; }

.metric-label {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

.metric-value {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
}

.metric-period {
    font-size: 11px;
    color: #6b7280;
}

.performance-analysis {
    padding: 12px;
    background: var(--color-primary-bg);
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.period-selector {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.period-selector label {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.period-selector select {
    padding: 5px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-primary-bg);
    color: #ffffff;
}

.period-selector select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.period-selector button {
    padding: 5px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.period-selector button:hover {
    background: #2563eb;
}

.usdc-balance-info {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--color-primary-bg);
    border-radius: 6px;
}

.usdc-balance-info strong {
    color: var(--color-text-secondary);
}

.usdc-balance-info span {
    color: var(--color-accent-green);
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: 8px;
}

.usdc-deposit-form,
.usdc-withdraw-form {
    margin-top: 20px;
    padding: 15px;
    background: var(--color-primary-bg);
    border-radius: 6px;
}

.usdc-deposit-form h3,
.usdc-withdraw-form h3 {
    color: #ddd;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1rem;
}

.swap-info {
    margin-bottom: 15px;
}

.swap-info p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.swap-preview #swapPreview {
    margin: 10px 0;
    padding: 10px;
    background: var(--color-primary-bg);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #ddd;
}

.token-swap-form {
    margin-top: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--color-text-secondary);
}

.detail-value {
    font-weight: bold;
}



.operations {
    text-align: center;
}

.bonus-btn {
    background-color: var(--color-accent-green);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}



.no-positions {
    padding: 20px;
    text-align: center;
    color: var(--color-text-secondary);
}



.refresh-btn {
    background: var(--color-secondary-bg);
    border: none;
    color: var(--color-text-secondary);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.refresh-btn:hover {
    color: var(--color-accent-green);
}

.refresh-icon {
    transition: transform 0.3s;
}

.refresh-btn:hover .refresh-icon {
    transform: rotate(180deg);
}

.loading-indicator {
    color: var(--color-text-secondary);
    font-size: 14px;
}

#trades-container {
    min-height: 300px;
    position: relative;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.refreshing .refresh-icon {
    animation: spin 0.1s linear infinite;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--color-secondary-bg) 25%, var(--color-tertiary-bg) 50%, var(--color-secondary-bg) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
}

.skeleton-line.wide { width: 80%; }
.skeleton-line.medium { width: 60%; }
.skeleton-line.narrow { width: 40%; }
.skeleton-line.short { width: 25%; height: 10px; }

.skeleton-card {
    background: var(--color-secondary-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 10px;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.skeleton-row .skeleton-text {
    flex: 1;
}

.spinner-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: var(--color-text-secondary);
    font-size: 14px;
    gap: 10px;
}

.spinner-overlay::before {
    content: '';
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--color-border);
    border-top-color: var(--color-accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

/* Add to your existing CSS */


.position-meta span {
    display: inline-block;
    margin-right: 10px;
}

.current-price-value {
    font-weight: bold;
    transition: color 0.3s ease;
}

.price-up {
    color: var(--color-accent-green);
    animation: pulseGreen 0.5s;
}

.price-down {
    color: var(--color-accent-red);
    animation: pulseRed 0.5s;
}

@keyframes pulseGreen {
    0% {
        color: var(--color-accent-green);
    }

    50% {
        color: #ffffff;
    }

    100% {
        color: var(--color-accent-green);
    }
}

@keyframes pulseRed {
    0% {
        color: var(--color-accent-red);
    }

    50% {
        color: #ffffff;
    }

    100% {
        color: var(--color-accent-red);
    }
}

.notification-banner {
    position: fixed;
    top: 9vh !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: 75em !important;
    /*max-width: 380px;*/
    height: 40px;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    overflow: hidden;
    display: none;
    align-items: center;
    transition: opacity 0.3s ease;
}

.notification-banner.show {
    display: flex;
    opacity: 1;
    
}

.notification-banner:not(.show) {
    opacity: 0;
}

.notification-scroll-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.notification-message {
    display: inline-block;
    padding-left: 100%;
    animation: scrollText 15s linear infinite;
    font-size: 14px;
    line-height: 1.4;
}

/* Pause animation on hover */
.notification-banner:hover .notification-message {
    animation-play-state: paused;
}

/* Color classes */
.notification-banner-success {
    background-color: #0f5132;
    border-color: var(--color-accent-green);
}

.notification-banner-error {
    background-color: #842029;
    border-color: var(--color-accent-red);
    color: #FFF;
}

.notification-banner-warning {
    background-color: #664d03;
    border-color: #f0b90b;
    color: #FFF;
}

.notification-banner-info {
    background-color: #055160;
    border-color: #2e5bff;
}

/* Scrolling animation */
@keyframes scrollText {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* For very long messages, adjust animation duration */
.notification-message[data-length="long"] {
    animation-duration: 25s;
}

.notification-message[data-length="very-long"] {
    animation-duration: 35s;
}

.error-message {
    color: var(--color-accent-red);
    font-size: 14px;
    margin-top: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}






.wallet-balance {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}



.detail-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.detail-label {
    font-weight: bold;
}



.profit {
    color: var(--color-accent-green);
}

.loss {
    color: var(--color-accent-red);
}


.balances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.balance-card {
    background-color: var(--color-secondary-bg);
    padding: 15px;
    border-radius: 8px;
}

.balance-currency {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.balance-amount {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.balance-value {
    color: #666;
    margin-bottom: 10px;
}

.balance-details {
    font-size: 0.9rem;

    display: flex;
    justify-content: space-between;
}

.reset-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    margin-top: 20px;
}


.account-section {
    background-color: var(--color-secondary-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.account-tabs {
    gap: 0;
    background: #252a36;
    border-bottom: 1px solid var(--color-border);
    padding: 0 8px;
}

.account-tabs .position-tab {
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 14px 16px;
    flex: 0 1 auto;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.account-tabs .position-tab:hover {
    color: #d0d4e0;
    background: rgba(255, 255, 255, 0.03);
}

.account-tabs .position-tab.active {
    color: var(--color-accent-green);
    border-bottom-color: var(--color-accent-green);
    background: rgba(14, 203, 129, 0.06);
    font-weight: 600;
}

.account-tab-content {
    padding: 24px 4px;
    animation: accountFadeIn 0.3s ease;
}

@keyframes accountFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.account-tab-pane {
    display: none;
}

.account-tab-pane.active {
    display: block;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    padding: 10px 15px;
    background-color: #2e5bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-danger {
    background-color: var(--color-accent-red);
}

.account-info {
    margin-bottom: 15px;
}

.account-info strong {
    display: inline-block;
    width: 150px;
}

.input-with-toggle {
    position: relative;
}

.input-with-toggle input {
    padding-right: 40px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
}

.account-mode-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}


.mode-option {
    padding: 20px;
    border-radius: 8px;

    background: var(--color-secondary-bg);
    border: 2px solid #ddd;
}

.mode-option.active {
    border-color: var(--color-accent-green);
    background: var(--color-secondary-bg);
}

.mode-option h3 {
    margin-top: 0;
    color: #ddd;
}

.live-status {
    color: var(--color-accent-green);
    font-weight: bold;
}

.pre {
    white-space: pre-wrap;
    /* Since CSS 2.1 */
    white-space: -moz-pre-wrap;
    /* Mozilla, since 1999 */
    white-space: -pre-wrap;
    /* Opera 4-6 */
    white-space: -o-pre-wrap;
    /* Opera 7 */
    word-wrap: break-word;
    /* Internet Explorer 5.5+ */
}

h1 {
    color: rgb(9, 127, 245)
}

h2 {
    color: rgb(115, 170, 224) !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 0em !important;
    margin-bottom: 0em !important;
}

p {
    margin: 1em 0;
}

ul {
    padding-left: 20px;
    margin: 1em 0;
}

li {
    margin-bottom: 0.5em;
}

strong {
    color: rgb(4, 189, 250)
}

.timestamp {
    color: #777;
    font-size: 0.9em;
    margin-bottom: 1.5em;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    background-color: var(--color-accent-red);
    /* Red color for logout */
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.logout-button:hover {
    background-color: #d63031;
    /* Darker red on hover */
}

.logout-button:active {
    transform: scale(0.95);
    /* Slightly shrink the button on click */
}

.logout-button::before {
    content: '🚪';
    /* UTF-8 logout icon */
    margin-right: 8px;
    font-size: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #34495e !important;
    color: #ffffff;
}

tr:nth-child(even) {
    background-color: #3b3f4a;
}

tr:nth-child(odd) {
    background-color: #2e323d;
}

.positive {
    color: var(--color-accent-green);
}

.negative {
    color: var(--color-accent-red);
}

.current-price-divider {
    border-top: 2px solid var(--color-accent-green);
    margin: 16px 0;
    text-align: center;
    color: var(--color-accent-green);
    font-weight: bold;
    padding: 8px 0;
    background: #f8f8f8;
}

.trades-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0px;
    position: relative;
}

.trades-header h2 {
    
    font-size: 1.5rem;
    font-weight: bold;
    flex: 1;
    text-align: center;
}

.trades-header .header-actions {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Support/Resistance Controls */
.sr-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    gap: 5px;
}

.sr-controls button {
    background: rgba(30, 144, 255, 0.8) !important;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sr-controls button:hover {
    background: rgba(30, 144, 255, 1) !important;
}

/* Chart tooltip enhancements for S/R lines */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 4px;
    color: white;
    padding: 8px;
    pointer-events: none;
    font-size: 12px;
}

/* Support/Resistance level labels */
.sr-level-label {
    position: absolute;
    background: rgba(30, 144, 255, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    pointer-events: none;
    z-index: 50;
}

/* Compact Interval Selector */
.compact-interval-selector {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.interval-display {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    cursor: pointer;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    min-width: 60px;
    transition: all 0.2s ease;
}

.interval-display:hover {
    background-color: #4a5568;
    border-color: #718096;
}

.current-interval {
    flex: 1;
}

.dropdown-arrow {
    font-size: 10px;
    color: #a0aec0;
    transition: transform 0.2s ease;
}

.interval-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1001;
    max-height: 200px;
    overflow-y: auto;
}

.interval-dropdown.show {
    display: block;
}

.interval-option {
    padding: 8px 12px;
    cursor: pointer;
    color: #e2e8f0;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #4a5568;
}

.interval-option:last-child {
    border-bottom: none;
}

.interval-option:hover {
    background-color: #4299e1;
    color: white;
}

.interval-option.active {
    background-color: #4299e1;
    color: white;
    font-weight: 600;
}

/* Compact Interval Button Styles */
.compact-interval-selector {
    display: contents;
    gap: 3px;
    align-items: center;
    flex-wrap: wrap;
}

.interval-btn {
    padding: 4px 8px;
    border: 1px solid #4a5568;
    border-radius: 4px;
    background-color: #2d3748;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
    line-height: 1.2;
}

.interval-btn:hover {
    background-color: #4a5568;
    border-color: #718096;
    transform: translateY(-1px);
}

.interval-btn.active {
    background-color: #4299e1;
    border-color: #4299e1;
    color: white;
    font-weight: 600;
}

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

.market-container {
    display: block;
}

/* Mobile optimizations */
@media (max-width: 768px) {

    .bottom-nav {
        height: 8vh !important; /* Consistent height */
        max-height: 45px !important;
    }
    
    .nav-item {
        padding: 3px 0; /* Adjust padding for fixed position */
    }

    .compact-interval-selector {
        gap: 2px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        flex: 1 1 auto;
        min-width: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .compact-interval-selector::-webkit-scrollbar {
        display: none;
    }

    .interval-btn {
        font-size: 10px;
        min-width: 28px;
        flex: 0 0 auto;
    }

}

/* Desktop optimizations */
@media (min-width: 769px) {
    .compact-interval-selector {
        gap: 4px;
    }

    .interval-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 36px;
    }
}

/* Compact alarm section */
.compact-alarm-section {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 20px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
}

.icon-btn:hover {
    background-color: #4a5568;
    border-color: #718096;
}

.alarm-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
}

.alarm-btn:hover {
    background-color: #4a5568;
    border-color: #718096;
    color: #fff;
}

.alarm-btn svg {
    flex-shrink: 0;
}

.alarm-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e53e3e;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e53e3e;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offset-badge {
    font-size: 11px;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: 500;
}

/* Alarms and Forex panels */
.alarms-panel,
.forex-alerts-panel {
    position: absolute;
    top: 62px;
    right: 15px;
    width: 320px;
    max-height: 420px;
    border: 1px solid #4a5568;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--color-primary-bg);
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.alarms-panel-header,
.forex-alerts-panel-header {
    cursor: pointer;
    font-weight: 600;
    padding: 12px 16px;
    background-color: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e2e8f0;
    border-bottom: 1px solid #4a5568;
}

.alarms-panel-close,
.forex-alerts-panel-close {
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
    line-height: 1;
}

.alarms-panel-close:hover,
.forex-alerts-panel-close:hover {
    color: var(--color-accent-red);
}

.active-alarms-list,
.forex-alerts-container {
    padding: 12px;
    /*max-height: 360px;*/
    overflow-y: auto;
}

/* Alarm cards */
.alarm-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background-color: var(--color-secondary-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.alarm-card:hover {
    border-color: #4a5568;
}

.alarm-card-direction {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    flex-shrink: 0;
}

.direction-up {
    background: rgba(14, 203, 129, 0.15);
    color: var(--color-accent-green);
}

.direction-down {
    background: rgba(246, 70, 93, 0.15);
    color: var(--color-accent-red);
}

.alarm-card-info {
    flex: 1;
    min-width: 0;
}

.alarm-card-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
}

.alarm-card-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.alarm-card-cancel {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.alarm-card-cancel:hover {
    background: rgba(246, 70, 93, 0.15);
    color: var(--color-accent-red);
}

.alarm-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #6b7280;
    font-style: italic;
    font-size: 0.85rem;
}

/* Alarm Modal */
.alarm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.alarm-modal-content {
    background: var(--color-secondary-bg);
    border: 1px solid #4a5568;
    border-radius: 12px;
    width: 360px;
    max-width: 90vw;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    animation: alarmModalIn 0.2s ease;
}

@keyframes alarmModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.alarm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
    font-size: 1rem;
    color: #e2e8f0;
}

.alarm-modal-close {
    cursor: pointer;
    font-size: 1.3rem;
    color: #6b7280;
    transition: color 0.2s;
    line-height: 1;
}

.alarm-modal-close:hover {
    color: var(--color-accent-red);
}

.alarm-modal-body {
    padding: 20px;
}

.alarm-modal-price {
    font-size: 0.95rem;
    color: #a0aec0;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--color-primary-bg);
    border-radius: 8px;
    text-align: center;
}

.alarm-modal-price strong {
    color: #e2e8f0;
    font-size: 1.1rem;
}

.alarm-modal-direction {
    margin-bottom: 16px;
}

.alarm-modal-direction label {
    display: block;
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 8px;
}

.direction-toggle {
    display: flex;
    gap: 8px;
}

.direction-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-primary-bg);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    font-weight: 500;
}

.direction-option:hover {
    border-color: #4a5568;
    color: #e2e8f0;
}

.direction-option.active[data-direction="up"] {
    border-color: var(--color-accent-green);
    background: rgba(14, 203, 129, 0.1);
    color: var(--color-accent-green);
}

.direction-option.active[data-direction="down"] {
    border-color: var(--color-accent-red);
    background: rgba(246, 70, 93, 0.1);
    color: var(--color-accent-red);
}

.alarm-modal-info {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}

.alarm-modal-info strong {
    color: #a0aec0;
}

.alarm-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
}

.alarm-modal-footer .btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.alarm-modal-footer .btn-secondary {
    background: #2d3748;
    color: #a0aec0;
    border: 1px solid #4a5568;
}

.alarm-modal-footer .btn-secondary:hover {
    background: #4a5568;
    color: #e2e8f0;
}

.alarm-modal-footer .btn-primary {
    background: var(--color-accent-green);
    color: #fff;
}

.alarm-modal-footer .btn-primary:hover {
    background: #0dbd77;
}

/* Header top row */
.header-top-row {
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
}

/* Header improvements */
.header {
    display: flex;
    flex-wrap: wrap;
    /*gap: 15px;*/
    align-items: center;
    /*padding: 15px;*/
    background-color: #1a202c;
    border-bottom: 1px solid #4a5568;
    position: sticky;
    top: 0;
    z-index: 50;

    transition: all 0.3s ease;
    /*overflow: hidden;
        max-height: 200px;
        opacity: 1;
        visibility: visible;*/
}


/* Show toggle button only on mobile */
@media (max-width: 768px) {
    .header-top-row {
        flex-wrap: wrap;
        gap: 2px;
        padding-top: 2px;
        padding-bottom: 2px;
        padding-left: 8px;
        padding-right: 8px;
        
    }

    .header {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 0px;
        height: auto;
        padding: 0px;
    }

    .interval-selector .radio-group {
        justify-content: flex-start;
        gap: 3px;
    }

    .radio-label {
        font-size: 8px;
        float: left;
        text-align: center;
        padding: 5px;
    }

    .compact-alarm-section {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 20px;
        display: flex;
        justify-content: flex-start;
        gap: 6px;
    }

    /* Icon-only buttons on mobile so the whole bar fits */
    .compact-alarm-section .alarm-btn {
        flex: 1 1 0;
        min-width: 0;
        box-sizing: border-box;
        justify-content: center;
        padding: 8px 0;
        gap: 0;
        height: 3vh;
    }

    .compact-alarm-section .alarm-btn svg {
        width: 18px;
        height: 18px;
    }

    .compact-alarm-section .alarm-btn .btn-label {
        display: none;
    }

    .compact-alarm-section .alarm-btn .btn-icon {
        font-size: 1.1rem;
        line-height: 1;
    }

    .compact-alarm-section .alarm-btn .alarm-badge,
    .compact-alarm-section .alarm-btn .forex-alerts-badge,
    .compact-alarm-section .alarm-btn .whale-badge {
        position: absolute;
        top: -6px;
        right: -2px;
        margin-left: 0;
        padding: 1px 5px;
        font-size: 9px;
    }

    .alarms-panel {
        position: fixed;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        z-index: 1001;
    }
}

/* Fix panel overlap on mobile */
@media (max-width: 768px) {
    .forex-alerts-list {
        width: 100% !important;
        z-index: 1001 !important;
        max-height: 80vh !important;
    }
}

/* Pair selector improvements */
#pairSelect {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #4a5568;
    background-color: #2d3748;
    color: #e2e8f0;
    font-size: 8px;


}

#pairSelect:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

/* Alarm status */
.alarm-status {
    margin-left: 10px;
    font-size: 0.9em;
    color: #a0aec0;
}

/* Price info improvements */
.price-info {
    background-color: #2d3748;
    /*padding: 5px 5px;*/
    border-top: 1px solid #4a5568;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.current-price .price {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

.price-range {
    font-size: 14px;
    color: #a0aec0;
    margin-left: 8vh;
}

/* Action buttons improvements */
.action-buttons {
    background-color: #2d3748;
    padding: 5px;
    border-top: 1px solid #4a5568;
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.sell-btn,
.buy-btn,
.orderType-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    max-width: 140px;
    font-size: 15px;
}

.sell-btn {
    background-color: #f56565;
    color: white;
}

.sell-btn:hover {
    background-color: #e53e3e;
    transform: translateY(-1px);
}

.buy-btn {
    background-color: #48bb78;
    color: white;
}

.buy-btn:hover {
    background-color: #38a169;
    transform: translateY(-1px);
}

.orderType-btn {
    background-color: #4299e1;
    color: white;
}

.orderType-btn:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
}

.forex-alerts-list {
    position: relative;
    left: 0%;
    right: 0%;
    background: #1e2a3a;
    z-index: 20;
    overflow-y: auto;
    /*max-height: 380px;*/
}

.forex-alert-item {
    display: block;
    padding: 14px 16px;
    margin: 6px 8px;
    background: var(--color-secondary-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.forex-alert-item:hover {
    border-color: var(--color-accent-green);
    box-shadow: 0 2px 8px rgba(14, 203, 129, 0.15);
}

.forex-alert-item.unread {
    border-left: 3px solid #4299e1;
}

.forex-alert-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.forex-alert-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.forex-alert-unread-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: #4299e1;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.forex-alert-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.forex-alert-body {
    font-size: 0.8rem;
    color: #a0aec0;
    line-height: 1.4;
}

.forex-alert-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.forex-alert-link {
    color: #4299e1;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 0.2s;
}

.forex-alert-link:hover {
    color: #63b3ed;
    text-decoration: underline;
}

.forex-ask-ai-btn {
    background: #2d3748;
    color: #a0aec0;
    border: 1px solid #4a5568;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.forex-ask-ai-btn:hover {
    background: #4a5568;
    color: #e2e8f0;
    border-color: #63b3ed;
}

.forex-alert-empty {
    text-align: center;
    padding: 30px;
    color: #6b7280;
    font-style: italic;
}

/* CSS for the wallet */
/* GAGA Token Purchase Section Styles */
.token-purchase-form {
    background-color: var(--color-secondary-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
}

.token-purchase-form h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
}

.wallet-option {
    background-color: var(--color-secondary-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--color-border);
}

.wallet-option h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.current-wallet {
    background: linear-gradient(135deg, #2a2e39 0%, #3a3f4b 100%) !important;
    border: 1px solid #4a4f5b;
    padding: 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
}

.current-wallet strong {
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

#currentEthAddress {
    color: var(--color-accent-green);
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
    background-color: var(--color-primary-bg);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

/* Form Elements for Token Purchase */
.token-purchase-form .form-group {
    margin-bottom: 20px;
}

.token-purchase-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.token-purchase-form input,
.token-purchase-form select {
    width: 100%;
    padding: 12px;
    background-color: var(--color-primary-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.token-purchase-form input:focus,
.token-purchase-form select:focus {
    outline: none;
    border-color: var(--color-accent-green);
    box-shadow: 0 0 0 2px rgba(14, 203, 129, 0.2);
}

.token-purchase-form input::placeholder {
    color: #6b7280;
}

.token-purchase-form small {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

/* Price Calculation Box */
#priceCalculation {
    background: linear-gradient(135deg, #1e222d 0%, #2a2e39 100%) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 6px !important;
    padding: 15px !important;
    margin: 20px 0 !important;
}

#priceCalculation strong {
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

#priceDetails div {
    color: #fff;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

#priceDetails div:last-child {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
    font-weight: bold;
    color: var(--color-accent-green);
}

/* Buttons */
#connectMetaMask,
#connectWalletConnect,
#saveManualAddress,
#purchaseBtn {
    background: linear-gradient(135deg, #0ecb81 0%, #0dbd77 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

#connectMetaMask:hover,
#connectWalletConnect:hover,
#saveManualAddress:hover,
#purchaseBtn:hover {
    background: linear-gradient(135deg, #0dbd77 0%, #0ca56c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 203, 129, 0.3);
}

#connectMetaMask:active,
#connectWalletConnect:active,
#saveManualAddress:active,
#purchaseBtn:active {
    transform: translateY(0);
}

/* Manual Address Input Group */
.wallet-option .form-group {
    /*display: flex;*/
    gap: 10px;
    align-items: flex-end;
}

.wallet-option .form-group input {
    flex: 1;
    margin-bottom: 0;
}

.wallet-option .form-group button {
    width: auto;
    min-width: 120px;
    margin-bottom: 0;
}

/* Transaction History */
.transaction-history {
    background-color: var(--color-secondary-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.transaction-history h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
}

#transactionHistory {
    color: var(--color-text-secondary);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Token Balance Display */
#tokenBalance {
    color: var(--color-accent-green);
    font-weight: bold;
    font-size: 1.1rem;
    background-color: var(--color-primary-bg);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    display: inline-block;
    margin-left: 10px;
}

/* Wallet Connection States */
.wallet-connected {
    border-color: var(--color-accent-green) !important;
    background: linear-gradient(135deg, #2a2e39 0%, rgba(14, 203, 129, 0.1) 100%) !important;
}

.wallet-error {
    border-color: var(--color-accent-red) !important;
    background: linear-gradient(135deg, #2a2e39 0%, rgba(246, 70, 93, 0.1) 100%) !important;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* Success States */
.success-message {
    color: var(--color-accent-green);    background-color: rgba(14, 203, 129, 0.1);
    border: 1px solid var(--color-accent-green);
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

/* Error States */
.error-message {
    color: var(--color-accent-red);
    background-color: rgba(246, 70, 93, 0.1);
    border: 1px solid var(--color-accent-red);
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
    visibility: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wallet-option .form-group {
        flex-direction: column;
        gap: 10px;
    }

    .wallet-option .form-group button {
        width: 100%;
    }

    .token-purchase-form,
    .wallet-option,
    .current-wallet {
        padding: 15px;
    }

    #currentEthAddress {
        font-size: 0.8rem;
    }
}

/* MetaMask Button Specific Styles */
#connectMetaMask {
    background: linear-gradient(135deg, #f6851b 0%, #e2761b 100%);
}

#connectMetaMask:hover {
    background: linear-gradient(135deg, #e2761b 0%, #c86a17 100%);
    box-shadow: 0 4px 12px rgba(246, 133, 27, 0.3);
}

#connectWalletConnect {
    background: linear-gradient(135deg, #3b99fc 0%, #2e8bef 100%);
}

#connectWalletConnect:hover {
    background: linear-gradient(135deg, #2e8bef 0%, #1c7cd6 100%);
    box-shadow: 0 4px 12px rgba(59, 153, 252, 0.3);
}

/* Purchase Button States */
#purchaseBtn:disabled {
    background: #4a4f5b;
    color: var(--color-text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#purchaseBtn:disabled:hover {
    background: #4a4f5b;
    transform: none;
    box-shadow: none;
}

/* Token Icon Placeholder */
.token-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #0ecb81 0%, #0dbd77 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: bold;
    color: white;
    font-size: 12px;
}

/* Section Header Enhancement */
.account-section h2.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-section h2.section-title::before {
    content: '🪙';
    font-size: 1.2em;
}



/* Transaction History Items */
.transaction-item {
    background-color: var(--color-primary-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-amount {
    color: var(--color-accent-green);
    font-weight: bold;
    font-size: 1.1rem;
}

.transaction-date {
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.transaction-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-completed {
    background-color: rgba(14, 203, 129, 0.2);
    color: var(--color-accent-green);
}

.status-pending {
    background-color: rgba(240, 185, 11, 0.2);
    color: #f0b90b;
}

.status-failed {
    background-color: rgba(246, 70, 93, 0.2);
    color: var(--color-accent-red);
}

/* AI Analysis Styles */
.ai-analysis-container {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.ai-analysis-header h3 {
    margin: 0;
    color: var(--color-accent-green);
    font-size: 1.1rem;
    font-weight: 600;
}

.trading-pair-badge {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.analysis-section {
    margin-bottom: 15px;
    background: rgba(30, 34, 45, 0.5);
    border-radius: 6px;
    padding: 12px;
    border-left: 3px solid #3b82f6;
}

.analysis-section h4 {
    margin: 0 0 8px 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-content {
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.4;

}

.section-content ul {
    margin: 0;
    padding-left: 16px;
}

.section-content li {
    margin-bottom: 4px;
    color: #cbd5e0;
}

.risk-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 34, 45, 0.8);
    padding: 10px 12px;
    border-radius: 6px;
    margin: 15px 0;
    border: 1px solid var(--color-border);
}

.risk-label {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.risk-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-low {
    background: linear-gradient(135deg, #0ecb81, #10b981);
    color: white;
}

.risk-medium {
    background: linear-gradient(135deg, #f0b90b, #eab308);
    color: #1e222d;
}

.risk-high {
    background: linear-gradient(135deg, #f6465d, #ef4444);
    color: white;
}

.analysis-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.analysis-footer small {
    color: #6b7280;
    font-size: 0.75rem;
}

/* AI Loading State */
.forex-ai-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    font-size: 0.85rem;
    padding: 10px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    margin: 10px 0;
}

.forex-ai-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #3b82f6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Close button for AI results */
.forex-ai-close-btn {
    background: var(--color-border) !important;
    color: var(--color-text-secondary) !important;
    border: 1px solid #4a4f5b !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.forex-ai-close-btn:hover {
    background: #4a4f5b !important;
    color: #cbd5e0 !important;
}

/* AskAI Button Styles */
.forex-ask-ai-btn {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6) !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-left: 8px !important;
}

.forex-ask-ai-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #2563eb) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.forex-ask-ai-btn:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ai-analysis-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .analysis-section {
        padding: 10px;
    }

    .risk-indicator {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Animation for new AI results */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-analysis-container {
    animation: fadeInUp 0.3s ease-out;
}

/* Trailing Stop Button */
.btn-trailing-stop {
    background: #f0b90b;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 8px;
}

.btn-trailing-stop:hover {
    background: #d8a90a;
}

/* Trailing Stop Display */
.trailing-stop-display {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--color-border);
}

.trailing-stop-display.active {
    background: #f0b90b;
    color: #000;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--color-secondary-bg);
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    /*max-width: 400px;*/
    border: 1px solid var(--color-border);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    flex-grow: 1;
}

.close-modal {
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
}

.trade-info {
    background: #1a1e29;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
}

.trailing-stop-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.trailing-stop-form input {
    width: 100%;
    padding: 8px 12px;
    background: #1a1e29;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: white;
    margin-bottom: 10px;
}

.trailing-stop-info {
    background: #1a1e29;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 12px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-primary {
    background: var(--color-accent-green);
    color: white;
}

.btn-secondary {
    background: var(--color-accent-red);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.trailing-stop-modal {
    position: relative;
    z-index: 1000;
    background: var(--color-secondary-bg);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin: 0;
    padding: 0;
}

.trailing-stop-form input:focus {
    outline: 2px solid #f0b90b;
    outline-offset: 2px;
    background: #1a1e29;
}

/* Prevent background interactions when modal is open */
body.modal-open {
    overflow: hidden;
}

body.modal-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    pointer-events: none;
}

/* Journal Tabs */
.journal-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.journal-tab {
    padding: 12px 0;
    flex: 1;
    text-align: center;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.journal-tab.active {
    color: var(--color-accent-green);
    border-bottom: 2px solid var(--color-accent-green);
}

.journal-tab:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Journal Entries */
.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.journal-entry {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.journal-entry:hover {
    border-color: #4a4f5b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.entry-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    min-width: 200px;
}

.entry-date {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.trade-info {
    background: rgba(14, 203, 129, 0.1);
    color: var(--color-accent-green);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(14, 203, 129, 0.3);
}

.entry-type {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.rating {
    background: rgba(240, 185, 11, 0.1);
    color: #f0b90b;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(240, 185, 11, 0.3);
}

.entry-content {
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: lowercase;
}

.emotion-tag {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.lesson-tag {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.entry-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid var(--color-border);
    padding-top: 15px;
}

.edit-journal-entry,
.delete-journal-entry {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-journal-entry {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.edit-journal-entry:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.delete-journal-entry {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.delete-journal-entry:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Strategy Notes */
.strategy-notes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.strategy-note {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.strategy-note:hover {
    border-color: #4a4f5b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.note-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
}

.note-date {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.note-content {
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid var(--color-border);
    padding-top: 15px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-secondary);
}

.empty-state h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Journal Modal */
.journal-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.journal-modal-content {
    background-color: var(--color-secondary-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.journal-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
}

.journal-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
}

.journal-close {
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.journal-close:hover {
    color: #fff;
}

.journal-modal-body {
    padding: 20px;
}

/* Journal Form */
.journal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--color-primary-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent-green);
    box-shadow: 0 0 0 2px rgba(14, 203, 129, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* Multiple Select Styles */
.form-group select[multiple] {
    height: 100px;
    padding: 8px;
}

.form-group select[multiple] option {
    padding: 6px 8px;
    background-color: var(--color-primary-bg);
    color: #fff;
    border-bottom: 1px solid var(--color-border);
}

.form-group select[multiple] option:hover {
    background-color: var(--color-accent-green);
    color: #000;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.btn-primary {
    background: linear-gradient(135deg, #0ecb81 0%, #0dbd77 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0dbd77 0%, #0ca56c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 203, 129, 0.3);
}

.btn-secondary {
    background: var(--color-border);
    color: #fff;
    border: 1px solid #4a4f5b;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4a4f5b;
    transform: translateY(-1px);
}

/* Quick Journal Button */
.quick-journal-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.quick-journal-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .market-container,
    .trades-container,
    .journal-container,
    .wallet-container,
    .news-container,
    .walloffame-container,
    .account-container,
    .admin-container {
        width: 100%;
        border-radius: 0;
        max-height: calc(109vh - 9vh - 60px);
    }
    
    .trades-header {
        flex-direction: column;
        gap: 0px;
        text-align: center;
    }
    
    .trades-header .header-actions {
        position: static;
        justify-content: center;
    }
    
    .journal-tabs {
        flex-wrap: wrap;
    }
    
    .journal-tab {
        flex: 1 0 50%;
        padding: 10px 0;
    }
    
    .strategy-notes {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .journal-modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .entry-header,
    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .entry-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Animation for new entries */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.journal-entry,
.strategy-note {
    animation: slideInUp 0.3s ease-out;
}

/* Loading state for journal */
.journal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: var(--color-text-secondary);
}

.journal-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top: 2px solid var(--color-accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Volatility-specific styling */
.volatility-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #1a1d21;
    border: 1px solid #2d3138;
    border-radius: 8px;
    overflow: hidden;
}

.volatility-table th,
.volatility-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #2d3138;
    text-align: left;
}

.volatility-table th {
    background: #2d3138;
    color: #ffffff;
    font-weight: 600;
    border-bottom: 2px solid #3a3f48;
}

.volatility-table tr:last-child td {
    border-bottom: none;
}

.volatility-table tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Highlight high volatility */
.high-volatility {
    color: #ff6b6b;
    font-weight: bold;
}

.low-volatility {
    color: #4caf50;
    font-weight: bold;
}

.extreme-volatility {
    color: #ff4444;
    font-weight: bold;
    animation: pulse 2s infinite;
}

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

/* Volatility container styling */
.volatility-container {
    background: #1a1d21;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #2d3138;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.volatility-container h3 {
    color: #ffffff;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #2d3138;
    font-size: 1.2rem;
}

.trailing-stop-message {
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-line;
    margin: 8px 0;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid;
}

/* AI Analysis Dark Theme Styles */
.ai-analysis-container {
    background: linear-gradient(145deg, #1a1d2b 0%, #161824 100%);
    border: 1px solid #2a2f45;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e0e0e0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2f45;
}

.header-left h3 {
    margin: 0 0 8px 0;
    color: #7c72ff;
    font-size: 1.4rem;
}

.trading-pair {
    background: #2a2f45;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #a0a7d0;
}

.signal-indicator {
    padding: 12px 24px;
    border-radius: 10px;
    text-align: center;
    min-width: 150px;
}

.signal-buy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.signal-sell {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.signal-hold {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.15) 0%, rgba(156, 163, 175, 0.05) 100%);
    border: 1px solid rgba(156, 163, 175, 0.3);
    color: #9ca3af;
}

.signal-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.signal-confidence {
    font-size: 0.85rem;
    opacity: 0.9;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.analysis-card {
    background: #212637;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #2a2f45;
}

.analysis-card h4 {
    margin: 0 0 16px 0;
    color: #a0a7d0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-content p {
    margin: 10px 0;
    line-height: 1.5;
}

.action-primary {
    background: rgba(42, 47, 69, 0.5);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.action-title {
    display: block;
    font-size: 0.9rem;
    color: #a0a7d0;
    margin-bottom: 4px;
}

.action-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.action-buy { color: #10b981; }
.action-sell { color: #ef4444; }
.action-hold { color: #9ca3af; }

.factors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.factor-item {
    background: #212637;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid;
}

.factor-bullish { border-left-color: #10b981; }
.factor-bearish { border-left-color: #ef4444; }
.factor-neutral { border-left-color: #9ca3af; }

.factor-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #a0a7d0;
}

.factor-item ul {
    margin: 0;
    padding-left: 20px;
}

.factor-item li {
    margin: 8px 0;
    font-size: 0.95rem;
}

.price-action-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.metric {
    background: #212637;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: #a0a7d0;
    margin-bottom: 6px;
}

.metric-value {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
}

.volatility-high { color: #f59e0b; }
.volatility-medium { color: #10b981; }
.volatility-low { color: #9ca3af; }

.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }
.trend-sideways { color: #9ca3af; }

.state-trending { color: #10b981; }
.state-consolidating { color: #f59e0b; }
.state-choppy { color: #ef4444; }

.sentiment-positive { color: #10b981; }
.sentiment-negative { color: #ef4444; }
.sentiment-neutral { color: #9ca3af; }

.risk-management {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 18px;
    margin: 20px 0;
}

.risk-level {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.risk-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.risk-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.risk-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.risk-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.risk-points li {
    margin: 10px 0;
    padding-left: 8px;
}

.analysis-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #2a2f45;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
}

.timestamp {
    display: block;
    margin-bottom: 4px;
    color: #9ca3af;
}

.disclaimer {
    font-style: italic;
    opacity: 0.8;
}

/* Icons (you can use font icons or SVG) */
.icon-ai::before { content: "🤖 "; }
.icon-impact::before { content: "💥 "; }
.icon-action::before { content: "⚡ "; }
.icon-factors::before { content: "🔍 "; }
.icon-price::before { content: "📈 "; }
.icon-risk::before { content: "⚠️ "; }
.icon-time::before { content: "🕒 "; }

/* COT Analysis Styles - Dark Theme Integration */
.cot-analysis-container {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.cot-header h3 {
    margin: 0;
    color: var(--color-accent-green);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cot-header h3::before {
    content: '📊';
    font-size: 1.2em;
}

.cot-metadata {
    display: flex;
    gap: 15px;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.cot-metadata span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cot-metadata span::before {
    font-size: 0.9em;
}

.cot-report-date::before { content: '📅 '; }
.cot-release-date::before { content: '🔄 '; }

.cot-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.cot-analysis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background-color: var(--color-primary-bg);
}

.cot-analysis-table th {
    background: linear-gradient(135deg, #2a2e39 0%, #3a3f4b 100%);
    color: #e2e8f0;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--color-accent-green);
    white-space: nowrap;
}

.cot-analysis-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--color-border);
    color: #cbd5e0;
}

.cot-analysis-table tr:last-child td {
    border-bottom: none;
}

.cot-analysis-table tr:hover {
    background-color: rgba(14, 203, 129, 0.05);
}

/* Category-specific styling */
.cot-category-commercial {
    border-left: 3px solid #3b82f6;
}

.cot-category-noncommercial {
    border-left: 3px solid #f0b90b;
}

.cot-category-nonreportable {
    border-left: 3px solid #8b5cf6;
}

/* Position value styling */
.position-long {
    color: var(--color-accent-green);
    font-weight: 500;
}

.position-short {
    color: var(--color-accent-red);
    font-weight: 500;
}

.position-net {
    color: #e2e8f0;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
}

/* Change indicators */
.change-positive {
    color: var(--color-accent-green);
    font-weight: 500;
}

.change-positive::before {
    content: '▲ ';
    font-size: 0.8em;
}

.change-negative {
    color: var(--color-accent-red);
    font-weight: 500;
}

.change-negative::before {
    content: '▼ ';
    font-size: 0.8em;
}

.change-neutral {
    color: var(--color-text-secondary);
}

/* Summary sections */
.cot-summary,
.cot-trading-implications,
.cot-historical-context {
    background: rgba(30, 34, 45, 0.7);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid;
}

.cot-summary {
    border-left-color: #3b82f6;
}

.cot-summary h4 {
    color: #3b82f6;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cot-summary h4::before {
    content: '📈';
}

.cot-trading-implications {
    border-left-color: var(--color-accent-green);
}

.cot-trading-implications h4 {
    color: var(--color-accent-green);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cot-trading-implications h4::before {
    content: '💡';
}

.cot-historical-context {
    border-left-color: #f0b90b;
}

.cot-historical-context h4 {
    color: #f0b90b;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cot-historical-context h4::before {
    content: '📚';
}

/* Content styling within summary sections */
.cot-summary-content,
.cot-implications-content,
.cot-historical-content {
    color: #e2e8f0;
    line-height: 1.6;
    font-size: 0.9rem;
}

.cot-summary-content ul,
.cot-implications-content ul,
.cot-historical-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.cot-summary-content li,
.cot-implications-content li,
.cot-historical-content li {
    margin-bottom: 6px;
    padding-left: 5px;
}

/* Key metrics display */
.cot-key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.cot-metric-card {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.cot-metric-label {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.cot-metric-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.cot-metric-change {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.cot-metric-change.positive {
    background: rgba(14, 203, 129, 0.2);
    color: var(--color-accent-green);
}

.cot-metric-change.negative {
    background: rgba(246, 70, 93, 0.2);
    color: var(--color-accent-red);
}

/* Sentiment indicators */
.cot-sentiment {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(30, 34, 45, 0.7);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.sentiment-indicator {
    flex: 1;
    text-align: center;
}

.sentiment-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    margin: 8px 0;
    overflow: hidden;
    position: relative;
}

.sentiment-fill {
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.sentiment-bullish .sentiment-fill {
    background: linear-gradient(90deg, #0ecb81, #10b981);
}

.sentiment-bearish .sentiment-fill {
    background: linear-gradient(90deg, #f6465d, #ef4444);
}

.sentiment-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

.sentiment-value {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Legend */
.cot-legend {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    padding: 12px;
    background: rgba(30, 34, 45, 0.5);
    border-radius: 6px;
    border: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #cbd5e0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-commercial {
    background: #3b82f6;
}

.legend-noncommercial {
    background: #f0b90b;
}

.legend-nonreportable {
    background: #8b5cf6;
}

/* Loading state */
.cot-loading {
    text-align: center;
    padding: 40px;
    color: var(--color-text-secondary);
}

.cot-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top: 2px solid var(--color-accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Empty state */
.cot-empty {
    text-align: center;
    padding: 40px;
    color: var(--color-text-secondary);
    font-style: italic;
}

.cot-empty::before {
    content: '📊';
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Responsive design */
@media (max-width: 768px) {
    .cot-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cot-metadata {
        flex-direction: column;
        gap: 5px;
    }
    
    .cot-key-metrics {
        grid-template-columns: 1fr;
    }
    
    .cot-sentiment {
        flex-direction: column;
        gap: 15px;
    }
    
    .cot-analysis-table {
        font-size: 0.8rem;
    }
    
    .cot-analysis-table th,
    .cot-analysis-table td {
        padding: 8px 10px;
    }
}

/* Animation for data updates */
@keyframes highlightUpdate {
    0% { background-color: rgba(14, 203, 129, 0.3); }
    100% { background-color: transparent; }
}

.cot-data-updated {
    animation: highlightUpdate 1s ease-out;
}

/* Print styles */
@media print {
    .cot-analysis-container {
        border: 1px solid #000;
        box-shadow: none;
        background: #fff;
        color: #000;
    }
    
    .cot-analysis-table {
        background: #fff;
        color: #000;
    }
    
    .cot-analysis-table th {
        background: #f0f0f0;
        color: #000;
    }
}

/* Chart Layout Styles */
.chart-area-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
  /*padding-bottom: 1rem;*/
}

.depth-chart-container {
  position: relative;
  width: 280px; /* Default for desktop */
  height: 40dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.depth-chart-container h3 {
  text-align: center;
  margin-bottom: 10px;
  color: #EAECEF;
  font-size: 1em;
  margin-top: 0;
  font-weight: 600;
}

.depth-chart-container > div {
  flex-grow: 1;
  position: relative;
}

.position-summary-container {
  width: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 1px solid #2a2e39;
  overflow: hidden;
}

.ps-header {
  padding: 8px 12px;
  font-size: 0.85em;
  font-weight: 600;
  color: #EAECEF;
  border-bottom: 1px solid #2a2e39;
  flex-shrink: 0;
}

.ps-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.ps-empty {
  padding: 16px 12px;
  color: #555;
  font-size: 0.8em;
  text-align: center;
}

.ps-total {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  font-size: 0.8em;
  color: #8a8f9d;
  border-bottom: 1px solid #2a2e39;
  flex-shrink: 0;
}

.ps-total-value {
  font-weight: 600;
}

.ps-position {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.8em;
  cursor: pointer;
  transition: background 0.15s;
}

.ps-position:hover {
  background: rgba(255,255,255,0.03);
}

.ps-position-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.ps-pair {
  font-weight: 600;
  color: #EAECEF;
}

.ps-direction {
  font-size: 0.85em;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
}

.ps-direction.buy {
  color: #0ecb81;
  background: rgba(14, 203, 129, 0.12);
}

.ps-direction.sell {
  color: #f6465d;
  background: rgba(246, 70, 93, 0.12);
}

.ps-position-mid {
  display: flex;
  justify-content: space-between;
  color: #8a8f9d;
  font-size: 0.9em;
  margin-bottom: 2px;
}

.ps-pl {
  font-weight: 600;
}

.ps-pl.profit {
  color: #0ecb81;
}

.ps-pl.loss {
  color: #f6465d;
}

.ps-position-bottom {
  display: flex;
  justify-content: space-between;
  color: #555;
  font-size: 0.85em;
}

.ps-close-btn {
  background: none;
  border: 1px solid #f6465d;
  color: #f6465d;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background 0.15s;
}

.ps-close-btn:hover {
  background: rgba(246, 70, 93, 0.15);
}

@media (max-width: 768px) {
  .position-summary-container {
    display: none;
  }
}

.order-book-sheet {
  display: contents;
}

.order-book-sheet-backdrop {
  display: none;
}

.order-book-sheet-handle {
  display: none;
}

.order-book-sheet-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Responsive chart layout for mobile */
@media (max-width: 768px) {
  .depth-chart-container {
    display: none;
  }
}

.mobile-only {
    /*display: none !important;*/
}

@media (max-width: 768px) {
  .mobile-only {
    display: flex !important;
  }

  .order-book-sheet {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    pointer-events: none;
  }

  .order-book-sheet-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    pointer-events: auto;
  }

  .order-book-sheet.open .order-book-sheet-backdrop {
    display: block;
  }

  .order-book-sheet-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45vh;
    background: var(--color-primary-bg);
    border-top: 1px solid var(--color-border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
  }

  .order-book-sheet.open .order-book-sheet-content {
    transform: translateY(0);
  }

  .order-book-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
    cursor: grab;
  }

  .order-book-sheet-handle span {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
  }

  .order-book-sheet-content .depth-chart-container {
    display: flex;
    width: 100%;
    flex: 1;
    overflow: visible;
  }

  .order-book-sheet-content #depthChart {
    margin-bottom: 50px;
  }
}
.validation-status-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.validation-status-icon.status-true {
    background-color: #28a745; /* Green */
}

.validation-status-icon.status-fake {
    background-color: #dc3545; /* Red */
}

.validation-status-icon.status-unknown {
    background-color: #6c757d; /* Gray */
}

/* Offset Feature */
.offset-candidate {
    border: 2px solid #f0b90b !important;
    cursor: pointer;
    animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(240, 185, 11, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(240, 185, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(240, 185, 11, 0); }
}

.btn-offset {
    background-color: #f0b90b !important;
    color: black !important;
}

.btn-offset:hover {
    background-color: #d4a009 !important;
}

.btn-undo-offset {
    background-color: #8b5cf6 !important;
    color: white !important;
    font-size: 11px;
}

.btn-undo-offset:hover {
    background-color: #7c3aed !important;
}

/* =============================================
   News Section
   ============================================= */
.news-container .dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ── News pictogram menu ── */
.news-container .news-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 12px 0 20px;
}
@media (max-width: 768px) {
    .news-container .news-menu {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
        padding: 8px 0 16px;
    }
    .news-container .news-menu-item {
        padding: 10px 8px;
        gap: 3px;
    }
    .news-container .news-menu-icon {
        font-size: 1.7rem;
    }
    .news-container .news-menu-title {
        font-size: 0.82rem;
    }
    .news-container .news-menu-desc {
        font-size: 0.66rem;
    }
}
.news-container .news-menu-item {
    background-color: var(--color-secondary-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 13px 14px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform .15s ease, border-color .2s ease, background-color .2s ease;
}
.news-container .news-menu-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent-green);
    background-color: var(--color-tertiary-bg);
}
.news-container .news-menu-icon {
    font-size: 2.2rem;
    line-height: 1;
}
.news-container .news-menu-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text-primary);
}
.news-container .news-menu-desc {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    line-height: 1.3;
}
.news-container .menu-back {
    display: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent-green);
    cursor: pointer;
    margin-right: 10px;
    padding: 3px 9px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    white-space: nowrap;
}
.news-container .menu-back:hover {
    border-color: var(--color-accent-green);
    background-color: rgba(14, 203, 129, 0.08);
}

/* Menu-first navigation: sections hidden until a pictogram is chosen */
.news-container .dashboard-container .section-container {
    display: none;
}
.news-container .dashboard-container.news-navigated #news-menu {
    display: none;
}
.news-container .dashboard-container.news-navigated .section-container.active-section {
    display: block;
}
.news-container .dashboard-container.news-navigated .section-container.active-section .section-content {
    max-height: none;
    padding-top: 20px;
    padding-bottom: 20px;
}
.news-container .dashboard-container.news-navigated .section-container.active-section .menu-back {
    display: inline-block;
}
.news-container .dashboard-container.news-navigated .section-container.active-section h2 {
    cursor: pointer;
}
.news-container .dashboard-container.news-navigated .section-container.active-section h2:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.news-container .section-container {
    background-color: var(--color-secondary-bg);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.news-container .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #353a47;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background-color 0.3s;
}

.news-container .section-header:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.news-container .section-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #4299e1;
}

.news-container .section-content {
    padding: 20px;
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

.news-container .collapsed .section-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.news-container .timestamp {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
    text-align: right;
}

.news-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.news-container th,
.news-container td {
    border: 1px solid var(--color-border);
    padding: 10px;
}

.news-container th {
    background-color: #353a47;
    font-weight: bold;
    text-align: left;
}

.news-container tr:nth-child(even) {
    background-color: rgba(100, 126, 244, 0.1);
}

.news-container tr:hover {
    background-color: rgba(66, 153, 225, 0.1);
}

.news-container .news-stats {
    background: #353a47;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4299e1;
}

.news-container .news-stats p {
    margin: 5px 0;
    font-size: 14px;
}

.news-container a {
    color: var(--color-accent-green);
    text-decoration: none;
    transition: color 0.2s;
}

.news-container a:hover {
    color: #4299e1;
    text-decoration: underline;
}

.news-container .warning {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--color-accent-red);
    padding: 12px;
    border-radius: 6px;
    color: var(--color-accent-red);
    margin-bottom: 15px;
}

.news-container .analysis-content {
    padding: 15px;
    background-color: var(--color-secondary-bg);
    border-radius: 8px;
}

.news-container .analysis-content h2 {
    color: #4299e1;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

.news-container .analysis-content h2:first-child {
    margin-top: 0;
}

.news-container .analysis-content p {
    margin-bottom: 15px;
}

.news-container .analysis-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.news-container .analysis-content li {
    margin-bottom: 5px;
}

.news-container .loading {
    text-align: center;
    padding: 30px;
    color: var(--color-text-secondary);
    font-style: italic;
}

.news-container .economic-cycle-table,
.news-container .fed-policy-table,
.news-container .trading-conclusion-table,
.news-container .technical-confirmation-table,
.news-container .news-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

/* Mobile */
@media (max-width: 768px) {
    .news-container .section-header {
        padding: 12px 15px;
    }

    .news-container .section-header h2 {
        font-size: 1.2rem;
    }

    .news-container .section-content {
        padding: 15px;
    }

    .news-container .economic-cycle-table,
    .news-container .fed-policy-table,
    .news-container .trading-conclusion-table,
    .news-container .technical-confirmation-table,
    .news-container .news-table {
        font-size: 14px;
    }

    .news-container th,
    .news-container td {
        padding: 8px;
    }
}

/* =============================================
   Wallet Section
   ============================================= */
.wallet-container .alpha-positive {
    color: var(--color-accent-green);
    font-weight: bold;
}

.wallet-container .alpha-negative {
    color: var(--color-accent-red);
    font-weight: bold;
}

.wallet-container .alpha-neutral {
    color: var(--color-text-secondary);
    font-weight: bold;
}

.wallet-container .performance-good {
    background: rgba(14, 203, 129, 0.1) !important;
    border-color: var(--color-accent-green) !important;
}

.wallet-container .performance-poor {
    background: rgba(246, 70, 93, 0.1) !important;
    border-color: var(--color-accent-red) !important;
}

.wallet-container .performance-neutral {
    background: rgba(240, 185, 11, 0.1) !important;
    border-color: #f0b90b !important;
}

.wallet-container .metric-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wallet-container .metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wallet-container #refresh-alpha:hover {
    background: #2563eb;
}

.wallet-container #alpha-period-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.wallet-container #analysis-text strong {
    color: #ffffff;
}

.wallet-container #analysis-text small {
    color: var(--color-text-secondary);
}

/* =============================================
   Wall of Fame Section
   ============================================= */
.walloffame-container .dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px;
}

.walloffame-container .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    text-align: center;
}

.walloffame-container .stat-card {
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
}

.walloffame-container .card {
    background: var(--color-secondary-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    color: white;
}

.walloffame-container .shrimp-alert { border-left: 4px solid #4CAF50; color: white; }
.walloffame-container .crab-alert { border-left: 4px solid #2196F3; color: white; }
.walloffame-container .fish-alert { border-left: 4px solid #9C27B0; color: white; }
.walloffame-container .shark-alert { border-left: 4px solid #FF9800; color: white; }
.walloffame-container .whale-alert { border-left: 4px solid var(--color-accent-red); color: white; }
.walloffame-container .humpback-alert { border-left: 4px solid #E91E63; color: white; }

.walloffame-container .shrimp-buy { background: rgba(76, 175, 80, 0.2); border-left: 4px solid #4CAF50; color: white; }
.walloffame-container .crab-buy { background: rgba(33, 150, 243, 0.2); border-left: 4px solid #2196F3; color: white; }
.walloffame-container .fish-buy { background: rgba(156, 39, 176, 0.2); border-left: 4px solid #9C27B0; color: white; }
.walloffame-container .shark-buy { background: rgba(255, 152, 0, 0.2); border-left: 4px solid #FF9800; color: white; }
.walloffame-container .whale-buy { background: rgba(16, 185, 129, 0.2); border-left: 4px solid var(--color-accent-green); color: white; }
.walloffame-container .humpback-buy { background: rgba(16, 185, 129, 0.3); border-left: 4px solid var(--color-accent-green); color: white; }

.walloffame-container .shrimp-sell { background: rgba(244, 67, 54, 0.2); border-left: 4px solid #f44336; color: white; }
.walloffame-container .crab-sell { background: rgba(244, 67, 54, 0.2); border-left: 4px solid #f44336; color: white; }
.walloffame-container .fish-sell { background: rgba(244, 67, 54, 0.2); border-left: 4px solid #f44336; color: white; }
.walloffame-container .shark-sell { background: rgba(244, 67, 54, 0.2); border-left: 4px solid #f44336; color: white; }
.walloffame-container .whale-sell { background: rgba(244, 67, 54, 0.2); border-left: 4px solid #f44336; color: white; }
.walloffame-container .humpback-sell { background: rgba(244, 67, 54, 0.3); border-left: 4px solid #f44336; color: white; }

.walloffame-container .buy-stat { background: var(--color-accent-green); }
.walloffame-container .sell-stat { background: var(--color-accent-red); }
.walloffame-container .neutral-stat { background: var(--color-border); }
.walloffame-container .volume-stat { background: #f0b90b; color: #000; }

.walloffame-container .size-distribution {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.walloffame-container .size-card {
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
}

@media (max-width: 768px) {
    .walloffame-container .dashboard {
        display: block;
    }
    .walloffame-container .stats-grid {
        display: block;
    }
}

/* =============================================
   CPI Schedule Section (inside News)
   ============================================= */
.cpi-schedule-container {
    background: #1a1d21;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d3138;
    color: #e4e6eb;
}

.cpi-schedule-container .cpi-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2d3138;
}

.cpi-schedule-container .cpi-header h3 {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.cpi-schedule-container .cpi-header .text-muted {
    color: #a0a4a9 !important;
    opacity: 0.8;
}

.cpi-schedule-container .cpi-header h3 i {
    color: #6c8eff;
    margin-right: 10px;
}

.cpi-schedule-container .next-release-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.cpi-schedule-container .alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffd54f;
}

.cpi-schedule-container .alert-info {
    background-color: rgba(13, 202, 240, 0.15);
    border-color: rgba(13, 202, 240, 0.3);
    color: #4dc9f0;
}

.cpi-schedule-container .alert i {
    margin-right: 8px;
}

.cpi-schedule-container .next-release-card {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #4a5568;
}

.cpi-schedule-container .next-release-card .card-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cpi-schedule-container .next-release-card .card-body {
    padding: 20px;
}

.cpi-schedule-container .release-stat {
    text-align: center;
    padding: 10px;
}

.cpi-schedule-container .release-stat small {
    opacity: 0.7;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #cbd5e0;
    display: block;
    margin-bottom: 5px;
}

.cpi-schedule-container .release-stat h5 {
    margin: 5px 0 0 0;
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1rem;
}

.cpi-schedule-container .schedule-table-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2d3138;
}

.cpi-schedule-container .table {
    margin-bottom: 0;
    color: #e4e6eb;
    background-color: transparent;
}

.cpi-schedule-container .table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

.cpi-schedule-container .table.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.cpi-schedule-container .table th {
    background: #2d3138;
    border-top: none;
    font-weight: 600;
    color: #ffffff;
    padding: 15px;
    border-bottom: 2px solid #3a3f48;
}

.cpi-schedule-container .table td {
    padding: 15px;
    border-color: #2d3138;
    vertical-align: middle;
}

.cpi-schedule-container .table tbody tr.table-primary {
    background-color: rgba(108, 142, 255, 0.15) !important;
    border-left: 3px solid #6c8eff;
}

.cpi-schedule-container .badge {
    font-size: 11px;
    padding: 4px 10px;
    font-weight: 500;
    border-radius: 12px;
}

.cpi-schedule-container .badge.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.cpi-schedule-container .badge.bg-secondary {
    background: #718096 !important;
}

.cpi-schedule-container .badge.bg-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
}

.cpi-schedule-container .badge.bg-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%) !important;
}

.cpi-schedule-container .text-muted {
    color: #a0a4a9 !important;
}

.cpi-schedule-container .text-muted i {
    margin-right: 5px;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .cpi-schedule-container .cpi-header h3 {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .cpi-schedule-container .next-release-badge {
        align-self: flex-start;
    }
    .cpi-schedule-container .release-stat {
        margin-bottom: 15px;
    }
    .cpi-schedule-container .release-stat:last-child {
        margin-bottom: 0;
    }
    .cpi-schedule-container .table th,
    .cpi-schedule-container .table td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
}

/* ===== News Intelligence tab ===== */
.news-intel { padding: 12px; }
.news-intel-filters {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin-bottom: 16px; padding: 10px; background: var(--color-secondary-bg, #1c2230);
    border-radius: 8px;
}
.news-intel-filters select {
    padding: 6px 8px; border-radius: 6px; border: 1px solid #333;
    background: #11151f; color: #e6e9ef;
}
.news-intel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .news-intel-grid { grid-template-columns: 1fr; } }
.ni-panel { background: var(--color-secondary-bg, #1c2230); border-radius: 10px; padding: 14px; }
.ni-panel h3 { margin: 0 0 10px; font-size: 1.05rem; }
.ni-panel h4 { margin: 16px 0 6px; font-size: 0.85rem; color: #9aa4b2; text-transform: uppercase; letter-spacing: 0.04em; }
.ni-news-list { display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow-y: auto; }
.ni-news-item { border: 1px solid #2a3142; border-radius: 8px; padding: 10px; background: #11151f; }
.ni-news-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.ni-cat { font-size: 0.72rem; padding: 2px 8px; border-radius: 20px; background: #2a3550; color: #9fc1ff; }
.ni-dir, .ni-actual { font-size: 0.72rem; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }
.ni-bull { background: #1e3a25; color: #51cf66; }
.ni-bear { background: #3a1e22; color: #ff6b6b; }
.ni-neutral { background: #2a2f3a; color: #ffd166; }
.ni-hit { font-size: 0.72rem; padding: 2px 8px; border-radius: 20px; }
.hit-yes { background: #1e3a25; color: #51cf66; }
.hit-no { background: #3a1e22; color: #ff6b6b; }
.hit-pending { background: #2a2f3a; color: #9aa4b2; }
.ni-title { display: block; color: #e6e9ef; text-decoration: none; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.ni-title:hover { color: #9fc1ff; }
.ni-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.72rem; color: #9aa4b2; }
.ni-ret { color: #e6e9ef; font-weight: 600; }
.ni-bars { display: flex; flex-direction: column; gap: 10px; }
.ni-bar-row { display: grid; grid-template-columns: 140px 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; }
.ni-bar-label { font-size: 0.8rem; color: #e6e9ef; }
.ni-bar-track { height: 10px; background: #11151f; border-radius: 6px; overflow: hidden; }
.ni-bar-fill { height: 100%; border-radius: 6px; }
.ni-bar-stats { grid-column: 2; font-size: 0.7rem; color: #9aa4b2; }
.empty-state { color: #9aa4b2; font-size: 0.85rem; padding: 16px; text-align: center; }

/* ===== Source Registry & Research (News Intelligence) ===== */
.ni-sources-panel { margin-top: 16px; }
.ni-source-add { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ni-source-add input { padding: 6px 8px; border-radius: 6px; border: 1px solid #333; background: #11151f; color: #e6e9ef; }
.ni-source-add input[type="date"] { color-scheme: dark; }
.ni-source-list { display: flex; flex-direction: column; gap: 8px; }
.ni-source-item { border: 1px solid #2a3142; border-radius: 8px; padding: 10px; background: #11151f; }
.ni-source-head { display: flex; justify-content: space-between; align-items: center; }
.ni-trust { font-size: 0.72rem; color: #ffd166; }
.ni-source-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.74rem; color: #9aa4b2; margin-top: 4px; }
.ni-source-notes { font-size: 0.74rem; color: #c4ccd8; margin-top: 4px; font-style: italic; }
.ni-research-tasks { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ni-task-item { border: 1px solid #2a3142; border-radius: 8px; padding: 10px; background: #11151f; }
.ni-task-head { display: flex; justify-content: space-between; align-items: center; }
.ni-task-status { font-size: 0.7rem; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }
.ni-task-running { border-color: #2a4a6a; } .ni-task-running .ni-task-status { background: #1e3550; color: #9fc1ff; }
.ni-task-done { border-color: #1e3a25; } .ni-task-done .ni-task-status { background: #1e3a25; color: #51cf66; }
.ni-task-blocked { border-color: #3a2a1e; } .ni-task-blocked .ni-task-status { background: #3a2a1e; color: #ffa94d; }
.ni-task-finding { font-size: 0.78rem; color: #e6e9ef; margin-top: 6px; }
.ni-task-blocker { font-size: 0.76rem; color: #ffa94d; margin-top: 6px; }
.ni-task-guidance { font-size: 0.76rem; color: #9fc1ff; margin-top: 4px; }

.ni-task-count { font-size: 0.68rem; color: #9aa4b2; background: #2a3142; padding: 1px 6px; border-radius: 10px; margin-right: 6px; }

/* ===== News feed trust badges (source registry) ===== */
.trust-badge { display:inline-block; font-size:0.62rem; font-weight:700; padding:1px 5px; border-radius:8px; margin-left:4px; vertical-align:middle; }
.trust-high { background:#0e3b2e; color:#34d399; }
.trust-mid  { background:#3a3410; color:#fbbf24; }
.trust-low  { background:#3b1414; color:#f87171; }
.hit-badge { display:inline-block; font-size:0.62rem; padding:1px 5px; border-radius:8px; margin-left:3px; background:#1e293b; color:#93c5fd; vertical-align:middle; }
.trust-lowflag { margin-left:3px; color:#f87171; vertical-align:middle; }
.news-feed-controls { padding:6px 12px; font-size:0.82rem; color:#cbd5e1; display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.trust-toggle { cursor:pointer; user-select:none; }
.trust-filter-note { color:#94a3b8; font-size:0.72rem; }

/* Market Signal Widget */
.market-signal-widget { display:flex; flex-direction:column; align-self: baseline; width: 60%; align-items:center; }
.msw-bar { display:flex; align-items:center; gap:0px; padding:6px 2px; background:#111827; border:1px solid #1f2937; border-radius:6px; cursor:pointer; font-size:0.8rem; color:#e5e7eb; }
.msw-bar:hover { border-color:#374151; }
.msw-emoji { font-size:1rem; }
.msw-signal { font-weight:700; font-size:0.60rem; }
.msw-score { font-weight:600; font-family:monospace; }
.msw-conf { color:#9ca3af; font-size:0.72rem; }
.msw-action { margin-left:auto; padding:2px 8px; border-radius:4px; background:#1f2937; font-size:0.60rem; font-weight:600; color:#d1d5db; }
.msw-toggle { font-size:0.6rem; color:#6b7280; margin-left:4px; }
.msw-error { color:#f87171; cursor:default; }
.msw-detail { margin-top:4px; padding:12px; background:#111827; border:1px solid #1f2937; border-radius:6px; }
.msw-rationale { font-size:0.82rem; color:#d1d5db; margin-bottom:10px; padding:8px; background:#0f172a; border-radius:4px; border-left:3px solid #6366f1; }
.msw-table { width:100%; border-collapse:collapse; font-size:0.48rem; }
.msw-table th { text-align:left; padding:4px 8px; color:#9ca3af; border-bottom:1px solid #1f2937; font-weight:600; }
.msw-table td { padding:4px 2px; color:#e5e7eb; border-bottom:1px solid #0f172a; }
.msw-ind-name { text-transform:capitalize; font-weight:500; position:relative; cursor:help; }
.msw-ind-name:hover .msw-tooltip { display:block; }
.msw-tooltip { display:none; position:absolute; bottom:100%; left:0; background:#1e293b; color:#e2e8f0; padding:8px 12px; border-radius:6px; font-size:0.72rem; font-weight:400; text-transform:none; white-space:normal; width:280px; z-index:100; box-shadow:0 4px 12px rgba(0,0,0,0.4); line-height:1.4; pointer-events:none; }
.msw-tooltip::after { content:''; position:absolute; top:100%; left:12px; border:6px solid transparent; border-top-color:#1e293b; }
.msw-footer { display:flex; justify-content:space-between; margin-top:8px; font-size:0.7rem; color:#6b7280; }
.msw-tier { display:flex; gap:6px; margin-left:4px; font-size:0.72rem; font-family:monospace; }
.msw-tier-tactical { font-weight:600; }
.msw-tier-strategic { font-weight:600; }
.msw-tier-summary { display:flex; align-items:center; gap:0; margin-bottom:10px; padding:8px; background:#0f172a; border-radius:4px; font-size:0.8rem; }
.msw-tier-label { color:#9ca3af; font-weight:600; }
.msw-tier-sep { color:#4b5563; margin:0 8px; }
.msw-tier-badge { display:inline-block; width:18px; text-align:center; padding:1px 0; border-radius:3px; font-size:0.65rem; font-weight:700; color:#fff; }
.msw-theme-badge { display:inline-flex; align-items:center; gap:3px; padding:2px 8px; border-radius:4px; font-size:0.7rem; font-weight:600; margin-left:6px; white-space:nowrap; }
.msw-theme-conf { font-size:0.6rem; opacity:0.8; }
.msw-theme-section { margin-bottom:10px; padding:10px; background:#0f172a; border-radius:4px; border-left:3px solid #6366f1; }
.msw-theme-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.msw-theme-title { font-weight:700; font-size:0.85rem; }
.msw-theme-conf-badge { padding:2px 6px; border-radius:3px; font-size:0.65rem; font-weight:700; color:#fff; }
.msw-theme-desc { font-size:0.75rem; color:#9ca3af; margin-bottom:8px; line-height:1.4; }
.msw-theme-scores { display:flex; flex-direction:column; gap:3px; }
.msw-theme-score-row { display:flex; align-items:center; gap:6px; font-size:0.72rem; }
.msw-theme-name { width:130px; color:#d1d5db; text-transform:capitalize; flex-shrink:0; }
.msw-theme-bar-bg { flex:1; height:6px; background:#1f2937; border-radius:3px; overflow:hidden; }
.msw-theme-bar { height:100%; border-radius:3px; transition:width 0.3s; }
.msw-theme-pct { width:32px; text-align:right; font-family:monospace; font-weight:600; }
.msw-theme-adjustments { margin-top:8px; font-size:0.72rem; }
.msw-theme-boost { color:#0ecb81; margin-bottom:2px; }
.msw-theme-suppress { color:#f87171; }

/* Risk Events per-category breakdown */
.msw-risk-detail { padding: 6px 0 !important; }
.msw-risk-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.msw-risk-cat { display: flex; align-items: center; gap: 4px; font-size: 0.68rem; }
.msw-risk-label { width: 100px; font-weight: 500; white-space: nowrap; }
.msw-risk-bar { flex: 1; height: 5px; background: #1f2937; border-radius: 3px; overflow: hidden; min-width: 40px; }
.msw-risk-bar div { height: 100%; border-radius: 3px; transition: width 0.3s; }
.msw-risk-score { width: 36px; text-align: right; font-family: monospace; font-weight: 600; font-size: 0.65rem; }
.msw-risk-items { font-size: 0.6rem; color: #888; white-space: nowrap; }

/* Source credibility breakdown */
.msw-source-header { font-size: 0.7rem; color: #888; margin: 6px 0 4px; }
.msw-source-table { width: 100%; border-collapse: collapse; font-size: 0.68rem; }
.msw-source-table th { text-align: left; color: #888; font-weight: 500; padding: 2px 6px; border-bottom: 1px solid #1f2937; }
.msw-source-table td { padding: 3px 6px; border-bottom: 1px solid rgba(31,41,55,0.5); }
.msw-source-name { font-weight: 500; white-space: nowrap; }
.msw-trust-badge { display: inline-block; min-width: 18px; text-align: center; padding: 1px 4px; border-radius: 8px; font-size: 0.62rem; font-weight: 700; color: #0b0e11; }

/* Float signal widget detail over chart when open (starts below sticky header) */
.trading-container.msw-open .msw-detail {
    position: fixed;
    z-index: 49;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--msw-header-height, 60px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0;
    border: none;
    border-radius: 0;
    padding: 16px;
    pointer-events: none;
}
.trading-container.msw-open .msw-detail > * {
    pointer-events: auto;
}

/* Mobile: signal widget detail */
@media (max-width: 768px) {
  .msw-table { font-size: 0.42rem; }
  .msw-table th { padding: 2px 3px; }
  .msw-table td { padding: 2px 1px; white-space: nowrap; }
  .msw-tier-summary { font-size: 0.7rem; }
  .msw-theme-score-row { font-size: 0.65rem; }
  .msw-theme-name { width: 90px; }
}
@media (max-width: 400px) {
  .msw-table { font-size: 0.38rem; }
  .msw-table th { padding: 1px 2px; }
  .msw-table td { padding: 1px 1px; }
  .msw-risk-cats { grid-template-columns: 1fr; }
  .msw-risk-cat { font-size: 0.55rem; }
}

/* ── Market Move Investigator ── */
.investigate-ctx-menu {
  display: none;
  position: fixed;
  z-index: 10000;
  background: #1a1d29;
  border: 1px solid #333;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  min-width: 200px;
  padding: 4px 0;
}
.investigate-ctx-item {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #ccc;
  transition: background 0.15s;
}
.investigate-ctx-item:hover {
  background: #2a2d3a;
  color: #fff;
}

.investigate-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.investigate-modal {
  background: #1a1d29;
  border: 1px solid #333;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.investigate-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
}
.investigate-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.investigate-modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.investigate-modal-close:hover { color: #fff; }
.investigate-modal-body {
  padding: 16px;
  overflow-y: auto;
  color: #ccc;
  font-size: 13px;
  line-height: 1.5;
}

.investigate-loading {
  text-align: center;
  padding: 30px 0;
  color: #888;
}
.investigate-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #333;
  border-top-color: #6c5ce7;
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: investSpin 0.8s linear infinite;
}
@keyframes investSpin { to { transform: rotate(360deg); } }

.investigate-error {
  padding: 16px;
  color: #f6465d;
  text-align: center;
}
.investigate-empty {
  padding: 16px;
  color: #666;
  text-align: center;
}

.investigate-section {
  margin-bottom: 16px;
}
.investigate-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #2a2d3a;
}
.investigate-synthesis p {
  margin: 0 0 8px;
}

.investigate-price-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  background: #22253a;
  padding: 8px 12px;
  border-radius: 6px;
}
.investigate-price-summary span { white-space: nowrap; }

.investigate-dir-bull { color: #0ecb81; }
.investigate-dir-bear { color: #f6465d; }
.investigate-dir-neutral { color: #888; }

.investigate-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.investigate-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  flex-wrap: wrap;
}
.investigate-item:nth-child(odd) { background: rgba(255,255,255,0.02); }
.investigate-item:hover { background: rgba(255,255,255,0.05); }
.investigate-item-time { color: #666; white-space: nowrap; font-size: 11px; }
.investigate-item-source { color: #888; font-weight: 500; white-space: nowrap; }
.investigate-item-cat { color: #888; font-size: 11px; white-space: nowrap; }
.investigate-item-dir { font-weight: 500; white-space: nowrap; font-size: 11px; }
.investigate-item-title {
  color: #aaa;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.investigate-item-title:hover { color: #6c5ce7; }

.investigate-item-ret {
  color: #aaa;
  font-size: 11px;
  white-space: nowrap;
}
.investigate-hit-yes { border-left: 3px solid #0ecb81; }
.investigate-hit-no { border-left: 3px solid #f6465d; }
.investigate-item-hit {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.investigate-hit-yes .investigate-item-hit { color: #0ecb81; }
.investigate-hit-no .investigate-item-hit { color: #f6465d; }

.investigate-signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px;
}
.investigate-signal-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
  font-size: 11px;
}
.investigate-signal-name {
  font-weight: 500;
  color: #aaa;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.investigate-signal-score { font-weight: 500; white-space: nowrap; }
.investigate-signal-correct { font-size: 10px; font-weight: 600; }
.investigate-signal-correct { color: #0ecb81; }

.investigate-econ-high { border-left: 3px solid #f6465d; }
.investigate-econ-medium { border-left: 3px solid #f0b90b; }
.investigate-econ-impact {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}
.investigate-econ-high .investigate-econ-impact {
  background: rgba(246,70,93,0.15);
  color: #f6465d;
}
.investigate-econ-medium .investigate-econ-impact {
  background: rgba(240,185,11,0.15);
  color: #f0b90b;
}
.investigate-item-econ-data {
  font-size: 11px;
  color: #aaa;
  white-space: nowrap;
}
.investigate-fomc-content {
  font-size: 12px;
  line-height: 1.5;
  color: #ccc;
  padding: 10px 12px;
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 6px;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.investigate-fomc-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}
.investigate-sent-bull {
  background: rgba(14, 203, 129, 0.12);
  border: 1px solid rgba(14, 203, 129, 0.3);
  color: #0ecb81;
}
.investigate-sent-bear {
  background: rgba(246, 70, 93, 0.12);
  border: 1px solid rgba(246, 70, 93, 0.3);
  color: #f6465d;
}
.investigate-sent-neutral {
  background: rgba(240, 185, 11, 0.12);
  border: 1px solid rgba(240, 185, 11, 0.3);
  color: #f0b90b;
}
.investigate-fomc-badge-label {
  font-size: 14px;
  font-weight: 700;
}
.investigate-fomc-badge-conf {
  font-size: 11px;
  opacity: 0.8;
}
.investigate-fomc-badge-scores {
  font-size: 11px;
  opacity: 0.7;
  margin-left: auto;
}

/* ── War Room ── */
.warroom-empty {
  text-align: center;
  padding: 30px 16px;
  color: #666;
}
.warroom-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}
.warroom-empty-sub {
  font-size: 12px;
  color: #555;
  margin-top: 6px;
}
.warroom-events {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.warroom-event {
  background: rgba(255,255,255,0.03);
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}
.warroom-event:hover { border-color: #444; }
.warroom-event-imminent {
  border-color: rgba(246, 70, 93, 0.4);
  background: rgba(246, 70, 93, 0.05);
  animation: warroomPulse 2s ease-in-out infinite;
}
@keyframes warroomPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246, 70, 93, 0); }
  50% { box-shadow: 0 0 12px 2px rgba(246, 70, 93, 0.15); }
}
.warroom-event-past {
  opacity: 0.5;
}
.warroom-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.warroom-event-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.warroom-event-flag { font-size: 18px; }
.warroom-event-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}
.warroom-event-time {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #888;
}
.warroom-countdown {
  font-weight: 700;
  color: #f6465d;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.warroom-event-imminent .warroom-countdown { color: #ff6b6b; }
.warroom-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}
.warroom-status-ready { background: rgba(14,203,129,0.15); color: #0ecb81; }
.warroom-status-urgent { background: rgba(246,70,93,0.15); color: #f6465d; }
.warroom-status-watching { background: rgba(108,92,231,0.15); color: #6c5ce7; }
.warroom-status-pending { background: rgba(255,255,255,0.06); color: #666; }
.warroom-status-past { background: rgba(255,255,255,0.04); color: #555; }
.warroom-status-fetching { background: rgba(246,170,93,0.15); color: #f6aa5d; animation: warroom-pulse-badge 1.5s ease-in-out infinite; }

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

.warroom-signal {
  padding: 10px 12px;
  border-radius: 6px;
  margin-top: 4px;
}
.warroom-sent-bullish {
  background: rgba(14, 203, 129, 0.1);
  border: 1px solid rgba(14, 203, 129, 0.3);
}
.warroom-sent-bearish {
  background: rgba(246, 70, 93, 0.1);
  border: 1px solid rgba(246, 70, 93, 0.3);
}
.warroom-sent-neutral {
  background: rgba(240, 185, 11, 0.1);
  border: 1px solid rgba(240, 185, 11, 0.3);
}
.warroom-signal-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.warroom-signal-label {
  font-size: 16px;
  font-weight: 800;
}
.warroom-sent-bullish .warroom-signal-label { color: #0ecb81; }
.warroom-sent-bearish .warroom-signal-label { color: #f6465d; }
.warroom-sent-neutral .warroom-signal-label { color: #f0b90b; }
.warroom-signal-confidence {
  font-size: 11px;
  opacity: 0.8;
}
.warroom-signal-scores {
  display: flex;
  gap: 16px;
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}
.warroom-hawk-score { color: #f6465d; }
.warroom-dove-score { color: #0ecb81; }
.warroom-summary {
  font-size: 12px;
  color: #aaa;
  margin-top: 6px;
}
.warroom-actuals {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}
.warroom-actual-label { color: #888; font-size: 11px; }
.warroom-actual-value { color: #f0b90b; font-weight: 700; font-size: 14px; }
.warroom-actual-vs { color: #666; font-size: 11px; }
.warroom-forecast-value { color: #aaa; font-size: 13px; }
.warroom-delta { font-size: 11px; margin-left: 4px; }
.warroom-sent-bullish .warroom-delta { color: #0ecb81; }
.warroom-sent-bearish .warroom-delta { color: #f6465d; }
.warroom-sent-neutral .warroom-delta { color: #f0b90b; }
.warroom-impact-note {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  font-style: italic;
}
.warroom-impact-high {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(246, 70, 93, 0.2);
  color: #f6465d;
  border: 1px solid rgba(246, 70, 93, 0.4);
}
.warroom-impact-medium {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(240, 185, 11, 0.2);
  color: #f0b90b;
  border: 1px solid rgba(240, 185, 11, 0.4);
}
.warroom-surprise-prediction {
  margin-top: 6px;
}
.warroom-surprise-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.warroom-surprise-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}
.warroom-surprise-score {
  font-size: 11px;
  opacity: 0.8;
}
.warroom-surprise-indicator {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}
.warroom-surprise-detail {
  font-size: 10px;
  color: #888;
  margin-top: 1px;
  font-style: italic;
}

.warroom-waiting {
  padding: 10px 12px;
  font-size: 12px;
  color: #666;
  font-style: italic;
}
.warroom-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(246,70,93,0.3);
  border-top-color: #f6465d;
  border-radius: 50%;
  animation: warroomSpin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes warroomSpin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .investigate-modal { width: 95%; max-height: 90vh; }
  .investigate-signals-grid { grid-template-columns: 1fr; }
}

[data-theme="matrix"] {
  --color-primary-bg: #0a0a0a;
  --color-secondary-bg: #111111;
  --color-tertiary-bg: #1a1a1a;
  --color-accent-green: #00ff41;
  --color-accent-red: #8b6914;
  --color-accent-gold: #a0ffa0;
  --color-accent-blue: #00ff41;
  --color-text-primary: #00ff41;
  --color-text-secondary: #2e7d32;
  --color-border: #1a3a1a;
  --color-input-bg: rgba(0, 255, 65, 0.05);
  --shadow-modal: 0 4px 20px rgba(0, 255, 65, 0.15);
}

[data-theme="matrix"] body {
  background-color: #000;
}

[data-theme="matrix"] select,
[data-theme="matrix"] input,
[data-theme="matrix"] textarea {
  background-color: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .btn {
  background: #1a3a1a !important;
  color: #00ff41 !important;
  border: 1px solid #00ff41 !important;
}

[data-theme="matrix"] .btn:hover {
  background: #003300 !important;
}

[data-theme="matrix"] .btn-danger {
  background: #1a1500 !important;
  border-color: #8b6914 !important;
  color: #c4981a !important;
}

[data-theme="matrix"] .position-tab.active {
  border-bottom-color: #00ff41 !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .order-side.buy {
  color: #00ff41 !important;
}

[data-theme="matrix"] .order-side.sell {
  color: #8b6914 !important;
}

[data-theme="matrix"] .price-up {
  color: #00ff41 !important;
}

[data-theme="matrix"] .price-down {
  color: #8b6914 !important;
}

[data-theme="matrix"] a {
  color: #66ff66 !important;
}

[data-theme="matrix"] a:hover {
  color: #a0ffa0 !important;
}

[data-theme="matrix"] .atr-value,
[data-theme="matrix"] .high,
[data-theme="matrix"] .low,
[data-theme="matrix"] .price-change {
  color: #00ff41 !important;
}

[data-theme="matrix"] .header {
  border-bottom-color: #1a3a1a !important;
}

[data-theme="matrix"] .modal-content {
  background: #0a0a0a !important;
  border-color: #1a3a1a !important;
}

[data-theme="matrix"] .notification-success {
  background: #0a1a0a !important;
  border-color: #00ff41 !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .notification-error {
  background: #1a1500 !important;
  border-color: #8b6914 !important;
  color: #c4981a !important;
}

[data-theme="matrix"] h1 {
  color: #00ff41 !important;
}

[data-theme="matrix"] h2 {
  color: #00ff41 !important;
  border-bottom-color: #1a3a1a !important;
}

[data-theme="matrix"] .metric-card {
  border-left-color: #00ff41 !important;
}

[data-theme="matrix"] .metric-card-blue {
  border-left-color: #00ff41 !important;
}

[data-theme="matrix"] .promo-banner {
  background: linear-gradient(90deg, #0a3a0a, #1a5a1a) !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .trading-pair-badge {
  background: linear-gradient(135deg, #0a3a0a, #1a5a1a) !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .analysis-section {
  border-left-color: #00ff41 !important;
}

[data-theme="matrix"] .period-selector select:focus {
  border-color: #00ff41 !important;
  box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.2) !important;
}

[data-theme="matrix"] .period-selector button {
  background: #1a3a1a !important;
  color: #00ff41 !important;
  border: 1px solid #00ff41 !important;
}

[data-theme="matrix"] .period-selector button:hover {
  background: #003300 !important;
}

[data-theme="matrix"] .forex-ai-loading {
  color: #00ff41 !important;
  background: rgba(0, 255, 65, 0.1) !important;
}

[data-theme="matrix"] .entry-type {
  background: rgba(0, 255, 65, 0.1) !important;
  color: #00ff41 !important;
  border-color: rgba(0, 255, 65, 0.3) !important;
}

[data-theme="matrix"] .edit-journal-entry {
  background: rgba(0, 255, 65, 0.1) !important;
  color: #00ff41 !important;
  border-color: rgba(0, 255, 65, 0.3) !important;
}

[data-theme="matrix"] .quick-journal-btn {
  background: rgba(0, 255, 65, 0.1) !important;
  color: #00ff41 !important;
  border-color: rgba(0, 255, 65, 0.3) !important;
}

[data-theme="matrix"] .cot-summary h4 {
  color: #00ff41 !important;
}

[data-theme="matrix"] .cot-category-commercial {
  border-left-color: #00ff41 !important;
}

[data-theme="matrix"] .cot-summary {
  border-left-color: #00ff41 !important;
}

[data-theme="matrix"] .legend-commercial {
  background: #00ff41 !important;
}

[data-theme="matrix"] .msw-rationale {
  border-left-color: #00ff41 !important;
}

[data-theme="matrix"] .msw-theme-section {
  border-left-color: #00ff41 !important;
}

[data-theme="matrix"] .investigate-spinner {
  border-top-color: #00ff41 !important;
}

[data-theme="matrix"] .investigate-item-source {
  color: #66ff66 !important;
}

[data-theme="matrix"] .investigate-item-title:hover {
  color: #66ff66 !important;
}

[data-theme="matrix"] .wallet-container #refresh-alpha:hover {
  background: #003300 !important;
}

[data-theme="matrix"] .wallet-container #alpha-period-select:focus {
  border-color: #00ff41 !important;
  box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.2) !important;
}

[data-theme="matrix"] .advice-btn {
  background-color: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .notification-banner {
  background: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .interval-display {
  background-color: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .interval-display:hover {
  background-color: #111111 !important;
  border-color: #2e7d32 !important;
}

[data-theme="matrix"] .interval-dropdown {
  background-color: #0a0a0a !important;
  border-color: #1a3a1a !important;
}

[data-theme="matrix"] .interval-option {
  color: #a0c0a0 !important;
  border-bottom-color: #1a3a1a !important;
}

[data-theme="matrix"] .interval-option:hover,
[data-theme="matrix"] .interval-option.active {
  background-color: #1a3a1a !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .icon-btn {
  background-color: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #a0c0a0 !important;
}

[data-theme="matrix"] .icon-btn:hover {
  background-color: #111111 !important;
  border-color: #2e7d32 !important;
}

[data-theme="matrix"] .alarm-btn {
  background-color: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #a0c0a0 !important;
}

[data-theme="matrix"] .alarms-panel,
[data-theme="matrix"] .forex-alerts-panel {
  border-color: #1a3a1a !important;
}

[data-theme="matrix"] .alarms-panel-header,
[data-theme="matrix"] .forex-alerts-panel-header {
  background-color: #0d0d0d !important;
  color: #00ff41 !important;
  border-bottom-color: #1a3a1a !important;
}

[data-theme="matrix"] .alarm-modal-content {
  border-color: #1a3a1a !important;
}

[data-theme="matrix"] .direction-option:hover {
  border-color: #2e7d32 !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .alarm-modal-footer .btn-secondary {
  background: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #a0c0a0 !important;
}

[data-theme="matrix"] #pairSelect {
  background-color: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .price-info {
  background-color: #0d0d0d !important;
  border-color: #1a3a1a !important;
}

[data-theme="matrix"] .action-buttons {
  background-color: #0d0d0d !important;
  border-color: #1a3a1a !important;
}

[data-theme="matrix"] .forex-ask-ai-btn {
  background: #0d0d0d !important;
  border-color: #1a3a1a !important;
  color: #a0c0a0 !important;
}

[data-theme="matrix"] .cpi-schedule-container .next-release-card {
  background: linear-gradient(135deg, #0a3a0a 0%, #1a5a1a 100%) !important;
  color: #00ff41 !important;
  border-color: #1a3a1a !important;
}

[data-theme="matrix"] .ai-advice-overlay {
  background: rgba(10, 10, 10, 0.97) !important;
  border-color: #1a3a1a !important;
}

[data-theme="matrix"] .ai-advice-panel-header {
  background: linear-gradient(135deg, #0a2a0a 0%, #1a3a1a 100%) !important;
  border-bottom-color: #1a3a1a !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] .ai-advice-panel-close {
  color: #2e7d32 !important;
}

[data-theme="matrix"] .ai-advice-panel-close:hover {
  color: #00ff41 !important;
}

[data-theme="matrix"] .ai-advice-content {
  color: #a0c0a0 !important;
}

[data-theme="matrix"] .forex-ask-ai-btn:hover {
  background: #111111 !important;
  border-color: #2e7d32 !important;
  color: #00ff41 !important;
}

[data-theme="matrix"] #pairSelect:focus {
  border-color: #00ff41 !important;
}

/* ── Mispricing Index Widget ── */
.mispricing-widget {
  margin-top: 0px;
}
.mpw-bar {
  display:flex;
  align-items:center;
  gap:0px;
  padding:6px 2px;
  background:#111827;
  border:1px solid #1f2937;
  border-radius:6px;
  cursor:pointer;
  font-size:0.8rem;
  color:#e5e7eb;
}
.mpw-bar:hover { border-color:#374151; }
.mpw-emoji { font-size:1rem; margin-right:4px; }
.mpw-label { font-weight:700; font-size:0.60rem; margin-right:4px; }
.mpw-score { font-weight:600; font-family:monospace; margin-right:6px; }
.mpw-driver { color:#9ca3af; font-size:0.72rem; flex:1; }
.mpw-toggle { font-size:0.6rem; color:#6b7280; margin-left:4px; }
.mpw-error { color:#f87171; cursor:default; }
.mpw-detail { margin-top:4px; padding:12px; background:#111827; border:1px solid #1f2937; border-radius:6px; }
.mpw-components { margin-bottom:8px; }
.mpw-comp-row { display:flex; justify-content:space-between; align-items:center; padding:3px 0; font-size:0.75rem; border-bottom:1px solid #0f172a; }
.mpw-comp-name { color:#9ca3af; cursor:help; }
.mpw-comp-val { font-family:monospace; font-weight:600; }
.mpw-stats { display:flex; gap:12px; font-size:0.7rem; color:#6b7280; margin-bottom:6px; }
.mpw-weights { font-size:0.7rem; color:#9ca3af; margin-bottom:6px; line-height:1.5; }
.mpw-weights-src { color:#6b7280; }
.mpw-footer { display:flex; justify-content:space-between; font-size:0.7rem; color:#6b7280; }

[data-theme="matrix"] .mpw-bar,
[data-theme="matrix"] .mpw-detail {
  background:#0a0a0a !important;
  border-color:#1a3a1a !important;
}
[data-theme="matrix"] .mpw-bar:hover { border-color:#00ff41 !important; }
[data-theme="matrix"] .mpw-comp-name { color:#2e7d32 !important; }
[data-theme="matrix"] .mpw-driver,
[data-theme="matrix"] .mpw-stats,
[data-theme="matrix"] .mpw-footer,
[data-theme="matrix"] .mpw-weights { color:#2e7d32 !important; }

[data-theme="matrix"] .current-price-divider {
  background: #0d0d0d !important;
  border-top-color: #1a3a1a !important;
  color: #00ff41 !important;
}

@media (max-width: 768px) {
  .market-signal-widget { width: 100%; }
  .mispricing-widget { width: 100%; max-width: 100%; }
}


