.parse-box {
  display: grid;
  gap: 12px;
}

.batch-result-details {
  max-height: 260px;
  overflow: auto;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

#applicantForm label[hidden] {
  display: none !important;
}

#applicantForm .form-grid {
  align-items: start;
  gap: 0;
}

#applicantForm .form-grid > label {
  min-width: 0;
}

#applicantForm .form-grid > label.span-2 input,
#applicantForm .form-grid > label.span-2 select {
  max-width: 100%;
}

#applicantForm input[readonly] {
  background: #f3f4f6;
  color: #4b5563;
  cursor: not-allowed;
}

.field-copy-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.field-copy-control input,
.field-copy-control select {
  width: 100%;
  min-width: 0;
}

.field-copy-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.field-copy-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.field-copy-button:hover {
  border-color: #ae2428;
  color: #ae2428;
  background: #fffafa;
}

.field-copy-button.is-copied {
  border-color: #16a34a;
  color: #15803d;
  background: #f0fdf4;
}

.field-copy-button.is-error {
  border-color: #dc2626;
  color: #b91c1c;
  background: #fef2f2;
}

.toolbar #search {
  width: 320px;
  min-width: 320px;
}

#applicantForm .name-pair-field {
  grid-column: span 1;
}

#applicantForm .name-pair-field .field-copy-control {
  grid-template-columns: minmax(0, 1fr) 44px;
}

#applicantForm .identity-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 30%) minmax(0, 1fr);
  border: 1px solid #e5e7eb;
  border-radius: 0;
  margin-top: -1px;
  overflow: hidden;
  background: #fff;
}

#applicantForm .identity-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 18px;
  background: #f7f7f7;
  font-size: 14px;
}

#applicantForm .identity-required {
  padding: 3px 7px;
  border-radius: 4px;
  background: #b42328;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

#applicantForm .identity-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  padding: 20px 22px;
}

#applicantForm .identity-fields .name-pair-field {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
}

#applicantForm .identity-note {
  grid-column: 1 / -1;
  margin-left: 54px;
  color: #6b7280;
  font-size: 12px;
}

#applicantForm .detail-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 30%) minmax(0, 1fr);
  border: 1px solid #e5e7eb;
  border-radius: 0;
  margin-top: -1px;
  overflow: hidden;
  background: #fff;
}

#applicantForm .form-grid > section:first-of-type {
  margin-top: 0;
  border-radius: 10px 10px 0 0;
}

#applicantForm .form-grid > section:last-of-type {
  border-radius: 0 0 10px 10px;
}

#applicantForm .detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 18px;
  background: #f7f7f7;
  font-size: 14px;
}

#applicantForm .detail-body {
  display: grid;
  gap: 10px;
  align-content: center;
  min-width: 0;
  padding: 18px 22px;
}

#applicantForm .detail-body > label:not(.check) {
  display: grid;
  gap: 7px;
  min-width: 0;
}

#applicantForm .detail-body .field-copy-control {
  max-width: 100%;
}

#applicantForm .building-detail-row .detail-body {
  align-content: start;
}

#applicantForm .building-detail-row .check {
  justify-content: flex-start;
  font-size: 14px;
}

#applicantForm .building-guidance,
#applicantForm .building-limit {
  margin: 0;
  color: #e11d2e;
  font-size: 12px;
  font-weight: 700;
}

#applicantForm .building-example {
  color: #6b7280;
  font-size: 12px;
}

.parse-box label {
  display: grid;
  gap: 7px;
}

.parse-box textarea {
  display: block;
  width: 100%;
  min-width: 0;
  resize: vertical;
}

.parse-box > button {
  justify-self: end;
}

.profile-pending {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 700;
}

.page-controls,
.page-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-controls select {
  height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
}

.session-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.session-summary strong {
  font-size: 13px;
}

.session-details[hidden] {
  display: none;
}

.session-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.compact-slot {
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #f3f5f8;
  padding: 7px 9px;
  color: #172033;
  cursor: pointer;
}

.compact-slot:hover {
  border-color: #ae2428;
  background: #fffafa;
}

.slot-item {
  display: inline-flex;
}

.slot-item .compact-slot {
  border-radius: 7px 0 0 7px;
}

.slot-remove {
  border: 1px solid #e5e7eb;
  border-left: 0;
  border-radius: 0 7px 7px 0;
  background: #fff;
  color: #b42318;
  padding: 0 9px;
  cursor: pointer;
}

@media (max-width: 900px) {
  #applicantForm .name-pair-field {
    grid-column: span 1;
  }

  #applicantForm .identity-row {
    grid-template-columns: 1fr;
  }

  #applicantForm .detail-row {
    grid-template-columns: 1fr;
  }

  #applicantForm .identity-heading {
    padding: 13px 14px;
  }

  #applicantForm .detail-heading {
    padding: 13px 14px;
  }

  #applicantForm .identity-fields {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  #applicantForm .detail-body {
    padding: 14px;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar #search {
    width: 100%;
    min-width: 0;
    font-size: 14px;
  }

  .modal-card {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    padding: 20px 16px;
  }

  .modal-card h2 {
    padding-right: 30px;
    font-size: 22px;
  }

  .parse-box > button {
    width: 100%;
  }

  .applicants-table {
    min-width: 0;
  }

  .applicants-table thead {
    display: none;
  }

  .applicants-table tbody,
  .applicants-table tr,
  .applicants-table td {
    display: block;
    width: 100%;
  }

  .applicants-table tr {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .applicants-table td {
    position: relative;
    min-height: 38px;
    padding: 9px 12px 9px 108px;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .applicants-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 14px;
    width: 82px;
    color: #596171;
    font-size: 12px;
    font-weight: 700;
  }

  .applicants-table td:first-child {
    min-height: 28px;
    padding: 5px 14px;
  }
}
