.no-receipt-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.no-receipt-form textarea {
  min-height: 42px;
}

.no-receipt-notes {
  display: grid;
  gap: 10px;
}

.customer-console {
  display: block;
}

.customer-directory-panel {
  display: grid;
  gap: 12px;
}

.customer-toolbar {
  display: grid;
  gap: 6px;
}

.customer-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.customer-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 111, 114, 0.12);
}

.customer-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.customer-card-metrics span {
  min-height: 48px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-card-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.customer-file {
  display: grid;
  gap: 14px;
}

.customer-file-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  position: sticky;
  top: 10px;
  z-index: 10;
  box-shadow: 0 10px 28px rgba(21, 32, 43, 0.08);
}

.customer-file-header h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.08;
}

.customer-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.customer-history-panel {
  grid-column: 1 / -1;
}

.customer-inspection-gallery-panel {
  grid-column: 1 / -1;
}

.inspection-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inspection-photo-bucket {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.inspection-photo-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.inspection-photo-heading strong,
.inspection-photo-heading span {
  display: block;
}

.inspection-photo-heading strong {
  color: var(--ink);
  font-size: 15px;
}

.inspection-photo-heading span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inspection-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  padding: 2px 2px 4px;
}

.inspection-photo-thumb {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  color: inherit;
  text-decoration: none;
}

.inspection-photo-thumb:hover,
.inspection-photo-thumb:focus-visible {
  border-color: rgba(15, 111, 114, 0.48);
  box-shadow: 0 0 0 3px rgba(15, 111, 114, 0.10);
  outline: 0;
}

.inspection-photo-image {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: #e8eef2;
}

.inspection-photo-image img,
.inspection-photo-image .document-placeholder-art {
  display: block;
  width: 100%;
  height: 100%;
}

.inspection-photo-image img {
  object-fit: cover;
}

.inspection-photo-caption,
.inspection-photo-thumb small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-photo-caption {
  color: #243744;
  font-size: 12px;
  font-weight: 800;
}

.inspection-photo-thumb small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.customer-assignment-panel {
  display: grid;
  gap: 12px;
}

.customer-assigned-vehicle {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.compact-frame {
  min-height: 112px;
  border-radius: 8px;
}

.compact-frame .vehicle-photo-placeholder,
.compact-frame .vehicle-photo-img {
  min-height: 112px;
}

.assignment-drawer {
  background: #f8fbfc;
}

.customer-document-tools {
  display: grid;
  gap: 10px;
}

.document-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.document-upload-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.document-upload-card[open] {
  box-shadow: 0 0 0 3px rgba(15, 111, 114, 0.10);
}

.document-upload-summary {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  cursor: pointer;
  padding: 9px;
  list-style: none;
}

.document-upload-summary::-webkit-details-marker {
  display: none;
}

.document-preview-window {
  position: relative;
  width: 72px;
  height: 72px;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #e8eef2;
  border: 1px solid #ccd8e0;
}

.document-preview-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.document-preview-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.document-placeholder-art {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 100%;
  padding: 7px;
  text-align: center;
  color: #2a3f4b;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.18)),
    linear-gradient(135deg, #e5edf2, #f7fafb);
}

.document-placeholder-art.document-license {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.1)),
    linear-gradient(135deg, #e3f0ef, #f7fbfb);
}

.document-placeholder-art.document-rental_agreement {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #eef0e3, #fbfbf6);
}

.document-placeholder-art.document-background_check {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #e9edf7, #f8faff);
}

.document-placeholder-art.document-pre_inspection_photos {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #e4f1e8, #f8fbf8);
}

.document-placeholder-art.document-post_inspection_photos {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #eef0e6, #fbfaf4);
}

.document-placeholder-art.document-other {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #f2e9e2, #fbf7f3);
}

.document-sheet {
  display: grid;
  align-content: center;
  gap: 4px;
  width: 32px;
  height: 40px;
  padding: 7px 6px;
  border: 1px solid rgba(31, 52, 64, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px rgba(31, 52, 64, 0.10);
}

.document-sheet span {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(31, 52, 64, 0.24);
}

.document-sheet span:nth-child(2) {
  width: 78%;
}

.document-sheet span:nth-child(3) {
  width: 54%;
}

.document-placeholder-art strong {
  display: none;
}

.document-placeholder-art small {
  display: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.document-slot-header {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.document-slot-header strong {
  font-size: 15px;
  line-height: 1.15;
}

.document-slot-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.document-slot-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.document-upload-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #f8fbfc;
  padding: 10px;
}

.random-document-upload-wrap {
  margin-top: 4px;
}

.random-document-upload {
  max-width: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.random-document-upload summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 800;
  color: #243744;
}

.random-document-upload summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.random-document-upload[open] summary {
  border-bottom: 1px solid var(--line);
}

.compact-upload-box {
  padding: 10px;
}

.document-slot-note {
  display: grid;
  gap: 6px;
}

.customer-card-list {
  grid-template-columns: 1fr;
  gap: 10px;
}

.customer-card {
  grid-template-columns: 46px minmax(0, 1fr) minmax(240px, 380px) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
}

.customer-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #e7f2f1;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.customer-card-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-card-main .item-title {
  justify-content: flex-start;
}

.customer-card-main .item-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-open-button {
  justify-self: end;
  white-space: nowrap;
}

.customer-file-header {
  position: static;
  align-items: center;
  border-left: 4px solid var(--primary);
  box-shadow: none;
}

.customer-file-header h2 {
  font-size: 30px;
}

.customer-primary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.customer-summary-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.customer-readiness-panel,
.customer-document-vault {
  display: grid;
  gap: 14px;
}

.readiness-list {
  display: grid;
  gap: 8px;
}

.readiness-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.readiness-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--warn);
}

.readiness-item.is-complete .readiness-dot {
  background: var(--good);
}

.readiness-item strong,
.readiness-item small {
  display: block;
}

.readiness-item strong {
  color: var(--ink);
  font-size: 13px;
}

.readiness-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.customer-vault-section {
  display: grid;
  gap: 10px;
}

.subsection-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.subsection-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.subsection-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.customer-doc-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-doc-slot .document-upload-summary {
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 86px;
}

.customer-doc-slot .document-preview-window {
  width: 62px;
  height: 62px;
}

.document-slot-header small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.inspection-photo-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inspection-photo-upload .file-upload-box {
  min-height: 40px;
  padding: 8px 10px;
}

.inspection-photo-upload input {
  max-width: 100%;
}

.customer-communications-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.customer-communications-layout > .panel {
  min-width: 0;
}

.communication-history-panel {
  grid-column: 1 / -1;
}

.communication-history,
.communication-threads {
  display: grid;
  gap: 10px;
}

.communication-threads {
  margin-bottom: 16px;
}

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

.communication-row {
  border: 1px solid var(--line, #dbe2ea);
  border-left: 4px solid var(--muted, #7b8794);
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
}

.communication-row.is-inbound {
  border-left-color: var(--accent, #1769aa);
  background: color-mix(in srgb, var(--accent, #1769aa) 5%, white);
}

.communication-row.is-outbound {
  border-left-color: var(--success, #287d4f);
}

.communication-row p {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .customer-communications-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .communication-history-panel {
    grid-column: auto;
  }

  .communication-thread-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.customer-random-upload {
  max-width: none;
  width: 100%;
  background: #fbfcfd;
}

.file-upload-box {
  display: grid;
  gap: 7px;
  border: 1px dashed #9fb2bf;
  border-radius: 8px;
  background: #f8fbfc;
  padding: 10px;
  color: #314653;
  font-weight: 800;
}

.file-upload-box span {
  font-size: 13px;
}

.file-upload-box input {
  background: #fff;
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 0;
  border-radius: 7px;
  background: #e7edf1;
  color: #1f3440;
  font-weight: 800;
  cursor: pointer;
}
