/* ─── Layout ─────────────────────────────────────────────── */
body {
  background: #0f1117;
  color: #d1d5db;
  min-height: 100vh;
}

#wrapper {
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────── */
#sidebar {
  width: 240px;
  min-height: 100vh;
  background: #13151f;
  border-right: 1px solid #1e2130;
  transition: width .2s;
}

#sidebar.collapsed {
  width: 0;
  padding: 0 !important;
  overflow: hidden;
}

#sidebar .brand-link {
  padding: 4px 0;
}

#sidebar .nav-link {
  color: #9ca3af;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .9rem;
  transition: background .15s, color .15s;
}

#sidebar .nav-link:hover {
  background: #1e2130;
  color: #fff;
}

#sidebar .nav-link.active {
  background: #1d4ed8;
  color: #fff;
}

/* ─── Top bar ────────────────────────────────────────────── */
.topbar {
  background: #13151f;
  min-height: 52px;
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: #13151f;
  border: 1px solid #1e2130;
  border-radius: 10px;
}

.card-header {
  background: #1a1d2e;
  border-bottom: 1px solid #1e2130;
  padding: .75rem 1.25rem;
  font-size: .9rem;
}

/* ─── Stat cards ─────────────────────────────────────────── */
.stat-card {
  border: 1px solid #1e2130;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ─── Tables ─────────────────────────────────────────────── */
.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: #1e2130;
  color: #d1d5db;
}

.table-header th {
  background: #1a1d2e;
  color: #9ca3af;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  border-color: #1e2130;
  padding: .75rem 1rem;
}

.table td {
  border-color: #1e2130;
  vertical-align: middle;
  padding: .75rem 1rem;
}

/* ─── Badges ─────────────────────────────────────────────── */
.bg-purple {
  background-color: #7c3aed !important;
}

/* ─── Service cards ──────────────────────────────────────── */
.svc-card {
  border: 1px solid #1e2130;
  transition: border-color .2s;
}
.svc-card:hover {
  border-color: #1d4ed8;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  margin-right: 4px;
}

.pulse-dot.active {
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ─── Login ──────────────────────────────────────────────── */
.login-body {
  background: #0f1117;
}

.login-card {
  background: #13151f;
  border: 1px solid #1e2130;
  border-radius: 16px;
}

.login-icon {
  width: 64px;
  height: 64px;
  background: #1d4ed820;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ─── File Manager ───────────────────────────────────────── */
.breadcrumb {
  --bs-breadcrumb-divider-color: #4b5563;
  --bs-breadcrumb-item-active-color: #fff;
  font-size: .875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #4b5563;
}

/* ─── Forms ──────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px #1d4ed820;
}

.form-control,
.form-select,
.input-group-text {
  background: #1a1d2e;
  border-color: #1e2130;
  color: #d1d5db;
}

/* ─── Modals ─────────────────────────────────────────────── */
.modal-content {
  background: #13151f;
  border: 1px solid #1e2130;
  border-radius: 12px;
}

.modal-header {
  border-bottom: 1px solid #1e2130;
}

.modal-footer {
  border-top: 1px solid #1e2130;
}

/* ─── Progress bars ──────────────────────────────────────── */
.progress {
  background: #1e2130;
}

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

/* ─── Code ───────────────────────────────────────────────── */
code {
  color: #60a5fa;
  background: transparent;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 767px) {
  #sidebar {
    position: fixed;
    z-index: 1000;
    height: 100%;
  }

  #sidebar.collapsed {
    transform: translateX(-100%);
  }

  #page-content {
    margin-left: 0;
  }
}
