/* Parcours terrain, inventaire et administration de la maquette v4. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.view-switch {
  display: flex;
  padding: 4px;
  gap: 3px;
  border: 1px solid var(--line);
  background: var(--surface2);
  border-radius: 13px;
}
.view-switch button {
  background: none;
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  color: var(--muted);
  font-weight: 650;
  min-height: 38px;
}
.view-switch button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.compact-view-switch {
  display: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--surface2);
  font-weight: 650;
}
.inventory-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 20px 0 28px;
}
.inventory-heading > div:last-child {
  min-width: 0;
}
.inventory-heading h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 5px 0 8px;
  overflow-wrap: anywhere;
}
.inventory-heading .eyebrow {
  overflow-wrap: anywhere;
}
.inventory-heading > div > p:last-child {
  font-size: 14px;
}
.inventory-cover {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  background: var(--surface);
  border-radius: 22px;
  padding: 12px;
  flex-shrink: 0;
}
.inventory-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.inventory-cover .material-placeholder-v7 {
  width: 100%;
  height: 100%;
}
.inventory-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}
.inventory-main {
  min-width: 0;
}
.inventory-aside {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 106px;
}
.inventory-overview {
  padding: 25px;
}
.inventory-count {
  margin: 25px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 17px;
}
.inventory-count strong {
  color: var(--text);
  font-size: 44px;
  line-height: 1;
}
.inventory-overview dl {
  margin: 22px 0;
}
.inventory-overview dl > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.inventory-overview dt {
  color: var(--muted);
}
.inventory-overview dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}
.inventory-aside .notice {
  font-size: 13px;
  line-height: 1.8;
}
.inventory-progress {
  margin-bottom: 20px;
}
.inventory-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.inventory-progress strong {
  color: var(--text);
}
.inventory-progress-track {
  height: 6px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.inventory-progress-track > span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 0.15s;
}
.inventory-save-state {
  margin-top: 9px;
  font-size: 11px;
}
.inventory-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}
.inventory-group-tabs .btn {
  font-size: 12px;
  white-space: normal;
}
.inventory-sections {
  display: grid;
  gap: 22px;
}
.inventory-section {
  padding: 0;
  overflow: hidden;
  scroll-margin-top: 100px;
}
.inventory-section > header {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.inventory-section > header h2 {
  font-size: 19px;
}
.inventory-section > header p {
  margin-top: 5px;
  font-size: 12px;
}
#check-form .inventory-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 15px;
  padding: 22px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
#check-form .inventory-line:last-child {
  border-bottom: 0;
}
.inventory-item {
  min-width: 0;
}
#check-form .inventory-item h3 {
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#check-form .inventory-item p {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 5px;
}
.inventory-tick {
  display: block;
  width: 34px;
  height: 34px;
  position: relative;
  cursor: pointer;
}
.inventory-tick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}
.inventory-tick > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #ccd1d9;
  background: var(--surface);
  border-radius: 10px;
  color: transparent;
  transition: background 0.15s;
}
.inventory-tick input:checked + span {
  background: var(--green);
  color: var(--surface);
  border-color: var(--green);
}
.inventory-tick input:focus-visible + span {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.inventory-tick .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.5;
}
#check-form .inventory-line .check-quantity {
  width: 150px;
  gap: 0;
}
#check-form .inventory-line .check-stepper {
  height: 46px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}
#check-form .inventory-line .check-count {
  font-weight: 650;
}
#check-form .inventory-line .check-expiry {
  grid-column: 2/-1;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding-top: 4px;
}
.inventory-line .check-expiry .label {
  font-size: 11px;
}
.inventory-line .check-expiry input[type="date"] {
  min-height: 40px;
}
.inventory-line.is-verified {
  background: color-mix(in srgb, var(--green-soft) 20%, var(--surface));
}
.inventory-review {
  max-width: 1000px;
  margin: 35px auto;
}
.inventory-review > h2 {
  text-align: center;
  font-size: 30px;
  line-height: 1.3;
  margin: 14px auto;
}
.inventory-review > p {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 28px;
}
.review-symbol {
  width: 80px;
  height: 80px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.review-symbol.amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.review-symbol.green {
  background: var(--green-soft);
  color: var(--green);
}
.review-symbol .icon {
  width: 34px;
  height: 34px;
}
.inventory-review .eyebrow {
  margin-bottom: 8px;
}
.inventory-review-panel {
  padding: 28px;
}
.inventory-review-panel > .row {
  margin-bottom: 24px;
}
.inventory-review-panel h3 {
  font-size: 18px;
}
.review-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.review-line > div {
  min-width: 0;
}
.review-line p {
  font-size: 12px;
  margin-top: 5px;
}
.review-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  color: var(--text);
  text-align: left;
  font-size: 14px;
}
.review-item strong {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--amber);
  flex-shrink: 0;
}
.review-conform {
  padding: 20px 0;
  color: var(--green);
}
.inventory-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.inventory-review-actions .btn {
  min-height: 46px;
}
.restock-list {
  padding: 0 24px;
}
.restock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.restock-row:last-child {
  border-bottom: 0;
}
.restock-row h3 {
  font-size: 16px;
}
.restock-row p {
  font-size: 12px;
  margin-top: 5px;
}
.restock-row > div:last-child {
  display: grid;
  gap: 12px;
  justify-items: end;
  flex-shrink: 0;
}
.workspace-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.workspace-stat {
  padding: 24px;
}
.workspace-stat > .icon {
  color: var(--muted);
  width: 25px;
  height: 25px;
}
.workspace-stat > strong {
  display: block;
  font-size: 38px;
  margin: 24px 0 5px;
  line-height: 1;
}
.workspace-stat p {
  font-size: 13px;
}
.admin-workspace {
  grid-template-columns: minmax(0, 1fr) 300px;
}
.workspace-shortcuts {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.workspace-shortcuts a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  min-height: 34px;
}
.terrain-stock-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.terrain-stock-cta > div {
  display: flex;
  align-items: center;
  gap: 20px;
}
.terrain-stock-cta > div > .icon {
  color: var(--green);
  width: 38px;
  height: 38px;
}
.terrain-stock-cta h2 {
  font-size: 23px;
}
.terrain-stock-cta p {
  margin-top: 5px;
  font-size: 13px;
}
.fleet-tile .vehicle-details {
  font-size: 13px;
}
.fleet-tile .vehicle-details strong {
  font-size: 17px;
  margin-top: 8px;
}
.fleet-tile .icon-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
}
.fleet-tile .row.between {
  gap: 12px;
}
.fleet-tile .row.between > .row {
  gap: 6px;
}
.fleet-ledger td {
  vertical-align: top;
  white-space: nowrap;
}
.fleet-ledger td:nth-child(3) {
  min-width: 200px;
  white-space: normal;
  max-width: 300px;
}
.fleet-ledger td:nth-child(3) p {
  color: var(--text);
  margin-top: 8px;
}
.configuration-only .item-table-header,
.configuration-only .configuration-item-row {
  grid-template-columns: minmax(250px, 1fr) 90px 140px 70px 44px;
}
.configuration-only .item-number {
  grid-column: auto;
}
@media (max-width: 1100px) {
  .inventory-workspace {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 20px;
  }
  .inventory-overview {
    padding: 20px;
  }
  #check-form .inventory-line {
    grid-template-columns: 34px minmax(0, 1fr) 140px;
    gap: 12px;
    padding: 20px;
  }
  #check-form .inventory-line .check-quantity {
    width: 140px;
  }
}
@media (max-width: 900px) {
  .view-switch {
    display: none;
  }
  .compact-view-switch {
    display: block;
  }
  .inventory-workspace,
  .admin-workspace {
    display: flex;
    flex-direction: column;
  }
  .inventory-main,
  .inventory-aside,
  .admin-workspace > * {
    width: 100%;
  }
  .inventory-aside {
    position: static;
  }
  .inventory-aside .inventory-overview {
    display: none;
  }
  .inventory-aside .notice {
    margin-bottom: 110px;
  }
  .workspace-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .top-actions {
    gap: 8px;
  }
  .compact-view-switch {
    font-size: 11px;
    padding: 7px 8px;
  }
  .topbar {
    padding-left: 14px;
    padding-right: 14px;
    gap: 6px;
  }
  .mobile-brand {
    font-size: 14px;
    gap: 6px;
  }
  .mobile-brand .icon {
    width: 24px;
    height: 24px;
  }
  .top-actions .icon-btn {
    min-width: 38px;
    width: 38px;
    height: 38px;
    min-height: 38px;
  }
  .inventory-heading {
    gap: 14px;
    align-items: flex-start;
  }
  .inventory-cover {
    width: 66px;
    height: 66px;
    border-radius: 15px;
    padding: 8px;
  }
  .inventory-heading h1 {
    font-size: 23px;
  }
  .inventory-heading .eyebrow {
    font-size: 9px;
    letter-spacing: 0.7px;
  }
  .inventory-heading > div > p:last-child {
    font-size: 12px;
  }
  #check-form .inventory-line {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 19px 16px;
  }
  #check-form .inventory-line .inventory-item {
    grid-column: 2;
  }
  #check-form .inventory-line .check-quantity {
    grid-column: 2;
    justify-self: end;
    width: 160px;
  }
  #check-form .inventory-line .check-expiry {
    grid-column: 2;
  }
  #check-form .inventory-item h3 {
    font-size: 14px;
  }
  .inventory-section > header {
    padding: 20px 16px;
  }
  .inventory-progress > div:first-child {
    font-size: 12px;
  }
  .inventory-review > h2 {
    font-size: 25px;
  }
  .inventory-review-panel {
    padding: 20px;
  }
  .inventory-review-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .inventory-review-actions .btn {
    width: 100%;
    white-space: normal;
  }
  .review-item {
    align-items: flex-start;
    gap: 12px;
  }
  .review-item strong {
    flex-shrink: 1;
    text-align: right;
  }
  .restock-list {
    padding: 0 18px;
  }
  .restock-row {
    display: block;
  }
  .restock-row > div:last-child {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .workspace-stats {
    gap: 12px;
  }
  .workspace-stat {
    padding: 18px;
  }
  .workspace-stat > strong {
    font-size: 32px;
  }
  .workspace-stat p {
    font-size: 12px;
  }
  .terrain-stock-cta {
    align-items: stretch;
    flex-direction: column;
  }
  .terrain-stock-cta h2 {
    font-size: 20px;
  }
  .configuration-only .configuration-item-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .configuration-only .item-name {
    grid-column: 1/-1;
  }
  .configuration-only .item-number,
  .configuration-only .item-expiry,
  .configuration-only .item-check {
    grid-column: auto;
  }
  .fleet-tile .row.between > .row {
    flex-wrap: wrap;
  }
  .fleet-tile h2 {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .inventory-progress-track > span {
    transition: none;
  }
}

.mission-restocked,
.review-restock-note {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 8px;
  padding: 9px;
  margin-bottom: 12px;
}

/* La barre historique de la maquette utilisait le même nom de classe. */
.inventory-progress {
  height: auto;
  background: transparent;
  overflow: visible;
  border-radius: 0;
  margin: 0 0 20px;
}
.inventory-progress > div {
  height: auto;
  background: transparent;
  transition: none;
}
.inventory-progress > .inventory-progress-track {
  height: 6px;
  background: var(--line);
  overflow: hidden;
}
#check-form .inventory-line {
  opacity: 1;
}
#check-form .inventory-tick input:checked + span {
  background: var(--green);
  color: var(--surface);
  border-color: var(--green);
}
.inventory-group-tabs .active {
  background: var(--active-bg);
  color: var(--active-text);
  border: 1px solid var(--active-text);
  box-shadow: none;
}

.reference-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface2);
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
}
@media (max-width: 700px) {
  .reference-help {
    display: block;
  }
  .reference-help .btn {
    margin-top: 12px;
  }
}

/* Navigation et cartes compactes, dans les proportions de la maquette v4. */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.breadcrumb a {
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumb a:hover {
  color: var(--active-text);
  text-decoration: underline;
}
.breadcrumb > .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.breadcrumb [aria-current] {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-btn {
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 4px;
  border-radius: 12px;
}
.profile-btn:hover {
  background: var(--surface2);
}
.profile-btn > .icon {
  width: 18px;
  height: 18px;
  margin-left: 8px;
}
.account-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 26px;
}
.account-identity .avatar {
  width: 64px;
  height: 64px;
  font-size: 20px;
}
.account-identity p {
  color: var(--muted);
  margin-top: 6px;
}
.account-links .btn {
  justify-content: center;
}
.modal.personal-modal {
  max-width: 900px;
}
.personal-preference-top,
.personal-notification-toolbar,
.personal-notification-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.personal-preference-top .account-identity {
  margin: 0;
}
.personal-preference-top .account-identity .avatar {
  width: 52px;
  height: 52px;
  font-size: 17px;
}
.personal-preference-top .account-identity p {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.personal-tabs,
.personal-notification-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}
.personal-tabs .btn.chip,
.personal-notification-filters .btn.chip {
  box-shadow: none;
  color: var(--muted);
  background: var(--surface);
}
.personal-tabs .btn.chip:hover,
.personal-notification-filters .btn.chip:hover {
  color: var(--text);
  background: var(--surface2);
}
.personal-tabs .btn.chip.active,
.personal-tabs .btn.chip.active:hover,
.personal-notification-filters .btn.chip.active,
.personal-notification-filters .btn.chip.active:hover {
  color: var(--active-text);
  background: var(--active-bg);
}
.personal-tabs .btn.chip:focus-visible,
.personal-notification-filters .btn.chip:focus-visible {
  outline: 2px solid var(--active-text);
  outline-offset: 3px;
}
.personal-preferences-form {
  display: block;
}
.personal-section {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.personal-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  margin-bottom: 12px;
}
.personal-section h3 > .icon {
  color: var(--muted);
  width: 19px;
  height: 19px;
}
.appearance-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.appearance-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 12px;
  cursor: pointer;
}
.appearance-choice:has(input:checked) {
  background: var(--active-bg);
  border-color: var(--active-text);
}
.appearance-choice input {
  accent-color: var(--action-bg);
  width: 17px;
  height: 17px;
  margin: 0;
}
.personal-preference-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.personal-preference-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.personal-preference-row .preference-event strong {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  line-height: 1.5;
}
.personal-preference-row .preference-event strong > .icon {
  color: var(--muted);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.personal-preference-row > .preference-channels {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}
.personal-preference-row .checkbox-label {
  margin: 0;
  font-size: 12px;
}
.personal-save {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.personal-connection-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.personal-connection-row p {
  color: var(--muted);
  margin-top: 5px;
  font-size: 11px;
}
.personal-notification-toolbar > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.personal-notification-toolbar .inline-actions {
  flex-wrap: wrap;
}
.personal-notification-list {
  max-height: 52dvh;
  overflow-y: auto;
  margin-top: 16px;
}
.personal-notification {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 20px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: var(--text);
}
.personal-notification.unread {
  border-left-color: var(--green);
}
.modal.personal-modal:has(.personal-notifications) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.personal-modal:has(.personal-notifications) .modal-header {
  flex-shrink: 0;
}
.personal-notifications {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.personal-notification-toolbar,
.personal-notification-filters {
  flex-shrink: 0;
}
.personal-notification:hover {
  background: var(--active-bg);
}
.personal-notification-icon {
  color: var(--muted);
  padding-top: 1px;
}
.personal-notification.unread .personal-notification-icon {
  color: var(--green);
}
.personal-notification-heading {
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.notification-new {
  color: var(--red);
  font-size: 10px;
}
.personal-notification strong {
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
}
.personal-notification p {
  font-size: 11px;
  margin-top: 8px;
  color: var(--muted);
}
.personal-notification-arrow {
  align-self: center;
  color: var(--muted);
}
.personal-empty {
  text-align: center;
  padding: 35px 16px;
  color: var(--muted);
}
.personal-empty > .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
}
.personal-empty h3 {
  font-size: 16px;
  color: var(--text);
}
.personal-empty p {
  font-size: 12px;
  margin-top: 8px;
}
.personal-modal .account-identity > div,
.personal-notification > div,
.personal-connection-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .appearance-options {
    grid-template-columns: 1fr;
  }
  .appearance-choice {
    padding: 12px;
  }
  .personal-preference-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .personal-preference-row > .preference-channels {
    gap: 16px;
    flex-wrap: wrap;
  }
  .personal-save .btn {
    width: 100%;
  }
  .personal-notification-toolbar .inline-actions {
    gap: 8px;
  }
  .personal-notification {
    padding: 16px 10px;
    gap: 9px;
  }
  .personal-notification-arrow {
    display: none;
  }
}
.lot-grid-v4 {
  grid-auto-rows: auto;
  align-items: start;
}
.lot-card-v4 > .badge {
  align-self: flex-start;
}
.lot-card-v4 > h2 {
  margin-bottom: 4px;
}
.lot-card-v4 > .btn {
  margin-top: 18px;
}
.stock-category-heading {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  background: var(--surface2);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.stock-category-heading:not(:first-child) {
  border-top: 1px solid var(--line);
}
.item-trace [data-device-fields] {
  margin-top: 12px;
}
.item-trace [data-device-fields][hidden] {
  display: none;
}
.control-history-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.control-cancel-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
@media (max-width: 700px) {
  .profile-btn > span:not(.avatar),
  .profile-btn > .icon {
    display: none;
  }
  .review-line:has(.control-history-actions) {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .control-history-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  .control-history-actions > a {
    margin-left: auto;
  }
  .control-history-actions > button {
    min-height: 44px;
    padding-left: 0;
  }
  .control-history-actions > a {
    min-height: 44px;
  }
}

@media (max-width: 700px) {
  .breadcrumb {
    display: none;
  }
}

.profile-btn > .icon {
  transform: rotate(90deg);
}

/* Réassort rapide : seul le produit correspondant est présenté par défaut. */
.restock-destination {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.restock-destination h3 {
  margin: 6px 0;
}
.restock-destination p,
.restock-chosen p {
  color: var(--muted);
  font-size: 12px;
}
.restock-chosen {
  border: 1px solid var(--line);
  background: var(--surface2);
  border-radius: 12px;
  padding: 16px;
}
.restock-chosen p {
  margin-top: 6px;
}
.restock-chosen .text-btn {
  margin-top: 8px;
  font-size: 12px;
}
.restock-product-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.restock-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  margin-top: 10px;
}
.restock-product:hover,
.restock-product:focus-visible {
  border-color: var(--active-text);
  background: var(--active-bg);
}
.restock-product small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.restock-product:disabled {
  cursor: default;
  opacity: 0.6;
}
.withdrawal-details {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.withdrawal-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
.withdrawal-details .label {
  margin-top: 14px;
}
#restock-search-results {
  max-height: 48dvh;
  overflow: auto;
}
@media (max-width: 700px) {
  .restock-product {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
.mission-date-pending {
  font-size: 12px;
  color: var(--amber);
  margin: 0 0 12px;
}

#restock-form.stack,
#take-form.stack {
  gap: 14px;
}
#restock-form .form-error:empty,
#take-form .form-error:empty {
  display: none;
}
#restock-form > .modal-footer,
#take-form > .modal-footer {
  margin-top: 4px;
  padding-top: 12px;
}

/* Bound native mobile fields and grid tracks to the dialog width (including iOS dates). */
.modal {
  min-width: 0;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
.modal > *,
.modal form,
.modal .stack,
.modal .form-section,
.modal .form-grid > * {
  min-width: 0;
  max-width: 100%;
}
.modal .stack,
.modal .label {
  grid-template-columns: minmax(0, 1fr);
}
.modal .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.modal .input,
.modal select,
.modal textarea {
  min-width: 0;
  max-width: 100%;
}
.modal input[type="date"],
.modal input[type="datetime-local"] {
  display: block;
  width: 100%;
  min-inline-size: 0;
}
.modal-header h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.modal-header .icon-btn {
  flex-shrink: 0;
}
.check-label-compact {
  display: none;
}
@media (max-width: 700px) {
  .modal .config-footer-v4 .btn {
    white-space: normal;
    text-align: center;
  }
  .modal .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .modal .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .modal .form-grid.two:has(input[type="datetime-local"]) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 920px) {
  body:has(#check-form) .mobile-nav {
    transition: transform 0.18s ease;
  }
  body:has(#check-form) .mobile-nav.inventory-nav-hidden {
    transform: translateY(100%);
    pointer-events: none;
  }
  #check-form .check-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    bottom: var(--inventory-action-bottom, 88px);
    border-radius: 12px;
  }
  #check-form .check-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px;
    font-size: 12px;
    gap: 6px;
  }
  #check-form .check-actions .btn .icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }
  #check-form .check-label-full {
    display: none;
  }
  #check-form .check-label-compact {
    display: inline;
  }
  #check-form .check-actions > :only-child {
    grid-column: 1 / -1;
  }
}

/* Personal menu only: keep the global navigation and preference dialogs intact. */
.modal.account-menu-dialog {
  max-width: 400px;
}
.account-menu-dialog .account-menu-identity {
  gap: 12px;
  margin: 4px 0 16px;
}
.account-menu-dialog .account-menu-identity .avatar {
  width: 44px;
  height: 44px;
  font-size: 15px;
  flex: none;
}
.account-menu-identity > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-menu-identity h3 {
  font-size: 16px;
}
.account-menu-identity p {
  font-size: 12px;
  margin-top: 3px;
}
.account-menu-links {
  display: grid;
  gap: 4px;
}
.account-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}
.account-menu-link:hover {
  background: var(--surface2);
}
.account-menu-link > .icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--muted);
}
.account-menu-footer {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 8px;
}
.account-menu-footer .account-menu-link {
  color: var(--muted);
  font-weight: 500;
}
