* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.45;
}

.header {
  padding: 20px 24px 8px;
  border-bottom: 1px solid #334155;
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.sub {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.card {
  margin: 16px 24px;
  padding: 16px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
}

.config label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #94a3b8;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #f8fafc;
}

button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #16a34a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  background: #334155;
}

button.danger {
  background: #dc2626;
}

button.small {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.hint {
  color: #64748b;
  font-size: 0.85rem;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 0 24px;
  margin-top: 8px;
}

.tabs button {
  background: #334155;
}

.tabs button.active {
  background: #16a34a;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filters {
  margin: 12px 0;
}

.cleanup {
  margin: 16px 0;
  padding: 12px;
  background: #0f172a;
  border-radius: 8px;
}

.box h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.item {
  padding: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 0.9rem;
}

.item .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge.created,
.badge.offered {
  background: #1e3a5f;
  color: #7dd3fc;
}

.badge.accepted,
.badge.picked_up {
  background: #422006;
  color: #fcd34d;
}

.badge.delivered {
  background: #14532d;
  color: #86efac;
}

.badge.closed {
  background: #1f2937;
  color: #9ca3af;
}

.badge.cancelled {
  background: #450a0a;
  color: #fca5a5;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.grid-form.wide {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.grid-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.log {
  margin-top: 12px;
  padding: 10px;
  background: #020617;
  border-radius: 8px;
  font-size: 0.8rem;
  overflow: auto;
  max-height: 200px;
  white-space: pre-wrap;
}

.error {
  color: #f87171;
}

.ok {
  color: #4ade80;
}
