/* Shared counters: enough contrast in both themes, including inactive tabs. */

.mission-tab-count,
.pill-count,
.nav-link .badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 25px;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--count-bg);
  color: var(--count-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.mission-tabs .active .mission-tab-count,
.active .pill-count,
.nav-link.active .badge-count {
  background: var(--count-active-bg);
  color: var(--count-active-text);
}
.notification-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 20px;
  min-height: 20px;
  font-size: 11px;
}
.mission-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.mission-tabs .btn {
  flex-shrink: 0;
}
.settings-tabs {
  margin-bottom: 16px;
}
.settings-subtabs {
  margin-bottom: 24px;
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 6px;
}
.settings-subtabs .btn {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 13px;
  min-height: 44px;
}
.identity-form {
  max-width: 800px;
}
.identity-preview {
  padding: 18px;
  background: var(--surface2);
  border-radius: 12px;
}
.identity-preview .local-brand {
  margin-top: 10px;
}
.local-brand strong,
.mobile-brand span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.mobile-brand span {
  max-width: 160px;
  line-height: 1.15;
}
/* Stable mission rows: selecting a person or vehicle only enables the reserved field. */
#mission-form .form-section {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 8px;
}
#mission-form .form-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}
#mission-form .form-section h3 .icon {
  color: var(--muted);
  width: 19px;
  height: 19px;
}
#mission-form .section-heading {
  align-items: start;
}
#mission-form .section-heading p {
  margin-top: 6px;
  font-size: 13px;
}
#mission-form .crew-picker-list,
#mission-form .mission-picker-list {
  gap: 0;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
#mission-form .crew-picker-row,
#mission-form .mission-vehicle-row,
#mission-form .crew-picker-row:not(.selected),
#mission-form .mission-vehicle-row:not(.selected) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 16px;
  padding: 12px 16px;
  align-items: center;
  border-radius: 0;
  min-width: 0;
}
#mission-form .crew-picker-row.selected,
#mission-form .mission-pick-row.selected {
  border-radius: 0;
  background: var(--active-bg);
}
#mission-form .crew-picker-row > .label,
#mission-form .mission-vehicle-row > .label {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  min-width: 0;
}
#mission-form .crew-person {
  gap: 10px;
  min-height: 48px;
  font-size: 14px;
  min-width: 0;
}
#mission-form select:disabled {
  opacity: 1;
  color: var(--muted);
  background: var(--surface2);
  border-color: var(--line);
  cursor: default;
}
#mission-form .crew-picker-row select,
#mission-form .mission-vehicle-row select {
  min-height: 44px;
  font-size: 14px;
  padding: 10px 30px 10px 12px;
}
#mission-form .mission-pick-row[data-lot-row] {
  padding: 14px 16px;
  gap: 12px;
}
#mission-form .mission-pick-row[data-lot-row] > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 14px;
  width: 100%;
}
#mission-form .mission-pick-row[data-lot-row] strong {
  font-size: 14px;
}
#mission-form .mission-pick-row small {
  margin: 0;
}
#mission-form [data-lot-included] {
  grid-column: 1 / -1;
  min-height: 18px;
  font-size: 11px;
}
#mission-form .mission-pick-row.included {
  background: var(--surface2);
}
#mission-form [data-crew-count] {
  font-size: 12px;
  white-space: nowrap;
  padding-top: 2px;
}
/* Custom in-page chooser; browser/OS continues to handle the native file selection. */
.file-picker {
  min-width: 0;
}
.file-picker-body {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  margin-top: 8px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface2);
}
.file-picker-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.file-pick-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 44px;
}
.file-pick-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.file-pick-button:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.file-name {
  font-size: 13px;
  overflow-wrap: anywhere;
  max-width: 100%;
  color: var(--muted);
}
.file-picker small {
  font-size: 12px;
  color: var(--muted);
}
.file-preview {
  flex: 0 0 120px;
  width: 120px;
  height: 100px;
  border-radius: 10px;
  background: var(--surface);
  padding: 6px;
}
.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.file-preview[hidden],
.file-picker [hidden] {
  display: none;
}
.file-picker .form-error:empty {
  display: none;
}
/* Public vehicle sheet, with no application navigation or account data. */
.guest-shell {
  width: min(100% - 32px, 560px);
  margin: 24px auto 48px;
}
.guest-brand {
  margin-bottom: 24px;
}
.guest-card {
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.guest-card h1 {
  font-size: 26px;
  line-height: 1.25;
}
.guest-card h2 {
  font-size: 19px;
}
.guest-card .guest-status {
  margin: 16px 0 24px;
}
.guest-card .guest-caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.guest-card .btn[type="submit"] {
  width: 100%;
  min-height: 52px;
}
.guest-card .fieldset.fuel-field {
  margin-top: 0;
}
.guest-card h1 {
  overflow-wrap: anywhere;
}
.guest-card .radio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.guest-card .selection-card {
  justify-content: center;
  padding: 12px 4px;
  gap: 6px;
  min-height: 48px;
}
.guest-success {
  display: grid;
  gap: 16px;
  text-align: center;
  padding: 24px 0;
}
.guest-success > .icon {
  width: 44px;
  height: 44px;
  margin: auto;
  color: var(--green);
}
.guest-request {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.guest-request p {
  margin: 8px 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.guest-qr {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.guest-qr #qr-target {
  padding: 14px;
  background: #fff;
  border-radius: 10px;
}
.guest-link {
  overflow-wrap: anywhere;
  min-width: 0;
}
.guest-source {
  display: block;
  color: var(--blue);
  font-size: 11px;
  margin-top: 4px;
}
@media (max-width: 700px) {
  .mission-tabs {
    gap: 4px;
  }
  .mission-tabs .btn {
    font-size: 13px;
    padding: 10px 12px;
    min-height: 44px;
    gap: 7px;
  }
  #mission-form .crew-picker-row,
  #mission-form .mission-vehicle-row,
  #mission-form .crew-picker-row:not(.selected),
  #mission-form .mission-vehicle-row:not(.selected) {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 10px 14px;
  }
  #mission-form .crew-picker-row > .label,
  #mission-form .mission-vehicle-row > .label {
    grid-template-columns: minmax(0, 1fr) minmax(130px, 170px);
    align-items: center;
    font-size: 12px;
    gap: 12px;
  }
  #mission-form .crew-picker-row select,
  #mission-form .mission-vehicle-row select {
    font-size: 16px;
  }
  #mission-form .mission-pick-row[data-lot-row] > span {
    grid-template-columns: minmax(0, 1fr);
  }
  #mission-form .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .file-picker-body {
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px;
  }
  .guest-card {
    padding: 20px;
  }
  .guest-card input,
  .guest-card select,
  .guest-card textarea {
    font-size: 16px;
  }
  .mobile-brand span {
    max-width: 105px;
    font-size: 15px;
  }
}

@media print {
  .vehicle-access-modal > .stack > :not(.guest-qr) {
    display: none !important;
  }
  .vehicle-access-modal .modal-header h2 {
    font-size: 20px;
  }
  .vehicle-access-modal .guest-qr::after {
    content: "Scannez pour enregistrer un départ ou un retour. Aucun compte nécessaire.";
    font-size: 14px;
    text-align: center;
  }
}

/* Team builder: only assigned people appear in the mission, regardless of roster size. */
#mission-form .crew-picker-row.crew-assigned-row {
  grid-template-columns: minmax(0, 1fr) 180px 44px;
  gap: 12px;
  background: var(--surface);
}
#mission-form .crew-picker-row.crew-assigned-row > input[type="hidden"] {
  display: none;
}
#mission-form .crew-picker-row.crew-assigned-row > strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
#mission-form .crew-picker-list[hidden],
#mission-form [data-crew-empty][hidden] {
  display: none;
}
.crew-chooser-list {
  height: min(360px, 45vh);
  min-height: 150px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  scrollbar-gutter: stable;
}
.crew-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.crew-choice:last-child {
  border-bottom: 0;
}
.crew-choice:has(input:checked) {
  background: var(--active-bg);
}
.crew-choice input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--action-bg);
}
.crew-choice[hidden],
#crew-chooser-form [hidden] {
  display: none;
}
#crew-chooser-form [data-choice-empty] {
  min-height: 24px;
}
@media (max-width: 700px) {
  #mission-form .crew-picker-row.crew-assigned-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 4px 8px;
  }
  #mission-form .crew-picker-row.crew-assigned-row > strong {
    grid-column: 1;
    grid-row: 1;
  }
  #mission-form .crew-picker-row.crew-assigned-row > button {
    grid-column: 2;
    grid-row: 1;
  }
  #mission-form .crew-picker-row.crew-assigned-row > .label {
    grid-column: 1/-1;
    grid-row: 2;
  }
  #crew-chooser-form input[type="search"] {
    font-size: 16px;
  }
}

.guest-card [hidden] {
  display: none;
}
/* One scroll area in the team chooser, including short screens and open mobile keyboards. */
.crew-chooser-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100dvh - 24px);
  width: min(560px, calc(100vw - 24px));
}
.crew-chooser-modal > .modal-header {
  position: static;
  flex: none;
  margin-bottom: 12px;
}
#crew-chooser-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}
#crew-chooser-form > .label,
#crew-chooser-form > p,
#crew-chooser-form > .modal-footer {
  flex: none;
}
#crew-chooser-form .crew-chooser-list {
  height: auto;
  max-height: 360px;
  min-height: 0;
  flex: 0 1 auto;
  overflow: auto;
}
#crew-chooser-form .modal-footer {
  position: static;
  margin: 0;
  padding: 12px 0 0;
}
#crew-chooser-form [data-choice-count] {
  margin: 0;
}
#mission-form .crew-picker-row.crew-assigned-row {
  grid-template-columns: minmax(0, 1fr) 180px 44px;
  align-items: end;
}
#mission-form .crew-picker-row.crew-assigned-row > strong {
  align-self: center;
}
#mission-form .crew-picker-row.crew-assigned-row select {
  padding-right: 36px;
  background-position: right 12px center;
}
.fleet-tile > .details-list + .notice {
  margin-top: 16px;
}
@media (max-width: 700px) {
  #mission-form .crew-picker-row.crew-assigned-row {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 140px) 44px;
    gap: 6px;
    padding: 10px;
  }
  #mission-form .crew-picker-row.crew-assigned-row > strong,
  #mission-form .crew-picker-row.crew-assigned-row > button,
  #mission-form .crew-picker-row.crew-assigned-row > .label {
    grid-column: auto;
    grid-row: auto;
  }
  #mission-form .crew-picker-row.crew-assigned-row > .label {
    display: block;
    font-size: 0;
  }
  #mission-form .crew-picker-row.crew-assigned-row select {
    font-size: 16px;
    width: 100%;
    min-width: 0;
    padding-left: 10px;
    padding-right: 34px;
  }
  #mission-form .crew-picker-row.crew-assigned-row > strong {
    font-size: 13px;
  }
  .crew-chooser-modal {
    padding-bottom: 16px;
  }
}
.backup-files {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.backup-files li {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.backup-files small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.backup-files .button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Parcours 2.1 : composants limités aux écrans concernés. */
.notification-rules {
  display: grid;
  gap: 16px;
}
.notification-rule h3 {
  display: flex;
  gap: 10px;
  align-items: center;
}
.notification-channels,
.notification-role-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 18px 0;
}
.notification-role-options .checkbox-label {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.notification-recipients {
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.notification-exceptions {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}
.notification-person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.personal-preference-row > div:first-child {
  min-width: 0;
}
.return-bags {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.return-bag-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 84px;
}
.return-bag-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.return-bag-heading > div:last-child {
  min-width: 0;
}
.return-bag-heading .badge {
  white-space: normal;
  line-height: 18px;
  min-height: 28px;
}
.return-bag-photo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.return-bag-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.return-bag-heading h2 {
  font-size: 18px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.return-bag-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 390px;
  gap: 10px;
  min-height: 48px;
}
.return-bag-actions > .btn {
  height: 48px;
  min-height: 48px;
  padding: 6px 12px;
  line-height: 16px;
}
.return-bag-actions:has(> :only-child) {
  display: flex;
  justify-content: flex-end;
}
.return-bag-actions:empty {
  display: none;
}
.return-bag-editor:has(form) {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}
.return-search-results {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.return-used-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 44px;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.return-used-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.return-used-name small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 12px;
}
.return-used-row .check-stepper {
  width: 150px;
  height: 46px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}
.return-used-row .check-stepper .input {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 44px;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: center;
  font-size: 16px;
  appearance: textfield;
}
.return-used-row .return-remove {
  width: 44px;
  height: 44px;
  padding: 0;
}
.return-summary p {
  margin-top: 10px;
}
.vehicle-incident-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid transparent;
  cursor: pointer;
}
.vehicle-incident-badge .icon {
  width: 15px;
  height: 15px;
}
.incident-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: incident-halo 2.6s ease-out infinite;
}
@keyframes incident-halo {
  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
  55% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 16%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .incident-pulse {
    animation: none;
  }
}
.fleet-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.fleet-tile > .row:first-child {
  min-height: 42px;
}
.incident-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 12px;
  margin: 0 0 14px;
}
.incident-filters .label {
  min-width: 0;
  font-size: 12px;
  gap: 5px;
}
.incident-filters .input {
  min-height: 44px;
  padding: 9px 12px;
}
.incident-table {
  table-layout: auto;
  min-width: 920px;
}
.incident-table th:nth-child(1) {
  width: 110px;
}
.incident-table th:nth-child(2) {
  width: 130px;
}
.incident-table th:nth-child(3) {
  width: 170px;
}
.incident-table th:nth-child(4) {
  width: 180px;
}
.incident-table td {
  vertical-align: top;
}
.incident-table td:not(:last-child) {
  white-space: nowrap;
}
.incident-table td:last-child {
  min-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#incident-rows {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.incident-entry {
  cursor: pointer;
}
.incident-entry:hover td {
  background: var(--surface2);
}
.incident-vehicle {
  font-weight: 600;
}
.incident-description {
  display: block;
  padding: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: 400;
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.incident-description:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 3px;
}
.incident-status {
  white-space: nowrap;
  padding: 3px 8px;
  font-size: 11px;
}
.incident-mobile-meta {
  display: none;
}
.incident-empty {
  padding: 16px 18px;
}
#check-form .inventory-section[hidden],
#check-form .inventory-section-controls[hidden] {
  display: none !important;
}
.inventory-layout-choice {
  margin-bottom: 16px;
}
.inventory-navigation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-weight: 600;
}
.inventory-navigation-heading .btn {
  padding: 4px 0 4px 12px;
  min-height: 32px;
  font-size: 12px;
}
#check-form.inventory-long .inventory-group-tabs {
  display: none;
}
#check-form.inventory-long .inventory-group-picker {
  display: grid;
  margin: 0;
}
#check-form.inventory-paged .inventory-group-tabs {
  display: none;
}
#check-form.inventory-paged .inventory-group-picker {
  display: grid;
  margin-bottom: 16px;
}
.inventory-section-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.inventory-section-controls > span {
  white-space: nowrap;
  color: var(--muted);
}
@media (max-width: 900px) {
  .mission-aside > .mission-vehicle {
    order: 1;
  }
  .return-bag-actions > .btn {
    flex: 1 1 180px;
  }
  .notification-rule {
    padding: 20px;
  }
  .notification-person {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .inventory-section-controls .btn {
    padding: 10px;
    font-size: 13px;
  }
  .mission-equipment-groups {
    order: 0;
  }
}

/* 2.1.1 — bounded preferences, shared PDF actions and compact material details. */
.pdf-export {
  flex-shrink: 0;
}
.personal-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}
.personal-preference-row .preference-event {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.personal-preference-row .preference-event strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.personal-preference-row .preference-event strong .icon {
  flex-shrink: 0;
}
.personal-preference-row .preference-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.preference-channels .checkbox-label {
  min-height: 32px;
}
.preference-channels .checkbox-label:has(input:disabled) {
  color: var(--muted);
}
.preference-help {
  position: relative;
  flex-shrink: 0;
}
.preference-help summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--muted);
  list-style: none;
}
.preference-help summary::-webkit-details-marker {
  display: none;
}
.preference-help summary .icon {
  width: 16px;
  height: 16px;
}
.preference-help > p {
  position: absolute;
  z-index: 2;
  right: 0;
  top: 100%;
  width: 230px;
  max-width: 65vw;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  box-shadow: 0 4px 16px #0002;
}
.login-form .login-recovery {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.equipment-detail {
  display: grid;
  gap: 20px;
}
.equipment-identity {
  display: flex;
  align-items: center;
  gap: 28px;
}
.equipment-identity .material-visual {
  flex: 0 0 160px;
  height: 150px;
  margin: 0;
}
.equipment-identity-info {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.equipment-identity-info > p:empty {
  display: none;
}
.equipment-identity-info .btn {
  margin-top: 14px;
}
.equipment-contents .list-row:last-child {
  border-bottom: 0;
}
.mission-return-link {
  display: flex;
  justify-content: flex-end;
  margin: -12px 0 12px;
}
.pending-returns {
  margin: 0 0 24px;
}
.pending-returns h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}
.pending-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
}
.pending-return + .pending-return {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.pending-return > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pending-return p {
  margin-top: 4px;
  font-size: 12px;
}
.pending-return .btn {
  flex-shrink: 0;
}
.restock-unavailable {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .personal-preference-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .personal-preference-row .preference-channels {
    padding-left: 26px;
  }
}
@media (max-width: 600px) {
  .pdf-export {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
  }
  .pdf-export > span {
    display: none;
  }
  .pdf-export > .icon {
    width: 20px;
    height: 20px;
  }
  .equipment-identity {
    align-items: flex-start;
    gap: 16px;
  }
  .equipment-identity .material-visual {
    flex-basis: 88px;
    height: 110px;
  }
  .equipment-identity-info .source,
  .equipment-identity-info details {
    font-size: 11px;
  }
  .incident-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .incident-filters .input {
    font-size: 16px;
  }
  .pending-return {
    flex-wrap: wrap;
    gap: 10px;
  }
  .pending-return .btn {
    width: 100%;
  }
}

/* 2.1.2 — common status sizes and a stable return workspace. */
.fleet-actions > .badge {
  height: 30px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  line-height: 18px;
  font-family: inherit;
  font-size: 11px;
}
.fleet-ledger th,
.fleet-ledger td {
  vertical-align: middle;
}
.notification-count {
  top: -4px;
  right: -4px;
  height: 22px;
  min-height: 22px;
  min-width: 22px;
  padding: 0 5px;
  line-height: 18px;
  border: 2px solid var(--surface);
  border-radius: 12px;
}
@media (max-width: 1100px) {
  .return-bag-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .return-bag-heading {
    min-height: 76px;
  }
  .return-bag-actions {
    width: 100%;
  }
  .return-bag-actions > .btn {
    height: 56px;
    min-height: 56px;
  }
  .return-bag-actions {
    min-height: 56px;
  }
}
@media (max-width: 600px) {
  .return-used-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
  }
  .return-used-name {
    grid-column: 1 / -1;
  }
  .return-used-row .check-stepper {
    grid-column: 1;
  }
  .return-used-row .return-remove {
    grid-column: 2;
    justify-self: end;
  }
  .return-bag-photo {
    width: 48px;
    height: 56px;
  }
  .return-bag-heading h2 {
    font-size: 16px;
  }
}
@media (max-width: 360px) {
  .return-bag-actions > .btn {
    height: 64px;
    min-height: 64px;
    padding: 6px 8px;
  }
  .return-bag-actions {
    min-height: 64px;
  }
}

/* 2.1.3 — shared exports and a text-only ledger action. */
:is(.page-heading, .section-heading, .modal) .pdf-export > .icon,
.pdf-export > .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.ledger-notes-link {
  display: inline-block;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.ledger-notes-link:hover {
  color: var(--active-text);
}
.ledger-notes-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
.return-review {
  color: var(--amber);
  font-size: 12px;
  margin-top: 6px;
}
.return-conflict {
  margin-top: 12px;
}
.restock-complete {
  margin-top: 20px;
}

.return-record-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
}
.return-record-status > div > p {
  margin-top: 8px;
}
.return-record-material {
  flex-basis: 100%;
  color: var(--muted);
}
.return-complete-details > summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
  font-weight: 600;
}
.return-complete-details > .return-summary {
  margin-top: 12px;
}
.return-complete-dialog .modal-footer {
  margin-top: 24px;
}
@media (max-width: 700px) {
  .incident-table th,
  .incident-table td {
    padding: 12px 14px;
    vertical-align: top;
  }
  .return-record-status > .btn {
    width: 100%;
  }
  .return-record .page-heading {
    flex-wrap: wrap;
  }
}

/* 2.1.6 — separate the destination quantity from availability and actions. */
.restock-row {
  align-items: flex-start;
}
.restock-row > div:first-child {
  min-width: 0;
}
.restock-row > div:last-child {
  max-width: 310px;
}
.restock-row .restock-unavailable {
  margin-top: 0;
  text-align: right;
}
.restock-conclusion {
  margin-top: 24px;
}
.restock-conclusion p {
  margin-top: 8px;
}
.stock-availability {
  margin-top: 7px;
}
.search-empty {
  margin-top: 20px;
}
.search-empty p {
  margin: 8px 0 16px;
}
@media (max-width: 700px) {
  .restock-row > div:last-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    max-width: none;
    justify-items: start;
  }
  .restock-row .restock-unavailable {
    text-align: left;
    overflow-wrap: anywhere;
  }
  .restock-row > div:last-child .btn {
    justify-self: end;
    max-width: 100%;
  }
  .restock-row > div:last-child .badge {
    white-space: normal;
  }
  .restock-conclusion .btn {
    width: 100%;
  }
}

/* 2.1.7 — stable grouping of quantity, availability, and actions. */
.stock-card.stock-consumable > .stock-balance {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  align-items: start;
  gap: 6px;
  min-width: 190px;
  max-width: 280px;
}
.stock-consumable .stock-balance .stock-qty {
  white-space: nowrap;
}
.stock-consumable .stock-balance .stock-qty small {
  display: inline;
}
.stock-consumable .stock-balance .stock-availability {
  margin: 0;
}
.stock-consumable .stock-balance .stock-actions {
  margin-top: 8px;
  justify-content: flex-start;
}
@media (max-width: 700px) {
  .stock-card.stock-consumable > .stock-balance {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .stock-consumable .stock-balance .stock-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* 2.1.8 — shared action width for consumables and devices, with mobile stacking preserved. */
.stock-card.stock-consumable > .stock-balance,
.stock-card.device-card > .device-actions {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  justify-self: end;
}
.stock-card.stock-consumable .stock-actions,
.stock-card.device-card .stock-actions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  gap: 8px;
}
.stock-card.stock-consumable .stock-actions .btn,
.stock-card.device-card .stock-actions .btn {
  width: 132px;
  min-width: 0;
  flex: 0 0 132px;
}
.stock-card .stock-actions .icon-btn {
  flex-shrink: 0;
}
.confirmation-content {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.confirmation-content ul {
  margin: 16px 0 0;
  padding-left: 24px;
}
.confirmation-content li + li {
  margin-top: 8px;
}
.confirmation-actions {
  flex-wrap: wrap;
}
.confirmation-actions .btn {
  white-space: normal;
}
@media (max-width: 700px) {
  .stock-card.stock-consumable > .stock-balance,
  .stock-card.device-card > .device-actions {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .confirmation-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .confirmation-actions .btn {
    width: 100%;
  }
}
.stock-card.device-card > .device-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}
@media (min-width: 701px) {
  .stock-card.device-card {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}
/* Button colors and interaction feedback are shared in theme.css. */

/* 2.1.9 — keep quantity, availability and actions on the same axis. */
.stock-card.stock-consumable > .stock-balance,
.stock-card.device-card > .device-actions {
  width: 184px;
  min-width: 0;
  max-width: 100%;
  justify-self: end;
}
.stock-card.stock-consumable .stock-actions,
.stock-card.device-card .stock-actions {
  justify-content: flex-start;
}
@media (min-width: 701px) {
  .stock-card.device-card {
    grid-template-columns: minmax(0, 1fr) 184px;
  }
}

/* 2.1.22 — compact device cards on mobile; keep the desktop composition. */
@media (max-width: 700px) {
  .stock-card.device-card {
    padding: 16px;
    gap: 10px;
    align-items: start;
  }
  .stock-card.device-card p {
    margin: 4px 0;
    line-height: 1.45;
  }
  .stock-card.device-card .device-dates {
    margin-top: 6px;
    line-height: 1.45;
  }
  .stock-card.device-card > .device-actions {
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
  }
  .stock-card.device-card > .device-actions > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }
  .stock-card.device-card > .device-actions .badge {
    margin: 0;
  }
  .stock-card.device-card > .device-actions .stock-actions {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
    gap: 8px;
    justify-content: flex-end;
  }
  .stock-card.device-card > .device-actions .stock-actions .btn {
    width: auto;
    flex: 0 0 auto;
    min-width: 96px;
    min-height: 44px;
    padding: 10px 14px;
  }
  .stock-card.device-card > .device-actions .stock-actions .icon-btn {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 359px) {
  .stock-card.device-card > .device-actions .stock-actions {
    width: 100%;
    flex-basis: 100%;
  }
  .stock-card.device-card > .device-actions .stock-actions .btn {
    flex: 1;
  }
}

/* 2.1.23 — reuse notice colors and make each recorded replenishment readable. */
.review-restocks > div {
  min-width: 0;
  width: 100%;
}
.review-restocks ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.review-restocks li {
  display: grid;
  gap: 3px;
  overflow-wrap: anywhere;
}
.review-restocks li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.review-restocks li > span {
  color: var(--muted);
}
.review-restocks .badge {
  margin: 2px 0 0;
}
@media (max-width: 700px) {
  .stock-card.stock-consumable {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
    gap: 10px;
  }
  .stock-card.stock-consumable p {
    margin: 4px 0;
    line-height: 1.45;
  }
  .stock-card.stock-consumable .stock-location {
    margin: 6px 0;
  }
  .stock-card.stock-consumable > .stock-balance {
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
  }
  .stock-card.stock-consumable .stock-balance .stock-qty {
    grid-column: 1;
    grid-row: 1;
  }
  .stock-card.stock-consumable .stock-balance .stock-availability {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
  }
  .stock-card.stock-consumable .stock-balance .stock-actions {
    grid-column: 2;
    grid-row: 1 / 3;
    width: auto;
    margin: 0;
    justify-content: flex-end;
  }
  .stock-card.stock-consumable .stock-actions .btn {
    width: auto;
    min-width: 96px;
    min-height: 44px;
    flex: 0 0 auto;
  }
  .stock-card.stock-consumable .stock-actions .icon-btn {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 359px) {
  .stock-card.stock-consumable .stock-balance .stock-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    margin-top: 4px;
  }
  .stock-card.stock-consumable .stock-actions .btn {
    flex: 1;
  }
}
/* Finitions 2.1.25 : navigation, formulaires et mentions discrètes. */
.site-copyright {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 16px 0 0;
}
.sidebar-footer .site-copyright {
  padding: 0 12px;
}
.login-form > .site-copyright {
  margin-top: 30px;
}
.account-menu-footer .site-copyright {
  text-align: center;
}
[data-stock-filter][name="q"] {
  text-overflow: ellipsis;
}
[data-stock-filter][name="q"]::placeholder {
  white-space: nowrap;
  text-overflow: ellipsis;
}
.notification-clear {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: var(--red);
}
.contact-form,
.contact-success {
  max-width: 760px;
}
.contact-form textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
}
.contact-sender {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.contact-sender > .icon {
  margin-top: 3px;
  color: var(--muted);
  flex-shrink: 0;
}
.contact-sender p,
.contact-success p {
  overflow-wrap: anywhere;
}
.contact-actions {
  display: flex;
  justify-content: flex-end;
}
.vehicle-transport-label {
  color: var(--muted);
  font-size: 13px;
  justify-self: end;
}
#mission-form .mission-vehicle-row > .label {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 700px) {
  .mobile-nav.mobile-nav-four {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #mission-form .mission-vehicle-row,
  #mission-form .mission-vehicle-row:not(.selected) {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 155px);
    gap: 8px;
    padding: 10px;
  }
  #mission-form .mission-vehicle-row .crew-person {
    font-size: 13px;
    gap: 6px;
    overflow-wrap: anywhere;
  }
  #mission-form .mission-vehicle-row > .label {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  #mission-form .mission-vehicle-row select {
    padding-left: 8px;
    padding-right: 25px;
  }
  .personal-notification-toolbar .inline-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .personal-notification-toolbar .notification-clear {
    margin-left: auto;
  }
  .personal-notification-toolbar [data-action="notifications-read"] {
    flex-basis: 100%;
    justify-content: flex-start;
  }
  .contact-actions .btn {
    width: 100%;
  }
}

.site-copyright {
  width: 100%;
  text-align: center;
}
@media (max-width: 920px) {
  .mobile-nav:has(a[href="#dt"]) {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }
}
/* 3.3 — compact summary cards: number and label form one readable group. */
.admin-dashboard-v13 .dashboard-stat {
  align-items: center;
  align-content: center;
  grid-template-columns: 42px minmax(0, 1fr) 12px;
  padding: 20px;
  gap: 14px;
  min-height: 132px;
}
.admin-dashboard-v13 .dashboard-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}
.admin-dashboard-v13 .dashboard-stat-content {
  gap: 5px;
}
.admin-dashboard-v13 .dashboard-stat-label {
  order: 1;
  min-height: 0;
  font-size: 14px;
  line-height: 1.35;
}
.admin-dashboard-v13 .dashboard-stat-content > strong {
  order: 0;
  font-size: 34px;
  margin: 0;
}
.admin-dashboard-v13 .dashboard-stat-caption {
  order: 2;
  font-size: 12px;
}
.legal-access {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.legal-access a {
  color: inherit;
  text-underline-offset: 3px;
}
.material-visual img,
.file-preview img {
  object-fit: contain;
}
@media (max-width: 600px) {
  .admin-dashboard-v13 .dashboard-stat {
    padding: 16px 12px;
    gap: 10px;
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 125px;
  }
  .admin-dashboard-v13 .dashboard-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .admin-dashboard-v13 .dashboard-stat-arrow {
    display: none;
  }
  .admin-dashboard-v13 .dashboard-stat-label {
    font-size: 13px;
  }
  .admin-dashboard-v13 .dashboard-stat-content > strong {
    font-size: 30px;
  }
}

.material-visual img.bundled-illustration,
.equipment-photo img.bundled-illustration {
  padding: 0;
}

/* Legal consultation uses the same dialog as preferences, including on public forms. */
.modal.legal-dialog {
  max-width: 780px;
}
.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.legal-tabs button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.legal-tabs button[aria-pressed="true"] {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--line);
}
.legal-content {
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.legal-content h2 {
  font-size: 17px;
  line-height: 1.4;
  margin: 26px 0 10px;
}
.legal-content h2:first-child {
  margin-top: 0;
}
.legal-content p,
.legal-content ul {
  margin: 0 0 14px;
}
.legal-content ul {
  padding-left: 22px;
}
.legal-content li + li {
  margin-top: 8px;
}
.legal-content a {
  color: var(--blue);
  text-underline-offset: 3px;
}
.legal-updated {
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 420px) {
  .legal-tabs button {
    flex: 1 1 100%;
    text-align: left;
  }
}
