.script-library-page{display:none}.script-library-page.is-current{display:block}.script-library-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px 30px;border-radius:18px;background:linear-gradient(125deg,#24483e,#355f51);color:#fff}.script-library-hero span{font-size:11px;font-weight:800;letter-spacing:2.4px;color:#c7d8d1}.script-library-hero h2{margin:8px 0 6px;font-size:28px}.script-library-hero p{margin:0;color:#dbe7e2}.script-library-hero-actions{display:flex;gap:10px}.ops-home .script-library-hero-actions .ghost-button{background:transparent;border-color:rgba(255,255,255,.35);color:#fff}.ops-home .script-library-hero-actions .ghost-button:hover{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.6);color:#fff;transform:none;box-shadow:none}.script-library-summary{margin-top:16px;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.script-library-summary article{padding:18px;border:1px solid #e4e9e5;border-radius:14px;background:#fff}.script-library-summary strong,.script-library-summary span{display:block}.script-library-summary strong{font-size:23px;color:#29493f}.script-library-summary span{margin-top:5px;color:#7e8983;font-size:12px}.script-library-toolbar{display:flex;align-items:end;gap:14px;margin:16px 0}.script-library-toolbar label{display:grid;gap:6px;color:#6e7873;font-size:12px}.script-library-toolbar input,.script-library-toolbar select{min-height:40px;padding:0 12px;border:1px solid #dce3de;border-radius:9px;background:#fff}.script-library-toolbar input{width:min(360px,42vw)}#scriptLibraryFeedback{margin:0 0 10px auto;color:#718079}.script-library-list{display:grid;gap:12px}.script-library-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:20px 22px;border:1px solid #dfe6e1;border-radius:15px;background:#fff;box-shadow:0 7px 20px rgba(37,61,50,.04)}.script-library-card.is-default{border-color:#87aa98;background:#fbfefc}.script-library-card header{display:flex;align-items:center;gap:9px}.script-library-card h3{margin:0;font-size:18px}.script-library-card p{margin:8px 0;color:#737f79}.script-library-badge{padding:4px 8px;border-radius:999px;background:#edf3ef;color:#486658;font-size:11px;font-weight:700}.script-library-badge.public{background:#f5ecdf;color:#8a6845}.script-library-badge.default{background:#2f5a4b;color:#fff}.script-library-meta{display:flex;flex-wrap:wrap;gap:12px;color:#929b96;font-size:12px}.script-library-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}.script-library-actions button{min-height:34px;padding:0 12px;border:1px solid #d8e1db;border-radius:8px;background:#fff;color:#385749;cursor:pointer}.script-library-actions button.primary{border-color:#315e4d;background:#315e4d;color:#fff}.script-library-actions button.danger{border-color:#e6c9c2;background:#fff;color:#a34439}.script-library-actions button.danger:hover{border-color:#c9837a;background:#fdf4f2;color:#8c2f26}.script-library-empty{padding:45px;border:1px dashed #ccd8d1;border-radius:16px;text-align:center;color:#7d8983}.script-library-dialog{width:min(780px,calc(100vw - 40px));max-height:92vh;padding:0;border:0;border-radius:18px;box-shadow:0 30px 80px rgba(24,41,33,.25);overflow:hidden}
.script-library-dialog form{display:flex;flex-direction:column;max-height:92vh}.script-library-dialog::backdrop{background:rgba(20,31,26,.48)}.script-library-dialog form>header,.script-library-dialog form>footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 24px;background:#f5f8f6}.script-library-dialog header span{color:#7b9287;font-size:10px;font-weight:800;letter-spacing:2px}.script-library-dialog h2{margin:5px 0 3px}.script-library-dialog header p,.script-library-dialog footer p{margin:0;color:#7c8882}.script-library-dialog header>button{border:0;background:transparent;font-size:28px;cursor:pointer}.script-library-form-body{display:grid;gap:15px;flex:1 1 auto;min-height:0;padding:22px 24px;overflow:auto}.script-library-form-body label{display:grid;gap:7px;color:#526159;font-size:13px;font-weight:700}.script-library-form-body input,.script-library-form-body textarea{box-sizing:border-box;width:100%;padding:11px 12px;border:1px solid #d9e1dc;border-radius:9px;font:inherit;font-weight:400}.script-library-form-body textarea{resize:vertical;line-height:1.65}.script-library-file small{color:#929d97;font-weight:400}.script-library-form-warning{margin:0;padding:12px;border-radius:9px;background:#fff5e5;color:#7b6243}.script-library-card button:disabled,.script-library-dialog button:disabled{opacity:.5;cursor:not-allowed}

.script-library-dialog form>.script-library-dialog-footer{
  position:sticky;
  z-index:3;
  bottom:0;
  min-height:72px;
  box-sizing:border-box;
  padding:14px 20px;
  border-top:1px solid #e3e9e5;
  background:rgba(250,252,251,.97);
  box-shadow:0 -10px 28px rgba(29,53,43,.05);
  backdrop-filter:blur(14px);
}
.script-library-dialog-state{
  display:flex;
  align-items:center;
  min-width:0;
  gap:9px;
  padding:7px 11px;
  border:1px solid #dde8e1;
  border-radius:999px;
  background:#f2f7f4;
}
.script-library-dialog-state>i{
  flex:0 0 auto;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#4c7866;
  box-shadow:0 0 0 4px rgba(76,120,102,.11);
}
.script-library-dialog .script-library-dialog-state>p{
  max-width:220px;
  overflow:hidden;
  color:#60736a;
  font-size:12px;
  font-weight:650;
  line-height:1.4;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.script-library-dialog-actions,
.script-library-lifecycle-actions,
.script-library-save-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.script-library-action-divider{
  width:1px;
  height:24px;
  margin:0 2px;
  background:#dfe5e1;
}
.script-library-dialog-footer button{
  min-width:0;
  min-height:40px;
  box-sizing:border-box;
  margin:0;
  padding:0 16px;
  border:1px solid transparent;
  border-radius:10px;
  font:inherit;
  font-size:14px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease;
}
.script-library-dialog-footer button:not(:disabled):hover{
  transform:translateY(-1px);
}
.script-library-dialog-footer .script-library-danger{
  border-color:#edc8c3;
  background:#fff;
  color:#a8473c;
}
.script-library-dialog-footer .script-library-danger:not(:disabled):hover{
  border-color:#dda9a1;
  background:#fff5f3;
}
.script-library-offline{
  border-color:#d9e0dc!important;
  background:#fff!important;
  color:#55635c!important;
}
.script-library-offline:not(:disabled):hover{
  border-color:#bfcac4!important;
  background:#f6f8f7!important;
}
.script-library-publish{
  border-color:#c8d9d0!important;
  background:#eef5f1!important;
  color:#295747!important;
}
.script-library-publish:not(:disabled):hover{
  border-color:#9dbdac!important;
  background:#e5f0ea!important;
}
.script-library-save{
  min-width:112px!important;
  border-color:#173f34!important;
  background:#173f34!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(23,63,52,.18);
}
.script-library-save:not(:disabled):hover{
  background:#0f352b!important;
  box-shadow:0 10px 22px rgba(23,63,52,.23);
}
.script-library-dialog-footer button:focus-visible{
  outline:3px solid rgba(49,94,77,.22);
  outline-offset:2px;
}

@media(max-width:720px){
  .script-library-hero,.script-library-toolbar{align-items:stretch;flex-direction:column}.script-library-summary{grid-template-columns:1fr}.script-library-card{grid-template-columns:1fr}.script-library-toolbar input{width:100%}.script-library-actions{justify-content:flex-start}
  .script-library-dialog form>.script-library-dialog-footer{align-items:stretch;flex-direction:column;padding:13px 15px}
  .script-library-dialog-state{align-self:flex-start}
  .script-library-dialog-actions{justify-content:space-between;width:100%}
  .script-library-save-actions{margin-left:auto}
  .script-library-dialog-footer button{min-height:38px;padding:0 12px;font-size:13px}
}
@media(max-width:520px){
  .script-library-dialog-actions{align-items:stretch;flex-direction:column}
  .script-library-action-divider{display:none}
  .script-library-lifecycle-actions,.script-library-save-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;margin:0}
  .script-library-dialog-footer button{width:100%}
}
