:root {
  color-scheme: light;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: #f4f7f6;
  color: #17212b;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(31, 138, 112, 0.12), transparent 30%),
    linear-gradient(180deg, #eef5f2 0%, #f8faf9 44%, #f4f7f6 100%);
  margin: 0;
  min-height: 100vh;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 118px;
  padding: 26px clamp(18px, 4vw, 52px);
}

.brand-block {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  color: #1f8a70;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
}

h1 {
  color: #10252b;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

h2 {
  color: #17212b;
  font-size: 20px;
}

.subtitle {
  color: #566575;
  font-size: 16px;
  line-height: 1.5;
  margin: 12px 0 0;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.status-pill {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe7e4;
  border-radius: 999px;
  color: #344451;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.status-pill span {
  background: #1f8a70;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(31, 138, 112, 0.12);
  height: 8px;
  width: 8px;
}

.upload-button,
.lookup-form button {
  align-items: center;
  background: #10252b;
  border: 1px solid #10252b;
  border-radius: 7px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
}

.upload-button:hover,
.lookup-form button:hover {
  background: #1f8a70;
  border-color: #1f8a70;
}

.upload-button input {
  display: none;
}

main {
  display: grid;
  gap: 18px;
  padding: 0 clamp(18px, 4vw, 52px) 52px;
}

.hero-panel {
  align-items: stretch;
  background: #10252b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(16, 37, 43, 0.14);
  color: #ffffff;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
}

.hero-panel h2 {
  color: #ffffff;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
  max-width: 820px;
}

.hero-copy {
  color: #c9d7d5;
  line-height: 1.55;
  margin: 14px 0 0;
  max-width: 680px;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 22px;
}

.hero-stat span,
.hero-stat small {
  color: #c9d7d5;
}

.hero-stat strong {
  color: #ffffff;
  font-size: clamp(30px, 4vw, 44px);
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.metric-card,
.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfe7e4;
  border-radius: 8px;
}

.metric-card {
  display: grid;
  gap: 7px;
  min-height: 116px;
  overflow: hidden;
  padding: 17px;
  position: relative;
}

.metric-card::before {
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.accent-green::before { background: #1f8a70; }
.accent-blue::before { background: #2f6f9f; }
.accent-gold::before { background: #d98619; }
.accent-red::before { background: #b94a48; }
.accent-purple::before { background: #7057a3; }

.metric-card span,
.panel-head span,
td,
.metric-card small {
  color: #566575;
}

.metric-card span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  color: #17212b;
  font-size: 29px;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
}

.panel {
  overflow: hidden;
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid #e5ece9;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 16px 18px;
}

.panel-head .section-kicker {
  margin-bottom: 4px;
}

.bar-list {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-row header {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.bar-row strong {
  color: #17212b;
  font-size: 14px;
}

.bar-row span {
  color: #566575;
  font-size: 13px;
  white-space: nowrap;
}

.bar-track {
  background: #e8efec;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, #1f8a70, #d98619);
  border-radius: inherit;
  height: 100%;
  min-width: 5%;
}

.lookup-form {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  padding: 18px;
}

.lookup-form input {
  border: 1px solid #d5dfdc;
  border-radius: 7px;
  color: #17212b;
  font: inherit;
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
}

.lookup-result {
  border-top: 1px solid #e5ece9;
  color: #566575;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.lookup-result p {
  line-height: 1.45;
  margin: 0;
}

.price-chip {
  align-items: center;
  background: #f4f7f6;
  border: 1px solid #dfe7e4;
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.price-chip strong,
.region-row strong {
  color: #17212b;
}

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

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

th,
td {
  border-bottom: 1px solid #edf2f0;
  font-size: 14px;
  padding: 13px 18px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #344451;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8faf9;
}

.regions {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.region-row {
  align-items: center;
  border: 1px solid #e5ece9;
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px;
}

.region-row span {
  color: #566575;
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.empty-state {
  color: #697889;
  margin: 0;
  padding: 6px 0;
}

#toast {
  background: #10252b;
  border-radius: 7px;
  bottom: 20px;
  box-shadow: 0 16px 38px rgba(16, 37, 43, 0.22);
  color: #ffffff;
  left: 50%;
  opacity: 0;
  padding: 12px 16px;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
  z-index: 20;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1040px) {
  .metrics,
  .dashboard-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }
}

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

  .header-actions,
  .lookup-form {
    align-items: stretch;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .header-actions {
    display: grid;
  }
}
