.installer-super-actions {
  vertical-align: middle;
  white-space: nowrap;
}

.installer-super-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin: 0 4px 0 0;
  line-height: 1.2;
}

.installer-super-actions button:last-child {
  margin-right: 0;
}

.installer-super-actions .danger,
.installer-delete-button {
  border-color: #b42318;
  color: #b42318;
  background: #fff;
}

.installer-super-actions .danger:hover,
.installer-delete-button:hover {
  background: #fff2f0;
}

.installer-manage-dialog {
  width: min(820px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.installer-manage-form {
  min-width: 0;
  padding: 24px 28px 28px;
}

.installer-manage-form .dialog-heading {
  margin-bottom: 20px;
  padding-bottom: 14px;
}

.installer-manage-form .dialog-heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.installer-manage-form .dialog-heading small {
  color: #667085;
  font-size: 12px;
}

.installer-manage-form h3 {
  margin: 24px 0 8px;
  color: #243b53;
  font-size: 14px;
  font-weight: 600;
}

.installer-manage-form h3:first-of-type {
  margin-top: 0;
}

.installer-manage-form h3:not(:first-of-type) {
  padding-top: 18px;
  border-top: 1px solid #e2e8ee;
}

.installer-manage-form .form-grid {
  gap: 0 14px;
}

.installer-manage-form label {
  margin: 8px 0 10px;
}

.installer-manage-form input,
.installer-manage-form select {
  height: 38px;
}

.installer-manage-form input[type="file"] {
  height: auto;
  min-height: 38px;
  padding: 6px;
}

.installer-manage-address-button {
  display: flex;
  align-items: flex-end;
  padding-bottom: 10px;
}

.installer-manage-address-button button {
  width: 100%;
  min-height: 38px;
}

.installer-manage-checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-top: 4px !important;
}

.installer-manage-checkbox input[type="checkbox"] {
  width: auto;
  height: auto;
  margin: 0;
}

.installer-manage-form .form-help {
  margin: 6px 0 2px;
  line-height: 1.55;
}

.installer-manage-documents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid #e1e7ec;
  background: #f8fafb;
  font-size: 12px;
}

.installer-manage-documents span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.installer-manage-form .error {
  margin-top: 14px;
}

.installer-manage-form .dialog-actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #dfe5ea;
}

.installer-manage-form .dialog-actions button {
  min-width: 72px;
}

@media (max-width: 720px) {
  .installer-manage-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .installer-manage-form {
    padding: 18px 16px 20px;
  }

  .installer-manage-form .form-grid {
    grid-template-columns: 1fr;
  }

  .installer-manage-form .span-2 {
    grid-column: auto;
  }

  .installer-manage-form .dialog-heading > div {
    display: block;
  }

  .installer-manage-address-button {
    padding-bottom: 4px;
  }
}


.installer-manage-documents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 6px;
  padding: 12px;
  border: 1px solid #e1e7ec;
  border-radius: 8px;
  background: #f8fafb;
}

.installer-document-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background: #fff;
}

.installer-document-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}

.installer-document-new-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 10px;
  font-weight: 700;
}

.installer-document-preview-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 132px;
  padding: 0;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e0e7;
  border-radius: 6px;
  color: #344054;
  background: #f5f7f9;
  cursor: zoom-in;
}

.installer-document-preview-button:hover {
  border-color: #175cd3;
  box-shadow: 0 0 0 2px rgba(23, 92, 211, 0.1);
}

.installer-document-preview-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.installer-document-preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: 12px;
  background: #f5f7f9;
}

.installer-document-preview-placeholder[hidden] {
  display: none;
}

.installer-document-file-button {
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.installer-document-file-button > span {
  display: inline-flex;
  width: 52px;
  height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #fff;
  background: #d92d20;
  font-size: 13px;
  font-weight: 800;
}

.installer-document-filename {
  margin-top: 7px;
  overflow: hidden;
  color: #475467;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.installer-document-preview-dialog {
  width: min(1200px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #101828;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.35);
}

.installer-document-preview-dialog::backdrop {
  background: rgba(16, 24, 40, 0.78);
}

.installer-document-preview-heading {
  display: flex;
  min-height: 52px;
  padding: 8px 12px 8px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  background: #1d2939;
}

.installer-document-preview-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.installer-document-preview-heading .icon-button {
  flex: 0 0 auto;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
}

.installer-document-preview-body {
  display: flex;
  min-height: 280px;
  max-height: calc(100vh - 84px);
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #101828;
}

.installer-document-preview-body > img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 84px);
  object-fit: contain;
}

.installer-document-preview-body > img[hidden] {
  display: none;
}

.installer-document-preview-fallback {
  padding: 40px 24px;
  color: #fff;
  text-align: center;
}

.installer-document-preview-fallback[hidden] {
  display: none;
}

.installer-document-preview-fallback .button {
  display: inline-flex;
  min-height: 38px;
  margin-top: 10px;
  padding: 8px 14px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #101828;
  background: #fff;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 720px) {
  .installer-manage-documents {
    grid-template-columns: 1fr;
  }

  .installer-document-preview-button {
    height: 180px;
  }

  .installer-document-preview-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
}
