:root {
  --ink: #17211d;
  --muted: #5d6b65;
  --line: #d7ddd8;
  --surface: #ffffff;
  --canvas: #f6f4ef;
  --forest: #17483b;
  --green: #2f7a5d;
  --amber: #c8782b;
  --blue: #295f8f;
  --shadow: 0 18px 42px rgba(23, 33, 29, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 36px;
  background: var(--forest);
  color: #fff;
  border-bottom: 4px solid var(--amber);
}

.eyebrow,
.section-kicker,
.metric-label,
.status-label {
  margin: 0;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-header h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.environment-pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e8f2eb;
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}

.text-link {
  color: #fff;
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 0 18px;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 32px auto 56px;
}

.overview-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: stretch;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.summary h2,
.section-heading h2 {
  margin: 8px 0 0;
  max-width: 760px;
  font-size: 34px;
  line-height: 1.08;
}

.summary p:not(.section-kicker) {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.section-kicker {
  color: var(--green);
}

.status-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 168px;
  padding: 24px;
  background: #edf5f1;
  border: 1px solid #c8d9cf;
}

.status-panel strong {
  margin-top: 12px;
  font-size: 28px;
  line-height: 1.1;
}

.status-panel span:last-child {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.metric-card {
  min-height: 178px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.metric-card strong {
  display: block;
  margin-top: 16px;
  font-size: 30px;
  line-height: 1;
}

.metric-positive {
  border-top: 4px solid var(--green);
}

.metric-neutral {
  border-top: 4px solid var(--blue);
}

.metric-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.workstream-section {
  margin-top: 34px;
  padding: 30px 0 0;
}

.workstream-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.workstream-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  min-height: 158px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.workstream-item h3 {
  margin: 0;
  font-size: 18px;
}

.workstream-item p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-shell {
  display: grid;
  gap: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.panel-section {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.section-heading.compact h2 {
  font-size: 24px;
}

.table-wrap {
  width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.report-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.report-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-table td strong,
.report-table td span {
  display: block;
}

.report-table td span:not(.status-badge) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  background: #eef2f7;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-planned,
.status-pending {
  background: #eff5fb;
  color: var(--blue);
}

.status-mapped,
.status-provisioned,
.status-sample,
.status-positive {
  background: #e8f4ee;
  color: var(--forest);
}

.status-dry_run,
.status-internal_only,
.status-neutral {
  background: #fbf0e3;
  color: #8a531f;
}

.source-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.source-item {
  padding: 16px;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-item p,
.muted-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.next-action-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.next-action-list li {
  color: var(--muted);
  line-height: 1.5;
}

.identity-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.identity-panel code {
  display: block;
  overflow-wrap: anywhere;
  padding: 12px;
  background: #f1eee7;
  color: var(--ink);
}

.is-healthy {
  background: #e7f3ee;
  border-color: #bad5c8;
}

.is-unhealthy {
  background: #fff0e4;
  border-color: #edc5a2;
}

@media (max-width: 880px) {
  .app-header,
  .overview-band {
    grid-template-columns: 1fr;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .shell {
    width: min(100% - 28px, 720px);
    margin-top: 18px;
  }

  .overview-band {
    padding: 24px;
  }

  .summary h2,
  .section-heading h2 {
    font-size: 28px;
  }

  .metrics-grid,
  .workstream-list,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
