/* 脚本库：列表与弹窗 */
.script-library-page { width:100%; max-width:none; }
.sl-panel { overflow:hidden; border:1px solid #e8e6ef; border-radius:16px; background:#fff; box-shadow:0 10px 30px rgba(40,31,61,.04); }
.sl-toolbar { display:flex; align-items:center; gap:10px; padding:16px; border-bottom:1px solid #eeecf3; background:#fcfbfe; }
.sl-search { display:flex; align-items:center; flex:1; min-width:260px; gap:8px; padding:0 11px; border:1px solid #dedbe7; border-radius:9px; color:#8e8799; background:#fff; }
.sl-search input { width:100%; height:36px; border:0; outline:0; color:#35303f; font:inherit; background:transparent; }
.sl-toolbar select { height:38px; padding:0 28px 0 10px; border:1px solid #dedbe7; border-radius:9px; color:#595361; background:#fff; }
.sl-result-count { margin-left:auto; color:#8f879b; font-size:12px; white-space:nowrap; }
.sl-table-scroll { overflow:auto; }
.sl-table { width:100%; min-width:0; border-collapse:collapse; table-layout:fixed; font-size:12px; }
.sl-table th { box-sizing:border-box; padding:12px 10px; color:#7b7486; font-weight:600; text-align:left; white-space:nowrap; background:#f8f7fb; border-bottom:1px solid #ece9f2; }
.sl-table td { box-sizing:border-box; padding:13px 10px; color:#514b59; vertical-align:middle; border-bottom:1px solid #f0eef4; }
.sl-table tbody tr { transition:background .15s; }
.sl-table tbody tr:hover { background:#fcfbff; }
.sl-table tbody tr:last-child td { border-bottom:0; }
.sl-table th:nth-child(1) { width:175px; }.sl-table th:nth-child(2) { width:118px; }.sl-table th:nth-child(3) { width:220px; }.sl-table th:nth-child(4) { width:104px; }.sl-table th:nth-child(5) { width:108px; }.sl-table th:nth-child(6) { width:116px; }.sl-table th:nth-child(7) { width:155px; }
.sl-name { display:block; overflow:hidden; color:#302a39; font-size:13px; font-weight:650; line-height:20px; text-overflow:ellipsis; white-space:nowrap; }
.sl-product { display:inline-flex; align-items:center; gap:6px; min-width:0; }.sl-product::before { width:18px; height:18px; border-radius:6px; background:linear-gradient(145deg,#765bea,#b18ee3); content:""; }.sl-product span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sl-source { position:relative; display:block; overflow:hidden; color:#756d7f; line-height:20px; text-overflow:ellipsis; white-space:nowrap; cursor:default; }
.sl-source:hover::after { position:absolute; z-index:8; left:0; bottom:calc(100% + 8px); width:min(360px,40vw); padding:10px 12px; border-radius:8px; color:#fff; line-height:18px; white-space:normal; background:#302a3d; box-shadow:0 8px 24px rgba(31,23,42,.2); content:attr(data-full); }
.sl-spec { color:#635a70; white-space:nowrap; }.sl-chip { display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border-radius:6px; font-size:11px; white-space:nowrap; }.sl-chip.depend { color:#664fd0; background:#f0ecff; }.sl-chip.free { color:#5a7191; background:#edf4fb; }.sl-chip.ok { color:#3c8165; background:#ecf8f2; }.sl-chip.prompt { color:#7360b8; background:#f3efff; }.sl-time { color:#8b8491; white-space:nowrap; }
.sl-actions { display:flex; gap:2px; white-space:nowrap; }.sl-actions button { padding:5px 4px; border:0; border-radius:6px; color:#665d70; font-size:11px; background:transparent; cursor:pointer; }.sl-actions button:hover { color:#5b42dc; background:#f0edff; }.sl-actions .danger:hover { color:#c64355; background:#fff0f2; }.sl-empty { padding:54px; color:#9a93a2; text-align:center; }
.sl-modal { position:fixed; inset:0; z-index:100200; display:none; align-items:center; justify-content:center; padding:24px; }.sl-modal.show { display:flex; }.sl-modal-backdrop { position:absolute; inset:0; background:rgba(29,24,41,.48); backdrop-filter:blur(3px); }.sl-modal-card { position:relative; display:flex; width:min(1440px,calc(100vw - 48px)); max-height:calc(100dvh - 48px); flex-direction:column; overflow:hidden; border-radius:16px; background:#fff; box-shadow:0 24px 64px rgba(30,22,47,.28); }.sl-modal-card.small { width:min(500px,calc(100vw - 40px)); }.sl-modal-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; border-bottom:1px solid #ece9f1; }.sl-modal-head h2 { margin:0; color:#2e2937; font-size:17px; }.sl-modal-head p { margin:4px 0 0; color:#938b9d; font-size:12px; }.sl-modal-close { width:28px; height:28px; padding:0; border:0; border-radius:7px; color:#776f80; font-size:17px; background:#f4f2f6; cursor:pointer; }.sl-modal-body { overflow:auto; padding:20px 22px; }.sl-modal-foot { display:flex; align-items:center; justify-content:flex-end; gap:9px; padding:14px 22px; border-top:1px solid #ece9f1; background:#fcfbfd; }.sl-modal-foot .sl-danger { margin-right:auto; color:#c74a58; background:#fff; }.sl-btn { min-height:34px; padding:0 13px; border:1px solid #ddd9e6; border-radius:8px; color:#595261; background:#fff; cursor:pointer; }.sl-btn:hover { border-color:#a99ae8; color:#5c43df; }.sl-btn.primary { border-color:#6550d8; color:#fff; background:#6550d8; box-shadow:0 6px 14px rgba(100,78,218,.2); }.sl-btn.primary:hover { background:#5841cf; }
.sl-meta-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:16px; }.sl-meta { padding:10px 12px; border:1px solid #ebe8f1; border-radius:9px; background:#fcfbfe; }.sl-meta small { display:block; color:#938c9b; font-size:11px; }.sl-meta strong { display:block; overflow:hidden; margin-top:5px; color:#403a49; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }.sl-source-block { margin-bottom:16px; padding:12px; border:1px solid #ece8f2; border-radius:10px; background:#faf9fc; }.sl-source-block > div { display:flex; justify-content:space-between; gap:12px; color:#514b59; font-size:12px; font-weight:600; }.sl-source-block p { display:-webkit-box; overflow:hidden; margin:7px 0 0; color:#746d7b; font-size:12px; line-height:20px; -webkit-box-orient:vertical; -webkit-line-clamp:2; }.sl-source-block.expanded p { display:block; }.sl-link-btn { padding:0; border:0; color:#654fd6; font-size:12px; background:none; cursor:pointer; }
.sl-story-wrap { overflow:auto; border:1px solid #e9e6ef; border-radius:10px; }.sl-story-table { width:100%; min-width:0; border-collapse:collapse; table-layout:fixed; font-size:12px; }.sl-story-table th,.sl-story-table td { box-sizing:border-box; }.sl-story-table th { padding:10px; color:#766f80; font-weight:600; text-align:left; white-space:nowrap; background:#f8f7fb; border-bottom:1px solid #eae7ef; }.sl-story-table td { height:76px; padding:10px; overflow:hidden; color:#5c5563; line-height:18px; vertical-align:top; border-bottom:1px solid #efedf3; }.sl-story-table th:nth-child(1) { width:64px; }.sl-story-table th:nth-child(2) { width:82px; }.sl-story-table th:nth-child(3) { width:22%; }.sl-story-table th:nth-child(4) { width:64px; }.sl-story-table th:nth-child(5) { width:84px; }.sl-story-table th:nth-child(6) { width:27%; }.sl-story-table th:nth-child(7) { width:20%; }.sl-story-table tr:last-child td { border-bottom:0; }.sl-shot { display:inline-grid; min-width:28px; height:24px; place-items:center; border-radius:6px; color:#fff; font-size:11px; background:#6952dc; }.sl-cell-clamp { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:3; }.sl-material-mini { display:flex; width:100%; min-width:0; align-items:center; gap:6px; overflow:hidden; }.sl-material-cover { display:grid; width:23px; height:41px; flex:none; place-items:center; overflow:hidden; border-radius:4px; color:#fff; font-size:6px; line-height:8px; text-align:center; word-break:break-all; background:linear-gradient(155deg,#51416e,#9e7ac4); }.sl-material-mini div { min-width:0; overflow:hidden; }.sl-material-mini strong,.sl-material-mini small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.sl-material-mini strong { color:#4e4757; font-size:11px; }.sl-material-mini small { margin-top:2px; color:#938b9c; font-size:10px; }.sl-video-prompt { display:-webkit-box; overflow:hidden; color:#646071; line-height:17px; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.sl-edit-form { display:grid; grid-template-columns:1fr 160px 160px; gap:12px; margin-bottom:16px; }.sl-edit-field { display:flex; flex-direction:column; gap:6px; color:#6d6675; font-size:12px; }.sl-edit-field input,.sl-edit-field select,.sl-edit-table input,.sl-edit-table textarea { box-sizing:border-box; width:100%; min-width:0; border:1px solid #dcd8e5; border-radius:7px; color:#403a49; font:inherit; background:#fff; outline:none; }.sl-edit-field input,.sl-edit-field select { height:36px; padding:0 10px; }.sl-edit-field input:focus,.sl-edit-field select:focus,.sl-edit-table input:focus,.sl-edit-table textarea:focus { border-color:#816aea; box-shadow:0 0 0 3px rgba(118,91,234,.1); }.sl-edit-product { display:flex; flex-direction:column; gap:6px; margin:0 0 16px; color:#6d6675; font-size:12px; }.sl-edit-product select { box-sizing:border-box; width:100%; height:36px; padding:0 10px; border:1px solid #dcd8e5; border-radius:7px; color:#403a49; font:inherit; background:#fff; outline:none; }.sl-edit-product select:focus { border-color:#816aea; box-shadow:0 0 0 3px rgba(118,91,234,.1); }.sl-edit-dynamic { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; padding:11px 12px; border:1px solid #e7e2f3; border-radius:9px; color:#6b6380; font-size:12px; background:#faf8ff; }.sl-edit-dynamic .sl-edit-dynamic-text { flex:1; min-width:0; line-height:1.7; }.sl-edit-dynamic .sl-edit-dynamic-actions { flex:0 0 auto; display:inline-flex; gap:6px; }.sl-edit-dynamic button { padding:4px 10px; border:1px solid #d4cafa; border-radius:6px; color:#654dd3; background:#fff; cursor:pointer; font-size:12px; transition:.15s; }.sl-edit-dynamic button:hover { background:#f0edff; border-color:#b9a8f5; }.sl-edit-table { width:100%; min-width:1080px; border-collapse:collapse; table-layout:fixed; font-size:12px; }.sl-edit-table th,.sl-edit-table td { box-sizing:border-box; }.sl-edit-table th { padding:9px; color:#766f7f; font-weight:600; text-align:left; background:#f8f7fb; }.sl-edit-table th:nth-child(1) { width:52px; }.sl-edit-table th:nth-child(2) { width:92px; }.sl-edit-table th:nth-child(3) { width:18%; }.sl-edit-table th:nth-child(4) { width:72px; }.sl-edit-table th:nth-child(5) { width:90px; }.sl-edit-table th:nth-child(6) { width:24%; }.sl-edit-table th:nth-child(7) { width:19%; }.sl-edit-table th:nth-child(8) { width:90px; }.sl-edit-table td { overflow:hidden; padding:7px; vertical-align:top; border-bottom:1px solid #efedf3; }.sl-edit-table input { height:32px; padding:0 8px; }.sl-edit-table textarea { height:58px; min-height:58px; max-height:58px; padding:7px 8px; overflow:auto; line-height:17px; resize:none; }.sl-edit-table .sl-row-actions { white-space:nowrap; }.sl-icon-btn { width:26px; height:26px; padding:0; border:0; border-radius:6px; color:#756d7d; background:transparent; cursor:pointer; }.sl-icon-btn:hover { color:#5c43db; background:#f0edff; }.sl-icon-btn.delete:hover { color:#c53f50; background:#fff0f2; }.sl-add-row { margin-top:10px; }.sl-mode-field { grid-column:span 1; }.sl-confirm-copy { color:#6e6774; font-size:13px; line-height:21px; }.sl-confirm-copy b { color:#3f3948; }.sl-copy-name { width:100%; box-sizing:border-box; height:38px; margin-top:14px; padding:0 10px; border:1px solid #dcd8e5; border-radius:8px; color:#403a49; font:inherit; outline:none; }
@media (max-width:840px) { .sl-toolbar { flex-wrap:wrap; }.sl-search { flex-basis:100%; }.sl-result-count { margin-left:0; }.sl-meta-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.sl-edit-form { grid-template-columns:1fr; }.sl-modal { padding:12px; }.sl-modal-card { width:100%; max-height:calc(100dvh - 24px); }.sl-modal-body,.sl-modal-head,.sl-modal-foot { padding-left:14px; padding-right:14px; } }
