:root {
  --bg: #f7f7f4;
  --card: #fff;
  --accent: #1f880c;
  --accent-soft: #c47400;
  --text: #1a1a1a;
  --muted: #777;
  --border: #e8e8e4;
  --link: #1658b3;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 12px/1.55 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  padding: 34px 20px 18px;
  max-width: 860px;
  margin: 0 auto;
}
header h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: -0.5px; }
header .sub { color: var(--muted); font-size: 11px; }
main { max-width: 860px; margin: 0 auto; padding: 8px 16px 60px; }
.tbl-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  min-width: 760px;
}
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 14px;
  letter-spacing: .4px;
}
td {
  background: var(--card);
  padding: 16px 14px;
  vertical-align: top;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
tr td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
tr td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
tr:hover td { background: #fffdf5; }

.name { font-weight: 600; font-size: 13px; color: #111; }
.rubric-cell { color: var(--muted); font-size: 10px; }
.promo {
  white-space: pre-wrap;
  font-size: 11px;
  color: #1a1a1a;
  max-width: 260px;
}
.muted { color: var(--muted); font-size: 10px; }
.links { white-space: nowrap; }
.links a {
  display: inline-block;
  margin-right: 9px;
  font-size: 10px;
  color: var(--link);
  text-decoration: none;
}
.links a:hover { text-decoration: underline; }
td a { color: var(--link); text-decoration: none; }
td a:hover { text-decoration: underline; }
footer {
  max-width: 860px;
  margin: 30px auto 0;
  padding: 0 20px 40px;
  font-size: 9px;
  color: var(--muted);
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 14px;
}

/* ─── admin ──────────────────────────────────────────────────────────── */
.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-bar .stats { font-size: 13px; color: var(--muted); }
.btn {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}
.btn:hover { background: #fafaf8; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: #186e08; }
.verified-yes { color: var(--accent); font-weight: 600; }
.verified-no { color: #b00; }

.editor-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, .45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 10;
}
.editor-backdrop.open { display: flex; }
.editor {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
}
.editor h2 { margin: 0 0 4px; font-size: 18px; }
.editor .editor-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.editor label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 10px 0 4px;
  font-weight: 600;
}
.editor textarea, .editor input[type=text] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  font: inherit;
  resize: vertical;
}
.editor textarea { min-height: 90px; }
.editor .row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}
.editor .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  font-size: 14px;
}
.error {
  background: #fdecec;
  color: #a11;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 20px 0;
}

@media (max-width: 900px) {
  header h1 { font-size: 21px; }
  .tbl-wrap { overflow-x: visible; }
  table { min-width: unset; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 14px 16px;
  }
  tr td {
    background: transparent !important;
    border: none !important;
    padding: 4px 0 !important;
    border-radius: 0 !important;
  }
  td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 8px;
  }
  td:first-child::before { display: none; }
}
