/* 26 October 2026: dedicated fields on the notification rules page, the Admin menu's
   divider and the account menu under the name. */
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.rows-table select {
  width: 100%;
}

.row-input {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
}

.topbar-menu-divider {
  height: 1px;
  margin: 0.3rem 0.2rem;
  background: var(--line);
}

.account-menu > summary.user-chip {
  min-height: 44px;
}

.menu-logout {
  margin: 0;
}

.menu-logout button {
  width: 100%;
  padding: 0.42rem 0.6rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.menu-logout button:hover {
  background: var(--brand-100);
}

.profile-grants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Text the customer, on a job (26 October 2026). */
.sms-to input {
  max-width: 16rem;
  display: block;
}

.sms-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.sms-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.sms-log {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.check-row label.check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  margin: 0;
}

.check-row label.check input {
  width: auto;
  margin: 0;
}

/* The notification catalogue on Notification rules, 26 October 2026. */
.catalogue-group {
  margin-top: 0.75rem;
}

.catalogue-group > summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.35rem 0;
}

.catalogue-table td {
  vertical-align: top;
  font-size: 0.86rem;
}

.catalogue-table td:first-child {
  min-width: 11rem;
}

/* One column grid for every group, so the ten tables line up. */
.catalogue-table {
  table-layout: fixed;
  width: 100%;
  min-width: 760px;
}

.catalogue-table th:nth-child(1) { width: 17%; }
.catalogue-table th:nth-child(2) { width: 29%; }
.catalogue-table th:nth-child(3) { width: 33%; }
.catalogue-table th:nth-child(4) { width: 7%; }
.catalogue-table th:nth-child(5) { width: 8%; }
.catalogue-table th:nth-child(6) { width: 6%; }

/* On a phone the catalogue reads as cards: six columns do not fit in 390px and the
   one that matters, who receives it, was the one scrolled out of sight. */
@media (max-width: 720px) {
  .catalogue-table { min-width: 0; table-layout: auto; }
  .catalogue-table thead { display: none; }
  .catalogue-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .catalogue-table td { display: block; border: 0; padding: 0.15rem 0; width: auto; }
  .catalogue-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--muted, #657177);
  }
}

/* OH site checklist on the job, phone first (26 October 2026). A repeating table is a
   stack of cards; the laboratory's part of each card is folded away. */
.oh-checklist .oh-section h2 {
  margin-bottom: 0.75rem;
}

.oh-question,
.oh-field {
  display: block;
  margin: 0 0 0.85rem;
}

.oh-question input,
.oh-question select,
.oh-question textarea,
.oh-field input,
.oh-field select,
.oh-field textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.3rem;
  min-height: 2.75rem;
  font-size: 1rem;
}

.oh-repeater h3 {
  margin: 0.25rem 0 0.4rem;
}

.oh-row {
  border: 1px solid var(--line, #d9dde3);
  border-radius: 10px;
  padding: 0.75rem 0.85rem 0.25rem;
  margin: 0 0 0.75rem;
  background: var(--surface, #fff);
}

.oh-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.oh-lab {
  margin: 0 0 0.75rem;
}

.oh-lab > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.4rem 0;
}

.oh-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 0.75rem 0;
  background: var(--page, #f4f6f8);
  border-top: 1px solid var(--line, #d9dde3);
  z-index: 5;
}

.oh-runs {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.oh-runs li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line, #d9dde3);
}

@media (min-width: 900px) {
  .oh-checklist {
    max-width: 760px;
  }
}

/* Registers, 27 October 2026: every tile a filter, every record a history. */
.stat-link.is-on {
  border-color: var(--charcoal-900);
  box-shadow: inset 0 -3px 0 var(--env-yellow), var(--shadow-sm);
}

.stat-link.is-on span::after {
  content: " \00d7";
  font-weight: 800;
}

.history-changes {
  margin: 0.3rem 0 0.35rem;
  padding-left: 1rem;
  color: #4d5a62;
  font-size: 0.8rem;
}

.history-changes li {
  min-height: 0;
  padding: 0.1rem 0;
  border: 0;
}

.history-before {
  color: #8a5a54;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.history-after {
  color: #254d63;
  font-weight: 650;
}

.history-delete .version-number {
  background: #a43232;
  color: #fff;
}

.history-restore .version-number {
  background: #2f6b45;
  color: #fff;
}

.danger-zone > summary {
  list-style: none;
}

.danger-zone > summary::-webkit-details-marker {
  display: none;
}

.record-history .inline-form {
  margin-top: 0.35rem;
}

.tread {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tread-warn {
  color: #9a6400;
  font-weight: 700;
}

.tread-bad {
  color: var(--red);
  font-weight: 800;
}

/* Lowest tyre tread in Vehicle details: read, not typed, laid out like its labels. */
.tread-field {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  color: #53616b;
  font-size: 0.79rem;
  font-weight: 700;
}

.tread-field-value {
  display: flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line, #d9dfe1);
  border-radius: 8px;
  background: #f6f8f8;
  color: #273136;
  font-size: 0.95rem;
}

.tread-field .field-note {
  font-weight: 400;
}

/* ======================================================================
   Field first home and HSEQ inbox. Zak, 3 November 2026, directions 1 and 3
   of the production audit. One accent (ENV yellow) and charcoal; colour
   beyond that only says state (overdue, needs attention).
   ====================================================================== */

.home-head { margin-bottom: 0.75rem; }

.home-report {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.home-report-btn {
  min-height: 64px;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.home-report-btn.is-hazard { background: var(--env-yellow); color: var(--charcoal-950); }
.home-report-btn.is-incident { background: var(--charcoal-900); color: #ffffff; }
.home-report-btn:hover { filter: brightness(0.95); }
.home-report-btn:focus-visible { outline: 3px solid var(--charcoal-950); outline-offset: 3px; }
.home-report-btn.is-incident:focus-visible { outline-color: var(--env-yellow); }

.needs-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.needs-item {
  min-height: 72px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.needs-item b { font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.needs-item span { color: var(--ink-soft); font-size: 0.82rem; }
.needs-item.has-items { border-color: var(--env-yellow); box-shadow: inset 4px 0 0 var(--env-yellow); }
.needs-item:hover { background: var(--ground); }

.team-strip {
  min-height: 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

.team-strip h2 { margin: 0; }
.team-strip b { font-variant-numeric: tabular-nums; }
.team-strip-go { margin-left: auto; font-size: 1.5rem; color: var(--ink-soft); }

.due-list { margin: 0; padding: 0; list-style: none; }

.due-item {
  min-height: 56px;
  padding: 0.55rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.due-item:last-child { border-bottom: 0; }
.due-item.is-overdue { box-shadow: inset 3px 0 0 var(--red); padding-left: 0.6rem; }

.due-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--ink);
  text-decoration: none;
}

a.due-main:hover .due-title { text-decoration: underline; }
.due-title { font-weight: 650; overflow-wrap: anywhere; }
.due-sub { color: var(--ink-soft); font-size: 0.82rem; }
.due-when { flex: none; }
.chip-crit { background: var(--red-bg); color: var(--red); }
.due-more { margin: 0.75rem 0 0; font-size: 0.88rem; }

.home-training summary { cursor: pointer; list-style: revert; }
.home-training summary h2 { display: inline; margin: 0; }

/* The inbox */
.inbox-jump {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.inbox-jump-item {
  min-height: 64px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}

.inbox-jump-item b { font-size: 1.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.inbox-jump-item span { color: var(--ink-soft); font-size: 0.82rem; }
.inbox-jump-item.has-items { box-shadow: inset 4px 0 0 var(--env-yellow); }

.inbox-group { scroll-margin-top: 5rem; }
.inbox-count { color: var(--ink-soft); font-weight: 600; font-size: 0.9em; }
.inbox-list { margin: 0; padding: 0; list-style: none; }
.inbox-list li { border-bottom: 1px solid var(--line); }
.inbox-list li:last-child { border-bottom: 0; }

.inbox-row {
  min-height: 52px;
  padding: 0.55rem 0.25rem;
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.inbox-row:hover { background: var(--ground); }
.inbox-ref { font-weight: 700; font-variant-numeric: tabular-nums; }
.inbox-title { min-width: 0; overflow-wrap: anywhere; }
.inbox-meta { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-soft); font-size: 0.82rem; }

@media (max-width: 640px) {
  .home-report { grid-template-columns: 1fr; }
  .needs-row, .inbox-jump { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-row { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ======================================================================
   Phones. Audit, 30 October 2026: 67% of tap targets under 44 px, sortable
   headers 16 px tall, 13 pages with inputs under 16 px (iOS zooms on focus),
   the risk matrix cut off at its third column, the training matrix squeezed
   into slivers, a blank gap in the register filter.
   ====================================================================== */
@media (max-width: 640px) {
  .btn,
  button,
  select,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .tab {
    min-height: 44px;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 22px;
    height: 22px;
  }

  /* Sortable headers and reference links: the whole cell is the target. */
  th > a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  td > a:only-child {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* The two selects carry the same answer and show the rating; the matrix needs
     680 px it does not have on a phone. */
  .matrix-scroll,
  .hide-phone {
    display: none;
  }

  /* Scroll the training matrix instead of squeezing it. */
  .training-matrix { width: max-content; }
  .training-matrix .training-person { width: 8rem; min-width: 8rem; }
  .training-matrix .training-cell { min-width: 2.5rem; height: 2.75rem; }
  .training-course span { font-size: 0.72rem; }

  .filter-panel { grid-template-columns: minmax(0, 1fr); }
  .filter-panel label { font-size: 0.8rem; }
}

/* Incoming claims (/jobs/intake), 9 November 2026: what Endata sent on the
   left, the decision on the right; one column under 860px. */
.intake-count {
  align-self: flex-start;
  flex: none;
  font-size: 0.8rem;
}

.intake-card {
  padding: 0;
  overflow: hidden;
}

.intake-head {
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.intake-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.intake-title h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.intake-head p {
  margin: 0.3rem 0 0;
  overflow-wrap: anywhere;
}

.intake-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.intake-claim,
.intake-decide {
  padding: 1rem 1.25rem 1.15rem;
  min-width: 0;
}

.intake-decide {
  border-left: 1px solid var(--line);
  background: var(--ground);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intake-label {
  margin: 0 0 0.7rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intake-decide .intake-label {
  margin-bottom: 0;
}

.intake-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
}

.intake-facts .full {
  grid-column: 1 / -1;
}

.intake-facts dt {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.intake-facts dd {
  margin: 0.1rem 0 0;
  overflow-wrap: anywhere;
}

.intake-description {
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--line-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--ground-warm);
  line-height: 1.5;
}

.intake-notes {
  margin: 0.9rem 0 0;
  padding: 0.6rem 0.75rem 0.6rem 1.6rem;
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: var(--info);
}

.intake-notes li + li {
  margin-top: 0.2rem;
}

.intake-existing {
  margin: 0;
}

.intake-existing ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.intake-existing a {
  font-weight: 700;
}

.intake-option {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.intake-option.is-suggested {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.intake-option h4 {
  margin: 0;
  font-size: 0.92rem;
}

.intake-option p {
  margin: -0.3rem 0 0;
}

.intake-fields {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  gap: 0.6rem 0.75rem;
}

.intake-fields .full {
  grid-column: 1 / -1;
}

.intake-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: #53616b;
  font-size: 0.76rem;
  font-weight: 700;
}

.intake-or {
  margin: -0.2rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.intake-or::before,
.intake-or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line-strong);
}

.intake-dismiss summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.intake-dismiss .inline-form {
  margin-top: 0.4rem;
}

.intake-dismiss input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 860px) {
  .intake-body { grid-template-columns: minmax(0, 1fr); }
  .intake-decide { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 480px) {
  .intake-facts { grid-template-columns: minmax(0, 1fr); }
  .intake-fields { grid-template-columns: minmax(0, 1fr); }
  .intake-option .btn { width: 100%; }
}

/* ---------- one notification: who receives it, what they receive ----------
   Zak, 9 November 2026: the usual recipients one per line with a Remove, and the last
   mail shown as it was sent. */

.notice-subhead {
  margin: 18px 0 6px;
  font-size: 1rem;
}

.notice-recipients {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.notice-recipient {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.notice-recipient:first-child {
  border-top: 0;
}

.notice-recipient-who {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notice-recipient-who small {
  display: block;
  color: var(--ink-soft);
}

.notice-recipient-email {
  color: var(--ink-soft);
}

.notice-remove {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex: none;
  white-space: nowrap;
}

.notice-remove input:checked + span {
  font-weight: 650;
  color: var(--red);
}

.notice-recipient:has(.notice-remove input:checked) .notice-recipient-who {
  text-decoration: line-through;
  opacity: 0.7;
}

.notice-preview {
  margin: 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.notice-preview-subject {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.notice-preview-body {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow-wrap: anywhere;
}

.notice-preview-empty {
  margin: 8px 0 16px;
}

/* The made-up example, told apart from the real last mail at a glance. */
.notice-example {
  border-style: dashed;
}

/* Whole, not in a scroll box: the link at the bottom is part of what it says. */
.notice-example .notice-preview-body {
  white-space: pre-wrap;
  max-height: none;
}

/* A fieldset is as wide as its widest content by default; a select listing
   "name (email)" made the page scroll sideways on a phone. */
.notice-form fieldset {
  min-width: 0;
}

.notice-form .repeater-table select {
  max-width: 100%;
}

.notice-form .repeater-table {
  table-layout: fixed;
}

.notice-form .repeater-table th.notice-row-action,
.notice-form .repeater-table td.notice-row-action {
  width: 96px;
}

.notice-form .repeater-table th.notice-row-action {
  color: transparent;
}

.notice-form .notice-remove {
  flex-direction: row;
  font-weight: 600;
}

.notice-form .notice-remove input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  margin: 0;
  padding: 0;
}

/* Phones (impeccable audit, 9 November 2026): the row number and a full-width Remove
   squeezed the person and address fields to "Choose a pers", and the Remove tick box
   was a 17px target. The number goes, the headers wrap, and each Remove is 44px tall. */
.notice-form .repeater-table th {
  white-space: normal;
}

@media (max-width: 640px) {
  .notice-form .repeater-table .repeater-index {
    display: none;
  }

  .notice-form .repeater-table th.notice-row-action,
  .notice-form .repeater-table td.notice-row-action {
    width: 84px;
  }

  .notice-form .notice-remove,
  .notice-form .notice-row-action .btn {
    min-height: 44px;
  }

  .notice-form .notice-remove {
    padding: 0 4px;
  }
}


