:root {
  --brand-primary: #7da468;
  --brand-primary-dark: #5f7f49;
  --brand-surface: #f4f9f1;
  --brand-muted: #e4eddc;
  --brand-text: #2f3b27;
  --brand-outline: rgba(125, 164, 104, 0.28);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--brand-text);
  background: radial-gradient(120% 120% at 20% 0%, #ffffff 0%, var(--brand-surface) 55%, #edf3e8 100%);
}

a {
  color: var(--brand-primary-dark);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-primary);
}

.table-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 8vw, 100px) 24px;
  background: linear-gradient(180deg, rgba(125, 164, 104, 0.08) 0%, rgba(255, 255, 255, 0.6) 100%);
}

.table-wrapper {
  position: relative;
  width: min(1100px, 100%);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 22px;
  border: 1px solid var(--brand-outline);
  box-shadow: 0 36px 80px -48px rgba(56, 86, 41, 0.8);
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 32px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.table-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.table-wrapper > table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(125, 164, 104, 0.18);
  box-shadow: 0 22px 50px -44px rgba(65, 104, 47, 0.85);
  overflow: hidden;
  table-layout: fixed;
}

.table-wrapper > table:not(:last-of-type) {
  margin-bottom: clamp(12px, 2vw, 28px);
}

.table-wrapper table th,
.table-wrapper table td {
  padding: 8px 10px;
  border: 0;
  vertical-align: top;
  font-size: 0.95rem;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.table-wrapper table th {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 0.82rem;
  width: 25%;
  min-width: 120px;
  max-width: 25%;
}

.table-wrapper > table > tbody > tr > th {
  min-width: 140px;
}

.table-wrapper table td {
  background: rgba(255, 255, 255, 0.98);
  color: var(--brand-text);
  box-shadow: inset 0 -1px 0 rgba(125, 164, 104, 0.18);
}

.table-wrapper > table > tbody > tr > td {
  width: 75%;
}

.table-wrapper > table > tbody > tr:nth-child(even) td {
  background: rgba(125, 164, 104, 0.1);
}

.table-wrapper > table > tbody > tr:first-child th:first-child {
  border-top-left-radius: 16px;
}

.table-wrapper > table > tbody > tr:first-child td:last-child {
  border-top-right-radius: 16px;
}

.table-wrapper > table > tbody > tr:last-child th:first-child {
  border-bottom-left-radius: 16px;
}

.table-wrapper > table > tbody > tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

.table-wrapper table table {
  width: 100%;
  margin: 12px 0 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(125, 164, 104, 0.18);
  box-shadow: 0 20px 44px -40px rgba(65, 104, 47, 0.8);
  table-layout: fixed;
  overflow: hidden;
}

.table-wrapper table table td {
  box-shadow: inset 0 -1px 0 rgba(125, 164, 104, 0.16);
  width: 75%;
}

.table-wrapper table table tr:nth-child(even) td {
  background: rgba(125, 164, 104, 0.1);
}

.table-wrapper table table tr:first-child th:first-child {
  border-top-left-radius: 14px;
}

.table-wrapper table table tr:first-child td:last-child {
  border-top-right-radius: 14px;
}

.table-wrapper table table tr:last-child th:first-child {
  border-bottom-left-radius: 14px;
}

.table-wrapper table table tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}

.table-wrapper table table tr:last-child td {
  box-shadow: none;
}

@media (hover: hover) {
  .table-wrapper > table > tbody > tr {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .table-wrapper > table > tbody > tr:hover {
    transform: translateY(-2px);
  }

  .table-wrapper > table > tbody > tr:hover td {
    background: rgba(125, 164, 104, 0.2);
    box-shadow: inset 0 -1px 0 rgba(125, 164, 104, 0.2);
  }
}

@media (max-width: 960px) {
  body {
    font-size: 15px;
  }

  .table-wrapper {
    border-radius: 20px;
  }

  .table-wrapper table th,
  .table-wrapper table td {
    padding: 7px 8px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
    background: linear-gradient(180deg, #fdfdfc 0%, var(--brand-surface) 70%, #eef5ea 100%);
  }

  .table-container {
    padding: 48px 16px;
  }

  .table-wrapper {
    padding: 24px 18px;
    gap: 18px;
    border-radius: 18px;
  }

  .table-wrapper > table {
    display: block;
    border: 0;
    box-shadow: none;
    background: transparent;
    table-layout: auto;
  }

  .table-wrapper > table > tbody {
    display: grid;
    gap: 16px;
  }

  .table-wrapper > table > tbody > tr {
    display: block;
    padding: 18px 18px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 22px 48px -36px rgba(65, 104, 47, 0.75);
  }

  .table-wrapper > table > tbody > tr > th,
  .table-wrapper > table > tbody > tr > td {
    display: block;
    width: 100%;
    padding: 0;
  }

  .table-wrapper > table > tbody > tr > th {
    background: none;
    color: var(--brand-primary-dark);
    font-size: 0.78rem;
    margin-bottom: 6px;
    letter-spacing: 0.35px;
  }

  .table-wrapper > table > tbody > tr > td {
    background: none;
    box-shadow: none;
    font-size: 0.98rem;
  }

  .table-wrapper > table > tbody > tr:nth-child(even) td {
    background: none;
  }

  .table-wrapper > table > tbody > tr > td table {
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  .table-container {
    padding: 40px 12px;
  }

  .table-wrapper {
    padding: 22px 16px;
  }

  .table-wrapper > table > tbody > tr {
    padding: 16px 16px 14px;
  }
}
