/* Phase 2a's small settings (GitHub issue 204; docs/adr/0089): putting a list in order, who may add new tags, what
   happens to the tickets of someone out of office, the knowledge base's reviews and switches, reply placeholders, and
   the Scheduler's time-off types and overtime. Sizes are the tokens' (tokens.css); colors the page's own, so light and
   dark follow them. Loaded after the other settings sheets. */

/* ------------------------------------------------------------------------- Move up, move down */
/* Two small square buttons at a row's start: a row is moved with them, or with Alt+Up and Alt+Down on the row. They
   keep the controls' size so a finger finds them on a phone. */
.list-move, #settingsView .list-move { display:inline-flex; flex:none; gap:var(--space-25); margin-right:var(--space-75); vertical-align:middle; }
.list-move-button { display:inline-grid; place-items:center; width:var(--control-height-sm); height:var(--control-height-sm); padding:0; border:var(--control-border-width) solid var(--line); border-radius:var(--radius-sm); background:var(--surface); color:var(--ink-2); font-size:var(--text-sm); line-height:1; cursor:pointer; }
.list-move-button:hover:not(:disabled), .list-move-button:focus-visible { border-color:var(--spruce); color:var(--spruce-dark); }
.list-move-button:disabled { opacity:.35; cursor:default; }
/* In the service domains' narrow columns the two stand one above the other, so the row keeps its Edit and Delete. */
/* The columns are narrow at 1280: a row's Edit and Delete go under its name when they don't fit beside it (the row was
   already a little wider than its card there), instead of past the card's edge. */
#serviceDomainSettingsPanel .service-domain-row[data-list-row] { flex-wrap:wrap; align-items:center; row-gap:var(--space-50); min-width:0; max-width:100%; box-sizing:border-box; }
#serviceDomainSettingsPanel .service-domain-row[data-list-row] > .service-domain-select, #serviceDomainSettingsPanel .service-domain-row[data-list-row] > .request-type-select, #serviceDomainSettingsPanel .service-domain-row[data-list-row] > span:not(.list-move):not(.sd-chevron) { flex:1 1 6rem; }
#serviceDomainSettingsPanel .service-domain-row[data-list-row] > .service-domain-edit, #serviceDomainSettingsPanel .service-domain-row[data-list-row] > .request-type-edit { margin-left:auto; }
#serviceDomainSettingsPanel .service-domain-row[data-list-row] > .list-move { order:-1; flex-direction:column; gap:var(--space-25); margin-right:var(--space-50); }
#serviceDomainSettingsPanel .service-domain-row[data-list-row] .list-move-button { width:1.75rem; height:1.25rem; font-size:var(--text-xs); }
#settingsView #customStatesSettingsPanel .custom-state-row > .custom-state-name { display:flex; flex-wrap:nowrap; justify-content:flex-start; align-items:center; text-align:left; min-width:0; }
@media (max-width:640px) {
  .list-move-button { width:var(--control-height); height:var(--control-height); }
}

/* ------------------------------------------------------------------------- Choices with a line under each */
.tag-creators-card, .away-rule-choices, .tag-creators-card [role="radiogroup"] { display:grid; gap:var(--space-100); }
.away-rule-choices { margin:0 0 var(--space-150); padding:0; border:0; }
.away-rule-choices legend, .tag-creators-card h3 { margin-bottom:var(--space-75); font-weight:var(--weight-semibold); }
.sla-matrix-card .sla-hand-set { margin-top:var(--space-250); }
.tag-creators-choice, .away-rule-choice { display:flex; align-items:flex-start; gap:var(--space-100); padding:var(--space-75) var(--space-100); border:var(--control-border-width) solid var(--line); border-radius:var(--radius-md); background:var(--surface); cursor:pointer; }
.tag-creators-choice:has(input:checked), .away-rule-choice:has(input:checked) { border-color:var(--spruce); background:var(--spruce-pale); }
.tag-creators-choice input, .away-rule-choice input { flex:none; margin-top:var(--space-25); }
.tag-creators-choice span, .away-rule-choice span { display:grid; gap:var(--space-25); min-width:0; }
.tag-creators-choice small, .away-rule-choice small { color:var(--ink-2); font-size:var(--text-sm); }
.tag-creators-roles { display:flex; flex-wrap:wrap; gap:var(--space-75) var(--space-200); margin:0; padding:var(--space-100); border:var(--control-border-width) solid var(--line); border-radius:var(--radius-md); }
.tag-creators-roles legend { padding:0 var(--space-50); font-size:var(--text-sm); color:var(--ink-2); }
.tag-creators-card { margin-bottom:var(--space-200); }

/* ------------------------------------------------------------------------- Knowledge base: reviews */
.kb-review-choice { display:grid; gap:var(--space-75); margin:var(--space-75) 0; }
/* Each choice one line (it wraps on a phone): the circle, the words, and for the first the number and its unit. */
#settingsView .kb-review-choice label.kb-settings-field { display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:var(--space-75); font-weight:var(--weight-medium); }
#settingsView .kb-review-choice input[type="radio"] { flex:none; width:auto; margin:0; }
#settingsView .kb-review-every { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); }
/* Its number is as wide as its numbers, like every number field in Admin settings (settings-frame.css). */
#settingsView .kb-review-every input[type="number"] { flex:none; }
#settingsView .kb-review-every select, #settingsView .kb-settings-card .kb-review-every .custom-select-wrapper { flex:none; width:auto; min-width:8.5rem; max-width:12rem; }
.kb-settings-card .ai-switch { margin-top:var(--space-100); }
/* The public help center, categories and article templates (GitHub issue 204, Phase 2e, AQ10 and AQ11). */
.kb-settings-card + .kb-settings-card { margin-top:var(--space-200); }
.kb-help-center-address a { overflow-wrap:anywhere; }
.kb-category-list, .kb-category-merges, .kb-template-list { display:grid; gap:var(--space-75); margin:var(--space-100) 0; padding:0; list-style:none; }
.kb-category-row { display:grid; grid-template-columns:minmax(0, 1.2fr) minmax(0, 1fr) auto auto; align-items:center; gap:var(--space-75); }
.kb-category-row [data-spanish-box] { display:block; min-width:0; }
.kb-category-row input { width:100%; }
.kb-category-count { color:var(--ink-2); font-size:var(--text-xs); white-space:nowrap; }
.kb-category-actions { display:flex; align-items:center; gap:var(--space-50); }
.kb-category-merge { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); font-size:var(--text-sm); }
.kb-category-merge select { width:auto; min-width:10rem; }
.kb-template-row { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--space-50) var(--space-150); padding:var(--space-75) 0; border-bottom:var(--control-border-width) solid var(--line); }
.kb-template-row small { color:var(--ink-2); font-size:var(--text-xs); }
.kb-template-row span { margin-left:auto; display:flex; gap:var(--space-100); }
.kb-template-edit { display:grid; gap:var(--space-75); padding:var(--space-150); border:var(--control-border-width) solid var(--line); border-radius:var(--radius-md); }
.kb-template-edit .outline-button { justify-self:start; }
@media (max-width:640px) {
  .kb-category-row { grid-template-columns:minmax(0, 1fr) auto; }
  .kb-category-row [data-spanish-box] { grid-column:1 / -1; grid-row:2; }
  .kb-category-actions { grid-column:1 / -1; }
}

/* ------------------------------------------------------------------------- Reply placeholders */
.reply-placeholder-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap:var(--space-50) var(--space-200); margin:var(--space-75) 0; padding:0; list-style:none; font-size:var(--text-sm); }
.reply-placeholder-list code { margin-right:var(--space-50); }
.reply-placeholder-help { margin:var(--space-75) 0; }
.reply-placeholder-help summary { cursor:pointer; color:var(--spruce-dark); font-weight:var(--weight-semibold); }

/* ------------------------------------------------------------------------- Scheduler: time-off types, overtime */
.scheduler-type-list .is-retired input[type="text"] { color:var(--ink-2); text-decoration:line-through; }
.scheduler-type-state { flex:none; color:var(--ink-2); font-size:var(--text-sm); }
.sch-chip-overtime { display:inline-flex; align-items:center; justify-content:center; height:16px; padding:0 var(--space-50); border-radius:var(--radius-lg); background:var(--saffron-pale); color:var(--warn-ink); font-size:var(--text-2xs); font-style:normal; font-weight:var(--weight-bold); }
.sch-overtime { margin:var(--space-100) 0; padding:var(--space-100); border:var(--control-border-width) solid var(--line); border-left:3px solid var(--warn-ink); border-radius:var(--radius-md); background:var(--surface); }
.sch-overtime p { margin:0; }
.sch-overtime-actions { display:flex; flex-wrap:wrap; gap:var(--space-75); margin-top:var(--space-100); }

/* Phase 2b, replies and ticket flow (GitHub issue 204; docs/adr/0090): Merging & child tickets, the macro editor, the
   macros' cards and the macro picker. */
.merge-settings-card h3 { margin:var(--space-200) 0 var(--space-75); font-size:var(--text-md); }
.merge-settings-card h3:first-child { margin-top:0; }
#settingsView .merge-settings-card { padding-block:var(--space-250); }
#settingsView .merge-settings-card > .wf-hint { margin:var(--space-50) 0 var(--space-200); }
#settingsView .merge-settings-card > .wf-hint:last-child { margin-bottom:0; }
.merge-children-choice { border:0; padding:0; margin:0 0 var(--space-75); display:grid; gap:var(--space-50); }
/* What the ticket a duplicate goes into gets (GitHub issue 294, B10). */
.merge-carry-choice { border:0; padding:0; margin:0 0 var(--space-50); display:grid; gap:var(--space-50); }
.macro-editor .macro-set-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--space-75) var(--space-150); }
.macro-editor h3 { margin:var(--space-150) 0 var(--space-75); }
.macro-editor .macro-offered { border:var(--control-border-width) solid var(--line); border-radius:var(--radius-md); padding:var(--space-100) var(--space-150); margin:var(--space-150) 0 var(--space-100); }
.macro-editor .macro-offered legend { padding:0 var(--space-50); font-weight:600; }
.macro-editor .macro-offered > div { display:flex; flex-wrap:wrap; gap:var(--space-50) var(--space-150); align-items:center; margin-top:var(--space-75); }
.macro-editor .macro-offered > div > b { flex-basis:100%; }
.macro-editor .rule-row-edit { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) 26px; }
.macro-editor .macro-field-choices { border:0; padding:0; margin:0; min-width:0; display:flex; flex-wrap:wrap; gap:var(--space-50) var(--space-150); }
.macro-card .macro-summary { margin:var(--space-50) 0; }
.macro-card pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.macro-picker small { overflow-wrap:anywhere; }
@media (max-width: 600px) {
  .macro-editor .macro-set-grid { grid-template-columns:1fr; }
  .macro-editor .rule-row-edit { grid-template-columns:1fr 26px; }
  .macro-editor .rule-row-edit > :nth-child(2) { grid-column:1; }
  .macro-picker { left:var(--space-200) !important; right:var(--space-200); width:auto !important; max-width:none; }
}

/* Fields and levels (GitHub issue 204, 2b, build T2; docs/adr/0091): a multi-select custom field, a field's default,
   conditions on notification rules, impact and urgency levels, the ticket list's defaults and time tracking's
   activity types. Colors come from the tokens, so light and dark both follow. */

/* ---------- A multi-select custom field: a box for each choice, in a group named by the field ---------- */
.custom-field-multi fieldset { margin:0; padding:0; border:0; min-width:0; display:grid; gap:var(--space-75); }
.custom-field-multi legend { padding:0; margin-bottom:var(--space-75); color:var(--ink-2); font-size:var(--text-sm); font-weight:600; }
.custom-field-choices { display:flex; flex-wrap:wrap; gap:var(--space-75) var(--space-150); }
/* Each choice's box beside its words, whatever form it is on (the portal's forms set their labels out as columns). */
.custom-field-multi .custom-field-choices .custom-field-choice { display:inline-flex; flex-direction:row; align-items:center; gap:var(--space-75); width:auto; color:var(--ink); font-size:var(--text-md); font-weight:500; min-height:32px; }
.custom-field-multi .custom-field-choices .custom-field-choice input { flex:none; width:18px; height:18px; min-height:0; margin:0; padding:0; accent-color:var(--spruce); }
.custom-field-default { display:grid; gap:var(--space-75); }
.custom-field-default fieldset { display:grid; gap:var(--space-75); }
.custom-field-default-text { color:var(--muted); }

/* ---------- Notification rules: which tickets a rule is for ---------- */
.notification-conditions-field { display:grid; gap:var(--space-100); }
.notification-conditions-field > span { color:var(--ink-2); font-size:var(--text-sm); font-weight:600; }
.notification-conditions-field > span small { color:var(--muted); font-weight:400; }
.notification-conditions-field .rule-row-edit { display:grid; grid-template-columns:minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr) auto; gap:var(--space-100); align-items:center; }
@media (max-width: 600px) {
  .notification-conditions-field .rule-row-edit { grid-template-columns:minmax(0, 1fr) auto; }
  .notification-conditions-field .rule-row-edit > :nth-child(2), .notification-conditions-field .rule-row-edit > :nth-child(3) { grid-column:1; }
}

/* ---------- Time tracking: the limit per entry and the activity types, and where time is logged ---------- */
.time-tracking-card { display:grid; gap:var(--space-200); }
.time-limit-field { display:grid; gap:var(--space-75); max-width:22rem; color:var(--ink-2); font-size:var(--text-sm); font-weight:600; }
.time-activity-types { margin:0; padding:0; border:0; min-width:0; display:grid; gap:var(--space-100); }
.time-activity-types legend { padding:0; color:var(--ink); font-size:var(--text-md); font-weight:600; }
.time-activity-table input { width:100%; min-width:0; }
.time-activity-table td:nth-child(2) { width:12rem; }
.composer-activity { display:inline-flex; align-items:center; gap:var(--space-75); color:var(--muted); font-size:var(--text-md); white-space:nowrap; }
.composer-activity span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.composer-activity select { height:32px; max-width:12rem; }
.time-activity-field { display:grid; gap:var(--space-75); }
.composer-activity[hidden], .time-activity-field[hidden] { display:none; }
@media (max-width: 600px) {
  .time-activity-table td:nth-child(2) { width:auto; }
}

/* ---------- Impact and urgency levels, beside the priority matrix ---------- */
.sla-levels-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 36rem), 1fr)); gap:var(--space-200); }
.sla-levels h3 { margin:0 0 var(--space-100); font-size:var(--text-md); }
.sla-level-list { list-style:none; margin:0 0 var(--space-100); padding:0; display:grid; gap:var(--space-100); }
.sla-level-row { display:grid; grid-template-columns:auto minmax(0, 1fr) minmax(0, 1.6fr) auto; gap:var(--space-75) var(--space-100); align-items:end; padding:var(--space-100); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.sla-level-row label { display:grid; gap:var(--space-50); min-width:0; color:var(--ink-2); font-size:var(--text-sm); font-weight:600; }
.sla-level-row input { width:100%; min-width:0; }
.sla-level-use { grid-column:2 / 4; grid-row:2; color:var(--muted); font-size:var(--text-xs); }
.sla-level-row [data-level-remove] { grid-column:4; grid-row:1; }
@media (max-width: 600px) {
  .sla-level-row { grid-template-columns:minmax(0, 1fr); }
  .sla-level-use, .sla-level-row [data-level-remove] { grid-column:1; grid-row:auto; justify-self:start; }
}

/* ---------- Admin settings › Tickets › Ticket list: the view, columns and sort the list opens with ---------- */
.ticket-list-card { display:grid; gap:var(--space-150); }
.ticket-list-card h3, .ticket-list-role h4 { margin:0; }
.ticket-list-entry { display:grid; gap:var(--space-150); }
.ticket-list-entry > label, .ticket-list-entry .modal-two-col label { display:grid; gap:var(--space-50); color:var(--ink-2); font-size:var(--text-sm); font-weight:600; max-width:32rem; }
.ticket-list-columns-field { margin:0; padding:0; border:0; min-width:0; display:grid; gap:var(--space-75); }
.ticket-list-columns-field legend { padding:0; margin-bottom:var(--space-50); color:var(--ink-2); font-size:var(--text-sm); font-weight:600; }
.ticket-list-columns { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap:var(--space-75) var(--space-150); }
.ticket-list-columns li { display:flex; align-items:center; justify-content:space-between; gap:var(--space-100); min-height:36px; padding:var(--space-50) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.ticket-list-columns li.is-hidden-column { opacity:.75; border-style:dashed; }
.ticket-list-role { display:grid; gap:var(--space-100); padding-top:var(--space-150); border-top:1px solid var(--line); }
.ticket-list-role-head { display:flex; align-items:center; justify-content:space-between; gap:var(--space-100); }
.ticket-list-role-add { display:flex; flex-wrap:wrap; align-items:end; gap:var(--space-100); }
.ticket-list-role-add label { display:grid; gap:var(--space-50); min-width:min(100%, 14rem); color:var(--ink-2); font-size:var(--text-sm); font-weight:600; }

/* ---------- Rules: all or any, the new conditions and actions, "no activity for…" (GitHub issue 204, Phase 2c) ---------- */
.rule-conditions-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100); }
.rule-conditions-head h3 { margin:0; }
#ruleCreatedFields > .rule-conditions-head { margin:var(--space-200) 0 var(--space-100); }
.notification-conditions-field .rule-conditions-head > span:first-child { color:var(--ink-2); font-size:var(--text-sm); font-weight:600; }
.notification-conditions-field .rule-conditions-head small { color:var(--muted); font-weight:400; }
.rule-match { display:inline-flex !important; align-items:center; gap:var(--space-75); margin:0 !important; color:var(--ink-2); font-size:var(--text-sm); font-weight:500; }
.rule-match select { width:auto !important; margin:0 !important; }
.rule-match .custom-select-wrapper { width:auto; min-width:9.5rem; }
.rule-row-is { padding-inline:var(--space-75); color:var(--muted); font-size:var(--text-md); }
.rule-idle-fields { display:grid; grid-template-columns:minmax(0, 1.6fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1.2fr); gap:var(--space-150); align-items:end; }
.rule-idle-fields[hidden] { display:none; }
#ruleActions .rule-row-edit > :nth-child(2) { grid-column:span 2; }
.rule-row-edit .rule-fill-field { grid-column:span 2; display:flex; flex-wrap:wrap; gap:var(--space-75); align-items:center; min-width:0; }
.rule-fill-field > select, .rule-fill-field > input, .rule-fill-field > .custom-select-wrapper, .rule-fill-field > fieldset { flex:1 1 140px; min-width:0; }
.rule-multi-choice { display:flex; flex-wrap:wrap; gap:var(--space-50) var(--space-150); margin:0; padding:0; border:0; min-width:0; }
.wd-if-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100); }
.wd-multi { display:flex; flex:1 1 220px; flex-wrap:wrap; gap:var(--space-50) var(--space-150); }
.wd-multi .wf-check, .rule-multi-choice .wf-check { white-space:nowrap; }
@media (max-width: 600px) {
  .rule-idle-fields { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); }
  .rule-editor .rule-row-edit { grid-template-columns:minmax(0, 1fr) 26px; }
  .rule-editor .rule-row-edit > :not(button) { grid-column:1; }
  .rule-editor .rule-row-edit > button { grid-column:2; grid-row:1; }
  .rule-editor .rule-row-edit .rule-fill-field, .rule-editor .rule-row-edit textarea { grid-column:1; }
}

/* A catalog's categories and order, and a catalog item's routing and audience (GitHub issue 204, Phase 2e; docs/adr/0100). */
.catalog-category-heading { grid-column:1 / -1; margin:var(--space-200) 0 0; color:var(--ink); font:700 var(--text-lg) Inter, sans-serif; }
.catalog-category-heading:first-child { margin-top:0; }
.catalog-order-group { display:grid; gap:var(--space-100); margin-top:var(--space-200); }
.catalog-order-group h4 { margin:0; color:var(--ink-2); font-size:var(--text-md); }
.catalog-order-item-name small { margin-left:var(--space-50); }
.catalog-reach-route { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap:var(--space-150); }
.catalog-reach-who { margin-top:var(--space-200); }
.workflow-centers-read { display:grid; gap:var(--space-50); margin:0; padding-left:var(--space-250); }
.catalog-order-categories .resolution-code-row { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) auto; }
@media (max-width:640px) { .catalog-order-categories .resolution-code-row { grid-template-columns:minmax(0, 1fr); } }
/* ------------------------------------------------------------------------- Import data: old values and saved mappings */
/* Each old state and priority from the dry run, with the workspace's own to choose (GitHub issue 204, Phase 2e, AQ13). */
.data-import-choices select { width:100%; min-width:9rem; }
.data-import-choices select.is-missing { border-color:var(--bad); }
.data-import-choices small { display:block; margin-top:var(--space-25); color:var(--bad); font-size:var(--text-xs); }
.data-import-save-mapping { align-items:end; margin:var(--space-150) 0; }
/* A vendors' import (GitHub issue 532): categories to add or skip, and what happens to each vendor. */
.data-import-new-categories { margin:var(--space-150) 0; }
.data-import-new-categories ul { display:grid; gap:var(--space-75); margin:0; padding:0; list-style:none; }
.data-import-new-categories li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-75) var(--space-200); padding:var(--space-75) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-lg); }
.data-import-category-name { min-width:0; overflow-wrap:anywhere; }
.data-import-category-choice { display:flex; flex-wrap:wrap; gap:var(--space-150); }
.data-import-category-choice .wf-check { display:flex; align-items:center; gap:var(--space-50); margin:0; }
.data-import-category-choice input { width:auto; margin:0; }
.data-import-lines { display:grid; gap:var(--space-25); margin:0; padding-left:var(--space-200); overflow-wrap:anywhere; }
.data-import-lines .data-import-warning { color:var(--ink-2); }
.data-import-vendors td:nth-child(2) { min-width:10rem; }
.data-import-save-mapping .outline-button { min-height:var(--control-height); }
.journey-departments small { display:block; margin-top:var(--space-75); }

/* Network access › What it holds (GitHub issue 204, AR6): what is held and what isn't, side by side, one under the other on a phone. */
.network-holds-lists { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap:var(--space-200); }
.network-holds-lists h4 { margin:0 0 var(--space-100); }
.network-holds-lists ul { margin:0; padding-inline-start:var(--space-250); display:grid; gap:var(--space-75); }
.network-keys-beyond { list-style:none; margin:0; padding:0; display:grid; gap:var(--space-100); }
.network-keys-beyond li { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-150); padding:var(--space-100) 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.network-keys-beyond li:first-child { border-top:0; }
#fileRulesRecommended p { margin:0 0 var(--space-150); }

/* Phase 2g (GitHub issue 204; docs/adr/0106): the Scheduler's positions and shift templates in Admin settings, time-off
   types being removed or merged, the loaners' return conditions, depreciation, and the Dashboard's team, supplier and
   experience targets. */
/* Each position: its name, its optional short name (the Scheduler's stage 2), its color, how many shifts, the buttons. */
.scheduler-position-list .resolution-code-row { grid-template-columns:minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 9em) auto auto; }
.scheduler-preset-list .resolution-code-row { grid-template-columns:minmax(0, 2fr) auto auto minmax(0, 1fr) auto; }
.scheduler-type-removed { margin-top:var(--space-200); }
.scheduler-type-removed h4 { margin:0 0 var(--space-100); font-size:var(--text-sm); }
.scheduler-type-removed .resolution-code-row { grid-template-columns:minmax(0, 1fr) auto auto; }
.scheduler-merge { display:flex; gap:var(--space-100); align-items:center; font-size:var(--text-sm); }
.scheduler-approver-choices { margin-top:var(--space-200); }
.loan-condition-list .is-retired input[type="text"] { color:var(--ink-2); text-decoration:line-through; }
.asset-depreciation-choices { margin:var(--space-100) 0 var(--space-150); }
.dashboard-target-line { margin:var(--space-100) 0; color:var(--ink-2); font-size:var(--text-sm); }
.dashboard-experience-list { list-style:none; margin:0; padding:0; display:grid; gap:var(--space-100); }
.dashboard-experience-list li { display:grid; grid-template-columns:minmax(0, 1fr) auto auto; gap:var(--space-150); align-items:center; }
.dashboard-experience-name { font-size:var(--text-sm); }
.dashboard-experience-value small { color:var(--ink-2); font-size:var(--text-xs); }
@media (max-width:640px) {
  .scheduler-position-list .resolution-code-row, .scheduler-preset-list .resolution-code-row, .scheduler-type-removed .resolution-code-row, .loan-condition-list .resolution-code-row { grid-template-columns:minmax(0, 1fr) auto; }
  .scheduler-position-list .resolution-code-row input[type="text"], .scheduler-preset-list .resolution-code-row input[type="text"], .scheduler-type-list .resolution-code-row input[type="text"] { grid-column:1 / -1; }
  .scheduler-type-list .resolution-code-row { grid-template-columns:minmax(0, 1fr); }
  .scheduler-type-state { white-space:normal; }
  .scheduler-merge { flex-wrap:wrap; }
  .scheduler-type-removed .resolution-code-row > span:first-child, .scheduler-merge { grid-column:1 / -1; }
  #schedulerSetupPanel .resolution-code-add, #schedulerSettingsPanel .resolution-code-add, .cmdb-setup-body .resolution-code-add { flex-wrap:wrap; }
  #schedulerSetupPanel .resolution-code-add input, #schedulerSettingsPanel .resolution-code-add input, .cmdb-setup-body .resolution-code-add input { flex-basis:100%; }
  .dashboard-experience-list li { grid-template-columns:minmax(0, 1fr) auto; }
  .dashboard-experience-value { grid-column:1 / -1; grid-row:2; }
}

/* ---------- Rule conditions with a value in two parts (GitHub issue 264, TR8) ---------- */
/* A date range, a surge or a form answer takes its own line under the field, so its two boxes have room. */
@media (min-width: 601px) {
  .rule-row-edit > .rule-value-pair { grid-column:1 / 4; grid-row:2; }
  .rule-row-edit > .rule-value-pair ~ button { grid-column:4; grid-row:1; }
  .rule-row-edit.is-paired > :nth-child(2) { grid-column:2 / 4; }
}

/* ---------- Admin settings › Dashboards (GitHub issues 297 and 591) ---------- */
.dashboard-setting-days { display:grid; gap:var(--space-50); max-width:20rem; color:var(--ink-2); font-size:var(--text-sm); font-weight:600; }
.dashboard-setting-roles select { min-width:min(100%, 14rem); }
/* Admin settings › CMDB setup › Statuses (ci-statuses-setup.js; GitHub issue 295): each status's name, meaning, color,
   how it looks and how many CIs have it, with its buttons; on a phone the name and the meaning take a line each. */
.ci-status-list { margin-bottom:var(--space-150); }
.ci-status-list .resolution-code-row { grid-template-columns:minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, .7fr) minmax(0, 1fr) 12.5em; padding:var(--space-100) 0; border-bottom:1px solid var(--line); align-items:start; }
.ci-status-list .resolution-code-row:last-child { border-bottom:0; }
.ci-status-list select { min-width:0; width:100%; }
.ci-status-shown { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); min-width:0; }
.ci-status-shown .cmdb-status { max-width:100%; overflow:hidden; overflow-wrap:break-word; }
.ci-status-keeps { grid-column:1 / -1; font-size:var(--text-xs); }
.ci-status-move-result { margin-top:var(--space-100); }
.ci-status-move-result ul { margin:var(--space-50) 0 0; padding-left:var(--space-150); max-height:14rem; overflow:auto; }
.ci-move-job { display:grid; gap:var(--space-75); min-width:0; margin:0 0 var(--space-150); padding:var(--space-150) var(--space-200); border:1px solid var(--line, rgba(127,127,127,.25)); border-radius:var(--radius-lg); overflow-wrap:anywhere; }
.ci-move-job p { margin:0; }
.ci-move-job progress { width:100%; height:.75rem; }
.ci-move-job.is-stopped { border-color:var(--saffron); background:var(--saffron-pale); color:var(--warn-ink); }
.ci-move-job-refused { margin:0; padding-left:var(--space-150); max-height:14rem; overflow:auto; }
.ci-move-job [data-ci-move-job-dismiss] { justify-self:start; }
.ci-status-move-result li { overflow-wrap:anywhere; }
.ci-status-move-warning { color:var(--warn-ink); font-weight:600; }
@media (max-width:900px) { .ci-status-list .resolution-code-row { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); } .ci-status-list .resolution-code-row input[type="text"] { grid-column:1 / -1; } .ci-status-list .resolution-code-actions { grid-column:1 / -1; } }
@media (max-width:520px) { .ci-status-list .resolution-code-row { grid-template-columns:minmax(0, 1fr); } }
.ci-status-list .resolution-code-actions { display:flex; flex-wrap:wrap; gap:var(--space-100); justify-content:flex-end; }
.ci-status-list .resolution-code-actions .nt-link:disabled { color:var(--muted); cursor:default; text-decoration:none; opacity:.6; }
@media (max-width:900px) { .ci-status-list .resolution-code-actions { justify-content:flex-start; } }
/* Names FeatSuite signs its own notes with, held by people saved before they were reserved (GitHub issue 403, 400-4). */
.reserved-names-note { margin:0 0 var(--space-200); padding:var(--space-150) var(--space-200); border:1px solid var(--line); border-left:4px solid var(--state-pending); border-radius:var(--radius-lg); background:var(--surface); color:var(--ink); }
.reserved-names-note h3 { margin:0 0 var(--space-75); font-size:var(--text-lg); }
.reserved-names-note p { margin:0; color:var(--ink-2); font-size:var(--text-md); line-height:1.45; max-width:var(--settings-text-width); }
.reserved-names-list { display:flex; flex-wrap:wrap; gap:var(--space-100) var(--space-250); margin:var(--space-150) 0 0; padding:0; list-style:none; }
.reserved-names-list li { display:flex; flex-direction:column; min-width:0; }
.reserved-names-list small { color:var(--muted); font-size:var(--text-sm); overflow-wrap:anywhere; }
.reserved-names-name { font-weight:var(--weight-semibold); text-align:left; }
.reserved-names-note .wf-hint { margin-top:var(--space-100); }
/* Manage my team's Entra reset card (GitHub issue 546): the certificate's thumbprint and Test connection's lines wrap
   on a phone instead of running off the card. */
.team-entra-certificate, .team-entra-test li { overflow-wrap:anywhere; }
/* The set-up and connected labels on Manage my team's Entra card and Directory sync's account actions (GitHub issues 545,
   546): a pill, green when ready and amber when something needs doing. Colors are the page's own tokens, so dark follows. */
.team-card .status-good, .team-card .status-warn, #directoryAccountActionsBox .status-good, #directoryAccountActionsBox .status-warn { display:inline-block; padding:var(--space-50) var(--space-150); border-radius:var(--radius-pill); font-size:var(--text-sm); font-weight:600; line-height:1.5; }
.team-card .status-good, #directoryAccountActionsBox .status-good { background:var(--good-soft); color:var(--good); }
.team-card .status-warn, #directoryAccountActionsBox .status-warn { background:var(--saffron-pale); color:var(--warn-ink); }

/* ------------------------------------------------------------------------- Drafts (GitHub issue 519) */
/* Admin settings › Drafts and the banner while a draft is open (public/js/app/settings-drafts.js). Long names wrap; a
   draft's name is two lines at most, with a fade. Colors are the page's own tokens, so light and dark follow them. */
.settings-draft-banner { border-color:var(--spruce); background:var(--spruce-pale); }
.settings-draft-banner p { overflow-wrap:anywhere; }
.settings-draft-banner-actions { display:flex; flex-wrap:wrap; gap:var(--space-75); }
.settings-draft-start { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-100); }
.settings-draft-start .ai-field { flex:1 1 16rem; min-width:0; }
.settings-draft-list { display:grid; gap:var(--space-150); margin:var(--space-150) 0; }
.settings-draft-card { display:grid; gap:var(--space-75); min-width:0; }
.settings-draft-card.is-editing { border-color:var(--spruce); box-shadow:inset 3px 0 0 var(--spruce); }
.settings-draft-head { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); min-width:0; }
.settings-draft-name { flex:1 1 12rem; min-width:0; margin:0; overflow-wrap:anywhere; }
.settings-draft-pages, .settings-draft-line { margin:0; color:var(--ink-2); overflow-wrap:anywhere; }
.settings-draft-actions { display:flex; flex-wrap:wrap; gap:var(--space-75); }
.settings-draft-flagged { display:grid; gap:var(--space-75); }
.settings-draft-flagged p { margin:0; }
.settings-draft-schedule { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-100); }
.settings-draft-schedule[hidden] { display:none; }
.settings-draft-compare, .settings-draft-preview { display:grid; gap:var(--space-100); padding-top:var(--space-100); border-top:1px solid var(--line); }
.settings-draft-compare h4, .settings-draft-preview h4 { margin:0; display:flex; align-items:baseline; gap:var(--space-75); }
.settings-draft-differences, .settings-draft-examples { margin:var(--space-50) 0 0; padding-left:var(--space-200); display:grid; gap:var(--space-50); overflow-wrap:anywhere; }
.settings-draft-count { display:inline-grid; place-items:center; min-width:2rem; padding:0 var(--space-75); border-radius:var(--radius-lg); background:var(--surface-2); color:var(--ink); font-variant-numeric:tabular-nums; }
.settings-draft-example-title { color:var(--ink-2); }
.settings-draft-example-text { display:block; color:var(--muted); }
.settings-draft-days { max-width:14rem; }
.settings-draft-rules { display:grid; gap:var(--space-100); }
.settings-draft-rules h3 { margin:0; }
.settings-draft-rule-pages { display:grid; grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr)); gap:var(--space-75); }
@media (max-width:640px) {
  .settings-draft-actions > button, .settings-draft-banner-actions > button { flex:1 1 auto; }
}

/* Admin settings › Live chat (GitHub issue 573; public/js/app/live-chat-settings.js): the switch, the groups, routing,
   every chat time and limit, chat hours and the in-chat switches. Long group names wrap; on a phone the numbers stack. */
.lcs-settings-form { display:grid; gap:var(--space-150); }
.lcs-settings-form .backups-card { display:grid; gap:var(--space-100); }
.lcs-settings-form h3 { margin:0; }
.lcs-groups, .lcs-routing { border:0; padding:0; margin:0; display:grid; gap:var(--space-75); }
.lcs-groups legend, .lcs-routing legend { font-weight:600; margin-bottom:var(--space-50); }
.lcs-groups { grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr)); }
.lcs-choice { display:flex !important; flex-direction:row !important; align-items:flex-start; gap:var(--space-100); min-height:32px; margin:0; font-weight:500; }
.lcs-choice input { width:auto !important; min-height:0; margin:var(--space-25) 0 0; flex:none; }
.lcs-choice > span { display:grid; gap:var(--space-25); min-width:0; }
.lcs-choice small, .lcs-range { display:block; color:var(--muted); font-weight:400; }
.lcs-group-name { overflow-wrap:anywhere; }
.lcs-numbers label { display:grid; gap:var(--space-50); }
.lcs-inline { display:flex; align-items:center; gap:var(--space-100); }
.lcs-inline input { width:6.5rem; }
.lcs-week[hidden] { display:none; }
.lcs-week input[type="time"] { min-width:7.5rem; }
.lcs-warning { margin:0; }
@media (max-width:640px) {
  .lcs-groups { grid-template-columns:1fr; }
  .lcs-week th, .lcs-week td { padding:var(--space-50); }
}
/* Roles & permissions › an Administrator role's Security rights, Admin settings areas and Data areas: one switch a
   row, with room between rows (the areas, which have no line of help, were drawn touching). */
.role-rights { display:grid; gap:var(--space-100); margin-top:var(--space-100); }
.role-rights > .ai-switch { margin:0; }
/* A list's rows (resolution codes, ticket sources and the like): the last thing in a row, a Remove button or the
   "Built in" tag, takes one width (Resolution codes and Ticket sources), so every row's check boxes and arrows line up in columns. */
#settingsView .resolution-code-list .resolution-code-actions > :is([data-code-remove], [data-source-remove], .custom-state-locked) { box-sizing:border-box; min-width:6rem; justify-content:center; }
#settingsView .resolution-code-list .resolution-code-actions > .custom-state-locked { display:inline-flex; align-items:center; min-height:var(--control-height); }
/* Onboarding & offboarding › a template's card: its name, On/Off and Edit on one line, and each step with its
   timing at the right of its row (the two ran together: "Create the account and mailbox5 days before"). */
.journey-template-head { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); }
.journey-template-head h3 { margin:0; }
.journey-template-actions { display:flex; gap:var(--space-100); margin-left:auto; }
.journey-template .journey-template-sub { margin-top:var(--space-50); }
.journey-steps > .journey-step-summary { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:var(--space-25) var(--space-200); padding:var(--space-75) 0; border-bottom:1px solid var(--line); }
.journey-steps > .journey-step-summary:last-child { border-bottom:0; }
.journey-step-summary > small { color:var(--muted); font-size:var(--text-sm); white-space:nowrap; }
