/* ===== 问题标注 workspace (video_issue_workspace.js) ===== */
.vi-root { display: flex; flex-direction: column; height: 100%; gap: 8px; padding: 8px 4px; min-height: 0; font-size: 13px; color: #334155; }
.vi-topbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; flex-shrink: 0; }
.vi-search { display: flex; gap: 6px; flex: 1; min-width: 320px; }
.vi-search input { flex: 1; border: 1px solid #e2e8f0; border-radius: 10px; padding: 9px 12px; font-size: 13px; font-family: ui-monospace, monospace; transition: border-color .15s, box-shadow .15s; }
.vi-search input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.vi-task-summary { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vi-task-summary strong { color: #0f172a; }
.vi-meta { color: #64748b; font-size: 11px; }
.vi-warn { color: #b45309; font-size: 11px; }
.vi-status-line { min-height: 18px; color: #475569; font-size: 12px; flex-shrink: 0; }
.vi-status-line.vi-loading::before { content: '⏳ '; }
.vi-workbench { display: grid; grid-template-columns: 200px 1fr 320px; gap: 10px; flex: 1; min-height: 0; }
.vi-left, .vi-right { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px; overflow-y: auto; min-height: 0; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.vi-center { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.vi-panel-title { font-weight: 800; font-size: 12px; color: #334155; margin: 6px 0; }
.vi-media-list { list-style: none; padding: 0; margin: 0; }
.vi-media-item { width: 100%; text-align: left; padding: 6px 8px; border-radius: 8px; font-size: 12px; color: #334155; display: flex; align-items: center; gap: 6px; }
.vi-media-item:hover { background: #f1f5f9; }
.vi-media-item.active { background: #eff6ff; color: #1d4ed8; font-weight: 700; }
.vi-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.vi-dot-final { background: #3b82f6; }
.vi-dot-clip { background: #94a3b8; }
.vi-toolbar { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 6px 10px; flex-shrink: 0; opacity: .45; }
.vi-toolbar-active { opacity: 1; }
.vi-tools { display: flex; gap: 2px; }
.vi-tool-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent; font-size: 14px; cursor: pointer; color: #334155; }
.vi-tool-btn:hover:not(:disabled) { background: #f1f5f9; }
.vi-tool-btn.active { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.vi-tool-btn:disabled { opacity: .4; cursor: default; }
.vi-colors { display: flex; gap: 4px; }
.vi-color-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; }
.vi-color-dot.active { box-shadow: 0 0 0 2px #1d4ed8; }
.vi-stage-wrap { flex: 1; min-height: 0; display: flex; }
.vi-stage { position: relative; flex: 1; background: #0f172a; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.vi-stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.vi-stage .vi-locked-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.vi-video-locked { visibility: hidden; }
.vi-stage-hint { position: absolute; color: #64748b; font-size: 13px; z-index: 0; }
.vi-annot-host { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.vi-annot-svg { width: 100%; height: 100%; display: block; }
.vi-annot-text-input { position: absolute; z-index: 10; font-size: 13px; font-family: inherit; line-height: 1.4; padding: 4px 6px; border: 1px dashed #ef4444; border-radius: 4px; outline: none; background: rgba(255,255,255,.94); min-width: 160px; min-height: 40px; resize: both; color: #1f2937; }
.vi-time-row { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.vi-time { font-family: ui-monospace, monospace; font-size: 12px; color: #334155; min-width: 180px; }
.vi-lock-hint { color: #94a3b8; font-size: 11px; flex: 1; }
.vi-timeline { flex-shrink: 0; }
.vi-tl-note { font-size: 11px; color: #94a3b8; padding: 4px 0; }
.vi-tl-conf { font-size: 11px; margin-bottom: 3px; }
.vi-conf-exact, .vi-conf-exact_film, .vi-conf-exact_clip { color: #16a34a; }
.vi-conf-derived { color: #b45309; }
.vi-conf-ambiguous, .vi-conf-unavailable { color: #dc2626; }
.vi-tl-bar { position: relative; display: flex; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid #e2e8f0; background: #f8fafc; }
.vi-tl-seg { display: flex; align-items: center; justify-content: center; overflow: hidden; border-right: 1px solid #fff; background: #dbeafe; color: #1e40af; font-size: 10px; cursor: pointer; min-width: 0; padding: 0 2px; white-space: nowrap; }
.vi-tl-seg:nth-child(even) { background: #e0e7ff; }
.vi-tl-seg.active { background: #1d4ed8; color: #fff; }
.vi-tl-marker { position: absolute; top: -3px; width: 3px; height: 32px; background: #ef4444; border-radius: 2px; transform: translateX(-50%); pointer-events: none; }
.vi-btn { border-radius: 10px; padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.vi-btn:disabled { opacity: .5; cursor: default; }
.vi-btn-primary { background: var(--accent); color: #fff; }
.vi-btn-primary:hover:not(:disabled) { background: #2a2a28; }
details.task-detail-help summary::-webkit-details-marker { display: none; }
details.task-detail-help[open] summary .fa-chevron-down { transform: rotate(180deg); }
details.task-detail-help summary:hover { color: var(--text); }
.vi-btn-ghost { background: #fff; color: #334155; border-color: #cbd5e1; }
.vi-btn-ghost:hover:not(:disabled) { background: #f8fafc; }
.vi-btn-xs { padding: 3px 8px; font-size: 11px; }
.vi-btn-block { width: 100%; }
.vi-issue-mode { display: flex; gap: 12px; font-size: 12px; color: #334155; margin-bottom: 6px; }
.vi-check { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: #334155; margin: 4px 0 2px; cursor: pointer; line-height: 1.4; }
.vi-check input { margin-top: 2px; flex-shrink: 0; }
.vi-hint { font-size: 11px; color: #94a3b8; margin: 0 0 8px; line-height: 1.4; }
.vi-auto-fix { background: #dbeafe; color: #1d4ed8; }
.vi-select { width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 8px; font-size: 12px; background: #fff; margin-bottom: 6px; }
.vi-select-sm { width: auto; margin: 0; padding: 4px 6px; }
.vi-field-row { display: flex; gap: 6px; }
.vi-field-row .vi-select { flex: 1; }
.vi-textarea { width: 100%; min-height: 64px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px; font-size: 12px; resize: vertical; margin-bottom: 6px; box-sizing: border-box; }
.vi-context-summary { background: #f8fafc; border-radius: 10px; padding: 8px; margin: 6px 0; font-size: 12px; }
.vi-ctx-title { font-weight: 800; font-size: 12px; color: #0f172a; margin-bottom: 6px; }
.vi-ctx-table { width: 100%; border-collapse: collapse; }
.vi-ctx-table th { text-align: left; font-weight: 600; color: #64748b; padding: 4px 8px 4px 0; width: 40%; white-space: nowrap; font-size: 11px; }
.vi-ctx-table td { padding: 4px 0; color: #334155; font-size: 12px; word-break: break-all; }
.vi-ctx-table tr + tr th, .vi-ctx-table tr + tr td { border-top: 1px solid #f1f5f9; }
.vi-hl { font-weight: 700; color: #1d4ed8; background: linear-gradient(transparent 60%, #dbeafe 60%); padding: 0 2px; border-radius: 3px; }
.vi-muted { color: #94a3b8; }
.vi-save-status { min-height: 16px; font-size: 11px; margin-top: 4px; }
.vi-error { color: #dc2626; }
.vi-ok { color: #16a34a; }
.vi-current-issue { margin-top: 10px; border-top: 1px solid #f1f5f9; padding-top: 8px; }
.vi-issue-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.vi-issue-table td { font-size: 12px; padding: 3px 0; }
.vi-issue-table th { width: 30%; }
.vi-ann-title { font-weight: 700; font-size: 11px; color: #64748b; margin: 8px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.vi-sev-blocker { background: #7f1d1d; color: #fff; }
.vi-sev-high { background: #fee2e2; color: #991b1b; }
.vi-sev-medium { background: #fef3c7; color: #92400e; }
.vi-sev-low { background: #e2e8f0; color: #475569; }
.vi-btn-danger { color: #dc2626; border-color: #fecaca; }
.vi-btn-danger:hover:not(:disabled) { background: #fef2f2; border-color: #fca5a5; }
.vi-danger-zone { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #fecaca; }
.vi-badge { font-size: 10px; padding: 2px 6px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.vi-status-OPEN { background: #fef3c7; color: #92400e; }
.vi-status-RESOLVED { background: #dcfce7; color: #166534; }
.vi-status-REOPENED { background: #fee2e2; color: #991b1b; }
.vi-status-CLOSED { background: #e2e8f0; color: #475569; }
.vi-feishu { font-size: 11px; margin-top: 6px; }
.vi-feishu a { color: #1d4ed8; }
.vi-feishu-synced { color: #16a34a; }
.vi-feishu-failed { color: #dc2626; }
.vi-annotation { border: 1px solid #f1f5f9; border-radius: 8px; padding: 6px; margin: 6px 0; font-size: 12px; }
.vi-annotation.voided { opacity: .45; text-decoration: line-through; }
.vi-issue-actions { margin-top: 8px; }
.vi-attach { display: flex; flex-direction: column; gap: 4px; }
.vi-attach input { border: 1px solid #e2e8f0; border-radius: 8px; padding: 5px 8px; font-size: 11px; }
.vi-status-actions { display: flex; gap: 6px; margin-top: 6px; }
.vi-recent-list { list-style: none; padding: 0; margin: 0; }
.vi-recent-item { width: 100%; text-align: left; padding: 5px 6px; border-radius: 8px; font-size: 11px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vi-recent-item:hover { background: #f1f5f9; }
.vi-issue-key { font-family: ui-monospace, monospace; color: #1d4ed8; }
.vi-bottom { flex-shrink: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; height: 30vh; min-height: 48px; display: flex; flex-direction: column; }
.vi-root.vi-wb-collapsed .vi-workbench { display: none; }
.vi-root.vi-wb-collapsed .vi-bottom { flex: 1; height: auto; min-height: 120px; }
.vi-bottom-handle { height: 5px; cursor: row-resize; background: #e2e8f0; border-radius: 3px; margin: 5px 8px 0; flex-shrink: 0; transition: background .15s; }
.vi-bottom-handle:hover, .vi-bottom-handle:active { background: #3b82f6; }
.vi-bottom-tabs { display: flex; gap: 4px; padding: 6px 10px 0; align-items: center; }
.vi-btab-toggle { margin-left: auto; color: #64748b; font-weight: 600; }
.vi-bottom-collapsed .vi-bottom-tabs { padding-bottom: 6px; }
.vi-btab { border: none; background: transparent; font-size: 12px; font-weight: 700; color: #64748b; padding: 6px 10px; border-radius: 8px 8px 0 0; cursor: pointer; }
.vi-btab.active { color: #1d4ed8; box-shadow: inset 0 -2px 0 #1d4ed8; }
.vi-bottom-content { flex: 1; min-height: 0; overflow: hidden; padding: 8px 12px; }
.vi-scene-detail { margin: 4px 0; font-size: 12px; }
.vi-scene-detail summary { cursor: pointer; color: #334155; }
.vi-asset-list { list-style: none; padding: 0; font-size: 12px; }
.vi-asset-list li { padding: 2px 0; display: flex; justify-content: space-between; gap: 8px; }
.vi-split { display: flex; gap: 0; height: 100%; min-height: 0; align-items: stretch; }
.vi-split-left { flex: 0 0 300px; width: 300px; overflow-y: auto; height: 100%; border-right: 1px solid #f1f5f9; }
.vi-split-handle { flex: 0 0 6px; cursor: col-resize; background: #e2e8f0; transition: background .15s; }
.vi-split-handle:hover, .vi-split-handle:active { background: #3b82f6; }
.vi-split-right { flex: 1; min-width: 0; overflow-y: auto; height: 100%; padding-left: 10px; }
.vi-preview { height: 100%; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid #f1f5f9; border-radius: 10px; background: #f8fafc; padding: 8px; box-sizing: border-box; }
.vi-preview-head { font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; flex-shrink: 0; width: 100%; }
.vi-preview-img, .vi-preview-media {
  max-width: 100%;
  max-height: calc(100% - 28px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left top;
  align-self: flex-start;
  border-radius: 8px;
  display: block;
  flex: 0 0 auto;
}
.vi-preview a { color: #1d4ed8; }
.vi-json-wrap { display: flex; flex: 1; min-height: 0; overflow: auto; border: 1px solid #f1f5f9; border-radius: 8px; background: #f8fafc; }
.vi-lineno { position: sticky; left: 0; flex: 0 0 auto; margin: 0; padding: 8px 10px; text-align: right; color: #94a3b8; user-select: none; font-size: 11px; line-height: 1.6; background: #f1f5f9; border-right: 1px solid #e2e8f0; min-width: 28px; z-index: 1; }
.vi-json { flex: 1; margin: 0; padding: 8px; font-size: 11px; line-height: 1.6; overflow: visible; white-space: pre; min-width: max-content; }
.vi-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.vi-tbl thead th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; font-weight: 700; padding: 4px 8px; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; background: #fff; z-index: 1; }
.vi-tbl td { padding: 4px 8px; border-bottom: 1px solid #f8fafc; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.vi-tbl-name { min-width: 120px; }
.vi-tbl-size { text-align: right; width: 70px; }
.vi-tbl-row { cursor: pointer; transition: background .1s; }
.vi-tbl-row:hover { background: #f1f5f9; }
.vi-tbl-row.vi-row-active { background: #eff6ff; }
.vi-tbl-row.vi-row-active td { color: #1d4ed8; font-weight: 600; }
.vi-cat-image { background: #dbeafe; color: #1e40af; }
.vi-cat-final_video { background: #dcfce7; color: #166534; }
.vi-cat-clip { background: #e0e7ff; color: #3730a3; }
.vi-cat-json_doc, .vi-cat-slides, .vi-cat-render_pack, .vi-cat-plan { background: #fef3c7; color: #92400e; }
.vi-json-title { font-size: 11px; font-weight: 700; color: #64748b; margin: 8px 0 4px; }
.vi-src-detail { margin: 4px 0; font-size: 11px; }
.vi-src-detail summary { cursor: pointer; color: #64748b; font-weight: 600; user-select: none; }
.vi-src-detail table th { text-align: left; color: #94a3b8; font-weight: 600; padding: 2px 8px 2px 0; white-space: nowrap; }
.vi-src-detail table td { color: #334155; padding: 2px 0; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi-asset-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.vi-asset-chip { font-size: 11px; background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; border-radius: 999px; padding: 1px 8px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi-event { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 12px; }
.vi-empty { color: #94a3b8; font-size: 12px; padding: 8px; }
.vi-empty-inline { color: #94a3b8; font-size: 11px; padding: 4px 0; list-style: none; }
@media (max-width: 900px) {
    .vi-workbench { grid-template-columns: 1fr; }
    .vi-left, .vi-right { max-height: 200px; }
}
