

.wrap {
  background:
    radial-gradient(900px 480px at 50% -20%, var(--white), transparent 55%),
    #f3f4f6;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 20px 40px;
  overflow-x: hidden;
}

.panel {
  width: min(100%, 420px);
  max-width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px 28px;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.brand img {
  width: min(240px, 78%);
  height: auto;
}

/* Login page only: centred heading and lede, full-width buttons. The panels
   take the shared look from /style-guide.css. */
.wrap > .panel :is(h1, h2, h3) { margin: 0 0 8px; text-align: center; }
.wrap > .panel .lede { margin: 0 0 28px; text-align: center; }
.wrap > .panel .btn.btn:is(.btn-primary, .btn-ghost) { width: 100%; }

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 400;
}

.phone {
  display: flex;
  align-items: stretch;
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--control-bg);
  overflow: hidden;
}

/* SMS code step: one wide centred field, dots as the placeholder. */
.code-field { display: grid; gap: 10px; text-align: center; }
.code-title { font-size: var(--heading); font-weight: 600; }
.code-input {
  width: 100%;
  min-height: 56px;
  text-align: center;
  font-size: var(--text-xl);
  letter-spacing: 0.6em;
  text-indent: 0.6em; /* balances the trailing letter-space so digits sit centred */
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--control-bg);
}
.code-field .code-input { height: 56px; padding: 0 12px; }
.btn-primary.btn-confirm { min-height: var(--btn-height-lg); font-size: calc(var(--btn-font) + 3pt); }
.code-input::placeholder { color: var(--muted, #9ca3af); letter-spacing: 0.6em; }
.code-input:focus { outline: none; border-color: var(--accent); box-shadow: none; }
.btn-primary.btn-confirm { background: var(--accent); }
.btn-primary.btn-confirm:hover:not(:disabled) { background: var(--accent-hover); }

.phone:focus-within {
  border-color: var(--control-focus-border);
  box-shadow: none;
}

.prefix {
  display: grid;
  place-items: center;
  padding: 0 12px;
  background: var(--fill);
  border-right: 1px solid var(--line);
  font-weight: 400;
  white-space: nowrap;
}

.phone input[type="tel"],
.phone input[type="text"] {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: var(--control-height);
  padding: 0 14px;
  font: inherit;
  letter-spacing: 0.01em;
}

.phone input[type="tel"]:focus,
.phone input[type="text"]:focus {
  border: 0;
  box-shadow: none;
}

input:focus {
  outline: none;
}

#skip-person {
  min-height: var(--control-height);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--control-bg);
  font: inherit;
}

#skip-person:focus {
  outline: none;
  border-color: var(--control-focus-border);
  box-shadow: none;
}

.code-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.code-boxes input {
  width: 100%;
  min-width: 0;
  text-align: center;
  padding: 0;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  color: var(--ink);
}

.remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

/* A button with an icon then words: the words' capitals sit level with the
   icon's middle (David, 2026-10-29), not their line box with its descender
   room, which left the + looking low. */

.btn-ghost:hover:not(:disabled) {
  background: var(--fill);
}

.timer-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  font-size: var(--text);
  font-weight: 400;
}

.timer-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timer-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 22%, transparent);
}

/* Company · ticket (a link to it), then the clock and Stop, together on
   the left (David, 2026-10-24). A long name shortens rather than pushing
   the clock off a phone screen. */
.timer-ticket {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  max-width: min(60ch, 100%);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.timer-ticket:hover .timer-subject,
.timer-ticket:focus-visible .timer-subject {
  text-decoration: underline;
}

.timer-company {
  color: var(--muted, #667085);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
}

.timer-sep {
  color: var(--muted, #667085);
}

.timer-subject {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
}

.timer-elapsed {
  flex: none;
}

.timer-error {
  margin: 6px 0 0;
  color: var(--danger, #b42318);
}

.timer-elapsed {
  font-variant-numeric: tabular-nums;
}

.timer-bar .btn {
  width: auto;
  flex: 0 0 auto;
}

.timer-bar .btn-icon {
  width: var(--icon-box);
  height: var(--icon-box);
}

.icon-tip {
  position: fixed;
  z-index: 80;
  padding: 4px 8px;
  background: var(--ink);
  color: var(--white);
  font-family: Inter, system-ui, sans-serif;
  font-size: var(--text);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  border-radius: var(--radius);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(11, 11, 12, 0.18);
}

.icon-tip[hidden] { display: none; }
.icon-tip.is-long { white-space: normal; width: max-content; max-width: min(300px, calc(100vw - 16px)); }

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 12, 0.35);
  z-index: 20;
}

.comment-pop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--bg);
  z-index: 21;
  overflow: auto;
  padding: 16px 16px 28px;
  box-shadow: var(--shadow);
}

.comment-pop-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-pop-head h2 {
  flex: 1;
  text-align: left;
  margin: 0;
}

.ticket-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
}

.ticket-row .ticket-head {
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 0;
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  text-align: center;
  transition: opacity 400ms ease;
}

.status.error {
  color: var(--danger);
}

.status.is-fading {
  opacity: 0;
}

.help p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
  text-align: center;
}

.help a {
  color: var(--ink);
  font-weight: 400;
}

.success {
  text-align: center;
}

.success p {
  color: var(--muted);
  margin: 0 0 22px;
  text-align: center;
}

.success .btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.panel.tracker {
  width: min(100%, 720px);
  text-align: left;
}

.panel.tracker h1,
.panel.tracker .lede,
.panel.tracker .status {
  text-align: left;
}

.panel.tracker label {
  display: grid;
  gap: var(--space-1);
  margin: 0 0 var(--space-3);
}

.panel.tracker select,
.panel.tracker input {
  width: 100%;
}

.panel.tracker input[type="date"],
.panel.tracker input[type="month"],
.panel.tracker input[type="week"] {
  width: 13.5em;
  max-width: 100%;
}

.panel.tracker input[type="datetime-local"] {
  width: 19.5em;
  max-width: 100%;
}

.panel.tracker input[type="time"] {
  width: 8.75em;
  max-width: 100%;
}

.ticket-list {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}

.ticket-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.ticket-head {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  padding: 14px 16px;
  cursor: pointer;
}

.time-form {
  display: grid;
  gap: var(--space-2);
  padding: 0 var(--space-3) var(--space-2);
}

.time-form label {
  display: grid;
  gap: var(--space-1);
  align-content: start;
  font-size: var(--text);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.time-form input,
.time-form select,
.time-form textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.time-form input[type="date"],
.time-form input[type="month"],
.time-form input[type="week"] {
  width: 13.5em;
  max-width: 100%;
  justify-self: start;
}

.time-form input[type="datetime-local"] {
  width: 19.5em;
  max-width: 100%;
  justify-self: start;
}

.time-form input[type="time"] {
  width: 8.75em;
  max-width: 100%;
  justify-self: start;
}

.time-form textarea {
  min-height: 110px;
  resize: vertical;
}

.time-form input:focus,
.time-form select:focus,
.time-form textarea:focus {
  outline: none;
}

.time-form .btn-primary {
  width: auto;
  justify-self: start;
}

.new-ticket-form {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}

/* The contractor's New ticket is a card like its open ticket (.ticket-card),
   so the blue "being edited" frame (shell.css) sits on an edge, not on the
   fields (2026-10-31). */

.field-grid-3 > label,
.field-grid-3 > .radio-field {
  min-width: 0;
}

/* New ticket (contractor): two per row, like the admin ticket form. */
/* Phones: one field per row, like the admin ticket form (Start | Due keep
   their own two-column row, /date-pair.js). */

.radio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.time-form .radio-option,
.radio-option {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 6px 0;
  cursor: pointer;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
}

.time-form .radio-option input,
.radio-option input {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.radio-option:has(input[name="priority"][value="normal"]) { color: var(--priority-normal); }
.radio-option:has(input[name="priority"][value="important"]),
.radio-option:has(input[name="priority"][value="high"]) { color: var(--priority-important); }
.radio-option:has(input[name="priority"][value="critical"]) { color: var(--priority-critical); }
.radio-option:has(input[name="priority"][value="normal"]) input { accent-color: var(--priority-normal); }
.radio-option:has(input[name="priority"][value="important"]) input,
.radio-option:has(input[name="priority"][value="high"]) input { accent-color: var(--priority-important); }
.radio-option:has(input[name="priority"][value="critical"]) input { accent-color: var(--priority-critical); }

.ticket-history {
  display: grid;
  gap: var(--space-2);
  padding: 0 var(--space-3) var(--space-3);
}

.ticket-history-label {
  margin: 0;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
}

.ticket-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.ticket-history-list li {
  display: grid;
  gap: 2px;
  font-size: var(--text);
}

.ticket-history-list time,
.ticket-history-who {
  color: var(--muted);
}

/* Every ticket field with a value, two columns of label/value pairs. */
.ticket-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-3);
  margin: 0;
  padding: 0 var(--space-3) var(--space-3);
  font-size: var(--text);
}

.ticket-detail {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ticket-detail dt {
  margin: 0;
  color: var(--muted);
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.ticket-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ticket-detail-wide {
  grid-column: 1 / -1;
}

.ticket-detail-text {
  white-space: pre-wrap;
}

/* Open ticket: fields and details on the left, the notes thread beside them. */
.ticket-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
}

.ticket-body-main {
  min-width: 0;
}

.ticket-notes {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  min-width: 0;
  padding: 0 var(--space-3) var(--space-3);
  border-left: 1px solid var(--line);
}

.ticket-notes-label {
  margin: 0;
  color: var(--muted);
}

.ticket-notes .status:empty {
  display: none;
}

.ticket-notes [data-comment-list]:not(:empty) {
  display: grid;
  gap: var(--space-2);
  max-height: 260px;
  overflow: auto;
  min-width: 0;
}

.ticket-notes .comment-form textarea {
  min-height: 72px;
}

@media (max-width: 900px) {
  .ticket-body {
    grid-template-columns: 1fr;
  }

  .ticket-notes {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: var(--space-3);
  }
}

/* Contractor edit row on an open ticket: status, assignee, due date (if allowed). */
.ticket-edit {
  display: grid;
  gap: var(--space-2);
  padding: 0 var(--space-3) var(--space-3);
}

.ticket-edit-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2) var(--space-3);
}

.ticket-edit-fields > label {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.ticket-edit-fields select,
.ticket-edit-fields input,
.ticket-edit-fields input[type="date"] {
  width: 100%;
  min-width: 0;
}

.ticket-edit .status {
  margin: 0;
  min-height: 0;
}

.ticket-edit .status:empty {
  display: none;
}

@media (max-width: 520px) {
  .ticket-edit-fields {
    grid-template-columns: 1fr;
  }
}

/* Date, hours, minutes, notes and the button share one row; wraps when narrow. */
.time-log-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2) var(--space-3);
}

.time-log-form .time-log-date {
  flex: 0 0 auto;
}

.time-log-form .time-log-num {
  flex: 0 0 90px;
  width: 90px;
}

.time-log-form .time-log-notes {
  flex: 1 1 160px;
  min-width: 0;
}

.time-log-form .btn-primary {
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  .ticket-details {
    grid-template-columns: 1fr;
  }
}

.new-ticket-form select,
.new-ticket-form input,
.new-ticket-form textarea {
  border-radius: var(--radius-control);
}

/* Collapsed behind the New ticket button until asked for. */
.new-ticket-form[hidden] {
  display: none;
}

.new-ticket-form .check-field {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.new-ticket-form .check-field legend {
  padding: 0;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.new-ticket-form .dropzone {
  position: relative;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-control);
  background: var(--fill);
  text-align: center;
  font-size: var(--text);
}

.new-ticket-form .dropzone p {
  margin: 0;
}

.new-ticket-form .dropzone.is-over {
  border-color: var(--ink);
  background: var(--white);
}

.new-ticket-form .dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.new-ticket-form .dropzone label {
  display: inline;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

.new-ticket-form .dropzone .attach-list {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-2);
  text-align: left;
}

.new-ticket-form .dropzone .attach-list:empty {
  display: none;
}

.new-ticket-form .dropzone .attach-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1);
  align-items: center;
  padding: 6px 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

.new-ticket-form .dropzone .attach-row:has(> img:first-child) { grid-template-columns: 40px minmax(0, 1fr) auto; }

.new-ticket-form .dropzone .attach-row img,
.new-ticket-form .dropzone .attach-row .file-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-control);
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--text-xs);
}

.new-ticket-form .dropzone .attach-row .attach-name {
  overflow-wrap: anywhere;
}

.new-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.new-ticket-actions .btn {
  width: auto;
}

.comment-thread {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.comment-thread [data-comment-list],
.comment-pop [data-comment-list] {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.comment-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--white);
  text-align: left;
}

.comment-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 10px;
  align-items: center;
}

.comment-card header .row-actions {
  margin-left: auto;
}

.comment-card p {
  margin: 0;
  white-space: pre-wrap;
}

.comment-thread > .comment-form,
.comment-pop .comment-form {
  margin-top: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--fill, #f7f5f0);
}

.comment-pop [data-comment-list] + .comment-form {
  margin-top: 12px;
}

.comment-form {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.comment-form label {
  display: grid;
  gap: var(--space-1);
  align-content: start;
  min-width: 0;
  font-size: var(--text);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.comment-form input,
.comment-form select,
.comment-form textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.comment-form textarea {
  min-height: 110px;
  resize: vertical;
}

.comment-form > .btn-primary {
  width: auto;
  justify-self: start;
}

.comment-card .comment-form {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.pill.publish-pending { background: var(--hold-soft); }
.pill.publish-published { background: var(--live-soft); color: var(--live); }
.pill.publish-rejected { background: var(--danger-soft); }

/* Site Pro: High = Critical red, Medium = Important orange, Low = Normal blue. */

.priority-normal { color: var(--priority-normal); }
.priority-important { color: var(--priority-important); }
.priority-critical { color: var(--priority-critical); }

body.contractor {
  background: var(--fill);
}

body.customer {
  background: var(--fill);
  color: var(--ink);
}

.contractor-app,
.customer-app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100dvh;
  background: var(--fill);
}

body.contractor .timer-bar {
  position: sticky;
  top: 0;
}

.contractor-nav,
.customer-nav {
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contractor-nav .nav-brand img,
.customer-nav .nav-brand img {
  width: 148px;
  height: auto;
  display: block;
  margin: 4px 8px 10px;
}

.contractor-nav label,
.customer-nav label {
  display: grid;
  gap: var(--space-1);
  margin: 0 8px;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
}

.contractor-nav select,
.customer-nav select {
  width: 100%;
}

.nav-identity-note {
  margin: 0 8px;
  font-size: var(--text);
  color: var(--muted);
}

.nav-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 4px 0 12px;
}

.nav-kicker {
  margin: 0;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-size: var(--text);
}

.nav-reorder-btn {
  width: var(--icon-box-sm);
  height: var(--icon-box-sm);
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control, 5px);
  color: var(--muted);
  cursor: pointer;
}

.nav-reorder-btn svg {
  width: 16px;
  height: 16px;
}

.nav-reorder-btn:hover {
  background: var(--fill);
  color: var(--ink);
  border-color: var(--line);
}

.nav-reorder-btn.is-active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.panel-nav {
  display: grid;
  gap: 2px;
  margin: 8px 0 auto;
}

.panel-nav a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text);
  font-weight: 400;
}

.panel-nav a:hover { background: var(--fill); color: var(--ink); }

/* Communication group (Internal Chat, Video), same as the admin menu's groups. */
.panel-nav .nav-group { display: grid; gap: 2px; }
.panel-nav .nav-group-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.panel-nav .nav-group-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--text);
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}
.panel-nav .nav-group-head:hover { background: var(--fill); color: var(--ink); }
.panel-nav .nav-group-head > svg:not(.nav-group-chevron) { display: none; }
.panel-nav .nav-group-chevron {
  width: 12px;
  height: 8px;
  color: var(--muted);
  transition: transform 140ms ease;
}
.panel-nav .nav-group.is-open .nav-group-chevron { transform: rotate(180deg); }
.panel-nav .nav-sub { display: grid; gap: 2px; padding: 0 0 2px 18px; }
.panel-nav .nav-sub a { padding: 8px 12px; }
.panel-nav .nav-group.is-drop-into > .nav-group-main {
  outline: 1px dashed var(--accent, #015D87);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.panel-nav a.is-active {
  background: var(--ink);
  color: var(--white);
}

.nav-grip {
  width: 22px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-control, 5px);
  color: inherit;
  cursor: grab;
  opacity: 0.7;
}

.nav-grip svg {
  width: 14px;
  height: 14px;
}

.nav-grip:hover { opacity: 1; }
.nav-grip:active { cursor: grabbing; }

.panel-nav.is-reordering a {
  cursor: grab;
}

.nav-grip[hidden] { display: none; }

.panel-nav { position: relative; }

.panel-nav a.is-dragging {
  opacity: 0.45;
}

/* Drop slot marker placed by nav-order.js. */
.panel-nav .nav-drop-line {
  position: absolute;
  height: 2px;
  border-radius: 1px;
  background: var(--accent, #015D87);
  pointer-events: none;
  z-index: 1;
}
.panel-nav .nav-drop-line[hidden] { display: none; }

.contractor-nav .nav-foot,
.customer-nav .nav-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.contractor-nav .btn-ghost,
.customer-nav .btn-ghost {
  display: inline-block;
  width: auto;
  text-decoration: none;
  text-align: center;
  padding: 8px 12px;
}

.contractor-head h1,
.customer-head h1 {
  text-align: left;
  margin: 0 0 var(--space-1);
}

.contractor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.contractor-head-copy {
  min-width: 0;
}

.contractor-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-1);
  padding-top: 2px;
}

.contractor-head-actions:empty {
  display: none;
}

.contractor-head-actions .btn {
  width: auto;
}

.contractor-head .lede,
.customer-head .lede {
  text-align: left;
  margin: 0 0 var(--space-3);
}

.customer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.customer-head-copy {
  min-width: 0;
}

.customer-identity {
  display: flex;
  align-items: center;
  gap: var(--icon-gap);
  margin: 0 0 var(--space-3);
  margin-left: auto;
}

.customer-identity-copy {
  text-align: right;
}

.customer-identity-copy p {
  margin: 0;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
}

.customer-identity-copy .identity-company {
  color: var(--muted);
}

.customer-identity-menu {
  position: relative;
}

.customer-identity .btn-icon {
  width: var(--icon-box);
  height: var(--icon-box);
  border-radius: var(--radius-control);
}

/* Phones: the signed-in name gets its own line above the page title (as in
   admin), so the title and lede keep the full width (2026-10-23). */
@media (max-width: 700px) {
  .contractor-head, .customer-head { flex-wrap: wrap; row-gap: var(--space-1); }
  .contractor-head > .customer-identity, .customer-head > .customer-identity { order: -1; flex: 1 0 100%; justify-content: flex-end; margin: 0; }
  .contractor-head-copy, .customer-head-copy { flex: 1 1 0; }
}

.customer-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-sm);
  z-index: 30;
}

.customer-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  color: inherit;
  text-decoration: none;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
}

.customer-menu a:hover,
.customer-menu a.is-active {
  background: var(--fill);
}

.customer-menu .customer-menu-logout {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 5px 5px;
}

.member-accordions {
  display: grid;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

.member-row {
  border-bottom: 1px solid var(--line);
}

.member-row:last-child {
  border-bottom: 0;
}

.member-row-head {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.member-row-toggle {
  appearance: none;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: var(--text);
  font-weight: 400;
  cursor: pointer;
}

.member-row-toggle:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: -2px;
}

.member-row.is-open .member-chevron {
  transform: rotate(90deg);
}

.member-chevron {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.member-row-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-row-title,
.member-row-preview {
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
}

.member-row-preview {
  color: var(--muted);
}

.member-row-head .btn-icon {
  align-self: center;
  margin-right: 10px;
  border-radius: var(--radius-control);
}

.member-row-body {
  display: none;
  padding: 4px 14px 20px 42px;
}

.member-row.is-open .member-row-body {
  display: block;
}

.member-row-body .details-form {
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 12px;
}

.contractor-main .status,
.customer-main .status {
  text-align: left;
}

/* Page status line sits between the header/announcement and the first card. */
.contractor-main > .status,
.customer-main > .status {
  margin: var(--space-1) 0 var(--space-3);
}

.dashboard-with-chat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

@media (max-width: 880px) {
  /* minmax(0, …): plain 1fr let a wide table push the page sideways on phones (2026-10-23). */
  .dashboard-with-chat { grid-template-columns: minmax(0, 1fr); }
}

.announce-window {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 18px;
}

/* Announcements show on the dashboard only. */
.announce-window.announce-off {
  display: none;
}

.announce-window .eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
}

.announce-window .announce-head {
  display: flex;
  flex-wrap: wrap; /* on a phone the arrows + Mark as read go under the date instead of off the screen */
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 6px;
}

.announce-window .announce-head .eyebrow {
  margin: 0;
}

.announce-window .announce-date {
  margin: 0;
  white-space: nowrap;
}

.announce-window .announce-head .announce-date + .announce-nav {
  margin-left: auto;
}

.announce-window .announce-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.announce-window .announce-nav .announce-read {
  margin-left: 6px;
}

.announce-window .announce-read[hidden] {
  display: none;
}

.announce-window .announce-step {
  width: 30px;
  height: 30px;
}

.announce-window .announce-step svg {
  width: 16px;
  height: 16px;
}

.announce-window .announce-step:disabled {
  opacity: 0.4;
  cursor: default;
}

.announce-window .announce-count {
  margin: 0;
  font-size: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.announce-window .announce-read,
.announce-window .announce-archive-bar .btn,
.announce-window .announce-archive-head .btn {
  width: auto;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 8px 12px;
  font-size: max(var(--text-min, 0px), var(--btn-font));
}

.announce-window .announce-archive-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.announce-window .announce-archive {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.announce-window .announce-archive-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.announce-window .announce-archive-item + .announce-archive-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.announce-window h2,
.announce-window .announce-title {
  text-align: left;
  margin: 0 0 8px;
  font-size: var(--text);
  font-weight: 400;
}

.announce-window p {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

/* Rich announcement bodies written in the admin editor. */
.announce-window .announce-body {
  margin: 0 0 8px;
  font-size: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.announce-window .announce-body p { white-space: normal; margin: 0 0 8px; }
.announce-window .announce-body p:last-child { margin-bottom: 0; }
.announce-window .announce-body h1,
.announce-window .announce-body h2,
.announce-window .announce-body h3,
.announce-window .announce-body h4 { margin: 12px 0 6px; font-weight: 400; line-height: 1.3; }
.announce-window .announce-body h1 { font-size: var(--heading); }
.announce-window .announce-body h2 { font-size: var(--text-md); }
.announce-window .announce-body h3,
.announce-window .announce-body h4 { font-size: var(--text); }
.announce-window .announce-body ul,
.announce-window .announce-body ol { margin: 0 0 8px; padding-left: 22px; }
.announce-window .announce-body li { margin: 2px 0; }
.announce-window .announce-body a { color: var(--accent, #015D87); text-decoration: underline; }
.announce-window .announce-body img { display: block; max-width: 100%; height: auto; margin: 8px 0; border-radius: var(--radius-control); }
.announce-window .announce-body blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--line, #e5e7eb); color: var(--muted); }
.announce-window .announce-body pre { margin: 8px 0; padding: 8px 10px; overflow: auto; background: var(--paper-2); border-radius: var(--radius-control); font-size: var(--text-sm); }
.announce-window .announce-body table { border-collapse: collapse; margin: 8px 0; }
.announce-window .announce-body th,
.announce-window .announce-body td { padding: 4px 8px; border: 1px solid var(--line, #e5e7eb); font-weight: 400; }
.announce-window .announce-body .ql-align-center { text-align: center; }
.announce-window .announce-body .ql-align-right { text-align: right; }
.announce-window .announce-body .ql-align-justify { text-align: justify; }

.dash-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}

.dash-tile {
  display: grid;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}

a.dash-tile:hover { border-color: var(--line); box-shadow: var(--shadow); }

.dash-tile.alert { box-shadow: inset var(--accent-bar) 0 0 var(--danger), var(--shadow-sm); }
.dash-tile.priority-critical { box-shadow: inset var(--accent-bar) 0 0 var(--priority-critical), var(--shadow-sm); }
.dash-tile.priority-important { box-shadow: inset var(--accent-bar) 0 0 var(--priority-important), var(--shadow-sm); }
.dash-tile.priority-normal { box-shadow: inset var(--accent-bar) 0 0 var(--priority-normal), var(--shadow-sm); }
a.dash-tile.alert:hover { box-shadow: inset var(--accent-bar) 0 0 var(--danger), var(--shadow); }
a.dash-tile.priority-critical:hover { box-shadow: inset var(--accent-bar) 0 0 var(--priority-critical), var(--shadow); }
a.dash-tile.priority-important:hover { box-shadow: inset var(--accent-bar) 0 0 var(--priority-important), var(--shadow); }
a.dash-tile.priority-normal:hover { box-shadow: inset var(--accent-bar) 0 0 var(--priority-normal), var(--shadow); }

.dash-count {
  font-size: var(--heading);
  font-weight: 400;
  color: var(--accent);
}

.filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}


/* Tickets filter bar: /ticket-filters.css (shared with admin). */
.scope-filter {
  display: inline-flex;
  flex-direction: column;
  /* Hold the width the longest name needs; the row wraps instead of squashing. */
  flex: 0 0 auto;
  max-width: 100%;
  gap: var(--space-1);
  margin: 0;
  color: var(--muted);
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* Checkbox that sits in a new-ticket field grid alongside selects. */
.new-ticket-check {
  align-self: end;
  min-height: 44px;
  align-items: center;
  grid-template-columns: 18px 1fr;
}

.new-ticket-check .hint {
  grid-column: 2;
  color: var(--muted);
}

.scope-filter input,
.scope-filter select {
  min-width: 148px;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}

.scope-filter input[type="date"],
.scope-filter input[type="datetime-local"],
.scope-filter input[type="time"],
.scope-filter input[type="month"],
.scope-filter input[type="week"] {
  min-width: 0;
}

/* Same box as a .pill (2px vertical, 10px horizontal): the 1px border takes
   1px of each side's padding so heights match exactly. */
a.chip,
button.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--chip-height);
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: var(--text);
  font-weight: 400;
  padding: 0 11px;
  line-height: 1;
  border-radius: var(--radius-control);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

a.chip:hover,
button.chip:hover,
a.chip.is-active,
button.chip.is-active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}

.section-head h2 {
  text-align: left;
  margin: 0;
}

.section-head a {
  color: var(--ink);
}

.project-list,
.task-group {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.project-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* Company above the project name (David, 2026-10-26). */
.project-card-company {
  flex-basis: 100%;
  font-size: var(--text);
}

.project-card h2 {
  text-align: left;
  margin: 0;
  flex: 1;
}

a.cell-link:hover,
a.cell-link:focus-visible,
button.cell-link:hover,
button.cell-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-card .btn-ghost {
  width: auto;
  display: inline-block;
  text-decoration: none;
  padding: 8px 12px;
  margin: 0 0 12px;
}

.ticket-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ticket-head-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-chevron {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.ticket-head[aria-expanded="true"] .ticket-chevron {
  transform: rotate(90deg);
}

.plain-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
}

.plain-table th,
.plain-table td {
  text-align: left;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-2);
}

.stat-tile {
  background: var(--fill);
  border-radius: var(--radius-control);
  padding: 10px 12px;
}

.stat-tile .dash-count { display: block; }

.issue-list,
.member-list {
  display: grid;
  gap: var(--space-2);
}

.issue-card,
.member-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.issue-card header,
.member-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 8px;
}

.issue-card h3,
.member-card h3 {
  text-align: left;
  margin: 0;
  font-size: var(--text);
}

.issue-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.issue-actions .btn {
  width: auto;
  padding: 8px 12px;
}

/* Contractor Profile: two columns (David, 2026-10-22), one on phones. */
#profile-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-3, 16px); }
#profile-form > .status { grid-column: 1 / -1; }
.profile-signature { margin-top: var(--space-3, 16px); }
@media (max-width: 700px) { #profile-form { grid-template-columns: 1fr; } }

/* Profile fields keep their own height when a row is taller (Job title was
   stretched by the Notifications column beside it, 2026-10-24). */

/* Settings (client and contractor, David 2026-10-24): one card per area,
   fields in two columns like the admin company form, one column on phones. */
.settings-page { display: grid; gap: var(--space-3, 20px); }
.settings-card {
  display: grid;
  gap: var(--space-2, 16px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--board-pad-y, 20px) var(--board-pad-x, 20px);
  min-width: 0;
}
.settings-card > h2 { margin: 0; font-size: var(--heading); font-weight: 500; text-align: left; }
/* An empty "Saved…" line takes no room until there is something to say. */
#profile-form > .status:empty, .settings-card .status:empty { display: none; }
.settings-card > .muted { margin: -8px 0 0; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2, 16px) var(--space-3, 20px);
  align-items: start;
}
.settings-grid label { display: grid; gap: 4px; align-content: start; font-size: var(--text); min-width: 0; }
.settings-grid input, .settings-grid select { width: 100%; min-width: 0; }
.settings-kicker, .settings-wide, .settings-grid > .status { grid-column: 1 / -1; }
.settings-kicker { margin: 8px 0 -6px; color: var(--muted); }
.settings-kicker:first-child { margin-top: 0; }
.settings-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2, 16px) var(--space-3, 20px); }
.settings-checks > .status { grid-column: 1 / -1; }
.settings-check-group { display: grid; gap: 8px; align-content: start; margin: 0; padding: 0; border: 0; min-width: 0; }
.settings-check-group legend { padding: 0; margin: 0 0 8px; color: var(--muted); font-size: var(--text); }
.settings-check-group .check-row { display: grid; grid-template-columns: 16px 1fr; align-items: center; gap: 10px; cursor: pointer; font-size: var(--text); }
.settings-check-group .check-row input { width: 16px; height: 16px; margin: 0; }
/* The shared Notifications card (ticket-alerts.js) inside a Settings card. */
.settings-card .alert-settings { margin: 0; padding: 0; border: 0; min-width: 0; }
.settings-card .alert-settings legend { display: none; }
@media (max-width: 700px) {
  .settings-grid, .settings-checks { grid-template-columns: 1fr; }
}

.pill.status-pending-client-approval,
.pill.status-question,
.pill.status-on-hold,
.pill.status-pending-client { background: var(--hold-soft); }
.pill.status-pending-programmer { background: var(--accent-soft); color: var(--accent); }
.pill.status-pending-approval { background: var(--hold-soft); }
.pill.status-approved { background: var(--accent-soft); color: var(--accent); }
.pill.status-later { background: var(--warn-soft); color: var(--warn-ink); }
.pill.status-declined { background: var(--danger-soft); }
.pill.status-in-progress { background: var(--live-soft); color: var(--live); }
.pill.status-completed { background: var(--live-soft); color: var(--live); }
.pill.status-rejected { background: var(--danger-soft); }

.issue-thread {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--line);
}

.issue-thread p { margin: 0; }
.issue-thread-answer { padding-left: 12px; }

.issue-ask {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.issue-ask label {
  display: grid;
  gap: 4px;
  font-size: var(--text);
  font-weight: 400;
  text-transform: none;
}

.issue-ask[hidden] { display: none; }
.issue-ask textarea { width: 100%; }
.issue-ask .issue-actions { margin-top: 0; }

.issue-actions { flex-wrap: wrap; }

/* Impersonating a contact: a bar across the top with Exit. */
.impersonate-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px;
  background: var(--priority-important);
  color: var(--white);
  font-size: var(--text);
}
.impersonate-bar .btn { width: auto; background: var(--white); color: var(--priority-important); border-color: var(--white); padding: 4px 12px; }

/* Customer "New ticket". */
.ticket-page-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.ticket-page-actions .btn { width: auto; }
.new-ticket-form { margin-bottom: 16px; }
.new-ticket-form h2 { margin: 0; font-size: var(--text-md); text-align: left; }
.new-ticket-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.new-ticket-priority { border: 0; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
/* The legend sits on its own line above the choices, like the admin and contractor
   Priority label; a floated legend sat beside them in Chrome but above in Safari. */
.new-ticket-priority legend { float: none; margin: 0 0 2px; padding: 0; font-size: var(--text); }

/* Customer ticket details and filters. */
.ticket-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--fill, #f6f6f6);
  border-radius: var(--radius-control, 8px);
}
.ticket-details div { min-width: 0; }
.ticket-details dt { font-size: var(--text-xs); color: var(--muted, #666); }
.ticket-details dd { margin: 2px 0 0; font-size: var(--text-sm); }
.filter-tile .filter-row + .filter-row { margin-top: 16px; }
.ticket-filter-clear { align-self: flex-end; margin-bottom: 10px; }
/* As in the admin: search at the right of the top row, priority at the right of the chips. */
.filter-tile .ticket-filter-search,
.filter-tile .ticket-filter-priority { margin-left: auto; }

/* Site Pro (customer panel): recommendations grouped by priority. */
.site-pro-brand { margin: 0 0 12px; color: var(--muted, #666); font-size: var(--text-sm); letter-spacing: 0.02em; }
.site-pro-groups { margin-top: 8px; }
.site-pro-group { margin-top: var(--space-3, 20px); }
.site-pro-group .section-head { align-items: baseline; gap: 8px; justify-content: flex-start; }
.site-pro-card header { align-items: center; }
.site-pro-card h3 { flex: 1 1 auto; }
.site-pro-price { font-weight: 600; white-space: nowrap; text-align: right; }
/* AUD estimate under a price in another currency (public/site-pro-price.js). */
.site-pro-aud { display: block; max-width: 220px; font-weight: 400; font-size: var(--text-sm); color: var(--muted, #666); white-space: normal; }
@media (max-width: 560px) {
  .site-pro-price { text-align: left; }
  .site-pro-aud { max-width: none; }
}
.site-pro-summary { margin: 0; }
.pill.site-pro-category { background: var(--accent-soft); color: var(--accent); }
.site-pro-detail { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.site-pro-detail summary { cursor: pointer; font-weight: 500; color: var(--accent); }
.site-pro-detail-body { display: grid; gap: 10px; margin-top: 8px; }
.site-pro-detail h4 { margin: 0 0 4px; font-size: var(--text); }
.site-pro-files ul { margin: 0; padding-left: 18px; }

@media (max-width: 800px) {
  .contractor-app,
  .customer-app {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .panel {
    padding: 28px 18px 22px;
    border-radius: var(--radius);
  }
}

body.is-held .panel-nav,
body.is-held .customer-identity,
body.is-held .chat-dash,
body.is-held .chat-dash-stack,
body.is-held .timer-bar {
  display: none;
}

.hold-screen {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 28px 24px;
  max-width: 720px;
}

.hold-html {
  font-size: var(--text);
  font-weight: 400;
  line-height: 1.5;
}

.hold-html p { margin: 0 0 10px; }
.hold-html p:last-child { margin-bottom: 0; }
.hold-html ul, .hold-html ol { margin: 0 0 10px; padding-left: 1.2em; }

/* Every text button is the size of a status filter chip (29px tall). The
   doubled class outranks the per-area .x .btn padding overrides; square
   icon buttons keep their own size. */

/* Secondary buttons (ghost or plain): white with a brand-black outline,
   the same as the filter chips. */
.btn.btn:not(.btn-icon):not(.btn-primary) {
  background: var(--bg, #fff);
  border: 1px solid var(--ink);
  color: var(--ink);
}

.btn.btn:not(.btn-icon):not(.btn-primary):hover:not(:disabled) {
  background: var(--fill, #f3f4f6);
}

/* The sizing rule above sets display, which would beat the hidden attribute. */

/* Sub tickets in the contractor and customer panels. */
.subticket-note { display: block; font-size: var(--text-sm); }
.subticket-parent { margin: 0; color: var(--muted); font-size: var(--text); }
.subtickets { display: grid; gap: 4px; }
.subtickets-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.subtickets-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text);
}
.subtickets-list li:last-child { border-bottom: 0; }
.subtickets-list .muted { margin-left: auto; font-size: var(--text-sm); }

/* Contact dashboard: the company's ticket email address. */
.ticket-email-copy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ticket-email-address { font-weight: 500; color: var(--ink); word-break: break-all; }
.ticket-email-copy .btn { width: auto; }

.welcome-body > :first-child, .welcome-body .rich-text > :first-child { margin-top: 0; }
.welcome-body > :last-child, .welcome-body .rich-text > :last-child { margin-bottom: 0; }

/* Exact vertical centring for text-only buttons: trim the line box to the
   capital letters, then pad it evenly to 29px. Independent of font metrics
   (ascender/descender space is what made the label sit off-centre). */
@supports (text-box: trim-both cap alphabetic) {
}

/* Contact panel → Resources (paintResources in public/customer/app.js). */
.resource-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.resource-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.resource-card { text-align: left; }
.resource-card h2 { margin: 0; text-align: left; font-size: var(--heading); font-weight: 600; }
.resource-card .resource-body { color: var(--text); font-size: var(--text); line-height: 1.5; }
.resource-card .resource-body > :first-child { margin-top: 0; }
.resource-card .resource-actions { margin-top: auto; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Download beside Open on a resource document (contact + contractor Resources). */
/* One line per document (several per resource): Open + Download side by side. */
.resource-card .resource-file { flex: 1 1 100%; display: flex; flex-wrap: nowrap; align-items: center; gap: var(--control-gap); min-width: 0; }
/* A long file name is cut with … so Download stays on the same line. */
.resource-card .resource-file .resource-open { display: inline-block; flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-card .resource-file .resource-download { flex: none; }
.resource-card .resource-download { display: inline-flex; align-items: center; gap: 6px; }
.resource-card .resource-download svg { width: 14px; height: 14px; flex: none; }
.resource-card .resource-type { margin: 0; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* Contractor ticket check list (checklistSection, public/contractor/app.js). */
.ticket-checklist-c { display: grid; gap: 8px; margin-top: var(--space-2, 16px); }
.ticket-checklist-body { display: grid; gap: 8px; }
/* Same heading as the admin Check list (section-fold.js adds the dot, count and chevron). */
.ticket-checklist-c > .ticket-notes-label { color: var(--ink, #111); font-weight: 600; }
.ticket-checklist-c .ticket-notes-label .muted { font-weight: 400; margin-left: 6px; }
.ticket-checklist-c .checklist-bar { height: 4px; border-radius: 2px; background: var(--line, #e5e5e5); overflow: hidden; }
.ticket-checklist-c .checklist-bar span { display: block; height: 100%; background: var(--success, #2e7d32); }
.ticket-checklist-c .checklist-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ticket-checklist-c .checklist-item label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.ticket-checklist-c .checklist-item input { margin-top: 3px; flex: none; }
.ticket-checklist-c .checklist-item.is-done span { text-decoration: line-through; color: var(--muted, #6b7280); }
.ticket-checklist-c .status:empty { display: none; }
/* A ticket the contractor raised (ownsTicket): they write the list too, as on the admin ticket. */
.ticket-checklist-c.is-owned .checklist-item { display: flex; align-items: center; gap: var(--control-gap); }
.ticket-checklist-c.is-owned .checklist-item label { flex: none; }
.ticket-checklist-c.is-owned .checklist-item input[type="checkbox"] { margin-top: 0; }
.ticket-checklist-c .checklist-text-input { flex: 1 1 auto; min-width: 0; height: var(--control-height, 40px); }
.ticket-checklist-c .checklist-item.is-done .checklist-text-input { text-decoration: line-through; color: var(--muted, #6b7280); }
.ticket-checklist-c .checklist-remove { flex: none; }
.ticket-checklist-c .checklist-add { display: flex; gap: var(--control-gap); align-items: center; }
.ticket-checklist-c .checklist-add textarea { flex: 1 1 auto; min-width: 0; resize: vertical; }
.ticket-checklist-c .checklist-hint { margin: 0; }
/* Raised by them: the open ticket's fields are boxes (ownTicketFields). */
.ctv-own { display: grid; gap: var(--space-3); min-width: 0; }
.ctv-own-fields .ctv-wide { grid-column: 1 / -1; }
.ctv-own-fields dd > :is(input, select) { width: 100%; min-width: 0; box-sizing: border-box; }
.ctv-own-fields dt label { font: inherit; color: inherit; }
/* Add sub ticket under a ticket they raised: the field and its button on one line. */
.subtickets .subticket-add { display: flex; gap: var(--control-gap); align-items: center; margin-top: var(--control-gap); }
.subtickets .subticket-add input { flex: 1 1 auto; min-width: 0; }
.subtickets .status:empty { display: none; }
@media (max-width: 700px) {
  .ctv-fields.ctv-own-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Contractor ticket editor: who's on the ticket (several can be). */
.ticket-edit-assignees { display: grid; gap: 4px; align-content: start; font-size: var(--text); }
.ticket-edit-assignees .label-text { color: var(--muted, #6b7280); font-size: var(--text-sm); }
/* Opened ticket's Assignee: a box like a select that opens a tick list
   (assigneePick, public/contractor/app.js; admin twin in admin.css). */
.ctv-fields .assignee-pick { position: relative; min-width: 0; }
.ctv-fields .assignee-pick-btn {
  width: 100%;
  height: var(--control-height, 38px);
  padding: 0 34px 0 var(--control-pad-x, 12px);
  border: 1px solid var(--line, #e5e5e5);
  border-radius: var(--radius-control, 8px);
  background: var(--control-bg, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23555' stroke-width='1.4'%3E%3Cpath d='M1.5 1.5L6 6 10.5 1.5'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
  color: var(--ink, #1b1b1b);
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  /* size: .field-picker (fields.css), same as a <select> */
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.ctv-fields .assignee-pick-btn:disabled { opacity: 0.6; cursor: progress; }
.ctv-fields .assignee-pick-pop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(320px, 90vw);
  max-height: 300px;
  overflow-y: auto;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line, #e5e5e5);
  border-radius: var(--radius-control, 8px);
  background: var(--white);
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.12));
}
.ctv-fields .assignee-pick-pop[hidden] { display: none; }
.ctv-fields .assignee-pick-group { margin: 6px 4px 2px; font-size: var(--text-sm); color: var(--muted, #6b7280); }
.ctv-fields .assignee-pick-pop .check { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: var(--radius-control); cursor: pointer; }
.ctv-fields .assignee-pick-pop .check:hover { background: var(--paper-2, #f5f5f5); }
.ctv-fields .assignee-pick-pop .check.is-locked { cursor: default; opacity: 0.75; }
.ctv-fields .assignee-pick-pop input[type="checkbox"] { width: auto; margin: 0; }

/* An opened ticket scrolls to the top, clear of the page header (2026-10-22). */
.ticket-card { scroll-margin-top: 80px; }

/* Contractor Tickets: search and Group by beside the filters (ticket-table.js). */
.tt-tools { display: flex; align-items: flex-end; gap: var(--space-2, 12px); margin-left: auto; flex-wrap: wrap; }
.tt-tools .search input { height: 38px; padding: 0 12px; min-width: 200px; }
.ticket-open:not(:empty) { margin-bottom: var(--space-3, 16px); }

/* Open ticket in the admin form's layout (contractor panel, 2026-10-22):
   fields, Description, Attachments and time on the left; Comments float on
   the right at window height with the Check list under them. */
.ticket-card.is-form .ctv-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: var(--space-3, 20px); padding: 0 var(--board-pad-x, 20px) var(--board-pad-y, 20px); align-items: start; }
.ctv-main { display: grid; gap: var(--space-3, 20px); min-width: 0; align-content: start; }
.ctv-main h3, .ctv-col h3 { margin: 0 0 8px; font-size: var(--text-md); font-weight: 600; }
.ctv-main .ticket-edit { padding: 0; }
/* Top row of an open ticket, as on the admin ticket desk (David, 2026-10-26):
   Status, Due date (when allowed), Reminder and Time Tracker side by side,
   each a label over a 40px bordered box. */
.ctv-main .ticket-edit-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ctv-main .ticket-edit-fields > label,
.ctv-box-field { display: grid; gap: 10px; justify-items: start; margin: 0; font-size: var(--text); color: var(--ink); white-space: nowrap; }
.ctv-main .ticket-edit-fields > label { flex: 0 0 170px; justify-items: stretch; }
.ctv-main .ticket-edit-fields .gsel, .ctv-main .ticket-edit-fields .gsel-trigger { width: 100%; }
/* Phones: Start and Due date share one line, half each (David, 2026-11-05,
   contractors may edit the start date too). */
@media (max-width: 520px) {
  .ctv-main .ticket-edit-fields:has(.ctv-date) > label:first-child { flex-basis: 100%; }
  .ctv-main .ticket-edit-fields > label.ctv-date { flex: 1 1 40%; min-width: 0; }
  /* Status takes its own line; half a phone is tight for a date and its
     calendar icon, so less padding keeps the icon whole. */
  .ctv-main .ticket-edit-fields > label.ctv-date input { padding-left: var(--space-1); padding-right: 0; letter-spacing: -0.3px; }
  .ctv-main .ticket-edit-fields > label.ctv-date input::-webkit-calendar-picker-indicator { margin-left: 0; padding: 0; }
}
.ctv-box-label { font-size: var(--text); color: var(--ink); }
.ctv-box,
.ctv-reminder > .dt-pick { display: inline-flex; align-items: center; gap: 4px; box-sizing: border-box; height: var(--control-height, 40px); min-height: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-control, 5px); background: var(--control-bg, #fff); }
.ctv-box .btn-icon.btn-icon, .ctv-reminder .dt-pick-icon { width: var(--icon-box); height: var(--icon-box); min-height: 0; border: 0; background: transparent; box-shadow: none; }
.ctv-box .btn-icon:hover { background: rgba(0, 0, 0, .05); }
.ctv-time-total { padding: 0 4px; font-variant-numeric: tabular-nums; }
.ctv-box.ctv-ro-box { padding: 0 12px; background: var(--paper-2, #f9fafb); font-variant-numeric: tabular-nums; }
/* Read-only fields (a contractor can't change them) in the admin form's boxes. */
.ctv-fields dt { font-size: var(--text); color: var(--ink); margin: 0 0 10px; }
.ctv-fields dd.ctv-ro { display: flex; align-items: center; box-sizing: border-box; min-height: var(--control-height, 40px); padding: 8px var(--control-pad-x, 12px); border: 1px solid var(--line); border-radius: var(--radius-control, 5px); background: var(--paper-2, #f9fafb); line-height: 1.35; }
.ctv-fields dd.ctv-ro.is-empty { color: var(--muted); }
.ctv-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; }
.ctv-fields dd { margin: 0; overflow-wrap: anywhere; }
.ctv-description .ticket-detail-text { white-space: normal; }
.ctv-description .ticket-detail-text img { max-width: 100%; height: auto; }
.ctv-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ctv-files p { margin: 0; }
.ctv-file { display: inline-flex; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--text-sm); text-decoration: none; color: inherit; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctv-file:hover { border-color: var(--accent, #015D87); }
.ctv-file-item { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.ctv-file-item .btn-icon { width: var(--icon-box-sm); height: var(--icon-box-sm); flex: none; }
.ctv-add-file { cursor: pointer; }
.ctv-attachments .status:empty { display: none; }
/* As tall as the comments, never taller than the room left on screen
   (--cfold-room, kept by comment-fold.js), so the comment box is in view
   before the column sticks; no empty gap under "No comments yet." (David,
   2026-10-30). */
.ctv-col { --cfold-room: calc(100dvh - 100px); display: flex; flex-direction: column; gap: var(--space-2, 16px); min-width: 0; position: sticky; top: 84px; align-self: start; height: auto; max-height: var(--cfold-room); min-height: 0; }
.ctv-col > .ctv-comments { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--board-pad-y, 16px) var(--board-pad-x, 16px); }
.ctv-comments .comment-thread { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 0; }
/* Comment cards fill the column's width, as in admin. */
.ctv-comments [data-comment-list] { gap: 10px; }
.ctv-comments [data-comment-list]:not(:empty) { flex: 0 1 auto; max-height: none; min-height: 0; overflow: auto; align-content: start; }
.ctv-comments .comment-form { flex: none; display: grid; gap: 6px; }
.ctv-comments .comment-form .muted { margin: 0; font-size: var(--text-sm); }
.ctv-col > .ticket-checklist-c { flex: none; display: flex; flex-direction: column; min-height: 0; margin-top: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--board-pad-y, 16px) var(--board-pad-x, 16px); }
.ctv-col > .ticket-checklist-c[hidden] { display: none; }
/* Every item shows, no height cap or inner scroll bar (David, 2026-11-01). A
   column whose Comments (160px+) and check list don't fit the window (.is-too-tall)
   stops the column floating, so every item can be scrolled to. */
.ctv-col > .ticket-checklist-c > * { flex: none; margin: 0; }
.ctv-col.is-too-tall { position: static; max-height: none; }
.ctv-col.is-too-tall > .ctv-comments { max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); }
@media (max-width: 900px) {
  .ticket-card.is-form .ctv-split { grid-template-columns: 1fr; }
  .ctv-col { position: static; height: auto; max-height: none; min-height: 0; }
  /* As tall as the comments, never taller than the screen; only the list
     scrolls (#185, 2026-10-28). Without this the open panel shrank to its
     heading on phones. */
  .ctv-col > .ctv-comments { flex: none; min-height: 0; max-height: calc(100vh - 80px - var(--page-head-h, 0px)); max-height: calc(100dvh - 80px - var(--page-head-h, 0px)); }
  .ctv-comments .comment-thread,
  .ctv-comments [data-comment-list]:not(:empty) { flex: 0 1 auto; max-height: none; }
}
.ctv-main h3, .ctv-col h3 { text-align: left; }
.ctv-main .btn, .ctv-col .comment-form .btn { width: auto; justify-self: start; align-self: flex-start; }
.ctv-main .ticket-edit-assignees { display: none; }
.ctv-main .time-log-form { padding: 0; align-items: flex-end; }
.ctv-main .time-log-form .btn { align-self: flex-end; }
/* An open ticket's top line reads as the desk heading: subject large, company · status under it. */
.ticket-card.is-form > .ticket-row .ticket-head-copy > span:first-child { font-size: var(--heading); font-weight: 600; }
.ctv-comments .comment-form { padding: 0; border: 0; background: none; }

/* Pinned tickets above the contractor Tickets list. */
.tt .btn-icon.is-on { color: var(--accent, #015D87); border-color: var(--accent, #015D87); }

/* Client portal and contractor panel use the admin look (David, 2026-10-24:
   "need proper buttons with the same style as admin buttons"). Values match
   public/admin/admin.css; scoped to the two panels so the login pages keep
   their full-width buttons. */

/* An empty lede or page status line takes no room: the page starts right
   under its title, as in admin. */
:is(.customer-head, .contractor-head) .lede:empty,
:is(.customer-main, .contractor-main) > .status:empty { display: none; }

/* Side menu: icon, label, then badge / drag grip, as in admin. */
:is(body.customer, body.contractor) .panel-nav a {
  position: relative;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 10px;
  transition: background 140ms ease, color 140ms ease;
}
:is(body.customer, body.contractor) .panel-nav a > svg { display: block; opacity: 0.72; }
:is(body.customer, body.contractor) .panel-nav a.is-active > svg { opacity: 1; }
:is(body.customer, body.contractor) .panel-nav a:hover { background: var(--paper, #f3f4f6); }
:is(body.customer, body.contractor) .panel-nav a.is-active { background: var(--ink); color: var(--white); }
:is(body.customer, body.contractor) .panel-nav a.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--live);
}

/* Contractor Profile → Signature: a card with a heading, not a frame in a card. */
.profile-signature > .signature-settings { margin: 0; padding: 0; border: 0; min-width: 0; }
.profile-signature > .signature-settings > legend { padding: 0; margin: 0 0 8px; font-size: var(--heading); font-weight: 500; }

/* Contractor page actions (New ticket) sit at the right, by the name, not mid-header. */
.contractor-head-actions { margin-left: auto; }
.contractor-head-actions + .customer-identity { margin-left: 0; }
/* Laptop: title + intro take what the buttons and name leave, so a long intro
   runs up to them (as admin's .topbar-copy, David 2026-11-02 "spread this out"). */
@media (min-width: 701px) {
  .contractor-head-copy, .customer-head-copy { flex: 1 1 0; min-width: 30%; }
}
/* Title, Search, New and the signed-in name on one line, staying in view while
   the page scrolls, as in admin (David, 2026-10-25). Under the phone top bar,
   not beneath it (--sticky-top, shell.css). */
/* Phones, as admin's .topbar (David, 2026-10-31 "uniform"): a head with a
   search stays in view and spans the full width so cards don't show beside
   it; one with no search scrolls away with the page. */
.contractor-head-actions { align-items: center; }
.contractor-head-actions .search input { width: 220px; max-width: 100%; }
@media (max-width: 700px) {
  /* Buttons stay on the title row unless there is a search (as admin, 2026-10-29). */
  :is(.contractor-head, .customer-head) > .contractor-head-actions { flex: 0 1 auto; margin: 0 0 0 auto; justify-content: flex-end; }
  :is(.contractor-head, .customer-head) > .contractor-head-actions:has(.search) { order: 2; flex: 1 0 100%; margin: 0 0 var(--space-2, 12px); justify-content: flex-start; }
  .contractor-head-copy, .customer-head-copy { min-width: 40%; }
  .contractor-head-actions .search { flex: 1 1 0; min-width: 0; }
  .contractor-head-actions .search input { width: 100%; }
  /* The sticky search head spaced as admin's (David, 2026-10-31 "uniform"):
     10px above the title and below the search, 10px between them. */
  :is(.contractor-head, .customer-head):has(.search) { padding-block: 10px; row-gap: 10px; margin-bottom: 14px; }
  :is(.contractor-head, .customer-head):has(.search) h1 { margin: 0; line-height: 1.2; }
  :is(.contractor-head, .customer-head) > .contractor-head-actions:has(.search) { margin-bottom: 0; padding-top: 0; }
}

/* Log out / Log in: full width at the foot of the menu, as in admin. */
:is(.contractor-nav, .customer-nav) .nav-foot { display: grid; padding: 18px 12px 8px; }
:is(.contractor-nav, .customer-nav) .nav-foot .btn-ghost { display: block; width: 100%; padding: 11px 16px; }

/* Phones: less side padding round the page and the New ticket form, so
   fields run nearly the width of the screen (David, 2026-10-25). */
@media (max-width: 700px) {
  /* Page side padding: --page-pad-phone in shell.css (same in every panel). */
}

/* Autosave: "Auto Saved.." is green and bold; saving errors stay red. A form
   with a Save button shows the line just left of Save / Cancel (auto-save.js). */
.status.autosave-beside { align-self: center; margin: 0 4px 0 0; min-height: 0; text-align: right; min-width: 0; }
.status.autosave-beside:empty { display: none; }

/* Open contractor ticket: "Auto Saved.." small in the card's top-right
   corner, on the subject line just left of the fold arrow, as on the admin
   ticket. Out of the flow, so nothing shifts when it shows (David, 2026-10-28). */
.ticket-row.has-top-status { position: relative; }
.ticket-row.has-top-status .ticket-head-copy > span:first-child { padding-right: 96px; }
.ticket-row.has-top-status > .ticket-top-status { position: absolute; top: var(--space-3); right: calc(var(--space-3) + 32px); margin: 0; min-height: 0; max-width: 50%; font-size: var(--text-sm); line-height: 25px; text-align: right; pointer-events: none; }
.ticket-row.has-top-status > .ticket-top-status:empty { display: none; }

/* Client Billing page (2026-11-01, paintBilling in public/customer/app.js). */
.billing { display: grid; gap: 22px; min-width: 0; }
.billing-group { display: grid; gap: 8px; min-width: 0; }
.billing-group > h2 { margin: 0; font-size: var(--text-md); font-weight: 600; }
/* Laptop: the table sits in a white card like every other list, not loose on
   the grey page. Phones keep the dt-cards tiles (no box inside a box). */
@media (min-width: 701px) {
  .billing-group > .table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
}

/* A comment shown on Send while the server saves it looks like a saved one
   (David, 2026-11-10: "not greyed out"); a refused one is taken out and its
   words go back in the box with the reason. */
