/* ============================================================
   Admin chrome. The dark top strip is gone — admin links live in
   the drawer (see nav.css) and only appear when authenticated. This
   file holds the inside-the-page workshop styles: panels, tables,
   forms, status pills, the QR card, login.
   ============================================================ */

body.is-admin-page .site-header {
  border-bottom: 1px solid var(--rule);
}
body.is-admin-page h1 {
  margin-top: var(--space-3);
}
body.is-admin-page .lede {
  color: var(--fg-muted);
  font-size: var(--t-base);
}

/* Admin sub-page panels — used for cards/sections inside admin pages */
.adm-panel {
  border: 1px solid var(--rule);
  border-radius: var(--radius-1);
  padding: var(--space-3);
  margin: var(--space-3) 0;
  background: var(--bg);
}
.adm-panel h3 { margin-top: 0; }

/* Admin tables (re-used from /admin) */
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
}
.adm-table th {
  text-align: left;
  padding: 10px 12px 8px;
  border-bottom: var(--rule-thin);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--fg-muted);
  font-weight: 500;
}
.adm-table td {
  padding: 10px 12px;
  border-bottom: var(--rule-thin);
  vertical-align: top;
}
.adm-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.adm-pill-pending  { background: var(--bg-sunk); color: var(--fg-muted); }
.adm-pill-running  { background: color-mix(in oklch, #b58b3a 14%, var(--bg)); color: #8b6020; }
.adm-pill-complete { background: color-mix(in oklch, #5e7544 14%, var(--bg)); color: #2f5126; }
.adm-pill-failed   { background: color-mix(in oklch, #a04628 14%, var(--bg)); color: #6e2f1c; }

/* Admin form controls */
.adm-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
}
.adm-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--fg-muted);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
}
.adm-form input,
.adm-form select,
.adm-form textarea {
  font-family: inherit;
  font-size: var(--t-sm);
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-1);
  color: var(--fg);
}
.adm-form textarea {
  font-family: var(--font-mono);
  min-height: 200px;
  resize: vertical;
}
.adm-form input:focus,
.adm-form select:focus,
.adm-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.adm-form .full { grid-column: 1 / -1; }
.adm-form button.primary {
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius-1);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 500;
  cursor: pointer;
}
.adm-form button.primary:hover { opacity: 0.9; }
.adm-form .feedback {
  font-size: var(--t-xs);
  color: var(--fg-muted);
  min-height: 18px;
}
.adm-form .feedback.ok  { color: #2f5126; }
.adm-form .feedback.err { color: #8b1a1a; }

/* QR code box on admin audit detail */
.qr-box {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-1);
}
.qr-box img, .qr-box svg {
  display: block;
  width: 200px; height: 200px;
}
.qr-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 6px;
  text-align: center;
}

/* Login page — centred, minimal */
body.is-admin-login .site-header,
body.is-admin-login .admin-nav,
body.is-admin-login .site-footer { display: none; }
body.is-admin-login .site-main {
  max-width: 360px;
  margin-top: 18vh;
}
.login-box h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 var(--space-3);
}
.login-box .feedback { margin-top: 8px; }
