:root {
  color-scheme: light;
  --ink: #1f2a30;
  --muted: #60717b;
  --line: #cbd7dd;
  --panel: #f7f9fa;
  --accent: #0f6b62;
  --accent-dark: #0b4945;
  --warn: #8b4f00;
  --paper: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: #eef5f3;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand img {
  width: 112px;
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.homeLink,
.owner {
  color: var(--accent-dark);
  text-decoration: none;
}

.owner {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 680;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
  font-weight: 650;
}

.topbar p,
.tableHeader p {
  margin-top: 4px;
  color: var(--muted);
}

button,
input,
select,
.homeButton {
  font: inherit;
}

button,
.homeButton {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  min-height: 36px;
  padding: 0 14px;
  cursor: pointer;
}

button:hover,
.homeButton:hover {
  background: var(--accent-dark);
}

.topActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.secondaryButton {
  background: #fff;
  color: var(--accent-dark);
}

.secondaryButton:hover {
  background: #dce8e6;
}

.homeButton {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

main {
  padding: 22px 28px 36px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(11, minmax(105px, 1fr));
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

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

.summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary div {
  padding: 14px;
  background: var(--panel);
}

.summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.summary strong {
  display: block;
  margin-top: 4px;
  font-size: 21px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.tab {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.view {
  display: none;
  margin-top: 14px;
}

.view.active {
  display: block;
}

.tableHeader {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.tableWrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #223036;
  color: #fff;
  font-weight: 650;
}

tbody tr:nth-child(even) td {
  background: #f5f8f9;
}

td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.status {
  font-weight: 650;
  text-transform: capitalize;
}

.withdrawn {
  color: var(--warn);
}

.adBanner {
  margin-top: 22px;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.bottomAd {
  min-height: 90px;
}

@media (max-width: 1100px) {
  .filters,
  .summary {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .topActions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .topActions button,
  .homeButton {
    flex: 1;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand img {
    width: 106px;
  }

  main {
    padding: 18px;
  }

  .filters,
  .summary {
    grid-template-columns: 1fr;
  }

  .tableHeader {
    align-items: flex-start;
    flex-direction: column;
  }
}
