.layout-ocr-overlay{position:absolute;inset:0;pointer-events:none;z-index:1}
.layout-ocr-candidate{position:absolute;border:2px dashed #e68a12;background:#f59e0b33;z-index:1;pointer-events:none}
.layout-ocr-candidate.picked{border-color:#ea580c;background:#f973165c}
.layout-ocr-panel{border:1px solid #d0dde9;border-radius:9px;margin:14px 0;padding:12px;background:#fcfcfd}
.layout-ocr-panel summary{cursor:pointer;font-weight:700}
.layout-ocr-tools{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.layout-ocr-tools button{width:auto}
.layout-ocr-list{max-height:440px;overflow:auto;display:grid;gap:10px;margin:10px 0}
.layout-ocr-row{display:grid;gap:7px;padding:10px;border:1px solid #d4deed;border-radius:8px;background:#fff}
.layout-ocr-row.selected{border-color:#ea580c;background:#fffaf4}
.layout-ocr-row label{font-size:12px}
.layout-ocr-row input:not([type=checkbox]),.layout-ocr-row select{width:100%;min-height:35px}
.layout-ocr-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.layout-ocr-head{display:flex;align-items:center;gap:8px;justify-content:space-between}
.layout-ocr-head label{display:flex;gap:6px;align-items:center}
.layout-ocr-row small{color:#64748b;overflow-wrap:anywhere}
#layout-ocr-import{width:100%}
@media(max-width:400px){.layout-ocr-fields{grid-template-columns:1fr}}

/* v4.1.1: map each OCR suggestion back to its box; large/estimated boxes need review. */
.layout-ocr-index{position:absolute;left:0;top:0;background:#92400e;color:#fff;
 font-size:11px;font-weight:700;padding:1px 4px;border-radius:0 0 4px 0}
.layout-ocr-candidate.flagged{border-color:#8b5cf6;background:#8b5cf622}
.layout-ocr-candidate.focused{border:3px solid #2563eb;background:#2563eb33;z-index:5}
.layout-ocr-candidate.focused .layout-ocr-index{background:#1d4ed8}
.layout-ocr-warning{color:#7c3aed!important;font-weight:600}
