/* The Design Queue tab (js/designQueue/), in the app's own colours: every
   colour here is one of styles.css's tokens, but for Design Reporting's
   two chart colours (the Reporting tab's own, below). Linked from index.html after
   styles.css, and touches nothing outside its own panel and the dialogs,
   sheet, menus and popovers it opens (each class starts dq-), but the
   topbar's tabs while the queue's own tab shows (below). Services
   (css/services.css) uses these same components in its own panel: the
   panel-scoped rules below name #services-panel beside the queue's. */

/* The tab's panel fills the main area like the other data tabs. */
:is(#design-queue-panel, #services-panel) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-deep);
  padding: 16px 20px;
  overflow-y: auto;
}
/* Where the topbar is tight, its tab says just "Queue" and every tab is a
   little narrower while the queue's tab shows, so a team with the queue
   keeps a one-row topbar at the widths it had one before (measured on OM's
   tab sets: an admin from 1470px, a designer from 1344px). A team without
   the queue is untouched: the rule needs its tab showing. */
@media (max-width: 1699px) {
  #tab-design-queue .dq-tab-design { display: none; }
  .mode-switch:has(#tab-design-queue:not(.hidden)) .mode-btn { padding-left: 8px; padding-right: 8px; }
}
/* Its own "hidden", so the module needs nothing of the page's. */
:where(#design-queue-panel, #services-panel, .dq-dialog, .dq-sheet, .dq-popover, .dq-menu) .hidden { display: none !important; }

/* --- The page's head, sub-pages and toolbar --- */
.dq-page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
:is(#design-queue-panel, #services-panel) .dq-title { margin: 0; font-size: 11px; font-weight: normal; }
.dq-subtabs { display: flex; gap: 4px; margin-bottom: 12px; }
.dq-subtab, .dq-view-chip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
}
.dq-subtab[aria-pressed="true"], .dq-view-chip[aria-pressed="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}
.dq-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.dq-search { flex: 1 1 260px; max-width: 420px; }
.dq-filter-toggle { display: none; }
.dq-views { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dq-count {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--panel-alt);
  color: var(--text);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.dq-count-aside { margin-left: 5px; font-size: 11px; color: var(--warn-fg-soft); }
.dq-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dq-strip, .dq-banner, .dq-warning, .dq-notice {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-fg-soft);
  font-size: 13px;
}
.dq-banner { border-color: var(--accent-dim); background: var(--panel); color: var(--text); max-width: 760px; }
.dq-warning p { margin: 0 0 4px; }
.dq-warning p:last-child { margin: 0; }

/* --- Fields, buttons and chips, wherever the queue puts them --- */
:where(#design-queue-panel, #services-panel, .dq-dialog, .dq-sheet, .dq-popover) :is(input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="date"], select, textarea) {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  min-width: 0;
}
:where(.dq-dialog, .dq-sheet, .dq-popover) textarea { width: 100%; resize: vertical; }
.dq-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.dq-primary:hover { background: var(--accent-hover); }
.dq-danger { color: var(--disc-fg); border-color: var(--disc-border); }
.dq-danger:hover { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-fill); }
:where(#design-queue-panel, #services-panel, .dq-dialog, .dq-sheet) button:disabled { opacity: 0.55; cursor: default; }
.dq-link-button { background: none; border: none; padding: 0; color: var(--accent); font-size: inherit; text-decoration: underline; }
.dq-link-button:hover { background: none; color: var(--accent-hover); }
.dq-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dq-chip { border-radius: 999px; padding: 4px 11px; font-size: 12.5px; }
.dq-chip[aria-pressed="true"] { background: var(--accent-dim); border-color: var(--accent); }
.dq-hours-typed { width: 84px; }
.dq-hint { color: var(--text-dim); font-size: 12px; }
.dq-hint.error, .dq-dialog-status.error { color: var(--danger-text); }
.dq-empty-line { color: var(--text-dim); padding: 14px 4px; margin: 0; }
.dq-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.dq-checklist { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.dq-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dq-field { display: flex; flex-direction: column; gap: 4px; }
.dq-field-label { font-size: 11px; color: var(--text-dim); }
.dq-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.dq-form > .dq-field:has(textarea), .dq-form > .dq-field:has(.dq-chips), .dq-form > p, .dq-form > .dq-check,
.dq-form > .dq-form-actions, .dq-form > .dq-dialog-status, .dq-form > .dq-field-wide { grid-column: 1 / -1; }
.dq-form-actions { display: flex; gap: 8px; }
.dq-wide-only { display: inline; }
.dq-narrow-only { display: none; }

/* --- The list: a row per request, its last note (if any) under it. The
   Opp # column (the second) fits an OPP-2026-0001 the server gives every
   new request (103px at 13px in the system font); a longer one typed in
   Edit details is cut short, its whole number on hover. --- */
.dq-table { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.dq-rows { list-style: none; margin: 0; padding: 0; }
.dq-head, .dq-row {
  display: grid;
  grid-template-columns: 54px 108px minmax(170px, 2fr) minmax(100px, 1.1fr) minmax(100px, 1fr) 84px 92px minmax(150px, 1.4fr) 62px 112px;
  column-gap: 10px;
  align-items: center;
  padding: 7px 12px;
}
.dq-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: var(--panel-alt);
}
.dq-head > span { font: inherit; color: inherit; }
.dq-row { border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; }
.dq-row:last-child { border-bottom: none; }
.dq-row:hover, .dq-row:focus-within { background: var(--panel-alt); }
.dq-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-c-num, .dq-number { color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* The job: its name opens it; Add note shows over the end of it on hover
   or focus, taking no room otherwise. */
.dq-c-job { position: relative; }
.dq-open {
  max-width: 100%;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dq-open:hover { background: none; color: var(--accent-hover); }
.dq-c-opp, .dq-c-received { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dq-c-designers { display: flex; gap: 3px; }
.dq-c-due { color: var(--text-dim); }
.dq-overdue { color: var(--disc-fg) !important; font-weight: 600; }
.dq-soon { color: var(--warn-fg) !important; }
.dq-c-note {
  grid-column: 3 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  color: var(--text-dim);
  font-size: 12px;
}
.dq-last-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dq-flags { color: var(--warn-fg); white-space: nowrap; }
.dq-note-button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 8px;
  font-size: 11.5px;
  background: var(--panel-alt);
  opacity: 0;
}
.dq-row:hover .dq-note-button, .dq-row:focus-within .dq-note-button, .dq-note-button:focus-visible { opacity: 1; }
.dq-group {
  padding: 8px 12px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  cursor: default;
}
.dq-row-check { border-left: 3px solid var(--warn-border); }
.dq-unchecked { margin-top: 12px; }
.dq-unchecked > summary { cursor: pointer; color: var(--warn-fg); font-size: 13px; margin-bottom: 6px; }
.dq-unchecked > .dq-rows { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }

/* A designer's initials, as a small round chip. */
.dq-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: var(--accent-dim);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.dq-initials.dq-past { background: var(--panel-alt); color: var(--text-dim); }

/* The status pill: what it is in words, coloured by how it stands. */
.dq-pill {
  display: inline-block;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.dq-pill-new { border-color: var(--accent-dim); color: var(--accent); }
.dq-pill-waiting { border-color: var(--warn-border); background: var(--warn-bg); color: var(--warn-fg-soft); }
.dq-pill-overdue { border-color: var(--disc-border); background: var(--disc-bg); color: var(--disc-fg); }
.dq-pill-done { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok-fg); }
.dq-pill-ended { color: var(--text-dim); }
button.dq-pill:hover { filter: brightness(1.15); }
.dq-caret { color: var(--text-dim); }
.dq-tag {
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* --- Menus and popovers --- */
.dq-menu, .dq-popover {
  position: fixed;
  z-index: 300;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow-dialog);
}
.dq-menu { display: flex; flex-direction: column; min-width: 180px; padding: 4px 0; }
.dq-menu button { border: none; border-radius: 0; background: transparent; text-align: left; padding: 7px 14px; }
.dq-menu button:hover, .dq-menu button:focus-visible { background: var(--accent-dim); outline: none; }
.dq-menu-danger { color: var(--disc-fg); }
.dq-popover { padding: 12px; width: min(360px, calc(100vw - 16px)); }
.dq-note-pop { display: flex; flex-direction: column; gap: 8px; }

/* --- Dialogs --- */
.dq-dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 12px 40px var(--shadow-dialog);
}
.dq-dialog-wide { width: min(720px, calc(100vw - 32px)); }
.dq-dialog::backdrop, .dq-sheet::backdrop { background: rgba(0, 0, 0, 0.55); }
.dq-dialog-title { margin: 0 0 6px; font-size: 16px; }
.dq-dialog > .dq-hint { margin: 0 0 12px; font-size: 12.5px; line-height: 1.45; }
.dq-dialog-status { min-height: 1em; margin: 10px 0 0; font-size: 12.5px; color: var(--text-dim); }
.dq-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.dq-dialog .dq-checklist + .dq-field, .dq-dialog .dq-field + .dq-field, .dq-dialog .dq-field + .dq-check { margin-top: 10px; }
/* In a form's grid the gap spaces the fields: no margin above a field, or
   the first one sits higher than the one beside it. */
.dq-dialog .dq-form > .dq-field { margin-top: 0; }
.dq-dialog .dq-dialog-title + .dq-form { margin-top: 12px; }
.dq-section-title { margin: 14px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); font-weight: 600; }

/* The salesperson picker's list, under its field. */
.dq-combo { position: relative; }
.dq-combo-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  margin: 2px 0 0;
  padding: 4px 0;
  list-style: none;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
}
.dq-combo-list li { padding: 6px 10px; cursor: pointer; font-size: 13px; }
.dq-combo-list li:hover, .dq-combo-list li.active { background: var(--accent-dim); }

/* --- A request's sheet: down the right of the screen --- */
.dq-sheet {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(620px, 100vw);
  height: 100%;
  max-width: 100vw;
  max-height: 100%;
  padding: 0;
  border: none;
  border-left: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  box-shadow: -12px 0 40px var(--shadow-dialog);
}
/* The sheet itself takes focus when it opens: no ring round all of it. */
.dq-sheet:focus, .dq-dialog:focus { outline: none; }
.dq-sheet-body { padding: 16px 20px 28px; }
.dq-sheet-head { position: sticky; top: -16px; z-index: 2; background: var(--panel); margin: -16px -20px 0; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.dq-sheet-top { display: flex; align-items: flex-start; gap: 12px; }
.dq-sheet-title { flex: 1; margin: 0; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.dq-sheet-close { flex: none; }
.dq-sheet-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; font-size: 13px; }
.dq-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dq-notice { margin: 12px 0 0; }
.dq-section { margin-top: 18px; }
.dq-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dq-section-head .dq-section-title { margin: 0 0 6px; }
.dq-details { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.dq-details dt { color: var(--text-dim); }
.dq-details dd { margin: 0; overflow-wrap: anywhere; }
.dq-details a, .dq-links a { color: var(--accent); }
/* A Sharefile folder given by its name: words to read and select, never a link. */
.dq-folder-name { overflow-wrap: anywhere; user-select: text; }
.dq-details-form { margin-top: 4px; }
.dq-people { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dq-person { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.dq-remove { padding: 0 7px; line-height: 1.4; color: var(--text-dim); }
.dq-remove:hover { color: var(--on-fill); background: var(--danger-fill); border-color: var(--danger-fill); }
.dq-links, .dq-time { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.dq-links li, .dq-time li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dq-add-link input[type="text"] { flex: 1 1 140px; }
.dq-add-link input[type="url"] { flex: 2 1 200px; }
.dq-note-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.dq-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dq-notes > li { border-left: 2px solid var(--border); padding-left: 10px; }
.dq-note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-dim); }
.dq-note-body { margin: 3px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dq-log-time { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dq-more > summary, .dq-history > summary { cursor: pointer; }
.dq-history ol { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.dq-danger-zone { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--border); }

/* --- Settings --- */
.dq-settings { max-width: 980px; }
.dq-settings .dq-section { margin: 0 0 28px; }
.dq-settings > .dq-section > .dq-hint { margin: 0 0 10px; max-width: 760px; line-height: 1.45; }
.dq-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.dq-settings-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.dq-settings-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-alt);
}
.dq-settings-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dq-settings-table tr:last-child td { border-bottom: none; }
/* With the Account column the table is wide: "Switched off" stays on one
   line, and Merge stays beside its picker, which gives up width instead. */
.dq-settings-table .dq-check { white-space: nowrap; }
.dq-settings-table td > .dq-inline { flex-wrap: nowrap; }
.dq-settings-table td > .dq-inline select { min-width: 0; max-width: 11rem; }
@media (max-width: 720px) {
  .dq-settings-table td > .dq-inline { flex-wrap: wrap; }
}
.dq-num { text-align: right; font-variant-numeric: tabular-nums; }
.dq-initials-input { width: 76px; text-transform: uppercase; }
.dq-initials-input::placeholder { text-transform: none; }
.dq-add { margin-top: 10px; }
/* What an add was refused for, on its own line under the row, and the
   field it's about marked. */
.dq-add .dq-hint { flex: 1 0 100%; }
.dq-add .dq-hint:empty { display: none; }
.dq-add .dq-hint.error { font-size: 13px; font-weight: 600; }
.dq-add [aria-invalid="true"] { border-color: var(--danger-text); outline: 1px solid var(--danger-text); }
/* The morning summary email's addresses, one a line. */
.dq-summary-to { display: block; box-sizing: border-box; width: 100%; max-width: 420px; margin: 0 0 8px; resize: vertical; }
.dq-settings .dq-summary-to + .dq-inline + .dq-hint { margin: 8px 0 0; }

/* A narrower screen: fewer columns (the job's narrowest 130px, so the
   wider Opp # leaves the row no wider than before it). */
@media (max-width: 1200px) {
  .dq-head, .dq-row {
    grid-template-columns: 54px 108px minmax(130px, 2fr) minmax(100px, 1fr) 84px minmax(140px, 1.4fr) 108px;
  }
  .dq-c-customer, .dq-c-type, .dq-c-received { display: none; }
}

/* --- A request's designs (designsPanel.js), and a row's word on them --- */
.dq-designs { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.dq-design { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-alt); padding: 8px 10px; }
.dq-design-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dq-design-name { font-weight: 600; overflow-wrap: anywhere; }
.dq-design-reduced { font-weight: 400; color: var(--text-dim); }
.dq-design-facts { margin: 3px 0 0; font-size: 12px; color: var(--text-dim); overflow-wrap: anywhere; }
.dq-design-actions { margin-top: 6px; }
.dq-design-actions:empty { display: none; }
.dq-design-add { margin-top: 4px; }
.dq-tag-strong { border-color: var(--ok-border); color: var(--ok-fg); }
.dq-checks { display: grid; gap: 6px; margin: 8px 0; }
.dq-pick-search { width: 100%; box-sizing: border-box; }
.dq-pick-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; max-height: min(55vh, 420px); overflow-y: auto; }
.dq-pick {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  padding: 7px 10px;
}
.dq-pick:disabled { opacity: 0.6; cursor: default; }
.dq-row-design { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }

/* --- Check imported and Close-out to do (triage.js): boxes and bulk
   actions; the bar stays in view while the list scrolls --- */
.dq-triage { max-width: 1100px; }
.dq-triage-bar {
  position: sticky;
  top: -16px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-alt);
}
.dq-triage-count { color: var(--text-dim); font-size: 12px; min-width: 9em; }
.dq-triage-actions { gap: 6px; }
.dq-triage-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.dq-triage-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  border-left: 3px solid var(--warn-border);
  cursor: pointer;
}
.dq-triage-row:first-child { border-top: none; }
.dq-triage-row > input { margin-top: 3px; flex: none; }
.dq-triage-fixed { border-left-color: transparent; cursor: default; }
.dq-triage-main { min-width: 0; flex: 1; }
.dq-triage-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dq-triage-facts { margin: 3px 0 0; color: var(--text-dim); font-size: 12px; }
.dq-triage-group { margin: 0 0 16px; scroll-margin-top: 64px; }
.dq-triage-group-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 600; }
.dq-triage-group-head .dq-check { display: inline-flex; align-items: center; gap: 6px; }
.dq-triage-jump { margin: 0 0 10px; }
.dq-triage-menu { display: none; }
.dq-triage-main .dq-last-note { display: block; margin: 3px 0 0; color: var(--text-dim); font-size: 12px; white-space: normal; }
.dq-flag-list { margin: 4px 0 0; padding-left: 18px; color: var(--warn-fg); font-size: 12px; }
.dq-flag-list li { margin: 1px 0; }

/* A request still to check, on its own page: the same choices. */
.dq-check-banner { border-color: var(--warn-border); margin: 10px 0; }
.dq-check-banner .dq-banner-title { margin: 0 0 4px; font-weight: 600; }
.dq-check-banner .dq-inline { margin-top: 8px; gap: 6px; }

/* A phone: the list as cards (#142 · Job; status and due; salesperson and
   designers; the last note), the filters behind Filter, a request's sheet
   the whole screen. The first column may shrink below its content
   (minmax(0, …)), so a long last note or status is cut short with an
   ellipsis rather than pushing the due words and designers off the card. */
@media (max-width: 700px) {
  :is(#design-queue-panel, #services-panel) { padding: 12px; }
  .dq-wide-only { display: none; }
  .dq-narrow-only { display: inline; }
  .dq-search { flex-basis: 100%; max-width: none; order: 3; }
  .dq-filter-toggle { display: inline-block; }
  .dq-filters { display: none; }
  .dq-filters.dq-filters-open { display: flex; }
  .dq-filters select { flex: 1 1 140px; }
  .dq-views { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .dq-view-chip { flex: none; }
  .dq-head { display: none; }
  .dq-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "job job" "status due" "sp designers" "note note";
    row-gap: 5px;
    padding: 10px 12px;
  }
  .dq-c-job { grid-area: job; white-space: normal; }
  .dq-open { white-space: normal; }
  .dq-c-status { grid-area: status; min-width: 0; }
  .dq-c-due { grid-area: due; text-align: right; }
  .dq-c-sp { grid-area: sp; color: var(--text-dim); }
  .dq-c-designers { grid-area: designers; justify-content: flex-end; }
  .dq-c-note { grid-area: note; min-width: 0; }
  .dq-c-opp, .dq-c-customer, .dq-c-type, .dq-c-received { display: none; }
  .dq-note-button { display: none; }
  .dq-form { grid-template-columns: 1fr; }
  .dq-sheet { width: 100vw; border-left: none; }
  .dq-sheet-body { padding: 12px 14px 24px; }
  .dq-sheet-head { top: -12px; margin: -12px -14px 0; padding: 12px 14px 10px; }
  .dq-details { grid-template-columns: minmax(104px, 38%) 1fr; }
  .dq-dialog { padding: 14px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .dq-triage-bar { top: -12px; }
  .dq-triage-actions { display: none; }
  .dq-triage-menu { display: inline-block; margin-left: auto; }
}

/* --- Design Reporting (js/designQueue/report.js) --- */
.dq-subtabs { flex-wrap: wrap; }
.dq-report-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.dq-report-controls .dq-views { margin-bottom: 0; }
.dq-report-custom { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--text-dim); font-size: 12.5px; }
.dq-report-custom label { display: inline-flex; align-items: center; gap: 6px; }
.dq-report-range { margin: 0 0 10px; color: var(--text-dim); font-size: 13px; }
.dq-report-range strong { color: var(--text); font-weight: 600; }
.dq-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  max-width: 1180px;
  margin-bottom: 18px;
}
.dq-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
}
.dq-tile-wide { grid-column: span 2; }
.dq-tile-label { color: var(--text-dim); font-size: 12px; }
.dq-tile-value { color: var(--text); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.dq-tile-wide .dq-tile-value { font-size: 17px; }
.dq-tile-note { color: var(--text-dim); font-size: 12px; line-height: 1.35; }
.dq-report-section { margin-bottom: 20px; }
.dq-report-heading { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.dq-report-table-wrap { overflow-x: auto; max-width: 1180px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.dq-report-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dq-report-table th, .dq-report-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dq-report-table thead th { color: var(--text-dim); font-weight: normal; background: var(--panel-alt); }
.dq-report-table tbody th { font-weight: 600; color: var(--text); }
.dq-report-table tbody tr:last-child > * { border-bottom: none; }
.dq-report-table .dq-num { text-align: right; font-variant-numeric: tabular-nums; }
.dq-report-foot { color: var(--text-dim); font-size: 12px; line-height: 1.45; max-width: 820px; }
.dq-report-foot p { margin: 0 0 6px; }

/* Received against delivered by month. The two series are the Reporting
   tab's own first and third chart colours (js/theme.js's CHART_SERIES),
   checked for colour-blind separation on the panel; the counts are in the
   text colours, never the bars'. */
.dq-chart { --dq-received: #3987e5; --dq-delivered: #199e70; }
.dq-chart-legend { display: flex; gap: 14px; margin-bottom: 8px; color: var(--text-dim); font-size: 12px; }
.dq-chart-key { display: inline-flex; align-items: center; gap: 6px; }
.dq-chart-swatch { width: 10px; height: 10px; border-radius: 2px; }
.dq-chart-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.dq-chart-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 150px); align-items: center; gap: 10px; }
.dq-chart-month { color: var(--text-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.dq-chart-bars { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dq-bar-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
/* Each bar's length is its share of the longest (--dq-share, report.js) of
   the line less 30px kept for its count, so near-longest bars still differ. */
.dq-bar { display: block; height: 10px; min-width: 0; border-radius: 0 4px 4px 0; flex: none; width: calc((100% - 30px) * var(--dq-share, 0)); }
.dq-bar-received { background: var(--dq-received); }
.dq-bar-delivered { background: var(--dq-delivered); }
.dq-bar-value { color: var(--text); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dq-chart-aside { color: var(--text-dim); font-size: 12px; }
.dq-quiet-more { display: none; }

/* The Time view (js/designQueue/timeReport.js): its switch, the range line
   with the save buttons, hours by period, the timesheet and its cells. */
.dq-report-viewbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dq-report-viewbar .dq-views { margin-bottom: 0; }
.dq-report-rangeline { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 10px; max-width: 1180px; }
.dq-report-rangeline .dq-report-range { margin: 0; }
.dq-report-save { flex-wrap: wrap; gap: 8px; align-items: center; }
.dq-period .dq-views { margin-bottom: 8px; }
.dq-fold-more { margin-top: 6px; }
.dq-timesheet-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.dq-timesheet-week { font-variant-numeric: tabular-nums; }
.dq-cell-button {
  background: none; border: none; padding: 2px 4px; margin: -2px -4px; color: var(--accent); font: inherit;
  font-variant-numeric: tabular-nums; text-decoration: underline; cursor: pointer;
}
.dq-cell-button:hover { background: none; color: var(--accent-hover); }
.dq-report-table td.dq-zero, .dq-report-table tr.dq-blank-row > * { color: var(--text-dim); }
.dq-report-table tfoot th, .dq-report-table tfoot td {
  font-weight: 600; color: var(--text); border-top: 1px solid var(--border); border-bottom: none; background: var(--panel-alt);
}
.dq-job-cell .dq-hint { font-weight: normal; overflow-wrap: anywhere; }
/* A job's name is the person's own text: a long word in it wraps rather than running past the card (or the dialog). */
.dq-job-cell .dq-link-button, .dq-time-entries .dq-link-button { text-align: left; overflow-wrap: anywhere; }
.dq-job-cell { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 16ch; max-width: 40ch; white-space: normal; text-align: left; }
.dq-time-entries { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.dq-time-entries li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.dq-time-entry-hours { font-variant-numeric: tabular-nums; font-weight: 600; }
.dq-time-entry-note { flex: 1 0 100%; color: var(--text-dim); font-size: 12.5px; overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .dq-filters.dq-report-filters { display: flex; }
  .dq-report-controls .dq-views { flex-wrap: wrap; overflow-x: visible; }
  .dq-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dq-tile-wide, .dq-tile-phone-wide { grid-column: 1 / -1; }
  /* Each table a stack of cards: the row's name first, then each figure
     with its column's name. */
  .dq-report-table-wrap { border: none; background: none; overflow: visible; }
  .dq-report-table thead { display: none; }
  .dq-report-table, .dq-report-table tbody, .dq-report-table tfoot, .dq-report-table tr { display: block; }
  .dq-report-table tr {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .dq-report-table tbody th, .dq-report-table tfoot th { display: block; padding: 0 0 4px; border: none; white-space: normal; }
  .dq-report-table tfoot th, .dq-report-table tfoot td { border-top: none; background: none; }
  /* Hours by period: a designer with nothing that period is left off its card. */
  .dq-report-table td.dq-zero { display: none; }
  .dq-job-cell { max-width: none; min-width: 0; }
  .dq-report-save { width: 100%; }
  .dq-report-table td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: none; white-space: normal; }
  .dq-report-table td::before { content: attr(data-label); color: var(--text-dim); text-align: left; }
  .dq-chart-row { grid-template-columns: 58px minmax(0, 1fr); }
  .dq-chart-aside { grid-column: 2; }
  /* Salespeople with only open jobs, folded into one line (report.js). */
  .dq-report-table tr.dq-quiet-row { display: none; }
  .dq-quiet-shown .dq-report-table tr.dq-quiet-row { display: block; }
  .dq-quiet-more { display: inline; margin-top: 2px; }
}

/* --- A salesperson's own view (js/designQueue/salesperson.js), phone
   first: one column of cards, every button a comfortable tap. --- */
.dq-mine { max-width: 720px; width: 100%; }
.dq-mine-intro { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.dq-mine-list, .dq-mine-downloads, .dq-mine-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dq-mine-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.dq-mine-card:hover { border-color: var(--accent-dim); }
.dq-mine-card-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.dq-mine-card-facts { color: var(--text-dim); font-size: 12.5px; overflow-wrap: anywhere; }
.dq-mine-card .dq-pill { white-space: normal; }
.dq-mine-back { min-height: 32px; margin-bottom: 8px; }
.dq-mine-title { margin: 0 0 8px; font-size: 17px; color: var(--text); overflow-wrap: anywhere; }
.dq-mine-detail .dq-pill { white-space: normal; font-size: 13px; }
.dq-mine-callout { margin-top: 10px; font-size: 13.5px; }
.dq-mine-callout-head { font-weight: 600; }
.dq-mine-facts { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 6px 14px; margin: 14px 0 4px; font-size: 13.5px; }
.dq-mine-facts dt { color: var(--text-dim); }
.dq-mine-facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.dq-mine-design { padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.dq-mine-design-name { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.dq-mine-design .dq-hint { margin: 0; }
.dq-mine-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dq-mine-actions button { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.dq-mine-status { margin: 8px 0 0; min-height: 1em; }
.dq-mine-note { padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.dq-mine-note-meta { margin: 0 0 4px; color: var(--text-dim); font-size: 12px; }
.dq-mine-note-body { margin: 0; color: var(--text); font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.dq-mine-callout .dq-mine-note-body { color: inherit; }
.dq-mine-links { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.dq-mine-sent { margin: 0 0 10px; }
/* Ask for a design (askForm.js): one column, labels above full-width
   fields, the same width as the list. */
.dq-mine-ask { display: block; margin: 0 0 12px; min-height: 40px; padding: 8px 16px; }
.dq-ask { display: flex; flex-direction: column; gap: 12px; max-width: 720px; width: 100%; }
.dq-ask .dq-mine-title { margin: 0; }
.dq-ask .dq-mine-title:focus { outline: none; }
.dq-ask-hint { margin: 0; font-size: 13px; line-height: 1.45; }
.dq-ask .dq-field-label { font-size: 12.5px; }
.dq-ask :is(input[type="text"], input[type="url"], textarea) { box-sizing: border-box; width: 100%; }
.dq-ask textarea { resize: vertical; line-height: 1.45; }
.dq-ask .dq-chip { min-height: 36px; }
.dq-ask .dq-hint { line-height: 1.4; }
.dq-ask-error { display: block; margin: 0; }
.dq-ask-error:empty { display: none; }
.dq-ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dq-ask-actions button { min-height: 40px; padding: 8px 16px; }
.dq-tag-asked { border-color: var(--accent-dim); color: var(--accent); flex: none; }
@media (max-width: 700px) {
  .dq-mine-views { flex-wrap: wrap; }
  .dq-mine-actions { flex-direction: column; align-items: stretch; }
  .dq-mine-actions button { min-height: 44px; }
  .dq-mine-facts { grid-template-columns: minmax(88px, 34%) 1fr; }
  /* 16px, so a phone doesn't zoom into a field as it's tapped. */
  .dq-ask :is(input, textarea) { font-size: 16px; }
  .dq-ask .dq-chip { min-height: 40px; }
  .dq-ask-actions { flex-direction: column; align-items: stretch; }
  .dq-ask-actions button { width: 100%; min-height: 44px; }
  .dq-mine-ask { width: 100%; min-height: 44px; }
}

/* --- Handing designs to a salesperson, and their accounts in Settings --- */
.dq-handover { margin-top: 4px; }
.dq-handover .dq-check { overflow-wrap: anywhere; }
.dq-account { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 220px; font-size: 12.5px; }
.dq-unlinked-seats { margin-top: 14px; max-width: 760px; }
.dq-unlinked-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dq-unlinked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.dq-invite-link { flex: 1 1 260px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
:where(.dq-dialog) input[type="email"] { width: 100%; }

/* --- A salesperson's Home (salesperson.js's My requests): "Hi Sam", Ask for
   a design across the column, and the requests waiting on them in a card
   of their own on top, phone first. --- */
.dq-page-head .dq-mine-hello { max-width: 720px; width: 100%; }
.dq-mine-hi { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.dq-mine-hello-sub { margin: 2px 0 0; font-size: 13px; }
.dq-mine .dq-mine-ask { width: 100%; min-height: 44px; font-size: 15px; font-weight: 600; }
.dq-mine-waiting {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  background: var(--warn-bg);
}
.dq-mine-waiting-title { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--warn-fg); }
.dq-mine-waiting-list { list-style: none; margin: 0; padding: 0; }
.dq-mine-waiting-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--warn-border); }
.dq-mine-waiting-row:first-child { border-top: none; padding-top: 2px; }
.dq-mine-waiting-text { flex: 1; min-width: 0; }
.dq-mine-waiting-text p { margin: 0; }
.dq-mine-waiting-job { font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.dq-mine-waiting-row .dq-hint { color: var(--warn-fg-soft); }
.dq-mine-waiting-row button { flex: none; min-height: 40px; padding: 8px 18px; }
@media (max-width: 700px) {
  .dq-mine-hi { font-size: 21px; }
  .dq-mine-waiting-row button { min-height: 44px; }
  /* Open and Done: a finger's room, as Home's own buttons. */
  .dq-mine-views .dq-view-chip { min-height: 44px; padding-left: 16px; padding-right: 16px; }
  /* The MSRP only tick: the same room (the label is its own hit area). */
  .dq-mine-msrp-label { min-height: 44px; }
}
/* The "MSRP only" tick over a salesperson's downloads (msrpOnlyTick.js). */
.dq-mine-msrp { margin: 0 0 10px; }
.dq-mine-msrp-label { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; cursor: pointer; width: fit-content; }
.dq-mine-msrp-box { margin: 0; }
.dq-mine-msrp-for { font-weight: 400; color: var(--text-dim); }
.dq-mine-msrp-note { margin: 4px 0 0; }
