/* ════════════════════════════════════════════════════════════════
   VASUKI HR PORTAL — ANIMATION LAYER
   Loaded AFTER styles.css. Purely additive: nothing in here changes
   layout or data, it only adds motion and a little visual polish.

   Sections
     1. Role palettes
     2. App loader
     3. Login screen
     4. Welcome splash (after sign-in)
     5. Page hero banners (one per page, themed per role)
     6. Hero illustrations (a-*)
     7. App shell (sidebar, topbar, avatar)
     8. Content micro-interactions (cards, tables, buttons, toast)
     9. Celebration confetti
    10. Reduced-motion / hidden-tab safety
   ════════════════════════════════════════════════════════════════ */

/* ── 0b. NEW-VERSION BANNER (js/version-check.js) ─────────────── */
#vc-banner {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 120%);
  z-index: 100002; display: flex; align-items: center; gap: 10px;
  background: var(--navy, #0B1F3A); color: #fff; padding: 11px 12px 11px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 500; box-shadow: 0 14px 32px -12px rgba(11,31,58,.55);
  transition: transform .35s cubic-bezier(.2,.85,.25,1);
  max-width: calc(100vw - 28px);
}
#vc-banner.show { transform: translate(-50%, 0); }
#vc-banner .vc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fx-admin-a, #E8B84B); flex: none; animation: rv-attn-pulse 2s ease-in-out infinite; }
#vc-banner button {
  border: none; cursor: pointer; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; flex: none;
}
#vc-banner #vc-refresh { background: var(--gold, #C9922A); color: #1A1200; }
#vc-banner #vc-refresh:hover { filter: brightness(1.08); }
#vc-banner #vc-later { background: transparent; color: rgba(255,255,255,.7); font-weight: 500; }
#vc-banner #vc-later:hover { color: #fff; }
@media (max-width: 480px) { #vc-banner { flex-wrap: wrap; bottom: 10px; } }

/* ── 1. ROLE PALETTES ─────────────────────────────────────────── */
:root {
  --fx-admin-a:    #E8B84B;
  --fx-hr-a:       #5EEAD4;
  --fx-employee-a: #FFC46B;
}

/* ── 2. APP LOADER ────────────────────────────────────────────── */
.app-loader-logo { animation: ld-breathe 2.2s ease-in-out infinite; }
.app-loader-spinner {
  border-top-color: var(--gold, #C9922A) !important;
  border-right-color: var(--navy, #0B1F3A) !important;
  box-shadow: 0 0 0 6px rgba(201,146,42,0.06);
}
.ld-text {
  font-size: 12.5px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-3, #5B6B85); font-weight: 600;
}
.ld-text i {
  font-style: normal; display: inline-block; animation: ld-dot 1.2s infinite both;
}
.ld-text i:nth-child(2) { animation-delay: .2s; }
.ld-text i:nth-child(3) { animation-delay: .4s; }
@keyframes ld-breathe { 0%,100% { transform: scale(1); opacity:.9; } 50% { transform: scale(1.06); opacity:1; } }
@keyframes ld-dot     { 0%,80%,100% { opacity:.2; transform: translateY(0); } 40% { opacity:1; transform: translateY(-3px); } }

/* ── 3. LOGIN SCREEN ──────────────────────────────────────────── */
#login-screen { position: relative; overflow: hidden; }
.login-wrap   { position: relative; z-index: 2; }

.lg-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.lg-orb-wrap {
  position: absolute; will-change: transform;
  transform: translate3d(calc(var(--mx, 0) * var(--k, 20) * 1px), calc(var(--my, 0) * var(--k, 20) * 1px), 0);
  transition: transform .5s ease-out;
}
.lg-orb {
  width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(closest-side at 45% 45%, var(--c1), var(--c2) 55%, transparent 100%);
  animation: lg-drift var(--dur, 18s) ease-in-out infinite;
}
.lg-orb-wrap.o1 { left: -8%;  top: 8%;     --s: 460px; --c1: rgba(201,146,42,.38); --c2: rgba(201,146,42,.10); --k: 26; }
.lg-orb-wrap.o2 { right: -10%; top: -6%;   --s: 420px; --c1: rgba(26,53,96,.30);   --c2: rgba(26,53,96,.08);   --k: -18; }
.lg-orb-wrap.o3 { right: 6%;  bottom: -14%; --s: 380px; --c1: rgba(232,99,10,.26);  --c2: rgba(232,99,10,.07);  --k: 34; }
.lg-orb-wrap.o2 .lg-orb { --dur: 22s; animation-delay: -6s; }
.lg-orb-wrap.o3 .lg-orb { --dur: 16s; animation-delay: -3s; }

.lg-float {
  position: absolute; bottom: -60px; left: var(--x);
  font-size: var(--s); opacity: 0; filter: saturate(.9);
  animation: lg-rise var(--dur) linear var(--del) infinite;
  will-change: transform, opacity;
}

/* card + brand entrance */
.login-brand img,
.login-brand #login-fallback { animation: lg-drop .8s cubic-bezier(.2,.9,.3,1.2) both; }
.login-brand .portal-label   { animation: lg-fade .8s .25s both; position: relative; }
.login-brand .portal-label::before,
.login-brand .portal-label::after {
  content: ''; display: inline-block; width: 26px; height: 1px; vertical-align: middle; margin: 0 10px;
  background: linear-gradient(90deg, transparent, var(--gold));
  animation: lg-line 1s .5s both;
}
.login-brand .portal-label::after { transform: scaleX(-1); }

.login-card { animation: lg-card .85s .15s cubic-bezier(.2,.85,.25,1) both; }
.login-card::before {
  background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 25%, var(--saffron) 50%, var(--gold) 75%, var(--navy) 100%) !important;
  background-size: 200% 100% !important;
  animation: lg-bar 6s linear infinite;
}
.login-card > * { animation: lg-fieldin .55s cubic-bezier(.2,.85,.25,1) backwards; }
.login-card > *:nth-child(1) { animation-delay: .45s; }
.login-card > *:nth-child(2) { animation-delay: .52s; }
.login-card > *:nth-child(3) { animation-delay: .60s; }
.login-card > *:nth-child(4) { animation-delay: .68s; }
.login-card > *:nth-child(5) { animation-delay: .76s; }
.login-card > *:nth-child(6) { animation-delay: .84s; }
.login-card > *:nth-child(7) { animation-delay: .92s; }
.login-card > *:nth-child(8) { animation-delay: 1s; }

.login-card .field { position: relative; }
.login-card .field:focus-within > label { color: var(--gold); transition: color .2s; }
.login-card .field input:focus { transform: translateY(-1px); }
.login-card .field input { transition: border-color .2s, background .2s, box-shadow .2s, transform .2s; }

#login-btn { position: relative; overflow: hidden; }
#login-btn::before {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg); animation: lg-shimmer 3.6s ease-in-out 1.6s infinite;
  pointer-events: none;
}
#login-btn:hover:not(.is-loading) { letter-spacing: .3px; }

.login-card.lg-shake { animation: lg-shake .5s cubic-bezier(.36,.07,.19,.97) both; }

/* rotating tagline */
.lg-tagline { height: 22px; margin-top: 10px; overflow: hidden; position: relative; }
.lg-tagline span {
  display: block; font-size: 13.5px; color: var(--text-3); font-weight: 500;
  animation: lg-tag 3.2s ease-in-out both;
}

/* role cards under the form */
.lg-roles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px;
  animation: lg-fade .8s 1.1s both;
}
.lg-role {
  text-align: center; padding: 12px 8px 11px; border-radius: 12px;
  background: rgba(255,255,255,.65); backdrop-filter: blur(6px);
  border: 1px solid rgba(11,31,58,.08);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.3), box-shadow .35s, background .35s, border-color .35s;
  cursor: default;
}
.lg-role .ic { font-size: 22px; display: block; transition: transform .35s cubic-bezier(.2,.9,.3,1.6); }
.lg-role b   { display: block; font-size: 12px; color: var(--navy); margin-top: 4px; letter-spacing: .3px; }
.lg-role small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; line-height: 1.35; }
.lg-role.on, .lg-role:hover {
  transform: translateY(-4px);
  background: #fff; border-color: var(--border-gold);
  box-shadow: 0 10px 24px -10px rgba(11,31,58,.28);
}
.lg-role.on .ic, .lg-role:hover .ic { transform: scale(1.25) rotate(-6deg); }

@keyframes lg-drift  { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.08); } 66% { transform: translate(-30px,26px) scale(.94); } }
@keyframes lg-rise   { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .34; } 88% { opacity: .34; } 100% { transform: translateY(-118vh) rotate(28deg); opacity: 0; } }
@keyframes lg-drop   { from { opacity: 0; transform: translateY(-26px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes lg-fade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes lg-line   { from { opacity: 0; width: 0; } to { opacity: 1; width: 26px; } }
@keyframes lg-card   { from { opacity: 0; transform: translateY(34px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes lg-fieldin{ from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lg-bar    { to { background-position: -200% 0; } }
@keyframes lg-shimmer{ 0% { left: -80%; } 35%,100% { left: 140%; } }
@keyframes lg-shake  { 10%,90% { transform: translateX(-2px); } 20%,80% { transform: translateX(4px); } 30%,50%,70% { transform: translateX(-7px); } 40%,60% { transform: translateX(7px); } }
@keyframes lg-tag    { 0% { opacity: 0; transform: translateY(100%); } 14% { opacity: 1; transform: none; } 86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-100%); } }

/* ── 4. WELCOME SPLASH ────────────────────────────────────────── */
.ws {
  position: fixed; inset: 0; z-index: 100000; overflow: hidden; color: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(140deg, var(--w1), var(--w2));
  transition: transform .8s cubic-bezier(.75,0,.2,1), opacity .8s ease;
  cursor: pointer;
}
.ws.ws-admin    { --w1: #08172D; --w2: #1A3560; --wa: var(--fx-admin-a); }
.ws.ws-hr       { --w1: #082B33; --w2: #0F766E; --wa: var(--fx-hr-a); }
.ws.ws-employee { --w1: #4A1F07; --w2: #C2620F; --wa: #FFDA8F; }
.ws.ws-out { transform: translateY(-100%); opacity: .4; pointer-events: none; }

.ws-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--wa), transparent 68%); opacity: .26;
  animation: ws-glow 6s ease-in-out infinite;
}
.ws-glow.g1 { width: 70vmax; height: 70vmax; left: -22vmax; top: -26vmax; }
.ws-glow.g2 { width: 60vmax; height: 60vmax; right: -20vmax; bottom: -24vmax; animation-delay: -3s; }

.ws-particles { position: absolute; inset: 0; pointer-events: none; }
.ws-spark {
  position: absolute; bottom: -20px; left: var(--x); width: var(--s); height: var(--s);
  background: var(--wa); border-radius: 50%; opacity: 0;
  box-shadow: 0 0 10px var(--wa);
  animation: ws-spark var(--dur) ease-out var(--del) infinite;
}

.ws-center { position: relative; padding: 24px; max-width: 560px; }
.ws-badge {
  position: relative; width: 112px; height: 112px; margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
  animation: ws-pop .9s cubic-bezier(.2,1.2,.3,1) .1s both;
}
.ws-badge::before {
  content: ''; position: absolute; inset: 10px; border-radius: 50%;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(4px);
}
.ws-emoji { position: relative; font-size: 52px; animation: ws-bob 2.6s ease-in-out 1s infinite; }
.ws-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); opacity: 0;
  animation: ws-ring 2.4s cubic-bezier(.2,.6,.3,1) infinite;
}
.ws-ring.r2 { animation-delay: .8s; }
.ws-ring.r3 { animation-delay: 1.6s; }

.ws-hello { font-size: 14px; letter-spacing: 4px; text-transform: uppercase; opacity: .82; animation: ws-up .7s .45s both; }
.ws-name  {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(40px, 8vw, 64px); font-weight: 700; line-height: 1.05;
  margin: 4px 0 10px;
  background: linear-gradient(90deg, #fff 0%, var(--wa) 50%, #fff 100%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: ws-up .8s .6s both, ws-shine 3.5s linear 1.2s infinite;
}
.ws-head  { font-size: 19px; font-weight: 600; animation: ws-up .7s .8s both; }
.ws-sub   { font-size: 14px; opacity: .78; margin-top: 6px; animation: ws-up .7s .95s both; }
.ws-chips { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.ws-chips span {
  font-size: 12.5px; padding: 7px 13px; border-radius: 999px; font-weight: 600;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  animation: ws-chip .55s cubic-bezier(.2,1.3,.4,1) both;
}
.ws-chips span:nth-child(1) { animation-delay: 1.1s; }
.ws-chips span:nth-child(2) { animation-delay: 1.25s; }
.ws-chips span:nth-child(3) { animation-delay: 1.4s; }

.ws-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.12); }
.ws-bar i { display: block; height: 100%; width: 100%; transform-origin: left; background: var(--wa); animation: ws-bar var(--dur, 2.6s) linear both; }
.ws-skip  { position: absolute; bottom: 18px; left: 0; right: 0; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; opacity: .5; animation: lg-fade 1s 1.4s both; }

@keyframes ws-glow  { 0%,100% { transform: scale(1); opacity: .22; } 50% { transform: scale(1.12); opacity: .34; } }
@keyframes ws-spark { 0% { transform: translateY(0) scale(.4); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-105vh) scale(1); opacity: 0; } }
@keyframes ws-pop   { from { opacity: 0; transform: scale(.3) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes ws-bob   { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(4deg); } }
@keyframes ws-ring  { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes ws-up    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ws-chip  { from { opacity: 0; transform: translateY(12px) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes ws-shine { to { background-position: -200% 0; } }
@keyframes ws-bar   { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Reveal of the app once the splash lifts */
body.app-reveal .sidebar  { animation: rv-side .7s cubic-bezier(.2,.85,.25,1) both; }
body.app-reveal .topbar   { animation: rv-top  .6s .1s cubic-bezier(.2,.85,.25,1) both; }
body.app-reveal #page-hero,
body.app-reveal .content  { animation: rv-main .7s .15s cubic-bezier(.2,.85,.25,1) both; }
@keyframes rv-side { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes rv-top  { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes rv-main { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { body.app-reveal .sidebar { animation: none; } }

/* ── 5. PAGE HERO BANNERS ─────────────────────────────────────── */
#page-hero { padding: 20px 24px 0; flex-shrink: 0; }
#page-hero:empty { display: none; }

.ph {
  --g1: #0B1F3A; --g2: #173A6B; --g3: #0B1F3A; --ph-a: #E8B84B; --ph-b: #FFFFFF;
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px;
  min-height: 118px; padding: 18px 30px 18px 28px; border-radius: 16px; color: #fff;
  background: linear-gradient(115deg, var(--g1), var(--g2), var(--g3));
  background-size: 220% 220%;
  box-shadow: 0 16px 34px -18px rgba(11,31,58,.6), inset 0 0 0 1px rgba(255,255,255,.08);
  animation: ph-in .7s cubic-bezier(.2,.85,.25,1) both, ph-flow 14s ease-in-out infinite;
}
.ph-role-admin    { --g1: #0B1F3A; --g2: #1B3F73; --g3: #0B1F3A; --ph-a: #E8B84B; }
.ph-role-hr       { --g1: #0B2F3A; --g2: #0F766E; --g3: #0B3A4A; --ph-a: #5EEAD4; }
.ph-role-employee { --g1: #7A3510; --g2: #C2620F; --g3: #8A3F0E; --ph-a: #FFDA8F; }

.ph::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.13) 46%, transparent 62%);
  transform: translateX(-130%); animation: ph-sheen 7s ease-in-out 1.2s infinite;
}
.ph-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side at 40% 40%, rgba(255,255,255,.20), rgba(255,255,255,0) 100%);
  animation: ph-float var(--d, 9s) ease-in-out infinite;
}
.ph-orb.o1 { width: 110px; height: 110px; left: 34%; top: -46px; }
.ph-orb.o2 { width: 70px;  height: 70px;  right: 26%; bottom: -26px; --d: 11s; animation-delay: -4s; }
.ph-orb.o3 { width: 44px;  height: 44px;  left: 8%;  bottom: 8px;  --d: 7s;  animation-delay: -2s; }

.ph-text { position: relative; z-index: 1; min-width: 0; flex: 1 1 auto; }
.ph-kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700; opacity: .95;
  animation: ph-word .6s .1s both;
}
.ph-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); letter-spacing: 1.2px;
}
.ph-chip::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ph-a);
  box-shadow: 0 0 0 0 var(--ph-a); animation: ph-pulse 2s infinite;
}
.ph-greet { opacity: .82; letter-spacing: 1px; text-transform: none; font-weight: 600; font-size: 12.5px; }
.ph-live {
  font-variant-numeric: tabular-nums; letter-spacing: 1.5px; font-size: 12.5px; padding: 3px 10px;
  border-radius: 6px; background: rgba(0,0,0,.22); color: var(--ph-a);
}

.ph-title {
  font-family: 'Cormorant Garamond', serif; font-size: 30px; line-height: 1.08; font-weight: 700;
  margin: 6px 0 8px; letter-spacing: .2px;
}
.ph-w {
  display: inline-block; opacity: 0; transform: translateY(16px);
  animation: ph-word .65s cubic-bezier(.2,.85,.25,1) forwards;
  animation-delay: calc(.18s + var(--w, 0) * .09s);
}
.ph-tip { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.4; max-width: 560px; }
.ph-tip-icon { animation: ph-bulb 3s ease-in-out infinite; transform-origin: 50% 80%; }
.ph-tip-text { opacity: .93; transition: opacity .28s ease, transform .28s ease; }
.ph-tip.swap .ph-tip-text { opacity: 0; transform: translateY(7px); }

.ph-art {
  position: relative; z-index: 1; flex: none; width: 160px; height: 110px; margin-left: auto;
  animation: ph-art .9s .2s cubic-bezier(.2,.9,.3,1.2) both; filter: drop-shadow(0 8px 12px rgba(0,0,0,.28));
}
.ph-art svg { width: 100%; height: 100%; overflow: visible; }

.ph-x {
  position: absolute; z-index: 2; top: 8px; right: 10px; width: 24px; height: 24px; border-radius: 50%;
  border: none; cursor: pointer; background: rgba(255,255,255,.14); color: #fff; font-size: 16px; line-height: 1;
  opacity: 0; transition: opacity .2s, transform .25s, background .2s;
}
.ph:hover .ph-x { opacity: .7; }
.ph-x:hover { opacity: 1 !important; transform: rotate(90deg); background: rgba(255,255,255,.28); }
.ph.ph-out { animation: ph-out .38s cubic-bezier(.4,0,.6,1) forwards; }

@keyframes ph-in    { from { opacity: 0; transform: translateY(-14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ph-flow  { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes ph-sheen { 0% { transform: translateX(-130%); } 30%,100% { transform: translateX(130%); } }
@keyframes ph-float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(14px,-12px); } }
@keyframes ph-word  { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ph-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 70%,100% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } }
@keyframes ph-bulb  { 0%,90%,100% { transform: rotate(0) scale(1); } 94% { transform: rotate(-14deg) scale(1.2); } 97% { transform: rotate(10deg) scale(1.2); } }
@keyframes ph-art   { from { opacity: 0; transform: translateX(40px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes ph-out   { to { opacity: 0; transform: translateY(-14px) scale(.98); max-height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; } }

@media (max-width: 900px) {
  #page-hero { padding: 12px 14px 0; }
  .ph { min-height: 0; padding: 14px 16px; gap: 10px; border-radius: 14px; }
  .ph-title { font-size: 23px; margin: 4px 0 6px; }
  .ph-tip { font-size: 12.5px; }
  .ph-art { width: 92px; height: 64px; }
  .ph-x { opacity: .6; }
}
@media (max-width: 480px) {
  .ph-art { display: none; }
  .ph-greet { display: none; }
}

/* ── 6. HERO ILLUSTRATIONS ────────────────────────────────────── */
/* generic helpers — SVG transforms use fill-box so origins are per-shape */
.a-fb { transform-box: fill-box; }

/* dashboard: bars + line */
.a-bar  { transform-box: fill-box; transform-origin: bottom; animation: a-grow 4s ease-in-out var(--d, 0s) infinite; }
.a-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: a-draw 4s ease-in-out .3s infinite; }
.a-dot  { transform-box: fill-box; transform-origin: center; animation: a-dotpop 4s ease-in-out .3s infinite; }
@keyframes a-grow   { 0% { transform: scaleY(.12); } 28%,84% { transform: scaleY(1); } 100% { transform: scaleY(.12); } }
@keyframes a-draw   { 0% { stroke-dashoffset: 1; } 34%,84% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes a-dotpop { 0%,30% { transform: scale(0); } 40% { transform: scale(1.5); } 46%,84% { transform: scale(1); } 100% { transform: scale(0); } }

/* companies: buildings rising, windows blinking */
.a-rise { transform-box: fill-box; transform-origin: bottom; animation: a-rise 4.4s cubic-bezier(.3,.9,.3,1) var(--d, 0s) infinite; }
.a-win  { animation: a-blink 2.6s steps(1) var(--d, 0s) infinite; }
@keyframes a-rise  { 0% { transform: scaleY(.05); opacity: .4; } 24%,88% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(.05); opacity: .4; } }
@keyframes a-blink { 0%,100% { opacity: .95; } 45% { opacity: .15; } 70% { opacity: .95; } }

/* locations: pin drops, ripples */
.a-pin    { transform-origin: 80px 86px; animation: a-drop 2.8s cubic-bezier(.3,.9,.3,1) infinite; }
.a-ripple { transform-box: fill-box; transform-origin: center; animation: a-ripple 2.8s ease-out var(--d, 0s) infinite; }
@keyframes a-drop {
  0% { transform: translateY(-46px); opacity: 0; } 14% { opacity: 1; }
  24% { transform: translateY(0); } 32% { transform: translateY(-13px); } 42%,100% { transform: translateY(0); }
}
@keyframes a-ripple { 0%,22% { transform: scale(.3); opacity: 0; } 26% { opacity: .95; } 80%,100% { transform: scale(2.6); opacity: 0; } }

/* employees: avatars bobbing */
.a-bob  { animation: a-bob 3s ease-in-out var(--d, 0s) infinite; }
.a-plus { transform-box: fill-box; transform-origin: center; animation: a-plus 3s ease-in-out .6s infinite; }
@keyframes a-bob  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes a-plus { 0%,60%,100% { transform: scale(1) rotate(0); } 75% { transform: scale(1.3) rotate(90deg); } }

/* users: lock opening */
.a-shackle { transform-origin: 98px 52px; animation: a-unlock 4s cubic-bezier(.4,0,.2,1) infinite; }
.a-keyhole { animation: a-keyglow 4s ease-in-out infinite; }
@keyframes a-unlock  { 0%,18% { transform: translateY(0) rotate(0); } 34%,66% { transform: translateY(-9px) rotate(-22deg); } 82%,100% { transform: translateY(0) rotate(0); } }
@keyframes a-keyglow { 0%,20%,80%,100% { opacity: 1; } 40%,60% { opacity: .35; } }

/* attendance: clock + check */
.a-hand-m { transform-origin: 80px 55px; animation: a-spin 6s linear infinite; }
.a-hand-h { transform-origin: 80px 55px; animation: a-spin 48s linear infinite; }
.a-check  { transform-box: fill-box; transform-origin: center; animation: a-check 6s cubic-bezier(.3,1.4,.5,1) infinite; }
@keyframes a-spin  { to { transform: rotate(360deg); } }
@keyframes a-check { 0%,72% { transform: scale(0); } 82% { transform: scale(1.25); } 88%,96% { transform: scale(1); } 100% { transform: scale(0); } }

/* holidays: balloons + confetti */
.a-balloon { animation: a-balloon 4.2s ease-in-out var(--d, 0s) infinite; }
.a-conf    { transform-box: fill-box; transform-origin: center; animation: a-fall 3.2s linear var(--d, 0s) infinite; opacity: 0; }
@keyframes a-balloon { 0%,100% { transform: translate(0,0) rotate(-3deg); } 50% { transform: translate(3px,-10px) rotate(3deg); } }
@keyframes a-fall    { 0% { transform: translateY(-14px) rotate(0); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(112px) rotate(300deg); opacity: 0; } }

/* documents: pages sliding out of a folder */
.a-page { animation: a-page 3.6s ease-in-out var(--d, 0s) infinite; transform-box: fill-box; transform-origin: bottom center; }
@keyframes a-page { 0%,8% { transform: translateY(0) rotate(var(--r, 0deg)); } 28%,60% { transform: translateY(var(--h, -14px)) rotate(var(--r, 0deg)); } 84%,100% { transform: translateY(0) rotate(var(--r, 0deg)); } }

/* onboarding: ticking checklist */
.a-tick { stroke-dasharray: 1; stroke-dashoffset: 1; animation: a-tick 5.4s ease-in-out var(--d, 0s) infinite; }
.a-row  { transform-box: fill-box; transform-origin: left; animation: a-row 5.4s ease-in-out var(--d, 0s) infinite; }
@keyframes a-tick { 0% { stroke-dashoffset: 1; } 10%,88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes a-row  { 0% { transform: scaleX(.3); } 10%,88% { transform: scaleX(1); } 100% { transform: scaleX(.3); } }

/* leaves: sun + swaying umbrella */
.a-sun   { transform-origin: 124px 26px; animation: a-spin 16s linear infinite; }
.a-umb   { transform-origin: 66px 100px; animation: a-sway 4.5s ease-in-out infinite; }
@keyframes a-sway { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* leave balance: filling ring + flipping coin */
.a-ring { stroke-dasharray: 100 100; stroke-dashoffset: 100; animation: a-ring 5s ease-in-out infinite; }
.a-flip { transform-box: fill-box; transform-origin: center; animation: a-flip 3s ease-in-out infinite; }
@keyframes a-ring { 0% { stroke-dashoffset: 100; } 45%,86% { stroke-dashoffset: 26; } 100% { stroke-dashoffset: 100; } }
@keyframes a-flip { 0%,100% { transform: scaleX(1); } 50% { transform: scaleX(.12); } }

/* review cycles: stars lighting up */
.a-star    { transform-box: fill-box; transform-origin: center; animation: a-star 5s ease-in-out var(--d, 0s) infinite; }
.a-twinkle { transform-box: fill-box; transform-origin: center; animation: a-twinkle 2.4s ease-in-out var(--d, 0s) infinite; }
@keyframes a-star    { 0%,6% { opacity: .22; transform: scale(.7); } 14% { opacity: 1; transform: scale(1.35); } 22%,84% { opacity: 1; transform: scale(1); } 100% { opacity: .22; transform: scale(.7); } }
@keyframes a-twinkle { 0%,100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }

/* my review: arrow hits target */
.a-arrow { animation: a-arrow 5s cubic-bezier(.3,.9,.3,1) infinite; }
.a-hit   { transform-box: fill-box; transform-origin: center; animation: a-hit 5s ease-out infinite; opacity: 0; }
@keyframes a-arrow {
  0% { transform: translate(52px,-46px); opacity: 0; } 8% { opacity: 1; } 26% { transform: translate(0,0); }
  30% { transform: translate(2px,-2px); } 34%,86% { transform: translate(0,0); opacity: 1; } 100% { transform: translate(0,0); opacity: 0; }
}
@keyframes a-hit { 0%,25% { transform: scale(.2); opacity: 0; } 28% { opacity: .95; } 55%,100% { transform: scale(1.7); opacity: 0; } }

/* settings: gears */
.a-gear-a { transform-origin: 62px 62px;  animation: a-spin 9s linear infinite; }
.a-gear-b { transform-origin: 108px 38px; animation: a-spin 6s linear infinite reverse; }

/* default: sparkle */
.a-spark { transform-box: fill-box; transform-origin: center; animation: a-twinkle 2.6s ease-in-out var(--d, 0s) infinite; }

/* ── 7. APP SHELL ─────────────────────────────────────────────── */
/* nav items glide in one after another — only while <body class="nav-intro">
   (added for ~2s after sign-in), so re-activating an item never re-slides it */
body { --glow: rgba(201,146,42,.35); }
body[data-role="hr"]       { --glow: rgba(94,234,212,.35); }
body[data-role="employee"] { --glow: rgba(255,196,107,.38); }

body.nav-intro .nav-item {
  animation: nav-in .5s cubic-bezier(.2,.85,.25,1) backwards;
  animation-delay: calc(var(--i, 0) * 45ms + .15s);
}
@keyframes nav-in { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }

.nav-item.active { animation: nav-glow 3.4s ease-in-out infinite; }
body.nav-intro .nav-item.active {
  animation: nav-in .5s cubic-bezier(.2,.85,.25,1) backwards, nav-glow 3.4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 45ms + .15s), 0s;
}
.nav-item.active .nav-icon { animation: nav-icon .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes nav-glow { 0%,100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 18px -2px var(--glow); } }
@keyframes nav-icon { 0% { transform: scale(.5) rotate(-30deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: none; } }
.nav-item:hover .nav-icon { animation: nav-wiggle .5s ease; }
@keyframes nav-wiggle { 0%,100% { transform: rotate(0) scale(1.15); } 25% { transform: rotate(-12deg) scale(1.2); } 75% { transform: rotate(10deg) scale(1.2); } }

/* role-flavoured sidebar accent */
body[data-role="hr"] .nav-item.active {
  background: rgba(94,234,212,.13); border-color: rgba(94,234,212,.34); color: #7CF0DC;
}
body[data-role="hr"] .nav-item.active::before { background: #5EEAD4; }
body[data-role="employee"] .nav-item.active {
  background: rgba(255,196,107,.15); border-color: rgba(255,196,107,.36); color: #FFD08A;
}
body[data-role="employee"] .nav-item.active::before { background: #FFC46B; }

.nav-item.active::before { animation: nav-bar 3.4s ease-in-out infinite; }
@keyframes nav-bar { 0%,100% { top: 22%; bottom: 22%; } 50% { top: 12%; bottom: 12%; } }

/* golden "HR" tag shimmer */
.brand-text .tag {
  background: linear-gradient(90deg, var(--gold-light) 0%, #fff 50%, var(--gold-light) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: tag-shine 4.5s linear infinite;
}
@keyframes tag-shine { to { background-position: -200% 0; } }

/* avatars breathe */
.user-avatar, .topbar-avatar { animation: av-ring 3.4s ease-in-out infinite; }
@keyframes av-ring { 0%,100% { box-shadow: 0 0 0 0 rgba(201,146,42,.0); } 50% { box-shadow: 0 0 0 5px rgba(201,146,42,.22); } }

/* page title re-slides on every navigation (JS restarts it) */
.page-title { display: inline-block; }

/* ── 8. CONTENT MICRO-INTERACTIONS ────────────────────────────── */
/* existing cards used fill-mode "both", which froze transform on the final
   keyframe and stopped :hover lifts from working. "backwards" keeps the
   entrance identical but frees the transform afterwards. */
.card, .stat-card { animation-fill-mode: backwards; }

.stat-card::after {
  content: ''; position: absolute; top: 0; left: -70%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent);
  transform: skewX(-20deg); transition: left .7s ease; pointer-events: none;
}
.stat-card:hover::after { left: 140%; }
.stat-card:hover { box-shadow: 0 10px 22px -12px rgba(11,31,58,.35); }
.stat-num[data-counting] { display: inline-block; }

.section-header { position: relative; }

tbody tr td:first-child { transition: box-shadow .2s; }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

.badge { transition: transform .2s; }
tr:hover .badge { transform: scale(1.06); }
.badge-gold { animation: badge-glow 2.4s ease-in-out infinite; }
@keyframes badge-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(201,146,42,0); } 50% { box-shadow: 0 0 0 4px rgba(201,146,42,.16); } }

/* buttons: ripple on click */
.btn { position: relative; overflow: hidden; }
.btn-primary:hover, .btn-gold:hover { transform: translateY(-2px); }
.fx-rip {
  position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0);
  background: rgba(255,255,255,.45); animation: fx-rip .6s ease-out forwards;
}
.btn-secondary .fx-rip, .btn-success .fx-rip, .btn-danger .fx-rip { background: rgba(11,31,58,.18); }
@keyframes fx-rip { to { transform: scale(1); opacity: 0; } }

/* modal backdrop fades instead of popping */
.modal-backdrop.open { animation: fx-fade .22s ease both; }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }

/* toast: springier entrance + countdown bar */
#toast { overflow: hidden; transition: transform .45s cubic-bezier(.3,1.5,.5,1), opacity .25s; }
#toast::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: rgba(255,255,255,.35); transform-origin: left; transform: scaleX(0);
}
#toast.show::after { animation: toast-bar 3.5s linear forwards; }
#toast.success.show { animation: toast-ok .5s ease; }
#toast.error.show   { animation: lg-shake .5s ease; }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toast-ok  { 0% { box-shadow: 0 0 0 0 rgba(26,122,82,.6); } 100% { box-shadow: 0 0 0 18px rgba(26,122,82,0); } }

/* ── 9. CELEBRATION CONFETTI ──────────────────────────────────── */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 100001; overflow: hidden; }
.fx-bit {
  position: absolute; will-change: transform, opacity;
  animation: fx-pop 1.25s cubic-bezier(.15,.8,.35,1) var(--dl, 0s) forwards;
}
@keyframes fx-pop {
  0%   { transform: translate(0,0) rotate(0) scale(.5); opacity: 1; }
  55%  { transform: translate(var(--tx), var(--ty)) rotate(calc(var(--r) * .6)) scale(1); opacity: 1; }
  100% { transform: translate(calc(var(--tx) * 1.15), calc(var(--ty) + 90px)) rotate(var(--r)) scale(.9); opacity: 0; }
}

/* ── 10b. PERFORMANCE REVIEW — floating nudge + in-page progress ── */
.rv-fab { position: fixed; right: 22px; bottom: 22px; z-index: 9600; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.rv-fab.rv-hide { display: none; }

.rv-fab-btn {
  position: relative; width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--navy, #0B1F3A), #173A6B); box-shadow: 0 10px 26px -8px rgba(11,31,58,.55);
  display: flex; align-items: center; justify-content: center; padding: 0;
  animation: rv-pop .6s cubic-bezier(.2,1.3,.35,1) both;
  transition: transform .25s cubic-bezier(.2,1.3,.35,1);
}
.rv-fab-btn:hover { transform: scale(1.08); }
.rv-fab-btn:active { transform: scale(.96); }
.rv-fab-ring { position: absolute; inset: -3px; width: 68px; height: 68px; transform: rotate(-90deg); }
.rv-fab-ring-bg, .rv-fab-ring-fg { fill: none; stroke-width: 4; }
.rv-fab-ring-bg { stroke: rgba(255,255,255,.16); }
.rv-fab-ring-fg { stroke: var(--fx-admin-a, #E8B84B); stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.2,.7,.2,1); }
body[data-role="hr"]       .rv-fab-ring-fg { stroke: var(--fx-hr-a); }
body[data-role="employee"] .rv-fab-ring-fg { stroke: var(--fx-employee-a); }
.rv-fab-icon { font-size: 24px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); animation: rv-icon-bob 2.6s ease-in-out infinite; }
.rv-fab-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: #E11D48; color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg, #F4F6FB); animation: rv-badge-pop .5s .4s cubic-bezier(.2,1.4,.4,1) both;
}
.rv-fab-btn.rv-attn { animation: rv-pop .6s cubic-bezier(.2,1.3,.35,1) both, rv-attn-pulse 2.6s ease-in-out 1s infinite; }
@keyframes rv-pop        { from { opacity: 0; transform: scale(.3) translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes rv-icon-bob   { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-6deg); } }
@keyframes rv-badge-pop  { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes rv-attn-pulse { 0%,100% { box-shadow: 0 10px 26px -8px rgba(11,31,58,.55), 0 0 0 0 rgba(232,184,75,.45); } 50% { box-shadow: 0 10px 26px -8px rgba(11,31,58,.55), 0 0 0 12px rgba(232,184,75,0); } }

.rv-fab-card {
  width: min(328px, calc(100vw - 44px)); border-radius: 18px; overflow: hidden; background: #fff;
  box-shadow: 0 22px 48px -16px rgba(11,31,58,.4), 0 0 0 1px rgba(11,31,58,.06);
  transform-origin: bottom right; animation: rv-card-in .38s cubic-bezier(.2,.9,.3,1.15) both;
}
.rv-fab-card.rv-out { animation: rv-card-out .22s cubic-bezier(.4,0,.7,1) forwards; }
@keyframes rv-card-in  { from { opacity: 0; transform: scale(.85) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rv-card-out { to { opacity: 0; transform: scale(.9) translateY(10px); } }

.rv-fab-head {
  position: relative; overflow: hidden; padding: 18px 44px 16px 18px; color: #fff;
  background: linear-gradient(120deg, var(--navy, #0B1F3A), #1B3F73);
  background-size: 180% 180%; animation: ph-flow 10s ease-in-out infinite;
}
body[data-role="hr"]       .rv-fab-head { background-image: linear-gradient(120deg, #0B2F3A, #0F766E); }
body[data-role="employee"] .rv-fab-head { background-image: linear-gradient(120deg, #7A3510, #C2620F); }
.rv-fab-head::after {
  content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 90% -10%, rgba(255,255,255,.28), transparent 55%);
}
.rv-fab-emoji { font-size: 22px; display: inline-block; animation: ws-bob 2.4s ease-in-out infinite; margin-right: 8px; }
.rv-fab-title { font-weight: 700; font-size: 15px; position: relative; z-index: 1; }
.rv-fab-sub   { font-size: 12px; opacity: .88; margin-top: 3px; position: relative; z-index: 1; }
.rv-fab-x {
  position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff; font-size: 15px; line-height: 1; transition: background .2s, transform .2s;
}
.rv-fab-x:hover { background: rgba(255,255,255,.3); transform: rotate(90deg); }

.rv-fab-bar-track { height: 5px; background: rgba(255,255,255,.22); position: relative; z-index: 1; margin-top: 12px; border-radius: 3px; overflow: hidden; }
.rv-fab-bar-fill  { height: 100%; background: #fff; border-radius: 3px; transition: width .7s cubic-bezier(.2,.7,.2,1); }

.rv-fab-list { max-height: 244px; overflow-y: auto; padding: 8px; }
.rv-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer;
  transition: background .18s; animation: rv-row-in .4s cubic-bezier(.2,.85,.25,1) backwards;
}
.rv-item:hover { background: #F4F6FB; }
.rv-item + .rv-item { margin-top: 2px; }
@keyframes rv-row-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.rv-item-ic {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: #EFF3FB; color: var(--navy);
}
.rv-item.rv-done .rv-item-ic { background: #DCFCE7; }
.rv-item-body { flex: 1; min-width: 0; }
.rv-item-name { font-size: 13px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-item-status { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.rv-item.rv-done .rv-item-status { color: #16A34A; }
.rv-item-chev { flex: none; font-size: 13px; color: var(--text-3); transition: transform .18s; }
.rv-item:hover .rv-item-chev { transform: translateX(2px); color: var(--gold); }
.rv-item-check { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #22C55E; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; animation: rv-check-pop .4s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes rv-check-pop { from { transform: scale(0); } to { transform: scale(1); } }

.rv-fab-foot { padding: 12px 14px 14px; border-top: 1px solid var(--border, #E7EAF3); }
.rv-fab-cta {
  width: 100%; justify-content: center; font-weight: 700; position: relative; overflow: hidden;
}
.rv-fab-snooze { text-align: center; font-size: 11.5px; color: var(--text-3); margin-top: 9px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.rv-fab-snooze:hover { color: var(--navy); }

.rv-fab-done-card { padding: 26px 20px 22px; text-align: center; }
.rv-fab-done-emoji { font-size: 38px; animation: ws-bob 2s ease-in-out infinite; display: inline-block; }
.rv-fab-done-title { font-weight: 700; color: var(--navy); margin-top: 8px; font-size: 15px; }
.rv-fab-done-sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }

/* first-run tooltip bubble beside the collapsed FAB */
.rv-hint {
  position: absolute; right: 74px; bottom: 14px; white-space: nowrap; background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: 10px; box-shadow: 0 8px 18px -8px rgba(11,31,58,.5);
  animation: rv-hint-in .4s .9s cubic-bezier(.2,.9,.3,1.2) both, rv-hint-out .4s 4.6s cubic-bezier(.4,0,.7,1) forwards;
}
.rv-hint::after { content: ''; position: absolute; right: -5px; top: 50%; width: 9px; height: 9px; background: var(--navy); transform: translateY(-50%) rotate(45deg); }
@keyframes rv-hint-in  { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes rv-hint-out { to { opacity: 0; transform: translateX(8px); } }

/* progress ribbon shown at the top of the My Performance Review page */
.rv-ribbon {
  --rv-a: var(--gold, #C9922A); --rv-a2: #FFE7B3;
  position: relative; overflow: hidden; border-radius: 16px; padding: 16px 20px; margin-bottom: 16px;
  background: #fff; border: 1px solid var(--border, #E7EAF3);
  display: flex; align-items: center; gap: 18px; animation: ph-in .6s cubic-bezier(.2,.85,.25,1) both;
  box-shadow: 0 10px 24px -18px rgba(11,31,58,.3);
}
body[data-role="hr"]       .rv-ribbon { --rv-a: #0F766E; --rv-a2: #99F0E4; }
body[data-role="employee"] .rv-ribbon { --rv-a: #C2620F; --rv-a2: #FFD9A0; }
.rv-ribbon::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--rv-a), var(--rv-a2)); }
.rv-ribbon-ring { flex: none; width: 66px; height: 66px; position: relative; }
.rv-ribbon-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rv-ribbon-ring circle { fill: none; stroke-width: 6; }
.rv-ribbon-ring .bg { stroke: var(--bg, #F4F6FB); }
.rv-ribbon-ring .fg { stroke: var(--rv-a); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.7,.2,1); }
.rv-ribbon-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: var(--navy); }
.rv-ribbon-text { flex: 1; min-width: 0; }
.rv-ribbon-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 700; color: var(--navy); }
.rv-ribbon-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.rv-ribbon-chips { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.rv-ribbon-chips span { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg, #F4F6FB); color: var(--text-2); border: 1px solid var(--border, #E7EAF3); }
.rv-ribbon-chips span.on { background: var(--rv-a); color: #fff; border-color: transparent; }
.rv-ribbon.rv-complete .rv-ribbon-ring::after { content: '🎉'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; animation: rv-check-pop .5s cubic-bezier(.3,1.6,.5,1) both; }
.rv-ribbon.rv-complete .rv-ribbon-pct { display: none; }

/* small progress chip injected next to each My-Performance-Review tab btn */
.rv-tab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 6px; background: #F59E0B; vertical-align: middle; }
.rv-tab-dot.done { background: #22C55E; }

@media (max-width: 480px) {
  .rv-fab { right: 14px; bottom: 14px; }
  .rv-hint { display: none; }
  .rv-ribbon { flex-wrap: wrap; }
}

/* ── 10. SAFETY ───────────────────────────────────────────────── */
/* Tab in the background → freeze every looping animation (saves battery). */
body.anim-paused .lg-orb, body.anim-paused .lg-float, body.anim-paused .ws *,
body.anim-paused .ph *, body.anim-paused .ph, body.anim-paused .nav-item.active,
body.anim-paused .badge-gold { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .lg-bg, .ws, .ph-orb, .ph::after, .fx-layer { display: none !important; }
  .ph-w, .ph-art, .ph-kicker { opacity: 1 !important; transform: none !important; }
  .a-bar, .a-line, .a-dot, .a-rise, .a-win, .a-pin, .a-ripple, .a-bob, .a-plus, .a-shackle, .a-keyhole,
  .a-hand-m, .a-hand-h, .a-check, .a-balloon, .a-conf, .a-page, .a-tick, .a-row, .a-sun, .a-umb,
  .a-ring, .a-flip, .a-star, .a-twinkle, .a-arrow, .a-hit, .a-gear-a, .a-gear-b, .a-spark { animation: none !important; }
  .a-line, .a-tick { stroke-dashoffset: 0 !important; }
  .a-ring { stroke-dashoffset: 26 !important; }
  .a-star { opacity: 1 !important; }
  .a-conf, .a-hit, .a-twinkle { opacity: 0 !important; }
  .rv-fab-btn, .rv-fab-icon, .rv-fab-emoji, .rv-fab-done-emoji, .rv-hint, .rv-item { animation: none !important; }
}
