:root{
  --sj-saas-bg:#050a10;
  --sj-saas-panel:#111a27;
  --sj-saas-panel-2:#162131;
  --sj-saas-line:rgba(151,174,204,.22);
  --sj-saas-text:#f4f7fb;
  --sj-saas-muted:#aab7c9;
  --sj-saas-accent:#5868ff;
  --sj-saas-danger:#ff7272;
  --sj-saas-good:#65d29b;
  --sj-ui-font-xs:10px;
  --sj-ui-font-sm:11px;
  --sj-ui-font-md:12px;
  --sj-ui-font-lg:14px;
  --sj-ui-control-h:36px;
  --sj-ui-radius:9px;
}
html[data-theme="light"]{
  --sj-saas-bg:#edf2f6;
  --sj-saas-panel:#ffffff;
  --sj-saas-panel-2:#e1e8f0;
  --sj-saas-line:rgba(29,50,72,.27);
  --sj-saas-text:#1c3044;
  --sj-saas-muted:#51687e;
  --sj-saas-accent:#4158d6;
  --sj-saas-danger:#b83a3a;
  --sj-saas-good:#16855c;
}
html.sj-saas-booting{overflow:hidden}
.sj-saas-gate{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:grid;
  place-items:center;
  padding:24px;
  color:var(--sj-saas-text);
  background:
    radial-gradient(circle at 20% 10%,rgba(88,104,255,.18),transparent 35%),
    linear-gradient(rgba(151,174,204,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(151,174,204,.035) 1px,transparent 1px),
    linear-gradient(180deg,#070d15,#020509);
  background-size:auto,30px 30px,30px 30px,auto;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.sj-saas-gate[hidden]{display:none!important}
.sj-saas-card{
  box-sizing:border-box;
  width:min(430px,100%);
  padding:28px;
  border:1px solid var(--sj-saas-line);
  border-radius:18px;
  background:rgba(17,26,39,.97);
  box-shadow:0 28px 80px rgba(0,0,0,.55);
}
.sj-saas-brand{display:flex;align-items:center;gap:12px;margin-bottom:23px}
.sj-saas-brand img{width:36px;height:36px;object-fit:contain}
.sj-saas-brand-copy strong{display:block;font-size:18px;line-height:1.15}
.sj-saas-brand-copy span{display:block;margin-top:4px;color:var(--sj-saas-muted);font-size:12px}
.sj-saas-form{display:grid;gap:14px}
.sj-saas-form>.sj-saas-primary,.sj-saas-form>.sj-saas-secondary{width:100%}
.sj-saas-field{display:grid;gap:7px}
.sj-saas-field span{font-size:12px;font-weight:800;color:var(--sj-saas-muted)}
.sj-saas-field input{
  box-sizing:border-box;
  width:100%;
  min-height:44px;
  padding:0 13px;
  border:1px solid var(--sj-saas-line);
  border-radius:10px;
  color:var(--sj-saas-text);
  background:#09111c;
  font:inherit;
  outline:none;
}
.sj-saas-field input:focus{border-color:var(--sj-saas-accent);box-shadow:0 0 0 3px rgba(88,104,255,.18)}
.sj-saas-primary,.sj-saas-secondary,.sj-saas-link{
  box-sizing:border-box;
  min-height:42px;
  border:0;
  border-radius:10px;
  font:inherit;
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}
.sj-saas-primary{color:#fff;background:var(--sj-saas-accent)}
.sj-saas-primary:hover{filter:brightness(1.08)}
.sj-saas-secondary{color:var(--sj-saas-text);background:var(--sj-saas-panel-2);border:1px solid var(--sj-saas-line)}
.sj-saas-link{min-height:30px;padding:0;color:#bdc7ff;background:transparent;text-align:left}
.sj-saas-primary:disabled,.sj-saas-secondary:disabled{opacity:.55;cursor:wait}
.sj-saas-message{min-height:20px;margin:0;color:var(--sj-saas-muted);font-size:12px;line-height:1.45}
.sj-saas-message.is-error{color:var(--sj-saas-danger)}
.sj-saas-message.is-good{color:var(--sj-saas-good)}

.sj-saas-field select,.sj-saas-field textarea{
  box-sizing:border-box;
  width:100%;
  min-height:44px;
  padding:10px 13px;
  border:1px solid var(--sj-saas-line);
  border-radius:10px;
  color:var(--sj-saas-text);
  background:#09111c;
  font:inherit;
  outline:none;
  resize:vertical;
}
.sj-saas-field select:focus,.sj-saas-field textarea:focus{border-color:var(--sj-saas-accent);box-shadow:0 0 0 3px rgba(88,104,255,.18)}
.sj-saas-login-links{display:flex;flex-wrap:wrap;gap:6px 16px}
.sj-saas-access-panel{margin-top:18px;padding-top:18px;border-top:1px solid var(--sj-saas-line)}
.sj-saas-access-panel[hidden]{display:none!important}
.sj-saas-access-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.sj-saas-access-head h2{margin:0;font-size:15px}
.sj-saas-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.sj-saas-loading{display:flex;align-items:center;gap:12px;color:var(--sj-saas-muted);font-size:13px}
.sj-saas-spinner{width:20px;height:20px;border:2px solid rgba(255,255,255,.18);border-top-color:var(--sj-saas-accent);border-radius:50%;animation:sj-saas-spin .7s linear infinite}
@keyframes sj-saas-spin{to{transform:rotate(360deg)}}
/* Shared account and project-status controls. Persistent controls are mounted
 * only into an authored layout host. The menu is a temporary anchored overlay. */
.sj-saas-account-host{
  position:relative!important;
  z-index:12001!important;
  min-width:0;
  max-width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  overflow:visible!important;
}
.sj-saas-account-bar{position:relative!important;z-index:12000!important;overflow:visible!important}
.sj-saas-account{position:static;display:flex;align-items:center;flex:1 1 auto;min-width:0;max-width:148px}
.sj-saas-account-menu{position:relative;width:100%;min-width:0;max-width:100%}
.sj-saas-user-toggle{
  width:100%;
  min-width:0;
  min-height:34px;
  max-width:148px;
  display:flex;
  align-items:center;
  gap:5px;
  padding:0 7px;
  border:1px solid var(--sj-saas-line);
  border-radius:9px;
  color:var(--sj-saas-text);
  background:rgba(17,26,39,.88);
  font:inherit;
  cursor:pointer;
  white-space:nowrap;
}
.sj-saas-user-toggle:hover,.sj-saas-user-toggle[aria-expanded="true"]{border-color:rgba(151,174,204,.42);background:rgba(22,33,49,.96)}
.sj-saas-account-pending .sj-saas-user-toggle{cursor:progress;pointer-events:none;opacity:.78}
.sj-saas-user-name{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--sj-saas-text);font-size:10.5px;font-weight:850;line-height:1.1}
.sj-saas-user-caret{color:var(--sj-saas-muted);font-size:9px;transition:transform .15s ease;flex:0 0 auto}
.sj-saas-user-toggle[aria-expanded="true"] .sj-saas-user-caret{transform:rotate(180deg)}
.sj-saas-user-popover{
  position:absolute;
  right:0;
  top:calc(100% + 7px);
  z-index:12010;
  width:256px;
  max-width:calc(100vw - 16px);
  max-height:calc(100dvh - 64px);
  padding:7px;
  border:1px solid var(--sj-saas-line);
  border-radius:11px;
  background:rgba(10,17,27,.985);
  box-shadow:0 18px 50px rgba(0,0,0,.44);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.sj-saas-user-popover[hidden]{display:none!important}
.sj-saas-user-meta{display:grid;gap:7px;padding:8px 8px 10px;margin-bottom:5px;border-bottom:1px solid var(--sj-saas-line)}
.sj-saas-user-email{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--sj-saas-text);font-size:10px;font-weight:800}
.sj-saas-user-context{display:flex;flex-wrap:wrap;gap:5px}
.sj-saas-user-context span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 7px;border:1px solid rgba(151,174,204,.14);border-radius:999px;background:rgba(151,174,204,.06);color:var(--sj-saas-muted);font-size:8.5px}
.sj-saas-connection-row{display:flex;align-items:center;gap:7px;color:var(--sj-saas-muted);font-size:9px}
.sj-saas-connection-dot{width:8px;height:8px;border-radius:50%;background:var(--sj-saas-good);box-shadow:0 0 0 3px rgba(101,210,155,.12);flex:0 0 auto}
.sj-saas-connection-dot[data-state="connecting"]{background:#7180ff;box-shadow:0 0 0 3px rgba(113,128,255,.14);animation:sj-saas-account-pulse .9s ease-in-out infinite alternate}
.sj-saas-connection-dot[data-state="offline"]{background:#ffb35b;box-shadow:0 0 0 3px rgba(255,179,91,.12)}
.sj-saas-connection-dot[data-state="problem"]{background:var(--sj-saas-danger);box-shadow:0 0 0 3px rgba(255,114,114,.12)}
.sj-saas-account-pending .sj-saas-connection-dot{animation:sj-saas-account-pulse .9s ease-in-out infinite alternate}
@keyframes sj-saas-account-pulse{to{transform:scale(1.35);opacity:.55}}
.sj-saas-account-link,.sj-saas-admin-link,.sj-saas-report,.sj-saas-signout{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  padding:0 10px;
  margin:0;
  border:0;
  border-radius:7px;
  color:var(--sj-saas-text);
  background:transparent;
  font:inherit;
  font-size:10.5px;
  font-weight:850;
  line-height:1.2;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}
.sj-saas-user-popover [role="menuitem"]:hover{background:rgba(88,104,255,.12)}
.sj-saas-user-popover [role="menuitem"][aria-current="page"]{background:rgba(88,104,255,.16);box-shadow:inset 2px 0 #7180ff}
.sj-saas-user-popover .sj-saas-signout{margin-top:5px;border-top:1px solid var(--sj-saas-line);border-radius:0 0 7px 7px;color:#ffb1b1}
.sj-saas-user-popover [role="menuitem"]:focus-visible{outline:2px solid #7180ff;outline-offset:-2px;background:rgba(88,104,255,.17)}
.sj-project-save-status{
  flex:0 1 94px;
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
  min-height:34px;
  max-width:94px;
  padding:0 7px;
  border:1px solid var(--sj-saas-line);
  border-radius:9px;
  color:var(--sj-saas-text);
  background:rgba(17,26,39,.88);
  font:inherit;
  text-align:left;
  cursor:pointer;
  white-space:nowrap;
}
.sj-project-save-status:disabled{cursor:wait;opacity:.8}
.sj-project-save-dot{width:8px;height:8px;border-radius:50%;background:#8795a8;box-shadow:0 0 0 3px rgba(135,149,168,.12);flex:0 0 auto}
.sj-project-save-label{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:10px;font-weight:850;line-height:1.1}
.sj-project-current-name{min-width:0;max-width:128px;overflow:hidden;text-overflow:ellipsis;font-size:11px;font-weight:500;}
@media(max-width:1359px){.sj-project-current-name{display:none;}}
.sj-project-save-status[data-state="saved"] .sj-project-save-dot{background:var(--sj-saas-good);box-shadow:0 0 0 3px rgba(101,210,155,.12)}
.sj-project-save-status[data-state="dirty"] .sj-project-save-dot,.sj-project-save-status[data-state="saving"] .sj-project-save-dot,.sj-project-save-status[data-state="loading"] .sj-project-save-dot{background:#ffb35b;box-shadow:0 0 0 3px rgba(255,179,91,.12)}
.sj-project-save-status[data-state="saving"] .sj-project-save-dot,.sj-project-save-status[data-state="loading"] .sj-project-save-dot{animation:sj-project-pulse .9s ease-in-out infinite alternate}
.sj-project-save-status[data-state="error"] .sj-project-save-dot{background:var(--sj-saas-danger);box-shadow:0 0 0 3px rgba(255,114,114,.12)}
.sj-project-save-status[data-state="offline"] .sj-project-save-dot{background:#ffb35b}
@keyframes sj-project-pulse{to{transform:scale(1.45);opacity:.55}}

@media(max-width:1180px) and (min-width:821px){
  [data-sj-project-status-host] .sj-project-save-status{flex-basis:94px;max-width:94px}
  [data-sj-project-status-host] .sj-saas-account,[data-sj-project-status-host] .sj-saas-user-toggle{max-width:132px}
}
@media(max-width:980px) and (min-width:821px){
  [data-sj-project-status-host] .sj-project-save-status{flex:0 0 34px;width:34px;max-width:34px;padding:0;justify-content:center}
  [data-sj-project-status-host] .sj-project-save-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
  [data-sj-project-status-host] .sj-saas-account,[data-sj-project-status-host] .sj-saas-user-toggle{max-width:112px}
}
@media(max-width:820px){
  [data-sj-project-status-host] .sj-project-save-status{flex-basis:94px;max-width:94px}
  [data-sj-project-status-host] .sj-saas-account,[data-sj-project-status-host] .sj-saas-user-toggle{max-width:min(118px,25vw)}
}
@media(max-width:720px){
  [data-sj-project-status-host] .sj-project-save-status{flex-basis:84px;max-width:84px}
  [data-sj-project-status-host] .sj-saas-account,[data-sj-project-status-host] .sj-saas-user-toggle{max-width:min(108px,27vw)}
}
@media(max-width:680px){
  .sj-saas-card{padding:22px}
  .sj-saas-account{position:static;right:auto;bottom:auto;z-index:auto;padding:0;border:0;border-radius:0;background:transparent}
  .sj-saas-user-toggle{min-height:34px;gap:6px;padding:0 8px}
  .sj-saas-user-popover{right:0;top:calc(100% + 7px);bottom:auto;width:min(272px,calc(100vw - 16px))}
  .sj-project-save-status{min-height:34px;padding-inline:8px}
}
@media(max-width:520px){
  [data-sj-project-status-host] .sj-project-save-status{flex:0 0 34px;width:34px;max-width:34px;padding:0;justify-content:center}
  [data-sj-project-status-host] .sj-project-save-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
  [data-sj-project-status-host] .sj-saas-account,[data-sj-project-status-host] .sj-saas-user-toggle{max-width:min(96px,27vw)}
  [data-sj-project-status-host] .sj-saas-user-toggle{padding:0 6px}
  [data-sj-project-status-host] .sj-saas-user-name{font-size:9.5px}
  .sj-saas-user-popover{width:min(272px,calc(100vw - 12px));max-height:calc(100dvh - 58px)}
}
@media(max-width:420px){
  .sj-saas-user-toggle{max-width:96px}
}

/* Shared Local / Cloud profile and validator picker. The component resets its own
 * controls so host-tool CSS cannot change its density or alignment. */
.sj-library-dialog{
  box-sizing:border-box;width:min(960px,calc(100vw - 32px));max-width:none;
  max-height:min(780px,calc(100vh - 32px));margin:auto;padding:0;
  border:1px solid rgba(151,174,204,.26);border-radius:16px;color:var(--sj-saas-text);
  background:#0c1420;box-shadow:0 30px 100px rgba(0,0,0,.68);overflow:hidden;
  color-scheme:dark
}
.sj-library-dialog::backdrop{background:rgba(2,6,11,.78);backdrop-filter:blur(5px)}
.sj-library-dialog [hidden]{display:none!important}
.sj-library-dialog button,.sj-library-dialog input,.sj-library-dialog select{
  box-sizing:border-box;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  text-transform:none;letter-spacing:normal
}
.sj-library-shell{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);min-height:0;max-height:min(780px,calc(100vh - 32px));font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.sj-library-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px 16px;border-bottom:1px solid var(--sj-saas-line)}
.sj-library-head-copy{min-width:0}.sj-library-head-copy>span{display:block;color:#8999ff;font-size:var(--sj-ui-font-xs);font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.sj-library-head h2{margin:4px 0 0;color:var(--sj-saas-text);font-size:22px;line-height:1.15;letter-spacing:-.025em}
.sj-library-head p{margin:6px 0 0;color:#91a1b5;font-size:var(--sj-ui-font-md);line-height:1.45}
.sj-library-close{display:grid!important;place-items:center;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:0!important;border:1px solid var(--sj-saas-line)!important;border-radius:9px!important;color:var(--sj-saas-text)!important;background:#111c2a!important;font-size:23px!important;font-weight:400!important;line-height:1!important;cursor:pointer!important;transform:none!important;flex:0 0 auto}
.sj-library-close:hover{border-color:rgba(137,153,255,.55)!important;background:#17243a!important;filter:none!important}.sj-library-close:active{transform:none!important}
.sj-library-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid rgba(151,174,204,.12);background:#09121d}
.sj-library-source-group,.sj-library-cloud-tools{display:flex;align-items:center;gap:8px;min-width:0}.sj-library-cloud-tools{justify-content:flex-end}
.sj-library-upload{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:var(--sj-ui-control-h);padding:0 13px;border:1px solid rgba(113,128,255,.5);border-radius:var(--sj-ui-radius);color:#fff;background:var(--sj-saas-accent);font-size:var(--sj-ui-font-md);font-weight:850;white-space:nowrap;cursor:pointer}
.sj-library-upload:hover{filter:brightness(1.06)}.sj-library-upload input{position:absolute;inset:0;width:100%;height:100%;padding:0;opacity:0;cursor:pointer}
.sj-library-history,.sj-library-select{display:inline-flex;align-items:center;gap:6px;color:#9aabbf;font-size:var(--sj-ui-font-sm);font-weight:750;white-space:nowrap}
.sj-library-history input,.sj-library-select input{width:15px!important;height:15px!important;padding:0!important;accent-color:var(--sj-saas-accent)}
.sj-library-search{display:block;min-width:160px;flex:1 1 230px}.sj-library-search input{width:100%;height:var(--sj-ui-control-h);padding:0 10px;border:1px solid var(--sj-saas-line);border-radius:var(--sj-ui-radius);outline:0;color:var(--sj-saas-text);background:#07101a;font-size:var(--sj-ui-font-md)}
.sj-library-search input::placeholder{color:#62748a}.sj-library-search input:focus{border-color:#7180ff;box-shadow:0 0 0 3px rgba(88,104,255,.13)}
.sj-library-sort{display:flex;align-items:center;gap:6px;color:#7f91a8;font-size:var(--sj-ui-font-xs);font-weight:850;white-space:nowrap}.sj-library-sort select{height:var(--sj-ui-control-h);min-width:142px;padding:0 28px 0 9px;border:1px solid var(--sj-saas-line);border-radius:var(--sj-ui-radius);outline:0;color:var(--sj-saas-text);background:#07101a;font-size:var(--sj-ui-font-sm)}
.sj-library-dialog .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.sj-library-sort select:focus{border-color:#7180ff;box-shadow:0 0 0 3px rgba(88,104,255,.13)}
.sj-library-dialog .sj-library-cloud-tools>.sj-saas-primary,.sj-library-dialog .sj-library-cloud-tools>.sj-saas-secondary{height:var(--sj-ui-control-h);min-height:var(--sj-ui-control-h);padding:0 12px;border-radius:var(--sj-ui-radius);font-size:var(--sj-ui-font-sm);line-height:1;white-space:nowrap;transform:none}
.sj-library-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px;padding:8px 20px;color:#74869c;font-size:var(--sj-ui-font-sm);line-height:1.4}.sj-library-list-head strong{color:#91a1b5;font-size:var(--sj-ui-font-xs);font-weight:850;white-space:nowrap}
.sj-library-message{min-height:0;margin:0;padding:0 20px;color:var(--sj-saas-muted);font-size:var(--sj-ui-font-sm);line-height:1.45}.sj-library-message:not(:empty){padding-top:7px;padding-bottom:7px;border-top:1px solid rgba(151,174,204,.08)}.sj-library-message.is-error,.sj-library-empty.is-error{color:var(--sj-saas-danger)}.sj-library-message.is-good{color:var(--sj-saas-good)}
.sj-library-items{min-height:0;overflow:auto;border-top:1px solid rgba(151,174,204,.12);background:#09121d}
.sj-library-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;padding:13px 20px;border-bottom:1px solid rgba(151,174,204,.12);background:#0a131f}.sj-library-item:last-child{border-bottom:0}.sj-library-item:hover{background:#0d1724}
.sj-library-item-copy{min-width:0}.sj-library-item strong,.sj-library-item span,.sj-library-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sj-library-item strong{color:#eef3f9;font-size:13px;line-height:1.3}.sj-library-item span{margin-top:4px;color:#93a4b8;font-size:var(--sj-ui-font-sm);line-height:1.35}.sj-library-item small{margin-top:3px;color:#64778d;font-size:var(--sj-ui-font-xs);line-height:1.35}.sj-library-item.is-archived{opacity:.7}
.sj-library-item .sj-library-managed{display:inline-flex;align-items:center;width:max-content;max-width:100%;min-height:26px;margin:0;padding:0 8px;border:1px solid rgba(126,143,255,.28);border-radius:999px;color:#c4cbff;background:rgba(88,104,255,.14);font-size:var(--sj-ui-font-xs);font-weight:850;white-space:nowrap}
.sj-library-item-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}.sj-library-item-actions button,.sj-library-item-actions a{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:34px;min-height:34px;margin:0;padding:0 11px;border-radius:8px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:var(--sj-ui-font-sm);font-weight:850;line-height:1;text-decoration:none;white-space:nowrap;transform:none}.sj-library-item-actions button:active{transform:none!important}
.sj-library-select{margin-right:2px}.sj-library-empty{padding:30px 20px;color:#8293a8;background:#0a131f;font-size:var(--sj-ui-font-md);line-height:1.5;text-align:center}
@media(max-width:820px){.sj-library-toolbar{grid-template-columns:1fr}.sj-library-cloud-tools{justify-content:flex-start;flex-wrap:wrap}.sj-library-search{flex:1 1 100%;min-width:100%}.sj-library-sort{flex:1 1 auto}.sj-library-sort select{flex:1}.sj-library-item{grid-template-columns:1fr;gap:10px}.sj-library-item-actions{justify-content:flex-start}}
@media(max-width:560px){.sj-library-dialog{width:100vw;max-height:100vh;height:100vh;border-radius:0}.sj-library-shell{max-height:100vh;height:100%}.sj-library-head{padding:15px 14px}.sj-library-toolbar,.sj-library-list-head{padding-left:14px;padding-right:14px}.sj-library-source-group,.sj-library-cloud-tools{align-items:stretch;flex-direction:column}.sj-library-history{min-height:30px}.sj-library-sort{width:100%}.sj-library-sort select{width:100%}.sj-library-dialog .sj-library-cloud-tools>.sj-saas-primary,.sj-library-dialog .sj-library-cloud-tools>.sj-saas-secondary{width:100%}.sj-library-item{padding:12px 14px}.sj-library-item-actions>*{flex:1}.sj-library-item-actions .sj-library-select{flex:0 0 100%}}



/* login-page-simple-v2 */
.sj-saas-login-page,.sj-saas-login-page *{box-sizing:border-box}
.sj-saas-login-page{
  margin:0;
  min-height:100vh;
  color:var(--sj-saas-text);
  background:#050a10;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.sj-saas-login-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background-color:#0c0d0f;
  background-image:
    radial-gradient(55% 42% at 18% 6%,rgba(61,75,187,.14),transparent 70%),
    linear-gradient(0deg,rgba(98,114,232,.060) 1px,transparent 1px),
    linear-gradient(90deg,rgba(98,114,232,.060) 1px,transparent 1px),
    linear-gradient(0deg,rgba(98,114,232,.031) 1px,transparent 1px),
    linear-gradient(90deg,rgba(98,114,232,.031) 1px,transparent 1px),
    linear-gradient(180deg,#050a10 0%,#020509 100%);
  background-size:100% 100%,140px 140px,140px 140px,28px 28px,28px 28px,100% 100%;
  background-position:center top;
  background-attachment:fixed;
}
.sj-saas-login-card{
  width:min(448px,100%);
  padding:24px 24px 20px;
  border-radius:20px;
  background:rgba(11,19,30,.96);
  border:1px solid rgba(151,174,204,.20);
  box-shadow:0 28px 80px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.02);
}
.sj-saas-login-card-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}
.sj-saas-login-kicker{
  color:#97a7bc;
  font-size:10px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.sj-saas-login-version{
  width:auto;
  min-width:auto;
  padding:0 10px;
  background:rgba(17,26,39,.88);
  border-color:rgba(151,174,204,.18)!important;
  color:#eaf0f9!important;
}
.sj-saas-login-brand-lockup{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-bottom:16px;
}
.sj-saas-login-brand-lockup .sj-brand-mark-wrap{
  position:relative;
  width:42px;
  height:44px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
}
.sj-saas-login-brand-lockup .sj-brand-mark{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  filter:drop-shadow(0 0 17px rgba(61,75,187,.30));
}
.sj-saas-login-brand-lockup .sj-brand-jetline{
  position:absolute;
  left:-12%;
  right:-12%;
  top:100%;
  height:1px;
  opacity:0;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,#6272e8 25%,#6272e8 75%,transparent);
  box-shadow:0 0 13px 1px rgba(61,75,187,.30),0 0 4px #6272e8;
}
.sj-saas-login-wordmark-wrap{
  width:168px;
  height:28px;
  display:grid;
  align-items:center;
  overflow:hidden;
  flex:0 0 168px;
}
.sj-saas-login-wordmark{
  display:block;
  width:168px;
  max-height:28px;
  height:auto;
  object-fit:contain;
  object-position:left center;
}
.sj-saas-login-header{
  margin-bottom:18px;
  text-align:center;
}
.sj-saas-login-header h1{
  margin:0;
  color:#f6f9fd;
  font-size:28px;
  line-height:1.08;
  letter-spacing:-.03em;
}
.sj-saas-login-header p{
  margin:8px 0 0;
  color:var(--sj-saas-muted);
  font-size:13px;
}
.sj-saas-form{display:grid;gap:15px}
.sj-saas-form>.sj-saas-primary,.sj-saas-form>.sj-saas-secondary{width:100%}
.sj-saas-field{display:grid;gap:8px}
.sj-saas-field span{font-size:12px;font-weight:800;color:var(--sj-saas-muted)}
.sj-saas-field input{
  box-sizing:border-box;
  width:100%;
  min-height:50px;
  padding:0 14px;
  border:1px solid var(--sj-saas-line);
  border-radius:14px;
  color:var(--sj-saas-text);
  background:#0a1320;
  font:inherit;
  outline:none;
}
.sj-saas-primary{
  min-height:46px;
  border-radius:12px;
  background:linear-gradient(135deg,#5364ff,#5f6fe8);
}
.sj-saas-login-footer{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(151,174,204,.12);
}
.sj-saas-link{
  width:auto;
  min-height:32px;
  padding:0;
  color:#c3ccff;
}
.sj-saas-login-note{
  margin:6px 0 0;
  color:var(--sj-saas-muted);
  font-size:11px;
  line-height:1.5;
}
@media(prefers-reduced-motion:no-preference){
  .sj-saas-login-brand-lockup .sj-brand-mark{clip-path:inset(100% 0 0 0);animation:portal-print-layers .9s steps(10,end) .12s forwards;}
  .sj-saas-login-brand-lockup .sj-brand-jetline{animation:portal-jet-pass .9s linear .12s forwards;}
  .sj-saas-login-wordmark-wrap{opacity:0;translate:-9px 0;animation:portal-brand-land .5s ease-out .62s forwards;}
}
@keyframes portal-print-layers{from{clip-path:inset(100% 0 0 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes portal-jet-pass{0%{top:100%;opacity:1}90%{opacity:1}100%{top:-7%;opacity:0}}
@keyframes portal-brand-land{to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:no-preference){
  .sj-saas-login-page.sj-login-leaving .sj-saas-login-shell{opacity:0;transform:scale(.995);transition:opacity 360ms ease-in,transform 360ms ease-in;pointer-events:none}
}
@media(max-width:640px){
  .sj-saas-login-shell{padding:14px}
  .sj-saas-login-card{padding:20px 16px 16px;border-radius:18px}
  .sj-saas-login-card-topline{margin-bottom:14px}
  .sj-saas-login-brand-lockup{gap:12px;margin-bottom:14px}
  .sj-saas-login-brand-lockup .sj-brand-mark-wrap{width:36px;height:38px;flex-basis:36px}
  .sj-saas-login-wordmark-wrap{width:142px;height:24px;flex-basis:142px}
  .sj-saas-login-wordmark{width:142px;max-height:24px}
  .sj-saas-login-header{margin-bottom:16px}
  .sj-saas-login-header h1{font-size:24px}
  .sj-saas-login-header p{font-size:12px}
  .sj-saas-field input{min-height:48px;border-radius:12px}
}
@media(max-width:420px){
  .sj-saas-login-shell{padding:12px}
  .sj-saas-login-card-topline{align-items:flex-start;flex-direction:column}
  .sj-saas-login-version{align-self:flex-start}
}


html[data-theme="light"] .sj-saas-user-toggle,
html[data-theme="light"] .sj-project-save-status{
  color:var(--sj-saas-text);
  background:rgba(255,255,255,.96);
  border-color:var(--sj-saas-line);
}
html[data-theme="light"] .sj-saas-user-toggle:hover,
html[data-theme="light"] .sj-saas-user-toggle[aria-expanded="true"]{
  color:var(--sj-saas-text);
  background:var(--sj-saas-panel-2);
  border-color:rgba(48,68,186,.38);
}
html[data-theme="light"] .sj-saas-user-popover{
  color:var(--sj-saas-text);
  background:rgba(255,255,255,.995);
  border-color:var(--sj-saas-line);
  box-shadow:0 18px 42px rgba(31,53,75,.20);
}
html[data-theme="light"] .sj-saas-user-context span{
  color:var(--sj-saas-muted);
  background:rgba(29,50,72,.055);
  border-color:rgba(29,50,72,.14);
}
html[data-theme="light"] .sj-saas-user-popover [role="menuitem"]{color:var(--sj-saas-text);}
html[data-theme="light"] .sj-saas-user-popover .sj-saas-signout{color:#a62f2f;}


/* Light theme: the login shell and cloud library own full-surface backgrounds. */
html[data-theme="light"] body.sj-saas-login-page.sj-saas-login-page .sj-saas-login-shell{background-color:#e7edf3!important;background-image:radial-gradient(55% 42% at 18% 6%,rgba(65,88,214,.08),transparent 70%),linear-gradient(0deg,rgba(61,87,112,.09) 1px,transparent 1px),linear-gradient(90deg,rgba(61,87,112,.09) 1px,transparent 1px),linear-gradient(0deg,rgba(61,87,112,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(61,87,112,.04) 1px,transparent 1px),linear-gradient(180deg,#edf2f6,#dfe7ee)!important}
html[data-theme="light"] body.sj-saas-login-page.sj-saas-login-page .sj-saas-login-card{background:rgba(255,255,255,.98)!important;border-color:rgba(29,50,72,.20)!important;box-shadow:0 28px 80px rgba(38,58,79,.20),0 0 0 1px rgba(255,255,255,.72)!important}
html[data-theme="light"] body.sj-saas-login-page.sj-saas-login-page :is(.sj-saas-login-header h1,.sj-saas-login-note){color:#1c3044!important}
html[data-theme="light"] body.sj-saas-login-page.sj-saas-login-page :is(.sj-saas-login-header p,.sj-saas-login-kicker){color:#51687e!important}
html[data-theme="light"] body.sj-saas-login-page.sj-saas-login-page .sj-saas-login-version{background:#e3eaf1!important;color:#294158!important;border-color:rgba(47,76,104,.24)!important}
html[data-theme="light"] body.sj-saas-login-page.sj-saas-login-page .sj-saas-login-footer{border-top-color:rgba(29,50,72,.14)!important}
html[data-theme="light"] .sj-library-dialog.sj-library-dialog{color-scheme:light;background:#f7f9fb!important;color:#1c3044!important;border-color:rgba(29,50,72,.22)!important;box-shadow:0 30px 90px rgba(38,58,79,.26)!important}
html[data-theme="light"] .sj-library-dialog::backdrop{background:rgba(48,64,82,.34)!important}
html[data-theme="light"] .sj-library-dialog :is(.sj-library-head,.sj-library-item,.sj-library-empty){background:#f7f9fb!important;border-color:rgba(29,50,72,.13)!important}
html[data-theme="light"] :is(.sj-library-toolbar,.sj-library-dialog .sj-library-items){background:#e7edf3!important;border-color:rgba(29,50,72,.13)!important}
html[data-theme="light"] .sj-library-sort{color:var(--sj-saas-muted)}
html[data-theme="light"] .sj-library-dialog .sj-library-item:hover{background:#edf2f6!important}
html[data-theme="light"] .sj-library-dialog :is(.sj-library-head h2,.sj-library-item strong){color:#1c3044!important}
html[data-theme="light"] .sj-library-dialog :is(.sj-library-head p,.sj-library-item span,.sj-library-list-head strong,.sj-library-history,.sj-library-select,.sj-library-sort,.sj-library-list-head,.sj-library-item small,.sj-library-empty){color:#51687e!important}
html[data-theme="light"] :is(.sj-library-dialog .sj-library-search input,.sj-library-sort select){background:#fff!important;color:#1c3044!important;border-color:rgba(29,50,72,.22)!important;color-scheme:light!important}
html[data-theme="light"] .sj-library-dialog .sj-library-close{background:#dce5ed!important;color:#294158!important;border-color:rgba(47,76,104,.28)!important}
html[data-theme="light"] .sj-library-dialog .sj-library-close:hover{background:#cedbe7!important;color:#1c3044!important}
html[data-theme="light"] .sj-library-dialog .sj-library-managed{background:#dfe4fb!important;color:#354ab3!important;border-color:rgba(65,88,214,.28)!important}
/* Account menus must fit the viewport without horizontal scrolling. */
.sj-saas-user-popover{overflow-x:hidden;box-sizing:border-box}
.sj-saas-user-popover *{max-width:100%;box-sizing:border-box}
.sj-saas-user-context span{white-space:normal;overflow-wrap:anywhere;text-overflow:clip}

/* Save is an independent primary action; the adjacent arrow only reads history. */
.sj-project-save-split{--button-h:34px;display:flex;flex:0 0 auto;align-items:stretch;min-width:0}
[data-sj-project-status-host] .sj-project-save-split .sj-project-save-status{position:relative;border-radius:9px 0 0 9px!important;flex:0 0 74px;max-width:74px}
@media(min-width:1360px){[data-sj-project-status-host] .sj-project-save-split .sj-project-save-status{flex-basis:202px;max-width:202px;}}
[data-sj-project-status-host] .sj-project-history-toggle{display:grid;place-items:center;flex:0 0 34px;width:34px;min-height:34px;margin:0;padding:0!important;border:1px solid var(--sj-saas-line);border-left:0;border-radius:0 9px 9px 0!important;background:var(--sj-saas-panel);color:var(--sj-saas-text);cursor:pointer}
.sj-project-history-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sj-project-history-toggle:hover,.sj-project-history-toggle[aria-expanded="true"]{background:var(--sj-saas-panel-2)}
.sj-project-history-toggle:focus-visible,.sj-project-save-split .sj-project-save-status:focus-visible{outline:2px solid var(--sj-saas-accent);outline-offset:2px}
.sj-project-history-dialog,.sj-project-history-dialog *{box-sizing:border-box}
.sj-project-history-dialog{position:fixed;inset:auto;margin:0;--button-h:36px;width:min(760px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--sj-saas-line);border-radius:12px;background:var(--sj-saas-panel);color:var(--sj-saas-text);font:12px/1.4 Arial,Helvetica,sans-serif;box-shadow:0 16px 50px rgba(0,0,0,.35);overflow:hidden}
.sj-project-history-dialog[open]{display:flex;flex-direction:column}
.sj-project-history-dialog::backdrop{background:rgba(0,0,0,.4)}
.sj-project-history-dropdown{position:fixed;inset:auto;margin:0}
.sj-project-history-dropdown::backdrop{background:transparent}
.sj-history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;flex-shrink:0;border-bottom:1px solid var(--sj-saas-line)}
.sj-history-head>div{min-width:0}
.sj-history-head h3{font-size:16px;line-height:1.3;margin:0;color:var(--sj-saas-text)}
.sj-history-head p{margin:3px 0 0;color:var(--sj-saas-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.sj-project-history-dialog button{font:600 12px/1.25 Arial,Helvetica,sans-serif;min-height:36px;padding:7px 10px;margin:0;background:var(--sj-saas-panel-2);border:1px solid var(--sj-saas-line);border-radius:7px;color:var(--sj-saas-text);cursor:pointer;box-shadow:none;transform:none}
.sj-project-history-dialog button:hover{border-color:var(--sj-saas-accent)}
.sj-project-history-dialog button:disabled{opacity:.45;cursor:default}
.sj-project-history-dialog button:focus-visible,.sj-history-list:focus-visible{outline:2px solid var(--sj-saas-accent);outline-offset:-2px}
.sj-project-history-dialog [data-history-close]{flex:0 0 36px;width:36px;font-size:22px!important;padding:0!important}
.sj-history-help{flex-shrink:0;margin:0;padding:10px 16px;font-size:11px;color:var(--sj-saas-muted);border-bottom:1px solid var(--sj-saas-line)}
.sj-history-list{overflow:auto;overscroll-behavior:contain;min-height:0;flex:1 1 auto;scrollbar-gutter:stable}
.sj-history-row{display:grid;grid-template-columns:80px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--sj-saas-line)}
.sj-history-preview{display:grid;place-items:center;width:80px;aspect-ratio:8/5;overflow:hidden;border:1px solid var(--sj-saas-line);border-radius:6px;background:var(--sj-saas-bg);color:var(--sj-saas-muted);font-size:9px}
.sj-history-preview img{display:block;width:100%;height:100%;object-fit:cover}
.sj-history-copy{min-width:0;overflow-wrap:anywhere}
.sj-history-copy strong{font-size:12px;display:block}
.sj-history-copy>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:3px;font-size:11px}
.sj-history-copy small{display:block;color:var(--sj-saas-muted);font-size:10px;margin-top:4px}
.sj-history-latest{display:inline-block;font-size:9px;color:var(--sj-saas-good);margin-left:4px}
.sj-history-footer{flex-shrink:0;padding:10px 16px;border-top:1px solid var(--sj-saas-line);background:var(--sj-saas-panel)}
.sj-history-footer p{margin:0 0 8px;color:var(--sj-saas-muted);font-size:11px;overflow-wrap:anywhere}
.sj-history-paging{display:flex;gap:12px;justify-content:space-between;align-items:center}
.sj-history-paging span{font-size:11px;color:var(--sj-saas-muted)}
.sj-history-empty{padding:16px;color:var(--sj-saas-muted)}
.sj-project-history-dialog [hidden]{display:none!important}
@media(max-width:600px){
  .sj-project-history-dialog{--button-h:44px}
  .sj-history-head,.sj-history-row{padding:10px 12px}
  .sj-history-help,.sj-history-footer{padding:8px 12px}
  .sj-history-row{grid-template-columns:64px minmax(0,1fr);gap:8px 10px}
  .sj-history-preview{width:64px}
  .sj-history-row>button{grid-column:2;justify-self:start;min-width:96px}
  .sj-project-history-dialog button{min-height:44px}
  .sj-project-history-dialog [data-history-close]{flex-basis:44px;width:44px}
}
@media(pointer:coarse){
  .sj-project-history-dialog{--button-h:44px}
  .sj-project-history-dialog button{min-height:44px}
  .sj-project-save-split{--button-h:44px}
  [data-sj-project-status-host] .sj-project-history-toggle{flex-basis:44px;width:44px;min-height:44px}
  [data-sj-project-status-host] .sj-project-save-split .sj-project-save-status{min-height:44px;min-width:44px}
}

.sj-project-save-icon{display:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
@media(max-width:520px),(min-width:821px) and (max-width:980px){
  [data-sj-project-status-host] .sj-project-save-split .sj-project-save-status{flex:0 0 44px;width:44px;max-width:44px;padding:0!important;justify-content:center}
  .sj-project-save-split .sj-project-save-icon{display:block}
  .sj-project-save-split .sj-project-save-dot{position:absolute;bottom:6px;right:6px;width:5px;height:5px;box-shadow:none}
}

/* Workspace browser extends the shared Profile/library presentation. */
.sj-workspace-dialog .sj-library-shell{grid-template-rows:auto auto auto auto minmax(0,1fr) auto}
.sj-workspace-dialog [hidden]{display:none!important}
.sj-workspace-dialog .sj-library-list-head{flex-wrap:wrap}
.sj-workspace-save{min-height:0;overflow:auto;padding-bottom:16px}
.sj-workspace-copy{display:flex;align-items:flex-end;gap:12px;padding:16px 20px;flex-wrap:wrap}
.sj-workspace-copy label{color:var(--sj-saas-muted)}
.sj-workspace-copy input{display:block;margin-top:6px}
.sj-project-revision-badge{display:inline-flex;align-items:center;flex:0 0 auto;min-width:24px;padding:2px 6px;border:1px solid var(--sj-saas-line);border-radius:6px;font-size:var(--sj-ui-font-xs);line-height:1.3;color:var(--sj-saas-muted);white-space:nowrap}
.sj-library-item .sj-project-revision-badge{display:inline-flex;margin-top:5px}
.sj-workspace-dialog .sj-library-item small{white-space:normal;overflow-wrap:anywhere}
@media(max-width:560px){.sj-workspace-copy{padding:12px 14px}.sj-workspace-copy>*{flex:1 1 100%}}

/* Existing saved pixels, enlarged only while hovering/holding; no capture or theme switch. */
[data-sj-thumbnail]{cursor:zoom-in}
.sj-project-history-dialog button.sj-history-preview,.sj-home-project-preview[data-sj-thumbnail]{padding:0;overflow:hidden}
.sj-thumbnail-preview{position:fixed;z-index:10000;left:50%;top:50%;transform:translate(-50%,-50%);max-width:calc(100vw - 32px);padding:6px;border:1px solid var(--sj-saas-line);border-radius:var(--sj-ui-radius);background:var(--sj-saas-panel,#101722);box-shadow:0 16px 44px rgba(0,0,0,.3);pointer-events:none}
.sj-thumbnail-preview[hidden]{display:none!important}
.sj-thumbnail-preview img{display:block;width:100%;max-height:calc(100dvh - 48px);object-fit:contain}
