:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5b6a82;
  --line: #dce3ee;
  --accent: #1769e7;
  --accent-soft: #eaf2ff;
  --danger: #c13b45;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f4f7fb;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
a {
  font: inherit;
}

.install-state {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.steps {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.toolbar button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #cbd5e3;
  border-radius: 7px;
  background: #ffffff;
  color: #33415a;
  cursor: pointer;
}

.toolbar button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  padding: 0 20px 24px;
}

table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

th,
td {
  min-height: 44px;
  padding: 10px 12px;
  border-bottom: 1px solid #e8edf4;
  vertical-align: middle;
  text-align: left;
}

thead th {
  background: #f8faff;
  color: #40516b;
  font-size: 12px;
  white-space: nowrap;
}

tbody tr:hover {
  background: #f8fbff;
}

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

.col-check {
  width: 44px;
}

.col-image {
  width: 84px;
}

.product-image {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid #e5eaf1;
  border-radius: 6px;
  background: #f2f5f9;
}

.product-title {
  display: -webkit-box;
  max-width: 360px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-title:hover {
  color: var(--accent);
}

.cell-link {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.cell-link:hover {
  text-decoration: underline;
}

.truncate {
  display: -webkit-box;
  max-width: 260px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.original-price {
  color: #8b97aa;
  text-decoration: line-through;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1156bd;
  font-size: 12px;
  white-space: nowrap;
}

.status.optimized {
  background: #fff4dc;
  color: #8a5a00;
}

.empty-state {
  padding: 60px 20px;
  color: #7a879c;
  text-align: center;
}

@media (max-width: 720px) {
  .toolbar {
    padding: 10px 12px;
  }

  .table-wrap {
    padding: 0 12px 16px;
  }

  .steps {
    gap: 8px;
  }
}
