:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #687381;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --blue: #245bdb;
  --amber: #8a5a00;
  --soft: #eef3f7;
  --success: #16803c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 247, 249, 0.96)),
    var(--bg);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.search-workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
}

.search-form,
.results-section,
.implementation-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-form {
  padding: 18px;
}

.search-form label {
  display: block;
  margin-bottom: 8px;
  color: #3b4654;
  font-size: 14px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
}

.search-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #fbfcfd;
  outline: none;
}

.search-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.search-row button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.search-row button:hover {
  background: var(--accent-dark);
}

.search-row button:disabled {
  cursor: wait;
  background: #81918f;
}

.form-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-strip > div {
  min-height: 72px;
  padding: 14px;
  background: var(--panel);
}

.summary-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.summary-strip strong {
  font-size: 18px;
}

.results-section {
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

#searched-at {
  color: var(--muted);
  font-size: 13px;
}

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

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

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

th {
  background: var(--soft);
  color: #384453;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbfcfd;
}

.model-cell strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
}

.model-cell span {
  color: var(--muted);
  font-size: 12px;
}

.price {
  color: var(--blue);
  font-weight: 800;
}

.stock {
  color: var(--success);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: #fff7e6;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.empty-cell {
  height: 120px;
  color: var(--muted);
  text-align: center;
}

.implementation-note {
  margin-top: 14px;
  padding: 16px;
  color: #435061;
  line-height: 1.7;
}

.implementation-note h2 {
  margin-bottom: 8px;
}

.implementation-note p {
  margin-bottom: 0;
}

code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #edf1f5;
  color: #1b4b5a;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 18px;
  }

  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 26px;
  }

  .search-row,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .search-row button {
    width: 100%;
  }
}
