/* CSS Reset and Variables */
:root {
    /* Color Palette */
    --bg-main: #080b0e;
    --bg-card: rgba(20, 26, 33, 0.65);
    --bg-sidebar: #0f1318;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    --text-primary: #f0f3f5;
    --text-secondary: #84919e;
    --text-muted: #4e5a66;

    /* Signal Colors */
    --color-buy: #0ecb81;
    --color-buy-glow: rgba(14, 203, 129, 0.15);
    --color-sell: #f6465d;
    --color-sell-glow: rgba(246, 70, 93, 0.15);
    --color-hold: #84919e;
    --color-hold-glow: rgba(132, 145, 158, 0.1);
    
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-gold: #f0b90b;

    /* Transitions & Borders */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Layout Wrapper */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styling */
.sidebar {
    width: 320px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text-x {
    color: var(--text-primary);
}

.logo-accent {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Connection Status Dot */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.connected {
    background-color: var(--color-buy);
    box-shadow: 0 0 8px var(--color-buy);
    animation: blink 2s infinite;
}

.status-dot.disconnected {
    background-color: var(--color-sell);
    box-shadow: 0 0 8px var(--color-sell);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Tab Switcher */
.tab-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Watchlist section */
.watchlist-section {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 24px;
}

.watchlist-section h3, .parameters-section h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.watchlist-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.watchlist-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.watchlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.watchlist-item.active {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
}

.watchlist-item .symbol {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
}

.watchlist-item .price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.watchlist-item .price {
    font-weight: 600;
    font-size: 14px;
}

.watchlist-item .change {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.price-change.positive, .change.positive {
    color: var(--color-buy);
    background: rgba(14, 203, 129, 0.1);
}

.price-change.negative, .change.negative {
    color: var(--color-sell);
    background: rgba(246, 70, 93, 0.1);
}

.loading-placeholder {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Time Frame Selector */
.timeframe-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.tf-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.tf-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.tf-btn.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 32px;
    overflow-x: auto;
}

/* Header Info */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.asset-info h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
}

.asset-type-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.price-display {
    text-align: right;
}

.current-price {
    font-size: 32px;
    font-family: var(--font-heading);
    font-weight: 800;
    display: block;
}

.price-display .price-change {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    flex-grow: 1;
}

/* Glass Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 12px;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.chart-indicators-info {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Chart Container */
.chart-card {
    grid-column: 1 / -1;
    min-height: 500px;
    height: 500px;
}

.chart-container {
    width: 100%;
    height: 420px;
    min-height: 380px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

/* Signal Card Specifics */
.signal-card {
    grid-column: 1 / -1;
}

.signal-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.signal-badge {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 12px 32px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 2px solid;
    width: 100%;
    max-width: 260px;
    text-align: center;
    box-shadow: 0 10px 30px -10px currentColor;
    transition: var(--transition-smooth);
}

.signal-badge.buy, .signal-badge.strong_buy {
    color: var(--color-buy);
    background: var(--color-buy-glow);
    border-color: var(--color-buy);
}

.signal-badge.sell, .signal-badge.strong_sell {
    color: var(--color-sell);
    background: var(--color-sell-glow);
    border-color: var(--color-sell);
}

.signal-badge.hold {
    color: var(--color-hold);
    background: var(--color-hold-glow);
    border-color: var(--color-hold);
}

.confidence-container {
    width: 100%;
    margin-bottom: 24px;
}

.confidence-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.confidence-bar-outer {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--border-color);
}

.confidence-bar-inner {
    height: 100%;
    border-radius: 100px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
}

.confidence-val {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
}

/* Targets Card */
.targets-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 12px;
}

.target-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px 6px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.target-box .lbl {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.target-box .val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
}

.target-box.entry {
    border-left: 3px solid var(--accent-blue);
}

.target-box.stoploss {
    border-left: 3px solid var(--color-sell);
}

.target-box.takeprofit {
    border-left: 3px solid var(--color-buy);
}

/* Analyst Notes */
.analyst-notes {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 24px;
    text-align: left;
    width: 100%;
}

.analyst-notes h4 {
    font-family: var(--font-heading);
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.analyst-notes p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Indicators Card Grid */
.indicators-card {
    grid-column: 1 / -1;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.indicator-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 110px;
}

.indicator-item .ind-name {
    font-size: 12px;
    color: var(--text-secondary);
}

.indicator-item .ind-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    margin: 8px 0;
}

.ind-status {
    font-size: 11px;
    font-weight: 700;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 4px;
}

.ind-status.neutral {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.ind-status.bullish {
    background: rgba(14, 203, 129, 0.12);
    color: var(--color-buy);
}

.ind-status.bearish {
    background: rgba(246, 70, 93, 0.12);
    color: var(--color-sell);
}

/* Risk Card Styling */
.risk-card {
    grid-column: 1 / -1;
}

.risk-calculator {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 12px;
    color: var(--text-secondary);
}

.input-group input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.input-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

.calc-results {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.res-item .res-lbl {
    color: var(--text-secondary);
}

.res-item .res-val {
    font-family: var(--font-heading);
    font-weight: 700;
}

.res-item.accent {
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.res-item.accent .res-val {
    color: var(--accent-gold);
    font-size: 18px;
}

/* Simulation & Demo Section */
.simulation-section {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.sim-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sim-btn {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
}

.sim-btn:hover {
    transform: translateY(-1px);
    border-color: var(--border-hover);
}

.sim-btn.sim-buy {
    color: var(--color-buy);
    background: rgba(14, 203, 129, 0.05);
    border-color: rgba(14, 203, 129, 0.2);
}

.sim-btn.sim-buy:hover {
    background: rgba(14, 203, 129, 0.12);
    border-color: var(--color-buy);
}

.sim-btn.sim-sell {
    color: var(--color-sell);
    background: rgba(246, 70, 93, 0.05);
    border-color: rgba(246, 70, 93, 0.2);
}

.sim-btn.sim-sell:hover {
    background: rgba(246, 70, 93, 0.12);
    border-color: var(--color-sell);
}

.sim-btn.sim-hold {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.sim-btn.sim-hold:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sim-btn.sim-reset {
    color: var(--accent-gold);
    background: rgba(240, 185, 11, 0.05);
    border-color: rgba(240, 185, 11, 0.2);
    margin-top: 4px;
}

.sim-btn.sim-reset:hover {
    background: rgba(240, 185, 11, 0.12);
    border-color: var(--accent-gold);
}

/* Multimodal Reason Tags */
.reasons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.reason-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.reason-tag:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.08);
}

/* Responsive Scaling */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card, .signal-card, .indicators-card, .risk-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .main-content {
        padding: 16px;
        overflow-x: hidden;
    }
    .indicators-grid {
        grid-template-columns: 1fr;
    }
    .view-switcher {
        flex-direction: column;
    }
    .intelligence-grid {
        grid-template-columns: 1fr;
    }
}

/* View Switcher Tabs */
.view-switcher {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.view-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    padding: 8px 4px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.view-tab:hover {
    color: var(--text-primary);
}

.view-tab.active {
    color: var(--accent-blue);
}

.view-tab.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
}

/* Trading Profile & Auto-Execute Card */
.profile-settings-section {
    margin-bottom: 24px;
}

.profile-settings-section h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-settings-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-group label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-group select, .profile-group input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
}

.profile-group select option {
    background-color: var(--bg-sidebar);
    color: var(--text-primary);
}

.profile-group select:focus, .profile-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

.profile-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.api-selector-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-status-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.api-status-badge.disconnected {
    background: rgba(246, 70, 93, 0.12);
    color: var(--color-sell);
    border: 1px solid rgba(246, 70, 93, 0.25);
}

.api-status-badge.connected {
    background: rgba(14, 203, 129, 0.12);
    color: var(--color-buy);
    border: 1px solid rgba(14, 203, 129, 0.25);
    box-shadow: 0 0 6px rgba(14, 203, 129, 0.2);
}

.auto-execute-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.toggle-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Switch Toggle UI */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .3s;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    transition: .3s;
}

input:checked + .slider {
    background-color: rgba(14, 203, 129, 0.2);
    border-color: var(--color-buy);
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: var(--color-buy);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.auto-execute-settings {
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 12px;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* AI Market Intelligence Hub Layout */
.view-content {
    display: none;
}

.view-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

.intelligence-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

/* Agent Discussion Room */
.agent-room-card {
    grid-column: 1 / -1;
    min-height: 380px;
}

.badge-intel {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-gold);
    background: rgba(240, 185, 11, 0.12);
    border: 1px solid rgba(240, 185, 11, 0.2);
    padding: 3px 10px;
    border-radius: 4px;
}

.agent-discussion-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 320px;
    overflow-y: auto;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.agent-bubble {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-left-width: 4px;
    transition: var(--transition-smooth);
}

.agent-bubble:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(2px);
}

/* Colors for specific agents */
.agent-bubble.tech { border-left-color: var(--accent-blue); }
.agent-bubble.news { border-left-color: var(--color-buy); }
.agent-bubble.whale { border-left-color: var(--accent-gold); }
.agent-bubble.macro { border-left-color: var(--accent-purple); }
.agent-bubble.geopolitic { border-left-color: var(--color-sell); }
.agent-bubble.risk { border-left-color: var(--text-secondary); }

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    font-family: var(--font-heading);
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.agent-avatar.tech { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.agent-avatar.news { background: linear-gradient(135deg, #065f46, #0ecb81); }
.agent-avatar.whale { background: linear-gradient(135deg, #b45309, #f0b90b); }
.agent-avatar.macro { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.agent-avatar.geopolitic { background: linear-gradient(135deg, #991b1b, #f6465d); }
.agent-avatar.risk { background: linear-gradient(135deg, #374151, #6b7280); }

.agent-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.agent-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.agent-role {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.agent-msg {
    font-size: 13.5px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Smart Money Radar Detail Cards */
.intel-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.intel-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 90px;
    transition: var(--transition-smooth);
}

.intel-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.intel-item .lbl {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.intel-item .val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    margin-top: 6px;
    color: var(--text-primary);
}

.intel-item.full-width {
    grid-column: 1 / -1;
}

.intel-item.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(139, 92, 246, 0.06));
    border-color: rgba(139, 92, 246, 0.3);
}

.intel-item.highlight:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.09), rgba(139, 92, 246, 0.09));
}

.intel-item.highlight .val {
    color: var(--accent-gold);
    font-size: 14px;
    font-weight: 600;
}

/* Market Psychology Panel */
.psychology-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    align-items: center;
    flex: 1;
}

.fg-index-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.fg-index-box .lbl {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fg-index-box .val {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 900;
    margin: 8px 0;
    background: linear-gradient(135deg, var(--accent-gold), var(--color-buy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fg-index-box .classification {
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-heading);
}

.sentiment-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sent-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sent-lbl {
    font-size: 12px;
    color: var(--text-secondary);
}

.sent-bar-outer {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.sent-bar-inner {
    height: 100%;
    border-radius: 100px;
    background: var(--color-buy);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.sent-val {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-top: 2px;
    align-self: flex-end;
}

/* Economic & Macro Calendar Alert Center */
.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.cal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.cal-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.cal-item .event-name {
    font-size: 13.5px;
    font-weight: 600;
}

.cal-item .event-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cal-item .event-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.cal-item .event-impact {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.cal-item .event-impact.high {
    background: rgba(246, 70, 93, 0.12);
    color: var(--color-sell);
    border: 1px solid rgba(246, 70, 93, 0.25);
}

.cal-item .event-impact.medium {
    background: rgba(240, 185, 11, 0.12);
    color: var(--accent-gold);
    border: 1px solid rgba(240, 185, 11, 0.25);
}

/* AI Correlation & Global Leaders */
.correlation-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.correlation-section h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 6px;
}

.corr-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.corr-list li {
    font-size: 12.5px;
    color: var(--text-primary);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    line-height: 1.4;
}

.leaders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 4px;
}

.leader-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px 8px;
    border-radius: 6px;
    text-align: center;
    transition: var(--transition-smooth);
}

.leader-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.leader-item .name {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.leader-item .score {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-purple);
}

/* Multi-Timeframe UI Improvements */
.multi-timeframe-panel {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 20px;
    width: 100%;
    text-align: left;
}

.multi-timeframe-panel h4 {
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mtf-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mtf-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.mtf-item .tf {
    font-family: var(--font-heading);
    font-weight: 700;
    width: 32px;
    color: var(--text-primary);
}

.mtf-bar-outer {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.mtf-bar-inner {
    height: 100%;
    border-radius: 50px;
    background: var(--color-hold);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.mtf-item .sig {
    font-family: var(--font-heading);
    font-weight: 700;
    width: 80px;
    text-align: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

.mtf-item .sig.buy, .mtf-item .sig.strong_buy {
    color: var(--color-buy);
    background: rgba(14, 203, 129, 0.1);
}

.mtf-item .sig.sell, .mtf-item .sig.strong_sell {
    color: var(--color-sell);
    background: rgba(246, 70, 93, 0.1);
}

.mtf-item .sig.hold {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
}

.mtf-item .pct {
    font-family: var(--font-heading);
    font-weight: 700;
    width: 36px;
    text-align: right;
    color: var(--text-secondary);
}

/* responsive adapt for intelligence grid */
@media (max-width: 1200px) {
    .intelligence-grid {
        grid-template-columns: 1fr;
    }
}

/* Watchlist Search & Add Styles */
.asset-search-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    width: 100%;
}

#asset-search-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
}

#asset-search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

#asset-search-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

#asset-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}


/* SLEEK ROW LAYOUT (Technical Dashboard Redesign) */
.sleek-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sleek-row-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sleek-row-header h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin: 0;
}

.sleek-row-content {
    display: flex;
    padding: 16px 20px;
    gap: 24px;
    align-items: center;
}

.sleek-col {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sleek-col .lbl {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sleek-col .val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.mtf-horizontal {
    justify-content: space-between;
}

.mtf-box {
    background: rgba(255,255,255,0.02);
    padding: 10px;
    border-radius: 6px;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.03);
}

.mtf-box .val {
    font-size: 16px;
    margin: 4px 0;
}

@media (max-width: 768px) {
    .sleek-row-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .sleek-col {
        width: 100%;
        border-left: none !important;
        padding-left: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding-bottom: 10px;
    }
    .sleek-col:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    .mtf-horizontal {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .mtf-box {
        width: calc(50% - 8px);
        margin-bottom: 8px;
    }
}


/* ========================================================
   AI INTELLIGENCE HUB RESTRUCTURE (ACCORDION & HERO CHART)
   ======================================================== */

.intel-accordion-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
}

.ai-hero-chart {
    width: 100%;
    background: #111827;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.intel-accordion {
    width: 100%;
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.intel-accordion:last-child {
    border-bottom: none;
}

.intel-accordion summary {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none; /* Hide default arrow */
    position: relative;
    user-select: none;
}

.intel-accordion summary::-webkit-details-marker {
    display: none; /* Hide default arrow in webkit */
}

/* Custom arrow for accordion */
.intel-accordion summary::after {
    content: '\25BC'; /* Down arrow */
    position: absolute;
    right: 20px;
    font-size: 12px;
    color: var(--muted);
    transition: transform 0.3s ease;
}

.intel-accordion[open] summary::after {
    transform: rotate(180deg);
}

.intel-accordion summary h2 {
    margin: 0;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.intel-accordion summary .badge-intel {
    margin-left: 12px;
}

.intel-accordion:hover summary {
    background: rgba(255, 255, 255, 0.02);
}

.intel-accordion .acc-content {
    padding: 20px;
    background: #0d121c; /* slightly darker for inner content */
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fix some inner padding if it already had padding */
.intel-accordion .acc-content > div[style*="padding: 16px;"] {
    padding: 0 !important;
}
