* {
  box-sizing: border-box;
}

:root {
  --bg: #050505;
  --panel: #0b0b0b;
  --panel-2: #101010;
  --border: #242424;
  --border-light: #3a3a3a;
  --text: #f5f5f5;
  --muted: #858585;
  --white: #ffffff;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: #080808;
}

.brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: 0.15s ease;
}

.icon-btn:hover {
  background: #151515;
  border-color: var(--border-light);
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 80px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.sub {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  font-size: 12px;
}

.panel {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
}

.filters {
  padding: 20px;
  margin-bottom: 18px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.period-btn {
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: #9b9b9b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: 0.15s ease;
}

.period-btn:hover {
  color: var(--white);
  border-color: #555;
}

.period-btn.active {
  background: var(--white);
  color: #000;
  border-color: var(--white);
}

.controls {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto 1fr auto;
  align-items: end;
  gap: 12px;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.controls label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  outline: none;
  background: var(--panel-2);
  color: var(--text);
}

input:focus,
select:focus {
  border-color: #666;
}

.arrow {
  height: 42px;
  display: flex;
  align-items: center;
  color: var(--muted);
}

.apply-btn {
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--white);
  border-radius: 7px;
  background: var(--white);
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.apply-btn:hover {
  opacity: 0.86;
}

.table-panel {
  overflow: hidden;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.table-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.row-count {
  color: var(--muted);
  font-size: 12px;
}

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

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

th,
td {
  padding: 17px 24px;
  text-align: left;
  border-bottom: 1px solid #191919;
}

th {
  color: #6f6f6f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: #dedede;
  font-size: 14px;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: #101010;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td:nth-child(2) {
  font-weight: 700;
}

td:nth-child(3),
td:nth-child(4),
td:nth-child(5) {
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: 70px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.hidden {
  display: none;
}

@media (max-width: 800px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 34px;
  }

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

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .controls label:first-child {
    grid-column: 1 / -1;
  }

  .arrow {
    display: none;
  }

  .apply-btn {
    grid-column: 1 / -1;
  }
}
