:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #17212b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  background: #17212b;
  color: white;
}

.app-header h1,
.app-header p {
  margin: 0;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
}

.tenant-badge {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 999px;
  font-size: 0.875rem;
}

main {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 3rem) 4rem;
}

.panel,
.summary-card,
.contest-card {
  background: white;
  border: 1px solid #dce2e8;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 1rem rgb(23 33 43 / 5%);
}

.panel {
  padding: 1.5rem;
}

.input-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

input {
  min-width: 0;
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #aeb8c2;
  border-radius: 0.5rem;
}

button {
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: #17212b;
  color: white;
  cursor: pointer;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  padding: 1.25rem;
}

.summary-card .value {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.75rem;
  font-weight: 750;
}

.summary-card .label {
  color: #566573;
  font-size: 0.875rem;
}

.contest-list {
  display: grid;
  gap: 1.5rem;
}

.contest-card {
  overflow: hidden;
}

.contest-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e4e8ec;
}

.contest-header h2,
.contest-header p {
  margin: 0;
}

.contest-meta {
  color: #687784;
  font-size: 0.875rem;
}

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

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

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #edf0f2;
  text-align: left;
  vertical-align: top;
}

th {
  color: #566573;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.person-list {
  margin: 0;
  padding-left: 1rem;
}

.amount {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.error-panel {
  border-color: #c83838;
}

.empty-state {
  padding: 2rem 1.5rem;
  color: #687784;
}

@media (max-width: 720px) {
  .app-header,
  .contest-header,
  .input-row {
    align-items: stretch;
    flex-direction: column;
  }

  th:nth-child(2),
  td:nth-child(2) {
    display: none;
  }
}
