:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #15171a;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --warn: #b45309;
  --good: #15803d;
  --shadow: 0 16px 42px rgba(31, 41, 55, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 52px) 18px;
  background: #111827;
  color: #fff;
  border-bottom: 4px solid var(--accent);
}

.eyebrow {
  margin: 0 0 6px;
  color: #a7f3d0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.status {
  min-width: 160px;
  max-width: 360px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #d1d5db;
  text-align: right;
}

.shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 40px) 48px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary article,
.controls,
.tableWrap,
.empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.summary article {
  min-height: 92px;
  padding: 16px;
}

.summary span,
.controls span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1;
}

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(6, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.controls label {
  display: grid;
  gap: 6px;
}

.controls input,
.controls select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
}

.toolbar p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.viewToggle {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.viewToggle button {
  min-width: 92px;
  height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.viewToggle button:last-child {
  border-right: 0;
}

.viewToggle button.active {
  background: var(--accent);
  color: #fff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.offerCard {
  display: grid;
  align-content: space-between;
  min-height: 250px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.cardTop {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.store {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.badge {
  min-width: 58px;
  height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: var(--good);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.badge.neutral {
  background: #eef2f7;
  color: var(--muted);
}

.offerCard h2 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  line-height: 1.25;
}

.meta {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dropNote {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: var(--warn);
  font-size: 0.82rem;
  font-weight: 800;
}

.priceRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.price {
  font-size: 1.65rem;
  font-weight: 900;
}

.listPrice {
  color: var(--muted);
  text-decoration: line-through;
}

.cardFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.date {
  color: var(--muted);
  font-size: 0.82rem;
}

.openLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.tableWrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.empty {
  padding: 32px;
  text-align: center;
}

.empty h2 {
  margin: 0 0 8px;
}

.empty p {
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 960px) {
  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .status {
    width: 100%;
    text-align: left;
  }

  .summary,
  .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .controls .search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .summary,
  .controls {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .viewToggle,
  .viewToggle button {
    width: 100%;
  }
}
