:root {
  color-scheme: light;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: #eef4ee;
  color: #0f1f16;
  --forest-900: #0f2a1f;
  --forest-800: #163829;
  --forest-700: #1f4a35;
  --forest-500: #2f6a4a;
  --forest-200: #c9ddcf;
  --forest-100: #e9f2ec;
}

body {
  margin: 0;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 56px;
  padding: 0 1.5rem;
  background: rgba(233, 242, 236, 0.92);
  border-bottom: 1px solid var(--forest-200);
  backdrop-filter: blur(10px);
  overflow: visible;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest-800);
}

.nav__brand img {
  height: 104px;
  width: auto;
  margin-top: -22px;
  margin-bottom: -22px;
}

.nav__links {
  display: flex;
  gap: 0.75rem;
}

.nav__link {
  text-decoration: none;
  color: var(--forest-700);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav__link:hover {
  background: rgba(47, 106, 74, 0.12);
  border-color: rgba(47, 106, 74, 0.2);
  color: var(--forest-800);
}

.nav__link.is-active {
  background: var(--forest-700);
  color: #f5faf6;
  border-color: var(--forest-700);
}

.nav__button {
  text-decoration: none;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: var(--forest-700);
  color: #f5faf6;
  border: 1px solid var(--forest-700);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav__button:hover {
  background: var(--forest-800);
  transform: translateY(-1px);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav__logout {
  margin: 0;
}

.nav__button--ghost {
  background: transparent;
  color: var(--forest-800);
  border-color: var(--forest-300, #a8c2b2);
}

.nav__button--ghost:hover {
  background: rgba(47, 106, 74, 0.15);
}

.auth-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.auth-form input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--forest-200);
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
}

.auth-form label {
  font-size: 0.9rem;
  color: var(--forest-700);
}

.auth-card {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.auth-form p {
  margin: 0;
}

.auth-form button {
  justify-self: start;
}

.page {
  min-height: 100vh;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background:
    linear-gradient(
      135deg,
      rgba(15, 42, 31, 0.75) 0%,
      rgba(15, 42, 31, 0.4) 45%,
      rgba(15, 42, 31, 0.2) 100%
    ),
    url("/static/web/images/environmental_general_image-16.f8f4282d2e71.jpg");
  background-size: cover;
  background-position: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0.06em;
  color: #f1f7f2;
  text-shadow: 0 6px 18px rgba(15, 42, 31, 0.45);
}

.hero p {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(233, 242, 236, 0.9);
}

.card {
  background: #ffffff;
  padding: 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--forest-200);
  box-shadow: 0 24px 60px rgba(15, 42, 31, 0.35);
}

.note {
  margin: 0.5rem 0 0;
  color: rgba(15, 42, 31, 0.7);
  font-size: 0.95rem;
}

.chart {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(233, 242, 236, 0.9);
  border: 1px solid var(--forest-200);
  overflow-x: auto;
}

.chart canvas {
  display: block;
  max-width: 100%;
}

.graph-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 980px) {
  .graph-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

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

.table-scroll table {
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--forest-100);
  vertical-align: top;
}

th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--forest-800);
}

th.sortable {
  cursor: pointer;
  position: relative;
}

th.sortable::after {
  content: "";
  display: inline-block;
  margin-left: 0.4rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--forest-500);
  opacity: 0.4;
  transform: translateY(-1px);
}

th.sortable[data-sort-direction="asc"]::after {
  opacity: 0.9;
  transform: rotate(180deg) translateY(1px);
}

th.sortable[data-sort-direction="desc"]::after {
  opacity: 0.9;
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:nth-child(even) {
  background: rgba(47, 106, 74, 0.06);
}

tbody tr:hover {
  background: rgba(47, 106, 74, 0.12);
}

table tbody td {
  color: var(--forest-700);
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest-700);
}

.search-field--grow {
  flex: 1;
  min-width: 240px;
}

.search-field select,
.search-field input {
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--forest-200);
  background: #ffffff;
  color: var(--forest-900);
}

.search-field select:focus,
.search-field input:focus {
  outline: 2px solid rgba(47, 106, 74, 0.25);
  border-color: var(--forest-500);
}

@media (max-width: 720px) {
  .page {
    padding: 2rem 1rem;
  }

  th,
  td {
    padding: 0.6rem 0.5rem;
  }
}
