/* Compact project actions. Scope all rules to the project list. */
.project-surface .data-table:not(.studio-project-grid) th:last-child{width:238px;min-width:238px}
.project-surface .data-table:not(.studio-project-grid) td:last-child{width:238px;min-width:238px}
.project-surface .data-table:not(.studio-project-grid) :is(th,td):last-child{position:sticky;right:0;z-index:1;background:#fff;box-shadow:-8px 0 14px -13px #2d466a66}
.project-surface .data-table:not(.studio-project-grid) th:last-child{background:#f8faff}
.project-surface .pla-actions{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:200px;white-space:normal}
.pla-primary{display:flex;align-items:center;gap:7px;width:100%}
.pla-links{display:flex;align-items:center;gap:7px}
.project-surface .pla-button,.pla-menu .pla-button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;padding:5px 9px;border:1px solid #e1e8f4;border-radius:6px;background:#fff;color:#455b7c;font:500 12px/1.5 Inter,"Segoe UI","Microsoft YaHei UI","Microsoft YaHei",sans-serif;white-space:nowrap;text-decoration:none;transition:color .15s,background-color .15s,border-color .15s,box-shadow .15s;cursor:pointer}
.project-surface .pla-button:hover{border-color:#b8c9ef;background:#f3f6ff;color:#315ee7}
.project-surface .pla-button:disabled{opacity:.55;cursor:wait}
.project-surface .pla-links .pla-button{background:#f0f5ff;border-color:#e1eafd;color:#315ee7}
.project-surface .pla-links .pla-button:hover{background:#e5edff;border-color:#b6caf9}
.project-surface .pla-more{margin-left:auto;min-width:30px;padding:5px;color:#8291a8;border-color:transparent;background:transparent}
.project-surface .pla-more[aria-expanded=true]{border-color:#c5d3f2;background:#edf3ff;color:#315ee7}
.project-surface .pla-button:focus-visible,.pla-menu :is(button,select):focus-visible{outline:2px solid #799cef;outline-offset:2px}
.pla-menu{position:fixed;inset:auto;margin:0;padding:7px;width:226px;max-width:calc(100vw - 24px);overflow:auto;box-sizing:border-box;border:1px solid #e2e8f2;border-radius:10px;background:#fff;color:#354c6b;box-shadow:0 12px 35px #20345424;font:13px/1.5 Inter,"Segoe UI","Microsoft YaHei UI","Microsoft YaHei",sans-serif}
.pla-menu::backdrop{background:transparent}
.pla-menu .pla-menu-action{display:flex;justify-content:flex-start;width:100%;padding:8px 10px;min-height:36px;border-color:transparent;border-radius:5px;background:#fff;font-size:13px;gap:9px}
.pla-menu .pla-menu-action:hover{background:#f2f6ff;color:#315ee7}
.pla-menu .pla-danger{color:#b95c63}
.pla-menu .pla-danger:hover{background:#fff1f2;color:#b13f4d}
.pla-move{display:grid;gap:8px;padding:8px 10px 12px;margin-bottom:4px;border-bottom:1px solid #edf0f6}
.pla-move>span{display:flex;align-items:center;gap:8px;color:#75849c;font-size:12px}
.pla-menu .pla-move select{width:100%;max-width:100%;min-height:34px;border:1px solid #dfe6f1;border-radius:5px;padding:5px 8px;background:#fff;color:#405779;font:inherit}
.project-surface .studio-project-grid .pla-actions{min-width:0;gap:9px;width:100%}
.project-surface .studio-project-grid .pla-links{flex-wrap:wrap}
@media(max-width:760px){
  .project-surface .data-table:not(.studio-project-grid){overflow:visible}
  .saas-content .project-surface .data-table:not(.studio-project-grid) table{display:block;min-width:0;width:100%}
  .project-surface .data-table:not(.studio-project-grid) thead{display:none}
  .project-surface .data-table:not(.studio-project-grid) tbody{display:grid;grid-template-columns:minmax(0,1fr)}
  .project-surface .data-table:not(.studio-project-grid) tr{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:17px;border-bottom:1px solid #e7ebf2;min-width:0}
  .project-surface .data-table:not(.studio-project-grid) td{display:block;padding:0;border:0;min-width:0;white-space:normal}
  .saas-content .project-surface .data-table:not(.studio-project-grid) td:first-child{grid-column:1/-1;min-width:0;max-width:none}
  .project-surface .data-table:not(.studio-project-grid) .survey-title{white-space:normal;overflow-wrap:anywhere}
  .project-surface .data-table:not(.studio-project-grid) .sub{white-space:normal;line-height:1.6;overflow-wrap:anywhere}
  .project-surface .data-table:not(.studio-project-grid) td:nth-child(3)::before{content:'题目数 ';color:#8190a6}
  .project-surface .data-table:not(.studio-project-grid) td:nth-child(4)::before{content:'有效 / 提交 ';display:block;color:#8190a6}
  .project-surface .data-table:not(.studio-project-grid) td:nth-child(5)::before{content:'质控 ';color:#8190a6}
  .project-surface .data-table:not(.studio-project-grid) td:nth-child(6){grid-column:1/-1;color:#8190a6;font-size:12px}
  .project-surface .data-table:not(.studio-project-grid) td:last-child{grid-column:1/-1;position:static;width:100%;min-width:0;box-shadow:none;padding-top:12px;border-top:1px solid #edf0f6}
  .project-surface .pla-actions{width:100%;min-width:0}
}
/* The list is an execution workspace: state controls stay visible in both views. */
.project-surface .data-table:not(.studio-project-grid) :is(th,td):last-child{width:316px;min-width:316px}
.project-surface .pla-actions{min-width:282px;gap:9px}
.project-surface .pla-primary{gap:5px}
.project-surface .pla-button{min-height:32px;padding:5px 8px;font-size:12px}
.project-surface .pla-toggle{font-weight:600;min-width:66px}
.project-surface .pla-publish{background:#315ee7;border-color:#315ee7;color:#fff}
.project-surface .pla-publish:hover{background:#244cd0;border-color:#244cd0;color:#fff}
.project-surface .pla-pause{background:#fff8e9;border-color:#f1dfb2;color:#a47016}
.project-surface .pla-pause:hover{background:#fff1cb;border-color:#e6ca86;color:#8b5b09}
.project-surface .pla-links{gap:5px;flex-wrap:wrap}
.project-surface .pla-links .pla-button{padding:4px 7px}
.pla-batchbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 20px;border-top:1px solid #edf1f7;border-bottom:1px solid #edf1f7;background:#fafcff;color:#657994;font-size:12px;min-height:58px;box-sizing:border-box}
.pla-batch-buttons{display:flex;align-items:center;gap:7px;flex-wrap:wrap;flex:1;justify-content:flex-end}
.pla-select-all{display:inline-flex;gap:8px;align-items:center;white-space:nowrap;cursor:pointer}
.pla-batchbar input,.pla-row-select input{width:16px;height:16px;margin:0;accent-color:#315ee7;cursor:pointer}
.pla-selection-count{white-space:nowrap;min-width:96px;font-variant-numeric:tabular-nums}
.saas-content .project-surface .data-table:not(.studio-project-grid) td.pla-name-cell{position:relative;padding-left:48px}
.pla-row-select{position:absolute;left:17px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:20px;height:24px}
.project-surface tr.pla-selected>td{background:#f2f6ff!important}
.project-surface .pla-button:disabled{cursor:not-allowed}
.project-surface .studio-project-grid .pla-name-cell{padding-left:30px}
.project-surface .studio-project-grid .pla-row-select{left:0;top:15px}
.project-surface .studio-project-grid .pla-actions{min-width:0}
.project-surface .studio-project-grid .pla-primary{flex-wrap:wrap}
.project-surface .studio-project-grid tr.pla-selected{border-color:#aec2fc;background:#f2f6ff}
.pla-backdrop{z-index:2000}
.pla-dialog{background:#fff;border:1px solid #e3eaf5;border-radius:16px;box-shadow:0 24px 90px #15223b33;max-width:600px;width:calc(100vw - 32px);max-height:calc(100dvh - 48px);display:flex;flex-direction:column;color:#334967;outline:none}
.pla-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 24px 16px;border-bottom:1px solid #edf1f7}
.pla-dialog h2{font-size:21px;margin:0;color:#152a46}
.pla-dialog-body{padding:8px 24px 22px;overflow:auto;font-size:14px;line-height:1.8}
.pla-dialog>footer{display:flex;gap:10px;justify-content:flex-end;padding:16px 24px;border-top:1px solid #edf1f7}
.pla-dialog .pla-button{display:inline-flex;align-items:center;justify-content:center;padding:6px;border:0;border-radius:6px;background:#f5f7fb;color:#657994;cursor:pointer}
.pla-item-list{max-height:240px;overflow:auto;padding-left:22px}
.pla-result-list{list-style:none;padding:0;margin:12px 0 0}
.pla-result-list li{display:grid;gap:4px;padding:12px 0;border-bottom:1px solid #edf1f7;overflow-wrap:anywhere}
.pla-result-list span{font-size:12px;color:#667e99}
.pla-result-list .pla-failed{color:#bb4d58}
.pla-destination{display:grid;gap:8px;margin:16px 0}
.pla-destination select,.pla-url{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #dce5f1;border-radius:7px;background:#fff;color:#344d72;font:inherit}
@media(max-width:1160px){.pla-batch-buttons{justify-content:flex-start;flex-basis:100%}.project-surface .pla-batchbar{gap:9px}}
@media(max-width:760px){
  .project-surface .data-table:not(.studio-project-grid) td:last-child{width:100%;min-width:0}
  .saas-content .project-surface .data-table:not(.studio-project-grid) td.pla-name-cell{padding-left:30px}
  .project-surface .data-table:not(.studio-project-grid) .pla-row-select{left:0;top:16px}
  .project-surface .pla-actions{min-width:0}
  .project-surface .pla-primary{flex-wrap:wrap}
  .pla-batchbar{padding:12px 16px}
  .pla-batch-buttons{gap:6px}
}
@media(prefers-reduced-motion:reduce){.project-surface .pla-button{transition:none}}
