:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-soft: #eef3ef;
  --ink: #16201b;
  --muted: #627168;
  --line: #d8dfd8;
  --green: #2f6f4e;
  --green-deep: #1e5138;
  --blue: #285d8a;
  --gold: #9a6d1c;
  --red: #af463e;
  --neutral: #6c7470;
  --shadow: 0 14px 38px rgba(30, 49, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px 1fr;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #ebf1ec;
}

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

.brand > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 800;
}

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

.brand small,
.eyebrow,
small,
.note,
.muted-copy {
  color: var(--muted);
}

nav {
  display: grid;
  gap: 8px;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  min-height: 40px;
  padding: 10px 15px;
  font-weight: 750;
  cursor: pointer;
}

button:hover {
  background: var(--green-deep);
}

.nav-item {
  justify-content: flex-start;
  width: 100%;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  background: var(--surface);
  color: var(--green-deep);
  box-shadow: var(--shadow);
}

.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.secondary:hover {
  background: var(--surface-soft);
}

.full {
  width: 100%;
  margin-top: 12px;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.sidebar-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar h1 {
  max-width: 940px;
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1.16;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 16px;
}

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

.kpis article,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.kpis article {
  padding: 18px;
}

.kpis span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.kpis strong {
  display: block;
  margin: 8px 0 3px;
  font-size: 28px;
  letter-spacing: 0;
}

.grid {
  display: grid;
  gap: 14px;
}

.two-col {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel h2,
.panel h3 {
  margin: 5px 0 14px;
  letter-spacing: 0;
}

.panel h2 {
  font-size: 22px;
}

.panel h3 {
  font-size: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.good {
  background: #e4f3e9;
  color: var(--green-deep);
}

.pill.warning {
  background: #fff2d6;
  color: var(--gold);
}

.pill.danger {
  background: #fde8e4;
  color: var(--red);
}

.pill.neutral {
  background: #edf0ee;
  color: var(--neutral);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

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

td small {
  display: block;
  margin-top: 3px;
}

.selected-row {
  background: #f3f8f4;
}

.link-button {
  min-height: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  text-align: left;
}

.link-button:hover {
  background: transparent;
  color: var(--green-deep);
}

.task-list,
.compact-list,
.report-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.task-list li,
.report-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}

.compact-list li {
  padding: 7px 0;
  line-height: 1.5;
}

.steps {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.muted-copy {
  line-height: 1.7;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--neutral);
}

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

.dot.warning {
  background: var(--gold);
}

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

.asset-grid,
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.asset-grid div,
.result-grid div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

dd {
  margin: 6px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.big-number {
  display: block;
  margin: 2px 0 16px;
  font-size: 42px;
  color: var(--green-deep);
}

.progress-list {
  display: grid;
  gap: 13px;
}

.progress-list label {
  display: grid;
  gap: 6px;
  font-weight: 750;
}

progress {
  width: 100%;
  height: 10px;
  accent-color: var(--green);
}

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

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
}

.form-grid button {
  align-self: end;
}

.output-box {
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.6;
  overflow: auto;
}

.output-box.tall {
  min-height: 360px;
}

.note {
  margin: 14px 0 0;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .sidebar-note {
    margin-top: 0;
  }

  .two-col,
  .three-col,
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  main {
    padding: 18px;
  }

  .topbar,
  .panel-head {
    display: grid;
  }

  .topbar h1 {
    font-size: 25px;
  }

  .topbar-actions,
  nav,
  .two-col,
  .three-col,
  .kpis,
  .asset-grid,
  .result-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .task-list li,
  .report-list li {
    grid-template-columns: auto 1fr;
  }
}
