﻿/* WaggleTails web admin area (phase 3a, conventions 16.4; phase 5 W1, conventions 20.5 / 20.6): the admin dock, the
   header identity, the entry tiles (the More page since phase 5), the account card of the Users detail, the audit
   filters and table, and at the end the row Actions menu every grid shares. No Hiba reference exists for admin screens
   (admin-area-part3 §4): the shelter shell and the tokens are the reference. Only .wt-admin-* families live here;
   wt-components.css, site.css and the phase sheets stay frozen. */

/* Glyphs these views use that no other sheet lists (Font Awesome 6 Free code points). */
.fa-user-shield::before { content: "\f505"; }
.fa-clock-rotate-left::before { content: "\f1da"; }
/* Phase 3b (conventions 17): the four duties' nav items and tiles, and the password-reset form. */
.fa-flag::before { content: "\f024"; }
.fa-newspaper::before { content: "\f1ea"; }
.fa-life-ring::before { content: "\f1cd"; }
.fa-key::before { content: "\f084"; }
/* Phase 4 (conventions 18): Moderation, Diagnostics and Configuration; Shelters reuses fa-building, the badge fa-check-circle. */
.fa-gavel::before { content: "\f0e3"; }
.fa-bug::before { content: "\f188"; }
.fa-sliders::before { content: "\f1de"; }
/* Phase 5 (conventions 20): the row menus, the More page and the Home charts. Seeded; every slice draws from this block. */
.fa-ellipsis::before { content: "\f141"; }
/* Islam 2026-10-16: the three-dots overflow button of the row menus. */
.fa-ellipsis-vertical::before { content: "\f142"; }
/* Islam 2026-10-25: the Blocked words tile and empty card (the comment gate's list). */
.fa-comment-slash::before { content: "\f4b3"; }
.fa-ban::before { content: "\f05e"; }
.fa-user-plus::before { content: "\f234"; }
.fa-user-minus::before { content: "\f503"; }
.fa-user-slash::before { content: "\f506"; }
.fa-rotate-left::before { content: "\f2ea"; }
.fa-chart-pie::before { content: "\f200"; }
.fa-check::before { content: "\f00c"; }
.fa-file-pdf::before { content: "\f1c1"; }
.fa-table::before { content: "\f0ce"; }

/* The dock holds up to six items for staff (Home, Users, Moderation, Shelters, Support, More for an Administrator;
   My shelter joins for a staff-and-shelter cookie) where the shelter dock is fixed at six columns; a two-word label
   wraps to a second line instead of overflowing its column. */
.wt-dock.wt-admin-dock {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}
.wt-dock.wt-admin-dock .wt-nav-item {
  white-space: normal;
  text-align: center;
}

/* Header identity - name over role, beside the theme toggle; hidden on the narrow shell where the dashboard card says the same. */
.wt-admin-identity {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  margin-right: 8px;
  min-width: 0;
}
.wt-admin-identity__name {
  font-weight: 500;
  font-size: 13px;
  color: var(--wt-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.wt-admin-identity__role {
  font-size: 11px;
  color: var(--wt-text-secondary);
}
@media (min-width: 768px) {
  .wt-admin-identity {
    display: flex;
  }
}

/* Dashboard - the identity card and the entry tiles (the shelter dashboard's org block and management rows, lighter). */
.wt-admin-identity-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}
.wt-admin-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .wt-admin-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wt-admin-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--wt-card-border);
  border-radius: var(--wt-radius-card);
  background: var(--wt-card);
  box-shadow: var(--wt-shadow-sm);
  color: inherit;
  text-decoration: none;
}
.wt-admin-tile:hover .wt-admin-tile__title {
  color: var(--wt-primary);
}
.wt-admin-tile__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wt-admin-tile__title {
  font-weight: 500;
  font-size: 16px;
  color: var(--wt-text);
}
.wt-admin-tile__caption {
  font-size: 13px;
  line-height: 1.4;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-admin-tile__chevron {
  color: var(--wt-text-muted);
}

/* Code page - the masked address the code went to, under the MAUI subtitle. */
.wt-admin-masked {
  font-weight: 500;
  color: var(--wt-text-body);
  overflow-wrap: anywhere;
}

/* The account card of the Users detail (phase 3b; the Roles page that first drew it went with phase 5). */
.wt-admin-account {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wt-admin-account__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

/* Audit log - the filter row and the table (the first table of the portal; the shelter pages are card lists). */
.wt-admin-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
  margin: 0;
}
.wt-admin-filters .wt-btn--compact {
  min-height: 52px;
}
@media (min-width: 768px) {
  .wt-admin-filters {
    grid-template-columns: 1fr 2fr auto;
  }
}
.wt-admin-table-wrap {
  overflow-x: auto;
}
.wt-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--wt-text-body);
}
.wt-admin-table th,
.wt-admin-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--wt-card-border);
  overflow-wrap: anywhere;
}
.wt-admin-table th {
  font-weight: 500;
  font-size: 12px;
  color: var(--wt-text-secondary);
  background: var(--wt-surface-subtle);
  white-space: nowrap;
}
.wt-admin-table tbody tr:last-child td {
  border-bottom: 0;
}
.wt-admin-table time {
  white-space: nowrap;
  color: var(--wt-text-secondary);
}
.wt-admin-table__action {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--wt-soft-teal-bg);
  color: var(--wt-soft-teal);
}
.wt-admin-table__payload {
  margin-top: 6px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-table__payload summary {
  cursor: pointer;
  color: var(--wt-primary);
}
.wt-admin-table__payload pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  max-width: 420px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--wt-surface-muted);
  color: var(--wt-text-body);
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Users (conventions 17.1) - the one search box (label, input, button in one row from 768 px, the Roles lookup's grid),
   the masked-contact note, the list's account cell, the detail's section cards, key-value list, provider / pet / support
   rows, the activity counts grid and the Administrator's password-reset form. */
.wt-admin-users-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
  margin: 0;
}
.wt-admin-users-search .wt-btn--compact {
  min-height: 52px;
}
@media (min-width: 768px) {
  .wt-admin-users-search {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
  }
}
.wt-admin-users-masked {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-users-table td {
  vertical-align: middle;
}
.wt-admin-users-table__name {
  display: block;
  font-weight: 500;
  color: var(--wt-text);
  text-decoration: none;
}
.wt-admin-users-table__name:hover {
  color: var(--wt-primary);
}
.wt-admin-users-table__sub + .wt-badge {
  margin-top: 4px;
}
.wt-admin-users-table__sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-users-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 1024px) {
  .wt-admin-users-sections {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wt-admin-users-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.wt-admin-users-section__title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--wt-text);
}
.wt-admin-users-kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 16px;
  margin: 0;
}
@media (min-width: 480px) {
  .wt-admin-users-kv {
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
  }
}
.wt-admin-users-kv dt {
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-users-kv dd {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--wt-text-body);
  overflow-wrap: anywhere;
}
@media (min-width: 480px) {
  .wt-admin-users-kv dd {
    margin-bottom: 0;
  }
}
.wt-admin-users-kv time {
  color: var(--wt-text-body);
}
.wt-admin-users-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wt-admin-users-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--wt-text-body);
}
.wt-admin-users-list__item time {
  font-size: 12px;
  color: var(--wt-text-secondary);
  white-space: nowrap;
}
.wt-admin-users-list__name {
  font-weight: 500;
  color: var(--wt-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.wt-admin-users-list__name:hover {
  color: var(--wt-primary);
}
.wt-admin-users-list__sub {
  font-size: 12px;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-admin-users-counts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 768px) {
  .wt-admin-users-counts {
    grid-template-columns: repeat(3, 1fr);
  }
}
.wt-admin-users-count {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--wt-card-border);
  border-radius: 12px;
  background: var(--wt-surface-subtle);
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.wt-admin-users-count--link:hover .wt-admin-users-count__label {
  color: var(--wt-primary);
}
.wt-admin-users-count__value {
  font-size: 20px;
  font-weight: 600;
  color: var(--wt-text);
}
.wt-admin-users-count__label {
  font-size: 12px;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}

/* Reports queue (phase 3b, conventions 17.2) - the status tabs, the grouped table's target cell, the group page's
   target card and facts, and its two close-out forms (each inside a <details>, no script). */
.wt-admin-reports-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wt-admin-reports-tabs .wt-chip {
  text-decoration: none;
}
.wt-admin-reports-summary {
  display: block;
  margin-top: 6px;
  font-weight: 500;
  color: var(--wt-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.wt-admin-reports-summary:hover {
  color: var(--wt-primary);
}
.wt-admin-reports-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.wt-admin-reports-target {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-admin-reports-target__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wt-admin-reports-target__summary {
  font-size: 15px;
  line-height: 1.5;
  color: var(--wt-text-body);
  overflow-wrap: anywhere;
}
.wt-admin-reports-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .wt-admin-reports-facts {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wt-admin-reports-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 768px) {
  .wt-admin-reports-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wt-admin-reports-action > summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--wt-primary);
  list-style: none;
}
.wt-admin-reports-action > summary::-webkit-details-marker {
  display: none;
}
.wt-admin-reports-action[open] > summary {
  margin-bottom: 12px;
}
.wt-admin-reports-action form {
  margin: 0;
}

/* Content (phase 3b, conventions 17.3) - the post page's author card, takedown facts, counters row, media grid and
   text, the hide / restore form inside a <details> (no script, the Reports page's shape) and the comments table's
   per-row forms. The list of 17.3 / 29 is the Moderation page's All posts view since conventions 30; its filter grid,
   chips and cells went with it. */
.wt-admin-content-post {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wt-admin-content-post__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.wt-admin-content-post__author {
  font-weight: 500;
  color: var(--wt-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.wt-admin-content-post__author:hover {
  color: var(--wt-primary);
}
.wt-admin-content-post__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--wt-text-body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wt-admin-content-hidden {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--wt-surface-subtle);
  font-size: 13px;
  color: var(--wt-text-body);
}
.wt-admin-content-hidden dt {
  color: var(--wt-text-secondary);
}
.wt-admin-content-hidden dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.wt-admin-content-hidden time {
  margin-left: 6px;
  color: var(--wt-text-secondary);
}
.wt-admin-content-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--wt-text-secondary);
}
.wt-admin-content-facts a {
  color: var(--wt-primary);
  text-decoration: none;
}
.wt-admin-content-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.wt-admin-content-media__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--wt-surface-muted);
}
.wt-admin-content-media__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wt-admin-content-media__badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
}
.wt-admin-content-action > summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--wt-primary);
  list-style: none;
}
.wt-admin-content-action > summary::-webkit-details-marker {
  display: none;
}
.wt-admin-content-action[open] > summary {
  margin-bottom: 12px;
}
.wt-admin-content-action form {
  margin: 0;
}
.wt-admin-content-comments td form {
  margin: 0;
}
.wt-admin-content-comment__body {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wt-admin-content-comment__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}

/* Support (phase 3b S4, conventions 17.4; phase 5 W1 copy) - the queue's per-row counts, the request card (head,
   two-column facts, contact block, mailbox hint, description, attachments), the handling / status row, the reply and
   note forms, the notes and replies, and the "Details" fold that keeps a technical e-mail failure one click away. The
   tabs are the shared wt-filter-row / wt-chip pair; the pills the shared wt-badge tints. */
.wt-admin-support-counts {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--wt-text-secondary);
}
.wt-admin-support-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wt-admin-support-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.wt-admin-support-head .wt-badge-row {
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .wt-admin-support-head {
    grid-template-columns: auto 1fr auto;
  }
  .wt-admin-support-head .wt-badge-row {
    grid-column: auto;
    justify-content: flex-end;
  }
}
.wt-admin-support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 768px) {
  .wt-admin-support-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.wt-admin-support-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--wt-radius-card);
  background: var(--wt-surface-subtle);
}
.wt-admin-support-mailbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--wt-soft-teal-bg);
  color: var(--wt-soft-teal);
  font-size: 13px;
  line-height: 1.5;
}
.wt-admin-support-mailbox p {
  margin: 0;
  overflow-wrap: anywhere;
}
.wt-admin-support-description {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  color: var(--wt-text-body);
}
.wt-admin-support-attachments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.wt-admin-support-attachments a {
  color: var(--wt-primary);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.wt-admin-support-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 768px) {
  .wt-admin-support-actions {
    grid-template-columns: auto 1fr;
  }
}
.wt-admin-support-actions form {
  margin: 0;
}
.wt-admin-support-status {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
}
@media (min-width: 768px) {
  .wt-admin-support-status {
    grid-template-columns: 1fr 2fr auto;
  }
  .wt-admin-support-status .wt-btn--compact {
    min-height: 52px;
  }
}
.wt-admin-support-forms {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 768px) {
  .wt-admin-support-forms {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wt-admin-support-form {
  margin: 0;
}
.wt-admin-support-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-admin-support-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wt-admin-support-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--wt-card-border);
  border-radius: 12px;
  background: var(--wt-surface-subtle);
}
.wt-admin-support-note--reply {
  background: var(--wt-soft-teal-bg);
  border-color: var(--wt-soft-teal-bg);
}
.wt-admin-support-note__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-support-note__head time {
  white-space: nowrap;
}
.wt-admin-support-note__body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  font-size: 14px;
  color: var(--wt-text-body);
}
.wt-admin-support-note__outcome {
  margin: 0;
  font-size: 12px;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-admin-support-note__outcome--failed {
  color: var(--wt-error);
}
.wt-admin-support-fold {
  margin-top: 4px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-support-fold > summary {
  cursor: pointer;
  color: var(--wt-primary);
}
.wt-admin-support-fold > p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}


/* Suspension (phase 4, conventions 18.1) - the suspension facts under the account card's badges ("Suspended on {when}
   by {name}: {reason}"), the Administrator's action grid (the password-reset form beside the suspend-or-unsuspend arm,
   each arm a <details>, no script - the reports page's shape) and the sentence drawn when neither arm applies. */
.wt-admin-suspension-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--wt-text-body);
  overflow-wrap: anywhere;
}
.wt-admin-suspension-facts time {
  white-space: nowrap;
}
.wt-admin-suspension-facts__reason {
  color: var(--wt-text);
}

/* Shelters (phase 4 S2, conventions 18.2) - the queue's per-row sub-lines, the profile card (head, two-column facts,
   owner block, about / mission text), the verification card with its documents list, and the two decision arms
   (each inside a <details>, no script). The tabs are the shared wt-filter-row / wt-chip pair; the pills the shared
   wt-badge tints. */
.wt-admin-shelters-sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-admin-shelters-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wt-admin-shelters-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.wt-admin-shelters-head .wt-badge-row {
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .wt-admin-shelters-head {
    grid-template-columns: auto 1fr auto;
  }
  .wt-admin-shelters-head .wt-badge-row {
    grid-column: auto;
    justify-content: flex-end;
  }
}
.wt-admin-shelters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 768px) {
  .wt-admin-shelters-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.wt-admin-shelters-owner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--wt-radius-card);
  background: var(--wt-surface-subtle);
}
.wt-admin-shelters-owner p {
  margin: 0;
  overflow-wrap: anywhere;
}
.wt-admin-shelters-owner a {
  color: var(--wt-primary);
  text-decoration: none;
}
.wt-admin-shelters-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  color: var(--wt-text-body);
}
.wt-admin-shelters-verification {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-admin-shelters-documents {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.wt-admin-shelters-documents a {
  color: var(--wt-primary);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.wt-admin-shelters-documents time {
  white-space: nowrap;
}
.wt-admin-shelters-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 768px) {
  .wt-admin-shelters-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wt-admin-shelters-action > summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--wt-primary);
  list-style: none;
}
.wt-admin-shelters-action > summary::-webkit-details-marker {
  display: none;
}
.wt-admin-shelters-action[open] > summary {
  margin-bottom: 12px;
}
.wt-admin-shelters-action form {
  margin: 0;
}

/* Messages we sent them (phase 4 S3, conventions 18.3; phase 5 W1 copy) - the account's messages table under the Users
   duty: the message cell (title, body excerpt), the status cell's pills, the failure text behind a "Details" fold and
   the attempts line, and the deliveries sub-list under it (provider, outcome pill, sent instant, failure fold). The
   pills reuse the shared wt-badge tints; the table is the house wt-admin-table family. */
.wt-admin-notifications-table td {
  vertical-align: top;
}
.wt-admin-notifications-table__title {
  display: block;
  font-weight: 500;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-admin-notifications-table__excerpt {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-admin-notifications-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.wt-admin-notifications-failure {
  margin: 0;
  font-size: 12px;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-admin-notifications-failure--failed {
  color: var(--wt-error);
}
.wt-admin-notifications-failure > summary {
  cursor: pointer;
  color: var(--wt-primary);
}
.wt-admin-notifications-failure > p {
  margin: 4px 0 0;
}
.wt-admin-notifications-deliveries {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wt-admin-notifications-delivery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--wt-surface-subtle);
  font-size: 12px;
  color: var(--wt-text-body);
}
.wt-admin-notifications-delivery time {
  white-space: nowrap;
  color: var(--wt-text-secondary);
}
.wt-admin-notifications-delivery .wt-admin-notifications-failure {
  flex-basis: 100%;
}

/* App health (phase 4 "Diagnostics", conventions 18.4; phase 5 W1 copy) - the tab and window chips in one toolbar, the
   report cell (title, the two messages, then the type, the source and the stack inside a "Technical details" <details>),
   the app cell, the per-row "Mark as fixed" form inside a <details> (the Content page's shape), and the two tools under
   the table: the rules-removal arm behind its confirm box and the e-mail test card. */
.wt-admin-diagnostics-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.wt-admin-diagnostics-tabs,
.wt-admin-diagnostics-take {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wt-admin-diagnostics-tabs .wt-chip,
.wt-admin-diagnostics-take .wt-chip {
  text-decoration: none;
}
.wt-admin-diagnostics-take .wt-muted {
  font-size: 12px;
}
.wt-admin-diagnostics-report__title {
  display: block;
  font-weight: 500;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}
.wt-admin-diagnostics-report__type {
  display: inline-block;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--wt-soft-teal-bg);
  color: var(--wt-soft-teal);
  overflow-wrap: anywhere;
}
.wt-admin-diagnostics-report__source {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-admin-diagnostics-report__message,
.wt-admin-diagnostics-report__user {
  display: block;
  margin-top: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wt-admin-diagnostics-report__user {
  color: var(--wt-text-secondary);
}
.wt-admin-diagnostics-detail {
  margin-top: 6px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-diagnostics-detail summary {
  cursor: pointer;
  color: var(--wt-primary);
}
.wt-admin-diagnostics-detail p {
  margin: 6px 0 0;
}
.wt-admin-diagnostics-detail pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  max-width: 560px;
  max-height: 320px;
  overflow: auto;
  border-radius: 10px;
  background: var(--wt-surface-muted);
  color: var(--wt-text-body);
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wt-admin-diagnostics-app {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-diagnostics-app a {
  color: var(--wt-primary);
  text-decoration: none;
}
.wt-admin-diagnostics-table td form {
  margin: 0;
  min-width: 220px;
}
.wt-admin-diagnostics-action > summary,
.wt-admin-diagnostics-tool > summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--wt-primary);
  list-style: none;
}
.wt-admin-diagnostics-action > summary {
  white-space: nowrap;
}
.wt-admin-diagnostics-action > summary::-webkit-details-marker,
.wt-admin-diagnostics-tool > summary::-webkit-details-marker {
  display: none;
}
.wt-admin-diagnostics-action[open] > summary,
.wt-admin-diagnostics-tool[open] > summary {
  margin-bottom: 12px;
}
.wt-admin-diagnostics-action .wt-check,
.wt-admin-diagnostics-tool .wt-check {
  font-size: 13px;
}
.wt-admin-diagnostics-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
@media (min-width: 768px) {
  .wt-admin-diagnostics-tools {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wt-admin-diagnostics-tool form,
.wt-admin-diagnostics-email {
  margin: 0;
}

/* Phase 4 S5 (conventions 18.5; phase 5 W1 copy): the Settings page - the note, one table per catalogue group, the
   description and its key under it in the first column, the stored value's inline save form (value by kind, reason, Save). */
.wt-admin-configuration-note {
  margin: 0 0 16px;
}
.wt-admin-configuration-group {
  margin-bottom: 24px;
}
.wt-admin-configuration-group__title {
  margin: 0 0 10px;
}
.wt-admin-configuration-table th:first-child,
.wt-admin-configuration-table td:first-child {
  min-width: 220px;
  max-width: 360px;
}
.wt-admin-configuration-key,
.wt-admin-configuration-default {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.wt-admin-configuration-key {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--wt-text-secondary);
}
.wt-admin-configuration-default {
  color: var(--wt-text-secondary);
}
.wt-admin-configuration-description {
  margin: 0;
  font-size: 13px;
  color: var(--wt-text);
}
.wt-admin-configuration-flags {
  margin-top: 8px;
}
.wt-admin-configuration-unset {
  margin: 0 0 8px;
  font-size: 12px;
}
.wt-admin-configuration-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
  margin: 0;
  min-width: 240px;
}
.wt-admin-configuration-form .wt-field {
  margin: 0;
}
.wt-admin-configuration-form .wt-btn--compact {
  min-height: 44px;
}
@media (min-width: 1024px) {
  .wt-admin-configuration-form {
    grid-template-columns: minmax(140px, 1fr) minmax(200px, 2fr) auto;
  }
}

/* Phase 4 S6 (conventions 18.6) - the moderation V2 shadow queue: the banner every moderation page carries, the
   queue's two-field filter, the case page's facts grid, analysis cards and verdict form (a <details>, the Reports
   page's shape, no script); and the History panel on the detail pages: the Audit table inside a card with its
   empty / unavailable / window notes. */
.wt-admin-moderation-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--wt-soft-teal-bg);
  color: var(--wt-soft-teal);
  font-size: 13px;
  line-height: 1.5;
}
.wt-admin-moderation-banner i {
  margin-top: 2px;
}
.wt-admin-moderation-banner p {
  margin: 0;
  overflow-wrap: anywhere;
}
.wt-admin-moderation-case {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wt-admin-moderation-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .wt-admin-moderation-facts {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wt-admin-moderation-facts dd {
  overflow-wrap: anywhere;
}
.wt-admin-moderation-facts dd > div {
  margin-top: 6px;
}
.wt-admin-moderation-analysis {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-admin-moderation-analysis + .wt-admin-moderation-analysis {
  margin-top: 12px;
}
.wt-admin-moderation-analysis__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--wt-text-secondary);
}
.wt-admin-moderation-analysis__head time {
  white-space: nowrap;
}
/* The lines under "What the app checked": red for what held or blocked the item, green for a check that passed (Islam 2026-10-27). */
.wt-admin-moderation-finding {
  padding: 8px 12px;
  border-radius: var(--wt-radius-badge);
  list-style: none;
}
.wt-admin-moderation-finding--flag {
  background: var(--wt-pill-red-bg);
  color: var(--wt-pill-red-deep);
}
.wt-admin-moderation-finding--clean {
  background: var(--wt-pill-green-bg);
  color: var(--wt-pill-green-text);
}
.wt-admin-moderation-analysis__scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-moderation-analysis__scores strong {
  color: var(--wt-text);
}
.wt-admin-moderation-action > summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--wt-primary);
  list-style: none;
}
.wt-admin-moderation-action > summary::-webkit-details-marker {
  display: none;
}
.wt-admin-moderation-action[open] > summary {
  margin-bottom: 12px;
}
.wt-admin-moderation-action form {
  margin: 0;
}
.wt-admin-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-admin-history__table {
  border: 1px solid var(--wt-card-border);
  border-radius: 12px;
}
.wt-admin-history__note {
  margin: 0;
}

/* Phase 5 W1 (conventions 20.6; Islam 2026-10-16, conventions 22) - the row overflow menu of the Users, Moderation,
   Shelters and Breeds grids: a native <details> in the row's last cell whose summary is the three-dots button; one link
   or one plain action per line - an action opens its modal form (the wt-admin-dialog family below), nothing is inline
   any more; a danger action's line is red. Islam 2026-10-18 ("the hamburger menu is not overflow, it increases the row
   size"): the panel floats over the table like a dropdown instead of sitting in the row's flow - absolute under its
   button here, so the row keeps its height; the table wrapper's overflow-x: auto would still clip that on the last rows,
   so admin.js re-pins the open panel to the viewport (position: fixed) from the button's own rectangle and clears the
   pin on close. admin.js keeps one menu open and closes it on Escape, a click outside, a scroll or a resize; without
   script every piece still works on this absolute panel. */
.wt-admin-row-menu-cell {
  min-width: 72px;
}
.wt-admin-row-menu {
  position: relative;
}
.wt-admin-row-menu > summary {
  list-style: none;
  white-space: nowrap;
}
.wt-admin-row-menu > summary::-webkit-details-marker {
  display: none;
}
.wt-admin-row-menu__button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  margin-left: auto;
  border-radius: 18px;
  background: var(--wt-surface-muted);
  color: var(--wt-text-body-soft);
  font-size: 16px;
  cursor: pointer;
}
.wt-admin-row-menu__button:hover,
.wt-admin-row-menu[open] > .wt-admin-row-menu__button {
  background: var(--wt-surface-subtle);
  color: var(--wt-primary);
}
.wt-admin-row-menu > summary:focus-visible,
.wt-admin-row-menu__item:focus-visible {
  outline: 2px solid var(--wt-primary);
  outline-offset: 2px;
}
.wt-admin-row-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  min-width: 200px;
  max-width: 320px;
  margin-top: 0;
  padding: 6px;
  border: 1px solid var(--wt-card-border);
  border-radius: 14px;
  background: var(--wt-card);
  box-shadow: var(--wt-shadow-sm);
}
/* Islam 2026-10-18: without script a refused action's dialog renders inline in the same cell as its re-opened menu; the
   panel returns to the row's flow there so it does not cover the form (admin.js folds that menu when it runs). */
.wt-admin-row-menu-cell:has(.wt-admin-dialog[open]) .wt-admin-row-menu__panel {
  position: static;
  width: auto;
  margin-top: 8px;
}
.wt-admin-row-menu__item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  color: var(--wt-text);
  text-decoration: none;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
.wt-admin-row-menu__item:hover {
  background: var(--wt-surface-subtle);
  color: var(--wt-primary);
}
.wt-admin-row-menu__item--danger,
.wt-admin-row-menu__item--danger:hover {
  color: var(--wt-error);
}
/* Fix round 2: a non-form line in the menu (why an item is missing), and on a phone the open panel never wider than the
   viewport. Islam 2026-10-18: the panel floats (above), so admin.js no longer scrolls it into view - it pins the open
   panel to the viewport instead, and a scroll folds the menu. */
.wt-admin-row-menu__note {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--wt-text-muted);
}
@media (max-width: 767px) {
  .wt-admin-row-menu__panel {
    max-width: calc(100vw - 48px);
  }
}

/* Phase 5 W3 (conventions 20.2) - the review queue, since conventions 30 (Islam 2026-10-27) the one Moderation page:
   the filter card in three rows (the four view chips, From / To and the one select, the text and Show - each row a
   grid that is one column on a phone and wraps in order, never stacked over another), the one-line intro under it,
   the kind pill per row (post / comment / pet / profile / case on the pill tokens), the headline link with the text and
   the author under it, the Why cell (a lead and its word list), the When cell's by-line and Overdue pill, the status
   pills. The Actions menu is W1's wt-admin-row-menu family; nothing here draws it. */
.wt-admin-review-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}
.wt-admin-review-filters__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}
.wt-admin-review-filters .wt-btn--compact {
  min-height: 52px;
}
.wt-admin-review-views {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wt-admin-review-views__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--wt-text-secondary);
}
.wt-admin-review-views .wt-chip {
  text-decoration: none;
}
@media (min-width: 768px) {
  .wt-admin-review-filters__row--dates {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wt-admin-review-filters__row--text {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
.wt-admin-review-intro {
  margin: 8px 0 0;
}
.wt-admin-review-table td {
  vertical-align: top;
}
.wt-admin-review-kind {
  display: inline-block;
  margin-bottom: 6px;
}
.wt-admin-review-kind--post {
  background: var(--wt-pill-blue-bg);
  color: var(--wt-pill-blue-text);
}
.wt-admin-review-kind--comment {
  background: var(--wt-pill-teal-bg);
  color: var(--wt-pill-teal-text);
}
.wt-admin-review-kind--pet {
  background: var(--wt-pill-purple-bg);
  color: var(--wt-pill-purple-text);
}
.wt-admin-review-kind--profile {
  background: var(--wt-pill-gray-bg);
  color: var(--wt-pill-gray-text);
}
/* Conventions 30: a case row's pill - the content kind the app flagged - on the info tint. */
.wt-admin-review-kind--case {
  background: var(--wt-pill-teal-bg);
  color: var(--wt-pill-teal-text);
}
.wt-admin-review-headline {
  display: block;
  font-weight: 500;
  color: var(--wt-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.wt-admin-review-headline:hover {
  color: var(--wt-primary);
}
.wt-admin-review-excerpt {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--wt-text-secondary);
  overflow-wrap: anywhere;
}
.wt-admin-review-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-review-why {
  min-width: 140px;
}
.wt-admin-review-count {
  display: block;
  font-weight: 600;
}
.wt-admin-review-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.wt-admin-review-reason {
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-review-reason:not(:last-child)::after {
  content: ",";
}
.wt-admin-review-when {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.wt-admin-review-status {
  align-items: flex-start;
}

/* Phase 5 W2 (conventions 20.1) - the Users grid: the search box and the five filter chips in one card, the Type cell
   (the product role beside the staff pills), the Last sign-in "Never", and the detail's Actions card list - the row
   menu's items drawn open, each confirm panel its own card. The row-menu family itself is W1's (above). */
.wt-admin-users-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-admin-users-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wt-admin-users-chips .wt-chip {
  text-decoration: none;
}
.wt-admin-users-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--wt-text-body);
}
/* Islam 2026-10-16 (conventions 22): the detail's actions are a toolbar of buttons, each opening the modal form the grid's
   menu opens; the verify-first note wraps onto its own line. */
.wt-admin-users-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.wt-admin-users-actions > .wt-admin-row-menu__note {
  flex-basis: 100%;
  padding: 0;
}

/* Phase 5 W4 (conventions 20.3) - the Shelters grid: the search box and the four tabs in one card, the name link and
   the owner's status line in the rows, the pill-over-instant Decided cell, and the papers list inside the row menu's
   "See papers" fold (glyph, name, kind and size; the link opens the web's proxy in a new tab). The row menu itself is
   W1's wt-admin-row-menu family above; the detail keeps the phase-4 shelters rules. */
.wt-admin-shelters-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-admin-shelters-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
}
@media (min-width: 768px) {
  .wt-admin-shelters-search {
    grid-template-columns: auto 1fr auto;
  }
}
.wt-admin-shelters-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wt-admin-shelters-table__name {
  font-weight: 600;
  color: var(--wt-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.wt-admin-shelters-table__name:hover,
.wt-admin-shelters-table__name:focus-visible {
  color: var(--wt-primary);
}
.wt-admin-shelters-owner-status {
  display: block;
  margin-top: 6px;
}
.wt-admin-shelters-decided {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.wt-admin-shelters-papers {
  list-style: none;
  margin: 0;
  padding: 8px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.wt-admin-shelters-papers li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: baseline;
}
.wt-admin-shelters-papers i {
  color: var(--wt-text-secondary);
}
.wt-admin-shelters-papers a {
  color: var(--wt-primary);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.wt-admin-shelters-papers__meta {
  grid-column: 2;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
.wt-admin-shelters-papers__empty,
.wt-admin-shelters-papers__hint {
  margin: 0;
  padding: 8px 12px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--wt-text-secondary);
}

/* Phase 5 W5 (conventions 20.4) - the Home page, restructured for Islam 2026-10-16 (conventions 22): one head card on
   the mint gradient - the greeting over the identity strip (the shared wt-admin-identity line, sized up here), the role
   pill, the intro, the sampled-at line and the period chips in one labelled nav - then the KPI cards in an auto-fit
   grid (two across from 360 px, up to five on a wide screen; a tinted glyph disc, the value in Poppins semibold
   proportional figures, the label in sentence case, the delta in text tokens with an arrow glyph that never wears a
   series colour, the period tag on whatever the chips change, a still green dot on Online now whose value dims while
   its poll is in flight - never a skeleton), the "Needs attention" list (one row per queue: disc, label and caption,
   the count, a chevron link that covers the row) beside the chart grid from 1200 px and above it below that, and
   the charts: one figure per chart with its caption, the plot admin-charts.js fills with inline SVG painted only
   through these classes (the one hue --wt-chart-1, the hairline grid --wt-chart-grid, axis and value text in the
   text tokens), the empty sentence, the "Show as a table" fold holding the accessible twin, and the one tooltip card
   on --wt-card with a 1 px --wt-card-border. No fixed pixel width on anything holding text; dark mode is the tokens'. */
.wt-admin-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* The head: hero on the left, the intro and the chips on the right; they stack on a phone. */
.wt-admin-home-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: var(--wt-gradient-mint);
}
.wt-admin-home-hero {
  display: flex;
  flex: 1 1 18rem;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.wt-admin-home-hero__disc {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  font-size: 22px;
  box-shadow: var(--wt-shadow-sm);
}
.wt-admin-home-hero__who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.wt-admin-home-hero__greeting {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--wt-text-secondary);
}
.wt-admin-home-hero .wt-admin-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}
.wt-admin-home-hero .wt-admin-identity__name {
  max-width: none;
  font-size: inherit;
  font-weight: 600;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  color: var(--wt-text);
}
.wt-admin-home-hero .wt-admin-identity__sub {
  flex-basis: auto;
  font-size: 13px;
  color: var(--wt-text-secondary);
}
.wt-admin-home-hero__role {
  margin-top: 2px;
}
.wt-admin-home-head__controls {
  display: flex;
  flex: 1 1 20rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.wt-admin-home-intro {
  margin: 0;
  max-width: 40rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--wt-text-body);
}
.wt-admin-home-sampled {
  margin: 0;
  font-size: 12px;
  color: var(--wt-text-secondary);
}
/* Islam 2026-10-15: the one chips row sits in the head (conventions 22); it wraps, never scrolls. */
.wt-admin-home-periods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wt-admin-home-periods__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--wt-text-secondary);
}
.wt-admin-home-periods .wt-chip {
  text-decoration: none;
}
@media (min-width: 900px) {
  .wt-admin-home-head__controls {
    align-items: flex-end;
    text-align: right;
  }
  .wt-admin-home-periods {
    justify-content: flex-end;
  }
}

/* The three section headings share one size, a step under the page title. */
.wt-admin-home-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--wt-text);
}
.wt-admin-home-kpis,
.wt-admin-home-charts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* The period tag: whatever the chips change says which period it shows. */
.wt-admin-home-period-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--wt-radius-pill);
  background: var(--wt-selection-bg);
  color: var(--wt-selection-text);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

/* The KPI cards: as many across as fit a 9.5 rem floor - two on a phone, five on a wide screen. */
.wt-admin-home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 12px;
}
.wt-admin-home-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 16px;
}
.wt-admin-home-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.wt-admin-home-tile__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 16px;
}
.wt-admin-home-live-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--wt-success);
  box-shadow: 0 0 0 3px var(--wt-soft-success-bg);
}
.wt-admin-home-tile__value {
  font-family: var(--wt-font);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  font-variant-numeric: proportional-nums;
  color: var(--wt-text);
  overflow-wrap: anywhere;
  transition: opacity 120ms ease-out;
}
.wt-admin-home-tile.is-refreshing .wt-admin-home-tile__value {
  opacity: 0.55;
}
.wt-admin-home-tile__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--wt-text-body);
}
.wt-admin-home-tile__delta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: var(--wt-radius-pill);
  background: var(--wt-surface-muted);
  font-size: 12px;
  line-height: 1.4;
  color: var(--wt-text-body);
}
.wt-admin-home-tile__delta i {
  font-size: 11px;
}
.wt-admin-home-tile__delta--down i {
  transform: rotate(180deg);
}
.wt-admin-home-tile__caption {
  font-size: 12px;
  line-height: 1.4;
  color: var(--wt-text-muted);
  overflow-wrap: anywhere;
}
.wt-admin-home-tile__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wt-primary);
  text-decoration: none;
}
.wt-admin-home-tile__link i {
  font-size: 10px;
}
.wt-admin-home-tile__link:hover {
  text-decoration: underline;
}

/* The body: the queue list above the charts on a phone and a tablet, beside them from 1200 px. */
.wt-admin-home-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "attention" "charts";
  gap: 16px;
  align-items: start;
}
.wt-admin-home-attention {
  grid-area: attention;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.wt-admin-home-charts {
  grid-area: charts;
}
@media (min-width: 1200px) {
  .wt-admin-home-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
    grid-template-areas: "charts attention";
  }
}
.wt-admin-home-attention__clear {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--wt-success);
}
/* The rows sit side by side where there is room and stack in the side column. */
.wt-admin-home-attention__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 8px;
}
@media (min-width: 1200px) {
  .wt-admin-home-attention__list {
    grid-template-columns: minmax(0, 1fr);
  }
}
.wt-admin-home-queue {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--wt-card-border);
  border-radius: var(--wt-radius-validation);
  background: var(--wt-surface-subtle);
}
.wt-admin-home-queue:hover {
  border-color: var(--wt-border);
}
.wt-admin-home-queue--clear .wt-admin-home-queue__value {
  color: var(--wt-text-muted);
}
.wt-admin-home-queue__icon {
  flex-shrink: 0;
}
.wt-admin-home-queue__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.wt-admin-home-queue__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--wt-text);
}
.wt-admin-home-queue__caption {
  font-size: 12px;
  line-height: 1.35;
  color: var(--wt-text-muted);
  overflow-wrap: anywhere;
}
.wt-admin-home-queue__value {
  font-family: var(--wt-font);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.1;
  font-variant-numeric: proportional-nums;
  color: var(--wt-text);
}
/* The chevron is the link; its ::after covers the row so the whole row is the target. */
.wt-admin-home-queue__link {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--wt-primary);
  font-size: 11px;
  text-decoration: none;
}
.wt-admin-home-queue__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--wt-radius-validation);
}
.wt-admin-home-queue__link:focus-visible {
  outline: 2px solid var(--wt-primary);
  outline-offset: 2px;
}

/* The chart grid: one column on a phone, two where 20 rem fits twice; the day series spans the row. */
.wt-admin-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 16px;
}
.wt-admin-chart--wide {
  grid-column: 1 / -1;
}
.wt-admin-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 0;
}
.wt-admin-chart__caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wt-admin-chart__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}
.wt-admin-chart__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--wt-text);
}
.wt-admin-chart__subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--wt-text-secondary);
}
.wt-admin-chart__plot {
  position: relative;
  width: 100%;
  min-width: 0;
}
/* Fix round 3: the plot scrolls sideways only when the script found the columns too narrow (90 days on a phone); a bars
   chart never becomes a scroll container, so its last row's tooltip grows no scrollbar. */
.wt-admin-chart__plot--scroll {
  overflow-x: auto;
}
.wt-admin-chart__plot svg {
  display: block;
  width: 100%;
  overflow: visible;
  font-family: var(--wt-font);
}
.wt-admin-chart__bar {
  fill: var(--wt-chart-1);
}
.wt-admin-chart__hit {
  fill: none;
  pointer-events: all;
}
.wt-admin-chart__mark {
  outline: none;
}
.wt-admin-chart__mark:hover .wt-admin-chart__bar,
.wt-admin-chart__mark:focus .wt-admin-chart__bar {
  opacity: 0.78;
}
.wt-admin-chart__mark:focus-visible .wt-admin-chart__bar {
  stroke: var(--wt-primary);
  stroke-width: 2;
}
.wt-admin-chart__mark:focus-visible .wt-admin-chart__hit {
  stroke: var(--wt-primary);
  stroke-width: 2;
}
.wt-admin-chart__grid,
.wt-admin-chart__axis {
  stroke: var(--wt-chart-grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.wt-admin-chart__label {
  fill: var(--wt-text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.wt-admin-chart__value {
  fill: var(--wt-text);
  font-size: 12px;
  font-weight: 500;
}
.wt-admin-chart__empty {
  margin: 0;
  padding: 24px 0;
  font-size: 13px;
  text-align: center;
  color: var(--wt-text-secondary);
}
.wt-admin-chart__table-fold > summary {
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--wt-primary);
}
.wt-admin-chart__table-fold > summary::-webkit-details-marker {
  display: none;
}
.wt-admin-chart__table-fold > summary:focus-visible {
  outline: 2px solid var(--wt-primary);
  outline-offset: 2px;
}
.wt-admin-chart__table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 13px;
}
.wt-admin-chart__table th,
.wt-admin-chart__table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--wt-card-border);
  text-align: left;
  color: var(--wt-text-body);
}
.wt-admin-chart__table thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--wt-text-secondary);
}
.wt-admin-chart__table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wt-admin-chart-tooltip {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 10px;
  border: 1px solid var(--wt-card-border);
  border-radius: 10px;
  background: var(--wt-card);
  box-shadow: var(--wt-shadow-sm);
  white-space: nowrap;
  pointer-events: none;
}
.wt-admin-chart-tooltip__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--wt-text);
}
.wt-admin-chart-tooltip__label {
  font-size: 12px;
  color: var(--wt-text-secondary);
}
/* Islam 2026-10-21 - the user heat map (admin-map.js): the figure's plot becomes the small map, the XXL twin fills the
   viewport in the house dialog; both hold the vendored Leaflet map, so the plot sets the height Leaflet needs and the
   stage flexes to the dialog. The hover cells are transparent rectangles that only carry the tooltip (the plugin's own
   canvas paints the heat); the tooltip wears the chart tooltip's tokens. The open button sits in the chart head beside
   the title, as the period tag does. */
.wt-admin-chart__plot--map {
  height: 360px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--wt-card-border);
}
.wt-admin-chart__open {
  flex-shrink: 0;
  white-space: nowrap;
}
.wt-admin-chart__cell {
  cursor: crosshair;
}
.wt-admin-chart__cell-tip {
  padding: 6px 10px;
  border: 1px solid var(--wt-card-border);
  border-radius: 10px;
  background: var(--wt-card);
  color: var(--wt-text);
  box-shadow: var(--wt-shadow-sm);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.wt-admin-dialog.wt-admin-chart-dialog {
  width: min(100% - 32px, 1600px);
  height: min(100vh - 32px, 1000px);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}
.wt-admin-dialog.wt-admin-chart-dialog:not([open]) {
  display: none;
}
.wt-admin-chart-dialog__stage {
  flex: 1 1 auto;
  min-height: 320px;
  margin: 0 20px 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--wt-card-border);
}

/* Phase 5 W6 (Islam 2026-10-16, conventions 22) - the modal forms of the admin area and the identity line. A form an
   action needs is a native <dialog class="wt-dialog wt-admin-dialog"> (the wt-dialog family of wt-thread.css, loaded
   by the shared layout, gives it the card, the head and the pair of buttons); admin.js opens it as a modal from the row
   menu or the detail's toolbar. A dialog the server re-opened renders inline without script: outside the top layer it
   sits in normal flow under its row instead of floating over the table. The identity line is one person on every
   admin page: the pet first for a pet's content, the name (linked to the account), the address under it. */
.wt-admin-dialog {
  width: min(100% - 32px, 440px);
  text-align: left;
}
.wt-admin-dialog:not(:modal) {
  position: static;
  width: min(100%, 440px);
  margin: 8px 0 0;
}
.wt-admin-dialog__form {
  margin: 0;
}
.wt-admin-dialog .wt-dialog__body {
  gap: 12px;
}
.wt-admin-dialog .wt-helper {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.wt-admin-dialog textarea.wt-input {
  min-height: 88px;
}
.wt-admin-dialog__confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--wt-text-body);
  cursor: pointer;
}
.wt-admin-dialog__confirm input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--wt-primary);
}
.wt-admin-identity {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.wt-admin-identity__pet {
  font-weight: 600;
  color: var(--wt-text);
}
.wt-admin-identity__pet i {
  margin-right: 4px;
  font-size: 12px;
  color: var(--wt-primary);
}
.wt-admin-identity__lead {
  font-size: 12px;
  color: var(--wt-text-muted);
}
.wt-admin-identity__name {
  font-weight: 500;
  color: var(--wt-text);
  text-decoration: none;
}
a.wt-admin-identity__name:hover {
  color: var(--wt-primary);
  text-decoration: underline;
}
.wt-admin-identity__sub {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--wt-text-muted);
}

/* Phase 6 W2 (conventions 23.5) - the staff shelter editor: the head card (the owner line beside the pills, the read-only
   decision facts), the form's own width over the owner's wt-profile-* sections, the mirrored papers list (glyph, name,
   kind and instant, a Remove box per stored paper, the Add papers input), the Onboarding checkboxes, the reason card and
   the one button. The owner's partials keep their own wt-profile-* rules (wt-profile.css, loaded everywhere). */
.wt-admin-edit-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wt-admin-edit-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wt-admin-edit-head__label {
  margin: 0;
  font-size: 12px;
  color: var(--wt-text-muted);
}
.wt-admin-edit-facts {
  margin: 0;
}
.wt-admin-edit-form {
  max-width: 760px;
}
.wt-admin-edit-documents__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wt-admin-edit-document {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius-input);
  background: var(--wt-input-bg);
}
.wt-admin-edit-document > i {
  flex-shrink: 0;
  color: var(--wt-primary);
}
.wt-admin-edit-document__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-wrap: anywhere;
}
.wt-admin-edit-document__remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--wt-text-body);
  cursor: pointer;
}
.wt-admin-edit-document__remove input,
.wt-admin-edit-flag input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--wt-primary);
}
.wt-admin-edit-documents__input {
  padding: 10px 12px;
}
.wt-admin-edit-flags {
  border: 0;
  margin: 0;
  padding: 16px;
}
.wt-admin-edit-flag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--wt-text-body);
  cursor: pointer;
}
.wt-admin-edit-reason textarea.wt-input {
  min-height: 88px;
}
.wt-admin-edit-actions {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 480px) {
  .wt-admin-edit-document {
    flex-wrap: wrap;
  }
  .wt-admin-edit-actions .wt-btn {
    width: 100%;
  }
}

/* Phase 6 W3 (conventions 23.5) - the staff account editor: the read-only e-mail line in the head card. Everything else on
   the page is W2's wt-admin-edit* family (the head, the form width, the Remove box, the reason card, the button row) and the
   owner's wt-profile-* / wt-map-picker* rules, loaded everywhere. */
.wt-admin-edit-head__value {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--wt-text);
  overflow-wrap: anywhere;
}

/* Phase 6 W4 (conventions 23.5) - the staff pet editors and the Shelters detail's Pets card. The option lists are labelled
   boxes: a native checkbox or radio beside its word, the picked ones tinted through :has so no script is needed (the shelter
   editor's chips hide the input and rely on pet-editor.js, which never runs here). The photo grid draws a Remove box and a
   Main photo radio under each tile. The wt-admin-edit-form / -flags / -flag / -reason / -actions families are W2's. */
.wt-admin-edit-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wt-admin-edit-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 2px solid var(--wt-border);
  border-radius: var(--wt-radius-pill);
  background: var(--wt-surface-muted);
  color: var(--wt-text-body);
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}
.wt-admin-edit-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--wt-primary);
}
.wt-admin-edit-option:has(input:checked) {
  border-color: var(--wt-primary);
  background: var(--wt-selection-bg);
  color: var(--wt-selection-text);
}
.wt-admin-edit-option:focus-within {
  outline: 2px solid var(--wt-primary);
  outline-offset: 2px;
}
.wt-admin-edit-value {
  margin: 0;
  padding: 12px 14px;
  border: 2px solid var(--wt-border);
  border-radius: var(--wt-radius-input);
  background: var(--wt-surface-muted);
  color: var(--wt-text);
}
.wt-admin-edit-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.wt-admin-edit-photo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 136px;
}
.wt-admin-edit-photo__img {
  display: block;
  width: 136px;
  height: 136px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--wt-surface-muted);
}
.wt-admin-edit-photo__main {
  font-size: 12px;
  font-weight: 600;
  color: var(--wt-primary);
}
.wt-admin-edit-photo__control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--wt-text-body);
  cursor: pointer;
}
.wt-admin-edit-photo__control input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--wt-primary);
}
.wt-admin-edit-pets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.wt-admin-edit-pet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--wt-card-border);
}
.wt-admin-edit-pet:last-child {
  border-bottom: 0;
}
.wt-admin-edit-pet__name {
  font-weight: 500;
  color: var(--wt-text);
}
.wt-admin-edit-pet__meta {
  font-size: 12px;
  color: var(--wt-text-muted);
}
.wt-admin-edit-pet__edit {
  margin-left: auto;
}
/* The two card hooks the W4 views name (the photos fieldset, the Pets card): declared empty so the class sweep finds them;
   the cards wear wt-card's own look. */
.wt-admin-edit-photos-card {
}
.wt-admin-edit-pets-card {
}

/* Islam 2026-10-23 - the Templates page and its editor: the grouped table (the name over its sentence and key), the head
   card, the toolbar of the rich editor (one row of small buttons that wraps on a phone), the contenteditable box that
   wears wt-input, the HTML source box under it, the placeholder chips, the preview (an e-mail in a sandboxed iframe,
   a notification as two lines), the actions row and the shipped-words disclosure. */
.wt-admin-templates-note {
  margin-bottom: 16px;
}
.wt-admin-templates-group {
  margin-bottom: 24px;
}
.wt-admin-templates-group__title {
  margin: 0 0 10px;
}
.wt-admin-templates-table td {
  vertical-align: top;
}
.wt-admin-templates-name {
  font-weight: 600;
  color: var(--wt-text);
  text-decoration: none;
}
.wt-admin-templates-name:hover {
  text-decoration: underline;
}
.wt-admin-templates-description {
  margin: 4px 0 4px;
  font-size: 13px;
  color: var(--wt-text-muted);
}
.wt-admin-templates-key {
  font-size: 12px;
  color: var(--wt-text-muted);
}
.wt-admin-templates-actions {
  text-align: right;
  white-space: nowrap;
}
.wt-admin-templates-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.wt-admin-templates-form .wt-chip {
  cursor: pointer;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}
.wt-admin-templates-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px;
  margin-bottom: 6px;
  border: 1px solid var(--wt-card-border);
  border-radius: 12px;
  background: var(--wt-surface-muted);
}
.wt-admin-templates-tool {
  min-width: 34px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--wt-text);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wt-admin-templates-tool:hover,
.wt-admin-templates-tool[aria-pressed="true"] {
  background: var(--wt-card);
  border-color: var(--wt-card-border);
}
.wt-admin-templates-tool--color {
  position: relative;
  overflow: hidden;
}
.wt-admin-templates-tool--color input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.wt-admin-templates-toolbar__gap {
  width: 8px;
}
.wt-admin-templates-toolbar__spacer {
  flex: 1 1 auto;
}
.wt-admin-templates-tool--toggle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.wt-admin-templates-editor {
  min-height: 220px;
  overflow: auto;
  line-height: 1.6;
  white-space: normal;
}
.wt-admin-templates-editor:focus {
  outline: none;
}
.wt-admin-templates-editor p {
  margin: 0 0 12px;
}
.wt-admin-templates-editor a {
  color: var(--wt-secondary);
}
.wt-admin-templates-source {
  min-height: 220px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}
.wt-admin-templates-preview__frame {
  border: 1px solid var(--wt-card-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--wt-surface-muted);
}
.wt-admin-templates-preview__subject {
  margin: 0;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--wt-text);
  background: var(--wt-card);
  border-bottom: 1px solid var(--wt-card-border);
  min-height: 20px;
}
/* The mail inside the frame carries its own inline colours (the house card is light by design, as the mail client draws it). */
.wt-admin-templates-preview__mail {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  background: var(--wt-surface-muted);
}
.wt-admin-templates-preview__body {
  margin: 0;
  padding: 12px 14px;
  color: var(--wt-text);
  background: var(--wt-card);
  min-height: 24px;
  white-space: pre-wrap;
}
.wt-admin-templates-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.wt-admin-templates-shipped {
  margin-top: 16px;
  padding: 12px 16px;
}
.wt-admin-templates-shipped__summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--wt-text);
}
.wt-admin-templates-shipped__value {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--wt-text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}
