/* =====================================================================================
   GlowAuth · Smooth finish
   Visual layer only, loaded after every other stylesheet. Adds soft surface texture, finer edges, steadier
   motion and cleaner type on top of the Graphite theme. No markup, scripts or behaviour are touched.
   Lean mode (slow phones) and reduced motion are respected: no blur or big shadows there, only cheap fades.
   ===================================================================================== */

:root{
  --sm-hi:inset 0 1px 0 rgba(255,255,255,.045);
  --sm-hi-strong:inset 0 1px 0 rgba(255,255,255,.14);
  --sm-lift:0 1px 2px rgba(0,0,0,.28),0 14px 30px -18px rgba(0,0,0,.62);
  --sm-sheen:linear-gradient(180deg,rgba(255,255,255,.026),rgba(255,255,255,0) 46%);
  --sm-ease:cubic-bezier(.22,.8,.24,1);
  --sm-t:.2s;
}

/* ---------- Type: sharper rendering, steadier numbers, tidier line breaks ---------- */
html body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-synthesis:none}
html body :is(h1,h2,h3,h4){text-wrap:balance}
html body :is(p,li,small,.muted,.field-hint){text-wrap:pretty}
html body :is(td,th,output,[class*="stat"],[class*="metric"],[class*="count"],[class*="size"]){font-variant-numeric:tabular-nums}
html body ::placeholder{color:var(--gr-t4)!important;opacity:1}

/* ---------- Surfaces: a soft top light, a hairline highlight, one calm shadow ---------- */
html body :is(.card,.dashboard-home-card,.execution-stat-card,.platform-stat-card,.metric-grid article,.controls-summary-card,.api-stat,.docs-topic,.provider-card,.shop-plan-card,.docs-code-card,.signed-in-panel,.pn-card,.key-manager-card,.files-card,.upload-card,.login-live-card,.login-features article,.login-stats,.dg-card,.pf-card,.execution-insights-card,.link-box,.result-card,.quick-card,.obf-choice-card,.credits-card,.ga-sc-panel,[class$="-card"]){
  background:var(--sm-sheen),var(--gr-card)!important;
  border-color:rgba(255,255,255,.065)!important;
  box-shadow:var(--sm-hi),var(--sm-lift)!important;
  transition:border-color var(--sm-t) var(--sm-ease),background-color var(--sm-t) var(--sm-ease),box-shadow var(--sm-t) var(--sm-ease),transform var(--sm-t) var(--sm-ease)!important}
html body :is(.card,.dashboard-home-card,[class$="-card"]) :is(.card,[class$="-card"],.metric-grid article,.execution-stat-card){
  background:var(--sm-sheen),var(--gr-card-2)!important;box-shadow:var(--sm-hi)!important}
html body :is(.topbar,.login-bar){box-shadow:var(--sm-hi),0 8px 24px -16px rgba(0,0,0,.7)!important}
html body :is(.shop-dialog,.script-editor-dialog,.clipboard-fallback-card,dialog){
  background:var(--sm-sheen),var(--gr-card)!important;box-shadow:var(--sm-hi),var(--gr-shadow-pop)!important}

/* small tiles lift a touch on devices that can hover; nothing moves on touch screens */
@media (hover:hover) and (pointer:fine){
  html body :is(.dashboard-home-card,.execution-stat-card,.platform-stat-card,.provider-card,.shop-plan-card,.docs-topic,.quick-card,.api-stat):hover{
    transform:translateY(-2px)!important;border-color:rgba(255,255,255,.12)!important}
}

/* ---------- Buttons: gentle gradient, crisp top edge, soft press ---------- */
html body :is(.primary-btn,.editor-save-btn,.pn-submit,[class*="primary-btn"]){
  background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,0) 62%),var(--gr-blue)!important;
  border-color:rgba(255,255,255,.1)!important;
  box-shadow:var(--sm-hi-strong),0 1px 2px rgba(0,0,0,.35),0 8px 18px -10px rgba(22,139,255,.55)!important}
html body :is(.primary-btn,.editor-save-btn,.pn-submit):hover:not(:disabled){
  box-shadow:var(--sm-hi-strong),0 1px 2px rgba(0,0,0,.35),0 10px 22px -10px rgba(22,139,255,.7)!important}
html body :is(.primary-btn,.editor-save-btn,.pn-submit):disabled{box-shadow:none!important}

html body :is(.secondary-btn,.logout-btn,.editor-cancel-btn,.google-button,.github-button,.shop-header-button,.ga-sc-btn,.edit-btn,.key-copy-list-button,.provider-mini-btn){
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,0)),var(--gr-card-2)!important;
  border-color:rgba(255,255,255,.1)!important;box-shadow:var(--sm-hi)!important}
html body :is(.secondary-btn,.logout-btn,.editor-cancel-btn,.google-button,.github-button,.shop-header-button,.ga-sc-btn,.edit-btn,.key-copy-list-button,.provider-mini-btn):hover:not(:disabled){
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.01)),var(--gr-hover)!important;border-color:rgba(255,255,255,.16)!important}
html body :is(button,[role="button"],.primary-btn,.secondary-btn,.danger-btn):active:not(:disabled){transform:scale(.985)!important}

/* level picker: same finish as the other controls, selected one keeps its own highlight */
html body .editor-luarn-levels .editor-level-btn{transition:background-color var(--sm-t) var(--sm-ease),border-color var(--sm-t) var(--sm-ease),box-shadow var(--sm-t) var(--sm-ease),transform .12s var(--sm-ease)!important}
html body .editor-luarn-levels .editor-level-btn:not([aria-pressed="true"]):hover{background:var(--gr-hover)!important;border-color:rgba(255,255,255,.16)!important}
html body .editor-luarn-levels .editor-level-btn[aria-pressed="true"]{box-shadow:var(--sm-hi),0 0 0 3px rgba(255,255,255,.05)!important}

/* ---------- Inputs: recessed field, soft focus glow ---------- */
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),textarea,select,.ga-select-trigger,.pf-input,.pf-textarea,.pf-tag-input,.source-code-input,.provider-redeem-input,.search-box){
  box-shadow:inset 0 1px 2px rgba(0,0,0,.38)!important;
  transition:border-color var(--sm-t) var(--sm-ease),box-shadow var(--sm-t) var(--sm-ease),background-color var(--sm-t) var(--sm-ease)!important}
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),textarea,select,.ga-select-trigger,.pf-input,.pf-textarea,.source-code-input):hover:not(:focus):not(:disabled){border-color:rgba(255,255,255,.17)!important}
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),textarea,select,.ga-select-trigger,.pf-input,.pf-textarea,.source-code-input):focus{
  border-color:rgba(81,166,255,.6)!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.3),var(--gr-ring)!important;outline:none!important}

/* ---------- Menus, toasts, backdrops ---------- */
html body .ga-select-menu{box-shadow:var(--sm-hi),var(--gr-shadow-pop)!important;border-color:rgba(255,255,255,.1)!important}
html body :is(.toast,.ga-sc-toast){box-shadow:var(--sm-hi),var(--gr-shadow-pop)!important}
html body :is(.shop-modal-backdrop,.clipboard-fallback-overlay){-webkit-backdrop-filter:blur(6px) saturate(1.05)!important;backdrop-filter:blur(6px) saturate(1.05)!important}

/* ---------- Scrollbars: slim, rounded, quiet ---------- */
*{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);background-clip:padding-box;border:2px solid transparent;border-radius:999px}
::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.22);background-clip:padding-box}
::-webkit-scrollbar-corner{background:transparent}

/* ---------- Focus: one consistent, softer ring ---------- */
html body :focus-visible{outline:2px solid rgba(81,166,255,.85)!important;outline-offset:2px!important}

/* ---------- Motion: fades and rises are cheap (opacity + transform only), so lean mode keeps them too ---------- */
@media (prefers-reduced-motion:no-preference){
  html[data-perf="low"] body .screen:not(.hidden){animation:gr-view .3s var(--sm-ease) both!important}
  html[data-perf="low"] body .dashboard-section:not(.hidden){animation:gr-view .26s var(--sm-ease) both!important}
  html[data-perf="low"] body .dashboard-section:not(.hidden) :is(.card,.dashboard-home-card,.execution-stat-card,.platform-stat-card,.api-stat,.controls-summary-card,.docs-topic,.provider-card,.sc-card){animation:gr-rise .34s var(--sm-ease) both!important}
}

/* ---------- Lean mode: keep the clean look, drop what costs the most to paint ---------- */
html[data-perf="low"] body :is(.shop-modal-backdrop,.clipboard-fallback-overlay){-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html[data-perf="low"] body :is(.primary-btn,.editor-save-btn,.pn-submit,[class*="primary-btn"]){box-shadow:var(--sm-hi-strong)!important}
