/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #0f0f1a;
  color: #ccc;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

#react-entry-point,
#_dash-app-content {
  width: 100%;
  min-height: 100vh;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #13131f;
  border-bottom: 1px solid #1e1e30;
  padding: 0 40px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

.nav-live-badge {
  font-size: 12px;
  color: #4caf50;
  background: #4caf5015;
  border: 1px solid #4caf5030;
  padding: 5px 12px;
  border-radius: 20px;
}

/* ── Contenu principal ──────────────────────────────────────── */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 40px;
}

/* ── En-tête ────────────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.page-subtitle {
  font-size: 13px;
  color: #555;
  margin-top: 5px;
}

.refresh-badge {
  font-size: 12px;
  color: #7b61ff;
  background: #7b61ff15;
  border: 1px solid #7b61ff30;
  padding: 6px 16px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* ── Stats ──────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: #13131f;
  border: 1px solid #1e1e30;
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s, transform 0.15s;
}

.stat-card:hover {
  border-color: #7b61ff55;
  transform: translateY(-2px);
}

.stat-icon-wrapper { font-size: 26px; flex-shrink: 0; }

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.stat-label {
  font-size: 10px;
  color: #444;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── Contrôles ──────────────────────────────────────────────── */
.controls-bar {
  background: #13131f;
  border: 1px solid #1e1e30;
  border-radius: 14px;
  padding: 14px 24px;
  margin-bottom: 20px;
}

.controls-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-title {
  font-size: 13px;
  color: #555;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Dropdown FRANK ─────────────────────────────────────────── */
.frank-dropdown {
  min-width: 160px;
}

.frank-dropdown .Select-control {
  background: #0f0f1a !important;
  border: 1px solid #2a2a40 !important;
  border-radius: 8px !important;
  color: #fff !important;
}

.frank-dropdown .Select-menu-outer {
  background: #13131f !important;
  border: 1px solid #2a2a40 !important;
  border-radius: 8px !important;
}

.frank-dropdown .Select-option {
  background: #13131f !important;
  color: #ccc !important;
}

.frank-dropdown .Select-option:hover,
.frank-dropdown .Select-option.is-focused {
  background: #1e1e30 !important;
  color: #fff !important;
}

/* ── Checklist ──────────────────────────────────────────────── */
.dash-checklist { display: flex; gap: 20px; }

.dash-checklist label {
  font-size: 13px;
  color: #bbb;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 6px;
}

/* ── Graphique ──────────────────────────────────────────────── */
.graph-card {
  background: #13131f;
  border: 1px solid #1e1e30;
  border-radius: 14px;
  padding: 8px;
  overflow: hidden;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .main-content { padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 0 16px; }
}