:root {
  --ink: #17211d;
  --muted: #66756f;
  --line: #dfe7e2;
  --surface: #ffffff;
  --wash: #f4f7f2;
  --brand: #146c63;
  --brand-dark: #103e39;
  --good: #12825d;
  --warn: #d65a31;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--wash);
  font-family: Arial, Helvetica, sans-serif;
  display: grid;
  grid-template-columns: 260px 1fr;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  background: #e8efeb;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--brand);
  color: #fff;
}

.ghost {
  background: transparent;
  color: var(--brand);
}

.sidebar {
  min-height: 100vh;
  padding: 24px 18px;
  background: var(--brand-dark);
  color: #fff;
  position: sticky;
  top: 0;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #8decb4;
  color: var(--brand-dark);
  font-weight: 900;
  font-size: 24px;
}

.brand small {
  display: block;
  color: #c2d3ce;
  margin-top: 3px;
}

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

.nav-item {
  width: 100%;
  text-align: left;
  color: #d9e6e2;
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.app {
  padding: 22px;
  max-width: 1400px;
  width: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.role-switch {
  padding: 4px;
  border-radius: 10px;
  background: #e8efeb;
  display: flex;
  gap: 4px;
}

.role-switch button {
  background: transparent;
}

.role-switch button.active {
  background: var(--surface);
  color: var(--brand);
}

.view {
  display: none;
  animation: rise 220ms ease both;
}

.view.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-strip {
  min-height: 230px;
  border-radius: 14px;
  background:
    linear-gradient(100deg, rgba(16, 62, 57, 0.96), rgba(20, 108, 99, 0.86)),
    repeating-linear-gradient(135deg, #244f49 0 18px, #1e4742 18px 36px);
  color: #fff;
  padding: 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.hero-strip h2 {
  max-width: 720px;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1.02;
  margin-bottom: 10px;
}

.hero-strip p {
  color: #e1efeb;
  max-width: 560px;
}

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

.metrics article,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.metrics article {
  padding: 18px;
}

.metrics span {
  color: var(--muted);
}

.metrics strong {
  display: block;
  font-size: 34px;
  margin-top: 8px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 16px;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.section-head h3 {
  margin-bottom: 0;
  font-size: 21px;
}

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

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

th,
td {
  padding: 13px 10px;
  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;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #e8efeb;
}

.badge.good {
  color: var(--good);
  background: #e6f5ef;
}

.badge.warn {
  color: var(--warn);
  background: #fff0ea;
}

.rule-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.rule-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.wide {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.status-line {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--brand);
  font-weight: 800;
}

.month-picker {
  width: 210px;
}

.report-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

  .sidebar {
    min-height: auto;
    position: static;
  }

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

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

  .hero-strip,
  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .wide {
    grid-column: auto;
  }
}

@media print {
  .sidebar,
  .topbar,
  button,
  form {
    display: none !important;
  }

  body {
    display: block;
    background: #fff;
  }
}

