body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #111;
}

.wrap {
  max-width: 1460px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

.sub {
  margin: 0;
  color: #666;
  max-width: 760px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-size: 15px;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.progress-box {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.progress-bar {
  height: 14px;
  background: #ececec;
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #111 0%, #4a4a4a 100%);
  transition: width .35s ease;
}

.search-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

#searchInput {
  width: 100%;
  max-width: 460px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
}

#status {
  color: #555;
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

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

th, td {
  border-bottom: 1px solid #eee;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #111;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #f0f0f0;
  display: block;
}

.desc {
  max-width: 360px;
  white-space: normal;
  line-height: 1.4;
}

.muted {
  color: #888;
}

@media (max-width: 900px) {
  .wrap {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    width: 100%;
  }

  button, .btn-link {
    width: 100%;
  }
}

#stockFilter,
#categoryFilter {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
}

/* ===== LOG BOX ===== */
.log-box {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  font-size: 12px;
  color: #8b949e;
}

.log-head strong { color: #c9d1d9; font-size: 13px; }

.log-clear-btn {
  background: none;
  border: 1px solid #30363d;
  color: #8b949e;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
}
.log-clear-btn:hover { border-color: #8b949e; color: #c9d1d9; }

.log-body {
  padding: 8px 0;
  max-height: 240px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
}

.log-empty {
  display: block;
  padding: 6px 14px;
  color: #484f58;
  font-style: italic;
}

.log-line {
  display: flex;
  gap: 10px;
  padding: 1px 14px;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-line:hover { background: #161b22; }

.log-ts   { color: #484f58; flex-shrink: 0; }
.log-msg  { color: #c9d1d9; }

.log-line.info  .log-msg { color: #8b949e; }
.log-line.ok    .log-msg { color: #3fb950; }
.log-line.warn  .log-msg { color: #d29922; }
.log-line.error .log-msg { color: #f85149; }

/* Строки без остатка — приглушённые */
tr.row-no-stock td { opacity: 0.45; }
tr.row-no-stock:hover td { opacity: 0.7; }
.stock-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }

/* ===== PRICES ===== */
.prices-cell { min-width: 110px; }
.price-row { display: flex; flex-direction: column; margin-bottom: 2px; }
.price-name { font-size: 10px; color: #888; line-height: 1.2; }
.price-val { font-weight: 600; font-size: 13px; color: #1a1a2e; white-space: nowrap; }