.hg-vendor-apply .hg-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.hg-vendor-apply .hg-toolbar input {
  min-width: 160px;
}

.hg-vendor-apply .hg-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.hg-vendor-apply .hg-row-actions form {
  margin: 0;
}

.hg-vendor-apply .hg-danger {
  color: #a52230;
  border-color: #d69ca4;
  background: #fff;
}

.hg-vendor-apply .hg-app-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.hg-vendor-apply .hg-store-focus {
  background: #f3f7fd;
  border: 1px solid #d8e4f4;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.hg-vendor-apply .hg-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hg-vendor-apply .hg-offer-section {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 14px;
  border: 1px solid #dce5f0;
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}

.hg-vendor-apply .hg-offer-section legend {
  font-size: 16px;
  font-weight: 700;
  padding: 0 8px;
}

.hg-vendor-apply .hg-offer-section label {
  display: grid;
  gap: 6px;
}

.hg-vendor-apply .hg-offer-section input:not([type=checkbox]):not([type=radio]),
.hg-vendor-apply .hg-offer-section select,
.hg-vendor-apply .hg-offer-section textarea {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.hg-vendor-apply .hg-template-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(145px,1fr));
  gap: 12px;
  margin: 12px 0;
}

.hg-vendor-apply .hg-template-choice {
  border: 1px solid #dce5f0;
  border-radius: 12px;
  display: grid;
  gap: 7px;
  padding: 9px;
  cursor: pointer;
}

.hg-vendor-apply .hg-template-choice:has(input:checked) {
  outline: 2px solid #1748a5;
}

.hg-vendor-apply .hg-template-mini {
  height: 84px;
  display: block;
  background: #edf2fb;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.hg-vendor-apply .hg-template-mini i {
  display: block;
  height: 26px;
  background: #183c80;
}

.hg-vendor-apply .hg-template-mini b {
  display: inline-block;
  background: #ccd8ec;
  width: 26%;
  height: 40px;
  margin: 8px 2%;
}

.hg-vendor-apply .hg-template-mini em {
  display: inline-block;
  background: white;
  width: 26%;
  height: 40px;
  margin: 8px 2%;
}

.hg-vendor-apply .hg-template-mini small {
  display: inline-block;
  background: #bdcbe3;
  width: 26%;
  height: 40px;
  margin: 8px 2%;
}

.hg-vendor-apply .hg-template-choice--beauty .hg-template-mini i {
  background: #a24869;
}

.hg-vendor-apply .hg-template-choice--digital .hg-template-mini i {
  background: #3535a3;
}

.hg-vendor-apply .hg-template-choice--services .hg-template-mini i {
  background: #236168;
}

.hg-vendor-apply .hg-template-choice--coaching .hg-template-mini i {
  background: #96721d;
}

.hg-vendor-apply .hg-template-choice--academy .hg-template-mini i {
  background: #c7333c;
}

@media(max-width:600px) {
  .hg-vendor-apply .hg-template-choices {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .hg-vendor-apply .hg-offer-section {
    grid-template-columns: 1fr;
  }
}

/* Required field and contextual type layout - PATCH007 */

.hg-offer-section .hg-required,
.hg-store-admin .hg-required {
  color: #b72333;
  font-weight: 800;
  display: inline;
}

.hg-offer-section .hg-optional {
  font-weight: 400;
  color: #64748b;
}

.hg-offer-section .hg-type-panel[hidden],
.hg-offer-section [data-hg-commission-fields][hidden] {
  display: none;
}

.hg-offer-section .hg-type-fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  align-items: start;
}

.hg-offer-section .hg-inline-pair {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.hg-offer-section .hg-commission {
  display: grid;
  grid-column: 1/-1;
  gap: 12px;
  border: 1px solid #dce5f0;
  border-radius: 10px;
  padding: 12px;
}

.hg-offer-section .hg-commission .hg-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
}

.hg-offer-section .hg-commission .hg-check input {
  width: auto;
  min-height: auto;
}

.hg-offer-section .hg-wide {
  grid-column: 1/-1;
}

.hg-offer-section .hg-type-fields input,
.hg-offer-section .hg-type-fields textarea {
  width: 100%;
  box-sizing: border-box;
}

.hg-offer-section .hg-type-fields label {
  display: grid;
  gap: 7px;
}

.hg-form-grid .hg-inline-pair {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

@media(max-width:700px) {
  .hg-offer-section .hg-type-fields,
  .hg-offer-section .hg-inline-pair,
  .hg-form-grid .hg-inline-pair {
    grid-template-columns: minmax(0,1fr);
  }
}

/* PATCH036 — vendor application clarity, accessible uploads and consent. */
.hg-vendor-apply .hg-template-view-note {
  margin: 6px 0 0;
  padding: 12px 14px;
  border: 1px solid #c7d9f1;
  border-left: 4px solid #1748a5;
  border-radius: 9px;
  background: #f1f6ff;
  color: #25476e;
  font-size: 14px;
  line-height: 1.55;
  grid-column: 1/-1;
}
.hg-vendor-apply .hg-form-grid label.hg-consent-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start;
  gap: 11px !important;
  margin: 4px 0 0;
  font-weight: 600;
  line-height: 1.55;
}
.hg-vendor-apply .hg-consent-row input[type="checkbox"] {
  display: block;
  flex: 0 0 19px;
  inline-size: 19px !important;
  block-size: 19px;
  min-height: 19px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
}
.hg-vendor-apply .hg-consent-row > span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}
.hg-vendor-apply .hg-apply-photo-field {
  display: grid;
  gap: 10px;
  min-width: 0;
  grid-column: 1/-1;
}
.hg-vendor-apply .hg-apply-photo-field > label {
  display: block;
  font-weight: 700;
}
.hg-vendor-apply .hg-apply-photo-hint,
.hg-vendor-apply .hg-upload-status {
  margin: 0;
  color: #4b6280;
  font-size: 13px;
  line-height: 1.5;
}
.hg-vendor-apply .hg-apply-photo-field > input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 9px;
  background: #f7faff;
  border: 1px solid #c7d7eb;
  border-radius: 10px;
  cursor: pointer;
}
.hg-vendor-apply .hg-apply-photo-field > input[type="file"]::file-selector-button {
  appearance: none;
  background: #1748a5;
  border: 1px solid #1748a5;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  margin-right: 12px;
  padding: 10px 16px;
  min-height: 42px;
}
.hg-vendor-apply .hg-apply-photo-field > input[type="file"]::-webkit-file-upload-button {
  background: #1748a5;
  border: 1px solid #1748a5;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  margin-right: 12px;
  padding: 10px 16px;
  min-height: 42px;
}
.hg-vendor-apply .hg-apply-photo-field > input[type="file"]:focus-visible,
.hg-vendor-apply .hg-apply-photo-field > input[type="file"]::file-selector-button:focus-visible {
  outline: 3px solid #79a8fb;
  outline-offset: 3px;
}
.hg-vendor-apply .hg-apply-photo-preview {
  margin: 0;
  width: min(100%,390px);
  padding: 12px;
  border: 1px solid #d3dfee;
  border-radius: 12px;
  background: #f6f9fd;
}
.hg-vendor-apply .hg-apply-photo-preview[hidden],
.hg-vendor-apply .hg-apply-photo-preview img[hidden] { display: none !important; }
.hg-vendor-apply .hg-apply-photo-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.hg-vendor-apply .hg-apply-photo-preview figcaption {
  margin-top: 8px;
  color: #365273;
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .hg-vendor-apply .hg-apply-photo-field > input[type="file"]::file-selector-button,
  .hg-vendor-apply .hg-apply-photo-field > input[type="file"]::-webkit-file-upload-button {
    display: block;
    margin-right: 0;
    margin-bottom: 7px;
  }
}

/* Business registration question: optional path, shown as two plain choices. */
.hg-vendor-apply .hg-registration-question { display: grid; gap: 8px; }
.hg-vendor-apply .hg-registration-hint { margin: 0; color: #5b6b85; font-size: 14px; line-height: 1.5; }
.hg-vendor-apply .hg-registration-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.hg-vendor-apply .hg-offer-section .hg-registration-choices .hg-check {
  display: flex; flex-direction: row; align-items: center; gap: 9px;
  border: 1px solid #cdd9e8; border-radius: 10px; padding: 11px 16px; cursor: pointer; font-weight: 600; min-height: 44px;
}
.hg-vendor-apply .hg-registration-choices .hg-check:has(input:checked) { border-color: #1748a5; background: #f1f6ff; }
.hg-vendor-apply .hg-registration-choices .hg-check input { width: auto; min-height: 0; margin: 0; }
.hg-vendor-apply [data-hg-registration-fields][hidden] { display: none; }

/* Application status page: status, three steps, summary and editing rules. */
.hg-vendor-apply.hg-track { max-width: 760px; }
.hg-track .hg-track-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #5b6b85; margin: 0 0 16px; }
.hg-track .hg-state { display: inline-flex; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; background: #fff2d9; color: #765618; }
.hg-track .hg-state--publish { background: #e4f6e8; color: #216b3b; }
.hg-track .hg-state--draft { background: #eef0f4; color: #465268; }
.hg-track-steps { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0 0 18px; padding: 0; }
.hg-track-steps li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #dce5f0; border-radius: 10px; color: #5b6b85; font-weight: 600; min-width: 0; }
.hg-track-steps li span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #e8eef8; font-size: 12px; }
.hg-track-steps li.is-current { border-color: #1748a5; color: #1748a5; background: #f1f6ff; }
.hg-track-steps li.is-current span, .hg-track-steps li.is-done span { background: #1748a5; color: #fff; }
.hg-track-steps li.is-done { color: #182c4c; }
.hg-track-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 8px 18px; margin: 10px 0 18px; }
.hg-track-summary div { border-bottom: 1px solid #edf1f6; padding-bottom: 6px; min-width: 0; }
.hg-track-summary dt { color: #5b6b85; font-size: 12px; }
.hg-track-summary dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.hg-track-note { border: 1px solid #d4e2f5; background: #f4f8fe; border-radius: 10px; padding: 14px 16px; margin: 14px 0; }
.hg-track-note p { margin: 6px 0 12px; line-height: 1.55; }
.hg-track-note p:last-child { margin-bottom: 0; }
.hg-track-note--warning { border-color: #f0d9a6; background: #fff8e8; }
.hg-track-closed { color: #5b6b85; }
.hg-track-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px; }
.hg-track .hg-action-link--quiet { background: none; color: #1748a5; border: 0; padding: 0; }
@media (max-width: 560px) { .hg-track-steps { grid-template-columns: minmax(0,1fr); } }

.hg-track-answers { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.hg-track-question { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.hg-track-question textarea { width: 100%; box-sizing: border-box; border: 1px solid #bac9da; border-radius: 7px; padding: 9px 10px; font: inherit; font-weight: 400; }
.hg-track-summary--qa { grid-template-columns: minmax(0,1fr); }

/* PATCH039: targeted changes requested by the HG Store team. */
.hg-changes .hg-change-item { border: 1px solid #e0e6ef; border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; min-width: 0; }
.hg-changes .hg-change-item legend { font-weight: 700; padding: 0 4px; }
.hg-changes .hg-change-item--error { border-color: #b32d2e; background: #fff7f7; }
.hg-changes .hg-change-instruction { margin: 0 0 6px; }
.hg-changes .hg-change-previous { margin: 0 0 8px; color: #4a586e; font-size: .95em; }
.hg-changes .hg-change-previous span { font-weight: 600; }
.hg-changes .hg-change-error { margin: 6px 0 0; color: #b32d2e; font-weight: 600; }
.hg-changes .hg-change-item label { display: flex; flex-direction: column; gap: 6px; }
.hg-changes .hg-change-item textarea, .hg-changes .hg-change-item input[type="text"], .hg-changes .hg-change-item input[type="tel"], .hg-changes .hg-change-item select { width: 100%; box-sizing: border-box; }
.hg-changes .hg-change-photo img { border-radius: 8px; margin-bottom: 8px; }