/* AMS — the caretaker ("staff") view: soft glass cards, clay pictures, big numbers, gentle motion.

   How this file is kept safe:
   - Everything is inside "@media screen" and starts with .view-staff (a class the app puts on <body> only while a
     caretaker is logged in). So the committee, owner and tenant screens are not touched, and printing
     (gas bill slips, 4 per A4 page) keeps the plain print styles from app.css.
   - Status colours keep their meaning everywhere: green #2E7D5B paid, amber #D99A00 collected and waiting for check,
     red #C62828 late, blue #2B5BA8 gas bill handed out, grey #8A8F98 not paid / not handed out.
   - Motion: things move once when a page opens. Only live things keep moving (generator running, live dot, fuel).
     With "reduce motion" switched on in the phone, nothing moves (see the end of this file). */

/* The accent colours are "typed", so they can fade smoothly from one area's colour to the next. */
@property --acc { syntax: '<color>'; inherits: true; initial-value: #7A4FD3; }
@property --acc-2 { syntax: '<color>'; inherits: true; initial-value: #B79CF4; }
@property --acc-soft { syntax: '<color>'; inherits: true; initial-value: #EFE8FC; }

@media screen {

/* ---------- colours, shadows, type ---------- */
.view-staff {
  --ground: #F4F1F9;
  --glass: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.84));
  --edge: rgba(255,255,255,.95);
  --hair: rgba(44,36,51,.09);
  --tray: #EEE9F4;
  --inkfill: linear-gradient(180deg, #47395C 0%, #2C2433 100%);
  --sh-1: 0 1px 2px rgba(44,36,51,.05), 0 10px 26px -14px rgba(62,38,96,.28);
  --sh-2: 0 2px 6px rgba(44,36,51,.06), 0 22px 44px -20px rgba(62,38,96,.4);
  --r-xl: 28px; --r-lg: 22px;
  --spring: cubic-bezier(.34,1.56,.64,1);
  --ease: cubic-bezier(.22,.9,.3,1);
  --display: 'Anek Bangla', 'Hind Siliguri', 'Bricolage Grotesque', system-ui, sans-serif;
  /* Home, Apartment bills, Gas reading: amethyst */
  --acc: #7A4FD3; --acc-2: #B79CF4; --acc-soft: #EFE8FC; --acc-ink: #4B2A8F;
  background: var(--ground);
  transition: --acc .6s, --acc-2 .6s, --acc-soft .6s;
}
.view-staff[data-area="collect"] { --acc: #0FA573; --acc-2: #6FDDB0; --acc-soft: #E0F6EC; --acc-ink: #0A6648; } /* Collection: emerald */
.view-staff[data-area="spend"] { --acc: #F26B3A; --acc-2: #FFB483; --acc-soft: #FFEDE2; --acc-ink: #9C3A12; }   /* Expense: coral */
.view-staff[data-area="gen"] { --acc: #1E8FE8; --acc-2: #86C9FF; --acc-soft: #E2F1FE; --acc-ink: #0E5A9B; }     /* Generator: azure */

/* A soft glow of the area's colour behind everything. */
.view-staff::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0); /* its own layer: scrolling never repaints it */
  background:
    radial-gradient(70% 36% at 105% -4%, color-mix(in srgb, var(--acc-2) 46%, transparent) 0%, transparent 72%),
    radial-gradient(60% 30% at -8% 14%, color-mix(in srgb, var(--acc) 17%, transparent) 0%, transparent 74%),
    radial-gradient(80% 34% at 50% 108%, color-mix(in srgb, var(--acc-2) 30%, transparent) 0%, transparent 72%); }

.view-staff h1 { font: 800 1.6rem/1.22 var(--display); letter-spacing: -.01em; }
.view-staff h2 { font: 800 1.12rem/1.3 var(--display); letter-spacing: 0; }
.view-staff h3 { font-family: var(--body); font-size: 1rem; font-weight: 700; }
/* Big figures: the wide, heavy digits. */
.view-staff .big { font: 800 clamp(1.7rem, 8.6vw, 2.3rem)/1.05 var(--display); font-stretch: 125%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.view-staff .amt { font-family: var(--display); font-weight: 800; font-size: .98rem; }
.view-staff .clay { display: block; width: 100%; height: 100%; overflow: visible; }
.view-staff .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- top bar ---------- */
.view-staff .top { gap: 8px; padding: 9px 10px 11px 12px; border-radius: 0 0 22px 22px;
  background: linear-gradient(115deg, #2C2433 0%, #3B2A53 58%, #4C2F6C 100%); box-shadow: 0 12px 26px -16px rgba(44,22,84,.75); }
.view-staff .top .avatar { flex: none; width: 36px; height: 36px; border-radius: 13px; display: grid; place-items: center;
  font: 800 1.1rem/1 var(--display); color: var(--acc-ink); background: linear-gradient(145deg, #fff, var(--acc-soft));
  box-shadow: inset 0 -3px 0 rgba(44,36,51,.12), 0 6px 12px -6px rgba(0,0,0,.6); }
.view-staff .top .bname { font: 800 1.02rem/1.25 var(--display); }
.view-staff .top .who { font-size: .78rem; opacity: .78; }
.view-staff .lang-btn { position: relative; min-height: 36px; padding: 0 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.09);
  font-size: .78rem; font-weight: 700; transition: transform .25s var(--spring), background .2s; -webkit-tap-highlight-color: transparent; }
.view-staff .lang-btn::after { content: ''; position: absolute; inset: -5px -2px; } /* a taller area for the finger */
.view-staff .lang-btn:active { transform: scale(.93); background: rgba(255,255,255,.22); }

.view-staff .main { padding: 14px; transition: opacity .15s; }
.view-staff .main.refreshing { pointer-events: none; opacity: .55; transition: opacity .2s .3s; } /* dims only if the new data is slow */

/* ---------- bottom menu (phones): a floating bar with a sliding highlight ---------- */
@media (max-width: 899.98px) {
  .view-staff { --nav-h: 86px; } /* the bar plus its gap from the bottom: the toast and sticky Save sit above it */
  .view-staff .nav { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 66px; padding: 6px;
    border: 1px solid rgba(255,255,255,.9); border-radius: 24px; background: rgba(255,255,255,.8);
    -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
    box-shadow: 0 16px 34px -14px rgba(44,22,84,.5), 0 2px 6px rgba(44,36,51,.08); }
  .view-staff .nav::before { content: ''; position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / var(--nav-n, 3)); border-radius: 18px;
    background: var(--inkfill); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 18px -10px var(--acc);
    transform: translateX(calc(var(--nav-i, 0) * 100%)); transition: transform .5s var(--spring), opacity .2s; }
  .view-staff .nav.no-cur::before { opacity: 0; }
  .view-staff .nav a { z-index: 1; gap: 1px; border-radius: 18px; color: var(--slate); font-size: .76rem; font-weight: 700;
    transition: color .3s, transform .25s var(--spring); -webkit-tap-highlight-color: transparent; }
  .view-staff .nav a svg { width: 23px; height: 23px; transition: transform .45s var(--spring); }
  .view-staff .nav a[aria-current="page"] { color: #fff; }
  .view-staff .nav a[aria-current="page"] svg { transform: translateY(-1px) scale(1.08); }
  .view-staff .nav a[aria-current="page"]::before { display: none; }
  .view-staff .nav a:active { transform: scale(.93); }
}

/* ---------- tabs (Home and Collection): four across, a picture over each name ---------- */
.view-staff .tabs { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 0; flex-wrap: nowrap; overflow: visible;
  margin: 0 0 16px; padding: 5px; border: 1px solid var(--edge); border-radius: 22px; background: rgba(255,255,255,.74); box-shadow: var(--sh-1); }
.view-staff .tab-ind { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / var(--n)); border-radius: 17px;
  background: var(--inkfill); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 18px -10px var(--acc); transform: translateX(calc(var(--i) * 100%)); }
.view-staff .main:not(.soft) .tab-ind { animation: tab-slide .5s var(--spring); }
@keyframes tab-slide { from { transform: translateX(calc(var(--from) * 100%)); } }
.view-staff .tabs a { position: relative; z-index: 1; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 62px; padding: 6px 2px 5px; border: 0; border-radius: 17px; background: none; color: var(--ink-2);
  font-size: .74rem; font-weight: 700; line-height: 1.15; text-align: center; transition: color .25s, transform .25s var(--spring); -webkit-tap-highlight-color: transparent; }
.view-staff .tabs a[aria-current="page"] { background: none; color: #fff; }
.view-staff .tabs a:active { transform: scale(.93); }
.view-staff .tab-ic { display: block; width: 26px; height: 26px; transition: transform .45s var(--spring); }
.view-staff .tabs a[aria-current="page"] .tab-ic { transform: scale(1.12); }
.view-staff .tab-tx { display: block; text-wrap: balance; }

/* ---------- page parts ---------- */
.view-staff .page-head { align-items: center; margin: 2px 2px 14px; }
.view-staff .page-head p { margin: 4px 0 0; font-size: .93rem; }
.view-staff .page-head.with-pic { flex-wrap: nowrap; }
.view-staff .head-pic { flex: none; width: 70px; height: 70px; }
.view-staff .card, .view-staff .list, .view-staff .stat, .view-staff .table-wrap, .view-staff .building, .view-staff .key-card {
  border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--sh-1); }
.view-staff .card { padding: 16px; }
.view-staff .li { gap: 12px; padding: 13px 14px; border-top: 1px solid var(--hair); }
.view-staff .li:first-child { border-top: 0; }
@media (max-width: 639.98px) {
  .view-staff .li:has(> .pill-date) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date amt" "main main"; gap: 7px 10px; align-items: center; }
  .view-staff .li:has(> .pill-date) > .pill-date { grid-area: date; justify-self: start; }
  .view-staff .li:has(> .pill-date) > .grow { grid-area: main; }
  .view-staff .li:has(> .pill-date) > .amt { grid-area: amt; }
}
.view-staff .pill-date { flex: none; padding: 6px 9px; border-radius: 10px; background: var(--acc-soft); color: var(--acc-ink); font: 700 .76rem/1.1 var(--body); white-space: nowrap; }
.view-staff .stat { padding: 13px 14px; }
.view-staff .stat .k { font-size: .8rem; font-weight: 600; }
.view-staff .stat .v { margin-top: 3px; font: 800 1.3rem/1.15 var(--display); letter-spacing: -.01em; }
.view-staff .stats { margin: 12px 0 14px; }
.view-staff .stats .stat .v { font-size: clamp(1.25rem, 6.4vw, 1.7rem); font-stretch: 125%; }
.view-staff .section-title { margin: 22px 0 0; }
.view-staff .dash-sec > h2, .view-staff .section-title h2 { display: flex; align-items: center; gap: 9px; margin: 0 2px 10px; padding: 0; border: 0; font-size: 1.12rem; }
.view-staff .sec-ic { flex: none; display: block; width: 30px; height: 30px; }
.view-staff .foot-note { margin: 12px 2px 0; }
.view-staff .tips-again { display: block; margin: 4px auto 0; padding: 10px; color: var(--slate); font-size: .86rem; }
.view-staff .empty { padding: 26px 16px; }
.view-staff .empty-pic { display: block; width: 72px; height: 72px; margin: 0 auto 10px; }
.view-staff .empty-pic.wide { width: 160px; height: auto; margin-bottom: 14px; }
.view-staff .chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: var(--tray); color: var(--ink-2); font-size: .8rem; font-weight: 700; }
.view-staff .chip.live { background: #E1F3E9; color: #1D6A49; }
/* the live dot: a soft ring keeps spreading from it */
.view-staff .live-dot { position: relative; flex: none; width: 9px; height: 9px; background: #2E7D5B; box-shadow: none; vertical-align: 0; }
.view-staff .live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }

/* buttons */
.view-staff .btn { min-height: 50px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--inkfill); color: #fff; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 12px 22px -14px rgba(44,22,84,.9);
  transition: transform .25s var(--spring), filter .2s; -webkit-tap-highlight-color: transparent; }
.view-staff .btn:hover { background: linear-gradient(180deg, #4F4066, #33293D); }
.view-staff .btn:active { transform: scale(.965); filter: brightness(1.1); }
.view-staff .btn.ghost { border: 1px solid var(--hair); background: var(--glass); color: var(--ink); box-shadow: var(--sh-1); }
.view-staff .btn.ghost:hover { border-color: rgba(44,36,51,.28); background: #fff; }
.view-staff .btn.small { min-height: 44px; padding: 0 14px; border-radius: 14px; }
.view-staff .btn.cta { min-height: 56px; border-radius: 18px; font-size: 1.05rem; }
.view-staff .btn[disabled] { opacity: .45; }
.view-staff .btn svg { width: 20px; height: 20px; }
.view-staff .link { position: relative; text-underline-offset: 3px; }
.view-staff .link::after { content: ''; position: absolute; inset: -12px -6px; } /* a bigger area for the finger */

/* forms: rose = errors only; focus stays ink */
.view-staff .input, .view-staff select.input, .view-staff textarea.input { min-height: 54px; padding: 12px 14px; border: 1.5px solid rgba(44,36,51,.14); border-radius: 16px;
  background: #fff; font-size: 1.05rem; transition: border-color .15s, box-shadow .15s; }
.view-staff textarea.input { min-height: 96px; }
.view-staff .input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(44,36,51,.14); }
.view-staff .input.err { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(203,74,104,.14); }
.view-staff .input.fixed { border-color: transparent; background: var(--tray); color: var(--ink-2); }
.view-staff .field label, .view-staff .field .lab { margin-bottom: 7px; font-size: .9rem; }
.view-staff .form-error { border-radius: 14px; }
.view-staff .voice-btn { top: 5px; right: 5px; background: var(--acc-soft); color: var(--acc-ink); transition: transform .25s var(--spring); }
.view-staff .voice-btn:active { transform: scale(.9); }
.view-staff .voice-btn.on { background: #C62828; color: #fff; }

/* ---------- Dashboard: greeting with the building ---------- */
.view-staff .hero { --tl: 130px; position: relative; isolation: isolate; display: flex; align-items: stretch; min-height: 182px; margin-bottom: 16px; padding: 18px 14px 16px 18px;
  overflow: hidden; border-radius: var(--r-xl); color: var(--ink); text-decoration: none; box-shadow: var(--sh-2); transition: transform .3s var(--spring); }
.view-staff .hero:active { transform: scale(.985); }
.view-staff .hero-tx { position: relative; z-index: 2; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view-staff .eyebrow { margin: 0 0 6px; font: 700 .74rem/1.2 var(--body); letter-spacing: .03em; opacity: .72; }
.view-staff .hero-hi { margin: 0; font: 800 1.3rem/1.25 var(--display); }
.view-staff .hero-hi b { font-size: 1.95rem; line-height: 1.15; }
.view-staff .hero-date { margin: 5px 0 0; font-size: .86rem; opacity: .84; }
.view-staff .hero-lit { display: flex; flex-direction: column; gap: 2px; margin: auto 0 0; padding-top: 14px; font-size: .78rem; font-weight: 600; }
.view-staff .hero-lit .num { display: inline-flex; align-items: center; gap: 8px; font: 800 1.5rem/1.1 var(--display); font-stretch: 125%; }
.view-staff .lit-key { width: 16px; height: 12px; border-radius: 3.5px; background: var(--win-on); box-shadow: 0 0 0 2px rgba(255,214,107,.3), 0 0 10px rgba(255,196,60,.9); }
.view-staff .hero-tower { position: relative; z-index: 1; flex: none; align-self: flex-end; width: 116px; margin: -4px 0 -16px 8px; }
.view-staff .tower { display: block; width: 100%; height: auto; max-height: 178px; overflow: visible; filter: drop-shadow(0 10px 12px rgba(40,22,70,.3)); } /* a very tall building is scaled down to fit */
.view-staff .t-body { fill: var(--t-body); } .view-staff .t-roof { fill: var(--t-roof); } .view-staff .t-tank, .view-staff .t-pole { fill: var(--t-tank); }
.view-staff .t-door { fill: var(--t-door); }
.view-staff .win { fill: var(--win-off); }
.view-staff .win.lit { fill: var(--win-on); }
/* the lights come on floor by floor, from the ground up */
.view-staff .main:not(.soft) .win.lit { animation: win-on .5s both; animation-delay: calc(var(--k) * 60ms + 420ms); }
@keyframes win-on { from { fill: var(--win-off); } }
/* the five skies (Dhaka time): dawn, day, golden afternoon, dusk, night */
.view-staff .sky { --t-body: #FCFAFF; --t-roof: #3D314C; --t-tank: #7A6990; --t-door: #5A4690; --win-off: #C8CEE3; --win-on: #FFC233; }
.view-staff .sky-dawn { background: linear-gradient(165deg, #FFE9D2 0%, #FFD2BF 40%, #E2CEF7 100%); }
.view-staff .sky-day { background: linear-gradient(165deg, #CBE8FF 0%, #E2F0FF 50%, #F0E8FF 100%); }
.view-staff .sky-golden { background: linear-gradient(165deg, #FFF1CC 0%, #FFDAAB 46%, #F6C4C1 100%); }
.view-staff .sky-dusk, .view-staff .sky-night { color: #fff; --t-body: #3A2C5E; --t-roof: #1C1530; --t-tank: #2A2046; --t-door: #1C1530; --win-off: #221A3D; --win-on: #FFD66B; }
.view-staff .sky-dusk { background: linear-gradient(110deg, #2B2050 0%, #57347F 46%, #C4627A 86%, #FFAE78 112%); }
.view-staff .sky-night { background: linear-gradient(160deg, #181131 0%, #2A1F52 56%, #47306F 100%); }
.view-staff .sky-dusk .t-wins, .view-staff .sky-night .t-wins { filter: drop-shadow(0 0 2.5px rgba(255,214,107,.85)); }
.view-staff .sky-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.view-staff .sky-orb { position: absolute; top: 12px; right: calc(var(--tl) - 24px); width: 50px; height: 50px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF9DC, #FFD45C 55%, #F6A93B); box-shadow: 0 0 0 10px rgba(255,214,107,.2), 0 0 40px 12px rgba(255,190,80,.42); }
.view-staff .sky-dawn .sky-orb { top: 96px; right: calc(var(--tl) - 32px); }
.view-staff .sky-golden .sky-orb { top: 70px; right: calc(var(--tl) - 30px); background: radial-gradient(circle at 35% 30%, #FFF1C2, #FFB84D 55%, #F58A2B); }
.view-staff .sky-dusk .sky-orb { top: auto; bottom: -22px; right: calc(var(--tl) - 46px); background: radial-gradient(circle at 40% 30%, #FFE7B8, #FF9D5C 58%, #F26B3A); box-shadow: 0 0 60px 22px rgba(255,150,90,.5); }
.view-staff .sky-night .sky-orb { top: 14px; right: calc(var(--tl) - 18px); width: 36px; height: 36px; background: radial-gradient(circle at 35% 30%, #FFFEF4, #F1E8C8 60%, #D5C89D);
  box-shadow: 0 0 0 8px rgba(255,255,255,.06), 0 0 30px 6px rgba(255,244,200,.28); }
/* when the Dashboard opens, the sun (or moon) comes up a little */
.view-staff .main:not(.soft) .sky-orb { animation: orb-in 1.4s var(--ease) .1s backwards; }
@keyframes orb-in { from { transform: translateY(24px) scale(.9); opacity: .35; } }
.view-staff .sky-cloud { position: absolute; width: 54px; height: 18px; border-radius: 12px; background: rgba(255,255,255,.88); }
.view-staff .sky-cloud::before, .view-staff .sky-cloud::after { content: ''; position: absolute; border-radius: 50%; background: inherit; }
.view-staff .sky-cloud::before { left: 9px; top: -10px; width: 22px; height: 22px; }
.view-staff .sky-cloud::after { left: 22px; top: -15px; width: 28px; height: 28px; }
.view-staff .sky-cloud.c1 { top: 30px; right: calc(var(--tl) + 20px); transform: scale(.8); }
.view-staff .sky-cloud.c2 { top: 150px; right: calc(var(--tl) + 2px); transform: scale(.55); opacity: .8; }
.view-staff .sky-dusk .sky-cloud, .view-staff .sky-night .sky-cloud { background: rgba(255,255,255,.1); }
.view-staff .sky-stars { position: absolute; inset: 0; opacity: 0;
  background-image: radial-gradient(1.4px 1.4px at 9% 20%, #fff 98%, transparent), radial-gradient(1.2px 1.2px at 22% 62%, #fff 98%, transparent), radial-gradient(1.6px 1.6px at 37% 12%, #fff 98%, transparent),
    radial-gradient(1.1px 1.1px at 46% 44%, #fff 98%, transparent), radial-gradient(1.5px 1.5px at 57% 78%, #fff 98%, transparent), radial-gradient(1.2px 1.2px at 71% 9%, #fff 98%, transparent),
    radial-gradient(1.3px 1.3px at 83% 33%, #fff 98%, transparent), radial-gradient(1.1px 1.1px at 93% 16%, #fff 98%, transparent), radial-gradient(1.2px 1.2px at 30% 88%, #fff 98%, transparent); }
.view-staff .sky-night .sky-stars { opacity: .8; }
.view-staff .sky-dusk .sky-stars { opacity: .35; }

/* ---------- Dashboard: chart cards ---------- */
.view-staff .dash { gap: 12px; grid-template-columns: minmax(0, 1fr); } /* a card can never be wider than the screen */
@media (min-width: 720.02px) { .view-staff .dash-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.view-staff .dash-sec { margin-bottom: 22px; }
.view-staff .dash-link > .card { transition: transform .3s var(--spring), box-shadow .2s; }
.view-staff .dash-link:hover > .card, .view-staff .dash-link:focus-visible > .card { border-color: var(--edge); box-shadow: var(--sh-2); }
.view-staff .dash-link:active > .card { transform: scale(.98); }
.view-staff .dn { padding: 16px 16px 10px; }
.view-staff .dn-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.view-staff .dn-txt { flex: 1; min-width: 0; }
.view-staff .dn-txt h3 { margin: 0 0 8px; color: var(--ink-2); font-size: .95rem; line-height: 1.3; }
.view-staff .dash-link .dn-txt h3::after { content: ' ›'; color: var(--acc); font-weight: 800; } /* shows that the card opens a page */
.view-staff .cap { margin-top: 5px; color: var(--slate); font-size: .86rem; font-weight: 600; }
.view-staff .dn-ring { position: relative; flex: none; width: 104px; height: 104px; }
.view-staff .dn-ring svg { display: block; width: 100%; height: 100%; }
.view-staff .dn-track { stroke: #ECE7F3; }
.view-staff .dn-seg:hover { stroke-width: 16; }
.view-staff .dn-pic { position: absolute; inset: 0; width: 44px; height: 44px; margin: auto; }
.view-staff .dn-pic.lone { position: static; flex: none; width: 66px; height: 66px; margin: 0; }
.view-staff .dn-legend { min-width: 0; margin: 12px 0 0; padding: 2px 0 0; border-top: 1px dashed rgba(44,36,51,.14); font-size: .86rem; }
.view-staff .dn-legend li { grid-template-columns: 12px 1fr auto 40px; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--hair); }
.view-staff .dn-legend li:last-child { border-bottom: 0; }
.view-staff .dn-legend i { border-radius: 4px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); }
.view-staff .dn-legend b { font-family: var(--display); font-weight: 800; }
.view-staff .dn-small { font: 600 11px var(--body); fill: var(--slate); }
/* bars: the type and the amount on one line, the bar under them */
.view-staff .hbars { gap: 12px; margin-top: 14px; padding: 14px 0 6px; border-top: 1px dashed rgba(44,36,51,.14); }
.view-staff .hbar { grid-template-columns: 1fr auto; gap: 5px 10px; font-size: .9rem; }
.view-staff .hbar-l { overflow: visible; white-space: normal; }
.view-staff .hbar b { font-family: var(--display); font-weight: 800; }
.view-staff .hbar-t { grid-column: 1 / -1; height: 9px; border-radius: 99px; background: var(--tray); }
.view-staff .hbar-t i { border-radius: 99px; background: linear-gradient(90deg, #FFB483, #F26B3A); transform-origin: left center; }
/* fuel dial */
.view-staff .dial { flex: none; width: 126px; }
.view-staff .dial svg { display: block; width: 100%; overflow: visible; }
.view-staff .dial-track, .view-staff .dial-fill { fill: none; stroke-width: 13; stroke-linecap: round; }
.view-staff .dial-track { stroke: #ECE7F3; }
.view-staff .dial-needle { transform: rotate(var(--deg)); transform-origin: 60px 66px; }
.view-staff .dial-needle path { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.view-staff .dial-needle circle { fill: var(--ink); stroke: #fff; stroke-width: 2.5; }
/* charts draw themselves when they come onto the screen (staff-ui.js adds rv-wait, then rv-go) */
.view-staff .rv-wait .dn-sweep { stroke-dashoffset: var(--len); }
.view-staff .rv-go .dn-sweep { animation: sweep 1.1s var(--ease) .15s backwards; }
@keyframes sweep { from { stroke-dashoffset: var(--len); } }
.view-staff .rv-wait .hbar-t i { transform: scaleX(0); }
.view-staff .rv-go .hbar-t i { animation: grow-x .8s var(--ease) backwards; animation-delay: calc(var(--k) * 70ms + 150ms); }
@keyframes grow-x { from { transform: scaleX(0); } }
.view-staff .rv-wait .dial-fill { stroke-dasharray: 0 100; }
.view-staff .rv-go .dial-fill { animation: dial-in 1.1s var(--ease) .15s backwards; }
@keyframes dial-in { from { stroke-dasharray: 0 100; } }
.view-staff .rv-wait .dial-needle { transform: rotate(-90deg); }
.view-staff .rv-go .dial-needle { animation: needle 1.3s var(--spring) .15s backwards; }
@keyframes needle { from { transform: rotate(-90deg); } }

/* low fuel banner */
.view-staff .gen-alert { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px; border-radius: 20px;
  background: linear-gradient(135deg, #D8362E, #B3201A); box-shadow: 0 14px 26px -14px rgba(198,40,40,.85); font-size: 1rem; line-height: 1.35; }
.view-staff .alert-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #C62828;
  font: 800 1.25rem/1 var(--display); font-style: normal; animation: nudge 2.6s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-12deg) scale(1.08); } 86% { transform: rotate(10deg) scale(1.08); } 94% { transform: rotate(-4deg); } }

/* ---------- tips from the little house ---------- */
.view-staff .coach { display: flex; align-items: flex-end; gap: 6px; margin: 0 0 12px; transition: opacity .2s, transform .2s; }
.view-staff .coach-m { flex: none; width: 46px; height: 46px; }
.view-staff .coach-b { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 46px; padding: 9px 9px 9px 14px; border: 0; border-radius: 18px 18px 18px 6px;
  background: var(--inkfill); color: #fff; font-size: .92rem; line-height: 1.35; text-align: left; cursor: pointer;
  box-shadow: 0 12px 22px -14px rgba(44,22,84,.9); transition: transform .25s var(--spring); -webkit-tap-highlight-color: transparent; }
.view-staff .coach-b:active { transform: scale(.97); }
.view-staff .coach-t b { color: #FFE08A; }
.view-staff .coach-x { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); font-size: 1.1rem; line-height: 1; }
.view-staff .main:not(.soft) .coach, .view-staff .modal .coach { animation: coach-in .5s var(--spring) .45s backwards; }
@keyframes coach-in { from { opacity: 0; transform: translateY(8px) scale(.9); } }
.view-staff .coach.bye { opacity: 0; transform: scale(.92); }
.view-staff .mascot .m-body { fill: var(--acc); }
.view-staff .mascot .m-eyes { transform-origin: 32px 40px; animation: blink 4.6s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.1); } }

/* ---------- Collection: choosers, the building, the flats ---------- */
.view-staff .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.view-staff .filters.one { grid-template-columns: 1fr; margin-bottom: 8px; }
.view-staff .bill-line { margin: 0 2px 12px; }
.view-staff .pick-btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; width: 100%; min-height: 58px; padding: 8px 12px 8px 14px;
  border: 1px solid var(--edge); border-radius: 18px; background: var(--glass); box-shadow: var(--sh-1); color: var(--ink); text-align: left; cursor: pointer;
  transition: transform .25s var(--spring); -webkit-tap-highlight-color: transparent; }
.view-staff .pick-btn small { grid-column: 1; color: var(--slate); font-size: .74rem; font-weight: 700; line-height: 1.2; }
.view-staff .pick-btn span { grid-column: 1; overflow: hidden; font: 800 1.08rem/1.35 var(--display); text-overflow: ellipsis; white-space: nowrap; }
.view-staff .pick-btn i { grid-column: 2; grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-ink); font-size: .8rem; font-style: normal; }
.view-staff .pick-btn:active { transform: scale(.97); }

.view-staff .building { padding: 16px 12px 0; border-radius: 26px; }
.view-staff .bv-roof { position: relative; height: 13px; margin: 0 2px 9px 30px; border-radius: 8px 8px 3px 3px; opacity: 1;
  background: linear-gradient(180deg, #56456C, #2C2433); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 4px 8px -4px rgba(44,36,51,.5); }
.view-staff .bv-roof::before { content: ''; position: absolute; right: 18px; bottom: 100%; width: 26px; height: 8px; border-radius: 4px 4px 0 0; background: #75638C; } /* water tank */
.view-staff .bv-floor { grid-template-columns: 24px repeat(var(--cols), minmax(0, 1fr)); }
.view-staff .main:not(.soft) .bv-floor { animation: floor-in .45s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 26ms + 60ms); }
@keyframes floor-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.view-staff .bv-fl { padding-right: 2px; font: 800 .76rem/1 var(--display); }
/* a flat: a glossy tile in its status colour, with the flat number on a small white plate */
.view-staff .flat { align-items: center; gap: 3px; min-height: 56px; padding: 6px 2px 5px; border-radius: 14px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.3), 0 5px 9px -5px rgba(44,36,51,.45);
  transition: transform .3s var(--spring), filter .2s; -webkit-tap-highlight-color: transparent; }
.view-staff .flat::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 48%); pointer-events: none; }
.view-staff .flat:active { transform: scale(.92); filter: brightness(1.07); }
.view-staff .flat:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.view-staff .flat .fc { position: relative; padding: 1px 6px; border-radius: 7px; background: rgba(255,255,255,.95); color: var(--ink); font: 800 .8rem/1.3 var(--display); text-shadow: none; box-shadow: 0 1px 2px rgba(0,0,0,.22); }
.view-staff .flat .fa { position: relative; max-width: 100%; font: 800 .68rem/1.2 var(--display); opacity: 1; }
.view-staff .flat .fa em { display: block; font-size: .58rem; font-style: normal; font-weight: 700; }
@media (max-width: 380px) { .view-staff .flat .fa { display: block; } }
@media (max-width: 339.98px) { .view-staff .flat .fa { display: none; } }
.view-staff .flat.paid { background: #2E7D5B; color: #fff; }
.view-staff .flat.pending { background: #D99A00; color: #2C2433; }
.view-staff .flat.unpaid { background: #8A8F98; color: #2C2433; }
.view-staff .flat.gaslate { background: #C62828; color: #fff; }
.view-staff .flat.handed { background: #2B5BA8; color: #fff; }
.view-staff .flat.none, .view-staff .flat.titas { color: var(--slate); box-shadow: inset 0 0 0 1.5px rgba(44,36,51,.16); }
.view-staff .flat.none { background: rgba(255,255,255,.5); }
.view-staff .flat.titas { background: repeating-linear-gradient(135deg, rgba(255,255,255,.5) 0 6px, rgba(44,36,51,.09) 6px 8px); }
.view-staff .flat.none::before, .view-staff .flat.titas::before { display: none; }
.view-staff .flat.none .fc, .view-staff .flat.titas .fc { background: none; box-shadow: none; color: var(--ink-2); }
/* All tab: left half = gas, right half = service charge, a thin white line between them */
.view-staff .flat.split { color: #fff; text-shadow: none;
  background: linear-gradient(90deg, var(--g) 0 calc(50% - .75px), rgba(255,255,255,.75) calc(50% - .75px) calc(50% + .75px), var(--s) calc(50% + .75px) 100%); }
.view-staff .flat.split .fa { padding: 1px 5px; border-radius: 6px; background: rgba(22,14,32,.6); color: #fff; }
/* no gas bill: one colour (the service charge) with a dashed white frame */
.view-staff .flat.split.nogas { background: var(--s); outline: 2px dashed rgba(255,255,255,.95); outline-offset: -5px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.3), 0 5px 9px -5px rgba(44,36,51,.45); }
.view-staff .flat.split.nogas:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.view-staff .flat.xtra::after { top: 4px; right: 4px; width: 10px; height: 10px; box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 1px 3px rgba(0,0,0,.45); }
/* after a save, the flat that changed gives a little jump and a gold ring spreads from it */
.view-staff .flat.just { z-index: 3; animation: cell-pop 1s var(--spring); }
@keyframes cell-pop { 0% { transform: scale(.72); box-shadow: 0 0 0 0 rgba(246,196,69,.95); } 40% { transform: scale(1.2); } 100% { transform: scale(1); box-shadow: 0 0 0 18px rgba(246,196,69,0); } }
.view-staff .bv-ground { margin: 4px -12px 0; padding: 11px 14px 12px 42px; border-top: 0; background: linear-gradient(180deg, #EDE8F3, #E3DCEC); box-shadow: inset 0 3px 0 #2C2433; font-weight: 600; }
/* colour key under the table */
.view-staff .legend { gap: 7px; margin: 12px 0 0; color: var(--ink-2); font-size: .8rem; }
.view-staff .legend > span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 7px; border: 1px solid var(--hair); border-radius: 999px; background: rgba(255,255,255,.78); font-weight: 600; }
.view-staff .legend i.flat { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; border-radius: 6px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.16); pointer-events: none; }
.view-staff .legend i.flat.none, .view-staff .legend i.flat.titas { box-shadow: inset 0 0 0 1.5px rgba(44,36,51,.2); }
.view-staff .legend i.flat.nogas { outline-width: 1.5px; outline-offset: -4px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.16); }
/* All tab: what the halves, the dot and the dashed frame mean */
.view-staff .key-card { margin-top: 16px; padding: 16px 16px 8px; }
.view-staff .key-card h2 { margin: 0; }
.view-staff .key-card p { margin: 4px 0 12px; }
.view-staff .key-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed rgba(44,36,51,.14); color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.view-staff .key-tile { flex: none; flex-direction: row; gap: 0; width: 96px; min-height: 42px; padding: 0; cursor: default; pointer-events: none; font: 800 .72rem/1 var(--display); }
.view-staff .key-tile > span { position: relative; flex: 1; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.view-staff .grid-foot { display: grid; gap: 10px; margin-top: 16px; }
.view-staff .price-line { margin: 0 2px; }
.view-staff .print-row { gap: 8px; }
.view-staff .print-row .btn { flex: 1 1 auto; }

/* ---------- popups (sheets that slide up from the bottom) ---------- */
.view-staff .modal-back { background: rgba(26,16,42,.5); animation: fade .2s; }
.view-staff .modal { padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: linear-gradient(180deg, #fff, #FBF9FE);
  box-shadow: 0 -20px 50px -16px rgba(26,16,42,.55); animation: sheet-up .42s cubic-bezier(.16,1,.3,1); }
.view-staff .modal::before { content: ''; display: block; width: 46px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: rgba(44,36,51,.16); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.view-staff .modal-back.closing { pointer-events: none; animation: fade-out .18s forwards; }
.view-staff .modal-back.closing .modal { animation: sheet-down .18s ease-in forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-down { to { transform: translateY(50%); opacity: 0; } }
.view-staff .modal .mh { align-items: center; margin-bottom: 14px; }
.view-staff .modal .mh h2 { flex: 1; min-width: 0; font: 800 1.5rem/1.25 var(--display); }
.view-staff .modal .x { width: 44px; height: 44px; background: var(--tray); color: var(--ink); font-size: 1.45rem; line-height: 1; transition: transform .25s var(--spring); }
.view-staff .modal .x:active { transform: scale(.9); }
.view-staff .sheet-pic { flex: none; width: 46px; height: 46px; }
.view-staff .payer { display: flex; align-items: center; gap: 11px; margin: -2px 0 14px; padding: 10px 12px; border-radius: 16px; background: var(--acc-soft); color: var(--acc-ink); }
.view-staff .payer svg { flex: none; width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: #fff; }
.view-staff .payer div { display: flex; flex-direction: column; min-width: 0; font-size: .9rem; line-height: 1.35; }
.view-staff .payer b { overflow: hidden; color: var(--ink); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.view-staff .stmt { padding: 3px 14px; border-radius: 16px; background: #F6F3FA; }
.view-staff .stmt .line { gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(44,36,51,.15); }
.view-staff .stmt .line:last-child { border-bottom: 0; }
.view-staff .stmt .line.total { align-items: center; font-weight: 700; }
.view-staff .stmt .line.total > span:last-child, .view-staff .stmt .line b { font: 800 1.2rem/1.2 var(--display); white-space: nowrap; }
.view-staff .stmt.due, .view-staff .stmt.waiting, .view-staff .stmt.used-line { margin-top: 10px; }
.view-staff .stmt.due .line.total > span:last-child { font-size: 1.6rem; font-stretch: 125%; }
.view-staff .stmt.used-line { margin: -4px 0 12px; }
.view-staff .sheet-meta { margin: 10px 2px; color: var(--ink-2); }
.view-staff .sheet-note { margin: 12px 2px 0; }
.view-staff .sheet-text { margin: 12px 2px 0; }
.view-staff .sheet-acts { display: grid; gap: 9px; margin-top: 12px; }
.view-staff .payby { display: flex; align-items: center; gap: 8px; margin: 12px 2px 8px; color: var(--slate); font-size: .92rem; }
.view-staff .payby b { color: var(--ink); }
.view-staff .payby-ic { flex: none; width: 26px; height: 26px; }
.view-staff .tick-note { margin: 0 2px 8px; }
.view-staff .ticks { box-shadow: none; border-color: var(--hair); }
.view-staff .ticks .li { min-height: 58px; cursor: pointer; }
.view-staff .ticks input { flex: none; width: 26px; height: 26px; accent-color: var(--ink); }
.view-staff .done-note { text-align: center; }
/* Buttons that wait 0.6 s before they work (so a double tap on a flat can not press them): a light veil wipes off while they wait. */
.view-staff .guard { position: relative; overflow: hidden; }
.view-staff .guard::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.42); transform: scaleX(0); transform-origin: right center; animation: arm .6s linear backwards; pointer-events: none; }
@keyframes arm { from { transform: scaleX(1); } }

/* full-screen chooser for Floor / Flat / Bill */
.view-staff .fpick { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: fpick-in .3s var(--ease);
  background: radial-gradient(70% 36% at 105% -4%, color-mix(in srgb, var(--acc-2) 46%, transparent) 0%, transparent 72%), radial-gradient(80% 34% at 30% 108%, color-mix(in srgb, var(--acc-2) 30%, transparent) 0%, transparent 72%), var(--ground); }
@keyframes fpick-in { from { opacity: 0; transform: translateY(16px); } }
.view-staff .fpick-head h2 { font: 800 1.75rem/1.2 var(--display); }
.view-staff .fpick-x { border: 1px solid var(--edge); background: var(--glass); box-shadow: var(--sh-1); font-size: 1.7rem; transition: transform .25s var(--spring); }
.view-staff .fpick-x:active { transform: scale(.9); }
/* big buttons, but never taller than a hand: with only one or two choices they do not swell to fill the screen */
.view-staff .fpick-grid { grid-auto-rows: minmax(72px, 148px); align-content: start; }
.view-staff .fpick-opt { border: 1px solid var(--edge); border-radius: 22px; background: var(--glass); box-shadow: var(--sh-1); font: 800 1.35rem/1.25 var(--display);
  transition: transform .25s var(--spring); animation: pop-in .4s var(--spring) backwards; animation-delay: calc(var(--k) * 16ms + 40ms); -webkit-tap-highlight-color: transparent; }
@keyframes pop-in { from { opacity: 0; transform: scale(.82); } }
.view-staff .fpick-opt.on { border-color: transparent; background: var(--inkfill); color: #fff; }
.view-staff .fpick-opt:active { transform: scale(.95); }

/* ---------- Expense ---------- */
.view-staff .month-bar { margin: 0 0 12px; }
.view-staff .month-bar .row { justify-content: space-between; gap: 8px; padding: 5px; border: 1px solid var(--edge); border-radius: 20px; background: rgba(255,255,255,.74); box-shadow: var(--sh-1); }
.view-staff .month-bar .btn { width: 46px; min-height: 46px; padding: 0; border: 0; border-radius: 15px; background: var(--acc-soft); color: var(--acc-ink); box-shadow: none; font-size: 1.5rem; line-height: 1; }
.view-staff .month-bar .mono { flex: 1; font: 800 1.08rem/1.2 var(--display); }
.view-staff .exp-table tr[data-e] { cursor: pointer; }
.view-staff .exp-table tr[data-e]:hover { background: rgba(255,255,255,.7); }
.view-staff .x-date b { font: 800 1.05rem/1 var(--display); }
.view-staff .x-date span { color: var(--slate); font-size: .8rem; }
.view-staff .x-type span { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--acc-soft); color: var(--acc-ink); font-size: .78rem; font-weight: 700; }
.view-staff .x-by { font-size: .86rem; }
.view-staff .by-inline { display: none; color: var(--slate); font-size: .78rem; font-style: normal; }
/* phones: each expense is a card row instead of a wide table (no sideways scrolling) */
@media (max-width: 719.98px) {
  .view-staff .exp-table, .view-staff .exp-table tbody, .view-staff .exp-table tfoot { display: block; }
  .view-staff .exp-table thead { display: none; }
  .view-staff .exp-table tr { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; grid-template-areas: "date what amt" "date type type"; gap: 5px 12px; align-items: start;
    padding: 13px 14px; border-top: 1px solid var(--hair); }
  .view-staff .exp-table tbody tr:first-child { border-top: 0; }
  .view-staff .exp-table td { display: block; padding: 0; border: 0; }
  .view-staff .exp-table .x-date { grid-area: date; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px;
    border-radius: 14px; background: var(--acc-soft); color: var(--acc-ink); text-align: center; }
  .view-staff .exp-table .x-date b { font-size: 1.2rem; }
  .view-staff .exp-table .x-date span { color: inherit; font-size: .64rem; font-weight: 700; }
  .view-staff .exp-table .x-what { grid-area: what; line-height: 1.35; }
  .view-staff .exp-table .x-amt { grid-area: amt; font-size: 1.05rem; text-align: right; }
  .view-staff .exp-table .x-type { grid-area: type; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .view-staff .exp-table .x-by { display: none; }
  .view-staff .by-inline { display: inline; }
  .view-staff .exp-table tfoot tr { grid-template-areas: "total total amt"; align-items: center; background: #F6F3FA; }
  .view-staff .exp-table .x-total { grid-area: total; }
}

/* ---------- Apartment bills ---------- */
.view-staff .apt-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.view-staff .apt-bill { position: relative; overflow: hidden; gap: 6px; min-height: 140px; padding: 14px 6px 12px; border: 1px solid var(--edge); border-radius: 22px;
  background: var(--glass); box-shadow: var(--sh-1); font-size: .98rem; line-height: 1.25; transition: transform .3s var(--spring); -webkit-tap-highlight-color: transparent; }
.view-staff .apt-bill::before { content: ''; position: absolute; inset: 0 0 auto; height: 66%; background: radial-gradient(90% 100% at 50% 0%, var(--tint), transparent 72%); pointer-events: none; }
.view-staff .apt-electricity { --tint: #FFF0B8; } .view-staff .apt-water { --tint: #D6ECFF; } .view-staff .apt-gas { --tint: #FFDFC9; }
.view-staff .apt-ic { position: relative; width: 62px; height: 62px; font-size: inherit; line-height: inherit; transition: transform .45s var(--spring); }
.view-staff .apt-bill b, .view-staff .apt-bill .small { position: relative; }
.view-staff .apt-bill .small { font-size: .74rem; }
.view-staff .apt-bill:active { transform: scale(.95); }
.view-staff .apt-bill:active .apt-ic { transform: scale(1.14) rotate(-6deg); }

/* ---------- Gas reading: one row for each flat, last month fixed, − / + for this month ---------- */
.view-staff .gas-row { padding: 9px 12px; border-top: 1px solid var(--hair); }
.view-staff .gas-step .gas-row { grid-template-columns: 42px minmax(50px, .7fr) minmax(144px, 1.7fr) minmax(30px, auto); gap: 6px; padding: 8px 10px; }
.view-staff .gas-head { font-size: .72rem; letter-spacing: 0; text-transform: none; }
.view-staff .gas-row .code { justify-self: start; padding: 4px 6px; border-radius: 9px; background: var(--acc-soft); color: var(--acc-ink); font: 800 .86rem/1.2 var(--display); }
.view-staff .gas-row .input { min-height: 46px; padding: 6px 4px; border-radius: 13px; font: 800 1rem/1.2 var(--display); text-align: center; }
.view-staff .gas-row .input.fixed { background: none; color: var(--slate); }
.view-staff .gas-row .u { font: 800 .92rem/1.2 var(--display); }
.view-staff .stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
.view-staff .st-btn { height: 46px; border: 0; border-radius: 14px; background: var(--tray); font: 800 1.35rem/1 var(--display); transition: transform .2s var(--spring); -webkit-tap-highlight-color: transparent; }
.view-staff .st-btn.plus { background: var(--inkfill); color: #fff; }
.view-staff .st-btn:active { transform: scale(.86); }
.view-staff .st-btn:disabled { opacity: .35; }
.view-staff .stepper.big-step { grid-template-columns: 58px minmax(0, 1fr) 58px; gap: 8px; }
.view-staff .big-step .st-btn { height: 58px; border-radius: 18px; font-size: 1.7rem; }
.view-staff .big-step .input { min-height: 58px; font: 800 1.5rem/1.2 var(--display); font-stretch: 125%; text-align: center; }
.view-staff #gf > div:last-child .btn { min-height: 56px; border-radius: 18px; font-size: 1.05rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 16px 28px -12px rgba(44,22,84,.95); }

/* ---------- Generator ---------- */
.view-staff .gen-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 4px; align-content: center; min-height: 204px;
  margin-bottom: 14px; padding: 16px 6px 16px 18px; overflow: hidden; border-radius: var(--r-xl); color: #fff; box-shadow: var(--sh-2);
  background: radial-gradient(120% 90% at 100% 0%, #26406F 0%, transparent 60%), linear-gradient(150deg, #1B2444 0%, #231A3A 70%, #2C2433 100%); }
.view-staff .gen-hero.on { background: radial-gradient(110% 95% at 100% 10%, #1D6177 0%, transparent 62%), linear-gradient(150deg, #132B45 0%, #1B2444 60%, #231A3A 100%); }
/* the title and the "live" line run across the top; the status sits below on the left, the picture on the right */
.view-staff .gh-tx { display: contents; }
.view-staff .gh-tx > * { position: relative; z-index: 2; grid-column: 1; }
.view-staff .gen-hero h1 { grid-column: 1 / -1; margin: 0 0 4px; font: 700 .74rem/1.2 var(--body); letter-spacing: .03em; opacity: .72; }
.view-staff .gh-live { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin: 0 12px 6px 0; font-size: .8rem; line-height: 1.3; opacity: .92; }
.view-staff .gen-hero .live-dot { background: #5CF2A5; }
.view-staff .gh-lost { color: #FFB8C4; }
.view-staff .gh-k { align-self: end; font-size: .8rem; font-weight: 600; opacity: .72; }
.view-staff .gh-big { font: 800 2.7rem/1.18 var(--display); letter-spacing: -.01em; }
.view-staff .gen-hero.on .gh-big { color: #7DF2B6; text-shadow: 0 0 22px rgba(92,242,165,.45); }
.view-staff .gh-since { align-self: start; margin-top: 2px; font-size: .92rem; opacity: .84; }
.view-staff .gh-art { position: relative; z-index: 1; grid-column: 2; grid-row: 3 / 6; align-self: center; width: 152px; }
.view-staff .gh-art .clay { position: relative; z-index: 1; height: auto; } /* the picture sits in front of the spreading rings */
.view-staff .gen-hero.lost .gh-art { filter: grayscale(.9) opacity(.6); }
.view-staff .gh-pulse { position: absolute; left: 50%; top: 54%; width: 112px; height: 112px; margin: -56px 0 0 -56px; border: 2px solid rgba(92,242,165,.55); border-radius: 50%; opacity: 0; }
.view-staff .gen-hero.on .gh-pulse { animation: ring 2.4s ease-out infinite; }
.view-staff .gen-hero.on .gh-pulse.p2 { animation-delay: 1.2s; }
@keyframes ring { from { transform: scale(.55); opacity: .8; } to { transform: scale(1.45); opacity: 0; } }
/* the generator picture: when it runs, the fan turns, the light blinks green, smoke puffs rise and the body hums */
.view-staff .g-led { fill: #5F6D94; }
.view-staff .g-puff { fill: #fff; opacity: 0; transform-box: fill-box; transform-origin: center; }
.view-staff .gen-art.on .g-led { fill: #5CF2A5; filter: drop-shadow(0 0 3px #5CF2A5); animation: led 1.1s ease-in-out infinite alternate; }
@keyframes led { to { opacity: .5; } }
.view-staff .gen-art.on .g-puff { animation: puff 2.1s ease-out infinite; }
.view-staff .gen-art.on .g-puff.p2 { animation-delay: .7s; }
.view-staff .gen-art.on .g-puff.p3 { animation-delay: 1.4s; }
@keyframes puff { 0% { opacity: 0; transform: translate(0, 5px) scale(.5); } 22% { opacity: .75; } 100% { opacity: 0; transform: translate(11px, -24px) scale(1.6); } }
.view-staff .gen-art.on .g-fan { transform-origin: 56px 71px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.view-staff .gen-art.on .g-body { animation: hum .16s linear infinite alternate; }
@keyframes hum { to { transform: translateY(.9px); } }
/* fuel: a tank that fills to the level, with a small wave on top */
.view-staff .fuel-card { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.view-staff .tank { --liq: #2E7D5B; --liq-2: #5DBB90; position: relative; flex: none; width: 92px; height: 124px; overflow: hidden; border-radius: 26px 26px 22px 22px; background: var(--tray);
  box-shadow: inset 0 0 0 3px #fff, inset 0 6px 14px rgba(44,36,51,.18), 0 10px 18px -10px rgba(62,38,96,.5); }
.view-staff .tank.pending { --liq: #D99A00; --liq-2: #F4C552; }
.view-staff .tank.gaslate { --liq: #C62828; --liq-2: #EC6E64; }
.view-staff .tank-liq { position: absolute; inset: 0; background: linear-gradient(180deg, var(--liq-2), var(--liq)); transform: translateY(calc(100% - var(--pct) * 1%)); }
.view-staff .rv-wait .tank-liq { transform: translateY(100%); }
.view-staff .rv-go .tank-liq { animation: fill-up 1.4s var(--ease) .15s backwards; }
@keyframes fill-up { from { transform: translateY(100%); } }
.view-staff .tank-wave { position: absolute; left: 0; bottom: calc(100% - 1px); width: 200%; height: 9px; background: var(--liq-2); animation: wave 3s linear infinite;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 10' preserveAspectRatio='none'%3E%3Cpath d='M0 10V5Q10 0 20 5T40 5T60 5T80 5V10Z'/%3E%3C/svg%3E") repeat-x 0 0 / 50% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 10' preserveAspectRatio='none'%3E%3Cpath d='M0 10V5Q10 0 20 5T40 5T60 5T80 5V10Z'/%3E%3C/svg%3E") repeat-x 0 0 / 50% 100%; }
@keyframes wave { to { transform: translateX(-50%); } }
.view-staff .tank-low { position: absolute; left: 0; right: 0; bottom: calc(var(--low) * 1%); height: 0; border-top: 2px dashed rgba(44,36,51,.6); } /* the low-fuel line */
.view-staff .tank-shine { position: absolute; left: 11px; top: 13px; width: 12px; height: 60px; border-radius: 8px; background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.06)); }
.view-staff .fuel-tx { min-width: 0; }
.view-staff .fuel-tx .k { color: var(--slate); font-size: .86rem; font-weight: 600; }
.view-staff .fuel-tx .big { margin: 4px 0 7px; font-size: clamp(2.3rem, 12vw, 3rem); }
.view-staff .trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.view-staff .trio .stat { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; padding: 11px 10px; }
.view-staff .trio .stat .k { font-size: .74rem; line-height: 1.25; }
.view-staff .trio .stat .v { margin: 0; font-size: .98rem; white-space: nowrap; }
.view-staff .trio.in-card { margin: 12px 0; }
.view-staff .trio.in-card .stat { border: 0; background: #F6F3FA; box-shadow: none; }
.view-staff .diesel-card, .view-staff .chart-card { margin-bottom: 14px; }
.view-staff .card-head { gap: 6px 10px; }
.view-staff .card-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.view-staff .diesel-card .list { border-color: var(--hair); box-shadow: none; }
.view-staff .chart-card h3 { margin: 0 0 4px; }
.view-staff .chart-card p { margin: 0 0 10px; }
.view-staff .rv-wait.chart-card svg { clip-path: inset(0 100% 0 0); }
.view-staff .rv-go.chart-card svg { animation: wipe 1.3s var(--ease) .15s backwards; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } }

/* ---------- toast and the small celebration ---------- */
/* centred with room on both sides, so a message is not squeezed into half the screen */
.view-staff #toast { left: 14px; right: 14px; width: fit-content; margin: 0 auto; transform: translateY(20px);
  display: flex; align-items: center; gap: 10px; max-width: min(calc(100% - 28px), 440px); padding: 11px 18px 11px 12px; border-radius: 18px;
  background: rgba(44,36,51,.96); box-shadow: 0 16px 30px -12px rgba(26,16,42,.7); line-height: 1.35; transition: opacity .25s, transform .45s var(--spring); }
.view-staff #toast::before { content: '✓'; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #2E7D5B; color: #fff; font-size: .95rem; font-weight: 800; }
.view-staff #toast.on { transform: none; }
.view-staff #toast.bad { background: #7F2740; }
.view-staff #toast.bad::before { content: '!'; background: #fff; color: #7F2740; }
.view-staff .cheer { position: fixed; z-index: 70; width: 0; height: 0; pointer-events: none; }
.view-staff .cheer i { position: absolute; left: 0; top: 0; }
.view-staff .cheer-bit { width: 10px; height: 10px; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.view-staff .cheer-coin { width: 24px; height: 24px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.view-staff .cheer-ring { width: 70px; height: 70px; margin: -35px 0 0 -35px; border: 3px solid #F6C445; border-radius: 50%; animation: ring .7s ease-out forwards; }

/* ---------- a page opens: its parts rise in, one after another ---------- */
.view-staff .main:not(.soft) > * { animation: rise .5s var(--ease) backwards; }
.view-staff .main:not(.soft) > :nth-child(2) { animation-delay: 40ms; }
.view-staff .main:not(.soft) > :nth-child(3) { animation-delay: 90ms; }
.view-staff .main:not(.soft) > :nth-child(4) { animation-delay: 140ms; }
.view-staff .main:not(.soft) > :nth-child(5) { animation-delay: 190ms; }
.view-staff .main:not(.soft) > :nth-child(6) { animation-delay: 240ms; }
.view-staff .main:not(.soft) > :nth-child(n+7) { animation-delay: 290ms; }
.view-staff .main > .tabs, .view-staff .main > .boot { animation: none; }
.view-staff .main > .boot::before { content: ''; display: block; width: 40px; height: 40px; margin: 0 auto 12px; border: 4px solid var(--acc-soft); border-top-color: var(--acc); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .view-staff .modal { border-radius: 28px; animation-name: sheet-pop; }
  .view-staff .modal::before { display: none; }
  .view-staff .modal { padding-top: 20px; }
}
@keyframes sheet-pop { from { transform: translateY(24px) scale(.96); opacity: 0; } }
@media (min-width: 900px) {
  .view-staff { --nav-h: 0px; }
  .view-staff .shell { padding-bottom: 32px; padding-left: 252px; }
  /* side menu: a floating glass panel with the same sliding highlight */
  .view-staff .nav { top: 12px; bottom: 12px; left: 12px; width: 228px; gap: 4px; padding: 92px 12px 12px; border: 1px solid var(--edge); border-radius: 26px; background: rgba(255,255,255,.8);
    -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); box-shadow: var(--sh-2); }
  .view-staff .nav::after { content: 'AMS'; position: absolute; top: 28px; left: 28px; color: var(--ink); font: 800 1.7rem/1 var(--display); letter-spacing: .02em; }
  .view-staff .nav::before { content: ''; position: absolute; top: 92px; right: 12px; left: 12px; height: 50px; border-radius: 16px; background: var(--inkfill);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 18px -10px var(--acc); transform: translateY(calc(var(--nav-i, 0) * 54px)); transition: transform .5s var(--spring), opacity .2s; }
  .view-staff .nav.no-cur::before { opacity: 0; }
  .view-staff .nav a { z-index: 1; height: 50px; padding: 0 14px; border-radius: 16px; color: var(--ink-2); font-weight: 700; transition: color .3s; }
  .view-staff .nav a[aria-current="page"] { background: none; color: #fff; }
  .view-staff .top { top: 12px; right: 12px; left: 252px; min-height: 62px; padding: 10px 16px; border-radius: 22px; }
  .view-staff .main { max-width: 1040px; padding: 98px 20px 20px; }
  .view-staff .tabs { max-width: 560px; }
  .view-staff .tabs a { flex-direction: row; gap: 8px; min-height: 50px; font-size: .9rem; }
  .view-staff .hero { --tl: 214px; min-height: 210px; padding: 26px 28px 24px 30px; }
  .view-staff .hero-hi { font-size: 1.6rem; }
  .view-staff .hero-hi b { font-size: 2.6rem; }
  .view-staff .hero-tower { width: 150px; margin-right: 36px; margin-bottom: -24px; }
  .view-staff .tower { max-height: 214px; }
  .view-staff .big { font-size: 2.3rem; }
  .view-staff .filters { max-width: 560px; }
  .view-staff .building { max-width: 720px; }
  .view-staff .apt-row { max-width: 720px; }
  .view-staff .gen-hero { min-height: 220px; padding: 26px 30px; }
  .view-staff .gh-art { width: 220px; }
  .view-staff .gh-pulse { width: 160px; height: 160px; margin: -80px 0 0 -80px; }
  .view-staff .fuel-card { max-width: 520px; }
  .view-staff .trio .stat .v { font-size: 1.25rem; }
  .view-staff .trio .stat .k { font-size: .82rem; }
  .view-staff .btn.block.cta { max-width: 420px; }
  .view-staff .modal .btn.block.cta { max-width: none; }
  .view-staff .coach { max-width: 560px; }
}

/* ---------- "reduce motion" on the phone: nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .view-staff, .view-staff *, .view-staff *::before, .view-staff *::after, .view-staff::before { animation: none !important; transition: none !important; }
}

} /* end of @media screen */
