.sales-inbox-list {
  display: grid;
  gap: 10px;
}

.inventory-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.inventory-toolbar-actions,
.inventory-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inventory-toolbar-actions .search {
  min-width: min(330px, 40vw);
}

.inventory-photo {
  width: 100%;
  height: auto;
  min-height: 210px;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}

.inventory-card-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}

.inventory-card-actions .button {
  flex: 1;
}

.button.danger {
  border-color: rgba(255, 133, 133, 0.3);
  background: rgba(255, 90, 90, 0.1);
  color: #ff9c9c;
}

.listing-dialog-card {
  width: min(760px, calc(100vw - 28px));
}

.deal-dialog-card {
  width: min(820px, calc(100vw - 28px));
}

.recon-editor {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #080a09;
}

.recon-editor h4 {
  margin: 0;
}

.recon-add {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 8px;
  margin-top: 12px;
}

.recon-list {
  display: grid;
  margin-top: 10px;
}

.recon-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.recon-row .done {
  color: var(--muted);
  text-decoration: line-through;
}

.recon-check,
.recon-remove {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #101310;
  color: var(--text);
  cursor: pointer;
}

.recon-check.done {
  border-color: var(--green);
  color: var(--green);
}

.deal-live-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.deal-live-summary div {
  padding: 11px;
  border-radius: 12px;
  background: #080a09;
}

.deal-live-summary small,
.deal-live-summary b {
  display: block;
}

.deal-live-summary small {
  color: var(--muted);
}

.deal-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.deal-workflow,
.workflow-strip {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.deal-workflow span,
.workflow-strip span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.deal-workflow span b {
  margin-right: 5px;
  color: var(--text);
}

.inventory-deal-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.research-actions span {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.research-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.listing-photo-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.listing-photo-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #080a09 center / cover no-repeat;
}

.listing-photo-item button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-weight: 900;
}

.dialog-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.vin-capture {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(166, 255, 0, 0.22);
  border-radius: 14px;
  background: rgba(166, 255, 0, 0.04);
}

.vin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vin-capture > small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.vin-capture > small.error-text {
  color: #ff8585;
}

.vin-crop-dialog-card {
  width: min(940px, calc(100vw - 20px));
}

.vin-crop-help {
  margin: -7px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.vin-crop-stage {
  display: grid;
  place-items: center;
  overflow: auto;
  max-height: 62vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #030403;
}

#vin-crop-canvas {
  display: block;
  max-width: 100%;
  cursor: crosshair;
  touch-action: none;
}

#vin-crop-status {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.vin-crop-buttons {
  justify-content: flex-end;
  margin-top: 14px;
}

.file-button {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.inventory-filters button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.inventory-filters button.active {
  border-color: var(--green);
  background: var(--green);
  color: #071000;
}

.listing-type-chip {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(166, 255, 0, 0.1);
  color: var(--green);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.consent-row {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
}

.consent-row input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.sales-thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.sales-thread-main {
  min-width: 0;
}

.sales-thread-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.sales-thread h4 {
  margin: 0;
  font-size: 16px;
}

.sales-thread-meta,
.sales-thread-preview {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}

.sales-thread-preview {
  color: #c9d0c5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-thread-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offer-chip,
.crm-chip {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.offer-chip {
  background: rgba(244, 191, 104, 0.1);
  color: var(--amber);
}

.crm-chip {
  background: rgba(166, 255, 0, 0.1);
  color: var(--green);
}

@media (max-width: 760px) {
  .recon-add,
  .deal-live-summary {
    grid-template-columns: 1fr;
  }
  .sales-thread {
    grid-template-columns: 1fr;
  }

  .sales-thread-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .inventory-toolbar-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-toolbar-actions .search {
    min-width: 0;
    max-width: none;
  }

  .inventory-photo {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .listing-photo-preview {
    grid-template-columns: repeat(3, 1fr);
  }
}
