:root {
  --bg: #13110f;
  --bg-soft: rgba(255, 248, 238, 0.06);
  --surface: rgba(28, 24, 19, 0.78);
  --surface-strong: rgba(36, 30, 24, 0.9);
  --border: rgba(255, 214, 171, 0.16);
  --text: #fff8ee;
  --muted: #d9c4ae;
  --accent: #ff9f43;
  --accent-soft: #ffd7ac;
  --danger: #ff8d8d;
  --warning: #ffd36b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 171, 76, 0.28), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(255, 216, 127, 0.18), transparent 28rem),
    linear-gradient(180deg, #1b1714 0%, #110f0d 100%);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

.backgroundGlow {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.22;
  pointer-events: none;
}

.backgroundGlowLeft {
  top: -6rem;
  left: -8rem;
  background: #ff8a3d;
}

.backgroundGlowRight {
  right: -10rem;
  bottom: 4rem;
  background: #ffe08a;
}

.pageShell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.heroPanel,
.controlPanel,
.tablePanel,
.summaryCard,
.messagePanel {
  animation: rise 500ms ease both;
}

.heroPanel {
  padding: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--accent-soft);
  margin-bottom: 1rem;
}

.heroGrid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  align-items: end;
}

h1,
h2 {
  font-family: "Fraunces", serif;
  margin: 0;
  line-height: 0.95;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.heroCopy {
  max-width: 58ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.heroMeta {
  display: grid;
  gap: 0.85rem;
}

.metaPill {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 173, 91, 0.18), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 218, 176, 0.12);
}

.metaLabel {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-soft);
}

.controlPanel {
  margin-top: 1.35rem;
  padding: 1.2rem;
}

.filtersGrid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.8fr 1fr 1fr auto;
  align-items: end;
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field span {
  font-size: 0.85rem;
  color: var(--muted);
}

select,
input,
button {
  font: inherit;
}

select,
input {
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 224, 192, 0.14);
  background: var(--surface-strong);
  color: var(--text);
}

button {
  min-height: 3rem;
  padding: 0 1.35rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb35f, #ff8f3f);
  color: #22160e;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
  box-shadow: 0 16px 30px rgba(255, 159, 67, 0.22);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled,
select:disabled,
input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.statusRow {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.statusText {
  margin: 0;
  color: var(--text);
}

.rangeText {
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.messagePanel {
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
  line-height: 1.55;
}

.messagePanel[data-tone="warning"] {
  border-color: rgba(255, 211, 107, 0.26);
  color: #ffe39b;
}

.messagePanel[data-tone="error"] {
  border-color: rgba(255, 141, 141, 0.28);
  color: #ffd0d0;
}

.hidden {
  display: none;
}

.summaryGrid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.summaryCard {
  padding: 1.35rem;
}

.cardLabel {
  display: block;
  color: var(--muted);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.cardValue {
  display: block;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 0.94;
}

.tablePanel {
  margin-top: 1.2rem;
  padding: 1.4rem;
}

.tablePanelHeader {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.tableMeta {
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.tableWrap {
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  padding: 0.95rem 0.8rem;
  border-bottom: 1px solid rgba(255, 232, 205, 0.08);
}

th {
  color: var(--accent-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.emptyRow {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .heroGrid,
  .filtersGrid,
  .summaryGrid,
  .tablePanelHeader {
    grid-template-columns: 1fr;
  }

  .tablePanelHeader {
    display: grid;
  }

  .statusRow {
    display: grid;
  }

  .rangeText,
  .tableMeta {
    text-align: left;
  }
}
