/* Admin page layout - theme.css owns the palette and type, this file owns
 * geometry only, same split as portal.css/seat.css. This page never
 * touches var(--amber): "you can act now" (tests/web/test_theme.py) does
 * not apply to an operator console - nothing here is a player's turn to
 * act on, so every accent below is --gild (emphasis) or --dim (secondary),
 * never amber, however tempting a "create" button or an error might make
 * it look.
 */

body.page {
  padding: 24px 20px 48px;
  max-width: 640px;
  margin: 0 auto;
  box-sizing: border-box;
}

.portal-head {
  margin-bottom: 18px;
  text-align: center;
}

.portal-head .wordmark {
  font-size: 1.6rem;
}

.admin-subtitle {
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.admin-panel {
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 18px 18px 20px;
  margin-bottom: 18px;
}

.admin-heading {
  font-weight: 600;
  color: var(--gild);
  font-size: 1.05rem;
  margin: 0 0 12px;
}

.admin-panel .admin-heading:not(:first-child) {
  margin-top: 22px;
}

.admin-label {
  display: block;
  color: var(--dim);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.admin-input {
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--parchment);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  box-sizing: border-box;
}

.admin-input:focus-visible {
  outline: none;
  border-color: var(--gild-dim, var(--gild));
}

.admin-button {
  background: var(--gild);
  color: var(--ink);
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
}

.admin-button:hover,
.admin-button:focus-visible {
  outline: none;
  background: var(--gild-dim, var(--gild));
}

.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-inline-form .admin-input {
  flex: 1 1 200px;
}

.admin-copy {
  color: var(--parchment);
  font-size: 0.85rem;
  line-height: 1.5;
}

.admin-copy-dim {
  color: var(--dim);
  margin: 10px 0 0;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}

/* --- the games table ------------------------------------------------- */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
}

.admin-table th {
  text-align: left;
  color: var(--dim);
  font-weight: 400;
  font-size: 0.78rem;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--rule);
}

.admin-table td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--parchment);
  font-size: 0.9rem;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table td:first-child {
  font-family: var(--font-display);
  color: var(--gild);
}

/* --- hints -------------------------------------------------------------- */

.hint {
  color: var(--dim);
  font-size: 0.85rem;
  margin: 10px 0 0;
}

.hint-error {
  color: var(--parchment);
}

@media (max-width: 480px) {
  body.page {
    padding: 18px 14px 40px;
  }

  .admin-panel {
    padding: 14px 14px 16px;
  }
}

/* --- the create form's three tabs --------------------------------------- */

/* Tab strip. Three equal targets across the full width - a phone is the
 * assumed screen, and a 44px minimum row is what a thumb needs. */
.tabstrip {
  display: flex;
  gap: 2px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--rule);
}

.tabstrip .tab {
  flex: 1;
  min-height: 44px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  font: inherit;
  font-size: 0.9rem;
  padding: 10px 4px;
  cursor: pointer;
}

.tabstrip .tab.is-selected {
  color: var(--gild);
  border-bottom-color: var(--gild);
}

.admin-subheading {
  color: var(--gild);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 20px 0 8px;
}

.tabpanel > .admin-subheading:first-child {
  margin-top: 0;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* The whole row is the tap target, not the 13px box inside it. */
.checkrow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--parchment);
  font-size: 0.9rem;
  cursor: pointer;
}

.player-card {
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 12px 12px 14px;
  margin-bottom: 10px;
}

.player-card .player-card-title {
  color: var(--gild);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.player-card .admin-label:first-of-type {
  margin-top: 0;
}

.admin-button-quiet {
  background: none;
  border: 1px dashed var(--rule);
  color: var(--dim);
  width: 100%;
}

/* Pinned below the tab panels, so it is reachable from any tab. */
.admin-create {
  margin-top: 18px;
  width: 100%;
  min-height: 48px;
}

/* Back to the games list. admin.html does not load seat.css, where the
 * portal's own .back-link lives, so the two rules are deliberately
 * separate copies rather than a shared file pulled in for four lines. */
.admin-back {
  display: inline-block;
  margin-top: 10px;
  color: var(--gild);
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.admin-back:hover,
.admin-back:focus-visible {
  border-bottom-color: var(--gild);
  outline: none;
}

/* Label LEFT, control RIGHT, controls aligned down a single column.
 *
 * The markup is already an alternating label/control sequence, so the grid
 * goes on the CONTAINER and every child falls into place - no wrapper divs,
 * no per-field markup. `max-content` on the first track is what aligns the
 * controls: every label gets the width of the longest one, so the controls
 * start at one x for the whole panel rather than each under its own label.
 *
 * A label above its control costs a whole row per field; on the Settings
 * tab that was 15 rows of dead vertical space on a phone screen already
 * scrolling. Two columns halve it.
 */
#panel-settings,
.player-card {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 12px;
  align-items: center;
}

#panel-settings .admin-label,
.player-card .admin-label {
  margin-bottom: 0;
}

#panel-settings .admin-input,
.player-card .admin-input {
  width: 100%;
  min-width: 0;
}

/* The card's own heading is not a field - it spans both tracks. */
.player-card .player-card-title {
  grid-column: 1 / -1;
}

/* --- accounts (2026-09-09) ----------------------------------------------- */

/* Shown once, right after a create or a reset - --gild (emphasis), not
 * --amber: nothing here is "your turn to act", see the file header. */
.admin-once { border-color: var(--gild); }
.admin-once-value { display: block; font-size: 1.25rem; letter-spacing: .05em; margin: .5rem 0; user-select: all; }
