/* ============================================================
   Joseph 60 : administration
   Additions only. styles.css owns the design system — the
   variables, .wrap, .label, .btn, .card, .invite-panel, the
   .signup-form input treatment and the .code type are all
   inherited from it. Nothing here redefines those.
   ============================================================ */

/* The admin pages are worked in, not read through, so they sit
   tighter than the editorial rhythm of the marketing pages. */
.admin-main {
  padding-block: clamp(6rem, 14vh, 9rem) clamp(3rem, 7vh, 5rem);
}

.admin-view[hidden] { display: none; }

.admin-section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.admin-section.seam { border-top: 1px solid var(--hair); }

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.admin-head h2 { margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem); }

.admin-waiting {
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

/* ---------- Sign-in panel ---------------------------------------- */

/* .invite-panel is centred by design; the sign-in form inside it is
   left-aligned so the label sits over its field. */
.panel-title {
  margin: 1rem 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
}

.panel-copy {
  margin-inline: auto;
  font-size: 0.92rem;
  color: var(--body);
}

.invite-panel .form-status { text-align: center; }

/* ---------- Forms ------------------------------------------------- */
/* styles.css styles inputs only inside .signup-form (a one-line email
   capture). The admin forms are labelled, multi-field and include
   number/date/select, so the same treatment is restated here for
   .field controls rather than widened in styles.css. */

.field-stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
  text-align: left;
}

.field-grid {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.25rem);
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 46rem;
}

@media (min-width: 640px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
}

.field { display: grid; gap: 0.45rem; }

.field-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-label .opt {
  letter-spacing: 0.12em;
  text-transform: none;
  opacity: 0.7;
}

.field input,
.field select {
  width: 100%;
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 2px;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.field input::placeholder { color: var(--muted); }

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(90, 155, 213, 0.05);
}

/* the native date/number widgets ship a black glyph on our navy */
.field input[type="date"]::-webkit-calendar-picker-indicator,
.field input[type="number"]::-webkit-inner-spin-button {
  filter: invert(1);
  opacity: 0.45;
  cursor: pointer;
}

.field select {
  appearance: none;
  cursor: pointer;
  /* the options list is drawn by the OS, so it needs a readable
     background of its own rather than the transparent field */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 1.35rem) calc(50% + 1px),
    calc(100% - 1rem) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 3rem;
}

.field select option { background: var(--surface); color: var(--ink); }

.field-submit { align-self: end; }
.field-submit .btn { justify-content: center; }

.admin-add { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.admin-hint {
  margin-top: 0.75rem;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ---------- Status lines ------------------------------------------ */
/* .form-status from styles.css is amber by default, which reads as
   "attention". These two say which kind. */

.form-status.ok  { color: var(--accent); }
.form-status.err { color: var(--amber); }
.form-status:empty { min-height: 0; margin-top: 0; }
.form-status[hidden] { display: none; }

/* Stands where the view switcher would have been, so a role read that
   failed reads as an explanation rather than as an absence. */
#role-status { margin-top: 0; margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem); }

/* ---------- Consumer access ------------------------------------- */

.consumer-mode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.consumer-mode-actions .btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--ink);
}

/* ---------- Org list ---------------------------------------------- */

.org-list { display: grid; gap: clamp(0.75rem, 2vw, 1rem); }

.org-row {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: rgba(146, 176, 210, 0.02);
  border: 1px solid var(--hair);
  border-top: 1px solid var(--accent-dim);
}

.org-row.suspended { border-top-color: rgba(212, 168, 67, 0.7); }

@media (min-width: 860px) {
  .org-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .org-side { text-align: right; }
}

.org-name {
  font-family: "Cormorant", Georgia, serif;
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--ink);
}

.org-slug {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.org-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1.1rem;
}

.org-fact { display: grid; gap: 0.2rem; }

.org-fact dt {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.org-fact dd { font-size: 0.94rem; color: var(--body); }

.org-fact dd.full { color: var(--amber); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--hair);
  border-radius: 2px;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.badge.suspended { color: var(--amber); border-color: rgba(212, 168, 67, 0.45); }

/* The code in a row is read aloud, so it keeps the Cormorant of the
   join-page .code but at a size that belongs in a list. */
.org-code {
  font-family: "Cormorant", Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.4s var(--ease);
}

.org-code:hover,
.org-code:focus-visible { color: var(--accent); outline: none; }

.org-code-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.org-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

@media (min-width: 860px) {
  .org-actions { justify-content: flex-end; }
}

.btn.small {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  padding: 0.7rem 1.4rem;
}

.btn.small::before { width: 1em; }
.btn.small:hover::before,
.btn.small:focus-visible::before { width: 1.6em; }

.org-empty {
  padding: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--hair);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- The new-code reveal ----------------------------------- */

.code-reveal { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.code-reveal[hidden] { display: none; }

.code-reveal .code-label b { color: var(--ink); font-weight: 500; }

.reveal-note {
  margin: 1.5rem auto 0;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- View switcher ----------------------------------------- */
/* Only present for an account that holds both roles. */

.switch-bar { margin-bottom: 1.5rem; }
.switch-bar[hidden] { display: none; }

.switch-link {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.4s var(--ease);
}

.switch-link:hover,
.switch-link:focus-visible { color: var(--accent); outline: none; }

/* ---------- Seat dashboard: header card ---------------------------- */

.seats-picker { max-width: 26rem; margin-bottom: clamp(1.5rem, 3vw, 2rem); }
.seats-picker[hidden] { display: none; }

/* .card lifts on hover — right for the landing page's two paths, wrong
   for a panel that is only being read. */
.seat-head:hover,
.seat-invite:hover { transform: none; background: rgba(146, 176, 210, 0.02); }

.seat-org-name {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 0;
}

/* When access has stopped this is the first line in the card, above the
   name, because the seat count below it no longer means what it says. */
.seat-headline {
  max-width: none;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(212, 168, 67, 0.25);
  color: var(--amber);
  font-size: 1rem;
  line-height: 1.6;
}

.seat-count {
  display: flex;
  align-items: baseline;
  gap: 0.3em;
  max-width: none;
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-family: "Cormorant", Georgia, serif;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
}

.seat-used { font-size: clamp(3.25rem, 10vw, 4.75rem); }
.seat-sep  { font-size: clamp(2rem, 6vw, 3rem); color: var(--muted); }
.seat-cap  { font-size: clamp(2rem, 6vw, 3rem); color: var(--body); }

.seat-count.full .seat-used { color: var(--amber); }

.seat-count-label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.seat-head .org-facts { margin-top: clamp(1.5rem, 3vw, 2rem); }

.seat-note {
  max-width: none;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hair-soft);
  font-size: 0.92rem;
  color: var(--amber);
}

/* ---------- Seat dashboard: assignment ----------------------------- */

.seat-assign { margin-top: 1.25rem; }

/* ---------- Seat dashboard: members -------------------------------- */

.member-row {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 1.6rem) clamp(1.5rem, 3vw, 2rem);
  background: rgba(146, 176, 210, 0.02);
  border: 1px solid var(--hair);
}

@media (min-width: 640px) {
  .member-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .member-side { justify-self: end; }
}

.member-name {
  font-family: "Cormorant", Georgia, serif;
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--ink);
}

.member-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.25rem;
  margin-top: 0.5rem;
}

.member-fact {
  font-size: 0.86rem;
  color: var(--muted);
}

/* the day number is the one fact an admin scans for */
.member-fact.day {
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* The status badge is a footnote here, not a label to read first — the
   .badge in the org list carries more weight by design. */
.badge.quiet {
  border-color: var(--hair-soft);
  opacity: 0.85;
}

.badge.dim { color: var(--muted); }

/* the identity line under a member's name carries a real address, so it
   sits a step brighter than the surrounding facts without competing */
.member-fact.email {
  color: var(--body);
  word-break: break-word;
}

/* ---------- Seat dashboard: rotation stamp -------------------------- */

.invite-rotated {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.invite-rotated + .admin-hint { margin-top: 0.5rem; }

/* ---------- Seat dashboard: release history ------------------------- */
/* Collapsed by default and muted throughout: this is a record of an
   irreversible action, not a place to act. No buttons live in here. */

.released { margin-top: clamp(1.5rem, 3vw, 2rem); }
.released[hidden] { display: none; }

.released-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.5rem 0;
  list-style: none;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.4s var(--ease);
}

/* the default disclosure triangle is a browser artefact on this palette */
.released-summary::-webkit-details-marker { display: none; }

.released-summary::before {
  content: "";
  width: 0.9em;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
  transition: width 0.4s var(--ease);
}

.released[open] > .released-summary::before { width: 1.6em; }

.released-summary:hover,
.released-summary:focus-visible { color: var(--accent); outline: none; }

.released-list {
  display: grid;
  gap: 1px;
  margin-top: 0.75rem;
  border-top: 1px solid var(--hair-soft);
}

.released-row {
  padding: clamp(0.9rem, 2vw, 1.1rem) 0;
  border-bottom: 1px solid var(--hair-soft);
  opacity: 0.75;
}

.released-name {
  font-family: "Cormorant", Georgia, serif;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--body);
}

.released-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.25rem;
  margin-top: 0.35rem;
}

.released-facts .member-fact { font-size: 0.8rem; }
.released-facts .member-fact.email { color: var(--muted); }

.released .admin-hint { margin-top: 1rem; }
.released .admin-hint[hidden] { display: none; }

/* ---------- Footer ------------------------------------------------ */

.site-footer .foot-links[hidden] { display: none; }

.site-footer .foot-links #foot-email {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* ---------- 2026 visual refinement --------------------------------
   Administration shares the public site's craft, but keeps density,
   contrast, and scanning speed ahead of cinematic decoration. */

.admin-page {
  --bg: #07111f;
  --surface: #0d1b2c;
  --accent: #73aedd;
  --ink: #f5f1e8;
  --body: #bcc7d2;
  --muted: #8291a2;
  --hair: rgba(163, 190, 215, 0.16);
  --hair-soft: rgba(163, 190, 215, 0.08);
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(89,151,202,.16), transparent 65%),
    #07111f;
}

.admin-page .site-header {
  position: fixed;
  padding-block: 1.15rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(7,17,31,.78);
  backdrop-filter: blur(16px);
}

.admin-page .wordmark { letter-spacing: .28em; }

.admin-page .admin-main {
  padding-top: clamp(7rem, 14vh, 9rem);
}

.admin-page .admin-section {
  max-width: 960px;
  margin-inline: auto;
}

.admin-page .admin-section.seam {
  margin-top: 1rem;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.admin-page .invite-panel {
  border-radius: 20px;
  border-color: rgba(115,174,221,.22);
  background: linear-gradient(145deg, rgba(19,40,63,.96), rgba(10,24,40,.96));
  box-shadow: 0 35px 100px rgba(0,0,0,.28);
}

.admin-page .field input,
.admin-page .field select {
  border-radius: 10px;
  background-color: rgba(255,255,255,.025);
}

.admin-page .field input:hover,
.admin-page .field select:hover { border-color: rgba(115,174,221,.32); }

.admin-page .btn { border-radius: 999px; }
.admin-page .btn.solid {
  color: #07111f;
  background: var(--ink);
  border-color: var(--ink);
}
.admin-page .btn.solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.admin-page .org-row {
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18,37,58,.88), rgba(10,24,39,.78));
  box-shadow: 0 20px 55px rgba(0,0,0,.12);
  transition: transform .25s ease, border-color .25s ease;
}
.admin-page .org-row:hover {
  transform: translateY(-2px);
  border-color: rgba(115,174,221,.24);
}

.admin-page .badge { border-radius: 999px; padding-inline: .72rem; }
.admin-page .switch-bar {
  border-radius: 12px;
  background: rgba(115,174,221,.055);
}

@media (max-width: 640px) {
  .admin-page .admin-section { padding-inline: 1.25rem; }
  .admin-page .org-row { border-radius: 12px; }
}
