/* Dashboard tour: welcome popup, spotlight, arrow and tooltip. Sits above the app (drawers 950, search 1200)
   and below toasts (1300). The highlight is always Vexo purple, whatever accent a server picked. */

.tour-root{position:fixed;inset:0;z-index:1250;pointer-events:none;--tour-purple:#8b5cf6;--tour-purple-light:#c4b1ff;--tour-dim:rgba(4,4,8,.74)}
.tour-root.is-paused{visibility:hidden}

/* Click shield: everything outside the highlight is inert; interactive steps cut a hole for the target. */
.tour-block{position:fixed;inset:0;pointer-events:auto}

/* Spotlight: the dark overlay is the spot's own shadow, so the highlighted element stays bright. */
.tour-spot{position:fixed;left:0;top:0;border-radius:12px;pointer-events:none;
  box-shadow:0 0 0 2px var(--tour-purple),0 0 26px 6px rgba(139,92,246,.55),0 0 0 200vmax var(--tour-dim)}
.tour-spot::after{content:'';position:absolute;inset:-7px;border-radius:17px;border:2px solid rgba(196,177,255,.75);animation:tour-pulse 1.9s var(--ease-out) infinite}
.tour-spot.is-center{box-shadow:0 0 0 200vmax var(--tour-dim)}
.tour-spot.is-center::after{display:none}
.tour-root.is-moving .tour-spot{transition:left 440ms var(--ease-out),top 440ms var(--ease-out),width 440ms var(--ease-out),height 440ms var(--ease-out)}

/* Arrow: rotated to face the target; the inner part bobs toward it. */
.tour-arrow{position:fixed;left:0;top:0;width:44px;height:44px;display:grid;place-items:center;opacity:0;pointer-events:none;transition:opacity 220ms var(--ease);filter:drop-shadow(0 0 8px rgba(139,92,246,.85))}
.tour-arrow.is-on{opacity:1}
.tour-root.is-moving .tour-arrow{transition:opacity 220ms var(--ease),transform 440ms var(--ease-out)}
.tour-arrow-i{display:block;width:40px;height:20px;animation:tour-bob 1.1s ease-in-out infinite}
.tour-arrow svg{display:block;width:100%;height:100%;fill:none;stroke:var(--tour-purple-light);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}

/* Tooltip */
.tour-pop{position:fixed;left:0;top:0;width:min(360px,calc(100vw - 24px));padding:0 18px 16px;pointer-events:auto;overflow:hidden;color:var(--text);
  background:linear-gradient(180deg,#1c1929,#15141d);border:1px solid rgba(167,139,250,.38);border-radius:16px;
  box-shadow:var(--shadow-pop),0 0 44px -14px rgba(139,92,246,.7)}
.tour-pop.is-in{animation:tour-in 340ms var(--ease-out)}
.tour-pop.is-leaving{opacity:.35;transition:opacity 160ms var(--ease)}
.tour-root.is-moving .tour-pop{transition:transform 440ms var(--ease-out),opacity 160ms var(--ease)}
.tour-bar{height:4px;margin:0 -18px 14px;background:rgba(255,255,255,.06)}
.tour-bar span{display:block;height:100%;border-radius:0 4px 4px 0;background:linear-gradient(90deg,#7c4ff3,var(--tour-purple-light));transition:width 440ms var(--ease-out)}
.tour-head{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.tour-count{font:700 11.5px var(--font);letter-spacing:.07em;text-transform:uppercase;color:var(--tour-purple-light);font-variant-numeric:tabular-nums}
.tour-tools{display:flex;gap:2px;margin-left:auto;margin-right:-8px}
.tour-tools .btn-icon{width:32px;height:32px}
.tour-tools svg{width:17px;height:17px}
.tour-voice.is-on{color:var(--tour-purple-light);background:rgba(139,92,246,.16)}
.tour-title{margin:0 0 6px;font:700 17px/1.3 var(--font-display);text-wrap:balance}
.tour-text{margin:0;min-height:3.1em;color:var(--text-2);font-size:14.5px;line-height:1.55}
.tour-caret{display:inline-block;width:2px;height:1.05em;margin-left:2px;vertical-align:-3px;background:var(--tour-purple-light);animation:tour-blink .9s steps(1) infinite}
.tour-note{margin:12px 0 0;padding:8px 11px;border-radius:10px;font-size:13px;line-height:1.45;background:var(--yellow-soft);color:var(--yellow)}
.tour-note.is-ok{background:var(--green-soft);color:var(--green)}
.tour-note[hidden]{display:none}
.tour-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:16px}
.tour-grow{flex:1}
.tour-skip{padding:6px 2px;border:0;background:none;color:var(--text-3);font:500 13px var(--font);cursor:pointer;border-radius:6px}
.tour-skip:hover{color:var(--text-2);text-decoration:underline}

/* Welcome popup */
.tour-root.is-welcome{display:grid;place-items:center;padding:16px;pointer-events:auto}
.tour-dim{position:fixed;inset:0;background:var(--tour-dim);backdrop-filter:blur(3px);animation:fade-in 220ms var(--ease)}
.tour-welcome{position:relative;width:min(440px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:30px 24px 16px;text-align:center;border-radius:20px;
  background:radial-gradient(120% 80% at 50% 0%,rgba(139,92,246,.24),transparent 62%),#15141d;border:1px solid rgba(167,139,250,.38);
  box-shadow:var(--shadow-pop),0 0 64px -16px rgba(139,92,246,.75);animation:tour-rise 440ms var(--ease-out)}
.tour-welcome .tour-x{position:absolute;top:10px;right:10px}
.tour-w-badge{position:relative;width:64px;height:64px;margin:0 auto 16px}
.tour-w-logo{display:grid;place-items:center;width:64px;height:64px;border-radius:20px;color:#fff;font:800 28px var(--font-display);
  background:linear-gradient(140deg,#9a78fb,#6d3df0);box-shadow:0 10px 30px -8px rgba(139,92,246,.85),0 0 0 6px rgba(139,92,246,.14)}
.tour-w-wave{position:absolute;right:-14px;bottom:-8px;font-size:26px;transform-origin:70% 75%;animation:tour-wave 1.7s ease-in-out .3s 2}
.tour-w-title{margin:0 0 8px;font:800 22px var(--font-display);text-wrap:balance}
.tour-w-text{max-width:36ch;min-height:4.8em;margin:0 auto 20px;color:var(--text-2);font-size:15px;line-height:1.6}
.tour-w-actions{display:flex;flex-direction:column;gap:8px}
.tour-w-actions .btn{width:100%;justify-content:center}
.tour-w-voice svg{width:17px;height:17px}
.tour-w-voice.is-on{border-color:rgba(167,139,250,.6);color:#ddd2ff;background:rgba(139,92,246,.14)}
.tour-welcome .tour-skip{margin-top:10px}

/* Phones: the tooltip docks to the top or bottom edge at full width. */
@media(max-width:639px){
  .tour-pop{width:calc(100vw - 24px)}
  .tour-text{font-size:14px}
  body.tour-on #toast-container{top:12px;bottom:auto}
}

/* Effects canvas (sparkles, spark bursts) and the finish confetti */
.tour-fx,.tour-confetti{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}
.tour-confetti{z-index:1260}

/* Ping ring when the spotlight lands */
.tour-spot.is-landed::before{content:'';position:absolute;inset:-2px;border-radius:14px;box-shadow:0 0 0 2px var(--tour-purple-light),0 0 30px 4px rgba(139,92,246,.7);animation:tour-ping 760ms var(--ease-out) forwards}

/* Progress bar shine on every step */
.tour-bar span{position:relative;overflow:hidden}
.tour-bar span::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent);transform:translateX(-100%);animation:tour-shine 1.1s var(--ease) .25s}
.tour-pop.is-in .tour-title{animation:tour-word 420ms var(--ease-out) 60ms both}

/* 3D guide */
.tour-bot{position:fixed;left:0;top:0;pointer-events:none;opacity:0;transition:opacity 260ms var(--ease);filter:drop-shadow(0 12px 24px rgba(139,92,246,.45))}
.tour-bot.is-on{opacity:1}
.tour-root.is-moving .tour-bot{transition:opacity 260ms var(--ease),transform 440ms var(--ease-out)}
.tour-bot-canvas{display:block}
.tour-w-badge.has-bot{width:auto;height:auto;margin:-26px auto 4px;display:grid;place-items:center;filter:drop-shadow(0 14px 30px rgba(139,92,246,.5));animation:tour-rise 600ms var(--ease-out)}

/* Welcome: spinning glow ring behind the logo (shown until the 3D guide loads, or if it can't) */
.tour-w-badge:not(.has-bot)::before{content:'';position:absolute;inset:-7px;border-radius:25px;background:conic-gradient(from 0deg,transparent 0 40%,#8b5cf6,#c4b1ff,transparent 70%);animation:tour-spin 2.6s linear infinite}
.tour-w-logo{position:relative}
.tour-w-title span{display:inline-block;animation:tour-word 560ms var(--ease-out) both;animation-delay:calc(140ms + var(--i, 0) * 110ms)}
.tour-w-actions > *{animation:tour-word 480ms var(--ease-out) both}
.tour-w-actions > :nth-child(1){animation-delay:420ms}
.tour-w-actions > :nth-child(2){animation-delay:500ms}
.tour-w-actions > :nth-child(3){animation-delay:580ms}
.tour-w-start{box-shadow:0 0 0 0 rgba(139,92,246,.6),0 6px 18px -8px rgba(139,92,246,.75);animation:tour-word 480ms var(--ease-out) 420ms both,tour-glow 2.4s ease-in-out 1.2s infinite}
.tour-music.is-on{color:var(--tour-purple-light);background:rgba(139,92,246,.16)}

/* Help button in the top bar */
.tb-help svg{width:19px;height:19px}

@keyframes tour-pulse{0%{opacity:.9;transform:scale(1)}70%,100%{opacity:0;transform:scale(1.05)}}
@keyframes tour-bob{0%,100%{transform:translateX(-6px)}50%{transform:translateX(3px)}}
@keyframes tour-in{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
@keyframes tour-rise{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes tour-wave{0%,100%{transform:rotate(0)}20%{transform:rotate(18deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(14deg)}80%{transform:rotate(-4deg)}}
@keyframes tour-blink{50%{opacity:0}}
@keyframes tour-ping{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.18)}}
@keyframes tour-shine{to{transform:translateX(100%)}}
@keyframes tour-word{from{opacity:0;transform:translateY(10px);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}
@keyframes tour-spin{to{transform:rotate(360deg)}}
@keyframes tour-glow{0%,100%{box-shadow:0 0 0 0 rgba(139,92,246,.55),0 6px 18px -8px rgba(139,92,246,.75)}50%{box-shadow:0 0 0 8px rgba(139,92,246,0),0 6px 22px -6px rgba(139,92,246,.95)}}

@media(prefers-reduced-motion:reduce){
  .tour-spot::after,.tour-arrow-i,.tour-w-wave,.tour-caret,.tour-spot.is-landed::before,.tour-bar span::after,.tour-w-badge::before{animation:none}
  .tour-w-title span,.tour-w-actions > *,.tour-w-start,.tour-pop.is-in .tour-title,.tour-w-badge.has-bot{animation:none}
  .tour-root.is-moving .tour-bot{transition:none}
  .tour-pop.is-in,.tour-welcome,.tour-dim{animation:none}
  .tour-root.is-moving .tour-spot,.tour-root.is-moving .tour-pop,.tour-root.is-moving .tour-arrow,.tour-bar span{transition:none}
}
