* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #1f2328;
  background: #f6f8fa;
}

.topbar {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}

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

.stats {
  margin: 0;
  color: #656d76;
}

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 560px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.panel-header h2 {
  margin: 0;
  font-size: 16px;
}

.counter {
  color: #656d76;
  font-variant-numeric: tabular-nums;
}

.add-form {
  display: flex;
  gap: 8px;
}

.add-form input {
  flex: 1;
}

input {
  padding: 8px 10px;
  font: inherit;
  color: inherit;
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid #0969da;
  outline-offset: 1px;
}

button {
  padding: 8px 14px;
  font: inherit;
  color: #ffffff;
  background: #1f883d;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: #1a7f37;
}

.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #ffffff;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #eaeef2;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
}

.row:hover {
  background: #f6f8fa;
}

.row.custom::after {
  content: 'вручную';
  font-size: 11px;
  color: #656d76;
}

.row.dragging {
  opacity: 0.4;
}

.row[draggable='true'] {
  cursor: grab;
}

.row.drop-before {
  box-shadow: inset 0 2px 0 #0969da;
}

.row.drop-after {
  box-shadow: inset 0 -2px 0 #0969da;
}

.sentinel {
  height: 1px;
}

.state {
  padding: 12px;
  color: #656d76;
  text-align: center;
}

.pending {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
  color: #9a6700;
}
