/* Contract box and pop-ups */
.ctrbox .acts{flex-wrap:wrap}
.ctrold{margin:16px 0 6px}
.modal.ctrpop{width:min(720px,100%)}
.modal.ctrpop.wide{width:min(900px,100%)}
.ctrpop .ctrform{margin-top:12px}
.ctrview{margin-top:12px;max-height:70vh;overflow-y:auto;border-radius:12px;padding:4px 6px 8px;background:#F2F7FB}
/* Pay staff: the note with the 13th month button on its right */
.t13bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
/* Yom Tov notice: holiday icon in a pale circle, "Important" above the title */
.nimp .ntext{position:relative;padding-left:58px;min-height:46px}
.nicon{position:absolute;left:0;top:0;width:46px;height:46px;border-radius:50%;background:#E8F1F8;display:grid;place-items:center;color:#0a1a3a}
.nicon svg{width:34px;height:34px}
.nicon .jsvg{--jbg:#E8F1F8}
.nlbl{display:block;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--mut)}
@media (max-width:640px){.al.nrow{grid-template-columns:minmax(0,1fr) auto}.nrow .ntext{grid-column:1/-1}}
/* List rows everywhere (alerts, leave requests, logins, staff, inactive...): the same columns on every row.
   The first item takes the free space, items in the middle get a fixed width, and buttons sit at the right edge,
   all the same size, so the buttons line up from row to row whatever is written before them. */
@media (min-width:641px){
  .al{flex-wrap:nowrap}
  .al:not(.nrow)>:first-child{flex:1 1 0;min-width:0}
  .al:not(.nrow)>:not(:first-child):not(:last-child){flex:0 0 200px;min-width:0}
  .al:not(.nrow)>:last-child:not(:first-child){flex:0 0 auto;margin-left:auto;text-align:right}
}
.al .acts{display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:8px;margin:0}
.al .btn.sm,.al .acts .btn{min-width:96px;justify-content:center;text-align:center}
/* Timesheets (admin): who was late / idle pop-up */
.rpop.tspop{width:min(640px,100%);max-height:80vh;overflow-y:auto}
.tspop table{width:100%;min-width:0;margin-top:12px}
.tspop th:first-child,.tspop td:first-child{padding-left:0}.tspop th:last-child,.tspop td:last-child{padding-right:0}
.tspop th:last-child,.tspop td:last-child{text-align:right}
/* Phone: smaller KPI boxes, two side by side, every label and number on one line */
@media (max-width:640px){
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .kpi{padding:11px 12px;border-radius:12px}
  .kpi.has-ic{gap:8px}
  .kpi span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .kpi b{font-size:24px;margin-top:2px;white-space:nowrap}
  .kpi b small{font-size:13px}
  .kpi-ic{width:36px;height:36px}
  .kpi-ic svg{width:19px;height:19px}
}
.kpi .kper{font-style:normal}
/* Phone boxes: title across the top, the number bottom left, the icon bottom right. Rows of three sit three across (period words dropped). */
@media (max-width:640px){
  .kpi.has-ic{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;column-gap:6px;row-gap:6px}
  .kpi.has-ic>div{display:contents}
  .kpi.has-ic span{grid-column:1/-1;grid-row:1}
  .kpi.has-ic b{grid-column:1;grid-row:2;margin:0;align-self:end}
  .kpi.has-ic .kpi-ic{grid-column:2;grid-row:2}
  .kpis:has(>.kpi:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .kpis:has(>.kpi:nth-child(3):last-child) .kpi{padding:10px 10px 10px}
  .kpis:has(>.kpi:nth-child(3):last-child) .kpi-ic{width:28px;height:28px}
  .kpis:has(>.kpi:nth-child(3):last-child) .kpi-ic svg{width:15px;height:15px}
  .kpis:has(>.kpi:nth-child(3):last-child) .kpi span{font-size:11.5px}
  .kpis:has(>.kpi:nth-child(3):last-child) .kpi .kper{display:none}
  .kpis:has(>.kpi:nth-child(3):last-child) .kpi b{font-size:min(22px,5.2vw)}
  .kpis:has(>.kpi:nth-child(3):last-child) .kpi b small{font-size:12px}
}
/* Clients and managers: their company's logo and name above the page title */
.cobrand{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:16px;font-weight:600;color:var(--fg)}
.cobrand span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cobrand .av,.cobrand .av.lg{width:36px;height:36px;min-width:36px;border-radius:10px;flex:none}
.cobrand .av svg,.cobrand .av img{width:100%;height:100%}
.cobrand .av.lo svg{width:22px;height:22px}
/* client logo + name: a little larger, more so on a computer */
.cobrand{gap:12px;font-size:18px}
.cobrand .av,.cobrand .av.lg{width:44px;height:44px;min-width:44px;border-radius:12px}
.cobrand .av.lo svg{width:26px;height:26px}
@media (min-width:861px){
  .cobrand{gap:14px;font-size:22px;margin-bottom:14px}
  .cobrand .av,.cobrand .av.lg{width:56px;height:56px;min-width:56px;border-radius:14px}
  .cobrand .av.lo svg{width:32px;height:32px}
}
/* Buttons beside a page title (Screenshots: pictures only / detailed / choose a day) */
.phacts{display:flex;gap:8px;align-items:center;align-self:center}
.hicon{width:40px;height:40px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--card);color:var(--fg);cursor:pointer}
.hicon:hover{background:var(--hover)}
.hicon[aria-pressed="true"]{background:#0a1a3a;border-color:#0a1a3a;color:#F2F7FB}
.hicon.mobonly{display:none}
/* Pictures only: one after another, no details */
.shgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}
.shgrid .shot{aspect-ratio:16/10}
/* Phone month calendar: a centred pop-up */
.calmodal{position:relative;z-index:1}
.calmodal .calpop{position:static;transform:none;width:min(320px,calc(100vw - 32px))}
/* Staff pictures in drop-downs */
.dd-av{flex:none;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;overflow:hidden;background:#BED7EA;color:#0a1a3a;margin-right:8px;vertical-align:middle}
.dd-av img,.dd-av svg{width:100%;height:100%;object-fit:cover;display:block}
.dd-av.dd-all{background:#E8F1F8}.dd-av.dd-all svg{width:16px;height:16px}
.dd-val{display:inline-flex;align-items:center;min-width:0}
.dd-list li{display:flex;align-items:center}
/* Week strip: the chosen day is always an exact circle, however wide the screen */
.wday{width:100%;max-width:46px;aspect-ratio:1/1;justify-self:center;justify-content:center;border-radius:50%;padding:0}
@media (max-width:860px){
  /* inner pages start with the title at the very top: no "Admin portal" / client logo, no "Scroll up" link */
  .shell:not(.home) .ph .eyebrow,.shell:not(.home) .ph .cobrand{display:none}
  .shell:not(.home) .main{padding-top:max(14px,env(safe-area-inset-top,0px))}
  .ph{margin-bottom:12px;flex-wrap:nowrap;align-items:center}
  .phacts{gap:6px}
  .hicon{width:36px;height:36px}
  .hicon.mobonly{display:grid}
  /* filters: no box, each drop-down the full width of the screen */
  .fbar{background:none;border:0;box-shadow:none;padding:0}
  /* From and To side by side; drop-downs and the main button full width; previous on the left, next on the right */
  .fbar .calrow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:end}
  .fbar .calrow>.fld{grid-column:1/-1;width:100%;min-width:0}
  .fbar .calrow>.fld.dt{grid-column:auto}
  .fbar .calrow>.acts{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px}
  .fbar .calrow>.acts .btn:not(.ghost){order:-1;flex:1 1 100%;justify-content:center}
  .fbar .calrow>.acts .btn.ghost{min-height:30px;height:30px;padding:0 12px;font-size:12.5px}
  .fbar .fld.dt .datebtn{padding-left:12px;padding-right:12px;font-size:14px}
  .fbar .dd,.fbar .dd-btn,.fbar .dpw,.fbar .datebtn{width:100%;max-width:none;display:flex}
  .fbar .acts{width:100%}
  /* each hour of screenshots on its own line, about 2.5 visible, swipe for the rest */
  .shrow{display:flex;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scroll-snap-type:none;gap:8px;padding-bottom:6px} /* free flick scrolling: a quick swipe flies, like any phone list */
  .shrow .shw{flex:0 0 40%;scroll-snap-align:start}
  .shgrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
}
.phback{display:none}
.phacts:empty{display:none}
@media (max-width:860px){
  /* inner pages: back arrow left, title centred, the page's buttons right */
  .shell:not(.home) .ph{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}
  .shell:not(.home) .phback{display:grid;place-items:center;justify-self:start;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--fg);cursor:pointer}
  .shell:not(.home) .phback:active{background:var(--hover)}
  .shell:not(.home) .phtitle{text-align:center;min-width:0}
  .shell:not(.home) .ph h1{font-size:28px;white-space:nowrap}
  .shell:not(.home) .phacts{display:flex;justify-self:end}
  /* week strip: the chosen day = lime circle around the number only, the day name stays above;
     pointing / pressing = a light blue circle around both */
  .wday.on{background:transparent!important;background-image:none!important}
  .wday.on span{color:var(--mut)}
  .wday b{display:grid;place-items:center;width:30px;height:30px;border-radius:50%}
  .wday.on b{background-image:linear-gradient(90deg,#DDFF54,#002233);color:#fff}
  .wday.on b.worked{color:#fff!important}
  .wday:hover:not(:disabled),.wday:active:not(:disabled),.wday.on:hover{background:var(--hover)!important}
  .wday.today{border-color:transparent}
  .wday.today:not(.on) b{box-shadow:inset 0 0 0 1.5px var(--fg)}
  .wday{max-width:48px}
}
/* Phone calendar (Screenshots): a white panel with a rounded bottom over a navy bar that shows the chosen day */
.calsheet{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background:#0a1a3a}
.cspanel{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--card);border-radius:0 0 24px 24px;overflow:hidden;
  padding:max(10px,env(safe-area-inset-top,0px)) 16px 0}
.csh{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;padding:2px 0 8px}
.csh .csx{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--fg);cursor:pointer;justify-self:start}
.cs-title{font:500 24px/1.2 var(--serif);color:var(--fg)}
.csacts{display:flex;align-items:center;gap:8px;justify-self:end}
.csacts .btn{min-height:38px}
.csw,.csg{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));justify-items:center}
.csw{padding:4px 0 6px;border-bottom:1px solid var(--line)}
.csw span{font-size:12px;color:var(--mut)}
.csscroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:18px;scrollbar-width:none}
.csscroll::-webkit-scrollbar{display:none}
.csm{padding-top:14px}
.csm-t{display:block;font:500 17px/1.2 var(--serif);margin:0 0 6px 4px;color:var(--fg)}
.csg{row-gap:2px}
.csg .pday{max-width:40px}
.csg .pday b{font-size:15px}
.csfoot{flex:none;display:grid;place-items:center;min-height:62px;padding:8px 16px max(8px,env(safe-area-inset-bottom,0px));color:#fff;font:500 18px/1.2 var(--serif)}
.calsheet{margin:0!important}
.csacts .hicon{width:36px;height:36px}
.csacts .btn{min-height:36px;height:36px;padding:0 14px;font-size:14px}
/* "Scroll up for ..." sits on the same line as the portal pill / client logo, top right, on top of the page:
   it never takes up room or pushes the page down */
#view{position:relative}
.prevpage{position:absolute;top:0;right:0;width:260px;margin:0;z-index:2}
@media (min-width:861px){.phacts{align-self:flex-end}}
/* phone calendar: each month exactly half the scrolling area, so two whole months always show */
.csscroll{position:relative;scroll-snap-type:y mandatory;padding-bottom:0}
.csm{height:var(--mh,auto);display:flex;flex-direction:column;scroll-snap-align:start;padding-top:10px;box-sizing:border-box}
.csm .csg{flex:1;grid-auto-rows:1fr;align-items:center}
.csm{overflow:hidden}
.csm .csg{min-height:0;grid-auto-rows:minmax(0,1fr);row-gap:0}
.csm .csg .pday{height:min(100%,40px);width:auto;max-width:40px;aspect-ratio:1/1}
@media (max-width:860px){
  /* Previous / next rows (weeks, months): small buttons with the arrows outside, the dates centred between them */
  .calnav{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;font-size:15px}
  .calnav>b{text-align:center;font-weight:600;line-height:1.25}
  .calnav .btn{min-height:30px;height:30px;padding:0 10px;font-size:12.5px;white-space:nowrap}
  .calnav .btn:first-child{justify-self:start}
  .calnav .btn:last-child{justify-self:end}
}
/* "Keep scrolling for ..." / "Scroll up for ...": invisible until you keep pushing past the end, then it fades in with its bar */
.nextpage{opacity:0;pointer-events:none;transition:opacity .2s}
.nextpage.on{opacity:1}
.nplab{display:inline-flex;align-items:center;gap:8px;color:var(--mut);font:500 15px/1.2 var(--sans);padding:8px 14px}
.prevpage .nplab{padding:4px 12px;font-size:13px}
/* phone calendar with a mouse (testing on a PC): normal smooth wheel scrolling instead of jumping a month per notch */
@media (pointer:fine){.csscroll{scroll-snap-type:none}}
@media (max-width:860px){
  /* first page (Overview / Live) on a phone: the title centred at the top, the client logo + name (or Admin portal) centred under it */
  .shell.home .ph{display:block;text-align:center;margin-bottom:14px}
  .shell.home .phtitle{display:flex;flex-direction:column;align-items:center}
  .shell.home .phtitle h1{order:-1;margin:0 0 10px;font-size:30px}
  .shell.home .cobrand{justify-content:center;margin:0}
  .shell.home .eyebrow{margin:0}
}
/* the hidden "Scroll up for ..." comes before the title; it must not add the usual 16px gap above the title */
.prevpage+.ph{margin-top:0!important}
@media (max-width:860px){
  /* phone: "Scroll up for ..." appears over the title row only while you keep pulling down at the top */
  .prevpage{left:0;right:0;width:auto;top:-4px;background:var(--bg);padding:6px 0 8px;text-align:center;z-index:5}
}
/* computer: "Scroll up for ..." centred at the top (only shows while pulling past the top) */
@media (min-width:861px){.prevpage{left:0;right:0;margin:0 auto;background:var(--bg);padding:2px 0 6px}}
@media (max-width:860px){
  /* first page: the title stays centred; the client logo + name (or Admin portal) sit on the left under it */
  .shell.home .phtitle{align-items:stretch}
  .shell.home .phtitle h1{text-align:center}
  .shell.home .cobrand{justify-content:flex-start}
  .shell.home .eyebrow{align-self:flex-start}
}
/* Phone: the whole month fits the screen. Each day shows its number and small coloured dots
   (leave, late, idle, alerts) in the same colours as the labels; tap a day for the full details */
@media (max-width:760px){
  .card.scroll:has(>.cal){overflow:visible;padding:10px 8px}
  .cal{grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;min-width:0}
  .cal>div{min-height:50px;padding:4px 2px;border-radius:8px;text-align:center;font-size:12px}
  .cal .dh{min-height:0;padding:0;font-size:11px}
  .cal b{margin-bottom:1px;font-size:14px}
  .cal .tg{display:inline-block;width:7px;height:7px;padding:0;margin:2px 1px 0;border-radius:50%;font-size:0;line-height:0;background:currentColor;vertical-align:top}
}
.cal .cnote{display:none}
@media (max-width:760px){
  .cal .tg{display:none}
  .cal .cnote{display:grid;place-items:center;margin:3px auto 0;width:18px;height:18px;color:var(--fg)}
  .cal .cd.sel .cnote{color:#fff}
}
/* phone top bar (logo, bell, round icon): straight edges, no rounded corners */
@media (max-width:860px){.side{border-radius:0}}
@media (max-width:760px){
  /* day pop-up rows: fixed columns sized for the widest value ("Late 120 min", "Idle 13.4 h"), every pill the same width,
     so nothing ever covers the name or profile picture */
  .dprw{grid-template-columns:minmax(0,1fr) auto 42px;column-gap:6px}
  .dprw.adm{grid-template-columns:minmax(0,1fr) auto auto 42px}
  .dprw .c-late,.dprw .c-idle{display:grid}
  .dprw .c-late>.pill,.dprw .c-idle>.pill{grid-area:1/1;justify-content:flex-start;text-align:left;padding-left:8px;padding-right:8px;font-size:11px;box-sizing:border-box;font-variant-numeric:tabular-nums}
  .dprw .pill.gh{display:inline-flex;visibility:hidden}
  .dprw .c-hrs{font-size:13px}
  .dprw .who{overflow:hidden}
  .dprw .who u{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.15} /* long names wrap to a second line instead of "..." */
  /* staff picker: a bigger profile picture, close to the left edge of the box */
  .fbar .dd-btn:has(.dd-av){padding-left:6px}
  .fbar .dd-btn .dd-av{width:34px;height:34px;margin-right:10px}
  .fbar .dd-btn .dd-av.dd-all svg{width:20px;height:20px}
}
/* Client and manager forms: the Active tick box sits level with the boxes beside it */
.fhead-f .fld>.chk{flex:1;color:var(--fg)}
/* Share login pop-up: the link on one line (cut with "...") next to Copy */
.shlink{display:flex;align-items:center;gap:10px;margin-top:16px;padding:10px 12px;border:1px solid var(--line);border-radius:12px}
.shlink>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mut)}
/* Buttons that open a link (Open remote session, Send on WhatsApp): no underline, white text like the other main buttons */
a.btn{text-decoration:none;color:var(--btn-link-fg)}
/* Remote access pop-up: labels in one column, values and their buttons lined up in the next */
.rpop .rkv{display:grid;grid-template-columns:90px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:15px}
.rpop .rkv>span:first-child{color:var(--mut)}
.rpop .rkv>b{font-weight:600;overflow-wrap:anywhere}
.rpop .rkv>.acts{display:flex;gap:8px;justify-content:flex-end}
/* Login boxes (clients, managers, staff): each login is a block (username, password, buttons), then the Active tick */
.lgbox{display:flex;flex-direction:column;gap:12px;padding:0 0 14px;margin:0 0 14px;border-bottom:1px solid var(--line)}
.lglab{font-size:15px;color:var(--fg)}
.lgact{margin-top:4px;color:var(--fg)}
.kvv .t13tick{margin:0 0 0 16px}
.fld.t13{justify-content:flex-end}
.fld.t13 .lgact{margin:0;min-height:40px;display:flex;align-items:center}
.lgact.ro{pointer-events:none} /* details page: looks the same as in Edit, but cannot be changed */
.lgrow .acts{justify-content:flex-end}
.btn.wfg{color:var(--btn-link-fg)}
.kvv .btn.sm{margin-left:8px}
.lgbox .kv,.fcard .kv{align-items:center}
/* Online (green) / offline (red) dot on staff pictures */
.avw{position:relative;display:inline-grid;flex:none;line-height:0}
.odot{position:absolute;right:-1px;bottom:-1px;width:30%;height:30%;min-width:9px;min-height:9px;max-width:16px;max-height:16px;border-radius:50%;box-shadow:0 0 0 2px var(--card);display:none}
.odot.on{display:block;background:#2fb344}
.odot.off{display:block;background:#e5484d}
/* Phone top bar: account card under the sign-out button (round Hyrex icon, name, Sign out) */
.acctmenu{position:fixed;z-index:60;width:230px;background:#fff;color:#0a1a3a;border:1px solid #DBE7F1;border-radius:18px;padding:18px 16px 16px;text-align:center;box-shadow:0 14px 34px rgba(10,26,58,.18)}
.acctmenu .am-icon{width:48px;height:48px;margin:0 auto 10px;border-radius:50%;overflow:hidden}
.acctmenu .am-icon svg{width:100%;height:100%;display:block}
.acctmenu .am-name{font-size:18px;font-weight:600;margin:0 0 14px;overflow-wrap:anywhere}
.acctmenu button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;border:0;background:#0a1a3a;color:#F2F7FB;font:inherit;font-size:16px;padding:10px 18px;border-radius:100px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.acctmenu button:active,.acctmenu button:hover{background:#E8F1F8;color:#0a1a3a}
.acctmenu .nic,.acctmenu .nic svg{width:18px;height:18px;display:block}
/* Sign-in, everywhere: no "Sign in" heading (the button says it), logo on the left, a compact box, button text centred and white */
.login>.card{padding:22px 22px 24px;text-align:left}
.login .logo{margin:0 0 14px;text-align:left}
.login .form{gap:12px}
.login .lgbtn{justify-content:center;text-align:center;width:100%;color:var(--btn-link-fg)}
@media (max-width:760px){.login>.card{padding:22px 20px}}
/* Phone top bar: sign-out symbol (same round navy button as the bell, bigger symbol) */
.topout .nic,.topout .nic svg{width:23px;height:23px;display:block}
.acctmenu .am-back{margin-top:10px;background:#fff;color:#0a1a3a;border:1px solid #DBE7F1}
/* Wise connection box on Pay staff (live): grey = not set up / checking, green = connected, red = broken */
.wiserow{display:flex;align-items:flex-start;gap:12px}
.wiserow p{margin:2px 0 0;font-size:14px}
.wiseic{flex:none;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#E8F1F8;color:#0a1a3a}
.wiserow.ok .wiseic{background:#e3f6e7;color:#1f7a35}
.wiserow.bad .wiseic{background:#fde7e7;color:#b42318}
.wiserow.bad b{color:#b42318}
/* Pay staff on phones: month centred between round arrows, then the total and a full-width Pay button */
@media (max-width:760px){
  .payhead{flex-direction:column;align-items:stretch;gap:14px}
  .mnavw{flex-direction:column;align-items:center;gap:8px}
  .mnavw>.mut{font-size:13px}
  .mnav{display:flex;width:100%;justify-content:space-between;padding:4px}
  .mnav span{flex:1;min-width:0;font-size:20px}
  .mnav button{width:38px;height:38px;background:var(--hover)}
  .payright{flex-direction:column;align-items:stretch;gap:12px;padding-top:14px;border-top:1px solid var(--line)}
  .paytotal{flex-direction:row;justify-content:space-between;align-items:baseline}
  .paytotal span{font-size:14px}
  .paybtn{width:100%;justify-content:center;padding-right:8px}
}
/* Pay staff list on phones: one row per person (tick, picture, name, amount due on the right; client and bank details underneath) */
@media (max-width:760px){
  .paylist{overflow:visible}
  .paylist table,.paylist tbody,.paylist thead{display:block;width:100%!important;min-width:0!important}
  .paylist thead tr{display:flex;padding:12px 16px}
  .paylist thead th{padding:0;border:0}
  .paylist thead th:not(:first-child){display:none}
  .paylist tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px;row-gap:4px;padding:12px 16px;border-top:1px solid var(--line)}
  .paylist tbody td{padding:0;border:0;min-width:0}
  .paylist tbody td:nth-child(1){grid-column:1;grid-row:1}
  .paylist tbody td:nth-child(3){grid-column:2;grid-row:1;text-align:right}
  .paylist tbody td:nth-child(2){grid-column:1;grid-row:2;padding-left:34px;font-size:13px;color:var(--mut)}
  .paylist tbody td:nth-child(2) .av{width:22px;height:22px}
  .paylist tbody td:nth-child(4){grid-column:2;grid-row:2;text-align:right}
  .paylist tbody td:nth-child(5){display:none}
  .paylist tbody td:nth-child(3) .hd{max-width:150px;margin-left:auto;font-size:11px}
  .paylist .paysel .who u{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
/* Card title with something on its right (the Contact title and its "Jewish" tick box, which looks like the Active tick box) */
.cardhead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.cardhead h3{margin:0}
.cardhead .jtick{margin:0}
.cardhead .jticks{display:flex;align-items:center;gap:18px;flex-wrap:wrap;justify-content:flex-end}
/* Jewish holidays and Shabbat on the Calendar (clients / managers marked Jewish) */
.cal .cd{position:relative}
.cal .jics{position:absolute;right:4px;bottom:4px;display:flex;gap:0}
.cal .jic+.jic{margin-left:-14px}
/* solid icons: inner lines and white parts take the colour of whatever is behind the icon */
.jsvg{--jbg:var(--card)}
.cal .cd:hover .jsvg{--jbg:var(--hover)}
.cal .cd.sel .jsvg{--jbg:#0a1a3a}
.jpill .jsvg{--jbg:#E8F1F8}
.jsvg .bg{fill:currentColor}
.jsvg .wh{fill:var(--jbg)}
.jsvg .dt,.jsvg .sep{stroke:var(--jbg)}
.cal .jic{display:grid;place-items:center;width:38px;height:38px;color:#0a1a3a}
.cal .jic svg{width:38px;height:38px}
.cal .cd.sel .jic{color:#fff}
.jpop{display:flex;flex-wrap:wrap;gap:8px}
.jpill{display:inline-flex;align-items:center;gap:6px;padding:4px 12px 4px 8px;border-radius:100px;background:#E8F1F8;color:#0a1a3a;font-size:14px}
.jpill svg{width:18px;height:18px}
@media (max-width:760px){
  .cal .jics{right:2px;bottom:2px;gap:1px}
  .cal .jic+.jic{margin-left:0}
  .cal .jic,.cal .jic svg{width:15px;height:15px}
}
/* Send to be signed: "Send by email" under the link buttons */
.ctrmail{display:flex;align-items:flex-end;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.ctrmail .fld{flex:1;margin:0}
.ok-note{text-align:center;color:#2f7d4f;margin:12px 0 0}
@media (max-width:760px){.ctrmail{flex-direction:column;align-items:stretch}}

/* Computer: every page sits in one big rounded, faded box beside the menu (same height, same 10px gap) and scrolls inside it */
:root{--pane:transparent;--pane-line:rgba(150,182,212,.5)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--pane:transparent;--pane-line:rgba(120,150,210,.35)}}
:root[data-theme="dark"]{--pane:transparent;--pane-line:rgba(120,150,210,.35)}
@media (min-width:861px){
  html,body{height:100%;overflow:hidden}
  .shell{height:100vh;min-height:0}
  .shell>.main{height:calc(100vh - 20px);margin:10px max(10px,env(safe-area-inset-right,0px)) 10px 10px;width:auto;
    overflow-y:auto;overscroll-behavior:contain;border-radius:14px;background:var(--pane);border:1px solid var(--pane-line);
    box-shadow:none;padding:28px 32px 64px}
}
  /* "Scroll up for ..." looks exactly like "Keep scrolling for ..." at the bottom: same size, words above the bar, same width; over the box colour */
@media (min-width:861px){
  .prevpage{display:flex;flex-direction:column-reverse;width:340px;max-width:340px;padding:8px 0;background:linear-gradient(var(--pane),var(--pane)),var(--bg)}
  .prevpage .nplab{padding:8px 14px;font-size:15px;align-self:center}
  .prevpage .np-bar{margin:8px 0 0}
}
@media (min-width:861px){
  /* both notices sit at the very top / very bottom of the box (a little in from its edge), however short the page is; neither takes up room */
  #view{min-height:100%}
  #view>#np-bot{position:absolute;left:0;right:0;bottom:-52px;margin:0 auto;max-width:340px}
  .prevpage{top:-16px}
}

/* Screenshot pop-up (js/shotview.js): white rounded card, one screenshot at a time, sideways to the next */
html.sv-open,html.sv-open body{overflow:hidden;overscroll-behavior:none}
.sv-wrap{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:16px;overscroll-behavior:contain}
.sv-bg{position:absolute;inset:0;background:rgba(10,26,58,.6)}
.sv{position:relative;display:flex;flex-direction:column;width:min(1500px,calc(100vw - 32px));max-height:calc(100dvh - 32px);background:#fff;color:#0a1a3a;border-radius:16px;box-shadow:0 24px 60px rgba(10,26,58,.35);overflow:hidden}
.sv-head{display:flex;align-items:center;gap:12px;padding:10px 12px 10px 18px;font-size:15px}
.sv-cap{flex:1;min-width:0;overflow-wrap:anywhere}
.sv-n{white-space:nowrap;font-size:14px}
.sv-x{flex:none;width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:#0a1a3a;font-size:26px;line-height:1;cursor:pointer}
.sv-x:hover{background:#E8F1F8}
.sv-body{position:relative;flex:1;min-height:0}
/* each slide keeps the 16:10 shape of a screen, as big as the window allows */
.sv-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;
  height:min(calc(min(1500px,100vw - 32px) * .625),calc(100dvh - 32px - 56px));background:#F2F7FB}
.sv-track::-webkit-scrollbar{display:none}
.sv-slide{flex:0 0 100%;height:100%;scroll-snap-align:center;scroll-snap-stop:always;min-width:0}
.sv-slide img{width:100%;height:100%;object-fit:contain;display:block;user-select:none;-webkit-user-drag:none}
.sv-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:46px;height:46px;border:0;border-radius:50%;display:grid;place-items:center;
  background:#0a1a3a;color:#F2F7FB;cursor:pointer;box-shadow:0 6px 18px rgba(10,26,58,.25);transition:background-color .2s,color .2s}
.sv-arrow:hover{background:#E8F1F8;color:#0a1a3a}
.sv-arrow:disabled{opacity:0;pointer-events:none}
.sv-prev{left:14px}.sv-next{right:14px}
/* phones: no arrows (swipe), the pop-up almost fills the screen; turned sideways it stretches across */
@media (max-width:860px),(pointer:coarse){
  .sv-arrow{display:none}
  .sv-wrap{padding:8px}
  .sv{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:14px}
  .sv-head{padding:6px 6px 6px 14px;font-size:14px}
  .sv-track{height:min(calc((100vw - 16px) * .625),calc(100dvh - 16px - 48px))}
}
@media (orientation:landscape) and (max-height:500px){
  .sv-wrap{padding:6px}
  .sv{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}
  .sv-head{padding:2px 4px 2px 12px;font-size:13px}
  .sv-x{width:30px;height:30px;font-size:22px}
  .sv-track{height:calc(100dvh - 12px - 34px)}
}
.sv:focus{outline:none}
/* Maintenance > Bug reports */
.bugh{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.bugh h3{margin:0 0 4px}
.bug p{margin:0 0 8px}
.bugf{align-items:center;margin-top:12px;flex-wrap:wrap}
.ptrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.ptrow:first-of-type{border-top:0}
/* Maintenance > Updates: the conversation with Claude (your messages right, Claude's left) */
.upchat{display:flex;flex-direction:column;gap:10px;margin:18px 0 16px}
.uphist{display:flex;flex-direction:column;max-height:60vh;overflow-y:auto}
.uphrow{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid var(--line);padding:10px 4px;font:inherit;color:var(--fg);cursor:pointer}
.uphrow:last-child{border-bottom:0}
.uphrow:hover{background:var(--hover)}
.uphtxt{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.upme,.upai{display:flex;flex-direction:column;max-width:min(680px,88%)}
.upme{align-self:flex-end;align-items:flex-end}
.upai{align-self:flex-start;align-items:flex-start}
.upb{padding:10px 14px;border-radius:16px;line-height:1.45;overflow-wrap:anywhere}
.upme .upb{background:var(--hover);border-bottom-right-radius:4px}
.upai .upb{background:var(--card);border:1px solid var(--line);border-bottom-left-radius:4px}
.upt{font-size:12px;margin-top:3px}
.upbox{display:flex;align-items:flex-end;gap:6px;border:1px solid var(--line);border-radius:26px;background:var(--card);padding:6px 6px 6px 18px;transition:border-color .2s}
.upbox:focus-within{border-color:var(--sky)}
.upbox textarea{flex:1;min-width:0;border:0;outline:0;background:transparent;resize:none;font-family:inherit;font-size:16px;line-height:1.4;color:var(--fg);padding:9px 0;max-height:220px;overflow-y:auto}
.upic{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:0;padding:0;cursor:pointer;transition:background .2s,color .2s}
.upmicb{background:var(--hover);color:#0a1a3a}
.upmicb.on{background:linear-gradient(90deg,#DDFF54,#002233);color:#fff}
.upgo{background:#0a1a3a;color:#F2F7FB}
.upgo:disabled{opacity:.4;cursor:default}
.upmic{margin:6px 0 0 18px;font-size:13px}
.ptrow .btn,.ptrow .pill{flex:none}
.audstaff{display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:14px}
.acts.nowrap{flex-wrap:nowrap}
/* Drop-downs: the chosen person's picture (or client's logo) is large and close to the left edge of the box, everywhere */
.dd-btn:has(.dd-av){padding-left:5px}
.dd-btn .dd-av{width:32px;height:32px;margin-right:8px}
.dd-btn .dd-av.dd-all svg{width:19px;height:19px}
/* client logos: a rounded square on white, the whole logo visible */
.dd-av.dd-logo{border-radius:8px;background:#fff;box-shadow:inset 0 0 0 1px var(--line)}
.dd-av.dd-logo img{object-fit:contain;padding:2px}
.dd-av.dd-logo svg{width:70%;height:70%}
.dd-btn .dd-av.dd-logo{border-radius:9px}
/* Audits: Client and Staff members side by side; Manager form: staff drop-down with the "can see" box beside it */
.audgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px 16px}
.mgrstaff{display:grid;grid-template-columns:minmax(200px,1fr) minmax(220px,1.3fr);gap:16px;align-items:start}
.mgrlist{border:1px solid var(--line);border-radius:12px;padding:6px 12px;max-height:260px;overflow-y:auto;overscroll-behavior:contain;background:var(--card)}
.mgrlist .al:last-child{border-bottom:0}
@media (max-width:860px){.mgrstaff{grid-template-columns:1fr}}

/* Computer only (owner: phones stay as they were): Client / Staff drop-downs, From / To date boxes and the main buttons
   (Show, Add, Generate, Pay, 13th month, Previous / Next day) are all 46px tall; edit forms and small in-row buttons (Edit, Remove) unchanged */
@media (min-width:861px){
  #view .dd-btn:not(.form .dd-btn){min-height:46px;padding-top:6px;padding-bottom:6px}
  #view .datebtn:not(.form .datebtn){min-height:46px}
  #view .btn:not(.ghost):not(.form .btn),#view .btn.ghost.fit,#view .addrow .btn.fit,#view .fbar .btn.ghost{min-height:46px;height:46px;padding-top:0;padding-bottom:0;justify-content:center}
  #view .addrow input:not([type=checkbox]):not([type=hidden]){min-height:46px}
}
/* Computer: Timesheets, Screenshots, Reports and Calendar share one filter box; previous on the left and next on the right under it */
.calnav.webonly,.fbar .acts.webacts{display:none}
@media (min-width:861px){
  .calnav.webonly{display:grid}
  .fbar .acts.webacts{display:flex}
  .fbar .acts.mobacts,.fbar .dnav .dnside{display:none}
  #view .calnav .btn{min-height:46px;height:46px;padding-top:0;padding-bottom:0}
}
/* Computer: the Show ... history button stays on the same line as the boxes; the boxes shrink a little on smaller screens instead */
@media (min-width:1200px){
  #view .fbar .calrow{flex-wrap:nowrap}
  #view .fbar .calrow>.fld{flex:0 1 200px;min-width:130px}
  #view .fbar .calrow>.fld.dt{flex:0 1 190px;min-width:160px}
  #view .fbar .calrow>.acts{flex:none}
}
/* Maintenance > Logs: each entry opens a drop-down with its details */
tr.lgr{cursor:pointer}
tr.lgr:hover td{background:var(--hover)}
.lgcaret{display:inline-block;width:14px;margin-right:4px;color:var(--mut);transition:transform .15s}
tr.lgr[data-open="true"] .lgcaret{transform:rotate(90deg)}
tr.lgmore td{background:var(--hover);padding-top:4px;white-space:normal}
.lgbox div{overflow-wrap:anywhere}
.lgbox{display:grid;gap:4px;padding:6px 0 8px 18px;max-width:900px}
.lgbox b{color:var(--fg)}
/* Settings > Email: the Microsoft sign-in steps */
.emsteps{margin:0 0 14px;padding-left:20px;display:grid;gap:8px}
.emcode{font-size:20px;letter-spacing:.08em;margin:0 6px}
/* Calendar day pop-up: why a Philippine holiday sits on this date */
.phnote{margin:0 0 12px;padding:10px 14px;border-radius:12px;background:var(--hover);line-height:1.45}

/* Integrations: the result of a connection check (green = working, red = not), and errors in the password pop-up */
.stores{margin:10px 0 0;padding:8px 12px;border-radius:10px;background:var(--hover)}
.stores.ok{background:#E3F4E8;color:#1b5e33}
.stores.bad{background:#FDE7E4;color:#9b2c1d}

/* Maintenance > Inactive: Reactivate above Delete, both small (rarely used) */
.stackbtns{display:flex;flex-direction:column;gap:4px;align-items:stretch;flex:none}
.btn.xs{padding:3px 12px;font-size:13px;line-height:1.3;min-height:0}
.btn.danger{color:#9b2c1d;border-color:#F0C5BE}
.btn.danger:not(.ghost){background:#9b2c1d;color:#F2F7FB;border-color:#9b2c1d}
.xsnote{font-size:12px;max-width:150px;text-align:right}

/* Integrations: status beside each title (green dot = connected and working, red = not) */
.sdot{display:inline-flex;align-items:center;gap:6px;margin-left:12px;font:500 13px/1 var(--sans);color:var(--mut);vertical-align:middle}
.sdot::before{content:"";width:9px;height:9px;border-radius:50%;background:#c0392b}
.sdot.on{color:#1b5e33}.sdot.on::before{background:#22a559}
.sdot.off{color:#9b2c1d}

/* Bug reports: which button I recommend on each report */
.bugrec{margin:10px 0 0;padding:8px 12px;border-radius:10px;background:var(--hover)}
.bugrec.urg{background:#FDE7E4;color:#7a2417}
.tsqr{display:block;width:200px;height:200px;margin:0 auto 8px}
.tskey{font-size:12px;overflow-wrap:anywhere;margin:0 0 12px}
.tscodes{display:grid;grid-template-columns:1fr 1fr;gap:6px;text-align:center}
.tscodes code{font-size:13px;background:var(--hover);border-radius:8px;padding:6px 4px}
.foldh{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;background:none;border:0;padding:0;margin:0;font:inherit;color:var(--fg);text-align:left;cursor:pointer}
.foldt{font-weight:600;font-size:17px;min-width:0}
.foldr{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:6px;flex:none;max-width:60%}
.foldc{flex:none;transition:transform .2s}
.foldh[aria-expanded="true"] .foldc{transform:rotate(180deg)}
.foldb{margin-top:12px}
