:root {
  --bg: #f3efe7;
  --bg-accent: #e5dccd;
  --panel: rgba(255, 252, 247, 0.92);
  --line: #d3c5ae;
  --text: #1d2b2a;
  --muted: #5d6d6a;
  --brand: #0f766e;
  --brand-dark: #0a4f4a;
  --shadow: 0 24px 80px rgba(40, 40, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(176, 135, 61, 0.16), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg-accent));
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  margin-bottom: 24px;
}

.hero.hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--brand-dark);
}

h1,
h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.98;
  max-width: 11ch;
}

.lede,
.panel-heading p,
.status {
  color: var(--muted);
}

.panel {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.panel + .panel {
  margin-top: 20px;
}

.split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 12px;
  max-width: 360px;
}

.filters {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 18px;
}

label,
span {
  display: block;
  font-size: 0.95rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: var(--brand);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--brand-dark);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ghost {
  background: transparent;
  color: var(--brand-dark);
  border: 1px solid var(--line);
}

.actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.table-wrap {
  margin-top: 26px;
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

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

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(211, 197, 174, 0.55);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #f8f3ea;
  font-size: 0.88rem;
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.45);
}

tbody tr.below-threshold,
tbody tr.below-threshold:nth-child(odd) {
  background: rgba(180, 35, 24, 0.12);
}

.summary {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.09);
  color: var(--brand-dark);
  font-weight: 600;
}

.hidden {
  display: none;
}

.status.error {
  color: #b42318;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 24px;
  }

  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .split {
    flex-direction: column;
  }
}
