/* SKAI Bot Control Center - Styles */

:root {
    --bg-primary: #0a0b0f;
    --bg-secondary: #12141a;
    --bg-tertiary: #1a1d26;
    --bg-card: rgba(26, 29, 38, 0.8);
    --border-color: rgba(99, 102, 241, 0.2);
    --border-hover: rgba(99, 102, 241, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --mev-color: #f59e0b;
    --mev-bg: rgba(245, 158, 11, 0.1);
    --mm-color: #3b82f6;
    --mm-bg: rgba(59, 130, 246, 0.1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }
body { font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; }

/* Background Effects */
.bg-gradient { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%), radial-gradient(ellipse at 100% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%); pointer-events: none; z-index: 0; }
.bg-glow { position: fixed; border-radius: 50%; filter: blur(100px); pointer-events: none; z-index: 0; animation: float 20s ease-in-out infinite; }
.bg-glow-1 { width: 600px; height: 600px; background: rgba(99, 102, 241, 0.15); top: -200px; left: -200px; }
.bg-glow-2 { width: 400px; height: 400px; background: rgba(139, 92, 246, 0.1); bottom: -100px; right: -100px; animation-delay: -10s; }
#particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 30px); } }

/* Container */
.container { position: relative; z-index: 1; max-width: 1600px; margin: 0 auto; padding: 1rem; min-height: 100vh; }

/* Header */
.header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); margin-bottom: 1rem; backdrop-filter: blur(20px); }
.header-left, .header-right { display: flex; align-items: center; gap: 1.5rem; }
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 24px; height: 24px; color: white; }
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-size: 1.25rem; font-weight: 700; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-subtitle { font-size: 0.75rem; color: var(--text-muted); }
.connection-status { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--bg-tertiary); border-radius: var(--radius-md); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); animation: pulse 2s infinite; }
.connection-status.connected .status-dot { background: var(--success); }
.connection-status.disconnected .status-dot { background: var(--error); animation: none; }
.status-text { font-size: 0.875rem; color: var(--text-secondary); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.header-stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-family: var(--font-mono); font-size: 0.875rem; color: var(--text-primary); font-weight: 600; }

/* Tab Navigation */
.tab-nav { display: flex; gap: 0.5rem; padding: 0.5rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); margin-bottom: 1rem; backdrop-filter: blur(20px); overflow-x: auto; }
.tab-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.25rem; background: transparent; border: none; border-radius: var(--radius-md); color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.tab-btn svg { width: 18px; height: 18px; }
.tab-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.tab-btn.active { background: var(--accent-primary); color: white; }

/* Tab Content */
.tab-content { position: relative; }
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Dashboard Grid */
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1200px) { .dashboard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; backdrop-filter: blur(20px); transition: var(--transition); }
.card:hover { border-color: var(--border-hover); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.card-title { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; font-weight: 600; }
.card-title .icon { width: 20px; height: 20px; color: var(--accent-primary); }
.card-content { padding: 1.25rem; }
.card-full { grid-column: 1 / -1; }

/* Status Grid */
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.status-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.75rem; background: var(--bg-tertiary); border-radius: var(--radius-md); }
.status-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--error-bg); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.status-icon svg { width: 20px; height: 20px; color: var(--error); }
.status-icon.active { background: var(--success-bg); }
.status-icon.active svg { color: var(--success); }
.status-name { font-size: 0.75rem; color: var(--text-secondary); text-align: center; }

/* Signal Display */
.signal-display { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1rem; }
.signal-action { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; padding: 1rem 1.5rem; border-radius: var(--radius-md); text-transform: uppercase; min-width: 120px; text-align: center; }
.signal-action.buy { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.signal-action.sell { background: var(--error-bg); color: var(--error); border: 1px solid var(--error); }
.signal-action.hold { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }
.signal-meta { flex: 1; display: flex; flex-direction: column; gap: 0.75rem; }
.signal-stat { display: flex; align-items: center; gap: 0.75rem; }
.signal-label { font-size: 0.75rem; color: var(--text-muted); min-width: 80px; }
.progress-bar { flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); border-radius: 4px; transition: width 0.5s ease; }
.progress-fill.strength { background: linear-gradient(90deg, var(--warning), var(--success)); }
.signal-value { font-family: var(--font-mono); font-size: 0.875rem; min-width: 40px; text-align: right; }
.signal-breakdown { display: flex; gap: 1rem; }
.breakdown-item { flex: 1; padding: 0.75rem; background: var(--bg-tertiary); border-radius: var(--radius-md); text-align: center; }
.breakdown-item.bullish { border-left: 3px solid var(--success); }
.breakdown-item.bearish { border-left: 3px solid var(--error); }
.breakdown-label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.25rem; }
.breakdown-value { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; }
.breakdown-item.bullish .breakdown-value { color: var(--success); }
.breakdown-item.bearish .breakdown-value { color: var(--error); }

/* Capital Grid */
.capital-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.capital-item { padding: 1rem; background: var(--bg-tertiary); border-radius: var(--radius-md); }
.capital-item.mev { border-left: 3px solid var(--mev-color); }
.capital-item.mm { border-left: 3px solid var(--mm-color); }
.capital-item.profit { border-left: 3px solid var(--success); }
.capital-label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.25rem; }
.capital-value { font-family: var(--font-mono); font-size: 1.125rem; font-weight: 600; }

/* Performance Grid */
.perf-grid { display: flex; flex-direction: column; gap: 1rem; }
.perf-item { display: flex; align-items: center; gap: 1rem; }
.perf-label { font-size: 0.8rem; color: var(--text-secondary); min-width: 100px; }
.perf-bar { flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.perf-fill { height: 100%; background: var(--accent-primary); border-radius: 4px; transition: width 0.5s ease; }
.perf-value { font-family: var(--font-mono); font-size: 0.8rem; min-width: 70px; text-align: right; }

/* Environment List */
.env-list { display: flex; flex-direction: column; gap: 0.5rem; }
.env-item { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.env-item:last-child { border-bottom: none; }
.env-key { font-size: 0.8rem; color: var(--text-muted); }
.env-value { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-primary); }

/* Actions Grid */
.actions-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.action-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.875rem; cursor: pointer; transition: var(--transition); }
.action-btn:hover { background: var(--accent-primary); border-color: var(--accent-primary); }
.action-btn svg { width: 18px; height: 18px; }

/* Buckets Tab */
.buckets-header { text-align: center; margin-bottom: 1.5rem; }
.buckets-header h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.buckets-header p { color: var(--text-muted); }
.buckets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1200px) { .buckets-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .buckets-grid { grid-template-columns: 1fr; } }
.bucket-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); }
.bucket-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.bucket-card.mev { border-top: 3px solid var(--mev-color); }
.bucket-card.mm { border-top: 3px solid var(--mm-color); }
.bucket-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--border-color); }
.bucket-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.bucket-icon { font-size: 1.25rem; }
.bucket-stats { padding: 1rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.bucket-stat { display: flex; flex-direction: column; gap: 0.25rem; }
.bucket-stat .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.bucket-stat .value { font-family: var(--font-mono); font-size: 0.9rem; }
.bucket-stat .value.profit { color: var(--success); }
.bucket-config { padding: 0.75rem 1rem; border-top: 1px solid var(--border-color); }
.btn-config { width: 100%; padding: 0.5rem; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.8rem; cursor: pointer; transition: var(--transition); }
.btn-config:hover { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }

/* Signals Tab */
.signals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.strategy-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; }
.strategy-card.wide { grid-column: 1 / -1; }
.strategy-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--border-color); }
.strategy-header h3 { font-size: 1rem; font-weight: 600; }
.strategy-status { font-family: var(--font-mono); font-size: 0.875rem; padding: 0.25rem 0.75rem; background: var(--bg-tertiary); border-radius: var(--radius-sm); }
.strategy-details { padding: 1rem; }
.detail-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.detail-row:last-child { border-bottom: none; }
.detail-row span:first-child { color: var(--text-muted); }
.detail-row span:last-child { font-family: var(--font-mono); }

/* MEV Tab */
.mev-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.mev-grid .card.wide { grid-column: 1 / -1; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat-item { padding: 1rem; background: var(--bg-tertiary); border-radius: var(--radius-md); }
.stat-item .stat-label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.25rem; }
.stat-item .stat-value { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; }
.risk-settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.risk-item { padding: 1rem; background: var(--bg-tertiary); border-radius: var(--radius-md); text-align: center; }
.risk-label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.5rem; }
.risk-value { font-family: var(--font-mono); font-size: 1.125rem; font-weight: 600; }

/* Activity Log */
.activity-list { max-height: 500px; overflow-y: auto; }
.activity-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-bottom: 1px solid var(--border-color); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 1rem; }
.activity-text { flex: 1; font-size: 0.875rem; }
.activity-time { font-size: 0.75rem; color: var(--text-muted); }

/* Modals */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); width: 100%; max-width: 500px; max-height: 90vh; overflow: hidden; animation: slideIn 0.3s ease; }
.modal-content.modal-large { max-width: 600px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-size: 1.125rem; }
.modal-body { padding: 1.25rem; max-height: 70vh; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
@keyframes slideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Settings */
.settings-section { margin-bottom: 1.5rem; }
.settings-section h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); }
.setting-row:last-child { border-bottom: none; }
.setting-row label { font-size: 0.875rem; }
.setting-row input[type="number"] { width: 100px; padding: 0.5rem; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-family: var(--font-mono); text-align: right; }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 24px; transition: var(--transition); }
.toggle-slider:before { content: ''; position: absolute; height: 18px; width: 18px; left: 2px; bottom: 2px; background: var(--text-secondary); border-radius: 50%; transition: var(--transition); }
.toggle input:checked + .toggle-slider { background: var(--accent-primary); border-color: var(--accent-primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); background: white; }

/* Chat */
.chat-messages { height: 300px; overflow-y: auto; padding: 1rem; background: var(--bg-tertiary); border-radius: var(--radius-md); margin-bottom: 1rem; }
.chat-message { margin-bottom: 1rem; }
.chat-message.user { text-align: right; }
.chat-message .message-text { display: inline-block; padding: 0.75rem 1rem; background: var(--bg-secondary); border-radius: var(--radius-md); max-width: 80%; word-wrap: break-word; overflow-wrap: break-word; }
.chat-message.user .message-text { background: var(--accent-primary); color: white; }
.chat-input-container { display: flex; gap: 0.75rem; }
.chat-input-container input { flex: 1; padding: 0.75rem 1rem; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.875rem; }
.chat-input-container input:focus { outline: none; border-color: var(--accent-primary); }

/* Mobile Chat Modal Optimization */
@media (max-width: 600px) {
    .modal { padding: 0; align-items: flex-end; }
    .modal-content { max-width: 100%; width: 100%; max-height: 85vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation: slideUp 0.3s ease; }
    .modal-body { padding: 1rem; max-height: calc(85vh - 120px); }
    .chat-messages { height: calc(85vh - 200px); min-height: 200px; padding: 0.75rem; }
    .chat-message .message-text { max-width: 85%; padding: 0.5rem 0.75rem; font-size: 0.875rem; }
    .chat-input-row { flex-direction: row; gap: 0.5rem; }
    .chat-input-row input { padding: 0.625rem 0.875rem; font-size: 1rem; }
    .chat-input-row .btn-primary { padding: 0.625rem 1rem; white-space: nowrap; }
    .modal-header { padding: 0.875rem 1rem; }
    .modal-header h3 { font-size: 1rem; }
}

@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Buttons */
.btn-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.btn-icon:hover { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-hover); }
.btn-icon svg { width: 18px; height: 18px; }
.btn-primary { padding: 0.75rem 1.5rem; background: var(--accent-primary); border: none; border-radius: var(--radius-md); color: white; font-weight: 500; cursor: pointer; transition: var(--transition); }
.btn-primary:hover { background: var(--accent-secondary); }
.btn-secondary { padding: 0.75rem 1.5rem; background: transparent; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-weight: 500; cursor: pointer; transition: var(--transition); }
.btn-secondary:hover { background: var(--bg-tertiary); }
.btn-text { background: none; border: none; color: var(--accent-primary); font-size: 0.875rem; cursor: pointer; }
.btn-text:hover { text-decoration: underline; }

/* Badges */
.badge { padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 500; border-radius: var(--radius-sm); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error { background: var(--error-bg); color: var(--error); }

/* Toast */
.toast-container { position: fixed; bottom: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 1rem 1.5rem; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); animation: slideInRight 0.3s ease; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast.warning { border-left: 3px solid var(--warning); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* Section Header */
.section-header { text-align: center; margin-bottom: 1.5rem; }
.section-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.section-header p { color: var(--text-muted); font-size: 0.9rem; }

/* Chart Containers */
.chart-container { height: 200px; position: relative; }
.chart-container-lg { height: 280px; position: relative; }
.chart-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 1024px) { .chart-row { grid-template-columns: 1fr; } }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 1024px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stats-row { grid-template-columns: 1fr; } }

/* Stat Cards */
.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); backdrop-filter: blur(20px); transition: var(--transition); }
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.stat-icon { width: 48px; height: 48px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.stat-icon svg { width: 24px; height: 24px; color: white; }
.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-info { display: flex; flex-direction: column; }
.stat-number { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }

/* Cost Cards Row */
.cost-cards-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 1200px) { .cost-cards-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .cost-cards-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .cost-cards-row { grid-template-columns: 1fr; } }

.cost-card { padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); text-align: center; backdrop-filter: blur(20px); transition: var(--transition); }
.cost-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.cost-card.total { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2)); border-color: var(--accent-primary); }
.cost-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.cost-card-title { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.cost-card-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.cost-card-detail { font-size: 0.75rem; color: var(--text-secondary); }

/* Costs Summary (Overview) */
.costs-summary { display: flex; flex-direction: column; gap: 0.5rem; }
.cost-item { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.cost-item:last-child { border-bottom: none; }
.cost-item span:first-child { color: var(--text-secondary); font-size: 0.875rem; }
.cost-item span:last-child { font-family: var(--font-mono); font-size: 0.875rem; }
.cost-item.total { padding-top: 0.75rem; margin-top: 0.25rem; border-top: 1px solid var(--accent-primary); }
.cost-item.total span { font-weight: 600; color: var(--text-primary); }

/* Header Cost Stat */
.header-stat.cost { border-left: 1px solid var(--border-color); padding-left: 1.5rem; }
.header-stat.cost .stat-value { color: var(--success); }

/* Data Table */
.table-container { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.875rem 1rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.data-table th { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; background: var(--bg-tertiary); }
.data-table td { font-size: 0.875rem; }
.data-table tbody tr:hover { background: rgba(99, 102, 241, 0.05); }
.data-table code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-secondary); }
.data-table tfoot td { font-weight: 600; background: var(--bg-tertiary); border-top: 2px solid var(--accent-primary); }
.total-row td { font-weight: 700; }

/* Status & Bucket Badges */
.bucket-badge { display: inline-block; padding: 0.25rem 0.5rem; font-size: 0.7rem; font-weight: 500; border-radius: var(--radius-sm); text-transform: uppercase; }
.bucket-badge.mev { background: var(--mev-bg); color: var(--mev-color); }
.bucket-badge.mm { background: var(--mm-bg); color: var(--mm-color); }

.status-badge { display: inline-block; padding: 0.25rem 0.5rem; font-size: 0.7rem; font-weight: 500; border-radius: var(--radius-sm); text-transform: uppercase; }
.status-badge.active { background: var(--success-bg); color: var(--success); }
.status-badge.pending { background: var(--warning-bg); color: var(--warning); }
.status-badge.inactive { background: var(--error-bg); color: var(--error); }

/* P/L Colors */
.positive { color: var(--success) !important; }
.negative { color: var(--error) !important; }

/* Search Input */
.search-input { padding: 0.5rem 1rem; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.875rem; width: 200px; }
.search-input:focus { outline: none; border-color: var(--accent-primary); }
.search-input::placeholder { color: var(--text-muted); }

/* Chat Input Row */
.chat-input-row { display: flex; gap: 0.75rem; }
.chat-input-row input { flex: 1; padding: 0.75rem 1rem; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); }
.chat-input-row input:focus { outline: none; border-color: var(--accent-primary); }

/* Modal Footer & Close */
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--text-primary); }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border-color); }
.modal-lg { max-width: 600px; }

/* Activity Log Container */
.activity-log { max-height: 500px; overflow-y: auto; }

