/*
 * Admin UI styles (fp-qr2d).
 *
 * Extracted verbatim from the inline <style> blocks in
 * internal/api/handlers_admin.go (pageAdminLogin, pageAdmin,
 * pageAdminPostDelete) so those page bodies can drop their inline
 * <style> blocks. Same visual rendering — only the carrier changed.
 *
 * Selectors are scoped via [data-admin-page] on <body> so the rules
 * here don't accidentally collide with /static/app.css if the admin
 * surface ever loads the main layout. Each handler's body sets the
 * matching data-admin-page="login|queue|delete".
 *
 * Served from S3 behind CloudFront as /static/admin.css alongside
 * /static/app.css; the deployment workflow `aws s3 sync ./web/static
 * s3://<bucket>/static/` picks it up automatically.
 */

/* ---- /admin kanban board (pageAdmin, fp-0y5a; restyled fp-lm81) ----
 * Also the support queue (ticket_queue.gohtml), which shares the page id. */
body[data-admin-page="queue"] .bucket { margin: 1.75rem 0; }
body[data-admin-page="queue"] .tier-label {
  display: flex; align-items: center; gap: .5rem;
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700; margin: 0 0 .7rem;
}

body[data-admin-page="queue"] .board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .9rem;
  align-items: start;
}
body[data-admin-page="queue"] .column {
  --col: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: background .12s ease, border-color .12s ease;
}
body[data-admin-page="queue"] .column h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--text);
  font-weight: 700;
  margin: 0;
  padding: .7rem .8rem .5rem;
}
body[data-admin-page="queue"] .col-dot {
  width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--col); flex: none;
}
body[data-admin-page="queue"] .count {
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 0 .5rem;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}
body[data-admin-page="queue"] .tier-label .count { margin-left: 0; }
body[data-admin-page="queue"] .column-cards {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .3rem .55rem .6rem;
  max-height: 70vh;
  overflow-y: auto;
  min-height: 4.5rem;
}
/* An empty roadmap/archive column shows a drop zone. Cards move between
   columns client-side, so this is CSS, not a template branch. */
body[data-admin-page="queue"] .column-cards:not(:has(.card, .empty))::before {
  content: "Drop here";
  display: flex; align-items: center; justify-content: center;
  min-height: 3.6rem;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

/* Moderation queue is a full-width banner whose cards wrap in a row. */
body[data-admin-page="queue"] .column.moderation { --col: #f59e0b; border-left: 3px solid var(--col); }
body[data-admin-page="queue"] .column.moderation .column-cards {
  flex-direction: row;
  flex-wrap: wrap;
  max-height: none;
  min-height: 0;
  padding-top: .6rem;
}
body[data-admin-page="queue"] .column.moderation .card { width: 260px; }

/* Archive tier sits quietly below the active flow. */
body[data-admin-page="queue"] .board[data-tier="archive"] .column { background: transparent; --col: #a8a29e; }
body[data-admin-page="queue"] .board[data-tier="archive"] .card { opacity: .85; }
body[data-admin-page="queue"] .board[data-tier="archive"] .column-cards { max-height: 40vh; }

/* Status colors: the dot in each column header. */
body[data-admin-page="queue"] .board[data-tier="main"] .column[data-status="open"]        { --col: #3b82f6; }
body[data-admin-page="queue"] .board[data-tier="main"] .column[data-status="review"]      { --col: #a855f7; }
body[data-admin-page="queue"] .board[data-tier="main"] .column[data-status="planned"]     { --col: #f59e0b; }
body[data-admin-page="queue"] .board[data-tier="main"] .column[data-status="in_progress"] { --col: #06b6d4; }
body[data-admin-page="queue"] .board[data-tier="main"] .column[data-status="shipped"]     { --col: #22c55e; }
body[data-admin-page="queue"] .board[data-tier="tickets"] .column[data-status="new"]                 { --col: #ef4444; }
body[data-admin-page="queue"] .board[data-tier="tickets"] .column[data-status="open"]                { --col: #3b82f6; }
body[data-admin-page="queue"] .board[data-tier="tickets"] .column[data-status="waiting_on_customer"] { --col: #f59e0b; }
body[data-admin-page="queue"] .board[data-tier="tickets"] .column[data-status="closed"]              { --col: #a8a29e; }

body[data-admin-page="queue"] .card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .6rem .7rem .55rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 25, 23, .05);
  cursor: grab;
  transition: box-shadow .12s ease, border-color .12s ease, transform .12s ease;
}
body[data-admin-page="queue"] .card:hover {
  border-color: #d6cabd;
  box-shadow: 0 4px 12px rgba(28, 25, 23, .08);
  transform: translateY(-1px);
}
body[data-admin-page="queue"] .card:active { cursor: grabbing; }
body[data-admin-page="queue"] .card.dragging { opacity: .45; transform: rotate(1deg); }
body[data-admin-page="queue"] .column.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
body[data-admin-page="queue"] .card-top {
  display: flex; align-items: center; gap: .4rem;
  font-size: 11.5px; color: var(--muted); margin-bottom: .2rem;
}
body[data-admin-page="queue"] .card .post-number { font-weight: 600; color: var(--muted); }
body[data-admin-page="queue"] .card-age { margin-left: auto; white-space: nowrap; }
body[data-admin-page="queue"] .card .title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body[data-admin-page="queue"] .card .title a { color: var(--text); text-decoration: none; cursor: pointer; }
body[data-admin-page="queue"] .card .title a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
body[data-admin-page="queue"] .card .title a:hover { color: var(--accent-strong); }
body[data-admin-page="queue"] .card-foot {
  display: flex; align-items: center; gap: .75rem;
  margin-top: .5rem; font-size: 12px; color: var(--muted);
}
body[data-admin-page="queue"] .card-stat { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; }
body[data-admin-page="queue"] .card-who {
  margin-left: auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Links inside the card sit above the full-card title link. */
body[data-admin-page="queue"] .card-who a,
body[data-admin-page="queue"] .card-ai { position: relative; z-index: 1; }
body[data-admin-page="queue"] .card-who a { color: var(--muted); text-decoration: none; }
body[data-admin-page="queue"] .card-who a:hover { color: var(--accent-strong); text-decoration: underline; }
body[data-admin-page="queue"] .card-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .45rem; }
body[data-admin-page="queue"] .tag {
  font-size: 10.5px; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 .45rem; line-height: 1.6;
}
body[data-admin-page="queue"] .card-ai {
  margin-top: .45rem; padding: .35rem .5rem;
  background: #fffbeb; border-radius: 6px;
  font-size: 11.5px; color: #92400e; line-height: 1.4;
}
body[data-admin-page="queue"] .card .noemail { color: var(--muted); }

body[data-admin-page="queue"] .notice,
body[data-admin-page="tickets"] .notice {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  border-radius: 8px;
  padding: .7rem .9rem;
  margin: 0 0 1rem;
  font-size: 13px;
}
body[data-admin-page="queue"] .kanban-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  padding: .7rem .9rem;
  margin: 0 0 1rem;
  font-size: 13px;
}
body[data-admin-page="queue"] .empty {
  color: var(--muted);
  font-size: 13px;
  margin: .1rem .25rem .2rem;
}

/* ---- Board redesign (fp-xqup): one row of status columns, compact
 * cards, folded archive strips, filter and sort. Scoped to .kb (the
 * Board page), so the support queue keeps the rules above. ---- */
body[data-admin-page="queue"] .kb { display: flex; flex-direction: column; gap: .9rem; }
.kb-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
body[data-admin-page="queue"] .kb-head h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.kb-tools { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.kb-filter {
  display: flex; align-items: center; gap: .4rem; min-width: 0;
  padding: 0 .6rem; height: 2.1rem; width: 300px; box-sizing: border-box;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--muted);
}
.kb-filter:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kb-filter svg, .kb-inbox-clear svg, .kb-inbox .tier-label svg, .kb .card svg, .col-fold svg {
  flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
body[data-admin-page="queue"] .kb-filter input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0; margin: 0;
  font: inherit; font-size: .875rem; color: var(--text); box-shadow: none;
}
.kb-sort { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
body[data-admin-page="queue"] .kb-sort button {
  margin: 0; padding: .3rem .65rem; border: 0; border-radius: 6px; box-shadow: none; cursor: pointer;
  background: none; color: var(--muted); font: inherit; font-size: .8125rem; font-weight: 600;
}
body[data-admin-page="queue"] .kb-sort button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(28, 25, 23, .08); }
.kb-inbox-clear { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--muted); font-size: .8125rem; }
.kb-inbox-clear svg { color: #16a34a; }
body[data-admin-page="queue"] .kb .bucket { margin: 0; }
body[data-admin-page="queue"] .kb-inbox .tier-label { color: #92400e; }
.kb-inbox-note { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }

/* The row of columns: fixed-width columns scroll sideways, each column
   scrolls its own cards, so the board fits the window. */
body[data-admin-page="queue"] .kb .board {
  display: flex; gap: .6rem; align-items: stretch;
  overflow-x: auto; padding-bottom: .4rem;
  height: calc(100vh - 9.5rem); min-height: 420px;
}
body[data-admin-page="queue"] .kb .column {
  flex: 1 0 236px; max-width: 340px; min-height: 0;
  background: color-mix(in srgb, var(--col) 6%, #efedea); border-color: transparent; border-radius: 12px;
}
body[data-admin-page="queue"] .kb .column.drag-over { border-color: var(--accent); background: var(--accent-soft); }
body[data-admin-page="queue"] .kb .column-cards { flex: 1; max-height: none; min-height: 0; padding: .15rem .5rem .6rem; gap: .45rem; }
.col-head { display: flex; align-items: center; gap: .4rem; padding: .6rem .55rem .5rem .6rem; }
.status-pill {
  display: inline-flex; align-items: center; gap: .35rem; min-width: 0;
  padding: .15rem .55rem .15rem .4rem; border-radius: 999px;
  background: color-mix(in srgb, var(--col) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--col) 28%, transparent);
  color: color-mix(in srgb, var(--col) 62%, #1c1917);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
body[data-admin-page="queue"] .kb .col-head .count { margin-left: 0; background: none; border: 0; padding: 0 .15rem; font-size: 12px; }
body[data-admin-page="queue"] .col-fold {
  margin: 0 0 0 auto; padding: .2rem; border: 0; border-radius: 6px; background: none; box-shadow: none;
  color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s ease;
}
.column:hover .col-fold, .col-fold:focus-visible, .column.is-folded .col-fold { opacity: 1; }
body[data-admin-page="queue"] .col-fold:hover { background: var(--surface); color: var(--text); }

/* The status ring fills as an idea moves along the flow. */
.ring { flex: none; overflow: visible; }
.ring-track { fill: none; stroke: var(--col); stroke-width: 1.5; }
.ring-fill { fill: none; stroke: var(--col); stroke-width: 5; stroke-dasharray: var(--fill, 0) 1; transform: rotate(-90deg); transform-origin: center; transform-box: fill-box; }
body[data-admin-page="queue"] .kb .column[data-status="open"]        { --col: #3b82f6; --fill: 0; }
body[data-admin-page="queue"] .kb .column[data-status="review"]      { --col: #a855f7; --fill: .25; }
body[data-admin-page="queue"] .kb .column[data-status="planned"]     { --col: #f59e0b; --fill: .5; }
body[data-admin-page="queue"] .kb .column[data-status="in_progress"] { --col: #0891b2; --fill: .75; }
body[data-admin-page="queue"] .kb .column[data-status="shipped"]     { --col: #16a34a; --fill: 1; }
body[data-admin-page="queue"] .kb .column[data-status="pending"]     { --col: #a8a29e; --fill: 0; }
body[data-admin-page="queue"] .kb .column[data-status="completed"]   { --col: #15803d; --fill: 1; }
body[data-admin-page="queue"] .kb .column[data-status="closed"]      { --col: #78716c; --fill: 1; }
body[data-admin-page="queue"] .kb .column[data-status="rejected"]    { --col: #dc2626; --fill: 1; }
.kb .column[data-status="pending"] .ring-track { stroke-dasharray: 2 2; }

/* A folded column is a narrow strip with its name running down. */
body[data-admin-page="queue"] .kb .column.is-folded { flex: 0 0 38px; cursor: pointer; }
.kb .column.is-folded .column-cards { display: none; }
.kb .column.is-folded .col-head { flex-direction: column; gap: .5rem; padding: .55rem 0; height: 100%; }
.kb .column.is-folded .status-pill { writing-mode: vertical-rl; padding: .5rem .15rem .55rem; gap: .4rem; }
.kb .column.is-folded .ring { transform: rotate(90deg); }
body[data-admin-page="queue"] .kb .column.is-folded .count { order: 3; margin-top: auto; }
body[data-admin-page="queue"] .kb .column.is-folded .col-fold { order: -1; margin: 0; }
.kb .column.is-folded .col-fold svg { transform: scaleX(-1); }

/* Compact cards: title, one meta line, then author, comments and votes. */
body[data-admin-page="queue"] .kb .card { padding: .55rem .65rem .5rem; border-radius: 9px; box-shadow: 0 1px 1.5px rgba(28, 25, 23, .05); }
.kb .card.kb-hide { display: none; }
body[data-admin-page="queue"] .kb .card .title { font-size: 13.5px; font-weight: 600; -webkit-line-clamp: 2; }
.card-meta {
  display: flex; align-items: center; gap: .3rem; margin-top: .3rem; overflow: hidden;
  white-space: nowrap; font-size: 11px; color: var(--muted);
}
body[data-admin-page="queue"] .kb .card-meta .post-number { font-weight: 600; font-variant-numeric: tabular-nums; }
body[data-admin-page="queue"] .kb .card-age { margin: 0 .15rem 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: .2rem; flex: none;
  padding: 0 .35rem; border-radius: 5px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 600; line-height: 1.6;
}
.chip-private { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.chip-ai-ok { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.chip-ai-no { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.chip-ai-unsure { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.chip-ai-err { background: #f4f4f5; border-color: #e4e4e7; color: #52525b; }
body[data-admin-page="queue"] .kb .card-foot { gap: .45rem; margin-top: .45rem; }
body[data-admin-page="queue"] .kb .card-who { margin-left: 0; flex: 1; }
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 18px; height: 18px; border-radius: 50%;
  color: #fff; font-size: 8px; font-weight: 700; letter-spacing: .02em;
}
.tone-0 { background: #6366f1; } .tone-1 { background: #0891b2; } .tone-2 { background: #16a34a; } .tone-3 { background: #d97706; }
.tone-4 { background: #db2777; } .tone-5 { background: #7c3aed; } .tone-6 { background: #0d9488; } .tone-7 { background: #ea580c; }
body[data-admin-page="queue"] .kb .card-stat { font-weight: 500; }
.vote-pill {
  display: inline-flex; align-items: center; gap: .2rem; flex: none;
  padding: 0 .45rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 11.5px; font-weight: 700; line-height: 1.65;
  font-variant-numeric: tabular-nums;
}
.vote-pill svg { stroke-width: 2; }
/* Moderation strip: cards in a row. */
body[data-admin-page="queue"] .kb .column.moderation { background: #fffbeb; border: 1px solid #fde68a; border-left: 3px solid #f59e0b; }
body[data-admin-page="queue"] .kb .column.moderation .column-cards { flex-direction: row; flex-wrap: wrap; padding: .55rem; }
body[data-admin-page="queue"] .kb .column.moderation .card { width: 272px; }
@media (max-width: 820px) {
  body[data-admin-page="queue"] .kb .board { height: 72vh; }
  body[data-admin-page="queue"] .kb .column { flex-basis: min(82vw, 300px); }
  .kb-tools { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .kb-filter { flex: 1 1 200px; width: auto; }
}

/* ---- /admin/posts/{id}/delete (pageAdminPostDelete) ---- */
body[data-admin-page="delete"] h1 {
  font-size: 22px;
  margin: 0 0 .75rem;
}
body[data-admin-page="delete"] .meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 1.5rem;
}
body[data-admin-page="delete"] .issue {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0 1.5rem;
  background: var(--surface-2);
}
body[data-admin-page="delete"] .issue strong {
  display: block;
  margin-bottom: .35rem;
}
body[data-admin-page="delete"] .actions {
  display: flex;
  gap: .6rem;
  align-items: center;
}
body[data-admin-page="delete"] button,
body[data-admin-page="delete"] .cancel {
  font: inherit;
  font-size: 14px;
  padding: .55rem .8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  cursor: pointer;
}
body[data-admin-page="delete"] button {
  background: #b91c1c;
  color: white;
  border-color: #b91c1c;
}
body[data-admin-page="delete"] .cancel {
  color: var(--text);
}


/* ---- Admin sign-in flow: the admin host's /login, /claim, /passkeys
 * (fp-6wdy, fp-i15w.2). Humboard brand tokens, kept in step with
 * website/assets/css/site.css. Tokens and .btn apply to every admin page;
 * the card layout is scoped to body.auth. ---- */
.note { color: #71717a; font-size: 13px; }
/* fp-g8zl: a dashboard look (Cloudflare-like): neutral grey ground,
   white bordered cards, system sans, compact type, 6px corners; the
   Humboard orange marks actions and the active item. White text sits only
   on --accent-fill (#c2410c, 5.2:1). */
body[data-admin-page] {
  --accent: #e8590c;
  --accent-strong: #c2410c;
  --accent-strong-2: #9a3412;
  --accent-soft: #fff1e6;
  --accent-fill: #c2410c;
  --bg: #f4f4f3;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --surface-3: #fafaf9;
  --text: #1c1917;
  --ink: #1c1917;
  --muted: #57534e;
  --border: #e2e0dd;
  --border-strong: #d0ccc7;
  --danger: #b91c1c;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.auth *, body.auth *::before, body.auth *::after { box-sizing: border-box; }
body[data-admin-page] a { color: var(--accent-strong); }
body.auth code {
  font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-2);
  padding: .1rem .3rem;
  border-radius: 4px;
}
.auth-main { max-width: 440px; margin: 0 auto; padding: 4.5rem 20px 3rem; }
.auth-main.auth-wide { max-width: 600px; padding-top: 3rem; }
.auth-brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.05rem; margin-bottom: 1.25rem;
  min-width: 0;
}
.auth-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-brand svg { flex: none; }
.auth-brand .mark-bg { fill: var(--accent); }
.auth-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
}
.auth-top .auth-brand { margin-bottom: 0; }
.auth-top a { font-size: .9rem; text-decoration: none; white-space: nowrap; }
.auth-top a:hover { text-decoration: underline; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 8px 24px rgba(28, 25, 23, .06);
}
@media (max-width: 480px) { .auth-card { padding: 1.4rem; } }
.auth-card h1 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .6rem; }
.auth-card h2 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
.auth-card .lead { color: var(--muted); margin: 0 0 1.5rem; }
.auth-card .fine { color: var(--muted); font-size: .85rem; margin: 1.25rem 0 0; }
.auth-card .notice {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: .65rem .85rem;
  border-radius: 6px;
  margin: 0 0 1.25rem;
  font-size: .95rem;
}
.auth-card form { margin: 0; }
/* fp-c9qm.13: the board picker on the MCP consent page. */
.auth-card .board-choice { border: 0; padding: 0; margin: 0 0 1.25rem; }
.auth-card .board-choice legend { font-size: .9rem; font-weight: 600; margin-bottom: .45rem; padding: 0; }
.auth-card .board-choice label { display: flex; gap: .6rem; align-items: baseline; font-weight: 500; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 6px; margin: 0 0 .45rem; cursor: pointer; }
.auth-card .board-choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.auth-card .board-choice .host { display: block; color: var(--muted); font-size: .8125rem; font-weight: 400; overflow-wrap: anywhere; }
.auth-card label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.auth-card input[type="email"],
.auth-card input[type="text"] {
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  margin: 0 0 .9rem;
}
.auth-card input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
body[data-admin-page] .btn {
  display: inline-block;
  background: var(--accent-fill);
  color: #fff;
  border: 1px solid var(--accent-fill);
  padding: .55rem 1rem;
  border-radius: 6px;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
body[data-admin-page] .btn:hover { background: var(--accent-strong-2); border-color: var(--accent-strong-2); color: #fff; }
body[data-admin-page] .btn-accent { background: var(--accent-fill); color: #fff; }
body[data-admin-page] .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body[data-admin-page] .btn[disabled] { opacity: .55; cursor: not-allowed; }
body[data-admin-page] .btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
body[data-admin-page] .btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
body[data-admin-page] .btn-block { display: block; width: 100%; }
.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  color: var(--muted); font-size: .85rem;
  margin: 1.75rem 0 1.25rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; border-top: 1px solid var(--border);
}
.passkey-status { color: var(--muted); font-size: .9rem; min-height: 1.4em; margin: .6rem 0 0; }
.passkey-add-row { display: flex; gap: .6rem; }
.passkey-add-row input[type="text"] { margin: 0; flex: 1; min-width: 0; }
.passkey-add-row .btn { flex: none; }
@media (max-width: 480px) {
  .passkey-add-row { flex-direction: column; }
}
.auth-card .empty {
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 8px;
  padding: .9rem 1rem;
  margin: 0;
}
.passkey-list { list-style: none; padding: 0; margin: 0; }
.passkey-list li {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem 1rem;
  padding: .8rem 0;
  border-top: 1px solid var(--border);
}
.passkey-list li:first-child { border-top: 0; }
.passkey-info { display: flex; flex-direction: column; min-width: 0; }
.passkey-list .label { font-weight: 600; overflow-wrap: anywhere; }
.passkey-list .meta { color: var(--muted); font-size: .85rem; }
.passkey-list form { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.passkey-list .confirm-msg { color: var(--muted); font-size: .85rem; flex-basis: 100%; }
.passkey-list .delete-link,
.passkey-list .cancel-link {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: .9rem; cursor: pointer;
  text-decoration: underline;
}
.passkey-list .delete-link { color: var(--danger); }
.passkey-list .cancel-link { color: var(--muted); }
.passkey-list form.armed .delete-link {
  background: var(--danger); color: #fff; text-decoration: none;
  padding: .35rem .75rem; border-radius: 6px; font-weight: 600;
}

/* ---- Signed-in admin shell (fp-nfcm, sidebar fp-tivk) ----
 * A fixed left sidebar on wide screens; below 820px it folds into a
 * top bar with the links in a scrollable row. */
body[data-admin-page]:has(.admin-side) { padding-left: 232px; }
.admin-side {
  position: fixed; top: 0; bottom: 0; left: 0; width: 232px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.1rem .8rem 1rem;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 30;
}
.admin-brand {
  display: flex; align-items: center; gap: .6rem; min-width: 0;
  padding: .2rem .55rem;
  color: var(--text) !important; text-decoration: none;
  font-weight: 700; font-size: 1.02rem;
}
.admin-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-brand svg { flex: none; }
.admin-brand .mark-bg { fill: var(--accent); }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; }
/* fp-2es4: what a section applies to. "This board" holds the board
   selector and the board's sections, "Your account" what belongs to
   the owner; each starts with a small label. */
.admin-scope { display: flex; flex-direction: column; min-width: 0; }
.admin-scope-account { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--border); }
body[data-admin-page] .admin-scope-label {
  margin: 0 0 .35rem; padding: 0 .6rem;
  color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.admin-switch { position: relative; margin: 0 0 .6rem; }
.admin-switch summary,
.admin-switch-static {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .5rem .6rem; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--text); font-weight: 600; font-size: .95rem;
}
.admin-switch summary { list-style: none; cursor: pointer; }
.admin-switch summary::-webkit-details-marker { display: none; }
.admin-switch summary:hover, .admin-switch[open] summary { background: var(--surface-2); }
.admin-switch summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-switch summary span, .admin-switch-static span, .admin-switch-menu a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-switch svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.admin-switch summary svg { color: var(--muted); }
.admin-switch-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  display: flex; flex-direction: column; gap: .1rem; padding: .3rem;
  max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(28, 25, 23, .14);
}
body[data-admin-page] .admin-switch-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .45rem .55rem; border-radius: 6px;
  color: var(--text); text-decoration: none; font-size: .9rem;
}
body[data-admin-page] .admin-switch-menu a:hover { background: var(--surface-2); }
body[data-admin-page] .admin-switch-menu a[aria-current="page"] { font-weight: 600; }
.admin-switch-menu a[aria-current="page"] svg { color: var(--accent-strong); }
body[data-admin-page] .admin-switch-menu a.admin-switch-all {
  justify-content: flex-start; margin-top: .2rem; padding-top: .55rem;
  border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; color: var(--muted);
}
body[data-admin-page] .admin-nav a {
  display: flex; align-items: center; gap: .65rem;
  color: var(--muted); text-decoration: none; white-space: nowrap;
  padding: .5rem .6rem; border-radius: 7px; font-weight: 500; font-size: .95rem;
}
.admin-nav svg {
  flex: none; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
body[data-admin-page] .admin-nav a:hover { color: var(--text); background: var(--surface-2); }
body[data-admin-page] .admin-nav a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); font-weight: 600; }
@media (max-width: 820px) {
  body[data-admin-page]:has(.admin-side) { padding-left: 0; }
  .admin-side {
    position: static; width: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: .35rem .75rem;
    padding: .55rem 12px; border-right: 0; border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .admin-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  /* One row of brand, board selector and account links, then the
     board's sections. */
  .admin-scope { display: contents; }
  body[data-admin-page] .admin-scope-label { display: none; }
  .admin-switch { order: 1; margin: 0; min-width: 0; max-width: 45vw; }
  .admin-switch summary, .admin-switch-static { padding: .3rem .5rem; font-size: .9rem; }
  .admin-switch-menu { right: auto; min-width: 220px; }
  .admin-nav-board svg { display: none; }
  .admin-nav-board { order: 3; width: 100%; }
  .admin-nav-foot { order: 2; margin: 0 0 0 auto; }
  body[data-admin-page] .admin-nav a { padding: .4rem .55rem; gap: .4rem; font-size: .9rem; }
  .admin-nav-foot a { font-size: .85rem; }
}
.admin-main { max-width: 760px; margin: 0 auto; padding: 1.75rem clamp(16px, 3vw, 32px) 3rem; }
body[data-admin-page="queue"] .admin-main { max-width: none; padding-top: 1.25rem; }
body[data-admin-page="queue"] .admin-main > .bucket:first-of-type,
body[data-admin-page="queue"] .admin-main > h1 + .bucket { margin-top: 0; }
body[data-admin-page="delete"] .admin-main,
body[data-admin-page="ticket"] .admin-main { max-width: 640px; }
body[data-admin-page="changelog"] .admin-main { max-width: 720px; }
@media (max-width: 640px) { .admin-main { padding: 1.25rem 16px 2rem; } }
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem 1rem; margin: 0 0 1.25rem;
}
body[data-admin-page] .page-head h1 { margin: 0; }
body[data-admin-page]:not(.auth) .admin-main h1 { font-size: 1.4rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
body[data-admin-page] .page-head .btn { padding: .5rem 1rem; font-size: .92rem; }
body[data-admin-page] .admin-main .btn:hover { color: #fff; }
body[data-admin-page] .admin-main .btn-ghost:hover { color: var(--text); }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* ---- /admin/posts/{id} post page (pageAdminPostDetail, fp-zaof) ----
 * fp-fivs: two columns in the Board's style. The post card, the
 * conversation and the activity on the left; a panel of cards (status,
 * details, AI verdict, links, actions) on the right. Below 980px the
 * panel follows the post card. */
body[data-admin-page="detail"] .admin-main { max-width: 1180px; padding-top: 1.25rem; }
.pd svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
body[data-admin-page="detail"] .detail-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-bottom: 1rem; font-size: 14px;
}
body[data-admin-page="detail"] .detail-bar a { color: var(--accent-strong); text-decoration: none; font-weight: 500; }
body[data-admin-page="detail"] .detail-bar a:hover { text-decoration: underline; }
/* fp-1qyo: a private post has no public page, so the bar shows a label. */
body[data-admin-page="detail"] .detail-bar .hidden-public { color: var(--muted); cursor: default; }
.pd .muted { color: var(--muted); }

.pd-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto auto 1fr;
  gap: 1.1rem 1.5rem; align-items: start;
}
.pd-post, .pd-ticket { grid-column: 1; grid-row: 1; }
.pd-side { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: .75rem; }
.pd-thread { grid-column: 1; grid-row: 2; }
.pd-activity { grid-column: 1; grid-row: 3; }

/* Status colours, as on the Board's columns. */
.pd [data-status] { --col: #78716c; --fill: 0; }
.pd [data-status="open"]                { --col: #3b82f6; --fill: 0; }
.pd [data-status="new"]                 { --col: #dc2626; --fill: 0; }
.pd [data-status="review"]              { --col: #a855f7; --fill: .25; }
.pd [data-status="planned"]             { --col: #f59e0b; --fill: .5; }
.pd [data-status="in_progress"]         { --col: #0891b2; --fill: .75; }
.pd [data-status="shipped"]             { --col: #16a34a; --fill: 1; }
.pd [data-status="pending"]             { --col: #a8a29e; --fill: 0; }
.pd [data-status="completed"]           { --col: #15803d; --fill: 1; }
.pd [data-status="resolved"]            { --col: #15803d; --fill: 1; }
.pd [data-status="closed"]              { --col: #78716c; --fill: 1; }
.pd [data-status="rejected"]            { --col: #dc2626; --fill: 1; }
.pd [data-status="pending_moderation"]  { --col: #d97706; --fill: 0; }
.pd [data-status="waiting_on_customer"] { --col: #d97706; --fill: .5; }
.pd .status-pill-sm { padding: 0 .45rem; font-size: 11.5px; line-height: 1.6; vertical-align: 1px; }

/* The post: the Board's card, larger. */
.pd-post {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.35rem 1rem; box-shadow: 0 1px 2px rgba(28, 25, 23, .05);
}
.pd-post-top { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.pd-post-top .chip { font-size: 11.5px; line-height: 1.7; }
.pd-num { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
body[data-admin-page="detail"]:not(.auth) .pd-post h1 { margin: .7rem 0 .55rem; font-size: 1.5rem; line-height: 1.25; }
.pd-byline { display: flex; align-items: center; gap: .5rem; font-size: 13.5px; }
.avatar-md { width: 28px; height: 28px; font-size: 11px; }
.tone-team { background: var(--accent-fill); }
.pd .detail-body { margin: 1rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.pd-post-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem;
  margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.pd-post-foot .vote-pill { padding: .05rem .6rem; font-size: 13px; }
.pd-stat { display: inline-flex; align-items: center; gap: .3rem; }
.pd .attachment-list { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; padding: 0; }
.pd .att-image img { display: block; max-width: 200px; max-height: 160px; border: 1px solid var(--border); border-radius: 8px; }
.pd .att-file a {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem;
  border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2);
  color: var(--accent-strong); font-size: 13px; text-decoration: none;
}

/* A ticket: the subject as a plain heading, a support chip, the counts;
   the customer's message opens the thread below (.comment-original). */
.pd-ticket { padding: .15rem 0 .2rem; }
body[data-admin-page="detail"]:not(.auth) .pd-ticket h1 { margin: .6rem 0 .45rem; font-size: 1.5rem; line-height: 1.25; }
.pd-ticket-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; color: var(--muted); font-size: 13px; }
.pd .tk-dot { background: var(--col); }
.chip-ticket { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* fp-hapt metadata (in-app reports): highlights, then every field. */
.pd-meta-all summary { margin-top: .55rem; color: var(--accent-strong); font-size: 13px; font-weight: 600; cursor: pointer; }
.pd-meta-card .pd-props + .pd-meta-all summary { margin-top: .7rem; }
.pd-meta-card h2 + .pd-meta-all summary { margin-top: 0; }
.pd .metadata-list {
  display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); gap: .3rem .6rem;
  margin: .55rem 0 0; font-size: 12px;
}
.pd .metadata-list dt { font-family: var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.pd .metadata-list dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Panel cards. */
.pd-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .8rem .95rem .9rem; }
body[data-admin-page="detail"] .pd h2 {
  display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.pd-card h2 .count {
  padding: 0 .4rem; border-radius: 999px; background: var(--surface-2);
  font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.pd-card p { margin: .2rem 0; font-size: 13px; }
.pd select, .pd input[type="number"], .pd input[type="text"] {
  box-sizing: border-box; min-width: 0; margin: 0; padding: .4rem .55rem;
  border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface);
  color: var(--text); font: inherit; font-size: 13px;
}
.pd select:focus, .pd input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pd button {
  margin: 0; padding: .4rem .75rem; border: 1px solid var(--border-strong); border-radius: 7px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.pd button:hover { background: var(--surface-2); }
.pd .status-form button, .pd .comment-form button[type="submit"] { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.pd .status-form button:hover, .pd .comment-form button[type="submit"]:hover { background: var(--accent-strong-2); }
.pd .status-form { display: flex; gap: .4rem; margin: 0; }
.pd .status-form select { flex: 1; }
.pd-side-link { display: inline-block; margin-top: .6rem; font-size: 13px; font-weight: 500; text-decoration: none; }
.pd-side-link:hover { text-decoration: underline; }
.pd-props { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: .45rem .5rem; margin: 0; font-size: 13px; }
.pd-props dt { color: var(--muted); }
.pd-props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pd-person { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.pd .noemail { color: var(--muted); }
.pd-ai { display: flex; align-items: center; gap: .45rem; }
.pd-ai .chip { font-size: 11.5px; }
.pd-card .pd-ai-reason { margin-top: .4rem; line-height: 1.45; }
.pd-card .pd-ai-model { margin-top: .35rem; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.pd .customer-panel .pd-person { align-items: flex-start; }
.pd .customer-panel p { margin: 0; }
.pd .customer-name { font-weight: 600; }
.pd .customer-panel h3 { margin: .85rem 0 .3rem; font-size: 12px; color: var(--muted); }
.pd .customer-posts { list-style: none; margin: 0; padding: 0; }
.pd .customer-posts li { padding: .3rem 0; border-top: 1px solid var(--border); font-size: 13px; }
.pd .customer-posts li:first-child { border-top: 0; }
.pd .empty { margin: 0 0 .6rem; color: var(--muted); font-size: 13px; font-style: italic; }

/* Links and trackers: one row per link, then a compact add form. */
.pd .link-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.pd .link-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .05rem .5rem;
  padding: .45rem 0; border-top: 1px solid var(--border); font-size: 13px;
}
.pd .link-item:first-child { padding-top: 0; border-top: 0; }
.pd .link-rel { grid-column: 1; color: var(--muted); font-size: 11.5px; }
.pd .link-item > a, .pd .tracker-key { grid-column: 1; overflow-wrap: anywhere; }
.pd .tracker-key, .pd .trackers .link-item > a { font-family: var(--mono); font-size: 12.5px; }
.pd .link-remove-form { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.pd button.link-remove { padding: .15rem .45rem; color: var(--danger); font-size: 12px; font-weight: 500; }
.pd .link-add-form { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.pd .link-add-form select { flex: 1 1 100%; }
.pd .link-add-form input { flex: 1 1 0; }

/* Actions: full-width buttons, delete last. A confirm opens in place. */
.pd-actions { display: flex; flex-direction: column; gap: .45rem; }
body[data-admin-page="detail"] .pd-actions h2 { margin-bottom: .15rem; }
.pd-actions form { margin: 0; }
.pd-actions > form > button, .pd .confirm-action summary { display: block; width: 100%; box-sizing: border-box; text-align: left; }
.pd .confirm-action summary {
  list-style: none; padding: .4rem .75rem; border: 1px solid var(--border-strong); border-radius: 7px;
  background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer;
}
.pd .confirm-action summary::-webkit-details-marker { display: none; }
.pd .confirm-action[open] summary { border-color: #b45309; color: #92400e; }
.pd .confirm-form { margin-top: .4rem; padding: .65rem .75rem; border: 1px solid #fcd34d; border-radius: 8px; background: #fffbeb; }
.pd .confirm-form p { margin: 0 0 .55rem; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.pd .confirm-form button { background: #b45309; border-color: #b45309; color: #fff; }
/* fp-2pba.15: the merge form takes the target idea's number. */
.pd .pd-merge-form label { display: block; margin-bottom: .25rem; color: var(--muted); font-size: 12.5px; }
.pd .pd-merge-form input { width: 6.5rem; margin-right: .35rem; }
.chip-merged { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.chip-merged a { color: inherit; }
.pd .delete-link { margin-top: .2rem; padding: .25rem .1rem; color: var(--danger); font-size: 13px; font-weight: 500; text-decoration: none; }
.pd .delete-link:hover { text-decoration: underline; }

/* The conversation: avatar plus bubble; team replies in the brand tint,
   internal notes amber and dashed, a ticket customer's replies blue. */
body[data-admin-page="detail"] .pd-thread h2, body[data-admin-page="detail"] .pd-activity h2 { margin: .4rem 0 .8rem; }
.pd .comment { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .75rem; }
.pd .comment .avatar { margin-top: .15rem; }
.comment-bubble {
  flex: 1; min-width: 0; padding: .6rem .85rem .7rem;
  border: 1px solid var(--border); border-radius: 4px 12px 12px 12px; background: var(--surface);
}
.pd .comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin-bottom: .3rem; color: var(--muted); font-size: 12.5px; }
.pd .comment-meta strong { color: var(--text); font-weight: 600; }
.pd .comment-when { margin-left: auto; }
.pd .comment-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
.pd .comment-bubble .attachment-list { margin-top: .5rem; }
.comment-team .comment-bubble {
  background: color-mix(in srgb, var(--accent-fill) 4%, var(--surface));
  border-color: color-mix(in srgb, var(--accent-fill) 22%, var(--border));
}
.chip-team { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent-fill) 30%, transparent); color: var(--accent-strong); }
/* fp-1i6z: an internal note never reaches the customer or the public. */
.comment-internal .comment-bubble { background: #fffbeb; border: 1px dashed #f59e0b; }
/* fp-2pba.21: a ticket reply from the customer. */
.comment-customer .comment-bubble { border-left: 3px solid #3b82f6; }
.badge-internal {
  display: inline-block; padding: .05rem .45rem; border: 1px solid #fcd34d; border-radius: 999px;
  background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: middle;
}
.pd .comment-form {
  display: flex; flex-direction: column; gap: .35rem; margin: .25rem 0 0 calc(28px + .6rem); padding: .5rem;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface);
}
.pd .comment-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pd .comment-form textarea {
  min-height: 5.5rem; padding: .35rem .45rem; border: 0; outline: 0; resize: vertical;
  background: none; color: var(--text); font: inherit; font-size: 14px;
}
.pd .reply-actions {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding: .45rem .1rem 0 .35rem; border-top: 1px solid var(--border);
}
.pd .internal-toggle { display: flex; align-items: center; gap: .35rem; color: #92400e; font-size: 12.5px; }
.pd .unverified-hint { margin: .2rem .4rem; color: #92400e; font-size: 12.5px; }

/* Activity: a thin timeline; each status dot takes the new status' colour. */
.pd .activity-list { position: relative; margin: 0; padding: 0; list-style: none; }
.pd .activity-list li { position: relative; display: flex; align-items: baseline; gap: .7rem; padding: .35rem 0; color: var(--muted); font-size: 13px; }
.pd .activity-list li::before { content: ""; position: absolute; left: 4px; top: 1.2rem; bottom: -.45rem; width: 1px; background: var(--border-strong); }
.pd .activity-list li:last-child::before { display: none; }
.pd .activity-list strong { color: var(--text); font-weight: 600; }
.act-dot { position: relative; top: .05rem; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--col, #a8a29e); }

/* fp-1qyo: "Private" badge, admin-only. Kept unscoped for other pages. */
.private-pill {
  display: inline-block; padding: .05rem .45rem; border: 1px solid #fcd34d; border-radius: 999px;
  background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: middle;
}

@media (max-width: 980px) {
  .pd-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .pd-post, .pd-ticket, .pd-side, .pd-thread, .pd-activity { grid-column: 1; grid-row: auto; }
}
@media (max-width: 640px) {
  .pd-post { padding: .9rem 1rem; }
  .pd .comment-form { margin-left: 0; }
}

/* ---- /admin/tickets support inbox (pageAdminTicketQueue, fp-3rfy.4) ----
 * fp-vll3: an inbox, not a board, so tickets never read as ideas. Tabs by
 * whose turn it is, one row per conversation: customer, subject with the
 * first line of the message, status dot, replies, time in state. The
 * whole row opens the ticket (the subject link stretches over it); the
 * customer's email link sits above that. */
body[data-admin-page="tickets"] .admin-main { max-width: 1240px; padding-top: 1.25rem; }
.tk svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tk-head { align-items: flex-start; }
.tk-sub { display: flex; align-items: center; gap: .35rem; margin: .3rem 0 0; color: var(--muted); font-size: 13px; }
.tk-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .5rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: .75rem; }
.tk-tabs { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; }
body[data-admin-page] .tk-tabs a {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .55rem .8rem; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none;
}
body[data-admin-page] .tk-tabs a:hover { color: var(--text); }
body[data-admin-page] .tk-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent-fill); }
.tk-count {
  padding: 0 .4rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; line-height: 1.6;
}
.tk-tabs a[aria-current="page"] .tk-count { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent-fill) 25%, transparent); color: var(--accent-strong); }
.tk-filter {
  display: flex; align-items: center; gap: .4rem; margin: 0 0 .45rem auto;
  width: 320px; max-width: 100%; height: 2.1rem; padding: 0 .6rem; box-sizing: border-box;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--muted);
}
.tk-filter:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tk-filter input { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: .875rem; }

.tk-list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.tk-cols, .tk-row {
  display: grid; align-items: center; gap: .9rem;
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr) 170px 64px 72px;
  padding: .7rem 1rem;
}
.tk-cols {
  padding-block: .5rem; background: var(--surface-2); border-bottom: 1px solid var(--border);
  color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.tk-row { position: relative; border-bottom: 1px solid var(--border); }
.tk-row:last-of-type { border-bottom: 0; }
.tk-row[hidden] { display: none; }
.tk-row:hover { background: var(--surface-3); }
.tk-row.is-new { box-shadow: inset 3px 0 0 #dc2626; }
.tk-cust { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.tk-cust-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.35; }
.tk-cust-text strong, .tk-cust-text a, .tk-cust-text .noemail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-cust-text strong { font-weight: 600; }
body[data-admin-page] .tk-cust-text a { position: relative; z-index: 1; color: var(--muted); text-decoration: none; font-size: 12.5px; }
body[data-admin-page] .tk-cust-text a:hover { color: var(--accent-strong); text-decoration: underline; }
.tk-cust-text .noemail { color: var(--muted); font-size: 12.5px; font-style: italic; }
.tk-conv { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
body[data-admin-page] .tk-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none;
}
.tk-title::after { content: ""; position: absolute; inset: 0; }
.tk-title:focus-visible { outline: none; }
.tk-row:has(.tk-title:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.tk-row.is-new .tk-title { font-weight: 700; }
.tk-num { margin-right: .4rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.tk-snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.tk-tags { display: flex; gap: .3rem; margin-top: .15rem; }
.tk-pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .1rem .55rem; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.tk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot, #78716c); }
.tk [data-status="new"] { --dot: #dc2626; }
.tk [data-status="open"] { --dot: #2563eb; }
.tk [data-status="waiting_on_customer"] { --dot: #d97706; }
.tk [data-status="closed"] { --dot: #a8a29e; }
.tk-replies { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tk-age {
  display: inline-block; padding: .05rem .5rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.tk-age-warm { background: #fffbeb; color: #92400e; }
.tk-age-late { background: #fef2f2; color: #b91c1c; }
.tk-empty, .tk-nomatch { margin: 0; padding: 1.5rem 1rem; text-align: center; color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
  .tk-cols { display: none; }
  .tk-row { grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; }
  .tk-cust { grid-column: 1; }
  .tk-wait { grid-column: 2; grid-row: 1; justify-self: end; }
  .tk-conv { grid-column: 1 / -1; }
  .tk-state { grid-column: 1; }
  .tk-replies { grid-column: 2; justify-self: end; }
  .tk-filter { width: 100%; margin-left: 0; }
}

/* ---- /admin/tickets/new (fp-ehjc) ---- */
body[data-admin-page="ticket"] h1 { font-size: 20px; margin: .25rem 0 .75rem; }
body[data-admin-page="ticket"] .crumb { margin: 0 0 .5rem; font-size: 13px; }
body[data-admin-page="ticket"] label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 1rem 0 0;
}
body[data-admin-page="ticket"] input,
body[data-admin-page="ticket"] textarea {
  width: 100%;
  padding: .6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  margin: .35rem 0 0;
  box-sizing: border-box;
}
body[data-admin-page="ticket"] textarea { resize: vertical; }
body[data-admin-page="ticket"] button {
  margin-top: 1.25rem;
  background: var(--accent-fill);
  color: white;
  border: 0;
  padding: .6rem 1.1rem;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}
.form-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: .55rem .75rem;
  font-size: 14px;
}
.ticket-created .ticket-ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: .55rem .75rem;
  font-weight: 600;
}
.ticket-blurb-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 1rem 0 0; }
.ticket-blurb {
  width: 100%;
  padding: .6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  margin: .35rem 0 0;
  box-sizing: border-box;
  resize: vertical;
  background: var(--surface-2);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* fp-i7gz: a Pro feature on a Free board's own page (Support). */
.pro-panel {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 1rem 1.25rem; margin: 0 0 1.25rem; font-size: .875rem; max-width: 44rem;
}
.pro-panel p { margin: 0 0 .75rem; color: var(--muted); }
.pro-panel .pro-panel-title { color: var(--text); font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.pro-panel .plan-badge {
  display: inline-block; margin-left: .4rem; padding: .1rem .45rem; border-radius: 4px; font-size: .72rem; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid #fbc9a6;
}

/* ---- /admin/settings (fp-11f0.7.3; dashboard cards fp-g8zl) ----
 * A dashboard layout: a sub-nav row under the title, one bordered card
 * per section with a title bar, compact sans type. */
body[data-admin-page="settings"] .admin-main { max-width: 880px; }
body[data-admin-page="settings"] .settings-jump {
  display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0 0 1.5rem; padding: 0; list-style: none;
  border-bottom: 1px solid var(--border);
}
body[data-admin-page="settings"] .settings-jump a {
  display: inline-block; padding: .55rem 0; margin-bottom: -1px; border-bottom: 2px solid transparent;
  color: var(--muted); text-decoration: none; font-size: .875rem; font-weight: 500;
}
body[data-admin-page="settings"] .settings-jump a:hover { color: var(--text); border-bottom-color: var(--accent); }
body[data-admin-page="settings"] .settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 1.25rem 1.25rem;
  margin: 0 0 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  scroll-margin-top: 1rem;
  font-size: .875rem;
}
body[data-admin-page="settings"] .settings-section > :last-child { margin-bottom: 0; }
body[data-admin-page="settings"] .settings-section > h2,
body[data-admin-page="settings"] .section-head {
  margin: 0 -1.25rem 1rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border);
  background: var(--surface-3); border-radius: 8px 8px 0 0;
}
body[data-admin-page="settings"] h2 { font-size: 1rem; font-weight: 600; line-height: 1.3; }
body[data-admin-page="settings"] .section-head { display: flex; align-items: center; gap: .6rem; }
body[data-admin-page="settings"] .section-head h2 { margin: 0; }
body[data-admin-page="settings"] h3 {
  font-size: .875rem; font-weight: 600; color: var(--text);
  margin: 1.25rem 0 .35rem; padding-top: 1rem; border-top: 1px solid var(--border);
}
body[data-admin-page="settings"] h2 + h3,
body[data-admin-page="settings"] .section-head + h3 { margin-top: 0; padding-top: 0; border-top: 0; }
body[data-admin-page="settings"] p { margin: .4rem 0 .7rem; }
body[data-admin-page="settings"] .note { font-size: .8125rem; color: var(--muted); }
body[data-admin-page="settings"] code {
  font: .85em var(--mono); background: var(--surface-2); border: 1px solid var(--border);
  padding: .05rem .3rem; border-radius: 4px;
}
body[data-admin-page="settings"] .plan-badge {
  display: inline-block; padding: .1rem .45rem; border-radius: 4px; font-size: .72rem; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
body[data-admin-page="settings"] .plan-badge.pro { background: var(--accent-soft); color: var(--accent-strong); border-color: #fbc9a6; }
body[data-admin-page="settings"] .upsell {
  margin: .9rem 0 0; padding: 1rem 1.1rem; border-radius: 6px;
  background: var(--surface-3); border: 1px solid var(--border);
}
body[data-admin-page="settings"] .upsell-title { font-size: .875rem; font-weight: 600; margin: 0 0 .5rem; }
body[data-admin-page="settings"] .upsell ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .25rem 1.25rem;
  margin: 0 0 1rem; padding: 0; list-style: none; font-size: .875rem;
}
body[data-admin-page="settings"] .upsell li { position: relative; padding-left: 1.35rem; }
body[data-admin-page="settings"] .upsell li::before {
  content: ""; position: absolute; left: .15rem; top: .45em; width: .55rem; height: .3rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
body[data-admin-page="settings"] .upsell-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0; }
body[data-admin-page="settings"] .upsell-cta .price { font-weight: 600; font-size: .9rem; }
body[data-admin-page="settings"] .upsell-cta .price small { font-weight: 400; color: var(--muted); }
body[data-admin-page="settings"] .upsell .note { margin: .7rem 0 0; }
body[data-admin-page="settings"] .notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: .6rem .8rem;
  font-size: .875rem;
}
body[data-admin-page="settings"] pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .7rem .85rem;
  overflow-x: auto;
  font: 12.5px/1.55 var(--mono);
  white-space: pre-wrap;
  word-break: break-all;
}
body[data-admin-page="settings"] pre code { background: none; border: 0; padding: 0; font: inherit; }
body[data-admin-page="settings"] pre.secret { background: #1c1917; color: #fafaf9; border-color: #1c1917; }
body[data-admin-page="settings"] form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .3rem .5rem .3rem 0; vertical-align: middle; }
body[data-admin-page="settings"] button,
body[data-admin-page="settings"] a.button {
  display: inline-block;
  background: var(--accent-fill);
  color: #fff;
  border: 1px solid var(--accent-fill);
  padding: .42rem .85rem;
  border-radius: 6px;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
body[data-admin-page="settings"] button:hover,
body[data-admin-page="settings"] a.button:hover { background: var(--accent-strong-2); border-color: var(--accent-strong-2); color: #fff; }
body[data-admin-page="settings"] button.delete-link {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--border);
  font-weight: 500;
}
body[data-admin-page="settings"] button.delete-link:hover { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
/* fp-0koz: Agent page, apps connected over OAuth. */
body[data-admin-page="settings"] .connected-apps { list-style: none; padding: 0; margin: .4rem 0 0; }
body[data-admin-page="settings"] .connected-apps li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .55rem 0; border-top: 1px solid var(--border);
}
body[data-admin-page="settings"] .connected-apps li:first-child { border-top: 0; }
body[data-admin-page="settings"] .connected-apps b { overflow-wrap: anywhere; }
body[data-admin-page="settings"] .error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: .6rem .8rem;
  color: #991b1b;
  font-size: .875rem;
}
body[data-admin-page="settings"] input[type="text"],
body[data-admin-page="settings"] input[type="file"] {
  font: inherit; font-size: .875rem; padding: .42rem .6rem; box-sizing: border-box;
  border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; color: var(--text); min-width: 0;
}
body[data-admin-page="settings"] input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
/* fp-bdwb: a Pro section on a Free board, shown greyed out. The
   controls are disabled; the text stays readable. */
body[data-admin-page="settings"] .locked-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .3rem 0 .4rem; }
body[data-admin-page="settings"] .locked-row :disabled { opacity: .5; cursor: not-allowed; }
body[data-admin-page="settings"] .locked-row button:disabled { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
body[data-admin-page="settings"] .locked-row button:disabled:hover { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
body[data-admin-page="settings"] .locked-row input[type="text"] { width: 22rem; max-width: 100%; }
body[data-admin-page="settings"] .locked > p:not(.pro-lock), body[data-admin-page="settings"] .locked h3 { color: var(--muted); }
body[data-admin-page="settings"] .pro-lock {
  margin: 1rem -1.25rem -1.25rem !important; padding: .7rem 1.25rem; border-top: 1px solid var(--border);
  background: var(--surface-3); border-radius: 0 0 8px 8px; font-size: .8125rem; color: var(--muted);
}
body[data-admin-page="settings"] .pro-lock a { font-weight: 600; }
/* fp-i7gz: moderation mode, one row per choice. */
body[data-admin-page="settings"] form.mod-form { display: grid; gap: .5rem; width: 100%; margin: .4rem 0 0; }
body[data-admin-page="settings"] .mod-opt {
  display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .85rem;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer;
}
body[data-admin-page="settings"] .mod-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
body[data-admin-page="settings"] .mod-opt input { margin: .2rem 0 0; accent-color: var(--accent-fill); }
body[data-admin-page="settings"] .mod-opt > span { display: grid; gap: .1rem; }
body[data-admin-page="settings"] .mod-opt small { color: var(--muted); font-size: .8125rem; }
body[data-admin-page="settings"] .mod-opt .plan-badge { margin-left: .35rem; vertical-align: 1px; }
body[data-admin-page="settings"] .rec-badge {
  display: inline-block; margin-left: .35rem; padding: .1rem .45rem; border-radius: 4px; font-size: .72rem; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; vertical-align: 1px;
}
body[data-admin-page="settings"] .mod-locked { cursor: not-allowed; background: var(--surface-3); }
body[data-admin-page="settings"] .mod-locked strong, body[data-admin-page="settings"] .mod-locked small { color: var(--muted); }
body[data-admin-page="settings"] .mod-form button { justify-self: start; margin-top: .2rem; }
/* fp-2rfz: tracker URL templates, one labelled field per system. */
body[data-admin-page="settings"] form.tracker-templates {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: .5rem .9rem;
  align-items: center;
  width: 100%;
  margin: .4rem 0 0;
}
body[data-admin-page="settings"] .tracker-templates label { font-size: .8125rem; font-weight: 500; color: var(--muted); }
body[data-admin-page="settings"] .tracker-templates input { font: 12.5px var(--mono); width: 100%; }
body[data-admin-page="settings"] .tracker-templates button { grid-column: 2; justify-self: start; margin-top: .3rem; }
@media (max-width: 480px) {
  body[data-admin-page="settings"] form.tracker-templates { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  body[data-admin-page="settings"] .tracker-templates button { grid-column: 1; }
}


/* ---- /admin/changelog (fp-f6ud.2) ---- */
body[data-admin-page="changelog"] h1 { font-size: 20px; margin: .25rem 0 .75rem; }
body[data-admin-page="changelog"] .crumb { margin: 0 0 .5rem; font-size: 13px; }
body[data-admin-page="changelog"] a { color: var(--accent-strong); }
body[data-admin-page="changelog"] label {
  display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 1rem 0 0;
}
body[data-admin-page="changelog"] .hint { font-weight: 400; color: var(--muted); margin-left: .35rem; }
body[data-admin-page="changelog"] input[type="text"],
body[data-admin-page="changelog"] input[type="date"],
body[data-admin-page="changelog"] textarea {
  width: 100%; padding: .6rem; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; margin: .35rem 0 0; box-sizing: border-box;
}
body[data-admin-page="changelog"] textarea { resize: vertical; }
body[data-admin-page="changelog"] .cl-check { font-weight: 400; display: flex; gap: .5rem; align-items: center; }
body[data-admin-page="changelog"] button {
  margin-top: 1.25rem; background: var(--accent-fill); color: white; border: 0;
  padding: .6rem 1.1rem; border-radius: 6px; font: inherit; cursor: pointer;
}
body[data-admin-page="changelog"] button.danger { background: #b91c1c; }
body[data-admin-page="changelog"] .cl-delete { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.cl-new { font-weight: 600; }
.cl-list { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.cl-list th, .cl-list td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--border); font-size: 14px; }
.cl-list th { font-size: 12px; color: var(--muted); font-weight: 600; }
.cl-date { white-space: nowrap; color: var(--muted); }
.cl-state { font-size: 12px; padding: .1rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.cl-state.cl-Published { background: #f0fdf4; color: #166534; }
.cl-state.cl-Scheduled { background: #eff6ff; color: #1e40af; }
body[data-admin-page="changelog"] .notice {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; padding: .55rem .75rem;
}

/* fp-11f0.34: reply hint on a note from an unverified sender. */
.unverified-hint { margin: 0 0 .4rem; font-size: 13px; color: #92400e; }

/* fp-11f0.15: logo and color */
body[data-admin-page="settings"] .brand-preview { display: flex; align-items: center; gap: .75rem; }
body[data-admin-page="settings"] .brand-preview img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--border); }
body[data-admin-page="settings"] .brand-color input[type="color"] { width: 3rem; height: 2.4rem; padding: 2px; border: 1px solid var(--border); border-radius: 8px; vertical-align: middle; background: #fff; cursor: pointer; }

/* fp-11f0.15: own-domain request */
body[data-admin-page="settings"] #domain input[type="text"] { width: 22rem; max-width: 100%; }

/* fp-11f0.16: Boards section of Billing (linked boards) */
body[data-admin-page="settings"] ul.linked-boards { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .35rem; }
body[data-admin-page="settings"] ul.linked-boards li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
body[data-admin-page="settings"] form.add-board { display: grid; grid-template-columns: max-content minmax(0, 22rem); align-items: center; gap: .5rem .75rem; width: 100%; margin: .5rem 0 0; }
body[data-admin-page="settings"] form.add-board input[type="text"] { width: 100%; }
body[data-admin-page="settings"] form.add-board .slug-row { display: flex; align-items: center; gap: .35rem; min-width: 0; }
body[data-admin-page="settings"] form.add-board .slug-row input { flex: 1 1 auto; min-width: 0; }
body[data-admin-page="settings"] form.add-board button { grid-column: 2; justify-self: start; }
@media (max-width: 560px) {
  body[data-admin-page="settings"] form.add-board { grid-template-columns: minmax(0, 1fr); }
  body[data-admin-page="settings"] form.add-board button { grid-column: 1; }
}

/* fp-i15w.1: admin.humboard.com — the sign-out button styled as a nav
   link, the board list page. */
body[data-admin-page] .admin-signout { display: block; margin: 0; }
/* body[data-admin-page] .admin-signout outranks the page-scoped
   body[data-admin-page="settings"] button (and changelog/ticket/delete),
   which would otherwise turn it into an orange primary button. */
body[data-admin-page] .admin-signout button {
  display: flex; align-items: center; gap: .65rem; width: 100%; margin: 0;
  color: var(--muted); background: none; border: 0; box-shadow: none; cursor: pointer; font: inherit;
  padding: .5rem .6rem; border-radius: 7px; font-weight: 500; font-size: .95rem; text-align: left;
}
body[data-admin-page] .admin-signout button:hover { color: var(--text); background: var(--surface-2); border: 0; }
.admin-signout svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.admin-board-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
/* Sign out on the admin host's card pages (Your boards, not found): a
   quiet footer action below a divider, not another board-sized button. */
body[data-admin-page] .auth-signout { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); text-align: center; }
body[data-admin-page] .auth-signout button {
  display: inline-flex; align-items: center; gap: .4rem; margin: 0;
  color: var(--muted); background: none; border: 0; box-shadow: none; cursor: pointer; font: inherit;
  padding: .35rem .6rem; border-radius: 7px; font-weight: 500; font-size: .875rem;
}
body[data-admin-page] .auth-signout button:hover { color: var(--text); background: var(--surface-2); }
.auth-signout svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 820px) {
  body[data-admin-page] .admin-signout button { padding: .4rem .55rem; font-size: .85rem; gap: .4rem; }
}

/* fp-awnt: the Agent page's one-click setups. */
body[data-admin-page] .page-lead { color: var(--muted); margin: -.5rem 0 1.5rem; max-width: 62ch; }
body[data-admin-page] .copy-row { display: flex; align-items: stretch; gap: .5rem; margin: .5rem 0 1rem; }
body[data-admin-page] .copy-row pre { flex: 1 1 auto; min-width: 0; margin: 0; overflow-x: auto; }
body[data-admin-page] .copy-row pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
body[data-admin-page] button.copy-btn {
  flex: none; align-self: flex-start; margin: 0;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  padding: .45rem .8rem; border-radius: 6px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
body[data-admin-page] button.copy-btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
body[data-admin-page] button.copy-btn.copied { color: var(--accent-strong); border-color: var(--accent); }
.connect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: .75rem 0 1.25rem; }
.connect-card { border: 1px solid var(--border); border-radius: 8px; padding: .9rem 1rem; background: var(--surface-3); min-width: 0; }
.connect-card.wide { grid-column: 1 / -1; }
body[data-admin-page] .connect-card h3 { margin: 0 0 .35rem; padding: 0; border: 0; font-size: .95rem; }
.connect-card ol { margin: .25rem 0 0; padding-left: 1.2rem; }
.connect-card ol li { margin: .2rem 0; }
.connect-card .note { margin: 0 0 .6rem; }
body[data-admin-page] .connect-card .copy-row { margin-bottom: 0; }
.manual-setup { margin-top: .5rem; }
.manual-setup summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: .9rem; }
.manual-setup[open] summary { margin-bottom: .75rem; }
@media (max-width: 640px) {
  .connect-grid { grid-template-columns: minmax(0, 1fr); }
  body[data-admin-page] .copy-row { flex-direction: column; }
}

/* fp-awnt: the Agent page's two sections share one layout: an intro,
   numbered steps, one card per app with its logo. */
body[data-admin-page] .ask-box {
  margin: 0 0 1.25rem; padding: .9rem 1.1rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font-size: .875rem;
}
body[data-admin-page] .ask-title { margin: 0 0 .5rem; font-weight: 600; }
body[data-admin-page] .ask-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; padding: 0; list-style: none; }
body[data-admin-page] .ask-list li {
  padding: .25rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: .8125rem;
}
body[data-admin-page] .ask-list li::before { content: "\201C"; color: var(--muted); }
body[data-admin-page] .ask-list li::after { content: "\201D"; color: var(--muted); }
body[data-admin-page] .ask-box .note { margin: 0; }
body[data-admin-page="settings"] .section-intro { margin: 0 0 1rem; color: var(--muted); }
body[data-admin-page] .step { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .75rem; margin: 0 0 1rem; }
body[data-admin-page] .step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; font-size: .8125rem;
}
body[data-admin-page="settings"] .step-body > h3 { margin: .15rem 0 .5rem; padding: 0; border: 0; }
body[data-admin-page] .step-body > .copy-row,
body[data-admin-page] .step-body > .connect-grid,
body[data-admin-page] .step-body > form { margin-top: 0; margin-bottom: 0; }
body[data-admin-page] .key-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
body[data-admin-page] .key-actions form { margin: 0; }
body[data-admin-page] .connect-card { display: flex; flex-direction: column; align-items: flex-start; }
body[data-admin-page] .connect-card > * { align-self: stretch; }
body[data-admin-page] .connect-card > a.button { align-self: flex-start; }
body[data-admin-page] .app-name { display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem; font-size: .95rem; font-weight: 600; }
body[data-admin-page] .app-logo { flex: none; width: 20px; height: 20px; }
body[data-admin-page] svg.app-logo { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
body[data-admin-page] .placeholder {
  margin: 0; padding: .55rem .75rem; border: 1px dashed var(--border-strong); border-radius: 6px;
  color: var(--muted); font-size: .8125rem; background: var(--surface);
}
@media (max-width: 640px) {
  body[data-admin-page] .step { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
}

/* fp-lqlq: the admin host's 404 page. */
body[data-admin-page] .notfound-code { margin: 0 0 .25rem; font: 700 .8rem var(--mono); letter-spacing: .08em; color: var(--accent-strong); }
body[data-admin-page] .notfound-label { margin: 1.25rem 0 .5rem; font-size: .8125rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
body[data-admin-page] .notfound-foot { margin: 1.25rem 0 0; font-size: .8125rem; color: var(--muted); }
