:root{color:#111827;background:#f8fafc;color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:8px;min-height:40px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}.appShell{min-height:100vh;display:flex;flex-direction:column}.toolbar{min-height:76px;padding:14px 18px;border-bottom:1px solid #e2e8f0;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:16px}.toolbar h1{margin:0;font-size:24px;letter-spacing:0}.brandLockup{min-width:0;display:flex;align-items:center;gap:12px}.brandLogo{width:52px;height:52px;flex:0 0 auto;border:1px solid rgba(148,163,184,.32);border-radius:10px;object-fit:cover;box-shadow:0 8px 18px #0f172a1f}.brandText{min-width:0}.brandTitleRow{display:flex;align-items:baseline;gap:8px}.versionBadge{flex:0 0 auto;color:#64748b;font-size:12px;font-weight:700;letter-spacing:0}.eyebrow{margin:0 0 4px;color:#0f766e;font-size:13px;font-weight:700}.toolbarActions,.historyButtons,.exportButtons,.rowActions{display:flex;gap:8px;flex-wrap:wrap}.toolbarMenus{display:inline-flex;gap:8px;align-items:center}.iconMenu{position:relative}.iconMenu summary{border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:8px;min-height:40px;padding:0 10px;display:inline-flex;align-items:center;gap:8px;cursor:pointer;list-style:none}.iconMenu summary::-webkit-details-marker{display:none}.iconMenuPanel{position:absolute;right:0;top:calc(100% + 6px);z-index:20;min-width:150px;padding:6px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;box-shadow:0 16px 28px #0f172a24;display:grid;gap:4px}.iconMenuPanel button{width:100%;justify-content:flex-start;min-height:36px;border-color:transparent}.iconMenuPanel button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.iconMenuPanel .activeMenuItem{border-color:#0f766e;background:#ccfbf1;color:#115e59;font-weight:700}.primaryButton{background:#0f766e;color:#fff;border-color:#0f766e}.loginShell{min-height:100vh;display:grid;place-items:center;padding:20px}.loginPanel{width:min(420px,100%);background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:24px;display:grid;gap:16px}.loginPanel h1{margin:0 0 8px;font-size:26px;letter-spacing:0}.authBadge{min-height:40px;display:inline-flex;align-items:center;border:1px solid #99f6e4;border-radius:8px;padding:0 12px;color:#0f766e;background:#f0fdfa;font-weight:700}.passwordInput{width:150px;min-height:40px;border:1px solid #cbd5e1;border-radius:8px;padding:0 10px}.workspace{flex:1;display:grid;grid-template-columns:minmax(260px,320px) minmax(0,1fr) minmax(260px,340px);gap:14px;padding:14px;min-height:0}.appFooter{min-height:36px;padding:0 18px;border-top:1px solid #e2e8f0;background:#fff;color:#64748b;display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:600}.footerDivider{color:#94a3b8}.appFooter a{color:#0f766e;text-decoration:none}.appFooter a:hover{text-decoration:underline}.sidePanel{display:flex;flex-direction:column;gap:12px;min-width:0}.panel,.canvasPanel{background:#fff;border:1px solid #e2e8f0;border-radius:8px}.panel{padding:14px}.panel h2{margin:0 0 12px;font-size:15px;letter-spacing:0}.collapsiblePanel{padding:0}.collapsiblePanel summary{min-height:46px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none}.collapsiblePanel summary::-webkit-details-marker{display:none}.collapsiblePanel summary h2{margin:0}.collapsibleIcon{flex:0 0 auto;color:#64748b;transition:transform .16s ease}.collapsiblePanel[open] .collapsibleIcon{transform:rotate(180deg)}.panelBody{padding:0 14px 14px}.disabledGroup{padding:0;border:0;display:grid;gap:12px;opacity:.62}.checkGrid{display:grid;gap:8px}.checkItem,.switchRow{display:flex;align-items:center;gap:8px;min-height:28px}.field{display:grid;gap:6px;margin-bottom:12px;color:#334155;font-size:13px}.field input,.field select{width:100%;border:1px solid #cbd5e1;border-radius:8px;min-height:38px;padding:0 10px;background:#fff}.statusBar{min-height:46px;border-bottom:1px solid #e2e8f0;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#475569;font-size:13px}.imageStage{position:relative;height:calc(100vh - 190px);min-height:420px;display:grid;place-items:center;overflow:auto;background:linear-gradient(45deg,#e2e8f0 25%,transparent 25%),linear-gradient(-45deg,#e2e8f0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e2e8f0 75%),linear-gradient(-45deg,transparent 75%,#e2e8f0 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}.diagnosticsBar{min-height:34px;border-bottom:1px solid #e2e8f0;padding:7px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#64748b;font-size:12px}.dropOverlay{position:absolute;top:18px;right:18px;bottom:18px;left:18px;z-index:4;display:grid;place-content:center;gap:8px;text-align:center;border:2px dashed #14b8a6;border-radius:8px;background:#f0fdfae6;color:#0f766e;pointer-events:none}.dropOverlay strong{font-size:20px}.imageFrame{position:relative;max-width:min(100%,1180px);max-height:100%}.imageFrame img{display:block;width:100%;height:auto;max-height:calc(100vh - 180px);object-fit:contain;-webkit-user-select:none;user-select:none}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;touch-action:none}.maskRect{fill:#0f766e2e;stroke:#0f766e;stroke-width:2;vector-effect:non-scaling-stroke;cursor:move}.ignoreRect{fill:#94a3b824;stroke:#64748b;stroke-width:2;stroke-dasharray:7 5;vector-effect:non-scaling-stroke;cursor:move}.selectedRect{stroke:#f59e0b;stroke-width:3;filter:drop-shadow(0 0 4px rgba(245,158,11,.6))}.resizeHandle{fill:#fff;stroke:#f59e0b;stroke-width:2;vector-effect:non-scaling-stroke}.resizeHandle-n,.resizeHandle-s{cursor:ns-resize}.resizeHandle-e,.resizeHandle-w{cursor:ew-resize}.resizeHandle-ne,.resizeHandle-sw{cursor:nesw-resize}.resizeHandle-nw,.resizeHandle-se{cursor:nwse-resize}.canvasDeleteButton{width:100%;height:100%;min-height:0;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;border-color:#fed7aa;background:#fff7ed;color:#c2410c;font-size:12px}.manualPreview{fill:#f59e0b2e;stroke:#d97706;stroke-width:2;vector-effect:non-scaling-stroke}.emptyState{width:min(360px,calc(100vw - 48px));min-height:180px;flex-direction:column;color:#475569;border-style:dashed}.boxList{display:grid;gap:8px;max-height:calc(100vh - 370px);overflow:auto}.boxItem{position:relative;border:1px solid #dbeafe;border-radius:8px;padding:10px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;background:#f8fbff;cursor:pointer}.boxItem.ignored{background:#f8fafc;border-color:#e2e8f0}.boxItem.selectedBoxItem{border-color:#d97706;border-width:2px;border-left-width:7px;background:#fffbeb;box-shadow:0 0 0 3px #f59e0b61,0 14px 32px #92400e29}.boxItem.selectedBoxItem:before{content:"";position:absolute;inset:8px auto 8px -1px;width:4px;border-radius:999px;background:#f59e0b}.boxItem strong,.boxItem span,.boxItem code{display:block}.boxItem span{margin-top:3px;color:#64748b;font-size:12px}.boxItem code{margin-top:8px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#e0f2fe;border-radius:6px;padding:5px 6px;font-size:12px}.reviewBadge{width:fit-content;padding:2px 6px;border-radius:999px;background:#fef3c7;color:#92400e;font-weight:700}.candidateBadge{width:fit-content;padding:2px 6px;border-radius:999px;background:#dcfce7;color:#166534;font-weight:700}.boxReason,.boxEvidence{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.batchList{display:grid;gap:8px;max-height:260px;overflow:auto}.batchItem{width:100%;min-height:58px;justify-content:flex-start;align-items:center;padding:8px;text-align:left}.batchItem img{width:42px;height:42px;object-fit:cover;border-radius:6px;background:#e2e8f0;flex:0 0 auto}.batchItem span{min-width:0;display:grid;gap:2px}.batchItem strong,.batchItem small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.batchItem small{color:#64748b}.activeBatchItem{border-color:#0f766e;background:#ccfbf1}.batchActions{display:grid;grid-template-columns:1fr;gap:8px;margin-top:10px}.localAiStatus-ready{color:#0f766e;font-weight:700}.localAiStatus-unavailable{color:#b45309}.muted{margin:0;color:#64748b;font-size:13px;line-height:1.5}.resultModal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:grid;place-items:center;padding:24px;background:#0f172a94}.resultDialog{width:min(1120px,100%);max-height:calc(100vh - 48px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 24px 70px #0f172a3d}.resultDialog header,.resultDialog footer{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #e2e8f0}.resultDialog footer{justify-content:flex-end;flex-wrap:wrap;border-top:1px solid #e2e8f0;border-bottom:0}.resultDialog h2{margin:0;font-size:16px;letter-spacing:0}.resultPreview{min-height:360px;overflow:auto;background:#f8fafc;display:grid;place-items:center;padding:16px}.resultPreview img{max-width:100%;height:auto;max-height:calc(100vh - 210px);object-fit:contain}.toast{position:fixed;right:18px;bottom:18px;z-index:30;max-width:min(420px,calc(100vw - 36px));min-height:44px;padding:10px 14px;display:flex;align-items:center;border:1px solid #99f6e4;border-radius:8px;background:#f0fdfa;color:#115e59;box-shadow:0 18px 40px #0f172a2e;font-size:14px;font-weight:700}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1120px){.workspace{grid-template-columns:1fr}.imageStage{height:auto}}@media(max-width:720px){.toolbar{align-items:flex-start;flex-direction:column}.brandLogo{width:48px;height:48px}.appFooter{justify-content:center;flex-wrap:wrap;padding:8px 14px}.toolbarActions{width:100%}.toolbarActions button{flex:1 1 140px}.toolbarMenus{width:100%}.iconMenu{flex:1}.iconMenu summary{width:100%;justify-content:center}}[data-theme=dark]{color:#e5e7eb;background:#0f172a;color-scheme:dark}[data-theme=dark] body{background:#0f172a}[data-theme=dark] button,[data-theme=dark] .iconMenu summary,[data-theme=dark] .field input,[data-theme=dark] .field select,[data-theme=dark] .passwordInput{background:#111827;border-color:#334155;color:#e5e7eb}[data-theme=dark] button:disabled{opacity:.45}[data-theme=dark] .toolbar,[data-theme=dark] .panel,[data-theme=dark] .canvasPanel,[data-theme=dark] .loginPanel{background:#111827;border-color:#1f2937}[data-theme=dark] .toolbar{border-bottom-color:#1f2937}[data-theme=dark] .versionBadge{color:#94a3b8}[data-theme=dark] .appFooter{background:#111827;border-top-color:#1f2937;color:#94a3b8}[data-theme=dark] .appFooter a{color:#2dd4bf}[data-theme=dark] .iconMenuPanel{background:#111827;border-color:#334155;box-shadow:0 16px 28px #00000052}[data-theme=dark] .iconMenuPanel .activeMenuItem{background:#134e4a;border-color:#2dd4bf;color:#ccfbf1}[data-theme=dark] .reviewBadge{background:#78350f;color:#fde68a}[data-theme=dark] .candidateBadge{background:#064e3b;color:#bbf7d0}[data-theme=dark] .localAiStatus-ready{color:#5eead4}[data-theme=dark] .localAiStatus-unavailable{color:#fbbf24}[data-theme=dark] .field,[data-theme=dark] .statusBar,[data-theme=dark] .diagnosticsBar,[data-theme=dark] .muted,[data-theme=dark] .boxItem span,[data-theme=dark] .collapsibleIcon{color:#94a3b8}[data-theme=dark] .statusBar,[data-theme=dark] .diagnosticsBar{border-bottom-color:#1f2937}[data-theme=dark] .imageStage{background:linear-gradient(45deg,#1f2937 25%,transparent 25%),linear-gradient(-45deg,#1f2937 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#1f2937 75%),linear-gradient(-45deg,transparent 75%,#1f2937 75%);background-color:#0b1120;background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}[data-theme=dark] .emptyState,[data-theme=dark] .boxItem,[data-theme=dark] .batchItem{background:#0f172a;border-color:#334155;color:#cbd5e1}[data-theme=dark] .batchItem small{color:#94a3b8}[data-theme=dark] .activeBatchItem{background:#134e4a;border-color:#2dd4bf}[data-theme=dark] .toast{background:#134e4a;border-color:#2dd4bf;color:#ccfbf1;box-shadow:0 18px 40px #0000005c}[data-theme=dark] .boxItem.ignored{background:#111827;border-color:#1f2937}[data-theme=dark] .boxItem.selectedBoxItem{background:#2b2107;border-color:#f59e0b;box-shadow:0 0 0 3px #f59e0bad,inset 0 0 0 1px #fbbf2452,0 16px 36px #00000057}[data-theme=dark] .boxItem.selectedBoxItem:before{background:#fbbf24}[data-theme=dark] .boxItem code{background:#164e63;color:#ecfeff}[data-theme=dark] .resizeHandle{fill:#111827}[data-theme=dark] .canvasDeleteButton{background:#431407;border-color:#9a3412;color:#fed7aa}[data-theme=dark] .authBadge{background:#042f2e;border-color:#0f766e;color:#5eead4}[data-theme=dark] .dropOverlay{background:#0f766e3d;color:#99f6e4}[data-theme=dark] .resultDialog{background:#111827;border-color:#1f2937}[data-theme=dark] .resultDialog header,[data-theme=dark] .resultDialog footer{border-color:#1f2937}[data-theme=dark] .resultPreview{background:#0b1120}
