/* admin.css -- the admin studio's customers screen. Theme tokens only, so light and dark follow core.css. */

/* the view element itself (.e3bview) lies over the whole editor: no position or height of its own here */
.adm-host { display: flex; flex-direction: column; font: var(--ui-fs) var(--font-ui); color: var(--text); }

.adm-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 10px; border-bottom: 1px solid var(--rule); background: var(--surface);
}
.adm-title { font-weight: 600; color: var(--text-strong); }
.adm-dim { color: var(--text-dim); }
.adm-spacer { flex: 1 1 auto; }
.adm-chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--rule);
  color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); white-space: nowrap;
}
.adm-chip.good { border-color: var(--ok); color: var(--ok); }
.adm-chip.bad { border-color: var(--danger); color: var(--danger-tx); }
.adm-chip.warn { border-color: var(--attn); color: var(--attn); }
.adm-chip.live { border-color: var(--accent); color: var(--accent); }

.adm-btn {
  background: var(--surface2); color: var(--text); border: 1px solid var(--rule); border-radius: var(--radius-sm);
  padding: 2px 10px; font: inherit; cursor: pointer; white-space: nowrap;
}
.adm-btn:hover:not(:disabled) { background: var(--hover); }
.adm-btn:disabled { opacity: .5; cursor: default; }
.adm-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.adm-btn.danger { border-color: var(--danger); color: var(--danger-tx); }
.adm-btn.danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.adm-btn.warn { border-color: var(--attn); color: var(--attn); }

.adm-tabs { flex: 0 0 auto; display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.adm-tab {
  background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-dim);
  padding: 5px 10px; font: inherit; cursor: pointer;
}
.adm-tab.on { color: var(--text-strong); border-bottom-color: var(--accent); }

.adm-body { flex: 1 1 auto; overflow: auto; padding: 10px; }
.adm-error { border: 1px solid var(--danger); color: var(--danger-tx); padding: 6px 10px; border-radius: var(--radius-sm); margin-bottom: 8px; white-space: pre-wrap; }

.adm-table { border-collapse: collapse; width: 100%; }
.adm-table th { text-align: left; color: var(--text-dim); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.adm-table td { padding: 4px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.adm-table tr:hover td { background: var(--hover); }
.adm-table a { color: var(--accent); }
.adm-name { font-weight: 600; color: var(--text-strong); }
.adm-reason { color: var(--text-dim); max-width: 40em; }
.adm-bon { font-size: 0.9em; margin-top: 2px; }
.adm-warn { color: var(--danger-tx); }
.adm-acts { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; }
.adm-table td.adm-nw { white-space: nowrap; }
.adm-more {
  background: var(--surface2); color: var(--text); border: 1px solid var(--rule); border-radius: var(--radius-sm);
  font: inherit; padding: 1px 4px; cursor: pointer;
}

.adm-form { display: grid; grid-template-columns: max-content minmax(16em, 32em); gap: 6px 12px; align-items: center; max-width: 48em; }
.adm-form label { display: contents; }
.adm-form label > span { color: var(--text-dim); }
.adm-form input, .adm-form select {
  background: var(--bg); color: var(--text-strong); border: 1px solid var(--rule); border-radius: var(--radius-sm);
  font: inherit; padding: 3px 6px;
}
.adm-form .adm-btn, .adm-form p { grid-column: 2; justify-self: start; }

.adm-sub { margin: 4px 0 6px; font-size: inherit; font-weight: 600; color: var(--text-strong); }
.adm-pending { margin-bottom: 18px; }
.adm-stitem.adm-attn { font-weight: 600; }
.adm-outhead { font-weight: 600; margin-bottom: 6px; }
.adm-outhead.good { color: var(--ok); }
.adm-outhead.bad { color: var(--danger-tx); }
.adm-out {
  background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 8px 10px;
  font: var(--code-fs, 13px) var(--font-code, monospace); white-space: pre-wrap; margin: 0 0 8px;
}

.adm-toast {
  position: absolute; right: 12px; bottom: 12px; background: var(--surface2); border: 1px solid var(--rule);
  padding: 6px 12px; border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(0,0,0,.2); max-width: 40em;
}
.adm-toast.bad { border-color: var(--danger); color: var(--danger-tx); }
.adm-health td:first-child { width: 4.5rem; }
.adm-health .adm-st-bad td { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.adm-days td { text-align: right; }
.adm-days td:first-child { text-align: left; }
.adm-bad { color: var(--danger-tx); font-weight: 600; }

/* the invoice viewer (S-0000-0507): over the admin screen, closes with Close or Escape */
.adm-viewer { position: fixed; inset: 5vh 5vw; z-index: 1000; display: flex; flex-direction: column; background: var(--bg, #1e1e1e); border: 1px solid var(--border, #444); border-radius: var(--radius-sm, 4px); box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.adm-viewer-bar { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--border, #444); }
.adm-viewer-bar .adm-name { flex: 1; }
.adm-viewer-doc { flex: 1; border: 0; width: 100%; background: #fff; }
.adm-viewer-img { flex: 1; min-height: 0; object-fit: contain; max-width: 100%; margin: auto; }

/* the mailing lists and a message to one (S-0000-0522) */
.adm-listform { display: flex; flex-direction: column; gap: 8px; max-width: 46rem; margin: 10px 0 24px; }
.adm-listrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm-in { font: inherit; padding: 5px 8px; background: var(--bg); color: var(--text); border: 1px solid var(--rule); border-radius: 4px; }
.adm-subj { flex: 1 1 18rem; }
.adm-text { width: 100%; box-sizing: border-box; font: var(--code-fs) var(--font-code); }
