/* Anderson motion kit — shared by Anderson's Analysis and Anderson's Office.
   Boot intro, POS-style rise-in, counting numbers, a Dynamic Island and the training-app look. */
:root{--am-ease:cubic-bezier(.2,.8,.2,1);--am-rainbow:linear-gradient(90deg,#3f86d9,#8a55c9 30%,#d9457a 55%,#ee7a2f 80%,#e9b23a)}

/* POS-style rise: cards float up one after another */
.am-rise{animation:amRise .56s var(--am-ease) both;animation-delay:var(--am-d,0s)}
@keyframes amRise{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
.am-num{font-variant-numeric:tabular-nums}

/* Progress bars grow from the left, then a soft shine passes once */
.am-grow{position:relative;animation:amGrow 1.1s cubic-bezier(.22,.9,.24,1) both;animation-delay:var(--am-bd,0s)}
@keyframes amGrow{from{clip-path:inset(0 100% 0 0 round 99px)}to{clip-path:inset(0 0 0 0 round 99px)}}
.am-grow::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);transform:translateX(-100%);animation:amShine .9s ease-out both;animation-delay:calc(var(--am-bd,0s) + .9s);pointer-events:none}
@keyframes amShine{to{transform:translateX(100%)}}

/* Boot: the POS login intro — logo, then the name, then the whole page turns DE blue */
#am-boot{position:fixed;inset:0;z-index:2147483646;display:grid;place-items:center;background:#fff;color:#0b0b0d;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;transition:opacity .5s cubic-bezier(.4,0,.2,1)}
#am-boot.play{animation:amBg 1.3s cubic-bezier(.4,0,.2,1) 1.75s both}
#am-boot.done{opacity:0;pointer-events:none}
#am-boot .am-stage{display:grid;justify-items:center;text-align:center}
#am-boot .am-logo{display:block;width:128px;height:128px;opacity:0;transform:scale(.82);filter:blur(8px) drop-shadow(0 24px 46px rgba(0,0,0,.16))}
/* as the page turns blue the logo's shadow fades too, so the square disappears into the background */
#am-boot.play .am-logo{animation:amLogo .7s cubic-bezier(.16,1,.3,1) .1s both,amFlat 1.3s cubic-bezier(.4,0,.2,1) 1.75s both}
@keyframes amFlat{from{filter:blur(0) drop-shadow(0 24px 46px rgba(0,0,0,.16))}to{filter:blur(0) drop-shadow(0 24px 46px rgba(0,0,0,0))}}
#am-boot .am-word{margin-top:28px;font-family:"Avenir Next","Avenir","Helvetica Neue",Arial,sans-serif;font-size:21px;letter-spacing:-.03em;white-space:nowrap;opacity:0;transform:translateY(12px);filter:blur(5px)}
#am-boot .am-n{font-weight:700;color:#0b0b0d}
#am-boot .am-s{font-weight:400;color:#8e8e93}
#am-boot.play .am-word{animation:amWord .6s cubic-bezier(.22,1,.36,1) .85s both}
#am-boot.play .am-n{animation:amTone 1.3s cubic-bezier(.4,0,.2,1) 1.75s both}
#am-boot.play .am-s{animation:amSTone 1.3s cubic-bezier(.4,0,.2,1) 1.75s both}
#am-boot.still .am-logo,#am-boot.still .am-word{opacity:1;transform:none;filter:none}
#am-boot .am-skip{position:absolute;right:22px;top:22px;padding:9px 13px;border:0;border-radius:999px;background:rgba(127,127,127,.14);color:rgba(127,127,127,.9);font-family:inherit;font-size:10px;font-weight:700;line-height:1;letter-spacing:.08em;cursor:pointer}
@keyframes amBg{from{background:#fff}to{background:#19297a}}
@keyframes amLogo{from{opacity:0;transform:scale(.82);filter:blur(8px) drop-shadow(0 24px 46px rgba(0,0,0,.16))}to{opacity:1;transform:scale(1);filter:blur(0) drop-shadow(0 24px 46px rgba(0,0,0,.16))}}
@keyframes amWord{from{opacity:0;transform:translateY(12px);filter:blur(5px)}to{opacity:1;transform:none;filter:blur(0)}}
@keyframes amTone{from{color:#0b0b0d}to{color:#fff}}
@keyframes amSTone{from{color:#8e8e93}to{color:rgba(255,255,255,.62)}}

/* Dynamic Island */
#am-island{position:fixed;left:50%;top:calc(10px + env(safe-area-inset-top));z-index:2147483000;display:flex;align-items:center;gap:9px;height:36px;padding:0 16px 0 6px;border-radius:999px;background:#0b0b0d;color:#fff;font:600 13px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC",sans-serif;letter-spacing:-.01em;white-space:nowrap;box-shadow:0 10px 30px rgba(0,0,0,.22);pointer-events:none;opacity:0;transform:translateX(-50%) scale(.55);transition:transform .55s cubic-bezier(.3,1.45,.5,1),opacity .25s ease}
#am-island.on{opacity:1;transform:translateX(-50%) scale(1)}
#am-island .am-dot{flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#1f1f23;overflow:hidden}
#am-island .am-dot img{width:17px;height:17px;border-radius:5px}
#am-island small{font-weight:500;color:rgba(255,255,255,.55)}

/* Page switch: the new page floats in */
.am-swap{animation:amSwap .45s var(--am-ease) both}
@keyframes amSwap{from{opacity:0;transform:translateY(10px)}}

.am-rainbow{background:var(--am-rainbow);-webkit-background-clip:text;background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent}

/* ---------- Anderson's Analysis: training-app look ---------- */
html:has(body.am-analysis),html:has(body.am-office){background:#fff}
body.am-analysis{--bg:#fff;--navy:#1d1d1f;--line:#ececf0;--shadow:0 8px 28px rgba(0,0,0,.05);background:#fff}
body.am-analysis .card,body.am-analysis .panel,body.am-analysis .person-card,body.am-analysis .analysis-card,body.am-analysis .compare-card,body.am-analysis .source-board,body.am-analysis .mini,body.am-analysis .overview-store-total,body.am-analysis .focus{border-color:#ececf0;border-radius:20px;box-shadow:0 8px 28px rgba(0,0,0,.045)}
/* Hero blocks: DE blue → bright blue with a soft light in the corner (lively, one colour family, no black) */
body.am-analysis .overview-total-group,body.am-analysis .analysis-hero{position:relative;overflow:hidden;background:radial-gradient(120% 170% at 100% 0%,rgba(125,195,255,.55),rgba(125,195,255,0) 52%),linear-gradient(118deg,#1b2a75 0%,#2747c9 52%,#3b7cff 100%);box-shadow:0 16px 36px -10px rgba(39,71,201,.45)}
body.am-analysis .overview-total-group::after,body.am-analysis .analysis-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.16) 50%,transparent 65%);transform:translateX(-100%);animation:amHeroShine 5.5s ease-in-out 1.2s infinite;pointer-events:none}
body.am-analysis .overview-total-group>*,body.am-analysis .analysis-hero>*{position:relative;z-index:1}
@keyframes amHeroShine{0%{transform:translateX(-100%)}45%,100%{transform:translateX(100%)}}
body.am-analysis .overview-store-total{position:relative;overflow:hidden}
body.am-analysis .overview-store-total:hover{border-color:#dfe5f5;transform:translateY(-2px);box-shadow:0 14px 30px -12px rgba(39,71,201,.22)}
body.am-analysis .overview-store-total{transition:transform .25s var(--am-ease),box-shadow .25s,border-color .25s}
body.am-analysis .seg button.active{color:#2747c9!important}
/* Sources: show Total Sales only — each source already says External / Internal Sales + Substock under its name */
body.am-analysis #sources .source-headrow>:nth-child(n+6),body.am-analysis #sources .source-row>:nth-child(n+6){display:none!important}
@media(min-width:781px){body.am-analysis #sources .source-headrow,body.am-analysis #sources .source-row{grid-template-columns:minmax(170px,1.25fr) minmax(130px,.9fr) minmax(180px,1.7fr) 76px minmax(140px,1fr)!important}}
body.am-analysis #sources .source-row .source-sales:nth-child(5) b{font-size:15px}
body.am-analysis .kpi .value{color:#101828}
body.am-analysis .brand h1,body.am-analysis .page .title{background:var(--am-rainbow);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;width:max-content;max-width:100%}
body.am-analysis .logo{border-color:#1d1d1f}
body.am-analysis .seg button.active,body.am-analysis .navbtn.active{color:#2747c9}
body.am-analysis .navbtn.active{background:#eef2ff}
body.am-analysis .btn.soft{background:#f2f2f4;color:#1d1d1f;border-color:#ececf0}
body.am-analysis .bottomnav{border-radius:24px;box-shadow:0 14px 40px rgba(0,0,0,.14)}
body.am-analysis .navbtn{transition:transform .2s var(--am-ease),background .2s}
body.am-analysis .navbtn:active{transform:scale(.94)}

/* ---------- Anderson's Office: training-app look ---------- */
body.am-office{--bg:#fff;--line:#ececf0;--navy:#1d1d1f;--ink:#1d1d1f;background:#fff;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Helvetica Neue",Arial,sans-serif}
body.am-office .kpi,body.am-office .panel,body.am-office .expenseBill{border-color:#ececf0;border-radius:20px;box-shadow:0 8px 28px rgba(0,0,0,.045)}
body.am-office .kpi.net{background:linear-gradient(145deg,#0b0b0d,#2c2c31);border-color:#0b0b0d;box-shadow:0 14px 34px rgba(0,0,0,.16)}
body.am-office .kpi.net label,body.am-office .kpi.net p{color:rgba(255,255,255,.62)}
body.am-office .top h1,body.am-office .overviewIntro h2,body.am-office header .brand b{background:var(--am-rainbow);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;width:max-content;max-width:100%}
body.am-office .primary{background:#1d1d1f}
body.am-office .primary:hover{background:#3a3a3c}
body.am-office nav{background:rgba(242,242,244,.92);border-radius:14px}
body.am-office nav button{transition:transform .2s var(--am-ease),background .2s}
body.am-office nav button:active{transform:scale(.95)}
body.am-office nav button.active{box-shadow:0 2px 10px rgba(0,0,0,.08)}
body.am-office .actions{box-shadow:0 8px 28px rgba(0,0,0,.045)}
/* Cash Out: three quiet tones by share — under 10% calm green, 10–20% amber, 20% and up soft red */
body.am-office [data-am-level] .spendTrack>span,body.am-office [data-am-level] .shareTrack i{transition:background .4s ease}
body.am-office [data-am-level=low] .spendTrack>span,body.am-office [data-am-level=low] .shareTrack i{background:#3f8f6f}
body.am-office [data-am-level=mid] .spendTrack>span,body.am-office [data-am-level=mid] .shareTrack i{background:#d4a043}
body.am-office [data-am-level=high] .spendTrack>span,body.am-office [data-am-level=high] .shareTrack i{background:#d0654f}
body.am-office [data-am-level=low] .spendLine strong,body.am-office [data-am-level=low] .shareMain strong{color:#3f8f6f}
body.am-office [data-am-level=mid] .spendLine strong,body.am-office [data-am-level=mid] .shareMain strong{color:#b8862e}
body.am-office [data-am-level=high] .spendLine strong,body.am-office [data-am-level=high] .shareMain strong{color:#c4573f}

/* ---------- DE Academy opening: white page, the blue DE, a rainbow ring draws round it and closes, "DE Academy", then the page opens ---------- */
#am-boot.am-academy.play{animation:none;background:#fff}
#am-boot.am-academy.play .am-n{animation:none;color:#1d1d1f}
#am-boot .am-ring{position:relative;width:132px;height:132px;display:grid;place-items:center}
#am-boot .am-r{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
#am-boot .am-r circle{fill:none;stroke:url(#amRing);stroke-width:5;stroke-linecap:round;stroke-dasharray:392 1000;stroke-dashoffset:404}
#am-boot .am-de{width:62px;height:62px;opacity:0;transform:scale(.8);filter:blur(8px)}
#am-boot.play .am-de{animation:amDe .7s cubic-bezier(.16,1,.3,1) .1s both}
#am-boot.play .am-r circle{animation:amClose 1.4s cubic-bezier(.65,0,.25,1) .5s both}
#am-boot.am-academy .am-word{margin-top:18px;font-size:18px;letter-spacing:-.01em}
#am-boot.am-academy.play .am-word{animation-delay:1.3s}
#am-boot.still .am-de{opacity:1;transform:none;filter:none}#am-boot.still .am-r circle{stroke-dashoffset:0}
@keyframes amDe{to{opacity:1;transform:none;filter:none}}
@keyframes amClose{to{stroke-dashoffset:0}}
#am-boot.am-academy .am-s{font-weight:600;background:linear-gradient(90deg,#3f86d9,#8a55c9 25%,#d9457a 45%,#ee7a2f 65%,#e9b23a 82%,#7cb84a);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
#am-boot.am-academy.play .am-s{animation:none}
/* the page's own opening waits behind the curtain, then plays in view */
html.am-booting #app,html.am-booting #app *{animation-play-state:paused!important}
/* DE Academy opening (owner 2026-11-12): the check-in's warm light → the glows gather → the DE icon → "DE Academy" */
#am-boot.am-academy,#am-boot.am-academy.play{animation:none;overflow:hidden;background:radial-gradient(60% 55% at 85% 10%,rgba(255,178,30,.28),transparent 70%),radial-gradient(55% 50% at 10% 95%,rgba(47,107,255,.20),transparent 72%),linear-gradient(160deg,#fff6df 0%,#fdf4fb 45%,#eef4ff 100%)}
#am-boot.am-academy .am-stage{position:relative;z-index:1}
#am-boot .am-gl{position:absolute;left:50%;top:var(--cy,50%);width:76vmax;height:76vmax;margin:-38vmax 0 0 -38vmax;border-radius:50%;pointer-events:none;transform:translate(var(--gx),var(--gy))}
#am-boot .a1{--gx:26vmax;--gy:-30vmax;background:radial-gradient(circle,rgba(255,138,61,.42),rgba(255,178,30,.14) 38%,transparent 64%)}
#am-boot .a2{--gx:-28vmax;--gy:32vmax;background:radial-gradient(circle,rgba(138,92,255,.34),rgba(47,107,255,.12) 40%,transparent 64%)}
#am-boot .a3{--gx:-24vmax;--gy:-26vmax;width:56vmax;height:56vmax;margin:-28vmax 0 0 -28vmax;background:radial-gradient(circle,rgba(217,69,122,.24),transparent 62%)}
#am-boot.am-academy.play .am-gl{animation:amGather 2.1s cubic-bezier(.65,0,.2,1) .25s both}
#am-boot.am-academy.play .a2{animation-delay:.32s}#am-boot.am-academy.play .a3{animation-delay:.4s}
@keyframes amGather{0%{transform:translate(var(--gx),var(--gy)) scale(1);opacity:1}25%{transform:translate(calc(var(--gx)*1.05),calc(var(--gy)*1.05)) scale(1.06);opacity:1}60%{transform:translate(calc(var(--gx)*.12),calc(var(--gy)*.12)) scale(.3);opacity:1}78%{transform:translate(0,0) scale(.12);opacity:.25}100%{transform:translate(0,0) scale(.04);opacity:0}}
#am-boot .am-bloom{position:absolute;left:50%;top:var(--cy,50%);width:220px;height:220px;margin:-110px 0 0 -110px;border-radius:50%;pointer-events:none;opacity:0;transform:scale(.2);background:radial-gradient(circle,rgba(255,255,255,1),rgba(255,236,206,.7) 34%,rgba(255,255,255,0) 68%)}
#am-boot.am-academy.play .am-bloom{animation:amBloom 1.3s cubic-bezier(.2,.8,.2,1) 2.2s both}
@keyframes amBloom{0%{opacity:0;transform:scale(.2)}35%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.7)}}
/* owner 2026-11-13: first all the colour is pulled into a small glowing core, THEN the icon's frame pops out of it */
#am-boot.am-academy .am-logo{width:76px;height:76px;opacity:0;filter:none;clip-path:inset(46% round 50%)}
#am-boot.am-academy.play .am-logo{animation:amIcon 1.5s cubic-bezier(.4,0,.2,1) 1.4s both}
@keyframes amIcon{
 0%{opacity:0;transform:scale(1);clip-path:inset(47% round 50%);filter:blur(8px)}
 35%{opacity:1;transform:scale(1);clip-path:inset(39% round 50%);filter:blur(3px)}
 55%{opacity:1;transform:scale(.92);clip-path:inset(35% round 50%);filter:blur(0);animation-timing-function:cubic-bezier(.2,1.5,.4,1)}
 80%{opacity:1;transform:scale(1.06);clip-path:inset(0 round 17%);filter:blur(0)}
 100%{opacity:1;transform:scale(1);clip-path:inset(0 round 17%);filter:blur(0)}}
#am-boot.am-academy .am-ic{display:block}
#am-boot.am-academy.play .am-ic{animation:amIcSh .7s ease 2.5s both}
@keyframes amIcSh{from{filter:drop-shadow(0 12px 28px rgba(245,140,170,0))}to{filter:drop-shadow(0 12px 28px rgba(245,140,170,.28))}}
#am-boot.am-academy .am-gly{opacity:0;transform-box:fill-box;transform-origin:center}
#am-boot.am-academy.play .am-gly{animation:amGly .5s cubic-bezier(.2,1.3,.4,1) 2.6s both}
@keyframes amGly{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}
#am-boot.am-academy.still .am-logo{clip-path:none}#am-boot.am-academy.still .am-gly{opacity:1}
#am-boot.am-academy.play .am-word{animation:amWord .8s cubic-bezier(.22,1,.36,1) 3.05s both}
#am-boot.am-academy.still .am-gl,#am-boot.am-academy.still .am-bloom{display:none}
#am-boot.am-academy.still .am-logo{opacity:1;transform:none;filter:none}

@media (prefers-reduced-motion:reduce){.am-rise,.am-swap,.am-grow{animation:none!important}}
@media print{#am-island,#am-boot{display:none!important}}