:root {
  --atlas-bg: #08111b;
  --atlas-bg-soft: #0f1b2a;
  --atlas-bg-card: rgba(14, 24, 39, 0.92);
  --atlas-border: rgba(130, 149, 179, 0.16);
  --atlas-text: #ebf0f7;
  --atlas-muted: #98a8bd;
  --atlas-green: #28cf8d;
  --atlas-red: #ff6a76;
  --atlas-yellow: #f6c453;
  --atlas-accent: #8f6dff;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--atlas-text);
  background:
    radial-gradient(circle at top left, rgba(143, 109, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(40, 207, 141, 0.12), transparent 22%),
    linear-gradient(180deg, #09111b 0%, #050b12 100%);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.atlas-shell {
  min-height: 100vh;
  display: flex;
}

.atlas-sidebar {
  width: 240px;
  padding: 24px 18px;
  border-right: 1px solid var(--atlas-border);
  background: rgba(5, 11, 18, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 100vh;
}

.atlas-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.atlas-brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8f6dff, #6547e8);
  font-weight: 700;
}

.atlas-brand h1 {
  font-size: 1.1rem;
  margin: 0;
}

.atlas-brand small,
.atlas-muted {
  color: var(--atlas-muted);
}

.atlas-nav .nav-link {
  color: var(--atlas-text);
  border-radius: 12px;
  margin-bottom: 6px;
}

.atlas-nav .nav-link.active,
.atlas-nav .nav-link:hover {
  color: #fff;
  background: rgba(143, 109, 255, 0.18);
}

.atlas-main {
  flex: 1;
  padding: 24px;
}

.atlas-card,
.card {
  background: var(--atlas-bg-card);
  border: 1px solid var(--atlas-border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.table,
.form-control,
.form-select,
.form-check-label,
.nav-tabs .nav-link,
.accordion-button {
  color: var(--atlas-text);
}

.table {
  --bs-table-color: var(--atlas-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-hover-bg: rgba(143, 109, 255, 0.06);
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.form-control:focus,
.form-select:focus {
  color: var(--atlas-text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(143, 109, 255, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(143, 109, 255, 0.12);
}

.badge.bg-success-subtle {
  color: var(--atlas-green) !important;
}

.badge.bg-danger-subtle {
  color: var(--atlas-red) !important;
}

.badge.bg-warning-subtle {
  color: var(--atlas-yellow) !important;
}

.atlas-clickable {
  cursor: pointer;
}

.atlas-page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.atlas-stat {
  min-height: 124px;
}

.atlas-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.atlas-code {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.85rem;
}

.atlas-pre {
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 991.98px) {
  .atlas-shell {
    display: block;
  }

  .atlas-sidebar {
    width: auto;
    min-height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--atlas-border);
  }

  .atlas-main {
    padding: 16px;
  }

  .atlas-detail-grid {
    grid-template-columns: 1fr;
  }
}
