:root {
  color: #18212f;
  background: #eef2f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

a {
  color: #2557d6;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

button,
input,
select { font: inherit; }

button {
  border: 0;
  border-radius: 12px;
  background: #214ad6;
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  width: 100%;
}

input,
select {
  border: 1px solid #ccd6e5;
  border-radius: 12px;
  color: #18212f;
  padding: 0.7rem 0.8rem;
  width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e8edf4;
  padding: 0.8rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: #617086;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

code {
  background: #eef3fb;
  border-radius: 7px;
  color: #29384d;
  padding: 0.15rem 0.35rem;
}

.login-page {
  align-items: center;
  background: radial-gradient(circle at top left, #d7e6ff, transparent 36rem), linear-gradient(135deg, #0e1728, #253b72);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
  display: grid;
  gap: 1rem;
  max-width: 420px;
  padding: 2rem;
  width: 100%;
}

.login-card h1,
.sidebar h1,
.page-header h2 { margin: 0; }

.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #111a2b;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.5rem;
}

.sidebar nav {
  display: grid;
  gap: 0.4rem;
}

.sidebar a {
  border-radius: 12px;
  color: #d7e0ef;
  padding: 0.75rem 0.9rem;
}

.sidebar a.active,
.sidebar a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  text-decoration: none;
}

.content { padding: 2rem; }

.page-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.eyebrow {
  color: #6b7a90;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 0.3rem;
  text-transform: uppercase;
}

.sidebar .eyebrow { color: #89a7df; }

.subtle { color: #69778a; }

.error {
  color: #b42318;
  margin: 0;
}

.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.stat,
.panel,
.mini-card {
  background: white;
  border: 1px solid #e4ebf4;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(37, 57, 91, 0.07);
}

.stat { padding: 1.2rem; }

.stat span,
.mini-card span {
  color: #66758a;
  display: block;
  font-size: 0.85rem;
}

.stat strong {
  display: block;
  font-size: 2rem;
  margin-top: 0.4rem;
}

.panel {
  margin-bottom: 1rem;
  overflow: hidden;
  padding: 1rem;
}

.panel h3 { margin: 0 0 0.8rem; }

.two-column {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.metric-cards {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mini-card { padding: 1rem; }

.mini-card strong {
  display: block;
  font-size: 1.6rem;
  margin: 0.2rem 0;
}

.mini-card small { color: #6b7a90; }

.pill {
  background: #eaf0fb;
  border-radius: 999px;
  color: #304464;
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0.1rem;
  padding: 0.25rem 0.55rem;
}

.pill.good {
  background: #def7ec;
  color: #067647;
}

.pill.muted {
  background: #eef1f5;
  color: #667085;
}

.labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.json-value {
  display: inline-block;
  max-width: 26rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-list {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 120px minmax(0, 1fr);
}

.detail-list > span { color: #66758a; }

.filters {
  background: white;
  border: 1px solid #e4ebf4;
  border-radius: 20px;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  margin-bottom: 1rem;
  padding: 1rem;
}

.filters label {
  color: #66758a;
  display: grid;
  font-weight: 700;
  gap: 0.35rem;
}

.filters button { align-self: end; }

.table-wrap { overflow-x: auto; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }

  .sidebar { border-radius: 0 0 24px 24px; }

  .sidebar nav { grid-template-columns: repeat(3, 1fr); }

  .stat-grid,
  .two-column,
  .filters { grid-template-columns: 1fr; }

  .content { padding: 1rem; }
}
