:root {
  --ink: #12231f;
  --paper: #f6f5f1;
  --line: #dcd9d0;
  --green: #1c7a4a;
  --green-dim: #e5f2ea;
  --amber: #a9720b;
  --amber-dim: #fbf1de;
  --red: #a4302b;
  --red-dim: #fbe9e7;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.topbar {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.subtitle {
  margin: 4px 0 0;
  color: #566862;
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 28px 32px;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.panel h2 {
  margin: 0 0 14px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #445a53;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
}
input[type=text], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; }

.hint { font-size: 12px; color: #6b7a75; margin: 8px 0 0; }
.hint code { background: var(--green-dim); padding: 1px 5px; border-radius: 4px; }

button {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: #166a41; }

.alert {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}
.alert-ok { background: var(--green-dim); color: var(--green); }
.alert-error { background: var(--red-dim); color: var(--red); }

.panel-wide { min-width: 0; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.batch-select { display: flex; align-items: center; gap: 8px; }
.batch-select label { margin: 0; }
.batch-select select { width: auto; min-width: 260px; }

table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7a75; }
.empty { color: #8b978f; text-align: center; padding: 30px 0; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-ok { background: var(--green-dim); color: var(--green); }
.badge-fail { background: var(--red-dim); color: var(--red); }
.badge-pending { background: var(--amber-dim); color: var(--amber); }
