body {
  margin: 0;
  background: #f4f6f9;
  color: #172033;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
a {
  color: inherit;
  text-decoration: none;
}
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: #1e3a5f;
  color: #d1d5db;
  overflow-y: auto;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 8px 22px;
  text-align: center;
}
.brand-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}
.brand span {
  display: block;
  color: #9ca3af;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.environment {
  margin: 0 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
}
.environment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.environment-dev {
  color: #60a5fa;
}
.environment-prod {
  color: #fb7185;
}
.environment-other {
  color: #fbbf24;
}
.nav-group {
  margin: 22px 10px 7px;
  color: #6b7280;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-link {
  display: block;
  margin: 3px 0;
  padding: 10px 12px;
  border-radius: 8px;
  
  color: #f1f5f9;
  font-weight: 600;
}
.nav-link:hover:not(.disabled),
.nav-link.active {
    background: #3b6ea5;
    color: #ffffff;
    font-weight: 700;
}
.nav-link.active {
  box-shadow: inset 3px 0 0 #3b82f6;
}
.nav-link.disabled {
    color: #8ea3b8;
    font-weight: 400;
    cursor: default;
}
.main {
  min-width: 0;
}
.topbar {
  height: 64px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-app {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.readonly-badge {
  padding: 5px 8px;
  border-radius: 6px;
  color: #475467;
  background: #f2f4f7;
  font-size: 10px;
  font-weight: 800;
}
.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  font-size: 22px;
}
.content {
  max-width: 1500px;
  padding: 32px;
  margin: 0 auto;
}
.page-heading {
  margin-bottom: 24px;
}
.page-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.eyebrow {
  margin: 0 0 6px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.page-description,
.muted {
  color: #667085;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.metric-card,
.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.metric-card {
  padding: 20px;
}
.metric-label,
.metric-help {
  display: block;
}
.metric-value {
  display: block;
  margin: 10px 0 5px;
  font-size: 30px;
}
.metric-help {
  color: #98a2b3;
  font-size: 12px;
}
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.panel {
  padding: 20px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}
.queue-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid #e5e7eb;
}
.table-panel {
  padding: 0;
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}
.data-table th {
  background: #fafbfc;
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
}
.cell-subtitle {
  display: block;
  margin-top: 3px;
  color: #98a2b3;
  font-size: 12px;
}
.align-right {
  text-align: right !important;
}
.table-action {
  color: #2563eb;
  font-weight: 700;
}
.chip,
.count-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}
.status,
.readiness {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.status-ok,
.readiness-ok {
  color: #15803d;
  background: #ecfdf3;
}
.status-off {
  color: #667085;
  background: #f2f4f7;
}
.readiness-error {
  color: #b42318;
  background: #fef3f2;
}
.button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
}
.button-disabled {
  background: #eaecf0;
  color: #98a2b3;
}
.button-full {
  width: 100%;
  margin-top: 18px;
}
.empty-state {
  min-height: 170px;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  color: #667085;
}
.empty-state.compact {
  min-height: 90px;
}
.breadcrumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: #667085;
  font-size: 12px;
}
.breadcrumbs a {
  color: #2563eb;
  font-weight: 700;
}
.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.status-strip > div {
  padding: 14px 16px;
  background: #fff;
  display: flex;
  justify-content: space-between;
}
.text-ok {
  color: #15803d;
}
.text-off {
  color: #667085;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.detail-main {
  display: grid;
  gap: 18px;
}
.sticky-panel {
  position: sticky;
  top: 82px;
}
.entity-card {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.entity-card + .entity-card {
  margin-top: 12px;
}
.entity-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.entity-card-heading strong,
.entity-card-heading span {
  display: block;
}
.entity-card-heading span {
  color: #667085;
  font-size: 12px;
}
.definition-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
dt {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 700;
}
dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.url-box,
.token-grid > div {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
}
.url-box span,
.token-grid span {
  display: block;
  margin-bottom: 5px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
code {
  font-family: Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.token-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.validation-list {
  display: grid;
  gap: 14px;
}
.validation-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
}
.validation-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.validation-ok {
  color: #15803d;
  background: #ecfdf3;
}
.validation-warning {
  color: #b45309;
  background: #fff7ed;
}
.validation-error {
  color: #b42318;
  background: #fef3f2;
}
.validation-item strong,
.validation-item span {
  display: block;
}
.validation-item span:not(.validation-icon) {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
}
.small {
  font-size: 12px;
}
@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .sticky-panel {
    position: static;
  }
  .definition-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .admin-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    z-index: 30;
    width: 250px;
    transform: translateX(-100%);
    transition: 0.18s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    padding: 0 18px;
  }
  .content {
    padding: 22px 16px;
  }
  .metric-grid,
  .panel-grid,
  .status-strip,
  .definition-grid,
  .token-grid {
    grid-template-columns: 1fr;
  }
  .page-heading-row {
    display: block;
  }
}

.revision-active { color: #15803d; font-weight: 700; white-space: nowrap; }
