:root {
  --ink: #17212b;
  --muted: #5f6d7a;
  --line: #d9e1e8;
  --surface: #ffffff;
  --surface-soft: #f6f8fa;
  --surface-strong: #eaf1f8;
  --brand: #0e5a8a;
  --brand-dark: #07446a;
  --accent: #f2a93b;
  --danger: #b42318;
  --danger-soft: #fff0ef;
  --success: #087443;
  --success-soft: #eaf8f1;
  --shadow: 0 8px 24px rgb(29 52 72 / 8%);
  --radius: 0.7rem;
  --radius-sm: 0.4rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 20rem;
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font: 1rem/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 80%, white); outline-offset: 3px; }

.shell { width: min(100% - 2rem, 90rem); margin-inline: auto; }

.skip-link {
  position: fixed; z-index: 10; top: -4rem; left: 1rem; padding: 0.7rem 1rem;
  color: white; background: var(--brand-dark); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  position: sticky; z-index: 4; top: 0; border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%); backdrop-filter: blur(12px);
}
.site-header__inner { display: flex; min-height: 4.5rem; align-items: center; gap: 1.5rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink);
  font-weight: 750; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand small { color: var(--muted); font-size: 0.7em; font-weight: 600; }
.brand__mark {
  display: grid; width: 2rem; height: 2rem; place-items: center; color: white;
  background: var(--brand); border-radius: 0.55rem; font-size: 0.72rem; letter-spacing: 0.03em;
}

.primary-nav { display: flex; flex: 1; gap: 0.25rem; align-items: center; }
.primary-nav a, .button {
  display: inline-flex; min-height: 2.35rem; align-items: center; justify-content: center;
  gap: 0.4rem; padding: 0.45rem 0.8rem; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--ink); background: transparent; cursor: pointer; font-weight: 650; text-decoration: none;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] {
  color: var(--brand-dark); background: var(--surface-strong);
}
.account-menu { display: flex; gap: 0.65rem; align-items: center; }
.account-menu__name { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }

.button { color: white; background: var(--brand); box-shadow: 0 1px 2px rgb(14 90 138 / 22%); }
.button:hover { color: white; background: var(--brand-dark); }
.button--secondary { color: var(--brand-dark); border-color: #a7c7dc; background: white; box-shadow: none; }
.button--secondary:hover { color: var(--brand-dark); background: var(--surface-strong); }
.button--danger { background: var(--danger); }
.button--danger:hover { background: #8c1d14; }
.button--quiet { min-height: auto; padding: 0.3rem 0.45rem; color: var(--brand); background: transparent; box-shadow: none; }
.button--quiet:hover { color: var(--brand-dark); background: var(--surface-strong); }
.button--small { min-height: 2rem; padding: 0.3rem 0.55rem; font-size: 0.86rem; }

.page-content { padding-block: 2rem 4rem; }
.page-header { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h1, .page-header h2, .card h2, .card h3 { margin-top: 0; letter-spacing: -0.025em; }
.page-header h1 { margin-bottom: 0.2rem; font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.15; }
.page-header p { max-width: 48rem; margin: 0; color: var(--muted); }
.actions, .form-actions, .filters, .inline-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }

.messages { display: grid; gap: 0.65rem; margin-bottom: 1rem; }
.message, .planner-status { padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; }
.message--success, .planner-status--success { color: #075234; border-color: #a9e3c4; background: var(--success-soft); }
.message--error, .message--danger, .planner-status--error { color: #8c1d14; border-color: #ffc6c2; background: var(--danger-soft); }
.planner-status:empty { display: none; }

.card { padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }

.configuration-stack { display: grid; gap: 1rem; }
.configuration-panel { padding: 0; overflow: hidden; }
.configuration-panel__header {
  display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between;
  padding: 1.15rem clamp(1rem, 2vw, 1.5rem); border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, var(--surface) 0%, var(--surface-soft) 100%);
}
.configuration-panel__heading { min-width: 0; }
.configuration-panel__title-row, .configuration-panel__actions, .capability-list, .status-control {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.configuration-panel__title-row h2 { margin: 0; }
.configuration-panel__heading p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.9rem; }
.configuration-panel__actions { flex: 0 0 auto; }
.configuration-panel .table-wrap { border: 0; border-radius: 0; }
.configuration-table { min-width: 38rem; }
.configuration-table th { white-space: nowrap; }
.configuration-order { width: 5.5rem; color: var(--brand-dark); font-variant-numeric: tabular-nums; font-weight: 750; }
.configuration-table__order { width: 6.5rem; }
.configuration-table__order input { max-width: 5.5rem; font-variant-numeric: tabular-nums; }
.catalogue-name { font-weight: 700; }
.catalogue-code { margin-left: 0.45rem; color: var(--muted); font-size: 0.82rem; }
.status-control { flex-wrap: nowrap; gap: 0.35rem; color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.configuration-table .errorlist { margin-top: 0.35rem; font-size: 0.78rem; }
.configuration-form__errors, .configuration-table__errors td {
  padding: 0.75rem 1rem; color: #8c1d14; background: var(--danger-soft);
}
.configuration-form__errors .errorlist { margin: 0; }
.configuration-panel__footer {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1rem, 2vw, 1.5rem); border-top: 1px solid var(--line); background: var(--surface-soft);
}
.configuration-panel__footer .field__hint { margin: 0; }

.eyebrow {
  margin: 0 0 0.35rem; color: var(--brand-dark); font-size: 0.76rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.jobs-page { display: grid; gap: 1rem; }
.jobs-page .card + .card { margin-top: 0; }
.jobs-page__header { align-items: center; margin-bottom: 0; }
.jobs-page__title-row { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
.jobs-page__title-row h1 { margin: 0; }
.jobs-page__count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.jobs-page__actions { flex: 0 0 auto; }
.jobs-toolbar {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1rem, 2vw, 1.25rem); box-shadow: 0 3px 12px rgb(29 52 72 / 5%);
}
.jobs-search { display: flex; flex: 1 1 34rem; gap: 0.65rem; align-items: center; }
.jobs-search__field { flex: 1 1 auto; }
.jobs-search__field input { min-height: 2.6rem; }
.jobs-toolbar__summary { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 0.9rem; text-align: right; }
.jobs-toolbar__summary strong { color: var(--ink); font-weight: 700; }
.jobs-register { padding: 0; overflow: hidden; }
.jobs-register__header {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1rem, 2vw, 1.5rem); border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, var(--surface) 0%, var(--surface-soft) 100%);
}
.jobs-register__header h2 { margin: 0; font-size: 1.15rem; }
.jobs-register__header p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.9rem; }
.jobs-register__table-wrap { border: 0; border-radius: 0; }
.jobs-table { min-width: 50rem; }
.jobs-table th, .jobs-table td { vertical-align: middle; }
.jobs-table th:last-child, .jobs-table td:last-child { width: 1%; white-space: nowrap; }
.jobs-table tbody tr { transition: background 120ms ease, box-shadow 120ms ease; }
.jobs-table tbody tr:hover { background: #f3f8fc; box-shadow: inset 3px 0 0 var(--brand); }
.jobs-table__job { display: inline-block; color: var(--ink); font-weight: 750; text-decoration: none; }
.jobs-table__job:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 0.18em; }
.jobs-table__internal-id, .jobs-table__address, .jobs-table__postcode { display: block; }
.jobs-table__internal-id { margin-top: 0.16rem; color: var(--muted); font-size: 0.78rem; }
.jobs-table__address { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobs-table__postcode { margin-top: 0.16rem; color: var(--muted); font-size: 0.84rem; font-weight: 650; }
.jobs-table__action .button { white-space: nowrap; }
.jobs-empty-state { max-width: 34rem; margin-inline: auto; padding-block: clamp(3rem, 10vw, 5.5rem); }
.jobs-empty-state p:not(.eyebrow) { margin: 0 auto 1.25rem; color: var(--muted); }
.jobs-pagination {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between;
  padding: 0 0.15rem; color: var(--muted);
}
.jobs-pagination p { margin: 0; font-size: 0.9rem; }
.muted { color: var(--muted); }
.meta-list { display: grid; grid-template-columns: minmax(7rem, 0.45fr) 1fr; gap: 0.55rem 1rem; margin: 0; }
.meta-list dt { color: var(--muted); font-weight: 600; }
.meta-list dd { margin: 0; }

.choice-button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.choice-button {
  position: relative;
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid #b7c4cf;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: white;
  cursor: pointer;
  font-weight: 650;
}
.choice-button:hover { border-color: var(--brand); background: #f3f8fc; }
.choice-button:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(14 90 138 / 18%); }
.choice-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.choice-button:has(input:checked) {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 0.35rem; }
.field--wide { grid-column: 1 / -1; }
.field label { font-weight: 650; }
.field__hint { color: var(--muted); font-size: 0.875rem; }
.field__errors, .errorlist { margin: 0; padding-left: 1.15rem; color: var(--danger); font-size: 0.9rem; }
input, select, textarea { width: 100%; padding: 0.6rem 0.7rem; border: 1px solid #b7c4cf; border-radius: var(--radius-sm); color: var(--ink); background: white; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid rgb(14 90 138 / 22%); outline-offset: 0; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; }
textarea { min-height: 7rem; resize: vertical; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: var(--surface-soft); font-size: 0.82rem; font-weight: 750; letter-spacing: 0.03em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; padding: 0.18rem 0.45rem; border-radius: 999px; color: var(--brand-dark); background: var(--surface-strong); font-size: 0.8rem; font-weight: 700; }
.badge--draft { color: #755500; background: #fff5d6; }
.badge--published, .badge--active { color: #075234; background: var(--success-soft); }
.badge--archived, .badge--inactive { color: var(--muted); background: #edf0f2; }
.empty-state { padding: 2.5rem 1rem; text-align: center; }
.empty-state h2 { margin-bottom: 0.25rem; }

.planner-layout { display: grid; gap: 1rem; grid-template-columns: minmax(14rem, 0.26fr) minmax(0, 1fr); }
.planner-sidebar { align-self: start; }
.planner-sidebar h2 { margin-bottom: 0.25rem; font-size: 1rem; }
.planner-sidebar__list { display: grid; gap: 0.55rem; max-height: 60vh; overflow: auto; }
.work-card, .schedule-card { display: grid; gap: 0.25rem; padding: 0.65rem; border: 1px solid #c9d9e5; border-radius: var(--radius-sm); background: white; box-shadow: 0 1px 2px rgb(29 52 72 / 5%); }
.work-card[draggable="true"], .schedule-card[draggable="true"] { cursor: grab; }
.work-card[draggable="true"]:active, .schedule-card[draggable="true"]:active { cursor: grabbing; }
.work-card__title, .schedule-card__title { color: var(--ink); font-size: 0.88rem; font-weight: 750; line-height: 1.25; }
.work-card__meta, .schedule-card__meta { color: var(--muted); font-size: 0.78rem; }
.planner-scroll { overflow-x: auto; }
.planner-grid { display: grid; min-width: 52rem; grid-template-columns: minmax(9rem, 0.75fr) repeat(7, minmax(9rem, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); }
.planner-grid__corner, .planner-grid__day, .planner-grid__engineer, .planner-cell { min-height: 4.5rem; padding: 0.55rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.planner-grid__day { color: var(--muted); background: var(--surface-soft); font-size: 0.8rem; font-weight: 750; text-align: center; }
.planner-grid__day strong { display: block; color: var(--ink); font-size: 0.95rem; }
.planner-grid__engineer { display: grid; align-content: center; color: var(--ink); background: var(--surface-soft); font-weight: 700; }
.planner-grid__engineer small { color: var(--muted); font-weight: 500; }
.planner-cell { display: grid; align-content: start; gap: 0.45rem; min-height: 7rem; transition: background 120ms ease, box-shadow 120ms ease; }
.planner-cell--drop-target { background: #e8f4fb; box-shadow: inset 0 0 0 2px var(--brand); }
.schedule-card { border-left: 4px solid var(--brand); }
.schedule-card--pending { opacity: 0.55; pointer-events: none; }
.planner-fallback { margin-top: 1rem; }

.dialog { width: min(100% - 2rem, 38rem); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 24px 80px rgb(15 36 53 / 28%); }
.dialog::backdrop { background: rgb(15 36 53 / 42%); }
.dialog__content { padding: 1.25rem; }
.dialog--wide { width: min(100% - 1.25rem, 58rem); max-height: min(90dvh, 52rem); }
.dialog__content--scroll { max-height: min(90dvh, 52rem); overflow: auto; }
.dialog__header {
  display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem;
}
.dialog__header h2 { margin: 0; }
.dialog__header p { margin: 0.25rem 0 0; color: var(--muted); }

@media (max-width: 52rem) {
  .site-header__inner { flex-wrap: wrap; gap: 0.6rem 1rem; padding-block: 0.65rem; }
  .primary-nav { order: 3; width: 100%; overflow-x: auto; }
  .account-menu__name { display: none; }
  .page-content { padding-top: 1.25rem; }
  .page-header { flex-direction: column; }
  .form-grid, .form-grid--three, .planner-layout { grid-template-columns: 1fr; }
  .configuration-panel__header { flex-direction: column; }
  .configuration-panel__actions { width: 100%; }
  .jobs-page__actions { width: 100%; }
  .jobs-page__actions .button { flex: 1 1 auto; }
  .jobs-toolbar { flex-direction: column; align-items: stretch; }
  .jobs-search { width: 100%; flex-wrap: wrap; }
  .jobs-search__field { flex-basis: 100%; }
  .jobs-search .button { flex: 1 1 auto; }
  .jobs-toolbar__summary { text-align: left; }
  .jobs-register__header { align-items: flex-start; }
  .jobs-register__table-wrap { overflow: visible; background: transparent; }
  .jobs-table, .jobs-table tbody, .jobs-table tr, .jobs-table td { display: block; width: 100%; }
  .jobs-table { min-width: 0; }
  .jobs-table thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .jobs-table tbody { display: grid; gap: 0.75rem; padding: 0.75rem; background: var(--surface-soft); }
  .jobs-table tr { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; box-shadow: 0 1px 2px rgb(29 52 72 / 5%); }
  .jobs-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); }
  .jobs-table td::before {
    display: block; margin-bottom: 0.18rem; content: attr(data-label); color: var(--muted);
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  }
  .jobs-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
  .jobs-table td:last-child { width: auto; border-bottom: 0; white-space: normal; }
  .jobs-table__address { max-width: none; white-space: normal; }
  .jobs-pagination { align-items: flex-start; }
  .planner-sidebar__list { max-height: 16rem; }
}

@media (max-width: 34rem) {
  .shell { width: min(100% - 1.2rem, 90rem); }
  .primary-nav a, .button { padding-inline: 0.62rem; }
  .meta-list { grid-template-columns: 1fr; gap: 0.15rem; }
  .meta-list dd { margin-bottom: 0.55rem; }
}


/* Native Django radio/checkbox widgets, styled as tap-friendly choice buttons. */
.choice-button-list--native div { display: contents; }
.choice-button-list--native label {
  position: relative;
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid #b7c4cf;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: white;
  cursor: pointer;
  font-weight: 650;
}
.choice-button-list--native label:hover { border-color: var(--brand); background: #f3f8fc; }
.choice-button-list--native label:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(14 90 138 / 18%); }
.choice-button-list--native label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.choice-button-list--native label:has(input:checked) {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--brand);
}


/* Compact identity row for the create and edit job-card modals. */
.job-card-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: start;
}
.job-card-identity__number,
.choice-field {
  min-width: 0;
}
.job-card-identity__number {
  flex: 0 1 28.5rem;
}
.job-card-dialog {
  width: min(100% - 1.25rem, 54rem);
}
.job-card-identity__selector {
  flex: 0 1 auto;
  width: max-content;
  max-width: 100%;
}
.choice-field--panel {
  display: grid;
  gap: 0.32rem;
  margin: 0;
  padding: 0.4rem 0.55rem 0.55rem;
  border: 1px solid #c9d9e5;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
.choice-field--panel .choice-field__label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
}
.choice-field--panel .choice-button-list {
  gap: 0.35rem;
}
.choice-field--panel > input,
.choice-field--panel .choice-button-list--native label {
  min-height: 2.85rem;
}
.choice-field--panel .choice-button-list--native label {
  padding: 0.36rem 0.56rem;
  font-size: 0.88rem;
}
@media (max-width: 46rem) {
  .job-card-identity {
    display: grid;
    grid-template-columns: 1fr;
  }
  .job-card-identity__selector {
    width: 100%;
  }
}


/* Readable, compact desktop-first job-card entry forms. */
.job-card-dialog .dialog__content {
  padding: 0.79rem;
}
.job-card-dialog .dialog__header {
  gap: 0.42rem;
  margin-bottom: 0.32rem;
}
.job-card-dialog .dialog__header .eyebrow {
  margin-bottom: 0.13rem;
  font-size: 0.75rem;
}
.job-card-dialog .dialog__header h2 {
  font-size: 1.47rem;
  line-height: 1.1;
}
.job-card-dialog .dialog__header p {
  margin-top: 0.11rem;
  font-size: 0.87rem;
  line-height: 1.2;
}
.job-card-form {
  font-size: 0.97rem;
}
.job-card-form .form-grid {
  row-gap: 0.21rem;
  column-gap: 0.42rem;
}
.job-card-form .field {
  gap: 0.055rem;
}
.job-card-form .field > label,
.job-card-form .field > span {
  font-size: 0.95rem;
  line-height: 1.1;
}
.job-card-form .field__hint {
  font-size: 0.84rem;
  line-height: 1.15;
}
.job-card-form input[type="text"],
.job-card-form textarea {
  min-height: 2.26rem;
  padding: 0.19rem 0.42rem;
  font-size: 0.97rem;
  line-height: 1.2;
}
.job-card-form textarea {
  min-height: 4.52rem;
}
.job-card-form .choice-button-list {
  gap: 0.23rem;
}
.job-card-form .choice-field--panel {
  gap: 0.085rem;
  padding: 0.17rem 0.3rem 0.25rem;
}
.job-card-form .choice-field--panel .choice-field__label {
  font-size: 0.73rem;
  line-height: 1;
}
.job-card-form .choice-button-list--native label,
.job-card-form .choice-field--panel > input {
  min-height: 2.26rem;
}
.job-card-form .choice-button-list--native label {
  padding: 0.17rem 0.39rem;
  font-size: 0.92rem;
  line-height: 1.1;
}
.job-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.21rem 0.55rem;
  align-items: center;
}
.job-options__label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
}
.job-card-form .status-control {
  gap: 0.21rem;
  font-size: 0.87rem;
  line-height: 1.1;
}
.job-card-form .status-control input[type="checkbox"] {
  width: 1.08rem;
  height: 1.08rem;
}
.job-card-form .lead-order-editor--inline-option {
  display: contents;
}
.job-card-form .lead-order-editor--inline-option .lead-order-editor__body,
.job-card-form .lead-order-editor--inline-option > .field__errors {
  flex: 1 0 100%;
}
.job-card-form .lead-order-editor__body {
  gap: 0.21rem;
  padding: 0.3rem;
}
.job-card-form .lead-order-editor__entry,
.job-card-form .lead-order-editor__buttons {
  gap: 0.23rem;
}
.job-card-form .lead-order-editor__check-result {
  padding: 0.3rem 0.42rem;
  font-size: 0.84rem;
}
.job-card-form .lead-order-editor__values .muted {
  font-size: 0.87rem;
}
.job-card-form .form-actions {
  gap: 0.32rem;
}
.job-card-form .button {
  min-height: 2.31rem;
  padding: 0.25rem 0.48rem;
  font-size: 0.95rem;
}
@media (max-width: 46rem) {
  .job-card-form input[type="text"],
  .job-card-form textarea,
  .job-card-form .choice-button-list--native label,
  .job-card-form .choice-field--panel > input,
  .job-card-form .button {
    min-height: 2.5rem;
  }
}


/* Second step of the saved job-card creation flow. */
.job-card-form__job-pack input[type="file"] {
  max-width: 100%;
  padding: 0.25rem;
  font-size: 0.9rem;
}
.work-setup-dialog {
  width: min(100% - 1.25rem, 66rem);
}
.work-setup-dialog .dialog__content {
  padding: 1rem;
}
.work-setup-form,
.work-setup-sections,
.work-setup-section__rows {
  display: grid;
}
.work-setup-form {
  gap: 1rem;
}
.work-setup-sections {
  gap: 0.8rem;
}
.work-setup-section {
  padding: 0.9rem;
  border: 1px solid #c9d9e5;
  border-radius: var(--radius-sm);
  background: white;
}
.work-setup-section--generated {
  background: var(--surface-soft);
}
.work-setup-section__header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.work-setup-section__header h3,
.work-setup-section > h3 {
  margin: 0;
  font-size: 1.05rem;
}
.work-setup-section__header p,
.work-setup-section > p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}
.work-setup-section__rows {
  gap: 0.55rem;
}
.work-setup-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.55rem;
  align-items: end;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
.work-setup-row--single {
  grid-template-columns: minmax(0, 1fr) auto;
}
.work-setup-row .field {
  gap: 0.25rem;
}
.work-setup-row .button {
  margin-bottom: 0.02rem;
}
.work-setup-add {
  justify-self: start;
  margin-top: 0.65rem;
}
.work-setup-note {
  padding: 0.65rem 0.75rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: white;
}
.work-setup-splice-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 46rem) {
  .work-setup-dialog .dialog__content {
    padding: 0.8rem;
  }
  .work-setup-row,
  .work-setup-row--single,
  .work-setup-splice-grid {
    grid-template-columns: 1fr;
  }
  .work-setup-row .button,
  .work-setup-add {
    width: 100%;
  }
}
