/* The admin panel (js/admin.js): the same panels, pills and charts as the rest of rainydays, quieter where it's
   a list to work through. Amber marks what needs a look; red, what's been stopped. Its classes are staff-*, never
   ad-*: ad blockers hide .ad-body, .ad-tag and the like on every site. */

.admin .page-head { margin-bottom: 14px; }
.staff-body { display: grid; gap: 16px; }
.staff-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 17px; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); font-family: var(--mono); font-size: 11px; }
.staff-panel-head { align-items: flex-start; }
.staff-panel-head .panel-sub { margin-bottom: 0; }
.staff-note { color: var(--dim); font-size: 13.5px; max-width: 75ch; margin: 0; }
.staff-note strong { color: var(--white); font-family: var(--mono); font-weight: 600; }
.staff-h3 { font-size: 13px; font-weight: 600; color: var(--mist); margin: 16px 0 8px; }
.staff-name { color: var(--text); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; min-width: 0; }
.staff-link:hover span { color: var(--white); text-decoration: underline; }
.staff-none { padding: 22px 18px; color: var(--dim); text-align: center; list-style: none; }
.staff-more { display: flex; justify-content: center; margin-top: 12px; }
.staff-warn-text { color: var(--warn); }

/* tags on an account: staff, suspended, unconfirmed, reported */
.staff-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line-soft); color: var(--mist); }
.staff-tag.staff { color: var(--accent); box-shadow: inset 0 0 0 1px rgba(var(--glow-rgb), 0.35); }
.staff-tag.bad { color: var(--bad); background: var(--bad-wash); box-shadow: inset 0 0 0 1px rgba(var(--bad-rgb), 0.35); }
.staff-tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.staff-tag.dim { color: var(--dim); font-weight: 500; }
.staff-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.staff-level .staff-tag { height: 24px; padding: 0 9px; font-size: 12px; }

/* what's waiting */
.staff-queues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.staff-queue {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; text-decoration: none; color: var(--text); font-size: 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--panel-ring)); transition: border-color 0.15s, background 0.15s;
}
.staff-queue:hover { border-color: var(--warn); }
.staff-queue > .ic { flex: none; color: var(--warn); }
.staff-queue-n { font-size: 20px; font-weight: 600; color: var(--white); }
.staff-queue.clear { border-color: var(--line-soft); background: var(--panel); color: var(--dim); }
.staff-queue.clear > .ic { color: var(--mint); }
.staff-queue.clear:hover { border-color: var(--line); color: var(--mist); }

/* growth: the numbers, then the charts */
.staff-kpis { list-style: none; margin: 16px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); row-gap: 18px; overflow: hidden; }
.staff-kpi { display: flex; flex-direction: column; gap: 3px; padding: 2px 14px; box-shadow: -1px 0 0 var(--line-soft); min-width: 0; }
.staff-kpi-l { color: var(--dim); font-size: 12.5px; }
.staff-kpi-v { color: var(--white); font-size: 22px; font-weight: 600; line-height: 1.2; }
.staff-kpi-s { display: grid; color: var(--dim); font-size: 12px; }
.staff-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin-top: 18px; }
.staff-chart { min-width: 0; }
.staff-chart-none { display: grid; place-items: center; height: 150px; border: 1px dashed var(--line); border-radius: 10px; color: var(--dim); font-size: 13px; text-align: center; padding: 0 16px; }
.staff-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.staff-two > .panel + .panel, .admin .stack > .panel + .panel { margin-top: 0; }
.staff-foot { margin: 12px 0 0; }
.staff-tbadge { border-radius: calc(var(--s) * 0.28); }
.staff-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.staff-table th { text-align: left; color: var(--dim); font-weight: 500; font-size: 12.5px; padding: 0 0 8px; }
.staff-table td { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.staff-table .n { text-align: right; padding-left: 12px; white-space: nowrap; }
.staff-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 13.5px; }
.staff-facts dt { color: var(--dim); }
.staff-facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.staff-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; }
.staff-switch p { margin: 2px 0 0; }

/* little lists: accounts, teams, devices, members */
.staff-mini { list-style: none; margin: 0 0 8px; padding: 0; }
.staff-mini > li + li { border-top: 1px solid var(--line-soft); }
.staff-mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text); text-decoration: none; min-width: 0; }
a.staff-mini-row:hover .staff-name { color: var(--white); text-decoration: underline; }
.staff-mini-row > .ic { flex: none; color: var(--dim); }
.staff-mini-text { display: grid; flex: 1; min-width: 0; }
.staff-mini-tags { display: flex; gap: 4px; }
.staff-agent { font-size: 12.5px; color: var(--mist); overflow-wrap: anywhere; }

/* accounts */
.staff-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.staff-search { flex: 1 1 260px; max-width: 420px; }
.staff-seg-box, .staff-fine-box { display: contents; }
.staff-sort { width: auto; padding-right: 30px; }
.staff-chips { overflow-x: auto; scrollbar-width: none; }
.staff-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: var(--panel); }
.staff-list > li + li { border-top: 1px solid var(--line-soft); }
.staff-row { display: grid; grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, 1fr) 128px 128px; align-items: center; gap: 14px; padding: 10px 14px; color: var(--text); text-decoration: none; transition: background 0.12s; }
.staff-row:hover { background: var(--row-hover); }
.staff-row-id { display: grid; min-width: 0; }
.staff-row-id .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-row-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.staff-row-when { font-size: 13px; color: var(--mist); white-space: nowrap; }

/* an account's or a team's page */
.staff-back { display: inline-flex; align-items: center; gap: 4px; color: var(--mist); font-size: 13.5px; text-decoration: none; justify-self: start; }
.staff-back:hover { color: var(--white); }
.staff-person { display: flex; align-items: center; gap: 16px; }
.staff-person h1 { font-size: 24px; letter-spacing: -0.01em; }
.staff-person-id { min-width: 0; }
.staff-person-id p { margin: 4px 0 0; }
.staff-desc { color: var(--mist); max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.staff-banner { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 10px; }
.staff-banner > div { flex: 1; min-width: 0; }
.staff-banner p { margin: 3px 0 0; color: var(--mist); font-size: 13.5px; overflow-wrap: anywhere; }
.staff-banner .ic { flex: none; margin-top: 2px; }
.staff-banner.bad { border: 1px solid rgba(var(--bad-rgb), 0.4); background: var(--bad-wash); }
.staff-banner.bad > .ic, .staff-banner.bad strong { color: var(--bad); }
.staff-profile { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 12px; }
.staff-check { align-items: flex-start; }
.staff-check > span { display: grid; gap: 2px; min-width: 0; }
.staff-check strong { color: var(--text); font-weight: 600; }
.staff-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.staff-fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.staff-fieldset legend { margin-bottom: 8px; }
.staff-remove-pic img { display: block; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }

/* pictures */
.staff-pics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.staff-pics > .staff-none { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 12px; }
.staff-pic { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel); min-width: 0; }
.staff-pic.seen { opacity: 0.72; }
.staff-pic-img { display: block; justify-self: center; border-radius: 10px; overflow: hidden; background: var(--deep); }
.staff-pic-img img { display: block; width: 128px; height: 128px; object-fit: cover; }
.staff-pic-cap { display: grid; gap: 2px; min-width: 0; text-align: center; }
.staff-pic-who a { color: var(--text); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.staff-pic-who a:hover { color: var(--white); text-decoration: underline; }
.staff-pic-tools { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }

/* text */
.staff-texts { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: var(--panel); }
.staff-texts > li + li { border-top: 1px solid var(--line-soft); }
.staff-text { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 14px; }
.staff-text.seen .staff-text-body { opacity: 0.8; }
.staff-text-body { display: grid; gap: 4px; min-width: 0; }
.staff-text-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.staff-text-line { margin: 0; color: var(--mist); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.staff-text-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.staff-mark { background: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--white); border-radius: 3px; padding: 0 2px; }

/* reports */
.staff-reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.staff-reports > .staff-none { border: 1px dashed var(--line); border-radius: 12px; }
.staff-report { display: grid; gap: 8px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line-soft)); border-radius: 12px; background: var(--panel); }
.staff-report.closed { border-color: var(--line-soft); }
.staff-report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.staff-report-head > .ic { flex: none; color: var(--warn); }
.staff-report.closed .staff-report-head > .ic { color: var(--dim); }
.staff-report-title { flex: 1; min-width: 0; }
.staff-report-title strong { color: var(--white); }
.staff-report-by, .staff-report-note { margin: 0; }
.staff-report-by a { color: var(--mist); }
.staff-report-note { color: var(--text); font-size: 13.5px; overflow-wrap: anywhere; }
.staff-report-note .ic { color: var(--dim); vertical-align: -2px; }
.staff-quote { margin: 0; padding: 10px 12px; border-left: 3px solid var(--line); border-radius: 0 8px 8px 0; background: var(--well); color: var(--text); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.staff-quote p { margin: 4px 0 0; }
.staff-now { margin: 0; color: var(--warn); font-size: 13px; }
.staff-now-pic { display: flex; align-items: center; gap: 10px; }
.staff-now-pic img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.staff-report-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.staff-report-done { margin: 0; color: var(--mint); font-size: 13px; }

/* the log */
.staff-log { list-style: none; margin: 0; padding: 0; }
.staff-log-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.staff-log-row:first-child { border-top: 0; }
.staff-log-text { color: var(--mist); overflow-wrap: anywhere; }
.staff-log-text a { color: var(--text); }

@media (max-width: 900px) {
  .staff-charts, .staff-two { grid-template-columns: minmax(0, 1fr); }
  .staff-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .staff-row-when { display: none; }
}
@media (max-width: 640px) {
  .staff-queues { grid-template-columns: minmax(0, 1fr); }
  .staff-row { grid-template-columns: 36px minmax(0, 1fr); }
  .staff-row-tags { grid-column: 2; }
  .staff-text { grid-template-columns: 36px minmax(0, 1fr); }
  .staff-text-tools { grid-column: 1 / -1; justify-content: flex-start; }
  .staff-profile { grid-template-columns: minmax(0, 1fr); }
  .staff-person { align-items: flex-start; }
  .staff-log-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .staff-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .staff-facts dd { margin-bottom: 8px; }
}
