/* ============================================================================
   AI FINTECH CONTROL CENTER - DARK MODE THEME
   ============================================================================ */

:root {
  --bg-dark: #0a0d14;
  --bg-card: #121824;
  --bg-card-hover: #1a2233;
  --border-color: #232d42;
  --text-main: #f0f4f8;
  --text-muted: #8a99ad;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;

  --color-green: #10b981;
  --color-green-glow: rgba(16, 185, 129, 0.2);
  --color-red: #ef4444;
  --color-red-glow: rgba(239, 68, 68, 0.2);
  --color-amber: #f59e0b;
  --color-neutral: #6b7280;

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --border-radius: 12px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 40px;
}

/* Header Navigation Bar */
.navbar {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.exchange-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: #1e293b;
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.status-badges {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
}

.status-indicator.running {
  background: var(--color-green-glow);
  color: var(--color-green);
  border: 1px solid var(--color-green);
}

.status-indicator.paused {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-amber);
  border: 1px solid var(--color-amber);
}

.status-indicator.stopped {
  background: var(--color-red-glow);
  color: var(--color-red);
  border: 1px solid var(--color-red);
}

.mode-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
}

.mode-badge.paper {
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #0284c7;
}

.mode-badge.live {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #ef4444;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Layout Grid */
.container {
  max-width: 1440px;
  margin: 24px auto;
  padding: 0 24px;
}

.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

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

.btn {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-start {
  background: var(--color-green);
  color: #fff;
}
.btn-start:hover { background: #059669; }

.btn-pause {
  background: var(--color-amber);
  color: #fff;
}
.btn-pause:hover { background: #d97706; }

.btn-stop {
  background: #4b5563;
  color: #fff;
}
.btn-stop:hover { background: #374151; }

.btn-emergency {
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}
.btn-emergency:hover { background: #b91c1c; }

.grid-5-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.card-value {
  font-size: 1.5rem;
  font-weight: 800;
}

.card-value.profit { color: var(--color-green); }
.card-value.loss { color: var(--color-red); }

/* Main Section Split */
.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

.chart-container {
  height: 380px;
  position: relative;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.table-custom th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.table-custom td {
  padding: 12px;
  border-bottom: 1px solid #1a2233;
}

/* Activity Feed */
.activity-stream {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 8px;
  background: #161e2e;
  border-left: 3px solid var(--accent-blue);
  display: flex;
  justify-content: space-between;
}

.activity-item.signal { border-left-color: var(--accent-cyan); }
.activity-item.risk { border-left-color: var(--color-amber); }
.activity-item.order { border-left-color: var(--color-green); }

/* Confidence Badges */
.confidence-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
}
.conf-high { background: rgba(16, 185, 129, 0.2); color: var(--color-green); }
.conf-medium { background: rgba(245, 158, 11, 0.2); color: var(--color-amber); }
.conf-low { background: rgba(239, 68, 68, 0.2); color: var(--color-red); }
