:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --ink: #17211f;
  --muted: #66736f;
  --line: #dce3df;
  --blue: #2b6f9f;
  --green: #1f8a63;
  --orange: #bd6c22;
  --red: #b04444;
  --yellow: #d8b64c;
  --shadow: 0 18px 50px rgba(24, 40, 35, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  background: #10221f;
  color: #f7fbf7;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #f0c84b;
  color: #14211f;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.sidebar-panel p {
  color: #acc2bb;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav a {
  color: #dce7e3;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.sidebar-panel {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.label,
.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
}

main {
  margin-left: 270px;
  padding: 28px;
  display: grid;
  gap: 22px;
}

.topbar,
.panel-header,
.top-actions,
.hero-controls,
.search-row,
.legend,
.segmented {
  display: flex;
  align-items: center;
}

.topbar,
.panel-header {
  justify-content: space-between;
  gap: 16px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 42px;
  line-height: 1.03;
}

h3 {
  margin-bottom: 0;
  font-size: 19px;
}

.top-actions,
.hero-controls {
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.icon-button,
.segmented button {
  border: 1px solid var(--line);
  min-height: 40px;
  border-radius: 8px;
  cursor: pointer;
}

.primary-button {
  background: #173f35;
  color: #fff;
  border-color: #173f35;
  padding: 0 16px;
  font-weight: 800;
}

.secondary-button {
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 750;
}

.icon-button {
  width: 40px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 22px;
  min-height: 390px;
}

.hero-copy,
.campus-visual,
.panel,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.hero-copy {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy p {
  max-width: 700px;
  color: var(--muted);
  font-size: 17px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  font-weight: 850;
  color: var(--green);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(31, 138, 99, 0.13);
}

.campus-visual {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  background:
    linear-gradient(120deg, rgba(16, 34, 31, 0.92), rgba(43, 111, 159, 0.7)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 22px);
}

.pulse-card {
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  z-index: 2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 20px;
}

.pulse-card span,
.pulse-card small {
  display: block;
  color: var(--muted);
}

.pulse-card strong {
  display: block;
  font-size: 56px;
  line-height: 1;
}

.activity-rings {
  position: absolute;
  inset: 140px 44px 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.activity-rings span {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0c84b;
  box-shadow: 0 0 0 14px rgba(240, 200, 75, 0.16);
}

.activity-rings span:nth-child(1) {
  left: 18%;
  top: 22%;
}

.activity-rings span:nth-child(2) {
  right: 20%;
  top: 34%;
  background: #62c09a;
}

.activity-rings span:nth-child(3) {
  left: 46%;
  bottom: 16%;
  background: #f08b4b;
}

.heatmap {
  position: absolute;
  right: 26px;
  bottom: 26px;
  display: grid;
  grid-template-columns: repeat(7, 14px);
  gap: 6px;
}

.heatmap i {
  display: block;
  height: 14px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.heatmap i:nth-child(3n) {
  background: #f0c84b;
}

.heatmap i:nth-child(4n) {
  background: #62c09a;
}

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

.metric-card {
  padding: 18px;
}

.metric-card span,
.metric-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.metric-card strong {
  display: block;
  margin: 8px 0 2px;
  font-size: 30px;
  line-height: 1;
}

.metric-card.warning strong {
  color: var(--red);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  gap: 22px;
}

.dashboard-grid .wide {
  grid-column: span 1;
}

.panel {
  padding: 22px;
  overflow: hidden;
}

.segmented {
  gap: 4px;
  padding: 4px;
  background: #edf2ef;
  border-radius: 8px;
}

.segmented button {
  min-height: 32px;
  border: 0;
  background: transparent;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 750;
}

.segmented button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(20, 30, 28, 0.08);
}

.bar-chart {
  height: 280px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: end;
  padding: 24px 2px 6px;
}

.bar-chart div {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 4px;
}

.bar-chart div::before,
.bar-chart div::after {
  content: "";
}

.bar-chart div::before,
.bar-chart div::after,
.bar-chart div span::before,
.bar-chart div span::after {
  display: block;
  border-radius: 7px 7px 2px 2px;
  min-height: 16px;
}

.bar-chart div::before {
  height: var(--visits);
  background: var(--blue);
}

.bar-chart div::after {
  height: var(--assess);
  background: var(--green);
}

.bar-chart div span::before {
  content: "";
  height: var(--chat);
  background: var(--orange);
}

.bar-chart div span::after {
  content: "";
  height: var(--bot);
  background: var(--red);
}

.bar-chart span {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.bar-chart span {
  grid-column: span 2;
}

.legend {
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
}

.blue {
  background: var(--blue);
}

.green {
  background: var(--green);
}

.orange {
  background: var(--orange);
}

.red {
  background: var(--red);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef3f1;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.pill.green {
  background: rgba(31, 138, 99, 0.12);
  color: var(--green);
}

.pill.orange {
  background: rgba(189, 108, 34, 0.13);
  color: var(--orange);
}

.pill.red {
  background: rgba(176, 68, 68, 0.12);
  color: var(--red);
}

.activity-list,
.case-list,
.theme-list,
.timeline,
.report-body {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.activity-list div,
.theme-list div,
.timeline-item,
.report-item,
.governance-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.activity-list div {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  padding: 12px;
}

.activity-list b {
  color: var(--blue);
}

.activity-list em {
  color: var(--muted);
  font-style: normal;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.case-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.case-card.active {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
}

.case-card span,
.case-card strong,
.case-card em {
  display: block;
}

.case-card strong {
  margin: 4px 0;
  font-size: 18px;
}

.case-card em {
  color: var(--muted);
  font-style: normal;
}

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  padding: 14px 14px 14px 42px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.timeline-item.risk::before {
  background: var(--red);
}

.timeline-item strong,
.timeline-item span {
  display: block;
}

.timeline-item span {
  color: var(--muted);
  font-size: 13px;
}

.journey-panel {
  display: grid;
  gap: 16px;
}

.search-row {
  justify-content: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.search-row label {
  font-weight: 800;
}

.search-row input {
  min-height: 42px;
  flex: 1 1 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.journey-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: #f7faf8;
  border: 1px solid var(--line);
}

.journey-result p {
  margin-bottom: 0;
  color: var(--muted);
}

.score-strip {
  display: grid;
  gap: 8px;
}

.score-strip span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
}

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

.report-item span,
.theme-list span,
.governance-grid span {
  color: var(--muted);
}

.theme-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.governance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.governance-grid div {
  padding: 16px;
}

.governance-grid strong,
.governance-grid span {
  display: block;
}

.governance-grid span {
  margin-top: 6px;
}

@media (max-width: 1050px) {
  .sidebar {
    position: static;
    width: auto;
    min-height: auto;
  }

  main {
    margin-left: 0;
    padding: 18px;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-panel {
    display: none;
  }

  .hero-grid,
  .dashboard-grid,
  .journey-result {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .governance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  main {
    padding: 14px;
  }

  .topbar,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 23px;
  }

  h2 {
    font-size: 30px;
  }

  .hero-copy,
  .panel {
    padding: 18px;
  }

  .nav,
  .metric-grid,
  .governance-grid {
    grid-template-columns: 1fr;
  }

  .activity-list div,
  .report-item {
    grid-template-columns: 1fr;
  }

  .bar-chart {
    gap: 8px;
  }
}
