/* Additions to the POC. NOTHING here may redefine a selector site.css already
 * owns.
 *
 * site.css IS the POC — 232 selectors, the whole design system. The first build
 * of this site wrote its own simplified markup and class names, and because this
 * file loads second it overrode 51 of those rules with worse versions: the logo
 * became a squashed 34px tile, the hero lost its gradient and washed out, the
 * stat strip and sidebar were never rendered at all.
 *
 * So this file is now strictly things the POC never had: the staff tool, the 2FA
 * screens, flash messages and the admin tables. If something looks wrong, fix the
 * MARKUP to match the POC rather than adding an override here. */

/* ── staff tool ─────────────────────────────────────────────────────────── */
.adminstrip {
  background: var(--opps-primary-deep);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  text-align: center; padding: 6px 12px;
  border-bottom: 1px solid var(--opps-primary-bright);
}

/* ── header additions ───────────────────────────────────────────────────── */
.whoami { display: flex; align-items: center; gap: 8px; text-decoration: none;
          color: var(--opps-text); font-size: .9rem; white-space: nowrap; }
.whoami img { border-radius: 50%; }
.inline { display: inline; }

/* Three-state server dot. The POC only ever showed "online". */
.topbar .dot.on  { background: var(--opps-success); box-shadow: 0 0 8px var(--opps-success); }
.topbar .dot.off { background: var(--opps-danger); }

/* ── flash ──────────────────────────────────────────────────────────────── */
.flash {
  margin: 14px 0 0; padding: 11px 14px; border-radius: 8px;
  background: var(--opps-surface-2);
  border-left: 3px solid var(--opps-primary-bright);
}

/* ── status badges ──────────────────────────────────────────────────────── */
.badge-ok   { background: rgba(63,185,80,.16);  color: var(--opps-success); }
.badge-warn { background: rgba(216,161,47,.16); color: var(--opps-warning); }
.badge-bad  { background: rgba(229,72,77,.16);  color: var(--opps-danger); }

/* ── two-factor ─────────────────────────────────────────────────────────── */
.setup-steps { padding-left: 20px; line-height: 1.9; color: var(--opps-text-muted); }
.setup-steps li { margin-bottom: 10px; }
.qr { border-radius: 8px; margin-top: 8px; background: #fff; padding: 6px; }
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
         gap: 8px; margin: 16px 0; }
.codes code {
  background: var(--opps-bg); border: 1px solid var(--opps-border); border-radius: 6px;
  padding: 9px; text-align: center; font-family: 'Consolas', monospace; letter-spacing: .08em;
}

/* ── applications + admin tables ────────────────────────────────────────── */
.answers { margin: 0; }
.answers dt { font-size: .72rem; letter-spacing: 1.5px; text-transform: uppercase;
              color: var(--opps-text-muted); margin-top: 12px; }
.answers dd { margin: 4px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.decide { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pager  { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }

/* Simple rows for pages the POC has no design for (admin lists, members). */
.arow {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--opps-surface); border: 1px solid var(--opps-border);
  border-radius: var(--opps-radius); padding: 12px 14px; margin-bottom: 8px;
  text-decoration: none; color: inherit;
}
a.arow:hover { border-color: var(--opps-primary-bright); background: var(--opps-surface-2); }
.arow .grow { flex: 1; min-width: 0; font-weight: 600; }
.arow .meta { color: var(--opps-text-muted); font-size: .85rem; margin-left: auto; }

/* Long words and pasted URLs must not push the page sideways. */
.post-body, .prose { line-height: 1.65; overflow-wrap: anywhere; }
.prose h2 { font-family: var(--font-display); margin: 26px 0 10px; }
.prose p, .prose li { color: var(--opps-text-muted); }
.prose ul { padding-left: 20px; }

/* Legal pages read better narrower than the full 1200px grid. */
.legal { max-width: 780px; }


/* ── moderation ─────────────────────────────────────────────────────────── */
/* Visually separate from the thread, because these controls change what
   everyone else sees and should not read as part of the conversation. */
.modbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--opps-surface-2);
  border: 1px solid var(--opps-border);
  border-left: 3px solid var(--opps-warning);
  border-radius: var(--opps-radius);
  padding: 10px 14px; margin-bottom: 14px;
}
.modbar__label {
  font-family: var(--font-display); font-size: .7rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--opps-warning); margin-right: 4px;
}
.modbar select, .modbar .input-sm {
  background: var(--opps-bg); color: var(--opps-text);
  border: 1px solid var(--opps-border); border-radius: 6px;
  padding: 5px 8px; font-family: var(--font-body); font-size: .82rem;
}

/* ── board admin ────────────────────────────────────────────────────────── */
.boardgrid { display: grid; grid-template-columns: 2fr 1.4fr 70px 90px; gap: 12px; }
.boardhead {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--opps-border);
}
.boardhead .f-icon { width: 32px; height: 32px; font-size: 1rem; }
.is-archived { opacity: .72; }
.check {
  display: block; margin: 6px 0; font-size: .88rem; color: var(--opps-text-muted);
  cursor: pointer;
}
.check input { margin-right: 8px; }
.danger-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--opps-border);
}
.danger-row .form-note { flex: 1; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

@media (max-width: 760px) {
  .boardgrid { grid-template-columns: 1fr 1fr; }
}


/* ── header spacing ─────────────────────────────────────────────────────── */
/* The search box, the name and the log-out button were running into each other
   at ordinary desktop widths. The search gives up space first — it is the only
   one of the three that is still usable when narrow. */
.header-actions { gap: 12px; }
.header-actions .search { flex: 0 1 200px; min-width: 120px; }
.whoami { max-width: 150px; }
.whoami span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.header-actions .btn { flex-shrink: 0; }

@media (max-width: 1100px) {
  /* Below this the name is the first thing worth dropping: the avatar still
     says who is signed in, and /account is one click away. */
  .whoami span { display: none; }
}
@media (max-width: 900px) {
  .header-actions .search { display: none; }
}


/* Ids and plates line up and are obviously machine values. */
.chip.mono, .mono {
  font-family: 'Consolas', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
/* The admin rows carry forms; stop them stretching the row. */
.arow form { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.arow .dot { flex-shrink: 0; }
.arow .cav { flex-shrink: 0; }


/* ── admin tool panels ──────────────────────────────────────────────────── */
/* Actions grouped into cards that reflow rather than a single long column, so
   the common ones are reachable without scrolling past the record. */
.toolgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.toolgrid .content-card { margin-bottom: 0; }
.toolgrid .decide { gap: 6px; }

/* Inputs sitting inside a row of actions. */
.input-sm {
  background: var(--opps-bg); color: var(--opps-text);
  border: 1px solid var(--opps-border); border-radius: 6px;
  padding: 5px 8px; font-family: var(--font-body); font-size: .82rem;
  width: 96px;
}
.input-sm:focus { outline: none; border-color: var(--opps-primary-bright); }

/* A disabled action explains itself by being visibly unavailable rather than
   failing after the click. */
.btn[disabled] { opacity: .38; cursor: not-allowed; }


/* ── item icons ─────────────────────────────────────────────────────────── */
.itemicon {
  width: 32px; height: 32px; flex-shrink: 0;
  object-fit: contain;
  background: var(--opps-bg);
  border: 1px solid var(--opps-border);
  border-radius: 7px;
  padding: 2px;
  /* The art is drawn for a light inventory panel; a touch of lift stops the
     darker pieces disappearing into the row behind them. */
  filter: brightness(1.06);
}
/* The 12 items with no art. Same footprint, so a row missing one does not
   shift everything after it. */
.itemicon--none {
  display: inline-block;
  background: var(--opps-surface-2);
  border-style: dashed;
}
.itempreview { margin-top: 8px; }
