/* Sold Units — distributor registry for sold boats & SUPs */

.su-section-wrap {
  margin-top: 0.5rem;
}

.su-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.su-dashboard-alerts,
.su-doc-alerts {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #0b6bcb;
  margin-bottom: 1rem;
}

.su-alert-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.su-alert-list li {
  margin: 0.25rem 0;
}

.su-alert--expired {
  color: #b91c1c;
  font-weight: 600;
}

.su-alert--warn {
  color: #c2410c;
}

.su-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.su-metric {
  font-size: 0.9rem;
  color: #555;
}

.su-thumb-cell {
  width: 48px;
  padding: 0.35rem !important;
  vertical-align: middle;
}

.su-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.su-thumb-placeholder {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: #eee;
  border-radius: 4px;
  font-size: 0.75rem;
  text-align: center;
  line-height: 40px;
  color: #999;
}

.su-empty {
  color: #666;
  font-size: 0.9rem;
  margin: 0.75rem 0;
}

.su-unit-link {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.su-unit-link:hover {
  text-decoration: underline;
}

.su-detail-wrap {
  margin-top: 0.5rem;
}

.su-unit-tabs {
  margin-bottom: 1rem;
}

.su-photo-section {
  margin-bottom: 1.5rem;
}

.su-photo-main-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.su-unit-photo-main {
  max-width: 280px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.su-photo-placeholder {
  width: 280px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
  color: #999;
  border: 1px dashed #ccc;
}

.su-photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.su-gallery-item {
  width: 120px;
}

.su-gallery-item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
  display: block;
  margin-bottom: 0.25rem;
}

.su-profile-form,
.su-modal-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
}

.su-profile-form .full-width,
.su-modal-body .full-width {
  grid-column: 1 / -1;
}

.su-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.su-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.su-modal-title {
  margin: 0 0 1rem;
  grid-column: 1 / -1;
}

.su-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.su-row-actions {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .su-unit-photo-main,
  .su-photo-placeholder {
    max-width: 100%;
    width: 100%;
  }
}
