:root {
  --bg: #f7f5ef;
  --ink: #151515;
  --muted: #66645f;
  --card: #fffdf8;
  --line: #e5dfd2;
  --blue: #0b5fff;
  --red: #c7362f;
  --amber: #b76e00;
  --green: #147a43;
  --shadow: 0 20px 50px rgba(20, 20, 20, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff8db 0, transparent 32rem), var(--bg);
}

.hero {
  padding: 48px clamp(20px, 4vw, 64px) 28px;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 360px);
  gap: 28px;
  align-items: end;
}

.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: 12px; color: var(--blue); font-weight: 800; }
h1 { margin: 0; font-size: clamp(42px, 7vw, 82px); line-height: .92; letter-spacing: -.06em; }
.lede { max-width: 720px; font-size: 20px; line-height: 1.45; color: var(--muted); }
.hero-card, .table-card, .panel, .metric { background: rgba(255,253,248,.9); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.hero-card { padding: 24px; display: grid; gap: 8px; }
.label { width: fit-content; background: #edf3ff; color: var(--blue); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; }
small, .muted { color: var(--muted); }

main { padding: 0 clamp(20px, 4vw, 64px) 64px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.metric { padding: 20px; }
.metric strong { display: block; font-size: 34px; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: 14px; }

.toolbar { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin: 24px 0 16px; }
h2 { margin: 0 0 6px; }
.toolbar p { margin: 0; color: var(--muted); }
.filters { display: flex; gap: 10px; }
input, select, button { font: inherit; }
input, select { width: 100%; border: 1px solid var(--line); background: white; border-radius: 12px; padding: 11px 12px; }
.filters input { min-width: 320px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.table-card { overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #fbf8ee; }
th, td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.product { font-weight: 800; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.price { font-size: 20px; font-weight: 900; }
.badge { display: inline-flex; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; }
.badge.red { background: #ffe9e7; color: var(--red); }
.badge.green { background: #e9f8ef; color: var(--green); }
.badge.amber { background: #fff3d9; color: var(--amber); }
.badge.blue { background: #edf3ff; color: var(--blue); }
.action { font-weight: 800; }

.panel { padding: 22px; position: sticky; top: 18px; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
button { border: 0; border-radius: 14px; padding: 12px 14px; font-weight: 900; background: var(--ink); color: white; cursor: pointer; }
button.secondary { width: 100%; margin-top: 10px; color: var(--ink); background: #eee8db; }

@media (max-width: 980px) {
  .hero, .grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filters { flex-direction: column; }
  .filters input { min-width: 0; }
  .panel { position: static; }
}
