/* Spotlight: one soft glow that follows the mouse over the page (.cursor-spotlight) and a light patch plus a lit border that follow the mouse inside a card (.spotlight-card).
   Colours come from the active theme (--accent, day or night); a card with its own colour sets --spot-c (or data-spot="good|bad|warn|info").
   spotlight.js sets --mx / --my on the card under the mouse from one shared listener. Touch screens and reduced motion get nothing. Kept byte-identical in apps/pos and apps/callcenter (static/css). */
:root{--sp-page-a:14%;--sp-card-a:20%;--sp-ring-a:85%}
html:not(.dark)[data-ui=coders],html:not(.dark)[data-ui=translucent]{--sp-fam:var(--chart-1,#7c3aed)}   /* their day accent is near black: a grey smudge, so the theme's chart colour glows instead */
html.night,html.dark,html[data-mode="night"]{--sp-page-a:18%;--sp-card-a:18%;--sp-ring-a:88%}

.cursor-spotlight,.spotlight-card{--sp-base:var(--sp-fam,var(--accent,var(--c-primary,#38bdf8)))}   /* the theme's accent (it changes with the theme), except where that accent is near black */
.cursor-spotlight{position:fixed;left:0;top:0;width:240px;height:240px;margin:0;border-radius:50%;pointer-events:none;z-index:0;opacity:0;will-change:transform;
  background:radial-gradient(circle closest-side,color-mix(in srgb,var(--sp-base) var(--sp-page-a),transparent),color-mix(in srgb,var(--sp-base) calc(var(--sp-page-a) / 3),transparent) 55%,transparent);
  transition:opacity .35s ease}
html.sp-live .cursor-spotlight{opacity:1}

[data-spot=good]{--spot-c:var(--chart-good,#22c55e)}
[data-spot=bad]{--spot-c:var(--chart-bad,#ef4444)}
[data-spot=warn]{--spot-c:#f59e0b}
[data-spot=info]{--spot-c:#38bdf8}
.lt-tile{--spot-c:var(--c)}   /* the module tiles glow in their own colour */

.spotlight-card{--sp:var(--spot-c,var(--sp-base))}
.spotlight-card.sp-rel{position:relative}
.spotlight-card.sp-on::before,.spotlight-card.sp-on::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;animation:sp-in .25s ease forwards}
.spotlight-card.sp-on::after{background:radial-gradient(190px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--sp) var(--sp-card-a),transparent),transparent 70%)}
.spotlight-card.sp-on::before{padding:1.5px;background:radial-gradient(140px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--sp) var(--sp-ring-a),transparent),transparent 70%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);z-index:1}
@keyframes sp-in{to{opacity:1}}

@media (hover:none),(prefers-reduced-motion:reduce){.cursor-spotlight{display:none}.spotlight-card.sp-on::before,.spotlight-card.sp-on::after{display:none}}
@media print{.cursor-spotlight{display:none}.spotlight-card::before,.spotlight-card::after{display:none}}
