.modal-panel {
  width: min(760px, 100%);
}

.template-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.template-title h3 {
  margin-bottom: 18px;
}

.template-title > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--green);
  background: #e8efe8;
  font-size: 9px;
  font-weight: 700;
}

.template-summary {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 24px 0 14px;
  padding: 14px 16px;
  background: var(--green);
  color: #fff;
}

.template-ring {
  width: 48px;
  height: 48px;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 12px;
}

.template-ring strong {
  font: 700 18px var(--serif);
  color: var(--lime);
}

.template-ring small {
  font-size: 8px;
  color: #b8c8c0;
}

.template-summary p {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.template-summary p b {
  font-size: 12px;
}

.template-summary p small {
  margin-top: 4px;
  color: #b8c8c0;
  font-size: 9px;
}

.template-summary > span {
  font: 700 22px var(--serif);
  color: var(--lime);
}

.upload-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.upload-item {
  min-height: 134px;
  border: 1px solid var(--line);
  background: #fff;
  position: relative;
  transition: .2s;
  overflow: hidden;
}

.upload-item.floorplan {
  grid-column: 1 / -1;
  min-height: 126px;
  background: #f0f2e9;
  border-color: #aeb5a8;
}

.upload-item:hover,
.upload-item.drag {
  border-color: var(--green);
  background: #f3f6ef;
}

.upload-item.complete {
  border-color: #7c9b8a;
}

.upload-item.needs-attention {
  border-color: #df5a42;
  box-shadow: inset 0 0 0 1px #df5a42;
}

.upload-target {
  min-height: inherit;
  padding: 16px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  grid-template-rows: auto auto 1fr;
  column-gap: 12px;
  cursor: pointer;
}

.upload-target input {
  display: none;
}

.upload-item-icon {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--green);
  font: 700 16px var(--serif);
}

.floorplan .upload-item-icon {
  background: var(--lime);
}

.upload-target strong {
  font-size: 12px;
}

.upload-target strong em {
  margin-left: 6px;
  color: #df5a42;
  font: 500 8px var(--sans);
  font-style: normal;
}

.upload-target small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.upload-count {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  min-width: 40px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 9px;
}

.complete .upload-count {
  color: var(--green);
  background: #e8efe8;
  border-color: transparent;
}

.item-previews {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  align-self: end;
  margin-top: 12px;
  overflow: hidden;
}

.item-preview {
  width: 48px;
  height: 38px;
  flex: 0 0 auto;
  position: relative;
  background: var(--cream);
}

.item-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-preview .document-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 8px;
  font-weight: 700;
}

.item-preview button {
  width: 15px;
  height: 15px;
  padding: 0;
  position: absolute;
  top: 2px;
  right: 2px;
  border: 0;
  border-radius: 50%;
  background: #111b;
  color: #fff;
  font: 10px/1 sans-serif;
  cursor: pointer;
}

.item-more {
  width: 48px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--muted);
  font-size: 9px;
}

.template-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.template-hint span {
  width: 16px;
  height: 16px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 9px var(--serif);
}

.template-hint.error {
  color: #c54835;
}

.template-hint.error span {
  border-color: #c54835;
}

@media (max-width: 640px) {
  .upload-checklist {
    grid-template-columns: 1fr;
  }

  .upload-item.floorplan {
    grid-column: auto;
  }

  .template-title {
    flex-direction: column;
    gap: 4px;
  }

  .template-summary {
    grid-template-columns: 44px 1fr auto;
    padding: 12px;
  }

  .template-summary p small {
    display: none;
  }
}
