:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top right, #dfe8ff 0%, #f6f9ff 45%, #ffffff 100%);
  color: #0f172a;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #d7deea;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 220px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.brand-copy p {
  margin: 0;
  font-size: 0.68rem;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0.12rem 0 0;
  font-size: 1rem;
  line-height: 1.2;
}

.main-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #334155;
  padding: 0.42rem 0.72rem;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
}

.nav-btn:hover {
  background: #eef3ff;
}

.nav-btn.active {
  border-color: #a4c0ff;
  background: #dce7ff;
  color: #1d4ed8;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
}

.btn {
  border-radius: 10px;
  font-size: 0.82rem;
  padding: 0.46rem 0.75rem;
  cursor: pointer;
  font-weight: 500;
}

.btn-outline {
  border: 1px solid #cdd8ea;
  background: #fff;
  color: #334155;
}

.btn-outline:hover {
  background: #f8fbff;
}

.btn-outline:disabled,
.btn-muted:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-muted {
  border: 1px solid #d7deea;
  background: #f8fafc;
  color: #64748b;
}

.main-content {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 1rem;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.hero {
  border: 1px solid #d7deea;
  border-radius: 14px;
  background: linear-gradient(120deg, #0f172a 0%, #1e293b 55%, #273b68 100%);
  color: #e2e8f0;
  padding: 1rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
}

.hero p {
  margin: 0.34rem 0 0;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.hero .meta {
  display: grid;
  grid-auto-flow: column;
  gap: 0.5rem;
  align-items: center;
}

.pill {
  border-radius: 999px;
  padding: 0.28rem 0.56rem;
  font-size: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.25);
  color: #e2e8f0;
  white-space: nowrap;
}

.view-root {
  display: grid;
  gap: 1rem;
}

.panel,
.table-wrap,
.metric,
.stack-card {
  border: 1px solid #d7deea;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.panel {
  padding: 0.95rem;
}

.panel h3 {
  margin: 0;
  font-size: 1rem;
}

.panel p {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.4;
}

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

.metric {
  padding: 0.85rem;
}

.metric-label {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  margin: 0.4rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.metric-note {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.table-wrap {
  overflow: hidden;
}

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

th,
td {
  padding: 0.66rem;
  text-align: left;
  font-size: 0.86rem;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #f8fafc;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
}

.status-active,
.status-ready,
.status-succeeded,
.status-qualified {
  background: #dcfce7;
  color: #166534;
}

.status-pending,
.status-open,
.status-running,
.status-pilot {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-blocked,
.status-warning,
.status-review {
  background: #ffedd5;
  color: #9a3412;
}

.stack {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-card {
  padding: 0.85rem;
}

.stack-card h4 {
  margin: 0;
  font-size: 0.95rem;
}

.stack-card p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.4;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 0.34rem;
}

.field label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.field input,
.field textarea,
.field select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.52rem 0.6rem;
  font-size: 0.88rem;
  background: #f8fafc;
  color: #334155;
}

.field textarea {
  min-height: 88px;
}

.field.full {
  grid-column: 1 / -1;
}

.footer-note {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.footer-note p {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
}

@media (max-width: 1120px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .main-nav {
    order: 3;
  }

  .topbar-actions {
    order: 2;
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
