.dealer-public {
  padding: 2.5rem 0 4rem;
}

.dealer-public h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.dealer-public .lede {
  font-size: 1.15rem;
  max-width: 46rem;
}

.dealer-public > p {
  max-width: 46rem;
}

.dealer-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.dealer-hub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.5rem 1.4rem 1.6rem;
  color: inherit;
  box-shadow: var(--shadow);
}

.dealer-hub-card:hover {
  color: inherit;
  border-color: rgba(122, 20, 40, 0.25);
}

.dealer-hub-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.dealer-hub-card p {
  margin: 0;
  color: var(--muted);
}

.dealer-apply-form,
.dealer-finder-form {
  margin-top: 1.75rem;
  max-width: 44rem;
}

.dealer-apply-form fieldset {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 24px;
  padding: 1.4rem 1.4rem 0.4rem;
  margin: 0 0 1rem;
}

.dealer-apply-form legend {
  font-weight: 700;
  padding: 0 0.4rem;
}

.dealer-apply-form p,
.portal-form p {
  margin: 0 0 1rem;
}

.dealer-apply-form label,
.dealer-finder-form label,
.portal-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.dealer-finder-form .finder-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.dealer-apply-form input,
.dealer-apply-form select,
.dealer-finder-form input[type="search"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: var(--bg);
}

.company-suggest {
  position: relative;
  margin: 0 0 1rem;
}

.company-suggest-list {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% - 0.35rem);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 16rem;
  overflow: auto;
}

.company-suggest-list li {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.company-suggest-list li span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.company-suggest-list li:hover,
.company-suggest-list li.is-active {
  background: var(--bg);
}

.dealer-apply-existing {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem 0.2rem;
  margin: 0 0 1rem;
}

.finder-notice {
  margin-top: 1rem;
}

.finder-notice.is-hidden {
  display: none;
}

.dealer-finder {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  margin-top: 1.5rem;
}

.dealer-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 560px;
  overflow: auto;
  padding-right: 0.2rem;
}

.dealer-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.1rem 1.15rem;
  cursor: pointer;
}

.dealer-card:hover,
.dealer-card.is-active {
  border-color: rgba(122, 20, 40, 0.35);
}

.dealer-card.is-active {
  box-shadow: var(--shadow);
}

.dealer-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.dealer-card p {
  margin: 0 0 0.65rem;
}

.dealer-map {
  min-height: 560px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d9e3dc;
}

.dealer-map-popup {
  display: grid;
  gap: 0.2rem;
  min-width: 160px;
  font-family: "DM Sans", system-ui, sans-serif;
}

.dealer-map-popup strong {
  color: var(--ink);
}

.dealer-map-popup img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 0.4rem;
}

.dealer-logo,
.dealer-logo-preview img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.dealer-doc-group {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 24px;
  padding: 1.4rem 1.4rem 0.5rem;
}

.dealer-credit-steps {
  max-width: 46rem;
  padding-left: 1.25rem;
}

.dealer-credit-steps li {
  margin: 0 0 0.45rem;
}

.dealer-credit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.dealer-credit-download {
  max-width: 46rem;
  margin: 0.75rem 0 0.25rem;
}

.dealer-doc-group h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.dealer-doc-slot {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.dealer-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.dealer-doc-slot h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.dealer-doc-status {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.dealer-doc-status.is-ready {
  color: #2f6b3a;
}

.dealer-doc-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.75rem;
}

.dealer-doc-upload label {
  flex: 1 1 16rem;
}

.dealer-doc-upload input[type="file"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: var(--bg);
}

.dealer-doc-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.dealer-doc-progress {
  display: none;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.dealer-doc-upload.is-uploading .dealer-doc-progress {
  display: block;
}

.dealer-doc-submit-app {
  margin-top: 1.75rem;
}

.dealer-doc-upload .error {
  flex: 1 1 100%;
  color: #9b1c1c;
  margin: 0;
}

@media (max-width: 860px) {
  .dealer-hub-grid,
  .form-row,
  .dealer-finder {
    grid-template-columns: 1fr;
  }

  .dealer-finder-form .finder-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dealer-list,
  .dealer-map {
    min-height: 280px;
    max-height: 320px;
  }
}
