/* Identity-card prefill sits alongside the existing manual-entry form. */
.identity-prefill {
  margin: 0 0 28px;
  padding: 21px 22px;
  border: 1px solid #dfe7f8;
  border-radius: 10px;
  background: #f8faff;
  color: #526178;
  font-size: 14px;
}
.identity-prefill-header { display: flex; align-items: center; gap: 9px; color: #344f7d; font-size: 15px; font-weight: 600; line-height: 1.7; }
.identity-prefill-header > svg { width: 20px; height: 20px; flex-shrink: 0; color: #6687cd; }
.identity-prefill-header h3, .identity-prefill-header h4 { margin: 0; font: inherit; }
.identity-prefill-copy { margin: 7px 0 16px; color: #65758e; font-size: 13px; line-height: 1.9; }
.identity-prefill-copy p { margin: 0; }
.identity-prefill-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.identity-prefill-actions > .upload-card { flex: 1 1 360px; min-width: 0; margin: 0; background: #fff; }
.identity-prefill-actions > .button { min-height: 40px; font-size: 13px; }
.identity-prefill-actions .upload-details { min-width: 0; }
.identity-prefill-actions .upload-title { color: #4d6182; font-size: 14px; }
.identity-prefill-actions .upload-description { color: #6e7d93; font-size: 12px; }
.identity-prefill-actions .file-name { max-width: 360px; }
.ocr-id-thumb { display: block; width: 160px; max-width: 100%; height: 100px; object-fit: contain; flex-shrink: 0; border: 1px solid #dce4f1; border-radius: 7px; background: #fff; }
button.ocr-id-thumb { padding: 0; overflow: hidden; cursor: pointer; }
.ocr-id-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ocr-progress { display: flex; align-items: center; gap: 9px; margin: 15px 0 0; color: #47699f; font-size: 13px; line-height: 1.8; }
.ocr-progress::before { content: ""; width: 15px; height: 15px; flex: 0 0 15px; border: 2px solid #d8e3fa; border-top-color: #5276cd; border-radius: 50%; animation: identity-ocr-spin .85s linear infinite; }
.ocr-progress svg { width: 16px; height: 16px; }
.ocr-status { display: flex; align-items: flex-start; gap: 8px; margin: 15px 0 0; padding: 10px 12px; border: 1px solid #e1e7f1; border-radius: 7px; background: #f2f5fb; color: #5a6d89; font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; }
.ocr-status > svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px; }
.ocr-status p { margin: 0; }
.ocr-status.success { border-color: #d7e9df; background: #eff8f3; color: #3d7d64; }
.ocr-status.warning { border-color: #eddfc5; background: #fff8ed; color: #8d6d39; }
.ocr-status.error { border-color: #efd7d7; background: #fff5f5; color: #a35353; }
.ocr-result-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.6fr) minmax(0,1.1fr); gap: 14px; margin-top: 18px; }
.ocr-field { min-width: 0; }
.ocr-field > label, .ocr-field-label { display: block; margin-bottom: 7px; color: #526682; font-size: 13px; font-weight: 550; line-height: 1.7; }
.ocr-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .ocr-field select { width: 100%; min-width: 0; min-height: 42px; padding: 10px 11px; border: 1px solid #dce3ef; border-radius: 7px; color: #324968; background: #fff; font-size: 14px; line-height: 1.5; }
.ocr-field input:focus, .ocr-field select:focus { border-color: #829cef; outline: 0; box-shadow: 0 0 0 3px #eaf0ff; }
.ocr-field input[aria-invalid="true"] { border-color: #d59b9b; }
.ocr-field input::placeholder { color: #8290a5; font-size: 12px; }
.ocr-field input:disabled { background: #f0f3f8; color: #8a97ab; }
.ocr-field .field-hint { margin-top: 5px; font-size: 12px; }
.ocr-hint { display: flex; align-items: flex-start; gap: 6px; margin: 11px 0 0; color: #6c7d95; font-size: 12px; line-height: 1.9; }
.ocr-hint > svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 4px; }
.ocr-hint p { margin: 0; }
.ocr-confirm-actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 10px; margin-top: 17px; }
.ocr-confirm-actions .button { min-height: 40px; font-size: 13px; }
.ocr-confirm-actions .button:disabled { cursor: not-allowed; }
.identity-prefill :focus-visible { outline-offset: 3px; }
@keyframes identity-ocr-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .identity-prefill { padding: 18px 16px; margin-bottom: 24px; }
  .identity-prefill-header { align-items: flex-start; font-size: 14px; }
  .identity-prefill-header > svg { margin-top: 2px; width: 18px; height: 18px; }
  .identity-prefill-copy { font-size: 13px; margin-bottom: 14px; }
  .identity-prefill-actions { align-items: flex-start; gap: 11px; }
  .identity-prefill-actions > .upload-card { flex-basis: 100%; }
  .identity-prefill-actions .file-name { max-width: 200px; }
  .identity-prefill-actions .upload-card { padding: 13px; }
  .identity-prefill-actions > .button { width: 100%; }
  .ocr-result-grid { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .ocr-field > label, .ocr-field-label { font-size: 13px; }
  .ocr-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { font-size: 16px; }
  .ocr-progress, .ocr-status { font-size: 13px; }
  .ocr-confirm-actions { gap: 9px; }
  .ocr-confirm-actions .button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ocr-progress::before { animation: none; border-style: dotted; border-color: #6887c9; }
}
