/* V10 — asynchronous capture pipeline and refined black Metro theme */
:root{
  --v10-black:#000000;
  --v10-surface:#08090c;
  --v10-surface-2:#0d0f14;
  --v10-line:#242730;
  --v10-text:#f7f8fb;
  --v10-muted:#9299a8;
  --v10-blue:#2848ff;
  --v10-blue-hi:#6070ff;
  --v10-orange:#ff6508;
  --v10-orange-hi:#ff8b2f;
  --v10-pearl:#f5f2ee;
  --v10-violet:#8564df;
  --v10-green:#28d394;
  --v10-amber:#ffbd5d;
  --v10-red:#ff5b75;
}
html,body{background:var(--v10-black)!important}
body{background-image:radial-gradient(circle at 74% -20%,rgba(40,72,255,.08),transparent 36%)!important}
.metro-topbar{background:rgba(0,0,0,.88)!important;border-bottom-color:var(--v10-line)!important}
.metro-rail{background:#020203!important;border-right-color:var(--v10-line)!important}
.metro-panel,.panel,.sidebar-card,.section-nav{border-color:var(--v10-line)!important}

/* Four clean primary blocks. No decorative clutter. */
.metro-tiles{gap:16px!important}
.metro-tile{min-height:242px!important;padding:30px!important;border-radius:28px!important;isolation:isolate;box-shadow:0 18px 54px rgba(0,0,0,.22)!important}
.metro-tile:before,.metro-tile:after,.metro-tile .tile-art{display:none!important}
.metro-tile .tile-icon{width:54px!important;height:54px!important;border-radius:17px!important;background:rgba(255,255,255,.10)!important;border:1px solid rgba(255,255,255,.20)!important;font-size:24px!important}
.metro-tile h2{margin-top:auto!important;font-size:clamp(24px,2.2vw,36px)!important;line-height:1.02!important;letter-spacing:-.045em!important;max-width:420px}
.metro-tile p{font-size:12px!important;line-height:1.5!important;margin-top:9px!important;max-width:360px}
.metro-tile>i{width:44px;height:44px;border-radius:14px;display:grid!important;place-items:center;background:rgba(255,255,255,.10);font-style:normal!important}
.tile-blue{background:linear-gradient(145deg,var(--v10-blue),#334dff)!important}
.tile-orange{background:linear-gradient(145deg,var(--v10-orange),var(--v10-orange-hi))!important}
.tile-pearl{background:linear-gradient(145deg,#fbfaf8,var(--v10-pearl))!important;color:#12141a!important}
.tile-violet{background:linear-gradient(145deg,var(--v10-violet),#9c7bea)!important}
.tile-pearl .tile-icon,.tile-pearl>i{background:rgba(0,0,0,.06)!important;border-color:rgba(0,0,0,.10)!important}

/* Global background queue */
.background-pipeline{margin:0 0 18px;padding:14px;border:1px solid #272b35;border-radius:22px;background:linear-gradient(145deg,#0c0e13,#08090d);box-shadow:0 18px 54px rgba(0,0,0,.24)}
.background-pipeline[hidden]{display:none}
.pipeline-summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center}
.pipeline-summary b{display:block;font-size:13px}.pipeline-summary small{display:block;margin-top:3px;color:var(--v10-muted);font-size:10px;line-height:1.45}.pipeline-summary>strong{padding:8px 11px;border-radius:999px;background:rgba(40,72,255,.14);color:#aab3ff;font-size:10px}
.pipeline-pulse{width:12px;height:12px;border-radius:50%;background:var(--v10-blue);box-shadow:0 0 0 0 rgba(40,72,255,.5);animation:v10Pulse 1.6s infinite}
.pipeline-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.pipeline-item{min-width:0;padding:11px 12px;border:1px solid #252833;border-radius:15px;background:#11131a}
.pipeline-item-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.pipeline-item-head b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.pipeline-item-head span{color:#9ca5bb;font-size:9px}
.pipeline-item progress{width:100%;height:6px;margin-top:9px;accent-color:var(--v10-blue)}
.pipeline-item small{display:block;margin-top:6px;color:#7f8798;font-size:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pipeline-item.ready progress{accent-color:var(--v10-green)}.pipeline-item.failed progress{accent-color:var(--v10-red)}
@keyframes v10Pulse{70%{box-shadow:0 0 0 10px rgba(40,72,255,0)}}

/* Per-photo progress and inline editable OCR values */
.server-preview-strip figure{overflow:hidden;border-radius:14px;background:#e8ebf1}
.thumb-progress{position:absolute;left:7px;right:7px;bottom:7px;height:5px;border-radius:999px;background:rgba(0,0,0,.34);overflow:hidden;z-index:3}
.thumb-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--v10-blue),#71c6ff);transition:width .35s ease}
.photo-processing-list{display:grid;gap:7px;margin-top:10px}
.photo-process-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;padding:10px;border-radius:13px;background:#f1f3f8;border:1px solid #e1e5ed;color:#1d2432}
.photo-process-row b{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.photo-process-row span{font-size:9px;color:#667087}.photo-process-row progress{grid-column:1/-1;width:100%;height:6px;accent-color:var(--v10-blue)}
.photo-process-row.ready progress{accent-color:#18aa76}.photo-process-row.failed progress{accent-color:#e24e67}
.ocr-inline-results{display:grid;gap:8px;margin-top:10px}
.ocr-result-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;padding:11px;border:1px solid #dbe0ea;border-radius:14px;background:#fff;color:#172033}
.ocr-result-row label{display:block;font-size:9px;font-weight:850;color:#657087;text-transform:uppercase;letter-spacing:.06em}.ocr-result-row input{width:100%;min-height:42px;margin-top:5px;padding:9px 10px;border:1px solid #d4dae6;border-radius:10px;background:#f8f9fc;color:#111827;font-size:15px;font-weight:800}.ocr-result-row input:focus{outline:0;border-color:var(--v10-blue);box-shadow:0 0 0 3px rgba(40,72,255,.10)}
.ocr-result-row .ocr-meta{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:4px}.ocr-meta strong{font-size:10px;color:#18885f}.ocr-meta span{font-size:8px;color:#7a8394}.ocr-result-row.needs-review .ocr-meta strong{color:#c66b00}

/* Cleaner capture workspace */
.workspace-hero.capture-hero{background:linear-gradient(145deg,#07080b,#0c0e13)!important;border-radius:28px!important}
.workspace-hero.capture-hero p:not(.eyebrow){max-width:880px;color:#9aa2b3!important}
.capture-card{border-radius:22px!important;padding:17px!important;box-shadow:none!important}
.capture-card:hover{transform:none!important}
.capture-type-icon{background:#edf0f7!important;color:#344057!important;border-radius:11px!important}
.capture-type-icon.evidence{background:#eee8ff!important;color:#6c4fc3!important}
.capture-feedback{min-height:18px}
.server-check{font-weight:750}
.form-section,.capture-section{border-radius:26px!important;overflow:hidden}
.touch-field input,.touch-field select,.touch-field textarea{border-radius:13px!important}

/* Small animated backend progress badge in every card */
.capture-card[data-background-active="true"]{border-color:rgba(40,72,255,.45)!important;box-shadow:0 0 0 3px rgba(40,72,255,.07)!important}
.capture-card[data-background-active="true"] .capture-status-dot{background:var(--v10-blue)}

@media(max-width:1120px){.pipeline-items{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
  .metro-tiles{gap:10px!important}.metro-tile{min-height:164px!important;padding:17px!important;border-radius:21px!important}.metro-tile h2{font-size:19px!important}.metro-tile p{display:none!important}.metro-tile .tile-icon{width:42px!important;height:42px!important;border-radius:13px!important}.metro-tile>i{width:35px;height:35px;border-radius:11px}
  .background-pipeline{position:sticky;top:76px;z-index:34;margin-inline:0;padding:11px;border-radius:17px}.pipeline-summary{grid-template-columns:auto minmax(0,1fr)}.pipeline-summary>strong{grid-column:2;justify-self:start;padding:5px 8px}.pipeline-items{display:flex;overflow-x:auto;scroll-snap-type:x mandatory}.pipeline-item{min-width:220px;scroll-snap-align:start}
  .photo-process-row{padding:9px}.ocr-result-row{grid-template-columns:1fr}.ocr-result-row .ocr-meta{flex-direction:row;justify-content:space-between;align-items:center}
  .workspace-hero.capture-hero{border-radius:21px!important}.capture-card{border-radius:18px!important}
}
@media(max-width:430px){.metro-tile{min-height:150px!important}.pipeline-item{min-width:198px}.ocr-result-row input{font-size:16px}}
