/* GlowAuth final polish layer. Loads after graphite.css and uses its tokens. */

/* ---------- Global refinements ---------- */
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
::selection{background:rgba(22,139,255,.35);color:#fff}
*{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:999px;border:3px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.22);background-clip:content-box;border:3px solid transparent}
::-webkit-scrollbar-track{background:transparent}

/* One consistent keyboard focus ring everywhere */
html body :is(button,a,[role="button"],[tabindex]):focus-visible{
  outline:2px solid var(--gr-blue-3);outline-offset:2px;border-radius:inherit}

/* Cards: a touch more depth and consistent rounding */
html body :is(.card,.dashboard-home-card,.pf-card){
  border-radius:16px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 1px 2px rgba(0,0,0,.25)!important}
html body :is(.platform-stat-card,.metric-grid article,.execution-stat-card){border-radius:14px!important}

/* Section headings and eyebrows */
html body .eyebrow,html body .dashboard-section-kicker{letter-spacing:.09em!important;font-weight:650!important}
html body .card h2,html body .pf-card-head h2{letter-spacing:-.015em}
html body .card h2+p,html body .pf-card-head p{color:var(--gr-t3);line-height:1.55}

/* Buttons: steady height, tactile press */
html body :is(.primary-btn,.secondary-btn,.danger-btn){min-height:42px}
html body :is(.primary-btn,.secondary-btn,.danger-btn):active:not(:disabled){transform:translateY(1px)!important}
html body .primary-btn{box-shadow:0 1px 2px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.14)!important}

/* Sidebar: calm accent bar on the active item */
html body .dashboard-tab{position:relative}
html body .dashboard-tab.is-active::before{
  content:"";position:absolute;left:-1px;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;background:var(--gr-blue-3)}

/* Top bar account chip (Logout is no longer here) */
html body .top-actions{gap:12px}
html body #accountChip{padding:5px 14px 5px 6px!important;border-radius:999px!important;min-height:44px}
html body #accountChip .avatar,html body #accountChip .profile-fallback{border-radius:50%!important}

/* ---------- Dashboard status row: Live + last updated as ONE chip ---------- */
html body .dashboard-overview-actions{
  display:inline-flex!important;flex-wrap:nowrap!important;align-items:center;gap:0!important;align-self:flex-end;
  padding:4px 16px 4px 4px;border:1px solid var(--gr-line-h);border-radius:999px;background:var(--gr-card);
  max-width:100%}
html body .dashboard-overview-actions .dashboard-live-status{
  padding:6px 12px!important;border-radius:999px!important;font-size:.74rem!important;letter-spacing:.02em;
  background:var(--gr-green-bg)!important;border:1px solid var(--gr-green-line)!important;color:var(--gr-green)!important}
html body .dashboard-overview-actions .execution-dashboard-updated{
  margin-left:12px;color:var(--gr-t3)!important;font-size:.76rem!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
@media (max-width:520px){
  html body .dashboard-overview-actions{width:100%;justify-content:flex-start}
}

/* ---------- Script source editor: one clean, unified component ---------- */
html body #scriptsWorkspace .source-editor-block{
  margin-top:22px;border:1px solid var(--gr-line-h);border-radius:14px;overflow:hidden;background:#0E0F13;
  transition:border-color var(--gr-fast) var(--gr-ease),box-shadow var(--gr-fast) var(--gr-ease)}
html body #scriptsWorkspace .source-editor-block:focus-within{border-color:var(--gr-blue)!important;box-shadow:var(--gr-ring)}
html body #scriptsWorkspace .source-editor-heading{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0!important;padding:11px 16px!important;
  border:0!important;border-bottom:1px solid var(--gr-line)!important;border-radius:0!important;background:#14151A!important}
html body #scriptsWorkspace .source-editor-heading::before{content:none!important;display:none!important}
html body #scriptsWorkspace .source-editor-heading label{
  margin:0;color:var(--gr-t1)!important;font-size:.84rem!important;font-weight:650!important;letter-spacing:.01em!important;text-transform:none!important}
html body .source-editor-lang{
  padding:3px 9px;border:1px solid var(--gr-line-h);border-radius:999px;background:var(--gr-card);
  color:var(--gr-t3);font-size:.7rem;font-weight:650;letter-spacing:.04em;font-family:var(--mono)}
html body #scriptsWorkspace .source-code-input{
  display:block;width:100%;min-height:260px;padding:16px 18px!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;resize:vertical;
  font-size:.84rem;line-height:1.7;color:#E4E6EB!important;caret-color:var(--gr-blue-3)}
html body #scriptsWorkspace .source-code-input:focus{box-shadow:none!important;border:0!important}
html body #scriptsWorkspace .source-code-input::placeholder{color:#5D6270!important}
html body #scriptsWorkspace .source-editor-footer{
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  margin:0!important;padding:12px 16px;border-top:1px solid var(--gr-line);background:#14151A}
html body #scriptsWorkspace .source-name-field{flex:1 1 0;min-width:0;max-width:340px;flex-direction:row;align-items:center;gap:10px}
html body #scriptsWorkspace .source-name-field>span{flex:none;margin:0;font-size:.74rem;color:var(--gr-t3);text-transform:none;letter-spacing:.02em}
html body #scriptsWorkspace .source-name-field input{min-height:36px;padding:0 12px;font-size:.84rem;font-family:var(--mono)}
html body #scriptsWorkspace .source-count{font-size:.76rem;font-weight:600;color:var(--gr-t3);font-variant-numeric:tabular-nums}
html body #scriptsWorkspace .source-count-over{color:var(--gr-red)}
@media (max-width:520px){
  html body #scriptsWorkspace .source-code-input{min-height:220px}
}

/* Hero chips: just the useful limit */
html body .hero-chips span{font-size:.74rem;font-weight:600}

/* ---------- Logout card (Profile > Account) ---------- */
html body .pf-logout-card .pf-card-head{margin-bottom:14px}
html body .pf-logout-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:0 20px;
  border:1px solid var(--gr-red-line);border-radius:10px;background:var(--gr-red-bg);color:#FF8A8A;
  font:inherit;font-size:.9rem;font-weight:650;cursor:pointer;
  transition:background var(--gr-fast) var(--gr-ease),border-color var(--gr-fast) var(--gr-ease),color var(--gr-fast) var(--gr-ease)}
html body .pf-logout-btn:hover{background:rgba(240,103,103,.18);border-color:rgba(240,103,103,.5);color:#FFA3A3}
html body .pf-logout-btn:active{transform:translateY(1px)}
html body .pf-logout-btn .ga-icon-svg{width:18px;height:18px;stroke:currentColor;fill:none}
@media (max-width:520px){html body .pf-logout-btn{width:100%}}

/* ---------- Floating logout confirmation ---------- */
.lo-backdrop{
  position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center;padding:20px;
  background:rgba(5,6,8,.62);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  opacity:0;transition:opacity .16s ease}
.lo-backdrop[hidden]{display:none}
.lo-backdrop.is-open{opacity:1}
.lo-dialog{
  width:100%;max-width:380px;padding:26px 24px 22px;text-align:center;
  border:1px solid rgba(255,255,255,.1);border-radius:20px;background:#15171B;color:#F3F4F6;
  box-shadow:0 24px 64px -12px rgba(0,0,0,.8),0 2px 8px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.05);
  transform:translateY(10px) scale(.97);transition:transform .2s cubic-bezier(.2,.7,.2,1)}
.lo-backdrop.is-open .lo-dialog{transform:none}
.lo-icon{
  display:grid;place-items:center;width:52px;height:52px;margin:0 auto 16px;border-radius:16px;
  background:rgba(240,103,103,.12);border:1px solid rgba(240,103,103,.3);color:#FF8A8A}
.lo-icon .ga-icon-svg{width:24px;height:24px;stroke:currentColor;fill:none}
.lo-dialog h2{margin:0 0 8px;font-size:1.15rem;font-weight:700;letter-spacing:-.015em;color:#F3F4F6}
.lo-dialog p{margin:0 0 22px;color:#A1A1AA;font-size:.9rem;line-height:1.55}
.lo-actions{display:flex;gap:10px}
.lo-btn{
  flex:1 1 0;min-height:46px;padding:0 14px;border:1px solid rgba(255,255,255,.12);border-radius:12px;
  background:#1E2026;color:#F3F4F6;font:inherit;font-size:.9rem;font-weight:600;cursor:pointer;
  transition:background .15s ease,border-color .15s ease,opacity .15s ease}
.lo-btn:hover:not(:disabled){background:#262932;border-color:rgba(255,255,255,.2)}
.lo-btn.is-danger{background:#E5484D;border-color:#E5484D;color:#fff}
.lo-btn.is-danger:hover:not(:disabled){background:#F0585D;border-color:#F0585D}
.lo-btn:disabled{opacity:.6;cursor:default}
.lo-btn:focus-visible{outline:2px solid #51A6FF;outline-offset:2px}
html.lo-lock,html.lo-lock body{overflow:hidden}
@media (max-width:359px){.lo-actions{flex-direction:column-reverse}}
@media (prefers-reduced-motion:reduce){.lo-backdrop,.lo-dialog{transition:none}}

/* =====================================================================
   Round 5: search bars, toggle switches, plan/project badges
   ===================================================================== */

/* ---------- Search bars: one consistent, readable pattern ---------- */
/* Wrapped search fields (icon + input inside a label/div) */
html body :is(.search-box,.key-search-field,.script-controls-search,.docs-search,.pn-search,.pf-search){
  display:flex;align-items:center;gap:10px;min-height:44px;padding-top:0;padding-bottom:0}
html body :is(.search-box,.key-search-field,.script-controls-search,.docs-search,.pn-search,.pf-search):not(.docs-search){padding-left:14px;padding-right:12px}
html body :is(.search-box,.key-search-field,.script-controls-search,.docs-search,.pn-search)>:is(span,svg){
  flex:0 0 auto;display:grid;place-items:center;color:var(--gr-t3,#8a8f9c)}
html body :is(.search-box,.key-search-field,.script-controls-search,.docs-search,.pn-search) svg.ga-icon-svg{width:16px;height:16px}
html body .pn-search{flex:1 1 200px;min-width:180px}

/* The input itself: no inherited padding/width, always legible */
html body :is(.search-box,.key-search-field,.script-controls-search,.docs-search,.pn-search,.pf-search) input:not(#_){
  flex:1 1 auto;width:auto;min-width:0;height:100%;margin:0;padding:10px 0!important;
  border:0!important;border-radius:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;
  color:var(--gr-t1,#f3f4f6)!important;-webkit-text-fill-color:var(--gr-t1,#f3f4f6)!important;
  caret-color:var(--gr-blue-3,#4da3ff);
  font:inherit;font-size:.9rem;line-height:1.3;text-overflow:ellipsis;
  -webkit-appearance:none;appearance:none}
html body :is(.search-box,.key-search-field,.script-controls-search,.docs-search,.pn-search,.pf-search) input:not(#_)::placeholder{
  color:var(--gr-t3,#7c8190)!important;-webkit-text-fill-color:var(--gr-t3,#7c8190)!important;opacity:1}
html body :is(.search-box,.key-search-field,.script-controls-search,.docs-search,.pn-search):focus-within{
  border-color:var(--gr-blue,#168bff)!important;box-shadow:var(--gr-ring,0 0 0 3px rgba(22,139,255,.25))!important}

/* Standalone search input (Players tab) gets the same text rules */
html body .rp-search input#rpSearch{
  height:44px;padding:0 14px 0 14px!important;color:var(--gr-t1,#f3f4f6)!important;-webkit-text-fill-color:var(--gr-t1,#f3f4f6)!important;
  caret-color:var(--gr-blue-3,#4da3ff);-webkit-appearance:none;appearance:none}
html body .rp-search input#rpSearch::placeholder{color:var(--gr-t3,#7c8190)!important;-webkit-text-fill-color:var(--gr-t3,#7c8190)!important;opacity:1}

/* Native clear "X": replace the heavy default glyph with a small, quiet one */
html body input[type="search"]::-webkit-search-decoration,
html body input[type="search"]::-webkit-search-results-button,
html body input[type="search"]::-webkit-search-results-decoration{-webkit-appearance:none;display:none}
html body input[type="search"]::-webkit-search-cancel-button{
  -webkit-appearance:none;appearance:none;display:block;flex:none;
  width:16px;height:16px;margin:0 0 0 8px;cursor:pointer;opacity:.55;border-radius:50%;
  background:center/10px 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9ccd6' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"),rgba(255,255,255,.14);
  transition:opacity .15s ease}
html body input[type="search"]::-webkit-search-cancel-button:hover{opacity:1}

/* Punishments toolbar: search takes a full row on phones, filter below */
@media (max-width:560px){
  html body .pn-toolbar{flex-direction:column;align-items:stretch}
  html body .pn-search{flex:1 1 auto;width:100%;min-width:0}
  html body .pn-filter{width:100%}
  html body .pn-filter button{flex:1}
}

/* ---------- Toggle switches: one design everywhere ---------- */
html body :is(.pn-switch-ui,.pf-switch-ui,.obf-switch>span){
  position:relative;flex:0 0 44px;width:44px;height:26px;box-sizing:border-box;margin-top:1px;
  border-radius:999px!important;background:#2b2d35!important;background-image:none!important;
  border:1px solid rgba(255,255,255,.14)!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.35)!important;
  transition:background .2s ease,border-color .2s ease!important}
html body :is(.pn-switch-ui,.pf-switch-ui,.obf-switch>span)::after{
  content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;
  background:#fff!important;box-shadow:0 1px 3px rgba(0,0,0,.45)!important;
  transform:translateX(0);transition:transform .2s cubic-bezier(.4,0,.2,1)!important}
html body :is(input:checked+.pn-switch-ui,input:checked+.pf-switch-ui,.obf-switch input:checked+span){
  background:var(--gr-blue,#168bff)!important;background-image:none!important;border-color:var(--gr-blue,#168bff)!important}
html body :is(input:checked+.pn-switch-ui,input:checked+.pf-switch-ui,.obf-switch input:checked+span)::after{
  transform:translateX(18px);background:#fff!important;box-shadow:0 1px 3px rgba(0,0,0,.45)!important}
html body :is(.pn-toggle input,.pf-switch input,.obf-switch input):focus-visible+:is(.pn-switch-ui,.pf-switch-ui,span){
  outline:2px solid var(--gr-blue-3,#4da3ff);outline-offset:2px}
/* Row card around the switch: calmer, consistent with other cards */
html body .pn-toggle{align-items:center;gap:16px;padding:16px 18px;border-radius:14px;border:1px solid var(--gr-line-h,rgba(255,255,255,.1));
  background:var(--gr-bg-2,#101115);transition:border-color .18s ease,background .18s ease}
html body .pn-toggle:hover{border-color:var(--gr-line-a,rgba(255,255,255,.2))}
html body .pn-toggle-copy strong{font-size:.92rem;font-weight:650;line-height:1.35}
html body .pn-toggle-copy small{font-size:.8rem;line-height:1.5;color:var(--gr-t3,#7c8190)}
@media (prefers-reduced-motion:reduce){html body :is(.pn-switch-ui,.pf-switch-ui,.obf-switch>span),html body :is(.pn-switch-ui,.pf-switch-ui,.obf-switch>span)::after{transition:none!important}}

/* ---------- "KEY" / "PROJECT" card badges: fit their text ---------- */
html body .api-mini-mark{
  width:auto!important;height:auto!important;min-width:0;padding:6px 12px!important;border-radius:8px!important;
  font-size:.7rem!important;font-weight:700!important;letter-spacing:.08em!important;text-transform:uppercase;white-space:nowrap}

/* Plan row: price slot disappears when empty (no more stray "Active") */
html body #apiCurrentPlanPrice:empty{display:none}

/* Players search: same field look as the other search bars */
html body .rp-search input#rpSearch{
  width:100%;border:1px solid var(--gr-line-h,rgba(255,255,255,.1))!important;border-radius:12px!important;
  background:var(--gr-bg-2,#101115)!important;box-shadow:none!important;
  transition:border-color .18s ease,box-shadow .18s ease}
html body .rp-search input#rpSearch:hover{border-color:var(--gr-line-a,rgba(255,255,255,.2))!important}
html body .rp-search input#rpSearch:focus{border-color:var(--gr-blue,#168bff)!important;box-shadow:var(--gr-ring,0 0 0 3px rgba(22,139,255,.25))!important}

/* Plan card header: icon + name on the left, price on the right, never wrapping under the icon */
html body .api-plan-current{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:nowrap}
html body .api-plan-current>div{min-width:0}
html body #apiCurrentPlanPrice{flex:none;font-size:1.05rem;font-weight:700;color:var(--gr-t1,#f3f4f6)}

/* =====================================================================
   Round 6: in-game ban preview + loadstring status cards
   ===================================================================== */

/* ---------- Ban preview: a single clean console card ---------- */
html body .pn-preview{
  margin-top:8px;padding:16px 18px 18px!important;border:1px solid var(--gr-line-h,rgba(255,255,255,.1))!important;
  border-radius:14px!important;background:var(--gr-bg-2,#101115)!important;overflow:hidden}
html body .pn-preview::before{width:3px;background:var(--gr-blue,#168bff);opacity:.9}
/* label: plain small caps, not a boxed pill */
html body .pn-preview .pn-preview-tag{
  display:block;margin:0 0 12px;padding:0!important;border:0!important;background:none!important;border-radius:0!important;
  font-size:.68rem!important;font-weight:650!important;letter-spacing:.12em!important;color:var(--gr-t3,#7c8190)!important}
/* the message: no second box inside the card */
html body .pn-preview pre#pnPreview:not(#_){
  margin:0;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;
  overflow:visible;font-size:.82rem;line-height:1.65;color:var(--gr-t1,#e6e8ee)!important}
html body .pn-preview pre .is-muted{color:var(--gr-t3,#7c8190)}
html body .pn-preview pre .is-head{display:block;font-weight:700;letter-spacing:.04em;color:#fff}
html body .pn-preview pre .is-rule{display:block;height:1px;margin:10px 0 12px;background:var(--gr-line-h,rgba(255,255,255,.12))}

/* ---------- Loadstring status cards: one tidy panel ---------- */
html body .controls-summary-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;overflow:hidden;
  border:1px solid var(--gr-line-h,rgba(255,255,255,.1))!important;border-radius:14px!important;
  background:var(--gr-card,#14151a)!important;box-shadow:none!important;backdrop-filter:none}
html body .controls-summary-grid>.controls-summary-card{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;
  padding:22px 16px;margin:0;border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;transform:none!important;animation:none!important}
html body .controls-summary-grid>.controls-summary-card+.controls-summary-card{border-left:1px solid var(--gr-line,rgba(255,255,255,.08))!important}
html body .controls-summary-card>span{font-size:.68rem;font-weight:650;letter-spacing:.1em;color:var(--gr-t3,#7c8190)}
html body .controls-summary-card>strong{font-size:1.9rem;font-weight:750;letter-spacing:-.03em;line-height:1.15;color:var(--gr-t1,#f3f4f6)}
html body .controls-summary-card>small{font-size:.78rem;line-height:1.4;color:var(--gr-t3,#7c8190)}

/* Phones: compact rows (label + description left, number right) instead of three tall boxes */
@media (max-width:720px){
  html body .controls-summary-grid{grid-template-columns:minmax(0,1fr)}
  html body .controls-summary-grid>.controls-summary-card{
    display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"label num" "desc num";
    align-items:center;justify-items:start;column-gap:16px;row-gap:2px;padding:14px 18px;text-align:left}
  html body .controls-summary-grid>.controls-summary-card+.controls-summary-card{
    border-left:0!important;border-top:1px solid var(--gr-line,rgba(255,255,255,.08))!important}
  html body .controls-summary-card>span{grid-area:label}
  html body .controls-summary-card>strong{grid-area:num;justify-self:end;font-size:1.7rem}
  html body .controls-summary-card>small{grid-area:desc}
}

/* ---------- Docs search: tidy hint tag, readable placeholder ---------- */
html body .docs-search{gap:12px;min-height:52px;padding:0 8px 0 18px!important}
html body .docs-search input:not(#_){font-size:.92rem;font-weight:500;letter-spacing:0}
html body .docs-search input:not(#_)::placeholder{font-weight:500}
html body .docs-search kbd{
  flex:none;white-space:nowrap;display:inline-flex;align-items:center;margin:0;
  padding:6px 12px;border:1px solid var(--gr-line-h,rgba(255,255,255,.12));border-radius:8px!important;
  background:var(--gr-elev,#1b1c22)!important;color:var(--gr-t3,#8a8f9c)!important;
  font-family:var(--font)!important;font-size:.62rem;font-weight:650;letter-spacing:.1em;line-height:1}
@media (max-width:380px){html body .docs-search kbd{display:none}}

/* ---------- Account chip: avatar-only state is a clean circle ---------- */
@media (max-width:1279px){
  html body #accountChip{
    display:grid!important;place-items:center;gap:0!important;
    width:44px;height:44px;min-height:44px;padding:0!important;border-radius:50%!important;flex:none}
  html body #accountChip>div{display:none!important}
  html body #accountChip .avatar,html body #accountChip .profile-fallback{width:34px;height:34px;margin:0;border-radius:50%!important;object-fit:cover}
}
html body #accountChip .avatar,html body #accountChip .profile-fallback{border:0!important;box-shadow:none!important}

/* ============================================================================
   Scripts list: script card (colors + layout)
   graphite.css forces every .sc-badge blue and boxes only Edit/Delete with
   !important, so these rules use the same weight and load last.
   ========================================================================== */

/* ---- Status badges: Obfuscated = green, Rebuild Needed = orange ---- */
html body #scriptsWorkspace .sc-badge{gap:7px;padding:5px 11px 5px 9px;font-size:.7rem;line-height:1.1}
html body #scriptsWorkspace .sc-badge.is-protected{color:#4ade80!important;background:rgba(34,197,94,.13)!important;border-color:rgba(74,222,128,.45)!important}
html body #scriptsWorkspace .sc-badge.is-rebuild{color:#fb923c!important;background:rgba(249,115,22,.14)!important;border-color:rgba(251,146,60,.55)!important;animation:ga-rebuild-pulse 2.4s ease-in-out infinite}
html body #scriptsWorkspace .sc-badge.is-rebuild i{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 9px currentColor}
html body #scriptsWorkspace .sc-badge.is-plain{color:var(--muted)!important;background:rgba(113,113,113,.1)!important;border-color:rgba(139,139,139,.28)!important}
html body #scriptsWorkspace .sc-badge.is-keyless{color:#7cb7ff!important;background:rgba(96,165,250,.12)!important;border-color:rgba(124,183,255,.4)!important}
html body #scriptsWorkspace .sc-badge.is-premium{color:#fcd34d!important;background:rgba(251,191,36,.1)!important;border-color:rgba(251,191,36,.42)!important}
html body #scriptsWorkspace .sc-card.is-outdated .sc-edge{background:linear-gradient(90deg,transparent,#fb923c 30%,#f97316 70%,transparent)!important}
@keyframes ga-rebuild-pulse{0%,100%{box-shadow:0 0 0 rgba(249,115,22,0)}50%{box-shadow:0 0 14px rgba(249,115,22,.35)}}
@media (prefers-reduced-motion:reduce){html body #scriptsWorkspace .sc-badge.is-rebuild{animation:none}}

/* ---- Header: dates wrap instead of being cut off ---- */
html body #scriptsWorkspace .sc-head{align-items:flex-start}
html body #scriptsWorkspace .sc-title{gap:5px;padding-top:2px}
html body #scriptsWorkspace .sc-title small{display:flex;flex-wrap:wrap;gap:1px 0;white-space:normal;overflow:visible;line-height:1.35}
html body #scriptsWorkspace .sc-title small span{white-space:nowrap}
html body #scriptsWorkspace .sc-title small span+span::before{content:"\2022";margin:0 7px;opacity:.55}
html body #scriptsWorkspace .sc-gear{width:38px;height:38px}

/* ---- Badges row ---- */
html body #scriptsWorkspace .sc-badges{gap:6px}

/* ---- Stats ---- */
html body #scriptsWorkspace .sc-stats{padding:12px 0 11px}
html body #scriptsWorkspace .sc-stats dt{font-size:.6rem}

/* ---- Activity chart: compact when there is nothing to plot ---- */
html body #scriptsWorkspace .sc-spark:has(.sc-chart.is-empty) .sc-plot{height:34px}
html body #scriptsWorkspace .sc-spark:has(.sc-chart.is-empty){padding:10px 12px 9px}
html body #scriptsWorkspace .sc-spark-foot{margin-top:6px}

/* ---- ID row: monospace, shortened, copy button aligned ---- */
html body #scriptsWorkspace .sc-id{padding:4px 4px 4px 14px}
html body #scriptsWorkspace .sc-id code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.01em;text-overflow:clip;background:none!important;border:0!important;box-shadow:none!important}
html body #scriptsWorkspace .sc-copy-id{width:32px;height:32px}

/* ---- Action dock: four identical tiles (Delete only tinted red) ---- */
html body #scriptsWorkspace .sc-dock{gap:6px;padding:6px;border-radius:18px}
html body #scriptsWorkspace .sc-dock .sc-act{
  flex-direction:column;gap:5px;min-height:56px;padding:8px 2px;
  background:var(--gr-card-2,rgba(255,255,255,.04))!important;background-image:none!important;
  border:1px solid var(--gr-line-h,rgba(139,139,139,.22))!important;border-radius:13px!important;
  color:var(--text-2,#d4d4d8)!important;font-size:.68rem!important;font-weight:650!important;box-shadow:none!important}
html body #scriptsWorkspace .sc-dock .sc-act svg{width:19px;height:19px;color:var(--v1,#c0c0c0)}
html body #scriptsWorkspace .sc-dock .sc-act:hover{background:var(--gr-hover,rgba(255,255,255,.08))!important;border-color:var(--gr-line-a,rgba(153,153,153,.5))!important;color:#fff!important}
html body #scriptsWorkspace .sc-dock .sc-act:hover svg{color:#fff}
html body #scriptsWorkspace .sc-dock .sc-act.is-danger{background:rgba(240,103,103,.09)!important;border-color:rgba(240,103,103,.38)!important;color:#fda4b4!important}
html body #scriptsWorkspace .sc-dock .sc-act.is-danger svg{color:#fb7185}
html body #scriptsWorkspace .sc-dock .sc-act.is-danger:hover{background:rgba(240,103,103,.2)!important;border-color:rgba(240,103,103,.6)!important;color:#fff!important}
@media (max-width:420px){
  html body #scriptsWorkspace .sc-badge{padding:5px 9px 5px 8px;font-size:.66rem}
  html body #scriptsWorkspace .sc-badge svg{width:13px;height:13px}
  html body #scriptsWorkspace .sc-title small{font-size:.7rem}
}

/* ---------- Restore card and row outlines ----------
   graphite.css section 8 flattens every list item to a bottom-line-only row. That is right for rows inside a
   single card, but these items sit in gap-spaced lists and are standalone cards, so they lost their outline
   (provider cards, script cards, key/token/project rows, punishment and command lists, credits, etc.).
   This block loads last and puts the full outline back. Empty/loading placeholders stay flat. */
html body :is(
  .provider-list>*,.file-list>*,.script-controls-list>*,.pn-list>*,.discord-command-list>*,.pf-link-rows>*,
  .panel-key-row,.api-project-row,.api-token-row,.credits-item,.execution-source-row
):not([class*="empty"]):not([class*="loading"]){
  border:1px solid var(--gr-line)!important;
  border-radius:var(--gr-r)!important;
  background:var(--gr-card)!important;
  box-shadow:none!important}
html body :is(
  .provider-list>*,.file-list>*,.script-controls-list>*,.pn-list>*,.discord-command-list>*,.pf-link-rows>*,
  .panel-key-row,.api-project-row,.api-token-row,.credits-item,.execution-source-row
):not([class*="empty"]):not([class*="loading"]):hover{
  border-color:var(--gr-line-h)!important;
  background:var(--gr-card-2)!important}

/* Inline pill rows inside cards (loadstring row, generated keys, health row) keep a full outline too */
html body :is(.provider-loader-row,.provider-redeem-row,.generated-key-item,.api-health-row){
  border:1px solid var(--gr-line)!important;
  border-radius:var(--gr-r-sm)!important;
  background:var(--gr-bg-2,var(--gr-card-2))!important;
  box-shadow:none!important}

/* ===== Premium = bright yellow (all Premium badges / tags) ===== */
html body .upload-access-badge.premium,
html body .provider-type-badge.premium,
html body .pn-pick-tag.is-premium,
html body #scriptsWorkspace .sc-badge.is-premium{
  color:#ffe600!important;
  background:rgba(255,230,0,.14)!important;
  border-color:rgba(255,230,0,.62)!important;
  text-shadow:0 0 10px rgba(255,230,0,.35);
}

/* ---- LuaRN protection level picker (upload form and editor): one consistent size and spacing ---- */
html body .editor-luarn-levels{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
html body .editor-luarn-levels.luarn-level-row{margin:14px 0 0!important}
html body .editor-luarn-levels[hidden]{display:none!important}
html body .editor-luarn-levels .editor-level-btn{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:6px!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:72px!important;margin:0!important;padding:14px 18px!important;border-radius:14px!important;text-align:left!important}
html body .editor-luarn-levels .editor-level-btn strong{display:block!important;margin:0!important;font-size:1rem!important;font-weight:800!important;line-height:1.2!important;white-space:nowrap!important}
html body .editor-luarn-levels .editor-level-btn small{display:block!important;margin:0!important;max-width:100%!important;font-size:.82rem!important;font-weight:500!important;line-height:1.3!important;color:#8f8f8f!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html body .editor-luarn-levels .editor-level-btn[aria-pressed="true"] small{color:#e2e2e2!important}
@media (max-width:700px){
  html body .editor-luarn{padding:16px!important}
  html body .editor-luarn-levels{grid-template-columns:1fr!important;gap:10px!important}
  html body .editor-luarn-levels .editor-level-btn{flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;min-height:60px!important;padding:0 20px!important}
  html body .editor-luarn-levels .editor-level-btn strong{flex:0 0 auto!important;font-size:1.02rem!important}
  html body .editor-luarn-levels .editor-level-btn small{flex:1 1 auto!important;min-width:0!important;text-align:right!important;font-size:.86rem!important}
}

/* ---- LuaRN loading circle + bar must always move ----
   Lean mode (perf-lite.css) and reduced motion (graphite.css) switch every animation off, which froze this spinner.
   A loading spinner is feedback, not decoration, so it keeps turning in both. */
html body .luarn-progress .luarn-progress-orb,
html[data-perf="low"] body .luarn-progress .luarn-progress-orb{animation:ga-spin .9s linear infinite!important;will-change:transform}
html[data-perf="low"] body .luarn-progress .luarn-progress-track i::after{animation:luarn-sheen 1.5s ease-in-out infinite!important}
@media (prefers-reduced-motion:reduce){
  html body .luarn-progress .luarn-progress-orb,
  html[data-perf="low"] body .luarn-progress .luarn-progress-orb{animation:ga-spin 1.8s linear infinite!important}
  html body .luarn-progress .luarn-progress-track i::after,
  html[data-perf="low"] body .luarn-progress .luarn-progress-track i::after{animation:none!important}
}
