
/* Customer archive actions follow desktop and mobile reading order. */
#app .heading .dealer-archive-actions {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px 10px;
  max-width: 100%;
}
#app .dealer-archive-actions .btn { white-space: nowrap; }
#app .dealer-archive-actions .dealer-exit-entry {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 12px;
}

/* Dealership exit forms reuse the system dialog and financial summary. */
#dialog[data-design-view="dealer-exit"] .panel-h {
  flex-wrap: nowrap;
  gap: 10px;
}
#dialog[data-design-view="dealer-exit"] .dealer-exit-dialog-title { flex: 1 1 100%; min-width: 0; }
#dialog[data-design-view="dealer-exit"] .dealer-exit-dialog-title h2 {
  margin: 0;
  line-height: 1.26;
  white-space: normal;
  overflow-wrap: anywhere;
}
#dialog .dealer-exit-dialog-stage {
  margin: 6px 0 0;
  color: #4f5864;
  font-size: 13px;
  line-height: 1.45;
}
#dialog[data-design-view="dealer-exit"] .dialog-body { overflow-wrap: anywhere; }
#dialog[data-design-view="dealer-exit"] .dialog-body > .panel { margin: 0; }
#dialog[data-design-view="dealer-exit"] .field input,
#dialog[data-design-view="dealer-exit"] .field textarea { min-width: 0; }
#dialog[data-design-view="dealer-exit"] .footer-actions { flex-wrap: wrap; }
#dialog[data-design-view="dealer-exit"] .bankline { gap: 10px 16px; }
#dialog[data-design-view="dealer-exit"] .bankline > b { min-width: 0; }

.dealer-exit-list-row, .dealer-exit-blocker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.dealer-exit-list-row > div, .dealer-exit-blocker > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dealer-exit-list-row > div:first-child { flex: 1 1 220px; }
.dealer-exit-list-row h3 { margin: 0 0 4px; }
.dealer-exit-list-status { display: grid; gap: 4px; justify-items: start; }
.dealer-exit-list-status small { color: #4f5864; }
.dealer-exit-note-text { white-space: pre-wrap; }
.dealer-exit-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dealer-exit-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #252a30;
}
.dealer-exit-upload > p { margin-bottom: 6px; font-weight: 650; }
.dealer-exit-upload .upload-field > b { display: none; }
.dealer-exit-ledger { margin-top: 12px; }
.dealer-exit-receipt-detail {
  display: grid;
  grid-template-columns: minmax(5.5em, max-content) minmax(0, 1fr);
  align-items: baseline;
  gap: 6px 12px;
  margin: 8px 0;
}
.dealer-exit-receipt-detail > span { color: #4f5864; }
.dealer-exit-receipt-event + .dealer-exit-receipt-event { margin-top: 8px; }
#dialog .dealer-exit-receipt-detail .attachments { margin: 0; }
#dialog .dealer-exit-receipt-detail .attachments a,
#dialog .dealer-exit-receipt-files .attachments a {
  flex-direction: row;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
}
#dialog .dealer-exit-receipt-detail .attachments img,
#dialog .dealer-exit-receipt-files .attachments img { width: 40px; height: 40px; }
#dialog .dealer-exit-receipt-detail .pdf-thumb,
#dialog .dealer-exit-receipt-files .pdf-thumb {
  width: auto;
  min-height: 0;
  height: auto;
  padding: 6px;
}

@media (max-width: 760px) {
  #app .heading .dealer-archive-actions { gap: 6px; }
  #app .dealer-archive-actions .btn {
    min-height: 44px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .dealer-exit-list-row > div:first-child { flex-basis: 100%; }
}
