/* Styles local to the authorization-maintenance page. It is drawn with the console's own tokens and parts (panel.css):
   the filter chips, the search and the list card of the other pages, the brand colour for what is chosen, green, amber
   and red for states only. The page answers "is there anything to do?" first: a verdict heads it (the overview's), what
   needs a person follows as cards with the one thing to do about each, and every other account is a quiet row. What is
   behind an account, and everything else that can be done with it, is in the drawer it opens (the pool page's);
   importing accounts and the settings open over the page. */
.maintenance-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }

/* The verdict that heads the page: the overview's own (panel.css .hero: the icon, a grey line, the sentence, the
   buttons), a little lower, with what governs the whole maintenance at its end: the switch of the automatic maintenance
   and the way to the settings. */
.maintenance-workspace .maint-verdict { grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; padding: 24px 28px 26px; }
.maintenance-workspace .maint-verdict .hero-body { gap: 6px; }
.maintenance-workspace .maint-verdict h1 { font-size: 26px; }
.maintenance-workspace .maint-verdict .hero-text { font-size: 15px; }
.maintenance-workspace .maint-verdict .hero-actions { gap: 8px; margin-top: 12px; }
.maintenance-workspace .maint-timing { overflow-wrap: anywhere; }
.maintenance-workspace .maint-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.maintenance-workspace .maint-controls { display: grid; justify-items: end; align-content: start; gap: 8px; }
.maintenance-workspace .maint-check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; }
.maintenance-workspace .maint-check input { flex: none; cursor: pointer; }
.maintenance-workspace .maint-check input:disabled { cursor: not-allowed; }
/* A setting that takes effect at once is drawn as a switch (the box that goes with a form stays a box): the track of the
   console's switch, its knob a radial gradient that slides with background-position. */
.maintenance-workspace :is(.maint-controls, .maint-priority-head) .maint-check input {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: var(--switch-off);
  background-image: radial-gradient(circle closest-side, #fff 94%, transparent);
  background-repeat: no-repeat;
  background-position: 2px 50%;
  background-size: 18px 18px;
  transition: background-color 180ms var(--ease), background-position 180ms var(--ease);
}
.maintenance-workspace :is(.maint-controls, .maint-priority-head) .maint-check input:checked { background-color: var(--good); background-position: calc(100% - 2px) 50%; }
.maintenance-workspace :is(.maint-controls, .maint-priority-head) .maint-check input:disabled { opacity: .5; }

/* What could not be read, what needs to be known before acting, and what an import answered: a box in the colour of
   what it says. */
.maintenance-workspace .maint-notice, .maintenance-workspace .maint-result { padding: 12px 16px; border: 1px solid color-mix(in oklab, var(--warn) 32%, transparent); border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; overflow-wrap: anywhere; }
.maintenance-workspace .maint-result[data-tone="good"] { border-color: color-mix(in oklab, var(--good) 30%, transparent); background: var(--good-soft); color: var(--good-ink); }
.maintenance-workspace .maint-result[data-tone="bad"] { border-color: color-mix(in oklab, var(--bad) 30%, transparent); background: var(--bad-soft); color: var(--bad-ink); }
.maintenance-workspace .maint-result ul { margin-top: 8px; display: grid; gap: 4px; }

/* The four pages of the workspace: the strip of tabs of the console (a line of the brand colour under the one shown). On
   its line, at the end, with several instances: whether the lists are of the instance chosen in the top bar (its name) or
   of all of them. */
.maintenance-workspace .maint-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; box-shadow: inset 0 -1px 0 var(--line); }
.maintenance-workspace .maint-bar > .maint-tabs { flex: 1 1 auto; min-width: 0; box-shadow: none; }
.maintenance-workspace .maint-scope { flex: none; margin-bottom: 5px; }
.maintenance-workspace .maint-scope button { display: block; max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
.maintenance-workspace .maint-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); }
.maintenance-workspace .maint-tabs::-webkit-scrollbar { display: none; }
.maintenance-workspace .maint-tabs button { flex: none; min-height: 42px; padding: 0 14px; border: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; transition: color 150ms var(--ease), box-shadow 150ms var(--ease); }
.maintenance-workspace .maint-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.maintenance-workspace .maint-tabs button:focus-visible { outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .maintenance-workspace .maint-tabs button[aria-selected="false"]:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--line-2); }
}

/* The filters of a list are the console's toolbar: the chips of the pool with their counts, selects as wide as their
   words, the search, and for the log a button that reads it again. A chip that counts what needs a person has its count
   in red. */
.maintenance-workspace .chip[data-tone="bad"] .n { color: var(--bad-ink); font-weight: 600; }
.maintenance-workspace .toolbar select { width: auto; min-width: 132px; }
.maintenance-workspace .maint-filters .search { flex: 0 1 280px; width: auto; }
/* In the pool the instance and the search give way to the chips before they go under them. */
.maintenance-workspace .tools-end { flex: 1 1 300px; justify-content: flex-end; }
.maintenance-workspace .tools-end .search { flex: 0 1 260px; width: auto; min-width: 0; }
.maintenance-workspace .maint-refresh { width: 40px; height: 40px; margin-left: auto; }
.maintenance-workspace .maint-refresh .icon { width: 18px; height: 18px; }
/* The bar of what is ticked, and of the account a log is limited to (the brand's soft colour: a selection). */
.maintenance-workspace .maint-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 10px 16px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.maintenance-workspace .maint-selection > .maint-actions { margin-left: auto; }

/* The card a list sits in, as on the other pages. In a table the head is a grey band and the rows are divided by lines;
   the first line of every cell is as tall as a badge, so that words, badges and links stand on one line. The head is
   not shown over an empty list. */
.maintenance-workspace .maint-list { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--shadow-card); overflow: clip; }
@supports not (overflow: clip) {
  .maintenance-workspace .maint-list { overflow: hidden; }
}
.maintenance-workspace .maint-list:has(tbody:empty) .maint-table-wrap { display: none; }
.maintenance-workspace .maint-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 14px; line-height: 24px; }
.maintenance-workspace .maint-table th { background: var(--bg-2); color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.maintenance-workspace .maint-table .maint-actions { gap: 6px; }
.maintenance-workspace .maint-table .text-btn { height: 24px; }
.maintenance-workspace .maint-select-cell input { display: block; width: 16px; height: 16px; margin: 4px 0; cursor: pointer; }
/* The address, and after it in grey the original id. */
.maintenance-workspace .maint-account-cell { overflow-wrap: break-word; }
.maintenance-workspace .maint-account-cell > b { color: var(--ink); font-weight: 600; }
.maintenance-workspace .maint-account-cell > .muted { margin-left: 8px; font-size: 13px; white-space: nowrap; }
.maintenance-workspace .maint-stamp { color: var(--muted); white-space: nowrap; }

/* A row of the pool: one line for an account that is sound. It opens the drawer of its account, so it takes the pointer
   and lights up under it, as the rows of the pool page do; a row that is ticked keeps the brand's soft colour. */
.maintenance-workspace .maint-pool-table tbody tr { cursor: pointer; transition: background-color 120ms var(--ease); }
.maintenance-workspace .maint-pool-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--bg-2); }
@media (hover: hover) and (pointer: fine) {
  .maintenance-workspace .maint-pool-table tbody tr:hover { background: var(--bg-2); }
  .maintenance-workspace .maint-pool-table tbody tr:hover .maint-row-go { color: var(--accent); transform: translateX(2px); }
}
.maintenance-workspace .maint-pool-table tbody tr:has(.maint-select-cell input:checked) { background: var(--accent-soft); }
.maintenance-workspace .maint-select-cell { cursor: default; }
/* A test has its column only while it is in use (the script says so on the table). */
.maintenance-workspace .maint-pool-table[data-connection="off"] [data-col="connection"],
.maintenance-workspace .maint-pool-table[data-candy="off"] [data-col="candy"] { display: none; }
/* The authorization: its badge (with 调度已关闭 beside it when the instance has the account's scheduling closed), and
   under it, only for what is not the plain case, the few words the badge does not say, on two lines at most (the whole
   of it is in the drawer). */
.maintenance-workspace .maint-state { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.maintenance-workspace .maint-state-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.maintenance-workspace .maint-state > small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
/* The priority: the value in the code face (original → current once they differ), and a badge only once it has left its
   plain state. */
.maintenance-workspace .maint-priority { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.maintenance-workspace .maint-priority-values { color: var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
/* One of the two tests: a dot and a word. Green is the dot alone; a test that did not pass takes its colour in the word
   too, so that the exceptions are what stands out of a column. */
.maintenance-workspace .maint-test { display: block; max-width: 100%; overflow: hidden; color: var(--ink-2); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-workspace .maint-test::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--faint); vertical-align: 1px; }
.maintenance-workspace .maint-test[data-tone="good"]::before { background: var(--good); }
.maintenance-workspace .maint-test[data-tone="warn"] { color: var(--warn-ink); }
.maintenance-workspace .maint-test[data-tone="warn"]::before { background: var(--warn); }
.maintenance-workspace .maint-test[data-tone="bad"] { color: var(--bad-ink); }
.maintenance-workspace .maint-test[data-tone="bad"]::before { background: var(--bad); }
/* The end of a row: the one thing to do about the account when there is one, as a small button, and the arrow that says
   the row opens. A button for what cannot be done right now is dimmed and says why when it is pressed. */
.maintenance-workspace .maint-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.maintenance-workspace .maint-row-actions .btn { height: 30px; padding: 0 10px; font-size: 13.5px; }
.maintenance-workspace .maint-row-go { width: 16px; height: 16px; color: var(--faint); transition: transform 150ms var(--ease), color 150ms var(--ease); }
.maintenance-workspace .btn[aria-disabled="true"] { opacity: .55; }

/* The drawer of an account (the sheet of the pool page's drawer, panel.css): the badge of its row with the sentence
   behind it and what can be done, then a block for each thing that is watched, as labels and values. */
.maintenance-workspace .maint-drawer .dr-body { gap: 26px; }
.maintenance-workspace .maint-dr-top { display: grid; gap: 14px; }
.maintenance-workspace .maint-dr-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.maintenance-workspace .maint-dr-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.maintenance-workspace .maint-dr-links:empty { display: none; }
.maintenance-workspace .maint-dr-sec { display: grid; gap: 10px; min-width: 0; }
.maintenance-workspace .maint-dr-sec h3 { font-size: 15px; font-weight: 600; }
.maintenance-workspace .maint-dr-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.maintenance-workspace .maint-dr-sec-head .text-btn { height: 24px; font-size: 13.5px; }
.maintenance-workspace .maint-dr-sec .kv > div { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 9px 0; }
.maintenance-workspace .maint-dr-sec .kv > div:first-child { padding-top: 0; }
.maintenance-workspace .maint-dr-note { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* What opens in place: the summary of a <details> (the rules of a policy, how to import) reads as a link with a small
   arrow that turns once it is open. A count beside it is grey. */
.maintenance-workspace .maint-more > summary { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--accent-ink); font-size: 13.5px; font-weight: 500; line-height: 1.7; list-style: none; cursor: pointer; }
.maintenance-workspace .maint-more > summary::-webkit-details-marker { display: none; }
.maintenance-workspace .maint-more > summary::after { content: ""; flex: none; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 150ms var(--ease); }
.maintenance-workspace .maint-more[open] > summary::after { transform: translateY(1px) rotate(225deg); }
.maintenance-workspace .maint-more > :not(summary) { display: block; margin-top: 6px; }
.maintenance-workspace .maint-more > form { display: grid; margin-top: 10px; }
.maintenance-workspace .maint-more p { font-size: 13.5px; line-height: 1.7; }
.maintenance-workspace .maint-count { margin-left: 4px; color: var(--muted); font-weight: 400; }
.maintenance-workspace .maint-count:empty { display: none; }

/* A line of the log: when, what (a badge after it only for a warning or an error), whose, and what it said. */
.maintenance-workspace .maint-log-message .text-btn { display: inline; height: auto; margin-left: 10px; font-size: 13px; background-position: 0 100%; }
.maintenance-workspace .maint-log-event { color: var(--ink); white-space: nowrap; }
.maintenance-workspace .maint-log-event > .pill { margin-left: 8px; vertical-align: top; }
.maintenance-workspace .maint-log-message { color: var(--ink-2); overflow-wrap: anywhere; }

/* The repair jobs: one row each, the account and what the job said on the left, its state and buttons on the right. */
.maintenance-workspace .maint-job { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.maintenance-workspace .maint-job:first-child { border-top: 0; }
.maintenance-workspace .maint-job-detail { flex: 1 1 260px; display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.maintenance-workspace .maint-job-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.maintenance-workspace .maint-job-head small { color: var(--muted); font-size: 13px; }
.maintenance-workspace .maint-job-detail > span { color: var(--ink-2); font-size: 14px; }

/* An empty list says why, with the way out under it; the pager is on the page under the card. */
.maintenance-workspace .maint-empty { display: grid; justify-items: center; gap: 8px; padding: 48px 16px; color: var(--muted); font-size: 14px; text-align: center; }
.maintenance-workspace .maint-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.maintenance-workspace .maint-pagination > .maint-actions { margin-left: auto; }
.maintenance-workspace .maint-pagination > .muted { font-size: 14px; }
.maintenance-workspace .maint-page-size { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.maintenance-workspace .maint-page-size select { width: 76px; height: 34px; }

/* What needs a person: a card for each account, as many to a row as fit, on a panel of the colour of what is wrong (the
   panels of the overview's conditions). The badge and where the account is, whose it is, the sentence behind the
   badge on three lines at most, and at the foot the one thing to do about it; the whole card opens the account. */
.maintenance-workspace .maint-todo { display: grid; justify-items: start; gap: 10px; min-width: 0; }
.maintenance-workspace .maint-todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 14px; width: 100%; }
.maintenance-workspace .maint-todo-card {
  --tone: var(--warn); --tone-soft: var(--warn-soft);
  display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px;
  border: 1px solid color-mix(in oklab, var(--tone) 36%, var(--line)); border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--tone-soft) 55%, var(--bg)); box-shadow: var(--shadow-card);
  cursor: pointer; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.maintenance-workspace .maint-todo-card[data-tone="bad"] { --tone: var(--bad); --tone-soft: var(--bad-soft); }
.maintenance-workspace .maint-todo-card:not([data-tone]) { --tone: var(--line-2); --tone-soft: var(--bg-2); }
.maintenance-workspace .maint-todo-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .maintenance-workspace .maint-todo-card:hover { border-color: color-mix(in oklab, var(--tone) 70%, var(--line)); box-shadow: var(--shadow-pop); }
  .maintenance-workspace .maint-todo-card:hover .maint-todo-open { color: var(--accent-ink); }
}
.maintenance-workspace .maint-todo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; font-size: 13px; white-space: nowrap; }
.maintenance-workspace .maint-todo-who { min-width: 0; overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-workspace .maint-todo-card > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; color: var(--ink-2); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.maintenance-workspace .maint-todo-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.maintenance-workspace .maint-todo-open { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; color: var(--muted); font-size: 13.5px; font-weight: 500; transition: color 150ms var(--ease); }
.maintenance-workspace .maint-todo-open .icon { width: 16px; height: 16px; }

/* Importing accounts: a dialog a little wider than the others, for a text area of lines in the code face. */
.maintenance-workspace .maint-import { width: min(560px, calc(100% - 32px)); }
.maintenance-workspace .maint-import textarea, .maintenance-workspace .maint-form textarea { min-height: 148px; padding: 12px; resize: vertical; font: 13px/1.7 var(--mono); }
.maintenance-workspace .maint-import .field > :is(input, select, textarea) { width: 100%; }

/* What is set once, in a sheet (the drawer's): how readily accounts are avoided, with what the level in use does in a
   line; then a block for each policy, divided by lines (its switch, one line only when there is something the switch
   does not say, its rules behind a toggle); and the connections, folded away, whose title is the toggle. */
.maintenance-workspace .maint-settings .dr-body { gap: 0; padding-top: 8px; }
.maintenance-workspace .maint-level { display: grid; gap: 8px; padding-block: 16px; }
.maintenance-workspace .maint-level-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.maintenance-workspace .maint-level > p { font-size: 13.5px; line-height: 1.6; }
.maintenance-workspace .maint-level > p:empty { display: none; }
.maintenance-workspace .maint-form { display: grid; gap: 16px; }
.maintenance-workspace .maint-form .field { min-width: 0; }
.maintenance-workspace .maint-form .field > input, .maintenance-workspace .maint-form .field > select, .maintenance-workspace .maint-form .field > textarea { width: 100%; }
.maintenance-workspace .maint-policy { display: grid; gap: 4px; min-width: 0; padding-block: 16px; border-top: 1px solid var(--line); }
.maintenance-workspace .maint-priority-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; min-height: 28px; }
.maintenance-workspace .maint-priority-status { color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.maintenance-workspace .maint-priority-status:empty { display: none; }
.maintenance-workspace .maint-fold { border-top: 1px solid var(--line); }
.maintenance-workspace .maint-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; list-style: none; cursor: pointer; }
.maintenance-workspace .maint-fold > summary::-webkit-details-marker { display: none; }
.maintenance-workspace .maint-fold > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform 150ms var(--ease); }
.maintenance-workspace .maint-fold[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.maintenance-workspace .maint-fold > summary:focus-visible { outline-offset: 2px; }
.maintenance-workspace .maint-fold > .maint-form { padding-bottom: 8px; }

@media (min-width: 900px) {
  /* The log as a table. Each column is as wide as what it says on one line, between the least that is legible and what
     its rows need; were it still wider than its card, it would scroll inside it. */
  .maintenance-workspace .maint-list:has(.maint-log-table) .maint-table-wrap { overflow-x: auto; }
  .maintenance-workspace .maint-log-table th { height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); }
  .maintenance-workspace .maint-log-table td { padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
  .maintenance-workspace .maint-log-table tbody tr:last-child td { border-bottom: 0; }
  .maintenance-workspace .maint-log-table :is(th, td):first-child { padding-left: 18px; }
  .maintenance-workspace .maint-log-table :is(th, td):last-child { padding-right: 18px; }
  .maintenance-workspace .maint-log-table .maint-stamp { width: 1%; }
  .maintenance-workspace .maint-log-message { min-width: 240px; }
}
@media (min-width: 1100px) {
  /* The pool as a table of fixed columns: the address and the authorization share what the others leave, so a long
     address or sentence is cut short and never pushes the page wider. Its head sticks under the top bar. */
  .maintenance-workspace .maint-pool-table { table-layout: fixed; }
  .maintenance-workspace .maint-pool-table th { position: sticky; top: var(--bar-h); z-index: 2; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); }
  .maintenance-workspace .maint-pool-table td { height: 54px; padding: 10px 14px; vertical-align: middle; border-bottom: 1px solid var(--line); }
  .maintenance-workspace .maint-pool-table tbody tr:last-child td { border-bottom: 0; }
  .maintenance-workspace .maint-pool-table :is(th, td):first-child { padding-left: 18px; }
  .maintenance-workspace .maint-pool-table :is(th, td):last-child { padding-right: 16px; }
  .maintenance-workspace .maint-pool-table :is(th, td).maint-select-cell { width: 46px; padding-right: 2px; }
  .maintenance-workspace th.maint-select-cell input { margin: 0; }
  .maintenance-workspace .maint-pool-table th:nth-child(2) { width: 29%; }
  .maintenance-workspace .maint-pool-table th:nth-child(4) { width: 152px; }   /* room for "1 → 2" and its badge on one line */
  .maintenance-workspace .maint-pool-table th[data-col="connection"] { width: 136px; }
  .maintenance-workspace .maint-pool-table th[data-col="candy"] { width: 150px; }
  .maintenance-workspace .maint-pool-table th.maint-act-cell { width: 152px; }
  /* The address on one line with its id, cut short where its column ends (the whole of it heads the drawer). */
  .maintenance-workspace .maint-pool-table .maint-account-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@supports not (overflow: clip) {
  .maintenance-workspace .maint-pool-table th { position: static; }
}
@media (max-width: 719px) {
  /* The verdict on a phone: the sentence beside its icon, the two buttons side by side under them, then the switch and
     the way to the settings on a line. What needs a person is one card to a line. */
  .maintenance-workspace .maint-verdict { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 18px 18px 16px; }
  .maintenance-workspace .maint-verdict .hero-body { display: contents; }
  .maintenance-workspace .maint-verdict .hero-ic { grid-row: 1 / span 2; align-self: start; }
  .maintenance-workspace .maint-verdict h1 { font-size: 21px; }
  .maintenance-workspace .maint-verdict :is(.hero-text, .hero-actions, .maint-controls) { grid-column: 1 / -1; }
  .maintenance-workspace .maint-verdict .hero-actions { display: flex; flex-wrap: wrap; margin-top: 12px; }
  .maintenance-workspace .maint-verdict .hero-actions .btn { flex: 1 1 0; width: auto; }
  .maintenance-workspace .maint-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid color-mix(in oklab, var(--tone) 22%, var(--line)); }
  .maintenance-workspace .maint-todo-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  /* The tabs run edge to edge with their line under them; the choice of instances has the next line. */
  .maintenance-workspace .maint-bar { box-shadow: none; }
  .maintenance-workspace .maint-bar > .maint-tabs { flex-basis: 100%; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); box-shadow: inset 0 -1px 0 var(--line); }
  .maintenance-workspace .maint-scope { margin: 4px 0 0; }
  .maintenance-workspace .maint-tabs button { padding-inline: 12px; }
  /* The filters: the select has a line, the search the next one (with the button that reads the log again). In the
     pool the search has the whole line. */
  .maintenance-workspace .toolbar select { min-width: 0; }
  .maintenance-workspace .maint-filters > select { flex: 1 1 40%; }
  .maintenance-workspace .maint-filters > .search { flex: 1 1 calc(100% - 60px); }   /* less the 44px button and the gap */
  .maintenance-workspace .tools-end > .search { grid-column: 1 / -1; }
  .maintenance-workspace .tools-end { flex: 1 1 100%; }
  .maintenance-workspace .maint-selection > .maint-actions { margin-left: 0; }
  .maintenance-workspace .maint-pagination > .maint-actions { width: 100%; justify-content: flex-end; }
  .maintenance-workspace .maint-job { padding: 14px 16px; }
}
@media (max-width: 1099px) {
  /* A row of the pool is a card: its box, its address and what to do about it on the first line; under the address its
     badge with what it does not say, and after it, on the same line while they fit, the priority and the tests, each
     after its name. Of the head only the box that ticks the whole page is left, with its words. */
  .maintenance-workspace .maint-pool-table, .maintenance-workspace .maint-pool-table :is(thead, tbody, tr, th, td) { display: block; }
  .maintenance-workspace .maint-pool-table thead th:not(.maint-select-cell) { display: none; }
  .maintenance-workspace .maint-pool-table thead th.maint-select-cell { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); }
  .maintenance-workspace .maint-pool-table thead th.maint-select-cell::after { content: "全选本页"; }
  .maintenance-workspace th.maint-select-cell input { margin: 0; }
  /* (The box stands in the margin of the card, so that every line of it starts under the address.) */
  .maintenance-workspace .maint-pool-table tbody tr { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 12px 16px 12px 44px; border-bottom: 1px solid var(--line); }
  .maintenance-workspace .maint-pool-table tbody tr:last-child { border-bottom: 0; }
  .maintenance-workspace .maint-pool-table tbody td.maint-select-cell { position: absolute; top: 12px; left: 16px; width: 16px; }
  .maintenance-workspace .maint-pool-table tbody td.maint-account-cell { flex: 1 1 0; order: 1; min-width: 0; overflow-wrap: anywhere; }
  .maintenance-workspace .maint-pool-table tbody td.maint-act-cell { flex: none; order: 2; }
  /* (The first line ends after the address and its button: what follows starts a line of its own.) */
  .maintenance-workspace .maint-pool-table tbody tr::before { content: ""; flex-basis: 100%; order: 3; height: 0; }
  .maintenance-workspace .maint-pool-table tbody td.maint-state-cell { flex: 0 1 auto; order: 4; min-width: 0; }
  .maintenance-workspace .maint-pool-table tbody td:is(.maint-priority-cell, .maint-test-cell) { display: flex; flex: none; order: 5; align-items: center; gap: 8px; min-width: 0; }
  .maintenance-workspace .maint-pool-table tbody td[data-label]::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 13px; }
  /* (A card says only what there is to say: a priority not read yet and a test that never ran are left out. In the table
     they are a dash, which keeps the columns.) */
  .maintenance-workspace .maint-pool-table tbody td:is(.maint-priority-cell, .maint-test-cell):has(> .na) { display: none; }
  .maintenance-workspace .maint-state { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 10px; }
  .maintenance-workspace .maint-state > small { -webkit-line-clamp: 3; line-clamp: 3; }
}
@media (max-width: 719px) {
  /* On a phone the sentence has the line under the badge, and the address the whole first line beside the arrow: what
     there is to do about the account is the last line of its card. */
  .maintenance-workspace .maint-state { grid-template-columns: minmax(0, 1fr); }
  .maintenance-workspace .maint-pool-table tbody td.maint-state-cell { flex: 1 1 100%; }
  .maintenance-workspace .maint-pool-table tbody td.maint-act-cell, .maintenance-workspace .maint-pool-table .maint-row-actions { display: contents; }
  .maintenance-workspace .maint-pool-table .maint-row-go { order: 2; }
  .maintenance-workspace .maint-pool-table tbody tr:has(.maint-row-actions .btn)::after { content: ""; flex-basis: 100%; order: 6; height: 0; }
  .maintenance-workspace .maint-pool-table .maint-row-actions .btn { order: 7; }
}
@media (max-width: 899px) {
  /* A line of the log is a card: the time and the event, then whose, then what it said. */
  .maintenance-workspace .maint-log-table, .maintenance-workspace .maint-log-table :is(thead, tbody, tr, th, td) { display: block; }
  .maintenance-workspace .maint-log-table thead { display: none; }
  .maintenance-workspace .maint-log-table tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .maintenance-workspace .maint-log-table tbody tr:last-child { border-bottom: 0; }
  .maintenance-workspace .maint-log-table tbody td:nth-child(n+3) { grid-column: 1 / -1; }
  .maintenance-workspace .maint-log-event { white-space: normal; }
}
@media (pointer: coarse) {
  .maintenance-workspace .maint-more > summary { min-height: 44px; }
  .maintenance-workspace .maint-tabs button { min-height: 44px; }
  .maintenance-workspace .maint-page-size select { height: 44px; }
  .maintenance-workspace .maint-table .text-btn { height: 32px; }
  .maintenance-workspace .maint-log-message .text-btn { height: auto; }
  /* The button of a row keeps its size and gets a 44px target. */
  .maintenance-workspace .maint-row-actions .btn { position: relative; min-height: 0; }
  .maintenance-workspace .maint-row-actions .btn::after { content: ""; position: absolute; inset: -7px -4px; }
}
@media (forced-colors: active) {
  /* The switches go back to boxes: their knob is a gradient, which forced colours take away. */
  .maintenance-workspace :is(.maint-controls, .maint-priority-head) .maint-check input { -webkit-appearance: auto; appearance: auto; width: 18px; height: 18px; border: 0; background: none; }
  .maintenance-workspace .maint-tabs button[aria-selected="true"] { forced-color-adjust: none; color: Highlight; box-shadow: inset 0 -2px 0 Highlight; }
}

/* ---- Batches: an import is one. ---- */
/* The bar of the batch the pool is narrowed to: which batch (its name is changed in place), how many accounts, and at
   the end what can be done with it. */
.maintenance-workspace .maint-lot-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 52px; padding: 8px 12px 8px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); }
.maintenance-workspace .maint-lot-bar > b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.maintenance-workspace .maint-lot-bar > .muted { font-size: 13.5px; }
.maintenance-workspace .maint-lot-bar > .maint-actions { margin-left: auto; }
.maintenance-workspace .maint-lot-tag { padding: 1px 9px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12.5px; line-height: 20px; white-space: nowrap; }
.maintenance-workspace .maint-lot-rename { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.maintenance-workspace .maint-lot-rename input { width: min(260px, 56vw); height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
.maintenance-workspace .maint-lot-rename input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* The list of the batches: a row opens the pool on its batch, so it takes the pointer and lights up as a row of the
   pool does. */
.maintenance-workspace .maint-lot-table th { height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.maintenance-workspace .maint-lot-table td { height: 54px; padding: 10px 14px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.maintenance-workspace .maint-lot-table tbody tr:last-child td { border-bottom: 0; }
.maintenance-workspace .maint-lot-table :is(th, td):first-child { padding-left: 18px; }
.maintenance-workspace .maint-lot-table :is(th, td):last-child { width: 44px; padding-right: 16px; text-align: right; }
.maintenance-workspace .maint-lot-table tbody tr { cursor: pointer; transition: background-color 120ms var(--ease); }
.maintenance-workspace .maint-lot-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--bg-2); }
@media (hover: hover) and (pointer: fine) {
  .maintenance-workspace .maint-lot-table tbody tr:hover { background: var(--bg-2); }
  .maintenance-workspace .maint-lot-table tbody tr:hover .maint-row-go { color: var(--accent); transform: translateX(2px); }
}
.maintenance-workspace .maint-lot-name > b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.maintenance-workspace .maint-lot-name > .muted { margin-left: 8px; font-size: 13px; white-space: nowrap; }
/* The accounts of a batch at a glance: a dot each in the colour of where the account stands (sound green, needing a
   person red, under repair amber, waiting pale amber, not checked yet a ring, paused grey), then how many there are.
   A batch too large for dots is a bar of the shares instead. */
.maintenance-workspace .maint-lot-picture { display: flex; align-items: center; gap: 10px; }
.maintenance-workspace .maint-lot-size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.maintenance-workspace .maint-lot-dots { display: flex; flex-wrap: wrap; gap: 4px; max-width: 280px; }
.maintenance-workspace .maint-lot-dots i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.maintenance-workspace .maint-lot-meter { display: flex; gap: 2px; width: 168px; height: 8px; border-radius: 999px; overflow: hidden; }
.maintenance-workspace .maint-lot-meter i { flex: 1 0 0; min-width: 3px; background: var(--faint); }
.maintenance-workspace :is(.maint-lot-dots, .maint-lot-meter) i[data-s="healthy"] { background: var(--good); }
.maintenance-workspace :is(.maint-lot-dots, .maint-lot-meter) i[data-s="attention"] { background: var(--bad); }
.maintenance-workspace :is(.maint-lot-dots, .maint-lot-meter) i[data-s="repairing"] { background: var(--warn); }
.maintenance-workspace :is(.maint-lot-dots, .maint-lot-meter) i[data-s="waiting"] { background: color-mix(in oklab, var(--warn) 40%, var(--bg)); }
.maintenance-workspace .maint-lot-dots i[data-s="waiting"] { box-shadow: inset 0 0 0 1.5px var(--warn); }
.maintenance-workspace .maint-lot-dots i[data-s="pending"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.maintenance-workspace .maint-lot-meter i[data-s="pending"] { background: var(--line); }
.maintenance-workspace :is(.maint-lot-dots, .maint-lot-meter) i[data-s="paused"] { background: var(--line-2); }
/* In words only what is not sound: how many need a person (in red), are under repair, wait, are paused. */
.maintenance-workspace .maint-lot-state { white-space: nowrap; }
.maintenance-workspace .maint-lot-word { color: var(--ink-2); font-size: 13.5px; }
.maintenance-workspace .maint-lot-word + .maint-lot-word::before { content: " · "; color: var(--faint); font-weight: 400; }
.maintenance-workspace .maint-lot-word[data-tone="bad"] { color: var(--bad-ink); font-weight: 600; }
.maintenance-workspace .maint-lot-word[data-tone="warn"] { color: var(--warn-ink); }
.maintenance-workspace .maint-lot-word:is([data-tone="mute"], [data-tone="good"]) { color: var(--muted); }
.maintenance-workspace .maint-lot-more { justify-self: center; }
@media (max-width: 719px) {
  /* A phone: the time of the import is left to the name (and the bar of the pool), the words may wrap. */
  .maintenance-workspace .maint-lot-table :is(th, td):nth-child(4) { display: none; }
  .maintenance-workspace .maint-lot-table :is(th, td) { padding-left: 10px; padding-right: 10px; }
  .maintenance-workspace .maint-lot-table :is(th, td):first-child { padding-left: 14px; }
  .maintenance-workspace .maint-lot-dots { max-width: 130px; }
  .maintenance-workspace .maint-lot-picture { flex-wrap: wrap; gap: 4px 8px; }
  .maintenance-workspace .maint-lot-state { white-space: normal; }
  .maintenance-workspace .maint-lot-bar > .maint-actions { margin-left: 0; }
}

/* The candy tests' second choice: closing the scheduling of an account that keeps answering wrong. */
.maintenance-workspace .maint-candy-close { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.maintenance-workspace .maint-candy-close input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
