.scenario-workflow { width:min(760px,calc(100vw - 32px)); max-height:calc(100svh - 48px); padding:0; overflow:auto; border:1px solid #b8ccdc; border-radius:14px; color:#193a50; background:#f8fbfe; box-shadow:0 28px 100px #061e4560; font:14px/1.6 "Segoe UI","Microsoft YaHei",sans-serif; }
.scenario-workflow::backdrop { background:#0b253f73; backdrop-filter:blur(3px); }
.scenario-workflow * { box-sizing:border-box; }
.scenario-workflow header { display:flex; justify-content:space-between; align-items:center; padding:24px 28px 20px; border-bottom:1px solid #dfE8f0; background:white; }
.scenario-workflow header small { font:10px Consolas,monospace; color:#66849e; letter-spacing:1.8px; }
.scenario-workflow h2 { font-size:24px; margin:5px 0 0; color:#16374e; }
.scenario-workflow button,.scenario-workflow input,.scenario-workflow textarea { font:inherit; }
.scenario-workflow button { cursor:pointer; }
.scenario-workflow button:disabled { opacity:.6; cursor:wait; }
.scenario-workflow [data-close] { width:32px; height:32px; border:0; background:transparent; color:#668299; font-size:25px; }
.scenario-workflow .sw-body { padding:24px 28px 0; }
.sw-intro { color:#627e94; margin:0 0 20px; }
.sw-modes { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
/* 新建想定：人工新建 / 快速模板 / AI 生成 三种方式并排 */
.scenario-workflow.sw-new-chooser { width:min(1080px,calc(100vw - 32px)); }
.sw-new-chooser .sw-modes { grid-template-columns:repeat(3,minmax(0,1fr)); }
.sw-mode-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
@media(max-width:900px) { .sw-new-chooser .sw-modes { grid-template-columns:1fr; } .sw-new-chooser .sw-mode p { min-height:0; } }
.scenario-workflow .sw-mode { position:relative; display:block; text-align:left; padding:24px; border:1px solid #d6e2ed; border-radius:10px; background:white; color:#25485e; text-decoration:none; transition:border-color .15s,box-shadow .15s; }
.scenario-workflow .sw-mode.manual { border-color:#7bb6e3; background:linear-gradient(145deg,#f0f8ff,#fff); }
.scenario-workflow .sw-mode:hover { border-color:#167cd0; box-shadow:0 6px 18px #1e6fa51c; }
.sw-mode-icon { display:grid; place-items:center; width:42px; height:42px; background:#e8f3fc; color:#147ac3; border-radius:10px; font-size:28px; }
.sw-tag { position:absolute; top:30px; right:20px; font-size:11px; color:#53758b; }
.sw-mode h3 { margin:18px 0 8px; font-size:21px; }
.sw-mode p { margin:0; min-height:64px; font-size:13px; color:#627e94; line-height:1.8; }
.sw-mode ul { padding-left:16px; margin:16px 0 26px; color:#587388; font-size:12px; line-height:2.2; }
.sw-mode strong { display:flex; align-items:center; justify-content:space-between; color:#087bbb; font-size:13px; }
.sw-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.sw-wide { grid-column:1/-1; }
.scenario-workflow label { display:flex; flex-direction:column; gap:7px; color:#3d5c73; font-size:13px; }
.scenario-workflow input:not([type=checkbox]),.scenario-workflow textarea { width:100%; min-width:0; padding:10px 12px; border:1px solid #b9ccdb; border-radius:6px; color:#1b405b; background:white; }
.scenario-workflow textarea { resize:vertical; }
.scenario-workflow input:focus,.scenario-workflow textarea:focus { outline:2px solid #228bc85c; border-color:#2689c9; }
.scenario-workflow input[type=checkbox] { width:16px; height:16px; flex-shrink:0; accent-color:#1485c9; }
.sw-path { margin-top:17px; }
.sw-path small { color:#72889b; font-size:11px; line-height:1.7; }
.sw-warning,.sw-confirm { margin:18px 0 0; padding:13px 15px; background:#fff7e8; border:1px solid #edd6a6; border-radius:7px; color:#7b6033; font-size:12px; }
.sw-warning label,.sw-confirm label { flex-direction:row; align-items:center; margin-top:8px; color:#705328; }
.scenario-workflow [hidden] { display:none!important; }
.sw-actions { display:flex; gap:12px; justify-content:flex-end; margin:22px 0 0; }
.sw-actions button,.sw-body>button { padding:9px 20px; border:1px solid #b5cbdc; border-radius:6px; background:white; color:#41627a; }
.sw-actions .sw-primary { border-color:#087cbd; background:#087cbd; color:white; }
.scenario-workflow .sw-link { border:0; color:#087cbd; background:transparent; padding:2px 6px; text-decoration:underline; }
.sw-status { margin:0; padding:18px 28px 24px; color:#4e7387; font-size:12px; overflow-wrap:anywhere; }
.sw-status.error { color:#b03f35; }
.scenario-workflow.sw-create-workspace { width:min(1180px,calc(100vw - 32px)); }
.scenario-workflow.sw-save-dialog { width:min(620px,calc(100vw - 32px)); }
.scenario-workflow.sw-save-dialog header,.scenario-workflow.sw-save-confirmation header { padding:18px 22px; }
.sw-save-dialog h2,.sw-save-confirmation h2 { font-size:20px; }
.sw-save-dialog .sw-body,.sw-save-confirmation .sw-body { padding:18px 22px 22px; }
.sw-save-dialog .sw-status { padding:0 22px 20px; }
.sw-save-hint { font-size:12px; color:#6a8495; margin:12px 0 0; }
.scenario-workflow.sw-save-confirmation { width:min(520px,calc(100vw - 32px)); }
.sw-save-summary { display:grid;grid-template-columns:74px minmax(0,1fr);gap:12px 16px;margin:0;padding:16px;background:#edf5fa;border:1px solid #d8e6ef;border-radius:7px;font-size:13px; }
.sw-save-summary dt { color:#6a8495; }
.sw-save-summary dd { margin:0;color:#244b61;overflow-wrap:anywhere; }
.sw-save-confirmation .sw-intro { margin-bottom:16px; }
.sw-save-confirmation header [data-cancel] { width:32px;height:32px;border:0;background:transparent;color:#668299;font-size:25px; }
.sw-save-dialog input[readonly] { background:#edf4f8;color:#537487; }
.sw-create-workspace header { padding:20px 26px; }
.sw-create-workspace .sw-body { padding:20px 26px 0; }
.sw-create-grid { display:grid; grid-template-columns:minmax(280px,.85fr) minmax(0,1.35fr); gap:20px; align-items:start; }
.sw-create-grid [data-side-setup] { grid-column:2; grid-row:1 / span 2; }
.sw-create-workspace[open] { display:flex; flex-direction:column; overflow:hidden; }
.sw-create-workspace header { flex-shrink:0; }
.sw-create-workspace .sw-body { overflow:auto; }
.sw-create-workspace .sw-status { flex-shrink:0; padding:12px 26px; border-top:1px solid #e3ebef; }
.sw-config-card { min-width:0; padding:20px; border:1px solid #dbe5ec; border-radius:10px; background:#fff; }
.sw-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.sw-section-head>div { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.sw-section-head h3 { font-size:16px; color:#173f53; margin:0; }
.sw-section-head small,.sw-side-bottom small,.sw-relations-head small,.sw-muted { color:#6a8495; font-size:12px; }
.sw-section-number { font:12px Consolas,monospace; color:#167591; padding:5px 7px; background:#eaf5f6; border-radius:5px; }
.sw-section-head button,.sw-side-bottom button { border:1px solid #bad0de; background:#f6fbfd; color:#196684; border-radius:5px; padding:6px 10px; font:inherit; font-size:12px; }
.sw-create-workspace select { width:100%; min-width:0; background:#fff; border:1px solid #b9ccdb; border-radius:6px; color:#1b405b; padding:10px; font:inherit; }
.sw-create-workspace select:focus { outline:2px solid #228bc85c; }
.sw-side-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.sw-side-tabs button { display:flex; align-items:center; gap:7px; max-width:100%; overflow-wrap:anywhere; padding:7px 12px; border:1px solid #d7e2e9; border-radius:6px; background:#f9fbfd; color:#426176; }
.sw-side-tabs button[aria-selected=true] { border-color:#1381a2; color:#125f7a; background:#e9f5f8; box-shadow:inset 0 -2px #1381a2; }
.sw-side-tabs i { width:10px; height:10px; border:1px solid #0002; border-radius:3px; flex-shrink:0; }
.sw-side-checks { display:flex; flex-wrap:wrap; gap:10px 18px; padding:18px 0; }
.sw-side-checks label { flex-direction:row; align-items:center; gap:6px; font-size:12px; }
.sw-side-bottom { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:10px; }
.sw-side-bottom .sw-remove { color:#916166; border-color:#e2d3d5; background:white; }
.sw-relations-head { margin-top:20px; padding-top:18px; border-top:1px solid #e3ebef; }
.sw-relations-head h4 { margin:0 0 4px; font-size:14px; }
.sw-relation-table { margin-top:12px; overflow:auto; }
.sw-relation-table table { width:100%; border-collapse:collapse; font-size:12px; }
.sw-relation-table th,.sw-relation-table td { border:1px solid #dce7ed; padding:8px; text-align:center; min-width:95px; }
.sw-relation-table th { background:#f1f6f8; color:#46677a; font-weight:500; overflow-wrap:anywhere; max-width:150px; }
.sw-relation-table select { padding:6px; font-size:12px; }
.sw-self { color:#91a3af; background:#f8fafb; }
.sw-create-confirm { grid-column:1; padding:18px 20px; border:1px solid #dbe5ec; border-radius:10px; background:white; }
.sw-create-confirm .sw-section-head { margin-bottom:12px; }
.sw-create-confirm .sw-warning { margin:0; }
.sw-create-confirm .sw-actions { align-items:center; margin-top:16px; flex-wrap:wrap; }
.sw-create-confirm .sw-actions>span { width:100%; font-size:12px; color:#6a8495; }
@media(max-width:850px) { .sw-create-grid { grid-template-columns:1fr; }.sw-create-grid [data-side-setup]{grid-column:auto;grid-row:auto;}.sw-config-card{padding:16px;}.sw-create-workspace .sw-body{padding:16px 16px 0;}.sw-create-confirm .sw-actions>span{width:100%;}.sw-side-bottom{align-items:flex-start;} }
@media(max-width:600px) { .sw-modes,.sw-fields { grid-template-columns:1fr; }.sw-wide{grid-column:auto;}.scenario-workflow header{padding:18px;}.scenario-workflow .sw-body{padding:18px 18px 0;}.sw-status{padding:18px;}.sw-mode p{min-height:0;}.sw-mode ul{margin:8px 0 14px;} }
.scenario-workflow.sw-time-dialog { width:min(480px,calc(100vw - 24px)); border-radius:10px; font-size:13px; }
.sw-time-dialog header { padding:16px 20px; }
.sw-time-dialog header small { font-size:10px; letter-spacing:1px; }
.sw-time-dialog h2 { font-size:20px; margin-top:4px; }
.sw-time-dialog .sw-body { padding:0 20px; }
.sw-time-form section { padding:15px 0; border-bottom:1px solid #dfe8ef; }
.sw-time-form h3 { font-size:13px; margin:0 0 10px; font-weight:600; }
.sw-time-form label { font-size:12px; gap:6px; }
.sw-time-form input:not([type=checkbox]) { padding:8px 9px; width:100%; min-width:0; border:1px solid #bad0df; border-radius:5px; background:white; color:#244b61; font-size:13px; }
.sw-time-form input:disabled { color:#8ba1ae; background:#edf2f5; }
.sw-time-fields { display:grid; grid-template-columns:1.15fr 1fr; gap:12px; }
.sw-time-form .sw-dst-toggle { display:flex; flex-direction:row; align-items:center; gap:8px; margin:12px 0 8px; }
.sw-dst-toggle input { accent-color:#147da6; }
.sw-dst-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.sw-time-section-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; gap:8px; }
.sw-time-section-heading h3 { margin:0; }
.sw-time-section-heading button { padding:5px 8px; border:1px solid #c3d7e3; border-radius:5px; background:#eef6fa; color:#37708d; font-size:11px; }
.sw-duration-fields { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.sw-time-form .sw-time-metadata { display:grid; grid-template-columns:1fr 1.2fr; gap:16px; align-items:end; border-bottom:0; }
.sw-rating-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.sw-time-help { color:#8b9eaa; font-size:10px; margin:3px 0; }
.sw-time-form .sw-actions { margin:15px 0 8px; gap:8px; }
.sw-time-form .sw-actions button { padding:8px 20px; border:1px solid #b4ccdd; border-radius:5px; background:white; color:#365c73; }
.sw-time-form .sw-actions .sw-primary { background:#147da6; border-color:#147da6; color:white; }
.sw-time-dialog .sw-status { padding:8px 20px 16px; margin:0; font-size:11px; }
@media(max-width:440px) { .sw-time-dialog .sw-body { padding:0 14px; }.sw-time-form .sw-time-metadata { grid-template-columns:1fr; gap:12px; } }

.sw-tag.sw-tag-rec { padding:2px 9px; border-radius:99px; background:#e8f1fd; color:#176ce2; font-weight:600; }
/* 保存位置：目录选择 + 新建目录 + 文件名称 */
.sw-path-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin-bottom:6px; }
.sw-path-row label { display:grid; gap:6px; }
.sw-path-row label[hidden] { display:none; }
.sw-path-row .sw-path-new { grid-column:1 / -1; order:1; }
.sw-path-name { display:flex; align-items:center; gap:6px; }
.sw-path-name input { flex:1; min-width:0; }
.sw-path-name em { font-style:normal; color:#72889b; font-size:13px; }
.sw-path small b { color:#1b3047; font-weight:600; word-break:break-all; }
@media (max-width:640px) { .sw-path-row { grid-template-columns:1fr; } }
