.ocr-entry { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; padding:18px 20px; border:1px solid var(--line-strong); border-radius:16px; background:linear-gradient(120deg,#163a60,#0a2039); }
.ocr-entry strong { display:block; font-size:17px; }
.ocr-entry p { margin:4px 0 0; color:var(--text-soft); font-size:13px; }
.ocr-actions { display:flex; gap:10px; flex-shrink:0; }
.ocr-actions .button { min-height:46px; }
.ocr-dialog { width:min(1050px,calc(100vw - 32px)); max-width:none; max-height:92dvh; padding:0; color:var(--text); border:1px solid var(--line-strong); border-radius:18px; background:#0b2038; overflow:auto; }
.ocr-dialog::backdrop { background:rgba(0,7,19,.75); }
.ocr-head { display:flex; align-items:center; justify-content:space-between; gap:10px; position:sticky; top:0; z-index:3; padding:18px 22px; background:#0b2038; border-bottom:1px solid var(--line); }
.ocr-head h3 { margin:0; font-size:19px; }
.ocr-head p { margin:4px 0 0; color:var(--text-muted); font-size:13px; }
.ocr-head button { flex-shrink:0; }
.ocr-content { padding:20px 22px; }
.ocr-photo { background:#061426; border:1px solid var(--line); border-radius:12px; text-align:center; padding:10px; }
.ocr-photo img { display:block; max-width:100%; max-height:48dvh; width:auto; margin:0 auto; object-fit:contain; }
.ocr-photo.is-expanded { max-height:60dvh; overflow:auto; text-align:left; }
.ocr-photo.is-expanded img { max-width:none; max-height:none; margin:0; }
.ocr-photo-empty { padding:30px 15px; color:var(--text-muted); }
.ocr-photo-tools { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:12px 0; }
.ocr-photo-actions { display:flex; flex-shrink:0; gap:8px; }
.ocr-photo-actions a { text-decoration:none; }
.ocr-photo-tools span,.ocr-help { color:var(--text-muted); font-size:13px; }
.ocr-notice { color:var(--text-soft); background:#14324d; border-radius:10px; padding:12px 14px; margin:14px 0; font-size:14px; }
.ocr-error { color:#ffd0d5; background:#4a2734; padding:12px; border-radius:8px; margin:12px 0; }
.ocr-status { margin:10px 0; color:var(--text-soft); }
.ocr-review { border-top:1px solid var(--line); margin-top:20px; padding-top:18px; }
.ocr-review h4 { margin:0 0 12px; }
.ocr-review .ocr-confirm-title { margin-top:20px; }
.ocr-grid-scroll { max-width:100%; max-height:290px; overflow:auto; border:1px solid var(--line); border-radius:10px; margin:10px 0; }
.ocr-grid { width:100%; border-collapse:collapse; font-size:13px; table-layout:auto; }
.ocr-grid td { border:1px solid var(--line); padding:5px; max-width:180px; min-width:52px; white-space:pre-wrap; }
.ocr-grid td button { border:1px solid transparent; background:transparent; color:var(--text); padding:7px 9px; border-radius:6px; min-height:36px; width:100%; }
.ocr-grid td button[aria-pressed=true] { background:#235d96; border-color:#82b7ff; }
.ocr-grid td button[aria-pressed=false] { color:var(--text-muted); }
.ocr-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:16px 0; }
.ocr-fields label { display:block; font-size:14px; color:var(--text-soft); }
.ocr-fields .ocr-wide { grid-column:1 / -1; }
.ocr-fields small { display:block; margin-top:6px; }
.ocr-cell-review { margin:18px 0; border:1px solid var(--line); border-radius:10px; padding:12px; }
.ocr-cell-review > summary { cursor:pointer; color:var(--text-soft); }
.ocr-fields input,.ocr-fields select { margin-top:5px; }
.ocr-meters { min-height:120px; margin-top:8px; font-variant-numeric:tabular-nums; }
.ocr-check { display:flex; align-items:flex-start; gap:9px; margin:16px 0; font-size:14px; }
.ocr-check input { width:19px; height:19px; min-height:19px; flex-shrink:0; margin-top:2px; }
.ocr-summary { padding:12px; border-radius:9px; background:#132e49; margin-top:12px; font-variant-numeric:tabular-nums; }
.ocr-summary[data-valid=true] { background:#153d38; color:#a1f1d2; }
.ocr-summary[data-valid=false] { background:#492d29; color:#ffd2a8; }
.ocr-footer { padding:14px 22px; position:sticky; bottom:0; z-index:3; background:#0b2038; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; }
@media(max-width:700px) {
  .ocr-entry { padding:16px; flex-direction:column; align-items:stretch; gap:13px; }
  .ocr-actions { display:grid; grid-template-columns:1fr 1fr; }
  .ocr-actions .button { width:100%; padding:12px 8px; }
  .ocr-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:14px; }
  .ocr-head,.ocr-content { padding:16px; }
  .ocr-photo img { max-height:34dvh; }
  .ocr-photo-tools { flex-wrap:wrap; }
  .ocr-fields { gap:12px; }
  .ocr-fields .ocr-mobile-wide { grid-column:1 / -1; }
  .ocr-fields input,.ocr-fields select { font-size:16px; width:100%; min-width:0; }
  .ocr-footer { padding:12px 16px max(12px,env(safe-area-inset-bottom)); }
  .ocr-footer .button-primary { flex:1; }
}
