/* ==========================================================================
   Admin / Manage: the accordion, player tags, the audit trail and the build stamp.
   Moved out of app.css unchanged (docs/architecture/PARALLEL_DEVELOPMENT_SPLIT.md).
   ========================================================================== */

/* Build stamp: which deployed build this device runs, at the foot of Admin /
   Manage. A debugging aid, not a feature -- small, muted, centred, below
   everything that does something. */
.build-stamp{
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 100%; margin: var(--space-5) 0 var(--space-3); padding: 6px 0;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-interface); font-size: 10.5px; line-height: 1.4;
  color: var(--text-dim); opacity: 0.7; letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}
.build-stamp:active{ opacity: 1; }
.build-stamp-sha{ font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }

/* Audit trail rows in Historical Club Adjustment. Every event stays visible;
   the live one is bright, superseded ones recede without disappearing. */
.audit-row{ display:flex; gap:8px; align-items:flex-start; padding:7px 0; border-bottom:1px solid var(--surface-border-soft); }
.audit-row:last-of-type{ border-bottom:none; }
.audit-row-superseded{ opacity:0.55; }
.audit-dot{
  flex:none; width:8px; height:8px; border-radius:50%;
  background:var(--gold-bright); margin-top:5px;
}
.audit-row-superseded .audit-dot{ background:var(--text-dim); }
.audit-body{ min-width:0; }
.audit-head{
  font-family:'Helvetica Neue', Arial, sans-serif; font-size:12px; font-weight:700;
  color:var(--text); display:flex; align-items:center; gap:6px; flex-wrap:wrap;
}
.audit-facts{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:11.5px; color:var(--text-soft); margin-top:2px; }
.audit-meta{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:10.5px; color:var(--text-dim); margin-top:2px; }
.audit-badge{
  font-family:'Helvetica Neue', Arial, sans-serif; font-size:9.5px; font-weight:700;
  letter-spacing:0.04em; text-transform:none;
  padding:1px 7px; border-radius:999px; border:1px solid var(--line);
}
.audit-badge-active{ color:var(--green); border-color:rgba(90,156,90,0.5); }
.audit-badge-correction{ color:var(--gold-bright); border-color:var(--gold-dim); }
.audit-badge-superseded{ color:var(--text-dim); }

/* ===================== ADMIN ACCORDION =====================
   Admin/Manage is a long screen of maintenance controls that a phone has to
   scroll through to reach anything. One consistent section, collapsed on
   arrival, so the screen opens as a short list of what is available rather
   than a wall of forms.

   Every section is the same component deliberately: a parallel visual system
   for "the new bits" is how an admin screen stops looking like one product. */
.admin-acc{
  border:1px solid var(--surface-border-soft);
  border-radius:12px;
  background:var(--surface);
  margin:10px 0;
  overflow:hidden;
}
.admin-acc + .admin-acc{ margin-top:8px; }
.admin-acc-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; padding:13px 14px;
  background:transparent; border:0; cursor:pointer; text-align:left;
  font-family:'Helvetica Neue', Arial, sans-serif;
}
.admin-acc-title{
  font-size:13px; font-weight:700; color:var(--text);
  letter-spacing:.01em; min-width:0;
}
/* The chevron is the only moving part, so it carries the state. */
.admin-acc-chev{
  flex:none; color:var(--text-dim); font-size:12px; line-height:1;
  transition:transform .18s ease;
}
.admin-acc[open] .admin-acc-chev,
.admin-acc.is-open .admin-acc-chev{ transform:rotate(180deg); color:var(--gold-bright); }
.admin-acc.is-open .admin-acc-title{ color:var(--gold-bright); }
.admin-acc-body{ padding:0 14px 14px; }
.admin-acc-body > .section-sub:first-child{ margin-top:0; }
/* Inside a section the heading has already been said by the header row. */
.admin-acc-body .section-heading:first-child{ margin-top:0; }

/* ===================== PLAYER TAGS =====================
   One row per player, reading as a record rather than a form: name, what they
   are, and a chevron. The controls are there when asked for. */
.ptag-row{
  border-top:1px solid var(--surface-border-soft);
}
.ptag-row:first-child{ border-top:0; }
.ptag-summary{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; padding:11px 2px;
  background:transparent; border:0; cursor:pointer; text-align:left;
  font-family:'Helvetica Neue', Arial, sans-serif;
}
/* Deliberately NOT the public serif player-name treatment: this is a
   maintenance list, and borrowing the player-facing styling made it read like
   a leaderboard. */
.ptag-name{
  display:block;
  font-family:'Helvetica Neue', Arial, sans-serif;
  font-size:13px; font-weight:600; color:var(--text); min-width:0;
}
.ptag-meta{
  display:block;
  font-size:11px; color:var(--text-dim); margin-top:2px;
  font-family:'Helvetica Neue', Arial, sans-serif;
}
.ptag-right{ display:flex; align-items:center; gap:8px; flex:none; }
.ptag-state{
  font-size:10px; letter-spacing:.04em; text-transform:uppercase;
  padding:3px 7px; border-radius:999px; white-space:nowrap;
  border:1px solid var(--line); color:var(--text-dim);
}
.ptag-state.is-active{ color:var(--gold-bright); border-color:var(--gold-dim); }
.ptag-chev{ color:var(--text-dim); font-size:11px; transition:transform .18s ease; }
.ptag-row.is-open .ptag-chev{ transform:rotate(180deg); color:var(--gold-bright); }
.ptag-controls{ padding:0 2px 12px; display:flex; flex-wrap:wrap; gap:8px; }
/* Current tier and status share a row; the starting-tier control takes its own,
   because "Started: same as now" has nowhere to truncate to that still means
   anything. */
.ptag-controls .ptag-tier{ flex:1 1 110px; min-width:0; }
.ptag-controls .ptag-starting{ flex:1 1 100%; min-width:0; }

/* Status: the group as it is, grouped -- Active, then Temporarily inactive,
   then Archived, where archived players are found and restored. */
.ptag-group-head{
  margin: 14px 2px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-dim);
}
.ptag-group-head:first-child{ margin-top: 2px; }
.ptag-state.is-temporarilyInactive{ color: var(--text-soft); border-style: dashed; }
.ptag-state.is-archived{ color: var(--text-dim); background: var(--surface-2); }
.ptag-status-row{ margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--surface-border); }
.ptag-status-row .fg-label{ display:block; margin-bottom: 6px; }
.ptag-status-actions{ display:flex; flex-wrap:wrap; gap:8px; }
.ptag-status-actions > .preset-btn{ flex: 1 1 140px; min-height: 40px; }
.ptag-archive-confirm{ flex: 1 1 100%; }
.ptag-archive-confirm .cc-meta-row{ margin-top: 8px; gap: 8px; }

/* Rename sits inside the player row that is already open, below the tier and
   status controls — a label change, presented as one. */
.ptag-rename{ margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--surface-border); }
.ptag-rename .fg-label{ display:block; margin-bottom: 5px; }
.ptag-rename-input{ width: 100%; margin-bottom: 8px; }
.ptag-rename-confirm{
  background: var(--surface-2); border: 1px solid var(--surface-border);
  border-radius: 10px; padding: 10px 12px; font-size: 12.5px;
}
.ptag-rename-note{
  font-family: var(--font-interface); font-size: 11px; color: var(--text-dim);
  margin-top: 6px; line-height: 1.45;
}
.ptag-rename-note.is-bad{ color: var(--red); }

/* ===================== MONTHLY BOARD PACK =====================
   The editor is the ordinary Admin list: one row per module, a checkbox, two
   small move buttons, and its options once it is switched on. The preview is
   a plain report -- compact tables and lists -- and the admin's own
   commentary is visibly marked as such, so nobody mistakes it for a figure. */
.bp-items{ margin:8px 0 4px; }
.bp-item{ border-top:1px solid var(--surface-border-soft); padding:8px 0; }
.bp-item:first-child{ border-top:0; }
.bp-item-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.bp-check{ display:flex; align-items:center; gap:8px; min-width:0; font-family:'Helvetica Neue', Arial, sans-serif; font-size:12.5px; color:var(--text-soft); }
.bp-item.is-on .bp-check{ color:var(--text); font-weight:600; }
.bp-move{ display:flex; gap:4px; flex:none; }
.bp-move-btn{ min-width:34px; padding:4px 8px; }
.bp-move-btn[disabled]{ opacity:.35; }
.bp-opts{ display:flex; flex-wrap:wrap; gap:6px 10px; margin:6px 0 0 26px; }
.bp-opt{ display:flex; flex-direction:column; gap:2px; font-family:'Helvetica Neue', Arial, sans-serif; font-size:10.5px; color:var(--text-dim); }
.bp-opt .fg-select{ padding:5px 8px; font-size:12px; min-width:118px; }
.bp-item-note .fg-select{ margin-top:6px; width:100%; }
.bp-note-input{ resize:vertical; min-height:64px; }
.bp-remove{ margin-top:6px; }
.bp-note-tag{
  display:inline-block; font-family:'Helvetica Neue', Arial, sans-serif; font-size:9.5px; font-weight:700;
  letter-spacing:.06em; text-transform:uppercase; color:var(--gold-bright);
  border:1px solid var(--gold-dim); border-radius:999px; padding:1px 7px;
}
.bp-actions{ display:flex; gap:8px; }
.bp-actions .preset-btn{ flex:1; }
.bp-warn{
  font-family:'Helvetica Neue', Arial, sans-serif; font-size:11.5px; line-height:1.45; color:var(--text);
  border:1px solid var(--gold-dim); border-radius:8px; padding:8px 10px; margin:6px 0;
}
.bp-pack{ margin-top:10px; border-top:1px solid var(--surface-border-soft); padding-top:8px; }
.bp-pack-head{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-dim); margin-bottom:4px; }
.bp-module{ padding:10px 0; border-bottom:1px solid var(--surface-border-soft); }
.bp-module:last-child{ border-bottom:0; }
.bp-module-title{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:13px; font-weight:700; color:var(--text); margin-bottom:6px; }
.bp-note .bp-note-tag{ margin-bottom:6px; }
.bp-note-body{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:12.5px; line-height:1.5; color:var(--text-soft); overflow-wrap:anywhere; }
.bp-subhead{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--gold-soft); margin:8px 0 3px; }
.bp-list{ list-style:none; margin:0; padding:0; }
.bp-list li{ display:flex; align-items:baseline; gap:8px; padding:3px 0; font-family:'Helvetica Neue', Arial, sans-serif; font-size:12.5px; color:var(--text); }
.bp-rank{ flex:none; min-width:18px; color:var(--text-dim); font-variant-numeric:tabular-nums; }
.bp-name{ min-width:0; overflow-wrap:anywhere; }
.bp-val{ margin-left:auto; text-align:right; color:var(--text-soft); font-variant-numeric:tabular-nums; }
.bp-table{ width:100%; border-collapse:collapse; font-family:'Helvetica Neue', Arial, sans-serif; font-size:12px; font-variant-numeric:tabular-nums; }
.bp-table th{ text-align:left; font-size:10px; font-weight:600; color:var(--text-dim); padding:3px 4px; border-bottom:1px solid var(--surface-border-soft); }
.bp-table td{ padding:4px; color:var(--text); border-bottom:1px solid var(--surface-border-soft); }
.bp-table tr:last-child td{ border-bottom:0; }
.bp-table th:nth-child(n+3), .bp-table td:nth-child(n+3){ text-align:right; }
.bp-stats{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.bp-stat{ text-align:center; }
.bp-stat-num{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:20px; font-weight:700; color:var(--text); }
.bp-stat-label{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:10.5px; color:var(--text-dim); }
.bp-foot{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:10.5px; color:var(--text-dim); margin-top:6px; }
.bp-empty{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:12px; color:var(--text-dim); padding:2px 0; }
.bp-dim{ color:var(--text-dim); }

/* Publishing the players' Monthly Review from the pack. */
.bp-publish{ margin-top:6px; }
.bp-publish-differs{ color:var(--gold-bright); }
.bp-confirm{ border:1px solid var(--gold-dim); border-radius:10px; padding:10px; margin:6px 0; }
.bp-share-row{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.bp-share-row .preset-btn{ flex:1 1 auto; text-align:center; text-decoration:none; }
.bp-review-url{ font-size:10.5px; overflow-wrap:anywhere; margin-top:4px; }
.bp-deck-note{ margin-top:6px; }
/* The pack's Kings of Tiers is the Rankings panel's own tiles; they are not
   links here. */
.bp-module .kings-card{ cursor:default; }
.bp-king-none{ font-size:10px; font-weight:400; color:var(--text-dim); }
/* Sharing a module or the deck as pictures. */
.bp-share-img{ display:block; margin:8px 0 0 auto; padding:4px 12px; font-size:12px; }
/* Saving the whole pack at once: PDF or every picture. */
.bp-save-all{ margin:10px 0 4px; padding:10px; border:1px solid var(--surface-border-soft); border-radius:10px; }
.bp-save-all-head{ font-family:'Helvetica Neue', Arial, sans-serif; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-dim); }
.bp-share-ready{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:6px 0; padding:8px 10px; border:1px solid var(--gold-dim); border-radius:10px; font-family:'Helvetica Neue', Arial, sans-serif; font-size:12px; color:var(--text); }
/* Player Packs: the month's players, then one player's pack. */
.pp-list{ display:flex; flex-direction:column; margin:8px 0; border-top:1px solid var(--surface-border-soft); }
.pp-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:44px; padding:8px 4px; background:none; border:0; border-bottom:1px solid var(--surface-border-soft); color:var(--text); text-align:left; cursor:pointer; font-family:'Helvetica Neue', Arial, sans-serif; }
.pp-name{ min-width:0; font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.pp-state{ flex:none; font-size:11px; color:var(--text-dim); }
.pp-head{ display:flex; align-items:center; gap:10px; margin:6px 0 8px; }
.pp-title{ min-width:0; font-family:'Helvetica Neue', Arial, sans-serif; font-size:14px; font-weight:700; color:var(--text); overflow-wrap:anywhere; }
