/* Scoped to smart-production controls; no site-wide theme changes. */
#yq-web { font-family:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif; }
#yq-web :is(.production-panel,.batch-panel) {overscroll-behavior:contain;}
html[data-theme="dark"] #yq-web :is(.production-panel,.batch-panel) :is(small,.config-hint,.stage-card p,.timing-message,.mode-option small,.panel-footer p) {color:#b5c0cf; -webkit-text-fill-color:currentColor;}
html:not([data-theme="dark"]) #yq-web :is(.production-panel,.batch-panel) :is(small,.config-hint,.stage-card p,.timing-message,.mode-option small,.panel-footer p) {color:#46556b; -webkit-text-fill-color:currentColor;}
#yq-web :is(.production-panel,.batch-panel) button:focus-visible {outline:2px solid #70b7ff;outline-offset:3px;}
#yq-web .smart-production-steps {grid-template-columns:repeat(8,minmax(0,1fr));gap:7px;}
#yq-web .smart-production-step {min-width:0;}
#yq-web .workflow-next {display:flex;align-items:center;gap:14px;padding:8px 24px;border-bottom:1px solid var(--border-default);font-size:14px;}
#yq-web .workflow-next span {flex:1;color:var(--text-secondary);text-align:center;}
#yq-web .workflow-next button {font:inherit;color:var(--text-primary);background:var(--bg-surface);border:1px solid var(--border-default);border-radius:8px;padding:8px 20px;cursor:pointer;}
#yq-web [data-workflow-step="4"] .storyboard-table :is(th,td):nth-child(7),
#yq-web :is([data-workflow-step="5"],[data-workflow-step="6"]) .storyboard-table :is(th,td):nth-child(6) {display:none!important;}
#yq-web [data-workflow-step="6"] .video-generate-row {display:none!important;}
#yq-web [data-workflow-step="7"] :is(.delivery-workspace,.delivery-secondary-row) {display:none;}
#yq-web [data-workflow-step="8"] :is(.post-panel,.delivery-summary .primary-action) {display:none;}
@media(min-width:721px){
  #yq-web :is([data-workflow-step="4"],[data-workflow-step="5"],[data-workflow-step="6"]) .storyboard-table :is(thead tr,.sb-row) {grid-template-columns:54px minmax(0,1fr) minmax(180px,24%) 82px;}
}
@media(max-width:1100px){
  #yq-web .smart-production-steps {display:flex;overflow-x:auto;flex-shrink:0;}
  #yq-web .smart-production-step {flex:0 0 138px;}
}
@media(max-width:600px){
  #yq-web :is(.production-panel,.batch-panel) .notification-strip {align-items:flex-start;flex-direction:column;gap:10px;}
  #yq-web :is(.production-panel,.batch-panel) .notification-strip small {line-height:1.6;}
  #yq-web :is(.production-panel,.batch-panel) .config-hint {font-size:13px;}
}

/* Workflow additions stay scoped to the production app and reuse its theme. */
#yq-web{font-family:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif}
#yq-web .top-brand span{display:inline!important;font-size:16px!important;white-space:nowrap}
#yq-web .wf-console{padding:14px 24px;display:grid;gap:14px;flex-shrink:0;color:var(--text-primary,#e8edf5);font-size:14px;line-height:1.6}
#yq-web .wf-console *{box-sizing:border-box}
#yq-web :is(.wf-status,.wf-card){border:1px solid var(--border-default,#334155);background:var(--bg-surface,#151d2b);border-radius:14px;padding:20px;min-width:0}
#yq-web .wf-status{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;padding:14px 18px}
#yq-web .wf-status>div:first-child{display:flex;flex-direction:column;flex:1;min-width:180px}
#yq-web .wf-status progress{width:100%;height:6px;accent-color:#5c9cff}
#yq-web .wf-muted{color:var(--text-secondary,#b4c1d5)!important;-webkit-text-fill-color:currentColor}
#yq-web .wf-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#yq-web .wf-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;font:inherit;color:var(--text-primary,#edf2ff)!important;-webkit-text-fill-color:currentColor;background:var(--bg-elevated,#253246);border:1px solid var(--border-default,#455670);border-radius:8px;padding:8px 14px;text-decoration:none;cursor:pointer;min-height:38px;white-space:normal}
#yq-web .wf-button.primary{background:#2563eb;color:#fff!important;border-color:#4184ff}
#yq-web .wf-button:disabled{opacity:.5;cursor:not-allowed}
#yq-web .wf-console :is(button,input,textarea,select,summary):focus-visible{outline:2px solid #6aa9ff;outline-offset:3px}
#yq-web :is(.wf-console,.wf-timeline) :is(h3,h4,p){margin:0 0 10px;overflow-wrap:anywhere}
#yq-web :is(.wf-console,.wf-timeline) h3{font-size:18px;color:var(--text-primary,#fff)}
#yq-web .wf-budget{display:flex;flex-wrap:wrap;gap:10px 24px}
#yq-web .wf-budget span{display:flex;flex-direction:column;min-width:90px}
#yq-web .wf-budget small{color:var(--text-secondary,#b4c1d5)}
#yq-web .wf-error,#yq-web .wf-warning,#yq-web .wf-notice{padding:10px 14px;border-radius:8px;border:1px solid #8d6942;color:#ffdaa5;background:#30271e;white-space:pre-wrap;overflow-wrap:anywhere}
#yq-web .wf-error{border-color:#8d4949;color:#ffd1d1;background:#351f25}
#yq-web .wf-notice{border-color:#306d55;color:#c9fbe5;background:#17362c}
#yq-web .wf-review{display:grid;gap:16px}
#yq-web .wf-shot-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}
#yq-web .wf-shot-grid{display:grid;grid-template-columns:minmax(220px,32%) minmax(0,1fr);gap:22px}
#yq-web .wf-shot-media{display:flex;flex-direction:column;gap:12px;min-width:0}
#yq-web .wf-shot-media :is(video,img){width:100%;max-height:350px;object-fit:contain;background:#090e16;border-radius:8px}
#yq-web :is(.wf-original,.wf-prompt){font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0;max-height:280px;overflow:auto;overscroll-behavior:contain;padding:12px;border-radius:8px;background:var(--bg-base,#101723)}
#yq-web .wf-source-units{max-height:420px;overflow:auto;overscroll-behavior:contain}
#yq-web .wf-source-units article{padding:12px;margin-top:10px;border-left:3px solid #4a81b8;background:var(--bg-base,#101723)}
#yq-web .wf-source-units article.unmapped{border-color:#e9af60}
#yq-web .wf-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin:12px 0}
#yq-web .wf-field{display:flex;flex-direction:column;gap:6px;min-width:0}
#yq-web :is(.wf-console,.wf-timeline) :is(input:not([type=checkbox]),select,textarea){font:inherit;color:var(--text-primary,#ecf2ff);background:var(--bg-base,#101723);border:1px solid var(--border-default,#455670);border-radius:8px;padding:10px;min-width:0;max-width:100%;width:100%}
#yq-web :is(.wf-console,.wf-timeline) input::placeholder,#yq-web .wf-console textarea::placeholder{color:var(--text-secondary,#a9b8ca);opacity:.9}
#yq-web .wf-check{display:flex;align-items:center;gap:8px;cursor:pointer}
#yq-web .wf-check input{width:17px;height:17px;flex-shrink:0;accent-color:#3c83ee}
#yq-web .wf-assets{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
#yq-web .wf-assets>div{display:flex;align-items:center;gap:6px;border:1px solid var(--border-default,#334155);border-radius:8px;padding:5px;max-width:100%}
#yq-web .wf-assets img{width:42px;height:42px;object-fit:cover;border-radius:4px}
#yq-web .wf-assets span{overflow-wrap:anywhere}
#yq-web .wf-quote{margin-top:14px;padding:16px;background:var(--bg-base,#101723);border:1px solid #3b74b7;border-radius:8px}
#yq-web .wf-versions{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
#yq-web .wf-version{padding:16px;border:1px solid var(--border-default,#334155);border-radius:10px;min-width:0}
#yq-web .wf-version.active{border-color:#5999e5}
#yq-web .wf-version video{width:100%;max-height:320px;background:#080d15;margin:8px 0;object-fit:contain}
#yq-web .wf-version progress{width:100%;accent-color:#5c9cff}
#yq-web .wf-delivery-details{margin-top:14px;padding-top:10px;border-top:1px solid var(--border-default,#334155)}
#yq-web .wf-artifact-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-top:12px}
#yq-web .wf-artifact-grid a{color:var(--text-primary,#e8edf5);display:grid;gap:6px}
#yq-web .wf-artifact-grid img{width:100%;max-height:180px;object-fit:contain}
#yq-web .wf-enhance{margin-top:22px;padding:18px;border:1px solid #5288c9;border-radius:12px;min-width:0}
#yq-web .wf-enhance>header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
#yq-web .wf-enhance .super-resolution-page.embedded{height:auto;min-height:0;overflow:visible}
#yq-web .wf-compare{padding-top:20px;margin-top:20px;border-top:1px solid var(--border-default,#334155)}
#yq-web .wf-compare-videos{display:grid;grid-template-columns:1fr 1fr;gap:14px}
#yq-web .wf-compare-videos video{width:100%;max-height:360px;background:#080d15}
#yq-web .wf-console summary{cursor:pointer;padding:7px 0;color:var(--text-primary,#e8edf5)}
#yq-web .wf-requirements{margin:12px 0}
#yq-web .wf-requirements .wf-check{margin:8px 0}
#yq-web .wf-console li{overflow-wrap:anywhere}
#yq-web .wf-timeline{border-top:1px solid var(--border-default,#334155);padding-top:18px;margin-top:18px}
#yq-web .wf-post-advanced-toggle{border:1px solid var(--border-default,#334155);border-radius:10px;padding:12px 16px;margin-top:12px}
#yq-web .wf-post-advanced-toggle>summary{cursor:pointer;font-weight:600;color:var(--text-primary,#edf2ff)}
#yq-web .post-panel:not(:has(.wf-post-advanced-toggle[open])) :is(.editor-mode-card,.senior-settings,.analysis-card,.voice-section,.trim-section,.capability-row,.wf-advanced-control),
#yq-web .post-panel:not(:has(.wf-post-advanced-toggle[open])) .settings-grid>label:nth-child(-n+3){display:none!important}
#yq-web .post-panel .file-grid{margin-bottom:8px}
#yq-web .production-panel .budget-field{margin-top:14px;display:flex;gap:16px;align-items:center;justify-content:space-between}
#yq-web .wf-empty{padding:30px 12px;text-align:center;color:var(--text-secondary,#b4c1d5);background:var(--bg-base,#101723);border-radius:8px}
#yq-web .work-editor-page[data-workflow-step="6"]>.editor-layout{display:none!important}
#yq-web [data-workflow-step="8"] .delivery-workspace{display:none!important}
#yq-web .work-editor-page:is([data-workflow-step="2"],[data-workflow-step="6"],[data-workflow-step="8"]){overflow-y:auto;display:block}
#yq-web .work-editor-page:is([data-workflow-step="2"],[data-workflow-step="6"],[data-workflow-step="8"])>.editor-layout{min-height:500px}
@media(max-width:700px){
 #yq-web .wf-console{padding:12px}
 #yq-web :is(.wf-status,.wf-card){padding:14px}
 #yq-web .wf-shot-grid,#yq-web .wf-compare-videos{grid-template-columns:1fr}
 #yq-web .wf-fields{grid-template-columns:1fr}
 #yq-web .wf-budget{gap:10px 16px}
 #yq-web .wf-versions{grid-template-columns:minmax(0,1fr)}
 #yq-web .wf-enhance{padding:12px}
 #yq-web .wf-enhance>header{flex-direction:column}
 #yq-web .top-brand span{font-size:14px!important}
 #yq-web .top-brand img{display:none}
}
