/* =====================================================================
   TaskFlow motion layer
   Only transform / opacity / filter are animated (GPU friendly).
   Everything is switched off for users who prefer reduced motion.
   ===================================================================== */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);       /* soft, "expo" out */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1); /* small overshoot */
  --dur-1: .18s; --dur-2: .32s; --dur-3: .55s;
}

/* ---------------------------------------------------------------- keyframes */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn  { from { opacity: 0; transform: translateY(10px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes slideInR { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes rowIn    { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes growUp   { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growX    { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer  { from { background-position: -480px 0; } to { background-position: 480px 0; } }
@keyframes shake    { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes ring     { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@keyframes pop      { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ripple   { from { transform: scale(0); opacity: .35; } to { transform: scale(2.6); opacity: 0; } }
@keyframes floatA   { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(60px, -40px) scale(1.08); } 66% { transform: translate(-40px, 30px) scale(.95); } }
@keyframes floatB   { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-70px, 50px) scale(1.12); } }
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes shine    { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes softPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 161, 74, .45); } 50% { box-shadow: 0 0 0 6px rgba(240, 161, 74, 0); } }

/* ---------------------------------------------------------------- global feel */
body { transition: background-color var(--dur-2) ease, color var(--dur-2) ease; }
.sidebar, .topbar, .panel, .stat-card, .modal, .dropdown, .login-card, .board-col, .board-card { transition: background-color var(--dur-2) ease, border-color var(--dur-2) ease, box-shadow var(--dur-2) ease, transform var(--dur-2) var(--ease-out); }

/* ---------------------------------------------------------------- start page */
.portal-home { position: relative; z-index: 1; }
body:has(.portal-home)::before, body:has(.portal-home)::after,
.login-screen::before, .login-screen::after {
  content: ""; position: fixed; width: 520px; height: 520px; border-radius: 50%; filter: blur(70px); opacity: .45; pointer-events: none; z-index: 0;
}
body:has(.portal-home)::before, .login-screen::before { background: radial-gradient(circle, #8fa7ff, transparent 65%); top: -160px; left: -120px; animation: floatA 18s ease-in-out infinite; }
body:has(.portal-home)::after, .login-screen::after { background: radial-gradient(circle, #6fd3c4, transparent 65%); bottom: -180px; right: -140px; animation: floatB 22s ease-in-out infinite; }
.portal-operator.login-shell .login-screen::after, body.portal-operator .login-screen::after { background: radial-gradient(circle, #b6a2ff, transparent 65%); }
body.portal-admin .login-screen::before { background: radial-gradient(circle, #6fd3c4, transparent 65%); }
.portal-home > * { animation: fadeUp var(--dur-3) var(--ease-out) both; }
.portal-home > :nth-child(2) { animation-delay: .06s; }
.portal-home > :nth-child(3) { animation-delay: .12s; }
.portal-home h1 { background: linear-gradient(90deg, var(--navy), #5574d8, #2a9d8f, var(--navy)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fadeUp var(--dur-3) var(--ease-out) .06s both, gradientMove 8s ease infinite; }
.portal-card { position: relative; overflow: hidden; animation: fadeUp .6s var(--ease-out) both; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s; }
.portal-cards .portal-card:nth-child(1) { animation-delay: .18s; }
.portal-cards .portal-card:nth-child(2) { animation-delay: .28s; }
.portal-cards .portal-card:nth-child(3) { animation-delay: .38s; }
.portal-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(29, 44, 88, .16); }
.portal-card::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-120%) skewX(-20deg); }
.portal-card:hover::after { animation: shine .9s ease; }
.portal-card .portal-icon { transition: transform .45s var(--ease-spring); }
.portal-card:hover .portal-icon { transform: scale(1.12) rotate(-6deg); }
.portal-card .portal-go { transition: transform .3s var(--ease-out); display: inline-block; }
.portal-card:hover .portal-go { transform: translateX(6px); }

/* ---------------------------------------------------------------- login */
.login-screen { position: relative; overflow: hidden; }
.login-card { position: relative; z-index: 1; animation: scaleIn .6s var(--ease-out) both; backdrop-filter: blur(6px); }
.login-card > * { animation: fadeUp .5s var(--ease-out) both; }
.login-card > :nth-child(2) { animation-delay: .08s; }
.login-card > :nth-child(3) { animation-delay: .12s; }
.login-card > :nth-child(4) { animation-delay: .16s; }
.login-card > :nth-child(5) { animation-delay: .22s; }
.login-card .brand-mark { animation: pop .6s var(--ease-spring) .1s both; }
.login-card.shake { animation: shake .45s ease; }
.form-error:not([hidden]), .form-ok:not([hidden]) { animation: fadeUp .3s var(--ease-out); }
.stack input { transition: border-color var(--dur-1), box-shadow var(--dur-2), transform var(--dur-2) var(--ease-out); }
.stack input:focus { transform: translateY(-1px); }

/* ---------------------------------------------------------------- buttons */
.button, .nav-item, .page-button, .link-button, .icon-button, .pw-btn, .stage-chip, .segmented a { position: relative; overflow: hidden; transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-2), box-shadow var(--dur-2), color var(--dur-2), border-color var(--dur-2); }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button.primary:not(:disabled):hover, .button.success:not(:disabled):hover { box-shadow: 0 8px 18px rgba(29, 44, 88, .22); }
.button:not(:disabled):active, .icon-button:active, .page-button:active { transform: translateY(0) scale(.97); }
.button.primary::before, .create-task-btn::before { content: ""; position: absolute; top: 0; left: 0; width: 45%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); transform: translateX(-120%) skewX(-20deg); pointer-events: none; }
.button.primary:hover::before, .create-task-btn:hover::before { animation: shine .8s ease; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; pointer-events: none; animation: ripple .6s var(--ease-out) forwards; }

/* ---------------------------------------------------------------- sidebar */
.sidebar .brand-mark { transition: transform .5s var(--ease-spring); }
.sidebar .brand:hover .brand-mark { transform: rotate(-10deg) scale(1.08); }
.nav-item:not(.active):hover { transform: translateX(3px); }
.nav-item svg { transition: transform var(--dur-2) var(--ease-spring); }
.nav-item:hover svg { transform: scale(1.12); }
@keyframes navIn { from { transform: scale(.96); opacity: .6; } to { transform: none; opacity: 1; } }
.nav-item.active { animation: navIn .3s var(--ease-out); }
.create-task-btn { animation: fadeUp .5s var(--ease-out) .1s both; }
.create-task-btn svg { transition: transform .4s var(--ease-spring); }
.create-task-btn:hover svg { transform: rotate(90deg); }
.nav-section.open .nav-sub .nav-item { animation: fadeUp .3s var(--ease-out) both; }
.nav-section.open .nav-sub .nav-item:nth-child(2) { animation-delay: .03s; }
.nav-section.open .nav-sub .nav-item:nth-child(3) { animation-delay: .06s; }
.nav-section.open .nav-sub .nav-item:nth-child(4) { animation-delay: .09s; }
.nav-section.open .nav-sub .nav-item:nth-child(5) { animation-delay: .12s; }
@media (max-width: 1024px) { .sidebar { transition: transform .35s var(--ease-out), background-color var(--dur-2); } .sidebar-scrim.show { animation: fadeIn .25s ease; } }

/* ---------------------------------------------------------------- page transitions */
.page { animation: fadeUp .45s var(--ease-out) both; }
.page > * { animation: fadeUp .5s var(--ease-out) both; }
.page > :nth-child(2) { animation-delay: .05s; }
.page > :nth-child(3) { animation-delay: .1s; }
.page > :nth-child(4) { animation-delay: .15s; }
.page > :nth-child(5) { animation-delay: .2s; }
.page > :nth-child(n+6) { animation-delay: .25s; }
.stat-grid > * { animation: fadeUp .55s var(--ease-out) both; }
.stat-grid > :nth-child(2) { animation-delay: .06s; }
.stat-grid > :nth-child(3) { animation-delay: .12s; }
.stat-grid > :nth-child(4) { animation-delay: .18s; }
.stat-grid > :nth-child(5) { animation-delay: .24s; }
.stat-grid > :nth-child(6) { animation-delay: .3s; }
.stat-card { will-change: transform; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(42, 51, 82, .10); }
.stat-card .stat-icon { transition: transform .5s var(--ease-spring); }
.stat-card:hover .stat-icon { transform: scale(1.12) rotate(-8deg); }
.agenda-grid > *, .chart-grid > *, .profile-cols > *, .stage-strip > *, .pipeline > * { animation: fadeUp .5s var(--ease-out) both; }
.agenda-grid > :nth-child(2), .chart-grid > :nth-child(2), .stage-strip > :nth-child(2), .pipeline > :nth-child(2) { animation-delay: .06s; }
.agenda-grid > :nth-child(3), .chart-grid > :nth-child(3), .stage-strip > :nth-child(3), .pipeline > :nth-child(3) { animation-delay: .12s; }
.stage-strip > :nth-child(4), .pipeline > :nth-child(4) { animation-delay: .18s; }
.stage-strip > :nth-child(5), .pipeline > :nth-child(5) { animation-delay: .24s; }
.stage-strip > :nth-child(6), .pipeline > :nth-child(6) { animation-delay: .3s; }

/* table rows cascade in (first 15) */
.page tbody tr { animation: rowIn .4s var(--ease-out) both; }
.page tbody tr:nth-child(2) { animation-delay: .03s; } .page tbody tr:nth-child(3) { animation-delay: .06s; }
.page tbody tr:nth-child(4) { animation-delay: .09s; } .page tbody tr:nth-child(5) { animation-delay: .12s; }
.page tbody tr:nth-child(6) { animation-delay: .15s; } .page tbody tr:nth-child(7) { animation-delay: .18s; }
.page tbody tr:nth-child(8) { animation-delay: .21s; } .page tbody tr:nth-child(9) { animation-delay: .24s; }
.page tbody tr:nth-child(10) { animation-delay: .27s; } .page tbody tr:nth-child(n+11) { animation-delay: .3s; }
tbody tr.clickable { transition: background-color var(--dur-1), transform var(--dur-2) var(--ease-out); }
tbody tr.clickable:hover { transform: translateX(2px); }

/* status badges */
.status { transition: transform var(--dur-2) var(--ease-spring); }
tr:hover .status { transform: scale(1.04); }
.status.pending::before, .status.submitted::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: softPulse 2s ease-in-out infinite; }

/* ---------------------------------------------------------------- charts */
.chart-svg path.s1, .chart-svg path.s2 { transform-box: fill-box; transform-origin: bottom; animation: growUp .8s var(--ease-out) both; }
.chart-svg path.s2 { animation-delay: .12s; }
.bl-bar { transform-origin: left; animation: growX .9s var(--ease-out) both; }
.barlist .bl-row:nth-child(2) .bl-bar { animation-delay: .06s; }
.barlist .bl-row:nth-child(3) .bl-bar { animation-delay: .12s; }
.barlist .bl-row:nth-child(4) .bl-bar { animation-delay: .18s; }
.barlist .bl-row:nth-child(5) .bl-bar { animation-delay: .24s; }
.barlist .bl-row:nth-child(n+6) .bl-bar { animation-delay: .3s; }
.meter span { transform-origin: left; animation: growX 1s var(--ease-out) both; }
.chart-tip:not([hidden]) { animation: fadeIn .15s ease; }

/* ---------------------------------------------------------------- loading skeleton */
.loading-row.skeleton { display: flex; flex-direction: column; gap: 12px; padding: 24px; align-items: stretch; }
.sk { height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--canvas) 0%, var(--border) 50%, var(--canvas) 100%); background-size: 960px 100%; animation: shimmer 1.3s linear infinite; }
.sk.w-40 { width: 40%; } .sk.w-60 { width: 60%; } .sk.w-80 { width: 80%; } .sk.w-100 { width: 100%; } .sk.tall { height: 46px; border-radius: 12px; }

/* ---------------------------------------------------------------- modal, dropdowns, toast */
.modal-backdrop:not([hidden]) { animation: fadeIn .25s ease both; }
.modal-backdrop:not([hidden]) .modal { animation: scaleIn .4s var(--ease-out) both; }
.dropdown:not([hidden]), .gs-results:not([hidden]) { animation: scaleIn .22s var(--ease-out) both; transform-origin: top right; }
.notif { animation: slideInR .35s var(--ease-out) both; }
.notif:nth-child(2) { animation-delay: .03s; } .notif:nth-child(3) { animation-delay: .06s; } .notif:nth-child(4) { animation-delay: .09s; } .notif:nth-child(n+5) { animation-delay: .12s; }
.bell-count:not([hidden]) { animation: pop .45s var(--ease-spring); }
.notification-button.ring svg { animation: ring .9s ease; transform-origin: 50% 10%; }
.toast { transition: transform .45s var(--ease-spring), opacity .3s ease; overflow: hidden; }
.toast.show::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255,255,255,.55); transform-origin: left; animation: toastBar 3.2s linear forwards; }
.field-error { animation: fadeUp .25s var(--ease-out); }
.invalid { animation: shake .4s ease; }
.notice { animation: fadeUp .4s var(--ease-out) both; }

/* ---------------------------------------------------------------- boards, calendar, timeline */
.board-col { animation: fadeUp .45s var(--ease-out) both; }
.board > :nth-child(2) { animation-delay: .05s; } .board > :nth-child(3) { animation-delay: .1s; } .board > :nth-child(4) { animation-delay: .15s; } .board > :nth-child(5) { animation-delay: .2s; } .board > :nth-child(6) { animation-delay: .25s; }
.board-card { animation: scaleIn .4s var(--ease-out) both; }
.board-card:hover { transform: translateY(-3px); }
.board-card.dragging { transform: rotate(2deg) scale(1.03); }
.board-col.drop-ok { transform: scale(1.01); }
.cal-day { transition: background-color var(--dur-1); }
.cal-day:hover { background: var(--blue-soft); }
.cal-ev { transition: transform var(--dur-2) var(--ease-out), filter var(--dur-1); }
.cal-ev:hover { transform: translateX(2px); }
.cal-day.today .cal-num { animation: pop .6s var(--ease-spring) .2s both; }
.timeline li, .activity li, .comment, .files li { animation: fadeUp .4s var(--ease-out) both; }
.timeline li:nth-child(2), .activity li:nth-child(2) { animation-delay: .05s; }
.timeline li:nth-child(3), .activity li:nth-child(3) { animation-delay: .1s; }
.timeline li:nth-child(n+4), .activity li:nth-child(n+4) { animation-delay: .15s; }

/* ---------------------------------------------------------------- respect the user's motion setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body:has(.portal-home)::before, body:has(.portal-home)::after, .login-screen::before, .login-screen::after { display: none; }
}

/* =====================================================================
   3D layer: perspective page entrances, tilt + glare cards, 3D cube,
   particle field, 3D buttons, confetti. (added after the base motion layer)
   ===================================================================== */
@keyframes flipIn3d   { from { opacity: 0; transform: perspective(1200px) rotateX(-12deg) translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes cardIn3d   { from { opacity: 0; transform: perspective(900px) rotateX(-18deg) rotateY(6deg) translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes modalIn3d  { from { opacity: 0; transform: perspective(1400px) rotateX(14deg) translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes spinY      { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes cubeSpin   { 0% { transform: rotateX(-22deg) rotateY(0deg); } 100% { transform: rotateX(-22deg) rotateY(360deg); } }
@keyframes cubeFloat  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes logoFlip   { 0% { transform: perspective(400px) rotateY(-180deg) scale(.6); opacity: 0; } 70% { transform: perspective(400px) rotateY(20deg) scale(1.05); opacity: 1; } 100% { transform: perspective(400px) rotateY(0) scale(1); } }
@keyframes borderSpin { to { --angle: 360deg; } }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* ---------- entrances become 3D */
.page { animation: flipIn3d .6s var(--ease-out) both; transform-origin: 50% 0; }
.stat-grid > *, .portal-cards .portal-card, .agenda-grid > *, .chart-grid > *, .board-col { animation-name: cardIn3d; transform-origin: 50% 100%; }
.modal-backdrop:not([hidden]) .modal { animation: modalIn3d .5s var(--ease-out) both; transform-origin: 50% 0; }
.login-card { animation: modalIn3d .8s var(--ease-out) both; }
.login-card .brand-mark, .sidebar .brand-mark, .portal-home .brand-mark { animation: logoFlip 1s var(--ease-out) .15s both; }

/* ---------- tilt + glare (driven by animations.js through CSS variables) */
.tilt { transform-style: preserve-3d; will-change: transform;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); }
.tilt.tilting { transition: transform .08s linear, box-shadow .2s ease; }
.tilt.tilt-out { transition: transform .6s var(--ease-spring), box-shadow .4s ease; }
.tilt.tilting { box-shadow: calc(var(--ry, 0deg) / 1deg * -1.2px) calc(var(--rx, 0deg) / 1deg * 1.2px + 18px) 40px rgba(29, 44, 88, .18); }
.tilt > .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%); mix-blend-mode: soft-light; }
.tilt.tilting > .glare { opacity: 1; }
body.dark .tilt > .glare { background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(160, 180, 255, .35), rgba(255, 255, 255, 0) 55%); mix-blend-mode: screen; }
.tilt .portal-icon, .tilt .stat-icon, .tilt h2, .tilt strong { transform: translateZ(28px); }
.stat-card, .portal-card, .login-card, .board-card { position: relative; }
.portal-card:hover, .stat-card:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); }

/* animated conic border on hover */
.portal-card::before, .stat-card.tilt::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: conic-gradient(from var(--angle), #5574d8, #2a9d8f, #b6a2ff, #f0a14a, #5574d8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: borderSpin 4s linear infinite; }
.portal-card:hover::before, .stat-card.tilt:hover::before { opacity: 1; }

/* 3D icon spin */
.stat-card:hover .stat-icon svg, .portal-card:hover .portal-icon svg { animation: spinY .9s var(--ease-out); }
.stat-icon, .portal-icon { transform-style: preserve-3d; }

/* ---------- 3D buttons */
.button.primary, .button.success, .button.danger, .create-task-btn {
  box-shadow: 0 4px 0 rgba(0, 0, 0, .22), 0 8px 18px rgba(29, 44, 88, .18);
  transform: translateY(0); }
.button.primary:not(:disabled):hover, .button.success:not(:disabled):hover, .button.danger:not(:disabled):hover, .create-task-btn:hover {
  transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 0, 0, .22), 0 14px 26px rgba(29, 44, 88, .24); }
.button.primary:not(:disabled):active, .button.success:not(:disabled):active, .button.danger:not(:disabled):active, .create-task-btn:active {
  transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .22), 0 4px 10px rgba(29, 44, 88, .16); transition-duration: .06s; }

/* ---------- 3D cube (start page hero) */
.hero3d { position: absolute; top: 56px; right: 40px; width: 130px; height: 130px; perspective: 700px; animation: cubeFloat 6s ease-in-out infinite; z-index: 1; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: cubeSpin 16s linear infinite; }
.hero3d:hover .cube { animation-duration: 4s; }
.cube .face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 22px; color: #fff; backface-visibility: visible;
  background: linear-gradient(135deg, rgba(29, 44, 88, .92), rgba(85, 116, 216, .85)); border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, .15); }
.cube .face svg { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cube .f1 { transform: translateZ(65px); }
.cube .f2 { transform: rotateY(90deg) translateZ(65px); background: linear-gradient(135deg, rgba(15, 100, 102, .92), rgba(42, 157, 143, .85)); }
.cube .f3 { transform: rotateY(180deg) translateZ(65px); background: linear-gradient(135deg, rgba(79, 58, 140, .92), rgba(146, 120, 230, .85)); }
.cube .f4 { transform: rotateY(-90deg) translateZ(65px); background: linear-gradient(135deg, rgba(190, 122, 39, .92), rgba(240, 161, 74, .85)); }
.cube .f5 { transform: rotateX(90deg) translateZ(65px); }
.cube .f6 { transform: rotateX(-90deg) translateZ(65px); background: linear-gradient(135deg, rgba(39, 141, 104, .92), rgba(41, 167, 120, .85)); }
.hero3d::after { content: ""; position: absolute; left: 15%; right: 15%; bottom: -46px; height: 18px; border-radius: 50%; background: radial-gradient(rgba(29, 44, 88, .25), transparent 70%); filter: blur(4px); animation: cubeFloat 6s ease-in-out infinite reverse; }
@media (max-width: 900px) { .hero3d { width: 90px; height: 90px; top: 20px; right: 16px; } .cube .f1, .cube .f2, .cube .f3, .cube .f4, .cube .f5, .cube .f6 { border-radius: 14px; }
  .cube .f1 { transform: translateZ(45px); } .cube .f2 { transform: rotateY(90deg) translateZ(45px); } .cube .f3 { transform: rotateY(180deg) translateZ(45px); }
  .cube .f4 { transform: rotateY(-90deg) translateZ(45px); } .cube .f5 { transform: rotateX(90deg) translateZ(45px); } .cube .f6 { transform: rotateX(-90deg) translateZ(45px); }
  .cube .face svg { width: 34px; height: 34px; } }

/* ---------- particle field + parallax layers */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.login-screen::before, .login-screen::after, body:has(.portal-home)::before, body:has(.portal-home)::after { translate: var(--px, 0) var(--py, 0); transition: translate .6s var(--ease-out); }
.login-screen::after, body:has(.portal-home)::after { translate: calc(var(--px, 0px) * -1.6) calc(var(--py, 0px) * -1.6); }

/* ---------- board cards lift in 3D while dragging */
.board-card.dragging { transform: perspective(700px) rotateX(10deg) rotateZ(2deg) scale(1.04); box-shadow: 0 24px 40px rgba(29, 44, 88, .25); }

/* ---------- confetti */
.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 600; }

@media (prefers-reduced-motion: reduce) {
  .tilt { transform: none !important; } .fx-canvas, .confetti-canvas, .hero3d { display: none !important; }
}
@media (pointer: coarse) { .tilt { transform: none; } }
.login-card > .glare { animation: none; }

/* =====================================================================
   Animated task-status illustrations (assets/status/*.png)
   New = badge pops, In Progress = sign bobs, On Hold = hand waves,
   Complete (awaiting review) = hourglass flips, Work Completed = worker + check.
   ===================================================================== */
.st-img { position: relative; display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px;
  background: #fff; box-shadow: 0 4px 12px rgba(29, 44, 88, .12); overflow: visible; vertical-align: middle; }
.st-img img { width: 86%; height: 86%; object-fit: contain; display: block; pointer-events: none; user-select: none; }
.st-img.st-worker img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.st-img.xs { width: 18px; height: 18px; border-radius: 50%; margin: 0 5px 0 -4px; box-shadow: none; background: rgba(255, 255, 255, .85); }
.st-img.sm { width: 26px; height: 26px; border-radius: 8px; }
.st-img.md { width: 40px; height: 40px; border-radius: 12px; }
.st-img.lg { width: 92px; height: 92px; border-radius: 24px; }
.st-check { position: absolute; right: -4px; bottom: -4px; width: 40%; height: 40%; min-width: 9px; min-height: 9px; border-radius: 50%; background: #29a778; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(41, 167, 120, .4); }
.st-check::after { content: ""; position: absolute; left: 30%; top: 18%; width: 28%; height: 48%; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.st-img.xs .st-check { border-width: 1px; right: -3px; bottom: -3px; }
.st-img.xs .st-check::after { border-width: 0 1px 1px 0; }
.stat-icon:has(.st-img) { background: none !important; width: auto; height: auto; }
.stat-card .st-img { width: 54px; height: 54px; }
.board-col header .st-img { margin-right: 2px; }
body.dark .st-img { background: #eef1f8; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }

@keyframes stPop    { 0%, 100% { transform: scale(1) rotate(0); } 8% { transform: scale(1.18) rotate(-6deg); } 16% { transform: scale(.96) rotate(4deg); } 24% { transform: scale(1.04) rotate(0); } }
@keyframes stBob    { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-3px) rotate(-3deg); } 75% { transform: translateY(1px) rotate(3deg); } }
@keyframes stWave   { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(10deg); } }
@keyframes stFlip   { 0%, 40% { transform: rotate(0); } 50%, 90% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes stFloat  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes stCheck  { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.35); } 90% { transform: scale(.9); } }
@keyframes stGlow   { 0%, 100% { box-shadow: 0 4px 12px rgba(29, 44, 88, .12), 0 0 0 0 rgba(85, 116, 216, .35); } 50% { box-shadow: 0 4px 12px rgba(29, 44, 88, .12), 0 0 0 7px rgba(85, 116, 216, 0); } }
@keyframes runBounce { 0%, 100% { transform: translate(-50%, 0) rotate(0); } 50% { transform: translate(-50%, -5px) rotate(-3deg); } }
@keyframes stripes  { to { background-position: 28px 0; } }
@keyframes fillGrow { from { transform: scaleX(0); } }

.st-new img      { animation: stPop 3.2s var(--ease-out, ease-out) infinite; }
.st-new          { animation: stGlow 2.4s ease-in-out infinite; }
.st-progress img { animation: stBob 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.st-hold img     { animation: stWave 2.6s ease-in-out infinite; transform-origin: 50% 85%; }
.st-review img   { animation: stFlip 4s cubic-bezier(.65, 0, .35, 1) infinite; }
.st-worker       { animation: stFloat 3.4s ease-in-out infinite; }
.st-worker .st-check { animation: stCheck 2.8s ease-in-out infinite; }
/* small badge icons stay calm inside long tables: animate on row hover only */
.status .st-img.xs, .status .st-img.xs img { animation-play-state: paused; }
tr:hover .status .st-img.xs, tr:hover .status .st-img.xs img, .detail-status .st-img.xs, .detail-status .st-img.xs img { animation-play-state: running; }
.stat-card:hover .st-img img, .wip-chip:hover .st-img img { animation-duration: .9s; }

/* task detail header */
.detail-hero { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin-bottom: 14px; border-radius: 16px; border: 1px solid var(--border);
  background: linear-gradient(120deg, var(--hero-a, #edf2ff), var(--hero-b, #fff)); animation: cardIn3d .7s var(--ease-out, ease-out) both; }
.detail-hero h3 { margin: 2px 0 3px; font-size: 20px; }
.detail-hero .eyebrow { margin: 0; }
.st-tone-progress { --hero-a: #fff4de; } .st-tone-hold { --hero-a: #f1f1f5; } .st-tone-review { --hero-a: #eef0ff; } .st-tone-worker { --hero-a: #e8f7f0; }
body.dark .detail-hero { --hero-b: var(--white); --hero-a: rgba(85, 116, 216, .18); }
body.dark .detail-hero.st-tone-progress { --hero-a: rgba(240, 161, 74, .18); } body.dark .detail-hero.st-tone-worker { --hero-a: rgba(41, 167, 120, .18); }

/* tasks page banner */
.wip-banner { display: grid; gap: 14px; margin-bottom: 16px; padding: 16px; border-radius: 16px; background: var(--white, #fff); border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(29, 44, 88, .06); animation: flipIn3d .6s var(--ease-out, ease-out) both; }
body.dark .wip-banner { background: var(--white); }
.wip-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.wip-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: inherit; text-decoration: none;
  background: var(--hero-a, #edf2ff); transition: transform .25s var(--ease-spring, ease), box-shadow .25s ease; }
body.dark .wip-chip { background: rgba(255, 255, 255, .05); }
.wip-chip:hover { transform: translateY(-3px) perspective(500px) rotateX(6deg); box-shadow: 0 10px 22px rgba(29, 44, 88, .14); }
.wip-chip strong { display: block; font-size: 20px; line-height: 1.1; }
.wip-chip small { color: var(--muted); font-size: 12px; }
.wip-chips > .wip-chip { animation: cardIn3d .6s var(--ease-out, ease-out) both; }
.wip-chips > .wip-chip:nth-child(2) { animation-delay: .06s; } .wip-chips > .wip-chip:nth-child(3) { animation-delay: .12s; }
.wip-chips > .wip-chip:nth-child(4) { animation-delay: .18s; } .wip-chips > .wip-chip:nth-child(5) { animation-delay: .24s; }
.wip-labels { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.wip-labels strong { color: var(--text); font-size: 13px; }
.wip-bar { position: relative; height: 16px; border-radius: 6px; border: 2px solid #2b2b2b; background: #fff8d6; margin-top: 42px; }
body.dark .wip-bar { border-color: #c9cede; background: #2a2f40; }
.wip-fill { position: absolute; inset: 1px auto 1px 1px; max-width: calc(100% - 2px); border-radius: 3px; transform-origin: left; animation: fillGrow 1.4s var(--ease-out, ease-out) both, stripes .8s linear infinite;
  background: repeating-linear-gradient(90deg, #e9573f 0 10px, transparent 10px 14px); background-size: 28px 100%; transition: width 1.2s var(--ease-out, ease-out); }
.wip-runner { position: absolute; bottom: 12px; width: 40px; height: auto; transform: translateX(-50%); transition: left 1.4s var(--ease-out, ease-out);
  animation: runBounce .45s ease-in-out infinite; pointer-events: none; }
body.dark .wip-runner { filter: invert(1); }
.empty-art { margin: 0 auto 4px; }
@media (max-width: 900px) { .wip-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .wip-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-img.lg { width: 64px; height: 64px; } }

@media (prefers-reduced-motion: reduce) {
  .st-img, .st-img img, .st-check, .wip-runner, .wip-fill, .wip-chip, .detail-hero, .wip-banner { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Section illustrations (illustrations.js): colours + motion
   ===================================================================== */
.illo { display: block; width: 100%; height: auto; overflow: visible; }
.illo * { transform-box: fill-box; transform-origin: center; }
.illo :is(.k-l, .k-n, .k-w, .k-g, .k-r, .k-b, .k-o, .k-p) { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.illo .k-l { stroke: #dfe4f0; stroke-width: 1.5; } .illo .k-n { stroke: #1d2c58; stroke-width: 4; } .illo .k-w { stroke: #fff; stroke-width: 3.2; }
.illo .k-g { stroke: #29a778; stroke-width: 3; } .illo .k-r { stroke: #e56c67; stroke-width: 3; } .illo .k-b { stroke: #5574d8; stroke-width: 4; }
.illo .k-o { stroke: #f0a14a; stroke-width: 3.5; } .illo .k-p { stroke: #9278e6; stroke-width: 3; }
.illo .c-s { fill: #e9eefc; } .illo .c-s2 { fill: #fdeeee; } .illo .c-s3 { fill: #fff3dd; } .illo .c-s4 { fill: #efeafd; } .illo .c-sh { fill: rgba(29, 44, 88, .12); }
.illo .c-w { fill: #fff; } .illo .c-l { fill: #dfe4f0; } .illo .c-n { fill: #1d2c58; } .illo .c-b { fill: #5574d8; } .illo .c-t { fill: #2a9d8f; } .illo .c-t2 { fill: #1f7a70; }
.illo .c-o { fill: #f0a14a; } .illo .c-o2 { fill: #d98a35; } .illo .c-r { fill: #e56c67; } .illo .c-p { fill: #9278e6; } .illo .c-g { fill: #29a778; }
.illo .c-sk { fill: #f6c9a8; } .illo .c-br { fill: #8a5a44; } .illo .c-glass { fill: rgba(255, 255, 255, .55); }
body.dark .illo .c-s { fill: rgba(85, 116, 216, .16); } body.dark .illo .c-s2 { fill: rgba(229, 108, 103, .14); } body.dark .illo .c-s3 { fill: rgba(240, 161, 74, .14); }
body.dark .illo .c-s4 { fill: rgba(146, 120, 230, .16); } body.dark .illo .c-sh { fill: rgba(0, 0, 0, .35); }
body.dark .illo .c-w { fill: #2a3147; } body.dark .illo .c-l, body.dark .illo .k-l { fill: #3d4560; stroke: #3d4560; } body.dark .illo .k-l { fill: none; }
body.dark .illo .c-n { fill: #aab6dd; } body.dark .illo .k-n { stroke: #aab6dd; } body.dark .illo .c-glass { fill: rgba(255, 255, 255, .12); }

@keyframes iFloat   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes iBob     { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes iShadow  { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.88); opacity: .7; } }
@keyframes iGrow    { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@keyframes iSpin    { to { transform: rotate(360deg); } }
@keyframes iDraw    { 0% { stroke-dashoffset: 1; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes iTwinkle { 0%, 100% { transform: scale(.2) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes iBlink   { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes iPulse   { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); } }
@keyframes iPop     { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.08); } }
@keyframes iSway    { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes iType    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }
@keyframes iScreen  { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@keyframes iSteam   { 0% { transform: translateY(3px); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(-5px); opacity: 0; } }
@keyframes iRing    { 0% { transform: scale(.85); opacity: .6; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes iDrop    { 0% { transform: translateY(-12px); opacity: 0; } 20% { opacity: 1; } 75% { transform: translateY(34px); opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
@keyframes iSquash  { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.04, .95); } }
@keyframes iShout   { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(3deg) scale(1.03); } }
@keyframes iWaveOut { 0% { opacity: 0; transform: translateX(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateX(5px); } }
@keyframes iConfetti { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(180deg); } }
@keyframes iSearch  { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-10px, -8px); } 66% { transform: translate(-4px, 6px); } }
@keyframes iSlide   { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@keyframes iToggle  { 0%, 40% { transform: translateX(0); } 50%, 90% { transform: translateX(22px); } 100% { transform: translateX(0); } }
@keyframes iFall    { 0% { transform: translateY(0) scale(1); opacity: 0; } 15% { opacity: 1; } 80% { transform: translateY(40px) scale(.6); opacity: 1; } 100% { transform: translateY(48px) scale(.3); opacity: 0; } }
@keyframes iHeart   { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 28% { transform: scale(1.05); } }
@keyframes iBell    { 0%, 55%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(12deg); } 20%, 40% { transform: rotate(-12deg); } }
@keyframes iRise    { 0%, 100% { transform: translateY(4px); } 50% { transform: translateY(-5px); } }
@keyframes iWiggle  { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }
@keyframes iUnlock  { 0%, 35%, 100% { transform: translateY(0); } 50%, 85% { transform: translateY(-7px); } }
@keyframes iDash    { 0%, 100% { transform: translateX(-4px); opacity: .5; } 50% { transform: translateX(4px); opacity: 1; } }
@keyframes iLid     { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-10deg); } }

.illo .i-float { animation: iFloat 3.4s ease-in-out infinite; }
.illo .i-bob { animation: iBob 2.4s ease-in-out infinite; }
.illo .i-shadow { animation: iShadow 3.4s ease-in-out infinite; }
.illo .i-grow { animation: iGrow 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.illo .i-spin { animation: iSpin 9s linear infinite; } .illo .i-spin-r { animation: iSpin 6s linear infinite reverse; } .illo .i-spin-slow { animation: iSpin 14s linear infinite; }
.illo .i-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: iDraw 3.6s ease-in-out infinite; }
.illo .i-twinkle { animation: iTwinkle 2.6s ease-in-out infinite; }
.illo .i-blink { animation: iBlink 1.2s ease-in-out infinite; }
.illo .i-pulse { animation: iPulse 1.8s ease-in-out infinite; }
.illo .i-pop { animation: iPop 2.6s ease-in-out infinite; }
.illo .i-wave-body { animation: iSway 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
.illo .i-type { animation: iType .45s ease-in-out infinite; }
.illo .i-screen { animation: iScreen 1.4s ease-in-out infinite; }
.illo .i-steam { animation: iSteam 2.2s ease-out infinite; }
.illo .i-ring { animation: iRing 2.4s ease-out infinite; }
.illo .i-drop { animation: iDrop 2.4s ease-in infinite; }
.illo .i-squash { animation: iSquash 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.illo .i-shout { animation: iShout 1.6s ease-in-out infinite; transform-origin: 0% 60%; }
.illo .i-wave1 { animation: iWaveOut 1.6s ease-out infinite; }
.illo .i-confetti { animation: iConfetti 2.8s ease-in-out infinite; }
.illo .i-search { animation: iSearch 4s ease-in-out infinite; } .illo .i-search-big { animation: iSearch 3.6s ease-in-out infinite; }
.illo .i-slide { animation: iSlide 3s ease-in-out infinite; }
.illo .i-hand { animation: iSpin 4s linear infinite; transform-origin: 50% 100%; } .illo .i-hand-slow { animation: iSpin 30s linear infinite; transform-origin: 0% 50%; }
.illo .i-toggle { animation: iToggle 4s var(--ease-spring, ease-in-out) infinite; }
.illo .i-fall { animation: iFall 2.4s ease-in infinite; }
.illo .i-heart { animation: iHeart 1.6s ease-in-out infinite; }
.illo .i-bell { animation: iBell 2.4s ease-in-out infinite; transform-origin: 50% 0%; }
.illo .i-rise { animation: iRise 3s ease-in-out infinite; }
.illo .i-wiggle { animation: iWiggle 1.4s ease-in-out infinite; }
.illo .i-unlock { animation: iUnlock 3s ease-in-out infinite; transform-origin: 50% 100%; }
.illo .i-dash { animation: iDash 1.4s ease-in-out infinite; }
.illo .i-lid { animation: iLid 2.6s ease-in-out infinite; transform-origin: 0% 0%; } .illo .i-lid-r { animation: iLid 2.6s ease-in-out infinite reverse; transform-origin: 100% 0%; }
.illo .d1 { animation-delay: .3s; } .illo .d2 { animation-delay: .6s; } .illo .d3 { animation-delay: .9s; }

/* page hero (one per section) */
.page-hero { position: relative; display: flex; align-items: center; gap: 20px; padding: 14px 22px; margin-bottom: 18px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(115deg, var(--hero-1, #eef2ff), var(--white) 70%); border: 1px solid var(--border); animation: flipIn3d .6s var(--ease-out, ease-out) both; }
.page-hero .illo { width: 132px; flex: none; }
.page-hero h2 { margin: 0 0 4px; font-size: 20px; }
.page-hero p { margin: 0; color: var(--muted); max-width: 70ch; }
.page-hero .hero-meta { margin-left: auto; text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; align-self: flex-start; }
.page-hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--hero-1, #eef2ff); opacity: .6; pointer-events: none; animation: iFloat 6s ease-in-out infinite; }
.page-hero > * { position: relative; z-index: 1; }
.page-hero.h-agents, .page-hero.h-customers, .page-hero.h-profile, .page-hero.h-announcements { --hero-1: #fdeeee; }
.page-hero.h-operators, .page-hero.h-payments, .page-hero.h-leads, .page-hero.h-notifications { --hero-1: #fff3dd; }
.page-hero.h-admins, .page-hero.h-activity { --hero-1: #efeafd; }
body.dark .page-hero { --hero-1: rgba(85, 116, 216, .14); }
body.dark .page-hero.h-agents, body.dark .page-hero.h-customers, body.dark .page-hero.h-profile, body.dark .page-hero.h-announcements { --hero-1: rgba(229, 108, 103, .12); }
body.dark .page-hero.h-operators, body.dark .page-hero.h-payments, body.dark .page-hero.h-leads { --hero-1: rgba(240, 161, 74, .12); }
body.dark .page-hero.h-admins, body.dark .page-hero.h-activity { --hero-1: rgba(146, 120, 230, .14); }
@media (max-width: 700px) { .page-hero { padding: 12px 14px; gap: 12px; } .page-hero .illo { width: 84px; } .page-hero h2 { font-size: 17px; } .page-hero .hero-meta { display: none; } }

/* illustrations in empty states, modals, notifications, search and login */
.empty-state .illo { width: 150px; margin: 0 auto 4px; }
.modal-illo { width: 64px; flex: none; margin-right: 12px; }
.modal-illo:empty { display: none; }
.modal-header { align-items: center; }
.modal-header > .modal-illo + div { flex: 1; }
.notif-empty .illo, .gs-empty .illo { width: 96px; margin: 4px auto 6px; }
.notif-empty, .gs-empty { text-align: center; }
.login-illo { width: 120px; margin: -6px auto 2px; }
.login-illo:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .illo *, .page-hero, .page-hero::after { animation: none !important; }
  .illo .i-draw { stroke-dashoffset: 0; }
}
.board-empty .illo { width: 72px; margin: 0 auto 2px; opacity: .9; }

/* =====================================================================
   Live background behind the app ("video" layer). Transform/opacity only,
   so it runs on the GPU compositor. Toggle: sidebar "Live background".
   ===================================================================== */
.app-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: strict;
  --bg1: rgba(85, 116, 216, .42); --bg2: rgba(42, 157, 143, .32); --bg3: rgba(146, 120, 230, .36); --bg4: rgba(240, 161, 74, .26); --shape: #5574d8; }
.portal-admin .app-bg    { --bg1: rgba(19, 138, 140, .40); --bg2: rgba(41, 167, 120, .30); --bg3: rgba(85, 116, 216, .28); --bg4: rgba(240, 200, 74, .18); --shape: #138a8c; }
.portal-operator .app-bg { --bg1: rgba(106, 82, 196, .40); --bg2: rgba(229, 108, 167, .30); --bg3: rgba(85, 116, 216, .28); --bg4: rgba(240, 161, 74, .22); --shape: #6a52c4; }
body.dark .app-bg { --bg1: rgba(85, 116, 216, .26); --bg2: rgba(42, 157, 143, .18); --bg3: rgba(146, 120, 230, .22); --bg4: rgba(240, 161, 74, .12); }
.app-bg > * { position: absolute; will-change: transform; }
.app-bg .aurora { width: 50vmax; height: 50vmax; border-radius: 50%; }
.app-bg .a1 { background: radial-gradient(circle, var(--bg1), transparent 62%); left: -14vmax; top: -18vmax; animation: auroraA 26s ease-in-out infinite; }
.app-bg .a2 { background: radial-gradient(circle, var(--bg2), transparent 62%); right: -18vmax; top: 10vh; animation: auroraB 32s ease-in-out infinite; }
.app-bg .a3 { background: radial-gradient(circle, var(--bg3), transparent 62%); left: 22vw; bottom: -30vmax; animation: auroraC 36s ease-in-out infinite; }
@keyframes auroraA { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(18vw, 12vh) scale(1.15); } 66% { transform: translate(6vw, 30vh) scale(.9); } }
@keyframes auroraB { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-22vw, 18vh) scale(1.2); } }
@keyframes auroraC { 0%, 100% { transform: translate(0, 0) scale(1.05); } 50% { transform: translate(14vw, -20vh) scale(.85); } }

/* sliding dot grid */
.app-bg .grid { inset: 0; opacity: .55; will-change: auto;
  background-image: radial-gradient(circle, rgba(29, 44, 88, .13) 1.2px, transparent 1.6px); background-size: 32px 32px; }
body.dark .app-bg .grid { background-image: radial-gradient(circle, rgba(200, 210, 255, .08) 1.2px, transparent 1.6px); }
@keyframes gridSlide { to { transform: translate(32px, 32px); } }

/* floating shapes */
.app-bg .shape { bottom: -80px; color: var(--shape); opacity: 0; animation: shapeRise var(--d, 24s) linear infinite; animation-delay: var(--delay, 0s); }
.app-bg .shape svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: shapeSpin var(--sd, 16s) linear infinite; }
.app-bg .shape.fill svg { fill: currentColor; stroke: none; }
@keyframes shapeRise { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: calc(var(--o, .22) * 1.6); } 50% { transform: translate(var(--dx, 30px), -60vh); } 92% { opacity: calc(var(--o, .22) * 1.6); } 100% { transform: translate(0, -120vh); opacity: 0; } }
@keyframes shapeSpin { to { transform: rotate(360deg); } }

/* light sweep, like a lens flare passing */
.app-bg .sweep { top: -50%; left: -60%; width: 40%; height: 200%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: sweep 14s ease-in-out infinite; }
body.dark .app-bg .sweep { background: linear-gradient(90deg, transparent, rgba(160, 180, 255, .07), transparent); }
@keyframes sweep { 0%, 80% { transform: translateX(0) rotate(18deg); } 100% { transform: translateX(420%) rotate(18deg); } }
/* slow machines (measured in animations.js): keep the look, drop the heavy moving layers */
body.bg-lite .app-bg .aurora, body.bg-lite .app-bg .waves { animation: none; }
body.bg-lite .app-bg .sweep, body.bg-lite .app-bg .waves.w2, body.bg-lite .app-bg .shape:nth-child(n+12) { display: none; }

/* waves along the bottom */
.app-bg .waves { left: 0; bottom: 0; width: 200%; height: 140px; display: flex; animation: waveMove 22s linear infinite; }
.app-bg .waves.w2 { height: 110px; animation-duration: 15s; animation-direction: reverse; opacity: .8; }
.app-bg .waves svg { width: 50%; height: 100%; flex: none; }
.app-bg .waves path { fill: var(--bg1); }
.app-bg .waves.w2 path { fill: var(--bg2); }
@keyframes waveMove { to { transform: translateX(-50%); } }

/* content sits on top of the layer; surfaces become slightly see-through */
.main { position: relative; z-index: 1; }
body:not(.bg-off) .topbar { background: var(--white); }
body.dark:not(.bg-off) .topbar { background: var(--white); }
body:not(.dark):not(.bg-off) .panel, body:not(.dark):not(.bg-off) .stat-card, body:not(.dark):not(.bg-off) .wip-banner { background-color: rgba(255, 255, 255, .84); }
body.dark:not(.bg-off) .panel, body.dark:not(.bg-off) .stat-card, body.dark:not(.bg-off) .wip-banner { background-color: rgba(29, 34, 51, .86); }
body:not(.bg-off) .page-hero { background: linear-gradient(115deg, var(--hero-1, #eef2ff), rgba(255, 255, 255, .72) 75%); }
body.dark:not(.bg-off) .page-hero { background: linear-gradient(115deg, var(--hero-1), rgba(29, 34, 51, .78) 75%); }
body.bg-off .app-bg { display: none; }
#appView[hidden] ~ .app-bg, .app-bg[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .app-bg * { animation: none !important; } .app-bg .shape, .app-bg .sweep { display: none; } }
@media (max-width: 760px) { .app-bg .shape:nth-child(n+14), .app-bg .sweep { display: none; } }

/* =====================================================================
   Sidebar menu effects: gliding active pill, mouse spotlight, hover shine,
   icon wiggle, cascading entrance, live count badges, glowing edge.
   ===================================================================== */
.sidebar { overflow: hidden; }
.sidebar > * { position: relative; z-index: 1; }
/* spotlight that follows the mouse */
.sidebar::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(220px circle at var(--sx, 50%) var(--sy, 50%), rgba(85, 116, 216, .10), transparent 70%); }
.sidebar.lit::before { opacity: 1; }
body.dark .sidebar::before { background: radial-gradient(220px circle at var(--sx, 50%) var(--sy, 50%), rgba(140, 165, 255, .10), transparent 70%); }
/* glowing light travelling down the right edge */
.sidebar::after { content: ""; position: absolute; top: 0; right: -1px; width: 2px; height: 160px; z-index: 2; pointer-events: none;
  background: linear-gradient(transparent, #5574d8, #2a9d8f, transparent); opacity: .7; animation: edgeRun 7s ease-in-out infinite; }
.portal-admin .sidebar::after { background: linear-gradient(transparent, #138a8c, #29a778, transparent); }
.portal-operator .sidebar::after { background: linear-gradient(transparent, #6a52c4, #e56ca7, transparent); }
@keyframes edgeRun { 0% { transform: translateY(-170px); } 60%, 100% { transform: translateY(100vh); } }

/* gliding pill behind the active item */
.nav { position: relative; }
.nav-pill { position: absolute; left: 0; top: 0; height: 40px; width: 100%; border-radius: 9px; pointer-events: none; z-index: 0; opacity: 0;
  background: linear-gradient(110deg, var(--navy) 0%, var(--navy) 40%, color-mix(in srgb, var(--navy) 70%, #fff) 50%, var(--navy) 60%, var(--navy) 100%);
  background-size: 250% 100%; box-shadow: 0 8px 20px color-mix(in srgb, var(--navy) 35%, transparent);
  transition: transform .45s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)), width .35s var(--ease-out), height .35s var(--ease-out), opacity .25s ease;
  animation: pillShine 5s ease-in-out infinite; }
.nav-pill.on { opacity: 1; }
@keyframes pillShine { 0%, 60% { background-position: 120% 0; } 100% { background-position: -30% 0; } }
.nav.has-pill .nav-item { position: relative; z-index: 1; background: transparent; }
.nav.has-pill .nav-item.active { background: transparent; box-shadow: none; animation: none; }
.nav.has-pill .nav-item:not(.active):hover { background: color-mix(in srgb, var(--navy) 7%, transparent); }
.nav-item.active svg { animation: iconPop .5s var(--ease-spring, ease) both; }
@keyframes iconPop { 0% { transform: scale(.6) rotate(-20deg); } 100% { transform: scale(1) rotate(0); } }

/* hover: shine sweep + icon wiggle */
.nav-item::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 50%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); opacity: 0; }
body.dark .nav-item::before { background: linear-gradient(100deg, transparent, rgba(160, 180, 255, .16), transparent); }
.nav-item:hover::before { animation: navShine .7s ease; }
@keyframes navShine { 0% { left: -60%; opacity: 1; } 100% { left: 120%; opacity: 1; } }
.nav-item:not(.nav-group-toggle):hover svg { animation: iconWiggle .55s var(--ease-out) both; }
@keyframes iconWiggle { 0% { transform: rotate(0) scale(1); } 30% { transform: rotate(-14deg) scale(1.18); } 60% { transform: rotate(10deg) scale(1.12); } 100% { transform: rotate(0) scale(1.1); } }
.nav-item span { transition: transform .3s var(--ease-out), letter-spacing .3s var(--ease-out); }
.nav-item:not(.active):hover span { transform: translateX(2px); }
.nav-group-toggle:hover .nav-caret { transform: translateX(2px); }
.nav-section.open .nav-group-toggle:hover .nav-caret { transform: rotate(90deg) translateY(-2px); }
.nav-caret { transition: transform .4s var(--ease-spring, ease) !important; }

/* submenu: guide line draws down, children cascade from the left in 3D */
.nav-section.open .nav-sub { border-left-color: transparent; position: relative; }
.nav-section.open .nav-sub::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; border-radius: 2px; transform-origin: top;
  background: linear-gradient(var(--navy), color-mix(in srgb, var(--navy) 15%, transparent)); animation: lineDraw .45s var(--ease-out) both; }
@keyframes lineDraw { from { transform: scaleY(0); } }
.nav-section.open .nav-sub .nav-item { animation: subIn .4s var(--ease-out) both; }
@keyframes subIn { from { opacity: 0; transform: perspective(400px) rotateY(-35deg) translateX(-10px); } }

/* entrance: menu cascades in after sign-in */
#appView:not([hidden]) .nav > .nav-item, #appView:not([hidden]) .nav > .nav-section { animation: navCascade .55s var(--ease-out) both; }
#appView:not([hidden]) .nav > :nth-child(2) { animation-delay: .04s; } #appView:not([hidden]) .nav > :nth-child(3) { animation-delay: .08s; }
#appView:not([hidden]) .nav > :nth-child(4) { animation-delay: .12s; } #appView:not([hidden]) .nav > :nth-child(5) { animation-delay: .16s; }
#appView:not([hidden]) .nav > :nth-child(6) { animation-delay: .2s; } #appView:not([hidden]) .nav > :nth-child(7) { animation-delay: .24s; }
#appView:not([hidden]) .nav > :nth-child(8) { animation-delay: .28s; } #appView:not([hidden]) .nav > :nth-child(9) { animation-delay: .32s; }
@keyframes navCascade { from { opacity: 0; transform: perspective(500px) translateX(-24px) rotateY(-25deg); } }
.sidebar-portal { animation: fadeUp .6s var(--ease-out) .1s both; }

/* Create Task button: periodic shine + spinning plus */
.create-task-btn { overflow: hidden; }
.create-task-btn::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: ctaShine 4.5s ease-in-out infinite; }
@keyframes ctaShine { 0%, 65% { left: -40%; } 100% { left: 130%; } }
.create-task-btn svg { transition: transform .5s var(--ease-spring, ease); }
.create-task-btn:hover svg { transform: rotate(180deg) scale(1.15); }

/* brand: gradient text on hover */
.sidebar .brand span { transition: color .3s; }
.sidebar .brand:hover span { background: linear-gradient(90deg, var(--navy), #5574d8, #2a9d8f, var(--navy)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradientMove 3s linear infinite; }

/* live count badge on menu items (data-badge, drawn by CSS so it never changes the item's text) */
.nav-item[data-badge]::after { content: attr(data-badge); margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; box-sizing: border-box;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: #e56c67; box-shadow: 0 0 0 0 rgba(229, 108, 103, .5);
  animation: badgeIn .5s var(--ease-spring, ease) both, badgePulse 2.4s ease-out 1s infinite; }
.nav-item.active[data-badge]::after { background: #fff; color: var(--navy); }
@keyframes badgeIn { from { transform: scale(0); } }
@keyframes badgePulse { 0% { box-shadow: 0 0 0 0 rgba(229, 108, 103, .5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(229, 108, 103, 0); } }

/* footer buttons */
.sidebar-footer .nav-item:hover svg { animation: iconSpin .8s var(--ease-out); }
@keyframes iconSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .sidebar::after, .nav-pill, .create-task-btn::after, .nav-item[data-badge]::after { animation: none !important; }
  .nav-pill { transition: none; }
  #appView:not([hidden]) .nav > *, .nav-section.open .nav-sub .nav-item, .nav-section.open .nav-sub::before, .nav-item.active svg { animation: none !important; }
}
.nav.has-pill .nav-section.has-active:not(.open) > .nav-group-toggle, .nav.has-pill .nav-section.has-active:not(.open) > .nav-group-toggle .nav-caret { color: #fff; }
.nav { overflow-x: hidden; }

/* =====================================================================
   Announcement presentation (showAnnouncements in app.js)
   ===================================================================== */
.modal-backdrop.announce { background: radial-gradient(circle at 50% 40%, rgba(85, 116, 216, .35), rgba(15, 20, 40, .72) 70%); backdrop-filter: blur(6px); animation: annBackdrop .5s ease both; perspective: 1400px; }
@keyframes annBackdrop { from { opacity: 0; backdrop-filter: blur(0); } }
.announce .modal { max-width: 620px; overflow: hidden; animation: annDoor .9s cubic-bezier(.2, 1.4, .4, 1) both !important; transform-origin: 50% 50%;
  box-shadow: 0 30px 80px rgba(10, 16, 40, .45), 0 0 0 1px rgba(255, 255, 255, .08); }
.announce .modal.ann-swap { animation: annSwapIn .6s cubic-bezier(.2, 1.2, .4, 1) both !important; }
.announce .modal.ann-leaving { animation: annLeave .38s ease-in both !important; }
@keyframes annDoor { 0% { opacity: 0; transform: rotateY(-75deg) rotateX(10deg) translateZ(-200px) scale(.8); } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes annSwapIn { from { opacity: 0; transform: translateX(120px) rotateY(-30deg) scale(.9); } }
@keyframes annLeave { to { opacity: 0; transform: translateX(-140px) rotateY(35deg) scale(.88); } }
.announce .modal-illo { display: none; }
.announce .modal-header { border-bottom: 0; height: 56px; }
.announce #modalTitle { display: none; }

.ann-stage { position: relative; overflow: hidden; padding: 6px 26px 22px; text-align: center; isolation: isolate; }
.ann-rays { position: absolute; left: 50%; top: 70px; width: 560px; height: 560px; margin: -280px 0 0 -280px; z-index: -1; opacity: .55; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(85, 116, 216, .16) 0deg 9deg, transparent 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: annRays 24s linear infinite; }
body.dark .ann-rays { background: repeating-conic-gradient(from 0deg, rgba(140, 165, 255, .14) 0deg 9deg, transparent 9deg 22deg); }
@keyframes annRays { to { transform: rotate(360deg); } }
.ann-sparks i { position: absolute; left: calc(8% + var(--i) * 9%); top: calc(20% + (var(--i) * 37 % 60) * 1%); width: 6px; height: 6px; border-radius: 50%; z-index: -1;
  background: hsl(calc(var(--i) * 36 + 200), 80%, 65%); opacity: 0; animation: annSpark 3.2s ease-in-out calc(var(--i) * .3s + .6s) infinite; }
@keyframes annSpark { 0%, 100% { opacity: 0; transform: translateY(10px) scale(.4); } 40% { opacity: .9; transform: translateY(-14px) scale(1); } 70% { opacity: 0; transform: translateY(-30px) scale(.6); } }

.ann-ribbon { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: linear-gradient(110deg, #e56c67 0%, #f0a14a 45%, #ffd27a 50%, #f0a14a 55%, #e56c67 100%); background-size: 260% 100%;
  box-shadow: 0 8px 20px rgba(229, 108, 103, .35); animation: annRibbon .7s cubic-bezier(.2, 1.4, .4, 1) .25s both, annShimmer 3s linear 1s infinite; }
@keyframes annRibbon { from { opacity: 0; transform: translateY(-16px) scale(.7); } }
@keyframes annShimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.ann-ping { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.ann-ping::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: annPing 1.4s ease-out infinite; }
@keyframes annPing { to { transform: scale(3); opacity: 0; } }
.ann-ribbon { color: #3a1a0a; }   /* dark text on the warm gradient keeps contrast */
.ann-ribbon .ann-ping, .ann-ribbon .ann-ping::after { background: #3a1a0a; }

.ann-hero { width: 170px; margin: 6px auto -4px; animation: annHero .9s cubic-bezier(.2, 1.5, .4, 1) .35s both; }
@keyframes annHero { from { opacity: 0; transform: scale(.3) rotate(-20deg); } }
.ann-title { margin: 6px 0 4px; font-family: "Manrope", sans-serif; font-size: 24px; line-height: 1.25; color: var(--text); }
.ann-word { display: inline-block; animation: annWord .7s cubic-bezier(.2, 1.2, .4, 1) calc(.55s + var(--i) * .07s) both; }
@keyframes annWord { from { opacity: 0; transform: translateY(18px) rotateX(-70deg); filter: blur(6px); } }
.ann-meta { margin: 0 0 14px; color: var(--muted); font-size: 13px; animation: fadeUp .6s var(--ease-out, ease) .9s both; }
.ann-image { position: relative; margin: 6px auto 4px; max-width: 100%; border-radius: 14px; overflow: hidden; box-shadow: 0 16px 40px rgba(29, 44, 88, .25);
  animation: annReveal 1.1s cubic-bezier(.6, 0, .2, 1) .8s both; }
.ann-image img { display: block; max-width: 100%; max-height: 52vh; margin: 0 auto; animation: annKen 14s ease-in-out 1.8s infinite alternate; }
@keyframes annReveal { from { clip-path: circle(0% at 50% 50%); transform: scale(.94); } to { clip-path: circle(75% at 50% 50%); } }
@keyframes annKen { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }
.ann-shine { position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: annShine 4s ease-in-out 2s infinite; }
@keyframes annShine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.ann-dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.ann-dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--border); transition: width .4s var(--ease-spring, ease), background-color .3s; }
.ann-dots span.done { background: color-mix(in srgb, var(--navy) 45%, transparent); }
.ann-dots span.on { width: 26px; background: var(--navy); }
.ann-next .ann-arrow { display: inline-block; margin-left: 6px; transition: transform .3s var(--ease-spring, ease); }
.ann-next:hover .ann-arrow { transform: translateX(4px) scale(1.2); }
.announce .modal-footer { animation: fadeUp .5s var(--ease-out, ease) 1s both; }

@media (prefers-reduced-motion: reduce) {
  .announce .modal, .ann-rays, .ann-sparks i, .ann-ribbon, .ann-ping::after, .ann-hero, .ann-word, .ann-meta, .ann-image, .ann-image img, .ann-shine, .announce .modal-footer { animation: none !important; }
  .ann-sparks { display: none; }
}
.ann-image { display: inline-block; vertical-align: top; line-height: 0; }

/* announcement: always fits the screen — header + button stay visible, only the middle scrolls */
.announce .modal { display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden; }
.announce .modal-header { flex: none; }
.announce #modalBody { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.announce .ann-stage { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.announce .modal-footer { flex: none; }
.ann-image img { max-height: min(46vh, 420px); width: auto; }
@media (max-height: 820px) { .ann-hero { width: 120px; } .ann-title { font-size: 21px; } .ann-image img { max-height: 36vh; } }
@media (max-height: 640px) { .ann-hero { display: none; } .ann-image img { max-height: 40vh; } }

/* live refresh: swap the content quietly (no entrance animations), show a small "Live" pulse */
body.live-refresh .page, body.live-refresh .page *, .page.soft, .page.soft * { animation: none !important; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: #1d6b48; background: #e3f6ec; margin-right: 4px; user-select: none; }
.live-dot i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #29a778; }
.live-dot i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #29a778; animation: livePulse 2s ease-out infinite; }
.live-dot.ping { animation: livePing .9s ease; }
@keyframes livePulse { to { transform: scale(2.6); opacity: 0; } }
@keyframes livePing { 30% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(41, 167, 120, .2); } }
body.dark .live-dot { color: #6fd3a5; background: rgba(41, 167, 120, .16); }
@media (max-width: 760px) { .live-dot { display: none; } }
@media (prefers-reduced-motion: reduce) { .live-dot i::after, .live-dot.ping { animation: none; } }