/* ============================================================================
   AU ONE ERP · au-quiet-sync.css — LIVE SYNC WITHOUT THE BLINK
   ----------------------------------------------------------------------------
   THE REPORTED BUG: Construction, Design and Finance "keep blinking, like they
   pull the database again and again", worse on a slow connection.

   THE PULL WAS NEVER THE PROBLEM. Measured on the live site while signed in:
   sixty seconds idle on Mission Control produced six DOM mutations; Finance
   produced seven. The realtime handlers already debounce, skip their own echo,
   and only repaint when the merge actually changed something. Nothing is being
   re-fetched in a loop.

   WHAT USERS SEE is what a repaint LOOKS like. These screens carry ENTRANCE
   animations, and a repaint recreates the nodes that carry them, so every
   background sync replayed a fade-and-rise across the whole view. That is the
   blink: not data being re-fetched, but the page re-introducing itself several
   times a minute. On a slow link the syncs land further apart and more
   visibly, which is exactly when users noticed.

   The list below is not guesswork — it is every one-shot animation found by
   walking the live CSSOM on each of the three apps. The worst offenders were
   the tracker ones: auRise on every KPI tile, card and table, and auBar, which
   re-grew every progress bar from zero on each repaint.

   THE FIX, IN TWO PARTS
   1. Here: an entrance animation is a first-impression flourish. It runs once,
      on the first paint after load, and never again for the session.
      au-quiet-sync.js stamps html.au-settled shortly after boot and never
      removes it, so there is no moment where a suppressed animation can pop.
   2. In au-quiet-sync.js: a repaint whose HTML is identical to what is already
      on screen is skipped outright, so the commonest sync — one that changed
      nothing visible — costs no DOM work, no reflow, and no lost scroll,
      focus or selection.

   WHAT IS DELIBERATELY LEFT ALONE, because suppressing it would cost the user
   information or responsiveness:
     .auflash / .scard.flash / .tbl tr.rowflash / .focus-flash  change highlights
     .okpulse / .cloudfade                                      save + sync feedback
     .intro3d*                                                  the intro, once per load
     modals and sheets (#auGate .gcard, .aumsheet, .auth-sheet,
       .aux-signup, #auSiteNoteBackdrop, #auKanbanBackdrop)     opened by the user
     spinners, skeletons and every looping animation
   Hover, focus, press and progress transitions are untouched, so the UI still
   answers instantly to what YOU do. It simply stops announcing itself when the
   database talks.
   ============================================================================ */

/* ---- Construction: the tracker screens, where the blink was worst ---- */
html.au-settled .tracker .trkkpi,
html.au-settled .tracker .chero,
html.au-settled .tracker .headproj,
html.au-settled .tracker .schproj,
html.au-settled .tracker .schcard,
html.au-settled .tracker .cdash-opex,
html.au-settled .tracker .cdash-tbl,
html.au-settled .tracker .trkkpis > *,
html.au-settled .tracker .cdash-hero > *,
html.au-settled .dashcard,
html.au-settled .aprojwrap > *,
html.au-settled .ccf-fresh .ccfrow,
html.au-settled .ostile,
html.au-settled .exans,
html.au-settled .wbband[open] > .wbbandbody > .wbmon,
html.au-settled .mchome .mc-stat,
html.au-settled .mchome .mc-arenacard,
html.au-settled .mchome .mc-qcard,
/* ---- Finance ---- */
html.au-settled .app,
html.au-settled #root,
html.au-settled .tbl tbody tr.rowin,
/* ---- Design: pageIn plays on open, but a repaint of an ALREADY-open card
        replays it with no user action behind it, which reads as a flash ---- */
html.au-settled .tab-page,
html.au-settled .addproj-form,
html.au-settled .proj-detail.open,
html.au-settled .phase-grp.open .kr-rows,
html.au-settled .bill-card.open .bill-ms,
/* ---- Shared design tokens ---- */
html.au-settled .view,
html.au-settled .reveal,
html.au-settled .au-fade,
html.au-settled .au-rise,
html.au-settled .au-stagger > *{
  animation:none !important;
  animation-delay:0s !important;
}

/* WHY THERE IS NO `transform:none` RESET HERE.
   An earlier draft pinned opacity and transform on every suppressed element to
   clear the animation's `from` state. That was both unnecessary and harmful:
   unnecessary, because removing an animation removes its fill with it, so each
   element falls back to its own natural style — and none of these declare
   opacity:0 and lean on the animation to reveal themselves (checked); harmful,
   because `transform:none !important` also beat the hover rules. .trkkpi,
   .dashcard, .chero, .mc-stat and .mc-qcard all lift on hover, and the reset
   silently flattened every one of them. Quietening a background flourish must
   never cost the user feedback on their own pointer. Killing the animation
   alone is enough, and it leaves hover, focus and press exactly as they were. */

/* Progress bars were the most obviously "reloading" thing on screen. auBar
   animates scaleX 0 -> 1 with `both`, while the real value is carried by the
   element's WIDTH — so on every repaint each bar collapsed to nothing and grew
   back. Measured before this fix, .cbar-fill computed to matrix(0,0,0,1,0,0);
   after it, matrix(1,0,0,1,0,0). Width is never touched here, so the value a
   bar reports is unchanged, and these four carry no hover transform, so
   pinning the identity scale is safe. */
html.au-settled .tracker .cbar-fill,
html.au-settled .tracker .schbar,
html.au-settled .tracker .hpfill,
html.au-settled .tracker .cmfill{
  animation:none !important;
  transform:scaleX(1) !important;
}

/* Images inside a rebuilt screen: decode without blanking the box first, so a
   repaint on a slow connection does not flash an empty frame where a photo
   was. Cheap, and it only affects the moment of insertion. */
html.au-settled #main img,
html.au-settled #root img{ background-color:transparent; }
