/* Admin-only styles, layered on top of styles.css */

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 0.5rem;
}
.admin-bar h2 { margin: 0; }

.service-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.service-row .meta { flex: 1 1 240px; }
.service-row .svc-org { font-weight: 700; color: var(--brand-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.service-row .svc-name { font-weight: 600; }
.service-row .actions { display: flex; gap: 0.5rem; }

.pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pill-published { background: var(--brand-light); color: var(--brand-dark); }
.pill-draft { background: #fff0d6; color: #7a5600; }
.pill-pending { background: #fff0d6; color: #7a5600; }
.pill-approved { background: #dcf5e4; color: #1c6b34; }
.pill-rejected { background: #fde8ec; color: #80012b; }

/* Change-type pills on the review queue */
.pill-change { margin-right: 0.35rem; }
.pill-create { background: #dcf5e4; color: #1c6b34; }
.pill-update { background: var(--brand-light); color: var(--brand-dark); }
.pill-delete { background: #fde8ec; color: #80012b; }

/* The review queue sits above the service list with a warm accent. */
.pending-card { border-left: 4px solid #e0a800; }

/* Usage stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  text-align: center;
  background: #fff;
}
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--brand-dark); line-height: 1.1; }
.stat-label { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.2rem; }

/* Public submission form: honeypot must be unreachable but not display:none
   (some bots skip hidden inputs). Push it off-screen instead. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.check.consent { margin: 0 0 1.1rem; }

/* Submission criteria on the public form */
.criteria-card { border-left: 4px solid var(--brand); }
.criteria-list { margin: 0.5rem 0 0.75rem; padding-left: 1.2rem; }
.criteria-list li { margin-bottom: 0.4rem; }

/* "Possible duplicate" flag on the review queue */
.pill-dup { background: #fff0d6; color: #7a5600; margin-left: 0.35rem; }

.btn-sm { min-height: 38px; padding: 0.4rem 0.9rem; font-size: 0.95rem; }
.btn-danger { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-danger:hover { background: #fde8ec; }

/* Form */
.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field .hint { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 0.4rem; }
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.field textarea { min-height: 4.5rem; resize: vertical; }

fieldset.group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 1.1rem;
}
fieldset.group legend { font-weight: 700; padding: 0 0.4rem; }
fieldset.group .q-text { font-weight: 600; margin: 0.5rem 0 0.4rem; }
fieldset.group .q-open { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 0.5rem; }

.check-grid { display: grid; gap: 0.4rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .check-grid { grid-template-columns: 1fr 1fr; } }
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.check input { margin-top: 0.15rem; width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }

.errors {
  background: #fde8ec;
  border: 1px solid var(--accent);
  color: #80012b;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.errors ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }

.notice {
  background: var(--brand-light);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
}

.row-2 { display: grid; gap: 0.9rem; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }

.logout-link { background: none; border: 0; color: var(--brand-dark); text-decoration: underline; cursor: pointer; font: inherit; }
