:root {
    --bg-primary: #090d16;
    --bg-secondary: #0c101b;
    --bg-tertiary: #111827;
    --bg-accent: #1f2937;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --color-green: #10b981;
    --color-green-glow: rgba(16, 185, 129, 0.15);
    --color-gold: #f59e0b;
    --color-gold-glow: rgba(245, 158, 11, 0.15);
    --color-red: #ef4444;
    --border-color: #1f2937;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --sidebar-width: 260px;
}
 @keyframes pulse-emergency {
    0% {
        box-shadow: 0 0 4px rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.4);
    }
    100% {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
        border-color: rgba(239, 68, 68, 0.8);
    }
}
 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
 body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
}
 /* Scrollbar styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-accent);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
 /* Sidebar Styling */
aside {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}
 .sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}
 .brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-green), var(--color-gold));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--bg-primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
 .brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
 .sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}
 .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}
 .menu-item:hover {
    background-color: var(--bg-accent);
    color: var(--text-primary);
}
 .menu-item.active {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.08), transparent);
    color: var(--color-green);
    border-left-color: var(--color-green);
    font-weight: 600;
}
 .sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
 .system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
 .status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-green);
}
 .status-dot.demo {
    background-color: var(--color-gold);
    box-shadow: 0 0 8px var(--color-gold);
}
 /* Main Content Styling */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}
 header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 5;
}
 .header-title h1 {
    font-size: 1.25rem;
    font-weight: 700;
}
 .header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}
 .connection-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}
 .connection-badge.live {
    border-color: rgba(16, 185, 129, 0.3);
    background-color: rgba(16, 185, 129, 0.05);
    color: var(--color-green);
}
 .connection-badge.demo {
    border-color: rgba(245, 158, 11, 0.3);
    background-color: rgba(245, 158, 11, 0.05);
    color: var(--color-gold);
}
 .time-badge {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
}
 .content-area {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
 .view-section {
    display: none;
    flex-direction: column;
    gap: 32px;
    animation: fadeIn 0.3s ease;
}
 .view-section.active {
    display: flex;
}
 @keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
 /* Dashboard View Layout */
.counters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
 .counter-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
 .counter-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
}
 .counter-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}
 .counter-card.green::after { background-color: var(--color-green); }
.counter-card.gold::after { background-color: var(--color-gold); }
 .counter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
 .counter-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
 .counter-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
 .trend-up {
    color: var(--color-green);
    font-weight: 600;
}
 /* Charts Grid */
.chart-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
 .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
 .card-title {
    font-size: 1rem;
    font-weight: 700;
}
 .chart-container {
    height: 320px;
    width: 100%;
    position: relative;
}
 /* Bottom Grid: Terminal and Coder */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
 @media (max-width: 1024px) {
    .bottom-grid {
        grid-template-columns: 1fr;
    }
}
 /* Terminal Styling */
.terminal-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 400px;
}
 .terminal-header {
    background-color: var(--bg-secondary);
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
 .terminal-dots {
    display: flex;
    gap: 6px;
}
 .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background-color: var(--color-red); }
.dot.yellow { background-color: var(--color-gold); }
.dot.green { background-color: var(--color-green); }
 .terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}
 .terminal-body {
    flex-grow: 1;
    padding: 16px;
    background-color: #030712;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
}
 .terminal-line {
    display: flex;
    margin-bottom: 8px;
    opacity: 0;
    animation: terminalFadeIn 0.2s forwards;
}
 @keyframes terminalFadeIn {
    to { opacity: 1; }
}
 .line-stamp {
    color: var(--text-muted);
    margin-right: 10px;
    flex-shrink: 0;
}
 .line-source {
    color: var(--color-gold);
    margin-right: 10px;
    font-weight: bold;
    flex-shrink: 0;
}
 .line-text {
    word-break: break-all;
}
 .status-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
}
.status-badge.info { background-color: rgba(30, 41, 59, 0.5); color: #94a3b8; }
.status-badge.success { background-color: rgba(16, 185, 129, 0.15); color: var(--color-green); }
.status-badge.warning { background-color: rgba(245, 158, 11, 0.15); color: var(--color-gold); }
.status-badge.buy { background-color: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid rgba(16,185,129,0.3); font-weight: bold; }
.status-badge.sell { background-color: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); font-weight: bold; }
.status-badge.neutral { background-color: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid rgba(148,163,184,0.3); font-weight: bold; }
 /* Agent Consensus Badges */
.agent-badge-container {
    display: inline-flex;
    gap: 6px;
    margin-left: 10px;
    vertical-align: middle;
    flex-wrap: wrap;
}
.agent-micro-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-family: var(--font-mono);
    border: 1px solid transparent;
    text-transform: uppercase;
}
.agent-micro-badge.fund {
    background-color: rgba(30, 41, 59, 0.4);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}
.agent-micro-badge.fund.buy {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}
.agent-micro-badge.fund.sell {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}
.agent-micro-badge.tech {
    background-color: rgba(30, 41, 59, 0.4);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}
.agent-micro-badge.tech.buy {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}
.agent-micro-badge.tech.sell {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.agent-micro-badge.risk {
    background-color: rgba(30, 41, 59, 0.4);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}
.agent-micro-badge.risk.safe {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}
.agent-micro-badge.risk.high_risk {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
 /* Neural Coder Styling */
.coder-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 400px;
}
 .coder-header {
    background-color: var(--bg-secondary);
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
 .strategy-select {
    background-color: var(--bg-accent);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-main);
    outline: none;
    cursor: pointer;
}
 .copy-btn {
    background-color: var(--color-green);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
 .copy-btn:hover {
    opacity: 0.9;
}
 .coder-body {
    flex-grow: 1;
    overflow: auto;
    background-color: #030712;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
 /* Syntax Highlighter Classes */
.syntax-highlighted-code {
    display: flex;
    flex-direction: column;
    white-space: pre;
}
.code-line {
    display: flex;
    line-height: 1.6;
}
.code-line-number {
    color: #4b5563;
    margin-right: 16px;
    user-select: none;
    text-align: right;
    border-right: 1px solid #1e293b;
    padding-right: 12px;
    width: 40px;
}
.code-line-text {
    color: #d1d5db;
}
.code-comment { color: #4b5563; font-style: italic; }
.code-keyword { color: #f43f5e; font-weight: bold; }
.code-string { color: #10b981; }
.code-number { color: #f59e0b; }
 /* Strategy Incubator Styles */
.table-container {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}
 table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
 th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}
 td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
}
 tr:last-child td {
    border-bottom: none;
}
 tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}
 .badge-incubating {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-gold);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
 .action-button {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
 .action-button:hover {
    border-color: var(--color-green);
    color: var(--color-green);
}
 /* Risk Control Form */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}
 .settings-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
 .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
 .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}
 .form-group input, .form-group select {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
 .form-group input:focus, .form-group select:focus {
    border-color: var(--color-green);
}
 .save-btn {
    align-self: flex-start;
    background-color: var(--color-green);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
 .save-btn:hover {
    opacity: 0.9;
}
 .alert-bar {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-red);
    padding: 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
}
 /* Custom Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
}
.modal-box {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-box {
    transform: scale(1);
}
.modal-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.modal-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}
.modal-btn {
    align-self: flex-end;
    background-color: var(--color-green);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.modal-btn:hover {
    opacity: 0.9;
}
/* Auth Styles */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.login-box {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.login-box h2 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 8px;
}
.hidden { display: none !important; }
.admin-only { display: none; }

/* Second Brain View Layout */
.brain-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 24px;
    height: calc(100vh - 160px);
    min-height: 500px;
}
 #brain-network-container {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    height: 100%;
    position: relative;
    box-shadow: inset 0 0 30px rgba(16, 185, 129, 0.03);
    overflow: hidden;
    cursor: grab;
}
 #brain-network-container:active {
    cursor: grabbing;
}
 .brain-details-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    height: 100%;
}
 .brain-progress-container {
    background-color: var(--bg-accent);
    border-radius: 20px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 6px;
}
 .brain-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--color-green), var(--color-gold));
    border-radius: 20px;
    width: 0%;
    transition: width 0.5s ease-out;
}
 .brain-code-preview {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    max-height: 250px;
    white-space: pre;
}
 .brain-meta-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    font-size: 0.9rem;
}
.brain-meta-label {
    color: var(--text-secondary);
}
.brain-meta-value {
    font-weight: 600;
}
/* --- TradeRoom Styles --- */
.traderoom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
}
.traderoom-status-bar {
    display: flex;
    gap: 15px;
    align-items: center;
}
.traderoom-controls {
    display: flex;
    gap: 10px;
}
.traderoom-btn {
    background: transparent;
    border: 1px solid var(--color-cyan);
    color: var(--color-cyan);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}
.traderoom-btn:hover {
    background: var(--color-cyan);
    color: #000;
    box-shadow: 0 0 10px var(--color-cyan);
}
.traderoom-btn.active {
    background: var(--color-cyan);
    color: #000;
    font-weight: bold;
}
.traderoom-grid-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    height: calc(100vh - 180px);
    min-height: 600px;
}
.traderoom-arena {
    position: relative;
    background-color: #060913;
    background-image: 
        linear-gradient(rgba(0, 242, 254, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 254, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    border: 1px solid rgba(0, 242, 254, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

/* Room Zones */
.room-zone {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    background: rgba(10, 15, 30, 0.4);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    padding: 15px;
}

.room-zone:hover {
    transform: scale(1.05);
    background: rgba(10, 15, 30, 0.7);
}

.zone-minbar {
    left: 10%;
    top: 35%;
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.05);
}
.zone-minbar:hover, .zone-minbar.active {
    border-color: var(--color-cyan);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.3), inset 0 0 15px rgba(0, 242, 254, 0.2);
}

.zone-currency {
    right: 12%;
    top: 15%;
    border-color: rgba(57, 255, 20, 0.3);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.05);
}
.zone-currency:hover, .zone-currency.active {
    border-color: var(--color-green);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.3), inset 0 0 15px rgba(57, 255, 20, 0.2);
}

.zone-strategies {
    right: 12%;
    bottom: 15%;
    border-color: rgba(224, 0, 255, 0.3);
    box-shadow: 0 0 20px rgba(224, 0, 255, 0.05);
}
.zone-strategies:hover, .zone-strategies.active {
    border-color: #e000ff;
    box-shadow: 0 0 30px rgba(224, 0, 255, 0.3), inset 0 0 15px rgba(224, 0, 255, 0.2);
}

.zone-library {
    left: 45%;
    top: 10%;
    border-color: rgba(255, 170, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.05);
}
.zone-library:hover, .zone-library.active {
    border-color: var(--color-gold);
    box-shadow: 0 0 30px rgba(255, 170, 0, 0.3), inset 0 0 15px rgba(255, 170, 0, 0.2);
}

.zone-icon {
    font-size: 2rem;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.zone-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.zone-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Robot Agents styling */
.robot-agent {
    position: absolute;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.1s linear;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.robot-body {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.robot-agent:hover .robot-body {
    transform: scale(1.1);
    box-shadow: 0 0 25px currentColor;
}

.robot-eyes {
    display: flex;
    gap: 4px;
}
.robot-eye {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: eyePulse 1.5s infinite alternate;
}
.robot-antenna {
    position: absolute;
    top: -6px;
    width: 2px;
    height: 6px;
    background: currentColor;
}
.robot-antenna::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.robot-label {
    position: absolute;
    bottom: -18px;
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Floating speech bubbles */
.speech-bubble {
    position: absolute;
    top: -55px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 8px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.72rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 20;
    max-width: 180px;
    white-space: normal;
    line-height: 1.3;
    animation: bubbleFloat 2s infinite alternate ease-in-out;
}
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.9) transparent;
    display: block;
    width: 0;
}

/* Right Details Panel */
.traderoom-sidebar {
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    color: #fff;
}
.sidebar-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-cyan);
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.traderoom-log-item {
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 0;
    color: var(--text-secondary);
}
.traderoom-log-time {
    color: var(--color-cyan);
    margin-right: 5px;
}

/* --- TradeRoom Extensions --- */

/* Consensus Board (Hologram) */
.consensus-board {
    position: absolute;
    left: 10%;
    top: 17%;
    width: 160px;
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1), inset 0 0 10px rgba(0, 242, 254, 0.05);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s ease;
    z-index: 15;
    backdrop-filter: blur(5px);
}
.consensus-board.active {
    opacity: 1;
    transform: scale(1.0);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.3), inset 0 0 15px rgba(0, 242, 254, 0.1);
}
.consensus-board-title {
    font-size: 0.65rem;
    color: var(--color-cyan);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    padding-bottom: 4px;
    margin-bottom: 6px;
}
.consensus-vote-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 3px;
}

/* Floating Vote Token */
.vote-token {
    position: absolute;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 0 10px currentColor;
    z-index: 30;
    pointer-events: none;
    transition: all 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Alarm Overlay */
.traderoom-alarm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, rgba(255, 0, 60, 0.15) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
}
.traderoom-arena.alarm-active {
    border-color: rgba(255, 0, 60, 0.4) !important;
    box-shadow: inset 0 0 50px rgba(255, 0, 60, 0.3) !important;
    animation: alarmGridPulse 2s infinite alternate !important;
}
.traderoom-arena.alarm-active .traderoom-alarm-overlay {
    opacity: 1;
    animation: alarmRedPulse 2s infinite alternate;
}

/* Glowing flying Trade Orb */
.glowing-trade-orb {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-green);
    box-shadow: 0 0 15px var(--color-green), 0 0 30px var(--color-green);
    z-index: 25;
    pointer-events: none;
    transition: left 1.5s linear, top 1.5s linear;
}

/* Chat UI components inside sidebar details */
.traderoom-chat-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 15px;
}
.traderoom-chat-history {
    max-height: 120px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 8px;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.chat-bubble-user {
    align-self: flex-end;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 4px 8px;
    border-radius: 6px 6px 0 6px;
    color: #fff;
    max-width: 85%;
}
.chat-bubble-agent {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px 6px 6px 0;
    color: var(--text-secondary);
    max-width: 85%;
}
.traderoom-chat-input-row {
    display: flex;
    gap: 8px;
}
.traderoom-chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.8rem;
}
.traderoom-chat-input:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 5px rgba(0, 242, 254, 0.3);
}
.traderoom-chat-btn {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid var(--color-cyan);
    color: var(--color-cyan);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}
.traderoom-chat-btn:hover {
    background: var(--color-cyan);
    color: #000;
}

/* Keyframe animations */
@keyframes eyePulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; filter: brightness(1.3); }
}
@keyframes bubbleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}
@keyframes alarmRedPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.9; }
}
@keyframes alarmGridPulse {
    0% { background-color: #060913; }
    100% { background-color: #17050b; }
}
 /* Chatbot View Layout */
.agents-chat-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    height: calc(100vh - 160px);
    min-height: 500px;
}
.agents-list-panel {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.agents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.agent-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    background-color: var(--bg-secondary);
}
.agent-list-item:hover {
    background-color: var(--bg-accent);
    border-color: var(--text-muted);
}
.agent-list-item.active {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: var(--color-green);
}
.agent-item-avatar {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-accent);
    border-radius: 50%;
}
.agent-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.agent-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.agent-item-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-room-panel {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-room-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 16px;
}
.chat-agent-avatar {
    font-size: 1.8rem;
}
.chat-agent-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-agent-name {
    font-weight: 700;
    font-size: 1.05rem;
}
.chat-agent-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.chat-messages-area {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: rgba(9, 13, 22, 0.3);
}
.chat-msg {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.9rem;
}
.chat-msg.incoming {
    background-color: var(--bg-secondary);
    align-self: flex-start;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 2px;
}
.chat-msg.outgoing {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.8), rgba(16, 185, 129, 0.6));
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}
.chat-input-area {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    background-color: var(--bg-secondary);
}
.chat-input-area input {
    flex-grow: 1;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}
.chat-input-area input:focus {
    border-color: var(--color-green);
}
 /* World Map View Layout */
.world-map-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    height: calc(100vh - 160px);
    min-height: 500px;
}
.sessions-list-panel {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}
.session-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}
.session-card.active {
    border-color: var(--color-green);
    background-color: rgba(16, 185, 129, 0.04);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.05);
}
.session-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.session-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.session-status-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--bg-accent);
    color: var(--text-secondary);
}
.session-card.active .session-status-badge {
    background-color: var(--color-green);
    color: #000;
    font-weight: 600;
}
.session-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
.map-canvas-panel {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.map-canvas-container {
    flex-grow: 1;
    position: relative;
    min-height: 380px;
    background-color: rgba(9, 13, 22, 0.4);
}
.world-map-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Map overlays & animations */
.session-glow-circle {
    fill: rgba(255, 255, 255, 0.01);
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1.5;
    transition: all 0.5s ease;
}
.session-glow-circle.active {
    fill: rgba(16, 185, 129, 0.03);
    stroke: var(--color-green);
    stroke-width: 2;
    animation: sessionPulse 3s infinite alternate;
}
.session-center-dot {
    fill: var(--text-muted);
    transition: all 0.5s ease;
}
.session-center-dot.active {
    fill: var(--color-green);
    filter: drop-shadow(0 0 8px var(--color-green));
}

@keyframes sessionPulse {
    0% {
        r: 60px;
        stroke-opacity: 0.3;
    }
    100% {
        r: 90px;
        stroke-opacity: 0.8;
        filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.3));
    }
}

/* News marker pins on the map */
.map-pin {
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.map-pin:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}
.pin-flag {
    font-size: 1.6rem;
}
.pin-pulse-ring {
    fill: none;
    stroke-width: 1.5;
    animation: pinPulse 2s infinite;
}
.pin-pulse-ring.BUY {
    stroke: var(--color-green);
}
.pin-pulse-ring.SELL {
    stroke: var(--color-red);
}
.pin-pulse-ring.NEUTRAL {
    stroke: var(--color-gold);
}

@keyframes pinPulse {
    0% {
        r: 10px;
        opacity: 1;
    }
    100% {
        r: 25px;
        opacity: 0;
    }
}

/* Info tooltip detail card */
.map-info-card {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
}
.map-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}
.map-info-exchange {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--bg-primary);
}
.map-info-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
    </style>


/* ==========================================================================
   AlgoAI Premium & Mobile Responsive Theme Overrides
   ========================================================================== */

/* Responsive and Hamburger Menu Buttons styling */
#mobile-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 16px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 100;
}

#mobile-sidebar-toggle:hover {
    background-color: var(--bg-accent);
    border-color: rgba(255, 255, 255, 0.1);
}

#mobile-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    margin-left: auto;
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    transition: all 0.2s ease;
}

#mobile-sidebar-close:hover {
    background-color: var(--color-red);
    color: white;
    border-color: transparent;
}

/* Sidebar backdrop overlay for mobile */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 7, 13, 0.8);
    backdrop-filter: blur(8px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Premium Glassmorphic Cards */
.counter-card, .chart-card, .terminal-card, .coder-card, .settings-card, .brain-details-card, .session-card, .traderoom-sidebar, .table-container, .login-box {
    background: rgba(12, 16, 27, 0.7) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease !important;
}

.counter-card:hover, .chart-card:hover, .terminal-card:hover, .coder-card:hover, .settings-card:hover {
    border-color: rgba(16, 185, 129, 0.25) !important;
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.05) !important;
}

/* Form Controls futuristic polish */
input, select, textarea {
    background: rgba(9, 13, 22, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-green) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    background: rgba(9, 13, 22, 0.9) !important;
}

/* Micro animations on primary elements */
.save-btn, .copy-btn, .modal-btn, .traderoom-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.save-btn:hover, .copy-btn:hover, .modal-btn:hover {
    transform: translateY(-1px);
    opacity: 1 !important;
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3) !important;
}

.save-btn:active, .copy-btn:active, .modal-btn:active {
    transform: translateY(0);
}

.menu-item {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Chat Room visual updates */
.chat-msg {
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    max-width: 80% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 12px !important;
}

.chat-msg.outgoing {
    background: linear-gradient(135deg, var(--color-green), #0d9488) !important;
    color: var(--bg-primary) !important;
    font-weight: 500;
}

.chat-msg.incoming {
    background: var(--bg-accent) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Table header polish */
th {
    letter-spacing: 1px;
    font-size: 0.8rem !important;
    border-bottom: 2px solid rgba(255,255,255,0.08) !important;
}

/* Sydney, Tokyo, London, NY session badges glow */
.session-card {
    transition: all 0.3s ease;
}
.session-card.active-session {
    border-color: var(--color-green) !important;
    box-shadow: 0 0 15px var(--color-green-glow) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

/* Dynamic view-section loading animation */
.view-section {
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    #mobile-sidebar-toggle {
        display: flex;
    }
    
    #mobile-sidebar-close {
        display: flex;
    }
    
    #sidebar-nav {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 100;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6) !important;
        background-color: var(--bg-secondary);
    }
    
    #sidebar-nav.open {
        transform: translateX(0);
    }
    
    body {
        position: relative;
    }
    
    main {
        width: 100%;
        min-width: 0;
    }
    
    header {
        padding: 0 20px;
    }
    
    .content-area {
        padding: 20px;
        gap: 24px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
    
    .world-map-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
    
    .agents-chat-container {
        grid-template-columns: 1fr !important;
        height: auto;
        min-height: 500px;
    }
    
    .agents-list-panel {
        max-height: 180px;
    }
    
    .chat-room-panel {
        height: 480px;
    }
    
    .brain-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
        height: auto;
    }
    
    #brain-network-container {
        height: 420px;
    }
    
    .system-monitor-card {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

@media (max-width: 640px) {
    .system-monitor-card {
        grid-template-columns: 1fr !important;
    }
    
    .counters-grid {
        grid-template-columns: 1fr !important;
    }
    
    header {
        flex-direction: column !important;
        height: auto !important;
        padding: 16px !important;
        gap: 14px !important;
        align-items: flex-start !important;
    }
    
    .header-controls {
        width: 100% !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    #kill-switch-btn {
        margin-right: 0 !important;
    }
    
    .traderoom-header {
        flex-direction: column !important;
        gap: 14px !important;
        align-items: flex-start !important;
    }
    
    .traderoom-controls {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .traderoom-btn {
        flex-grow: 1 !important;
        text-align: center !important;
    }
    
    .coder-card {
        height: 380px !important;
    }
}


/* ==========================================================================
   Skeleton Loaders, Toast Notifications & Chart Controls Styles
   ========================================================================== */

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.03) 75%) !important;
    background-size: 200% 100% !important;
    animation: pulse-skeleton 1.6s infinite !important;
    color: transparent !important;
    border-radius: 4px;
    display: inline-block;
}

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

/* Skeleton placeholders for dynamic content */
.skeleton-td-div {
    height: 14px;
    width: 80%;
    border-radius: 4px;
}

.skeleton-log-line {
    height: 12px;
    width: 90%;
    margin: 8px 0;
    border-radius: 3px;
}

/* Toast Notifications */
.toast-notification {
    min-width: 280px;
    max-width: 380px;
    background: rgba(12, 16, 27, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    padding: 12px 18px !important;
    border-radius: 10px !important;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.toast-notification.success { border-left: 4px solid var(--color-green) !important; }
.toast-notification.error { border-left: 4px solid var(--color-red) !important; }
.toast-notification.info { border-left: 4px solid #00f2fe !important; }
.toast-notification.warning { border-left: 4px solid var(--color-gold) !important; }

.toast-icon { font-size: 1.25rem; }
.toast-content { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.toast-title { font-weight: 700; font-size: 0.88rem; color: #fff; }
.toast-msg { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.3; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; transition: color 0.2s; padding: 2px; }
.toast-close:hover { color: #fff; }

@keyframes toastSlideIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSlideOut {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(20px) scale(0.95); }
}

/* ApexCharts Premium Toolbar Styles */
.apexcharts-toolbar {
    top: -36px !important;
    right: 10px !important;
    z-index: 100 !important;
    background: transparent !important;
    border: none !important;
}

.apexcharts-toolbar .apexcharts-menu-icon, 
.apexcharts-toolbar .apexcharts-zoom-icon, 
.apexcharts-toolbar .apexcharts-zoomin-icon, 
.apexcharts-toolbar .apexcharts-zoomout-icon, 
.apexcharts-toolbar .apexcharts-reset-icon, 
.apexcharts-toolbar .apexcharts-pan-icon, 
.apexcharts-toolbar .apexcharts-selection-icon {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 6px !important;
    padding: 5px !important;
    margin-left: 5px !important;
    transition: all 0.2s !important;
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.apexcharts-toolbar svg {
    fill: var(--text-secondary) !important;
    width: 14px !important;
    height: 14px !important;
}

.apexcharts-toolbar div:hover svg {
    fill: var(--color-green) !important;
}

.apexcharts-toolbar .apexcharts-menu {
    background: rgba(12, 16, 27, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    padding: 6px 0 !important;
}

.apexcharts-toolbar .apexcharts-menu-item {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    transition: background 0.2s !important;
}

.apexcharts-toolbar .apexcharts-menu-item:hover {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--color-green) !important;
}


/* ==========================================================================
   Global Map News & Calendar Feeds Layout
   ========================================================================== */
.map-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
    width: 100%;
}

@media (max-width: 1024px) {
    .map-news-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}


/* ==========================================================================
   Evolution Tab Custom Badges, Micro-badges & Range Input Styles
   ========================================================================== */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.status-badge.archived {
    background: rgba(100, 116, 139, 0.1) !important;
    border: 1px solid rgba(100, 116, 139, 0.2) !important;
    color: #64748b !important;
}

.status-badge.deployed {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    color: var(--color-green) !important;
}

.status-badge.incubating {
    background: rgba(245, 158, 11, 0.1) !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    color: var(--color-gold) !important;
}

.agent-micro-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-secondary);
}

.agent-micro-badge.buy {
    color: var(--color-green) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

.agent-micro-badge.sell {
    color: var(--color-red) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.agent-micro-badge.safe {
    color: #00f2fe !important;
    border-color: rgba(0, 242, 254, 0.2) !important;
    background: rgba(0, 242, 254, 0.05) !important;
}

.agent-micro-badge.high_risk {
    color: var(--color-gold) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

/* Futuristic Hologram Consensus Modal Styles */
@keyframes scanAnimation {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

@keyframes blinker {
    50% { opacity: 0.3; }
}

.hologram-scanline {
    animation: scanAnimation 5s linear infinite;
}

.agent-card-active-fund {
    border-color: #4facfe !important;
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.3) !important;
    background: rgba(79, 172, 254, 0.05) !important;
}

.agent-card-active-tech {
    border-color: #00f2fe !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3) !important;
    background: rgba(0, 242, 254, 0.05) !important;
}

.agent-card-active-risk {
    border-color: #10b981 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

.debate-typing::after {
    content: "█";
    animation: blinker 1s infinite;
}
