:root {
  --bg: #f7f4ec;
  --surface: #fff;
  --surface-soft: rgba(255, 255, 255, .82);
  --text: #241a0e;
  --muted: #6f5d45;
  --line: rgba(142, 90, 23, .16);
  --gold: #d99a16;
  --gold-soft: #fff4d7;
  --gold-dark: #7c4a06;
  --shadow: 0 16px 44px rgba(87, 54, 10, .08);
}

* {
  box-sizing: border-box;
}

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

.page {
  min-height: 100vh;
  padding: 28px 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, .22), transparent 34%),
    radial-gradient(circle at top right, rgba(164, 91, 13, .12), transparent 30%),
    var(--bg);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.headline {
  padding: 28px;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 700;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: blink 1.4s ease-in-out infinite;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

.desc {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.status-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(145deg, #2b1a09, #8b560d);
  color: #fff;
}

.label {
  color: #ffe1a0;
  font-size: 13px;
  font-weight: 700;
}

.time {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
}

.status-text {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 900;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

button,
select,
.search {
  min-height: 46px;
  border: 1px solid rgba(142, 90, 23, .2);
  border-radius: 8px;
  font: inherit;
}

button {
  border: 0;
  padding: 12px 20px;
  background: var(--gold);
  box-shadow: 0 8px 20px rgba(217, 154, 22, .28);
  color: #221306;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: background .15s, transform .1s;
}

button:hover {
  background: #e8aa22;
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
}

select {
  padding: 12px 14px;
  background: #fff;
  color: #2a1b0b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.gold-card {
  padding: 18px;
  border: 1px solid rgba(142, 90, 23, .14);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(87, 54, 10, .07);
}

.gold-card .code {
  color: #9b680f;
  font-size: 13px;
  font-weight: 900;
}

.gold-card .name {
  min-height: 42px;
  margin: 7px 0 14px;
  font-size: 14px;
  font-weight: 700;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.muted {
  color: #806f59;
  font-size: 13px;
}

.price {
  font-size: 14px;
  font-weight: 900;
}

.flat {
  color: #7f705d;
  font-weight: 900;
}

.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f6ead6;
  color: #754909;
  font-size: 12px;
  font-weight: 800;
}

.table-panel {
  padding: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 16px;
}

.section-title {
  font-size: 15px;
}

.search {
  width: min(360px, 100%);
  padding: 12px 14px;
  outline: none;
  background: #fff;
  font-size: 15px;
}

table {
  width: 100%;
  overflow: hidden;
  border-collapse: collapse;
  border-radius: 8px;
  background: #fff;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid #f1e7d8;
  font-size: 14px;
  text-align: left;
}

th {
  background: #fff8e8;
  color: #6d4308;
  font-size: 13px;
  text-transform: uppercase;
}

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

.message {
  padding: 40px 22px;
  color: #735d3f;
  font-weight: 600;
  text-align: center;
}

.loading-icon {
  margin-bottom: 12px;
  font-size: 28px;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border: 3px solid #f1e7d8;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.source-note {
  margin-top: 4px;
  padding: 12px;
  color: #9f8061;
  font-size: 12px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .3;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  table {
    min-width: 700px;
  }

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

@media (max-width: 560px) {
  .page {
    padding: 18px 12px;
  }

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

  .headline,
  .status-card {
    padding: 20px;
  }
}
