/* CapitalBot — Dark Trading Dashboard */

:root {
  --bg-card: #1a1d21;
  --bg-dark: #12141a;
  --border: rgba(255,255,255,0.07);
}

body {
  background-color: #0f1117;
  color: #e2e8f0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Cards ─────────────────────────────────────────── */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border) !important;
  border-radius: 10px;
}

.card-title {
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ── Stat Cards ─────────────────────────────────────── */
.stat-card .card-body {
  padding: 1rem 1.25rem;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
  background-color: #0d0f14 !important;
  border-bottom: 1px solid var(--border) !important;
}

.navbar-brand {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.nav-link {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem !important;
  border-radius: 6px;
  transition: background 0.15s;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255,193,7,0.12);
  color: #ffc107 !important;
}

/* ── Tables ─────────────────────────────────────────── */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: #e2e8f0;
  --bs-table-hover-bg: rgba(255,255,255,0.04);
  font-size: 0.82rem;
}

.table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  border-bottom: 1px solid var(--border);
  background: #111318;
  font-weight: 600;
}

.table td, .table th {
  border-color: var(--border);
  vertical-align: middle;
}

.table-dark {
  --bs-table-bg: #111318;
}

/* ── Badges ─────────────────────────────────────────── */
.badge {
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-warning {
  color: #000;
}

.btn-sm {
  font-size: 0.75rem;
}

/* ── Forms ─────────────────────────────────────────── */
.form-control, .form-select {
  background-color: #1e2028;
  border-color: rgba(255,255,255,0.1);
  color: #e2e8f0;
  font-size: 0.85rem;
}

.form-control:focus, .form-select:focus {
  background-color: #1e2028;
  border-color: #ffc107;
  color: #e2e8f0;
  box-shadow: 0 0 0 0.2rem rgba(255,193,7,0.15);
}

.form-label {
  color: #9ca3af;
  font-weight: 500;
}

.form-text {
  color: #6b7280;
  font-size: 0.72rem;
}

.input-group-text {
  background-color: #16181f;
  border-color: rgba(255,255,255,0.1);
  color: #9ca3af;
}

/* ── Alerts ─────────────────────────────────────────── */
.alert {
  font-size: 0.85rem;
  border-radius: 8px;
}

/* ── Calendar cards ─────────────────────────────────── */
.border-start.border-danger.border-3 {
  border-left-width: 3px !important;
}

/* ── Progress bars ──────────────────────────────────── */
.progress {
  background-color: rgba(255,255,255,0.08);
  border-radius: 99px;
}

/* ── Login page ─────────────────────────────────────── */
body.d-flex .card {
  border: 1px solid rgba(255,193,7,0.2) !important;
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f1117; }
::-webkit-scrollbar-thumb { background: #2d3148; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3d4160; }

/* ── Refresh button spin ────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin {
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

/* ── Responsive tweaks ──────────────────────────────── */
@media (max-width: 768px) {
  .stat-value { font-size: 1.4rem; }
  .container-fluid { padding: 0.5rem; }
}
