/* =========================================================
   Nova CMS — global styles
   ========================================================= */

/* Dark theme base */
body {
  background: #0f0f1a;
  color: #e2e8f0;
}

/* Sidebar */
.sidebar {
  background: #13131f;
  border-right: 1px solid #1e1e2e;
  min-height: 100vh;
}

.sidebar-brand {
  background: #0d0d1a;
}

.sidebar-link {
  color: #94a3b8;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: #e2e8f0;
  background: rgba(99, 102, 241, 0.2);
}

.sidebar-link.active {
  color: #818cf8;
}

/* Cards */
.card-dark {
  background: #1a1a2e;
  border: 1px solid #1e1e3a;
  color: #e2e8f0;
}

.card-dark .card-header {
  background: #13131f;
  border-bottom: 1px solid #1e1e3a;
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 0.5rem 0.875rem;
}

.card-dark .card-body {
  padding: 0.875rem;
}

/* Stats cards */
.stat-card {
  background: #1a1a2e;
  border: 1px solid #1e1e3a;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: #e2e8f0;
}

.stat-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Tables */
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
}

.table-dark th {
  background: #13131f;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #1e1e3a;
}

/* Buttons */
.btn-xs {
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* Small tree action buttons */
.tree-action {
  color: #475569;
  font-size: 0.75rem;
  text-decoration: none;
  padding: 1px 3px;
  border-radius: 3px;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
}

.tree-action:hover {
  color: #94a3b8;
}

/* Form controls dark override */
.form-control:focus,
.form-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.form-control.bg-dark,
.form-select.bg-dark {
  color: #e2e8f0;
}

.form-control.bg-dark::placeholder {
  color: #475569;
}

/* Tabs */
.nav-tabs .nav-link {
  color: #64748b;
  border-color: transparent;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

.nav-tabs .nav-link:hover {
  color: #94a3b8;
  border-color: transparent;
}

.nav-tabs .nav-link.active {
  color: #818cf8;
  background: #1a1a2e;
  border-color: #1e1e3a #1e1e3a #1a1a2e;
}

.nav-tabs {
  border-bottom-color: #1e1e3a;
}

/* List groups */
.list-group-item-dark {
  background: #1a1a2e;
  border-color: #1e1e3a;
  color: #e2e8f0;
}

.list-group-item-dark + .list-group-item-dark {
  border-top-color: #1e1e3a;
}

/* Badges */
.badge.bg-secondary {
  background: #1e293b !important;
  color: #94a3b8;
}

/* CodeMirror dark border */
.CodeMirror {
  border: 1px solid #1e1e3a;
  border-radius: 4px;
}

/* Alert tweaks */
.alert {
  font-size: 0.875rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f0f1a; }
::-webkit-scrollbar-thumb { background: #1e1e3a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #2d2d4e; }
