﻿:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --ink: #111827;
  --muted: #5b6678;
  --line: #d9e1ea;
  --blue: #2563eb;
  --green: #0f8f62;
  --amber: #b7791f;
  --red: #c2410c;
  --teal: #0f766e;
  --shadow: 0 14px 38px rgba(26, 43, 70, 0.08);
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: #111827;
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  background: var(--surface-2);
}

.nav .nav-cta {
  color: #fff;
  background: var(--blue);
}

.app {
  min-height: calc(100vh - 150px);
}

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

.price-header h1 {
  margin: 0 0 12px;
  font-size: 28px;
  overflow-wrap: anywhere;
}

.price-note,
.source-status {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.source-status {
  margin: 12px 0 20px;
  border-left: 3px solid var(--green);
  padding-left: 12px;
}

.source-status p {
  margin: 4px 0;
}

.quote-state {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.workbench > * {
  min-width: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.metric {
  min-height: 92px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
  letter-spacing: 0;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.update-box {
  display: grid;
  align-content: center;
  min-width: 230px;
  padding: 15px;
  color: #fff;
  background: #172033;
  border-radius: 8px;
}

.update-box span {
  color: #aeb8c7;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.update-box strong {
  margin-top: 6px;
  font-size: 20px;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.deal-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 14px;
  background: #0f172a;
  border: 1px solid #23314f;
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
}

.deal-card:hover {
  border-color: #60a5fa;
}

.deal-card strong {
  font-size: 18px;
  line-height: 1.2;
}

.deal-card small {
  color: #b8c4d8;
}

.deal-card em {
  color: #8df0c2;
  font-style: normal;
  font-weight: 800;
}

.deal-label {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workbench {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.filters,
.content-panel,
.detail-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filters {
  position: sticky;
  top: 88px;
  padding: 16px;
}

.filters h1,
.filters h2 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.2;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: var(--ink);
  font-size: 14px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.btn:hover {
  border-color: #aeb8c7;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.success {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.btn.full {
  width: 100%;
}

.content-panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.detail-panel h1,
.detail-panel h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.panel-head p,
.detail-panel p {
  margin: 5px 0 0;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  color: #314056;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

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

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f9fbfd;
}

.gpu-cell strong,
.provider-cell strong {
  display: block;
}

.gpu-cell small,
.provider-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.price {
  font-size: 17px;
  font-weight: 850;
}

.price small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge.green {
  color: #075f43;
  background: #dff8ed;
}

.badge.amber {
  color: #7a4d08;
  background: #fff1cf;
}

.badge.red {
  color: #8b2f11;
  background: #ffe6dc;
}

.signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.signal.green {
  color: #075f43;
  background: #dff8ed;
}

.signal.amber {
  color: #7a4d08;
  background: #fff1cf;
}

.signal.red {
  color: #8b2f11;
  background: #ffe6dc;
}

.signal.neutral {
  color: #526074;
  background: #f1f5f9;
  border-color: var(--line);
}

.spark {
  width: 92px;
  height: 30px;
}

.sections {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 16px;
}

.detail-panel {
  padding: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.detail-stat {
  min-height: 84px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.detail-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.list {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.list li:last-child {
  border-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.wide {
  grid-column: 1 / -1;
}

.empty {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 44px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer strong {
  margin-right: 8px;
  color: var(--ink);
}

.footer-links {
  display: flex;
  gap: 14px;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .toolbar,
  .workbench,
  .sections,
  .page-grid,
  .pulse-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .market-strip {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

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

  .brand {
    min-width: 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .nav a {
    padding: 8px 9px;
    font-size: 13px;
  }

  .market-strip,
  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
