/* The portals' look (25 Oct): Plug's own - theme.css's colours (Light and Dark), the DM fonts - on a phone and a
   desktop. No colour is written here; everything is a theme variable. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }       /* the tabs and buttons a signed-out page hides */
html, body { margin: 0; }
body { background: var(--ivory); color: var(--ink); font: 15px/1.55 'DM Sans', system-ui, sans-serif;
  padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--btn); }
.bar { background: var(--bar); color: var(--bar-ink); position: sticky; top: 0; z-index: 5; }
.bar .in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.bar .name { font-weight: 600; font-size: 17px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mark { width: 20px; height: 20px; }
.sp { flex: 1; }
.themebtn { background: var(--bar-tint); color: var(--bar-ink); border: 1px solid var(--bar-line); border-radius: 999px;
  min-height: 40px; padding: 0 14px; font: 500 13px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; flex: none; }
@media (max-width: 480px) { .themebtn { padding: 0 10px; font-size: 12px; } .bar .name { font-size: 15px; } }
.tabs { max-width: 1180px; margin: 0 auto; padding: 0 8px; display: flex; gap: 2px; overflow-x: auto;
  scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { color: var(--bar-muted); text-decoration: none; padding: 10px 12px 12px; white-space: nowrap;
  border-bottom: 3px solid transparent; font-weight: 500; font-size: 14px; display: inline-flex; gap: 6px;
  align-items: center; min-height: 44px; }
.tabs a.on { color: var(--bar-ink); border-bottom-color: var(--bar-ink); }
.count { background: var(--danger); color: var(--on-color); border-radius: 999px; font-size: 11px; padding: 0 6px;
  min-width: 18px; text-align: center; line-height: 18px; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font: 400 30px/1.15 'DM Serif Display', serif; margin: 4px 0 6px; }
h2 { font: 400 22px/1.2 'DM Serif Display', serif; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0 0 14px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-size: 26px; font-weight: 600; }
.stat b.small { font-size: 17px; overflow-wrap: anywhere; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
  font: 500 14px 'DM Sans', sans-serif; text-decoration: none; }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--on-color); }
.btn.danger { color: var(--danger); border-color: var(--danger-line); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .themebtn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
label.f { display: block; margin: 0 0 12px; font-weight: 500; font-size: 14px; }
label.f input, label.f select, label.f textarea { display: block; width: 100%; margin-top: 4px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper-soft); color: var(--ink);
  padding: 8px 12px; font: 15px 'DM Sans', sans-serif; }
label.f textarea { min-height: 96px; }
.err { color: var(--danger); margin: 8px 0; }
.okmsg { color: var(--ok); margin: 8px 0; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--paper-soft); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.pill.bad { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px;
  border-bottom: 2px solid var(--tbl-rule); background: var(--tbl-head-bg); }
table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.t tr.go { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { table.t tr.go:hover td { background: var(--sel-bg); } }
.probs { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; }
.probs li { margin: 2px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.filters select, .filters input { min-height: 40px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink); padding: 0 10px; font: 14px 'DM Sans', sans-serif; }
.code { font: 600 22px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 1px; background: var(--paper-soft);
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; display: inline-block; word-break: break-all; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }
.qr svg { width: 200px; height: 200px; background: #fff; border-radius: 8px; padding: 6px; }
.sign { max-width: 440px; margin: 24px auto; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
.list > li:last-child { border-bottom: 0; }
.shot { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink);
  color: var(--paper); padding: 10px 16px; border-radius: 10px; z-index: 20; max-width: calc(100% - 32px); }
/* a table becomes cards on a phone: each row a card, each cell with its heading beside it */
@media (max-width: 699px) {
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td { display: block; width: 100%; }
  table.t.cards tr { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px;
    padding: 6px 4px; }
  table.t.cards td { border: 0; padding: 4px 10px; display: flex; gap: 10px; }
  table.t.cards td::before { content: attr(data-h); color: var(--muted); font-size: 12px; min-width: 96px; flex: none; }
  table.t.cards td[data-h=""]::before { display: none; }
  h1 { font-size: 26px; }
}
