/* =========================================================================
   Nebula Dashboard — theme, animated background, glassmorphism
   ========================================================================= */

:root {
  --bg-0: #02020f;
  --bg-1: #060616;
  --text: #dde6ff;
  --text-dim: #7a85a8;
  --glass: rgba(120, 80, 255, 0.06);
  --glass-strong: rgba(100, 60, 220, 0.11);
  --glass-border: rgba(140, 100, 255, 0.18);
  --shadow: 0 12px 48px rgba(0, 0, 0, 0.65);
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-3: #c084fc;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --ring-track: rgba(139, 92, 246, 0.15);
}

/* Light theme intentionally removed — the UI stays in its calm dark palette
   at all times so it never flips to bright/blue gradients. */

* { box-sizing: border-box; }

[x-cloak] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-0);
  overflow-x: hidden;
  min-height: 100vh;
  transition: color 0.4s ease;
}

/* ---- Animated nebula background ---------------------------------------- */
.nebula {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    /* core purple nebula cloud — kept dim so it never glares */
    radial-gradient(50% 60% at 20% 25%, rgba(76, 29, 149, 0.30), transparent 62%),
    /* secondary violet bloom */
    radial-gradient(45% 55% at 78% 20%, rgba(91, 60, 170, 0.22), transparent 60%),
    /* deep indigo accent */
    radial-gradient(40% 50% at 55% 78%, rgba(67, 56, 160, 0.20), transparent 60%),
    /* subtle indigo base */
    radial-gradient(60% 70% at 10% 80%, rgba(49, 20, 120, 0.22), transparent 65%),
    /* near-black void */
    linear-gradient(175deg, #02020c 0%, #050512 50%, #07041a 100%);
  background-size: 150% 150%, 150% 150%, 150% 150%, 150% 150%, 100% 100%;
  animation: nebulaShift 44s ease-in-out infinite;
}

@keyframes nebulaShift {
  0%   { background-position: 30% 30%, 70% 30%, 50% 70%, 30% 70%, 0 0; }
  50%  { background-position: 45% 45%, 55% 45%, 55% 55%, 45% 55%, 0 0; }
  100% { background-position: 30% 30%, 70% 30%, 50% 70%, 30% 70%, 0 0; }
}

/* twinkling stars — bright points + purple-tinted distant stars */
.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    /* bright white stars */
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.95), transparent),
    radial-gradient(1px   1px   at 47% 8%,  rgba(255,255,255,0.80), transparent),
    radial-gradient(2px   2px   at 83% 24%, rgba(255,255,255,0.90), transparent),
    radial-gradient(1px   1px   at 30% 55%, rgba(255,255,255,0.70), transparent),
    radial-gradient(1.5px 1.5px at 68% 72%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px   1px   at 91% 62%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1px   1px   at 5%  90%, rgba(255,255,255,0.65), transparent),
    radial-gradient(2px   2px   at 55% 45%, rgba(255,255,255,0.80), transparent),
    /* purple-tinted distant stars */
    radial-gradient(1px   1px   at 22% 38%, rgba(196,181,253,0.80), transparent),
    radial-gradient(1px   1px   at 74% 15%, rgba(221,214,254,0.70), transparent),
    radial-gradient(1.5px 1.5px at 38% 82%, rgba(196,181,253,0.85), transparent),
    radial-gradient(1px   1px   at 62% 92%, rgba(167,139,250,0.75), transparent),
    radial-gradient(1px   1px   at 88% 44%, rgba(221,214,254,0.65), transparent),
    radial-gradient(1px   1px   at 15% 68%, rgba(196,181,253,0.70), transparent),
    radial-gradient(2px   2px   at 50% 28%, rgba(167,139,250,0.60), transparent);
  background-repeat: repeat;
  background-size: 700px 700px, 500px 500px, 900px 900px, 400px 400px,
                   600px 600px, 800px 800px, 350px 350px, 550px 550px,
                   650px 650px, 450px 450px, 750px 750px, 500px 500px,
                   600px 600px, 400px 400px, 700px 700px;
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.5; } to { opacity: 1.0; } }

/* a second, denser + slower layer of faint distant stars */
.stars-far {
  background-image:
    radial-gradient(1px 1px at 8%  12%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 28% 6%,  rgba(196,181,253,0.50), transparent),
    radial-gradient(1px 1px at 41% 22%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 57% 14%, rgba(221,214,254,0.50), transparent),
    radial-gradient(1px 1px at 66% 31%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 79% 9%,  rgba(196,181,253,0.50), transparent),
    radial-gradient(1px 1px at 94% 26%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 14% 41%, rgba(221,214,254,0.45), transparent),
    radial-gradient(1px 1px at 35% 53%, rgba(255,255,255,0.40), transparent),
    radial-gradient(1px 1px at 52% 61%, rgba(196,181,253,0.45), transparent),
    radial-gradient(1px 1px at 71% 57%, rgba(255,255,255,0.40), transparent),
    radial-gradient(1px 1px at 88% 66%, rgba(221,214,254,0.45), transparent),
    radial-gradient(1px 1px at 6%  74%, rgba(255,255,255,0.40), transparent),
    radial-gradient(1px 1px at 24% 88%, rgba(196,181,253,0.45), transparent),
    radial-gradient(1px 1px at 46% 79%, rgba(255,255,255,0.40), transparent),
    radial-gradient(1px 1px at 63% 91%, rgba(221,214,254,0.45), transparent),
    radial-gradient(1px 1px at 82% 84%, rgba(255,255,255,0.40), transparent),
    radial-gradient(1px 1px at 97% 73%, rgba(196,181,253,0.45), transparent);
  background-repeat: repeat;
  background-size: 1100px 1100px;
  animation: twinkle 11s ease-in-out infinite alternate;
}

/* Constellation overlay — faint connected stars that slowly drift, as if we
   travel through space. Individual constellations fade in and out on their own
   cycles, so the sky keeps changing and then repeating. */
.constellations {
  position: fixed;
  /* oversize + center so the drift never reveals an empty edge */
  top: -20%; left: -20%; width: 140%; height: 140%;
  z-index: -1;
  pointer-events: none;
  transform-origin: center center;
  animation: cstlDrift 75s ease-in-out infinite alternate;
}
.cstl polyline { fill: none; stroke: rgba(170,190,255,0.20); stroke-width: 1; }
.cstl circle  { fill: rgba(255,255,255,0.9); filter: drop-shadow(0 0 3px rgba(196,181,253,0.8)); }

/* Each constellation fades in and out on its own slow cycle (staggered),
   so different ones are visible at different moments — then it loops. */
.cstl { animation: cstlCycle 22s ease-in-out infinite; will-change: opacity; }
.cstl:nth-child(1) { animation-duration: 20s; animation-delay:  0s; }
.cstl:nth-child(2) { animation-duration: 26s; animation-delay: -5s; }
.cstl:nth-child(3) { animation-duration: 23s; animation-delay: -11s; }
.cstl:nth-child(4) { animation-duration: 29s; animation-delay: -16s; }
.cstl:nth-child(5) { animation-duration: 18s; animation-delay: -8s; }
.cstl:nth-child(6) { animation-duration: 25s; animation-delay: -13s; }

@keyframes cstlDrift {
  0%   { transform: translate(-6%, -4%) scale(1.00) rotate(-1deg); }
  50%  { transform: translate( 5%,  5%) scale(1.10) rotate( 1deg); }
  100% { transform: translate(-6%, -4%) scale(1.00) rotate(-1deg); }
}
@keyframes cstlCycle {
  0%   { opacity: 0.06; }
  45%  { opacity: 0.85; }
  70%  { opacity: 0.45; }
  100% { opacity: 0.06; }
}

@media (prefers-reduced-motion: reduce) {
  .nebula, .stars, .stars-far, .constellations, .cstl { animation: none; }
  .cstl { opacity: 0.5; }
}

/* ---- Glass primitives -------------------------------------------------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.glass-strong {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border);
}

.card {
  border-radius: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: 0 16px 50px rgba(0,0,0,0.5);
}

/* ---- Inputs & buttons -------------------------------------------------- */
.input, .select, textarea.input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input::placeholder, textarea.input::placeholder { color: var(--text-dim); }
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}
.select option { color: #111; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;                       /* no edge line over the gradient */
  border-radius: 12px;
  padding: 0.6rem 1.05rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  color: #fff;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  box-shadow: 0 6px 18px rgba(109,40,217,0.40);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.10); }
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 0;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--glass-border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.13); }

/* "danger" lives in the blue/violet family — soft, never red. */
.btn-danger {
  background: rgba(96, 165, 250, 0.10);
  border: 0;
  color: #93c5fd;
  box-shadow: inset 0 0 0 1px rgba(96,165,250,0.28);
}
.btn-danger:hover {
  background: rgba(96, 165, 250, 0.22);
  color: #fff;
  filter: none;
}
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.8rem; border-radius: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border-radius: 10px;
  line-height: 1;
}

/* ---- Badges & chips ---------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  border: 1px solid var(--glass-border);
}
.prio-high { background: rgba(251,113,133,0.18); color: var(--bad); border-color: rgba(251,113,133,0.4); }
.prio-med  { background: rgba(251,191,36,0.16);  color: var(--warn); border-color: rgba(251,191,36,0.4); }
.prio-low  { background: rgba(52,211,153,0.16);  color: var(--good); border-color: rgba(52,211,153,0.4); }

.status-todo        { background: rgba(148,163,184,0.18); color: var(--text-dim); }
.status-in-progress { background: rgba(34,211,238,0.16);  color: var(--accent-2); }
.status-done        { background: rgba(52,211,153,0.16);  color: var(--good); }

.tag {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px;
  font-size: 0.7rem; background: rgba(124,92,255,0.18); color: var(--accent);
  border: 1px solid rgba(124,92,255,0.35);
}

/* ===== App shell: sidebar + main ======================================== */
.dash-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.9rem;
  border-radius: 0;
  border-top: 0; border-bottom: 0; border-left: 0;
  gap: 0.5rem;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-size: 1.05rem;
  color: var(--accent-2);
  text-shadow: 0 0 16px rgba(167,139,250,0.55);
  padding: 0.3rem 0.5rem 0.9rem;
  line-height: 1.15;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; overflow-y: auto; }

.nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  width: 100%;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;          /* round pill */
  font-weight: 600; font-size: 0.9rem;
  color: #dbeafe;                /* soft blue, never grey */
  background: linear-gradient(135deg, rgba(59,130,246,0.16), rgba(96,165,250,0.10));
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
.nav-item .nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  color: #60a5fa;                /* blue icon */
  flex-shrink: 0;
}
.nav-item:hover {
  background: linear-gradient(135deg, rgba(59,130,246,0.30), rgba(96,165,250,0.20));
  transform: translateX(2px);
}
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 6px 18px rgba(37,99,235,0.45), inset 0 1px 0 rgba(255,255,255,0.18);
}
.nav-item.active .nav-icon { color: #fff; filter: drop-shadow(0 0 6px rgba(125,211,252,0.9)); }

.dash-main { display: flex; flex-direction: column; min-width: 0; }

/* ---- Topbar ------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  margin: 0.8rem 1rem 0;
  padding: 0.6rem 0.9rem;
  border-radius: 16px;
}
.topbar-greet { flex: 1; min-width: 0; }
.greet-line { font-weight: 700; font-size: 0.95rem; }
.clock-line { font-size: 0.78rem; color: var(--text-dim); }
.topbar-controls { display: flex; align-items: center; gap: 0.5rem; }
.flag-btn .flag { border-radius: 3px; display: block; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.sidebar-toggle { display: none; }

.dash-panel { padding: 1.4rem 1.5rem 2rem; flex: 1; }
.dash-panel > * { max-width: 1080px; margin-left: auto; margin-right: auto; }

/* ---- Mobile nav drawer ------------------------------------------------- */
.mobile-nav {
  display: none;
  position: absolute; z-index: 40;
  left: 1rem; right: 1rem; top: 4.2rem;
  padding: 0.6rem;
  border-radius: 16px;
  flex-direction: column; gap: 0.25rem;
}

@media (max-width: 860px) {
  .dash-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar-toggle { display: inline-flex; }
  .mobile-nav { display: flex; }
}

/* ---- System monitor ---------------------------------------------------- */
.sysmon {
  margin-top: auto;
  padding: 0.8rem 0.7rem;
  border-radius: 14px;
  background: rgba(124,92,255,0.08);
  border: 1px solid var(--glass-border);
}
.sysmon-head {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 0.6rem;
}
.sysmon-row { margin-bottom: 0.55rem; }
.sysmon-label { display: flex; justify-content: space-between; font-size: 0.72rem; margin-bottom: 0.25rem; color: var(--text); }
.meter { height: 7px; border-radius: 99px; background: var(--ring-track); overflow: hidden; }
.meter-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #6d28d9, #a78bfa);
  transition: width 0.5s ease;
}
.meter-fill.alt { background: linear-gradient(90deg, #7c3aed, #c084fc); }
.sysmon-mini { margin-top: 0.6rem; font-size: 0.72rem; }
.sysmon-gpu { font-size: 0.68rem; color: var(--text); word-break: break-word; margin-top: 0.1rem; line-height: 1.25; }
.sysmon-mini-row { display: flex; justify-content: space-between; margin-top: 0.45rem; }

/* ---- Category / activity pills (expenses & focus) ---------------------- */
.cat-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.seg-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--ring-track); }
.seg { height: 100%; }

/* ---- Roadmap ----------------------------------------------------------- */
.rm-step {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.5rem 0.35rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.rm-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.rm-desc {
  font-size: 0.76rem; line-height: 1.4; color: var(--text-dim);
}
.rm-step.done .rm-desc { opacity: 0.7; }
.rm-step:hover { background: rgba(139,92,246,0.10); }
.rm-check {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid rgba(167,139,250,0.5);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.7rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rm-step.done .rm-check { background: linear-gradient(135deg,#6d28d9,#8b5cf6); border-color: transparent; }
.rm-step.done .rm-label { text-decoration: line-through; color: var(--text-dim); }
.rm-stage-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-2); margin: 0.6rem 0 0.2rem; }

/* project idea lists */
.rm-projects { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.rm-project { display: flex; align-items: flex-start; gap: 0.6rem; line-height: 1.35; }
.rm-project-n {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #dbeafe;
  background: linear-gradient(135deg, rgba(59,130,246,0.30), rgba(96,165,250,0.18));
}

/* ---- Workout ----------------------------------------------------------- */
.wk-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem; margin-top: 0.5rem; }
.wk-day {
  border-radius: 12px; padding: 0.55rem 0.4rem; text-align: center;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04);
}
.wk-day-name { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-2); }
.wk-day-what { font-size: 0.7rem; line-height: 1.3; margin-top: 0.25rem; color: var(--text); }
.wk-strength { background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(167,139,250,0.10)); border-color: rgba(124,92,255,0.4); }
.wk-walk { background: linear-gradient(135deg, rgba(52,211,153,0.16), rgba(52,211,153,0.06)); border-color: rgba(52,211,153,0.32); }
.wk-walk .wk-day-name { color: var(--good); }
.wk-rest { opacity: 0.8; }
@media (max-width: 620px) { .wk-week { grid-template-columns: repeat(4, 1fr); } }

.wk-principle { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.65rem; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); }
.wk-principle-ic { font-size: 1.2rem; flex-shrink: 0; line-height: 1.4; }

.wk-ex { padding: 0.65rem 0.75rem; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); }
.wk-ex-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.wk-ex-name { font-weight: 700; font-size: 0.9rem; }
.wk-ex-sets { flex-shrink: 0; font-size: 0.72rem; font-weight: 700; color: #dbeafe; background: linear-gradient(135deg, rgba(59,130,246,0.30), rgba(96,165,250,0.18)); padding: 0.12rem 0.5rem; border-radius: 999px; }
.wk-ex-target { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-2); margin: 0.1rem 0 0.3rem; }
.wk-ex-tip { font-size: 0.74rem; color: var(--accent-3); margin-top: 0.35rem; }

.wk-safety { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.wk-safety li { position: relative; padding-left: 1.1rem; font-size: 0.82rem; line-height: 1.45; color: var(--text); }
.wk-safety li::before { content: "›"; position: absolute; left: 0; color: var(--accent-2); font-weight: 800; }

/* segmented progress track */
.progress-track { height: 8px; border-radius: 99px; background: var(--ring-track); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg,#6d28d9,#a78bfa); transition: width 0.5s ease; }

/* timer */
.timer-display {
  font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: 2.6rem; letter-spacing: 0.02em;
  color: var(--accent-2); text-shadow: 0 0 18px rgba(167,139,250,0.4);
}

/* ---- Misc -------------------------------------------------------------- */
.muted { color: var(--text-dim); }
.divider { height: 1px; background: var(--glass-border); border: 0; }

.completion-ring { transform: rotate(-90deg); }
.ring-track { stroke: var(--ring-track); }
.ring-value { stroke: url(#ringGrad); transition: stroke-dashoffset 0.6s ease; }

.task-done .task-title { text-decoration: line-through; opacity: 0.6; }

.fade-in { animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* heatmap */
.heat-cell { width: 13px; height: 13px; border-radius: 3px; background: var(--ring-track); }
.heat-1 { background: rgba(124,92,255,0.35); }
.heat-2 { background: rgba(124,92,255,0.55); }
.heat-3 { background: rgba(124,92,255,0.78); }
.heat-4 { background: rgba(34,211,238,0.95); }

/* spinner */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* htmx loading helpers */
.htmx-indicator { opacity: 0; transition: opacity 0.2s ease; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(124,92,255,0.4); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* toast */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 0.65rem 1.1rem; border-radius: 12px;
  background: rgba(20,22,50,0.92); color: #fff; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 90;
  border: 1px solid var(--glass-border);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4,6,20,0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
