/* ==========================================================================
   EIS Signature — the EIS FieldOps design system

   Three rules give the system its character:
   1. People are round, controls are soft, data is square.
      Avatars are circles; buttons and fields have soft corners; everything that states a fact
      (status marks, bars, stages, table rules) is a flat, square-ended rectangle, like the logo.
   2. Navy records, blue signals.
      Navy is ink: text, structure, completed things. EIS blue appears only where you are
      (selection) and on the one thing to do now (the primary action, the live item).
   3. Rules, not boxes.
      Sections are ruled like a ledger: a navy rule under the section title, hairlines between
      rows. No cards, no shadows inside a page.

   A page opts in by setting $SIG = true before including includes/header.php; it then loads this
   file only. Components are produced by includes/sig.php. Presentation only: nothing here carries
   or changes behaviour.
   ========================================================================== */

/* IBM Plex Sans and IBM Plex Sans Arabic, self-hosted (SIL Open Font License, static/fonts/OFL.txt) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  /* brand */
  --navy: #0A1326;
  --blue: #1261FF;
  --blue-press: #0B4FD6;
  --blue-wash: #EEF3FF;
  /* ink: tints of the logo navy, never neutral grey */
  --ink: #0A1326;
  --ink-2: #545A67;
  --ink-3: #6A6F7B;
  --ink-4: #A4A8B0;       /* marks and disabled only, never text */
  --line: #E6E7E9;
  --line-2: #D3D5D8;
  --fill: #F3F4F6;
  --fill-2: #EBECEE;
  --mist: #F7F8F9;
  --paper: #FFFFFF;
  /* outcomes */
  --red: #B42318;    --red-wash: #FDF1EF;
  --amber: #8A5A00;  --amber-wash: #FBF5E6;
  --green: #1F6E46;  --green-wash: #EDF6F0;

  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 20px;
  --r-ctl: 10px;
  --r-sm: 8px;
  --r-sheet: 16px;
  --nav-w: 0px;
}
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--font); font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html[lang="ar"] body { line-height: 1.7; }
html[lang="ar"] * { letter-spacing: 0 !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol, dl, dd { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
bdi, .ltr { unicode-bidi: isolate; }
.ltr { direction: ltr; display: inline-block; }

/* icons: one 24-grid stroke family, squared like the logo */
.ic { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
html[dir="rtl"] .ic.dir { transform: scaleX(-1); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; z-index: 100; top: -60px; inset-inline-start: 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; }
.skip:focus { top: 12px; }

/* ==========================================================================
   Shell — one <nav>, three forms: tab bar (phone), rail (tablet), sidebar (desktop)
   ========================================================================== */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.app.no-nav { background: var(--paper) !important; }
.page { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.content { flex: 1; padding: 0 var(--gutter) 36px; }
.content > .note { margin-bottom: 24px; }
.flashes { display: grid; gap: 8px; padding: 0 var(--gutter) 18px; }

.nav { order: 2; position: sticky; bottom: 0; z-index: 20; background: rgba(255,255,255,0.94); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav-brand, .nav-group, .nav-me, .nav-item.x { display: none; }
.nav-items { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--ink-3); }
html[lang="ar"] .nav-item { font-size: 12px; }
.nav-item .ic { width: 24px; height: 24px; }
.nav-item.is-current, .nav-item.is-current-n { color: var(--ink); }
.nav-item.is-current::before, .nav-item.is-current-n::before { content: ""; position: absolute; top: -1px; left: calc(50% - 12px); width: 24px; height: 3px; background: var(--blue); }
.nav-count { position: absolute; top: 6px; inset-inline-start: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; line-height: 17px; text-align: center; }
.lbl-w { display: none; }
.app.is-detail .nav { display: none; }

/* page top: brand row + title on phone, a single toolbar from tablet up */
.top { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "lead actions" "title title"; align-items: center; padding: max(4px, env(safe-area-inset-top)) var(--gutter) 18px; }
.top-lead { grid-area: lead; display: flex; align-items: center; min-height: 48px; }
.top-lead .mark { height: 15px; display: block; }
.top-title { grid-area: title; padding-top: 4px; min-width: 0; }
.top-date { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.top h1 { font-size: 30px; line-height: 36px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.top-ref { font-size: 14px; line-height: 20px; color: var(--ink-2); letter-spacing: 0.01em; }
.top.is-sub h1 { font-size: 24px; line-height: 30px; letter-spacing: -0.015em; }
.top.no-lead { grid-template-areas: "title actions"; padding-top: max(10px, env(safe-area-inset-top)); align-items: center; }
.top-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.top-facts .is-due { color: var(--red); }
.top-actions { grid-area: actions; display: flex; align-items: center; gap: 2px; margin-inline-end: -8px; }
.top-actions .page-act { display: none; }
.top-actions > a.avatar-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-inline-start: -7px; font-size: 16px; font-weight: 500; }
.back .ic { width: 22px; height: 22px; transform: scaleX(-1); }
html[dir="rtl"] .back .ic { transform: none; }
.iconbtn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-ctl); }
.iconbtn .ic { width: 22px; height: 22px; }
.iconbtn .pip { position: absolute; top: 10px; inset-inline-end: 9px; width: 8px; height: 8px; overflow: hidden; background: var(--blue); box-shadow: 0 0 0 2px var(--paper); font-size: 0; }
.avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: var(--fill-2); display: grid; place-items: center; object-fit: cover; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink); }
.avatar.lg { width: 40px; height: 40px; flex-basis: 40px; font-size: 14px; }
.avatar.xl { width: 56px; height: 56px; flex-basis: 56px; font-size: 18px; }

/* ==========================================================================
   Focus — the single live thing on a home screen, capped by the blue bar
   ========================================================================== */
.focus { position: relative; padding: 16px 0 6px; }
.focus::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 28px; height: 4px; background: var(--blue); }
.focus-label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.focus-title { font-size: 24px; line-height: 30px; letter-spacing: -0.015em; margin-top: 2px; }
.focus-time { display: flex; align-items: baseline; gap: 10px; font-size: 40px; line-height: 46px; font-weight: 600; letter-spacing: -0.025em; margin-top: 2px; }
.focus-time small { font-size: 15px; line-height: 20px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.focus-sub { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; margin-top: 4px; }
.focus-meta { font-size: 15px; line-height: 22px; color: var(--ink-2); margin-top: 4px; }
.btns { display: flex; gap: 10px; margin-top: 18px; }
.btns.sm { margin-top: 14px; flex-wrap: wrap; gap: 8px; }
.caution { display: flex; gap: 10px; margin-top: 14px; font-size: 14px; line-height: 20px; color: var(--ink); }
.caution .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--red); }
.caution b { font-weight: 500; color: var(--red); }

.strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 18px; padding: 4px 0 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
.strip .st { font-size: 15px; line-height: 20px; color: var(--ink); white-space: normal; min-width: 0; }
.strip .st .mk { align-self: flex-start; margin-top: 6px; }

/* ==========================================================================
   Sections and rows — ruled, never boxed
   ========================================================================== */
.sec { padding-top: 28px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--ink); }
.sec-head h2 { font-size: 15px; line-height: 20px; }
.sec-head .n { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.more { display: inline-flex; align-items: center; gap: 1px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.more .ic { width: 16px; height: 16px; }
.sec-foot { font-size: 13px; line-height: 19px; color: var(--ink-2); padding-top: 10px; }

.row { display: grid; grid-template-columns: auto minmax(0, 1fr) fit-content(46%); column-gap: 12px; align-items: start; min-height: 56px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row.plain { grid-template-columns: minmax(0, 1fr) fit-content(46%); }
button.row { width: 100%; text-align: start; }
.row > .mk { margin-top: 8px; }
.row > .avatar { margin-top: 2px; }
.row > .ic { width: 22px; height: 22px; margin-top: 0; color: var(--ink-2); }
.row-title { font-size: 16px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.row-sub { font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.row-sub.is-due { color: var(--red); }
.row-ref { font-size: 12.5px; line-height: 18px; color: var(--ink-3); letter-spacing: 0.02em; }
.row-trail { display: flex; align-items: center; gap: 1px; align-self: center; font-size: 15px; font-weight: 500; color: var(--ink-2); text-align: end; }
.row-trail.act { color: var(--blue); }
.row-trail .ic { width: 18px; height: 18px; color: var(--ink-4); }
.row-trail.act .ic { color: var(--blue); }
.row.is-danger .row-title, .row.is-danger > .ic { color: var(--red); }

/* status: a square mark and plain words */
.mk { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; background: var(--ink-3); }
.mk.now { background: var(--blue); }
.mk.due { background: var(--red); }
.mk.done { background: var(--ink); }
.mk.ok { background: var(--green); }
.mk.late { background: var(--amber); }
.mk.wait { background: transparent; box-shadow: inset 0 0 0 2px var(--amber); }
.mk.sched { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.st.now { color: var(--blue); } .st.due { color: var(--red); } .st.wait, .st.late { color: var(--amber); } .st.done { color: var(--ink); } .st.ok { color: var(--green); }
.nil { color: var(--ink-4); }

/* How final a value is. The form says it before the words do:
   solid = approved or posted, hatched = estimate, outlined = provisional, dashed = pending. */
.vt { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.vt::before { content: ""; width: 10px; height: 10px; flex: 0 0 10px; background: var(--ink); }
.vt.final { color: var(--ink); }
.vt.est { color: var(--amber); }
.vt.est::before { background: repeating-linear-gradient(135deg, var(--amber) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--amber); }
.vt.prov::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.vt.pending::before { background: transparent; border: 1px dashed var(--ink-3); }
.vt.na::before { background: transparent; box-shadow: inset 0 -1.5px 0 var(--ink-4); }
.est { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--amber); white-space: nowrap; }
.is-est { color: var(--ink-2); }

/* figures: numbers on a line, separated by hairlines */
.figs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 0 2px; }
.figs.two { grid-template-columns: repeat(2, 1fr); }
.figs.four { grid-template-columns: repeat(4, 1fr); }
.figs.lead { padding-top: 0; padding-bottom: 20px; }
.fig { padding-inline: 14px; border-inline-start: 1px solid var(--line); min-width: 0; }
.fig:first-child { padding-inline-start: 0; border-inline-start: 0; }
.fig b { display: block; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.fig b small { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.fig b.is-due { color: var(--red); }
.fig b.is-est { color: var(--ink-2); }
.fig span { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.fig .vt { margin-top: 4px; }

/* key–value facts and totals */
.kv { display: grid; grid-template-columns: fit-content(46%) minmax(0, 1fr); }
.kv dt { min-width: 108px; }
.kv.wide dt { min-width: 124px; }
.kv dt, .kv dd { padding-block: 11px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; }
.kv dt { color: var(--ink-2); overflow-wrap: anywhere; padding-inline-end: 16px; }
.kv dd { font-weight: 500; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.kv dd a.tel { color: var(--blue); }
.kv dd .est, .kv dd .vt { margin-inline-start: auto; }
.tally { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.tally dt, .tally dd { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; }
.tally dd { font-weight: 600; text-align: end; }
.tally .is-due { color: var(--red); }
.tally .is-total { border-bottom-color: var(--ink); }

.prose { padding: 12px 0 2px; font-size: 16px; line-height: 24px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 22px; }
.ticks li::before { content: ""; width: 14px; height: 14px; flex: 0 0 14px; box-shadow: inset 0 0 0 1.5px var(--ink-4); transform: translateY(2px); }
.consent { padding: 12px 0 0; font-size: 14px; line-height: 21px; color: var(--ink-2); }

/* ==========================================================================
   Bars — the only chart form: flat, square-ended, like the logo
   ========================================================================== */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 14px 0 4px; text-align: center; }
.day { font-size: 12px; line-height: 16px; color: var(--ink-3); }
html[lang="ar"] .day { font-size: 13px; }
.day b { display: block; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--ink); }
.day i { display: block; height: 4px; margin-top: 6px; background: var(--line); }
.day.ok i { background: var(--ink); }
.day.late i { background: var(--amber); }
.day.absent i { background: var(--red); }
.day.permit i { background: transparent; box-shadow: inset 0 0 0 1px var(--ink-3); }
.day.wait i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--amber); }
.day.today b { color: var(--blue); font-weight: 600; }
.day.today i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--blue); }
.day.today.in i, .day.act i { background: var(--blue); box-shadow: none; }
.day.off b, .day.off { color: var(--ink-4); }
.day.off i, .day.next i { background: transparent; }
.day.next b { color: var(--ink-3); font-weight: 400; }
.days.month { row-gap: 14px; }
.days .dow { padding-bottom: 0; }
.days.month .day.dow { margin-bottom: -8px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 12px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 4px; background: var(--ink); }
.legend i.late { background: var(--amber); } .legend i.absent { background: var(--red); } .legend i.act { background: var(--blue); }
.legend i.today { background: transparent; box-shadow: inset 0 0 0 1.5px var(--blue); }
.legend i.wait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--amber); }
.legend i.permit { background: transparent; box-shadow: inset 0 0 0 1px var(--ink-3); }

.progress { padding: 2px 0 0; }
.stages { display: flex; gap: 3px; }
.stages i { flex: 1; height: 6px; background: var(--line-2); }
.stages i.done { background: var(--ink); }
.stages i.now { background: var(--blue); }
.stage-names { display: none; }
.stage-cap { margin-top: 9px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.stage-cap b { font-weight: 600; color: var(--ink); }

.kpi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kpi-name { font-size: 16px; line-height: 22px; font-weight: 500; }
.kpi-pts { font-size: 16px; line-height: 22px; font-weight: 600; white-space: nowrap; }
.kpi-pts small { font-size: 13px; font-weight: 400; color: var(--ink-2); }
.kpi-sub { grid-column: 1 / -1; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.meter { grid-column: 1 / -1; position: relative; height: 8px; margin-top: 9px; background: var(--fill-2); }
.meter i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--ink); }
/* an estimate is hatched, a provisional value is outlined, a pending one is an empty frame: never solid */
.meter.est i { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--ink); }
.meter.prov i { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.meter.pending { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.meter.pending i { display: none; }
.stack { display: flex; gap: 2px; height: 8px; margin-top: 12px; }
.stack i { background: var(--ink); } .stack i.b { background: var(--ink-3); } .stack i.c { background: var(--ink-4); } .stack i.off { background: var(--fill-2); } .stack i.now { background: var(--blue); }
.score { padding-bottom: 4px; }
.score-n { font-size: 44px; line-height: 50px; font-weight: 600; letter-spacing: -0.025em; }
.score-n small { font-size: 16px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.score .meter { height: 10px; margin-top: 10px; }
.score .focus-meta { margin-top: 12px; max-width: 520px; }

/* ==========================================================================
   Controls — soft corners, one filled blue button per view
   ========================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: var(--r-ctl); border: 1px solid transparent; font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); }
.btn-secondary, .btn-outline { background: var(--paper); border-color: var(--line-2); color: var(--ink); }
.btn-secondary:hover, .btn-outline:hover { border-color: var(--ink-3); }
.btn-quiet { background: var(--fill); color: var(--ink); }
.btn-quiet:hover { background: var(--fill-2); }
.btn-danger { background: var(--paper); border-color: var(--line-2); color: var(--red); }
.btn-sm { height: 40px; padding: 0 14px; border-radius: var(--r-sm); font-size: 14px; }
.btn-icon { width: 48px; padding: 0; }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.btn[disabled], .btn.is-disabled { background: var(--fill); color: var(--ink-4); border-color: transparent; cursor: default; }
.btn.is-loading { opacity: 0.72; pointer-events: none; }
.link { color: var(--blue); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.actionbar { position: sticky; bottom: 0; z-index: 15; display: flex; gap: 10px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,0.95); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }

.toolbar2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0 14px; flex-wrap: wrap; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--fill); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg a b { font-weight: 500; color: var(--ink-3); }
.seg a.is-current { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(10,19,38,0.06); }
.seg a.is-current b { color: var(--ink-2); }
.pick { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.pick .ic { width: 16px; height: 16px; color: var(--ink-3); transform: rotate(90deg); }
.month-nav { display: inline-flex; align-items: center; gap: 2px; font-size: 16px; font-weight: 600; }
.month-nav .iconbtn { width: 40px; height: 40px; color: var(--ink-2); }
.month-nav .iconbtn.prev .ic { transform: scaleX(-1); }
html[dir="rtl"] .month-nav .iconbtn.prev .ic { transform: none; } html[dir="rtl"] .month-nav .iconbtn.next .ic { transform: scaleX(-1); }

/* forms: label above, hint below, error in red under the field */
.form { max-width: 520px; }
.field { display: block; }
.field + .field { margin-top: 16px; }
.field-label { display: block; font-size: 14px; line-height: 20px; font-weight: 500; margin-bottom: 6px; }
.field-label .opt { font-weight: 400; color: var(--ink-2); }
.input { display: block; width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--paper); font-size: 16px; line-height: 24px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.input:disabled, .input[readonly] { background: var(--fill); border-color: var(--line); color: var(--ink-2); }
.input.is-error, form.was-validated .input:invalid { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
textarea.input { height: auto; min-height: 104px; padding: 11px 14px; resize: vertical; }
select.input { padding-inline-end: 40px; background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23545A67' stroke-width='1.8' stroke-linecap='square'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
html[dir="rtl"] select.input { background-position: left 12px center; }
.field-hint { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); margin-top: 6px; }
.field-hint.is-error { color: var(--red); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--ink); }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 22px; }
.choice input { margin-top: 1px; }
.check { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line-2); display: inline-grid; place-items: center; vertical-align: middle; }
.check.on { background: var(--ink); box-shadow: none; color: #fff; }
.check .ic { width: 16px; height: 16px; }

.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--amber-wash); font-size: 14px; line-height: 20px; }
.note > .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--amber); }
.note > div { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.note b { font-weight: 600; }
.note .link { margin-inline-start: auto; padding-inline-start: 12px; white-space: nowrap; }
.note.red { background: var(--red-wash); } .note.red > .ic { color: var(--red); }
.note.green { background: var(--green-wash); } .note.green > .ic { color: var(--green); }
.note.plain { background: var(--fill); } .note.plain > .ic { color: var(--ink-2); }

/* ==========================================================================
   Tables and split views — the desktop working surface
   ========================================================================== */
.table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.table th { padding: 0 12px 9px; text-align: start; font-size: 13px; font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--ink); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th:first-child, .table td:first-child { padding-inline-start: 0; }
.table th:last-child, .table td:last-child { padding-inline-end: 0; }
.table .num { text-align: end; white-space: nowrap; }
.table .t1 { font-weight: 500; }
.table .t2 { color: var(--ink-2); font-size: 13px; }
.table td > .vt { display: flex; margin-top: 2px; }
.table td.num > .vt { justify-content: flex-end; }
.table .nowrap { white-space: nowrap; }
.table tr.is-due td.d { color: var(--red); }
.table tr.is-total td { border-bottom-color: var(--ink); font-weight: 600; }
.table td .btn-sm { height: 30px; font-size: 13px; padding: 0 10px; margin-block: -5px; }
.table.sel td:first-child, .table.sel th:first-child { padding-inline-start: 14px; }
.table.sel tr.is-selected td { background: var(--blue-wash); }
.table.sel tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
html[dir="rtl"] .table.sel tr.is-selected td:first-child { box-shadow: inset -3px 0 0 var(--blue); }
.table.dec .t2 { margin-top: 1px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.split-detail { display: none; }
.item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.item .when { font-size: 13px; line-height: 22px; color: var(--ink-3); white-space: nowrap; }
.item .row-sub .st { font-size: 14px; }
.group-label { display: flex; justify-content: space-between; padding: 20px 0 8px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--ink); }
.group-label .n { font-weight: 500; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person > div { min-width: 0; }
.person b { display: block; font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.person > div > span { display: block; font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.split-detail .person { margin-bottom: 4px; }
.split-detail .top-facts { margin-top: 4px; }
.split-detail .btns { margin-top: 16px; flex-wrap: wrap; }

/* ==========================================================================
   States
   ========================================================================== */
.empty { padding: 36px 0 28px; text-align: center; }
.empty .ic { width: 28px; height: 28px; color: var(--ink-4); }
.empty h3 { font-size: 16px; line-height: 22px; margin-top: 10px; }
.empty p { font-size: 14px; line-height: 20px; color: var(--ink-2); max-width: 300px; margin: 4px auto 16px; }
.sk { display: block; height: 10px; background: var(--fill-2); }
.sk.w40 { width: 40%; } .sk.w60 { width: 60%; } .sk.w25 { width: 25%; }
.toast { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-ctl); background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; }
.toast .ic { width: 18px; height: 18px; }
.sheet { border: 1px solid var(--line); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 10px 20px 20px; box-shadow: 0 -12px 40px rgba(10,19,38,0.12); }
.sheet::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 16px; }

/* ==========================================================================
   Overlays — the only places a shadow is allowed
   ========================================================================== */
/* confirmation before an important or destructive action (data-confirm) */
dialog.ui-dialog { width: min(420px, calc(100vw - 40px)); margin: auto; padding: 0; border: 0; border-radius: var(--r-sheet); background: var(--paper); color: var(--ink); box-shadow: 0 24px 64px rgba(10,19,38,0.24); }
dialog.ui-dialog::backdrop { background: rgba(10,19,38,0.45); }
.ui-dialog-body { padding: 22px 22px 4px; }
.ui-dialog-t { font-size: 18px; line-height: 24px; }
.ui-dialog-m { margin-top: 6px; font-size: 15px; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; }
.ui-dialog-actions { display: flex; gap: 10px; padding: 18px 22px 22px; }
.ui-dialog-actions .btn { flex: 1; height: 44px; }
.ui-dialog-actions .btn-danger { background: var(--red); border-color: transparent; color: #fff; }

/* notifications */
.notif-dd { position: absolute; z-index: 40; top: calc(100% - 14px); inset-inline: var(--gutter); display: flex; flex-direction: column; max-height: min(70vh, 520px); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 16px 48px rgba(10,19,38,0.16); }
.notif-dd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 10px; border-bottom: 1px solid var(--ink); }
.notif-dd-head h2 { font-size: 15px; line-height: 20px; }
.notif-markall { font-size: 14px; font-weight: 500; color: var(--blue); min-height: 32px; }
.notif-dd-list { overflow-y: auto; }
.notif-dd-item { border-bottom: 1px solid var(--line); }
.notif-dd-item > .ndi-link, .notif-dd-item:not(:has(> .ndi-link)) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 12px; padding: 12px 16px; }
.notif-dd-item > .ndi-link:hover { background: var(--mist); }
.ndi-ic { display: grid; place-items: center; width: 20px; height: 22px; color: var(--ink-2); }
.ndi-ic svg { width: 18px; height: 18px; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.ndi-main { display: block; min-width: 0; }
.ndi-t { display: block; font-size: 14px; line-height: 20px; font-weight: 500; overflow-wrap: anywhere; }
.notif-dd-item.is-unread .ndi-t { font-weight: 600; }
.ndi-m { display: block; font-size: 13px; line-height: 19px; color: var(--ink-2); overflow-wrap: anywhere; }
.ndi-time { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.ndi-dot { width: 8px; height: 8px; margin-top: 7px; background: var(--blue); }
.notif-dd-empty { padding: 28px 16px; text-align: center; font-size: 14px; color: var(--ink-2); }
.notif-dd-foot { display: block; padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--blue); text-align: center; }

/* install prompt */
.pwa-banner { position: fixed; z-index: 60; inset-inline: 12px; inset-block-end: calc(72px + env(safe-area-inset-bottom)); max-width: 460px; margin-inline: auto; display: none; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-sheet); background: var(--ink); color: #fff; box-shadow: 0 24px 56px -16px rgba(10,19,38,0.5); }
.pwa-banner.show { display: flex; animation: pwa-up 0.3s ease; }
.pwa-banner.out { animation: pwa-down 0.26s ease forwards; }
@keyframes pwa-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pwa-down { from { transform: none; opacity: 1; } to { transform: translateY(16px); opacity: 0; } }
.pwa-head { display: flex; align-items: center; gap: 12px; padding-inline-end: 36px; }
.pwa-ic { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px; }
.pwa-txt { min-width: 0; }
.pwa-title { font-size: 16px; line-height: 22px; font-weight: 600; }
.pwa-sub { margin-top: 2px; font-size: 13px; line-height: 19px; color: rgba(255,255,255,0.72); }
.pwa-sub-ios, .pwa-sub-ioschrome { display: none; }
.pwa-share { width: 15px; height: 15px; margin: 0 2px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.pwa-banner.ios .pwa-sub-ios, .pwa-banner.ios-other .pwa-sub-ioschrome { display: block; }
.pwa-banner.ios .pwa-sub-android, .pwa-banner.ios-other .pwa-sub-android { display: none; }
.pwa-ios-lead { margin: 4px 0 8px; font-size: 13px; font-weight: 600; color: #fff; }
.pwa-steps { display: flex; flex-direction: column; gap: 8px; }
.pwa-steps li { display: flex; align-items: flex-start; gap: 10px; }
.pwa-step-n { flex: 0 0 20px; width: 20px; height: 20px; display: inline-grid; place-items: center; background: rgba(255,255,255,0.16); font-size: 12px; font-weight: 600; }
.pwa-step-txt { font-size: 13px; line-height: 20px; color: rgba(255,255,255,0.84); }
.pwa-step-txt b { color: #fff; font-weight: 600; }
.pwa-install-btn { display: none; width: 100%; height: 44px; border-radius: var(--r-ctl); background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; }
.pwa-banner.android .pwa-install-btn { display: inline-flex; align-items: center; justify-content: center; }
.pwa-dismiss { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); color: rgba(255,255,255,0.72); }
.pwa-dismiss svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; }

/* ==========================================================================
   Hubs (Me, More) and the component reference
   ========================================================================== */
.hub { max-width: 640px; }
.hub .person { padding: 2px 0 6px; }
.hub .person b { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
.hub .row { align-items: center; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; padding-top: 14px; }
.sw i { display: block; height: 44px; margin-bottom: 8px; }
.sw b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; }
.sw span { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.type-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.type-row > span { font-size: 13px; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 14px; }
.state-name { padding: 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.spec .empty { padding: 18px 0; }
.spec .cols { margin-top: 28px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 16px 8px; padding-top: 16px; }
.icon-grid div { display: grid; justify-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.icon-grid .ic { width: 24px; height: 24px; color: var(--ink); }

.only-wide, .d-only { display: none; }

/* ==========================================================================
   Phone only
   ========================================================================== */
@media (max-width: 699.98px) {
  .only-wide { display: none !important; }
  /* on a phone home screen the date is the title; the state below it is the hero */
  .top.is-home h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top.is-home .top-date { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
  .top.is-home { padding-bottom: 22px; }
  .content > .toolbar2 + .cols > .col:first-child > .sec:first-child { padding-top: 8px; }
  .note { flex-wrap: wrap; }
  .note .link { flex-basis: 100%; margin-inline-start: 28px; padding-inline-start: 0; }
  .figs.four .fig { padding-inline: 10px; }
  .figs.four .fig b { font-size: 20px; }
  .seg { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); border-radius: 0; background: none; }
  .seg a { background: var(--fill); }
  .seg a.is-current { background: var(--ink); color: #fff; box-shadow: none; }
  .seg a.is-current b { color: rgba(255,255,255,0.7); }
  .btns.sm .btn-sm { flex: 1 1 auto; }
  .table td, .table th { padding-inline: 6px; }
  .table.rec td:nth-child(2), .table.rec td:nth-child(3), .table.rec th:nth-child(2), .table.rec th:nth-child(3) { width: 52px; }
  .table.rec .st { white-space: normal; align-items: flex-start; }
  .table.rec .st .mk { margin-top: 5px; }
  .table.rec td:first-child { white-space: nowrap; }
  /* a decision table becomes stacked rows on a phone: type and date on one line, the item beneath */
  .table.dec thead { display: none; }
  .table.dec, .table.dec tbody { display: block; }
  .table.dec tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "type date" "item item"; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table.dec td { display: block; padding: 0; border: 0; }
  .table.dec td:nth-child(1) { grid-area: type; } .table.dec td:nth-child(2) { grid-area: item; } .table.dec td.d { grid-area: date; font-size: 13px; color: var(--ink-3); }
  .table.dec tr.is-due td.d { color: var(--red); }
  .table.dec .t1 { font-size: 16px; line-height: 22px; }
  .table.dec .t2 { font-size: 14px; line-height: 20px; }
}

/* three figures size to their content so a longer label keeps to one line (phone and desktop; the
   narrow tablet columns keep three equal figures) */
@media (max-width: 699.98px), (min-width: 1100px) {
  .figs:not(.two):not(.four):not(.lead) { grid-template-columns: auto auto minmax(0, 1fr); }
  .figs:not(.two):not(.four):not(.lead) .fig { padding-inline: 18px; }
  .figs:not(.two):not(.four):not(.lead) .fig:first-child { padding-inline-start: 0; }
}

/* ==========================================================================
   Tablet: the tab bar becomes a rail; the page top becomes a toolbar
   ========================================================================== */
@media (min-width: 700px) {
  :root { --gutter: 32px; --nav-w: 84px; }
  .app { flex-direction: row; background: linear-gradient(to right, var(--mist) var(--nav-w), var(--line) var(--nav-w), var(--line) calc(var(--nav-w) + 1px), var(--paper) calc(var(--nav-w) + 1px)); }
  html[dir="rtl"] .app { background: linear-gradient(to left, var(--mist) var(--nav-w), var(--line) var(--nav-w), var(--line) calc(var(--nav-w) + 1px), var(--paper) calc(var(--nav-w) + 1px)); }
  .nav, .app.is-detail .nav { order: 0; display: flex; flex-direction: column; position: sticky; top: 0; bottom: auto; align-self: flex-start; width: calc(var(--nav-w) + 1px); flex: 0 0 calc(var(--nav-w) + 1px); height: 100vh; height: 100dvh; padding: 18px 8px 12px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 0; overflow-y: auto; scrollbar-width: none; }
  .nav-brand { display: block; padding: 6px 0 22px; }
  .nav-brand img { height: 13px; display: block; margin: 0 auto; }
  .nav-items { display: flex; flex-direction: column; gap: 4px; }
  .nav-item { min-height: 60px; border-radius: 10px; }
  .nav-item.is-current { background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
  .nav-item.is-current::before { top: calc(50% - 11px); left: auto; inset-inline-start: -8px; width: 3px; height: 22px; }
  .nav-count { top: 8px; }
  .nav-me { display: flex; flex-direction: column; align-items: center; margin-top: auto; padding-top: 12px; }
  .nav-who { display: flex; align-items: center; gap: 10px; min-width: 0; border-radius: var(--r-sm); }
  .nav-me .who, .nav-foot { display: none; }

  .top, .top.no-lead { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title actions"; padding: 26px var(--gutter) 22px; align-items: end; }
  .top-lead { display: none; }
  .top.is-sub { grid-template-areas: "lead lead" "title actions"; }
  .top.is-sub .top-lead { display: flex; min-height: 32px; margin-bottom: 2px; }
  .top-title { padding-top: 0; }
  .top h1, .top.is-sub h1 { font-size: 26px; line-height: 32px; }
  .top-actions { margin-inline-end: 0; gap: 8px; align-self: end; }
  .top-actions .page-act { display: inline-flex; }
  .top-actions > a.avatar-link { display: none; }
  .top-actions .iconbtn { width: 40px; height: 40px; }
  .notif-dd { top: calc(100% - 12px); inset-inline: auto var(--gutter); width: 380px; }
  .flashes { padding-bottom: 20px; }
  .actionbar { display: none; }
  .content { padding-bottom: 48px; }
  .btn { height: 40px; font-size: 15px; padding: 0 16px; border-radius: var(--r-sm); }
  .btn-icon { width: 40px; padding: 0; }
  .btn-sm { height: 34px; font-size: 14px; }
  .focus .btns .btn { height: 44px; }
  .focus .btn-block { width: auto; min-width: 220px; }
  .focus .btns .btn-grow { flex: 0 1 260px; }
  .strip { margin-bottom: 22px; }
  .progress { max-width: 720px; padding-bottom: 28px; }
  .stage-names { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
  .stage-names .done { color: var(--ink-2); } .stage-names .now { color: var(--ink); font-weight: 600; }
  .stage-cap { display: none; }
  .days, .days.month { max-width: 420px; }
  .figs.lead { max-width: 560px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 40px; align-items: start; }
  .cols > * > .sec:first-child { padding-top: 0; }
  .cols .swap { order: 2; }
  .cols.wide { display: block; }
  .cols.abc { grid-template-areas: "a b" "c b"; grid-template-rows: auto 1fr; }
  .cols.abc > .a { grid-area: a; } .cols.abc > .b { grid-area: b; } .cols.abc > .c { grid-area: c; }
  .cols.abc > .c > .sec:first-child { padding-top: 28px; }
  .content > .note + .cols > .col > .sec:first-child { padding-top: 0; }
  .only-wide { display: revert; }
  .only-narrow { display: none !important; }
  .pwa-banner { inset-block-end: 16px; }

  .split { display: grid; grid-template-columns: minmax(280px, 40%) minmax(0, 1fr); border-top: 1px solid var(--line); margin-inline: calc(var(--gutter) * -1); min-height: calc(100dvh - 190px); }
  .split-list { padding: 0 0 24px; border-inline-end: 1px solid var(--line); min-width: 0; }
  .split-list .group-label { padding-inline: var(--gutter) 20px; }
  .split-list .item { padding-inline: var(--gutter) 20px; }
  .split-list .item.is-selected { background: var(--blue-wash); box-shadow: inset 3px 0 0 var(--blue); }
  html[dir="rtl"] .split-list .item.is-selected { box-shadow: inset -3px 0 0 var(--blue); }
  .split-detail { display: block; padding: 24px var(--gutter) 40px 28px; min-width: 0; }
  .split-detail h2.d-title { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
}
@media (min-width: 700px) and (max-width: 1099.98px) {
  .nav-item.is-current-n { background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
  .nav-item.is-current-n::before { top: calc(50% - 11px); left: auto; inset-inline-start: -8px; width: 3px; height: 22px; }
  .fig b small { display: block; line-height: 16px; }
}

/* ==========================================================================
   Desktop: the rail opens into a sidebar; density tightens
   ========================================================================== */
@media (min-width: 1100px) {
  :root { --gutter: 40px; --nav-w: 244px; }
  body { font-size: 14px; }
  html[lang="ar"] body { font-size: 15px; }
  .nav, .app.is-detail .nav { padding: 20px 12px 14px; }
  .nav-brand { padding: 4px 10px 24px; }
  .nav-brand img { height: 17px; margin: 0; }
  .nav-items { gap: 1px; }
  .nav-group, .nav-item.x { display: flex; }
  .nav-item.n-only, .lbl-n { display: none; }
  .lbl-w { display: inline; }
  .nav-group { margin: 16px 10px 5px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); }
  .nav-item { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: 8px; font-size: 14px; line-height: 20px; color: var(--ink); }
  html[lang="ar"] .nav-item { font-size: 15px; }
  .nav-item:hover { background: var(--fill); }
  .nav-item.is-current:hover { background: var(--paper); }
  .nav-item .ic { width: 18px; height: 18px; color: var(--ink-2); }
  .nav-item.is-current { font-weight: 600; }
  .nav-item.is-current .ic { color: var(--ink); }
  .nav-item.is-current::before { top: calc(50% - 9px); inset-inline-start: -12px; height: 18px; }
  .nav-item.is-current-n::before { display: none; }
  .nav-count { position: static; margin-inline-start: auto; min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; color: var(--ink-2); font-size: 13px; font-weight: 500; line-height: 20px; }
  .nav-me { align-items: stretch; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
  .nav-me .who { display: block; min-width: 0; font-size: 13px; line-height: 18px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-me .who b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
  .nav-foot { display: flex; align-items: center; gap: 16px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
  .nav-foot a, .nav-foot button { font-weight: 500; min-height: 24px; }
  .nav-foot a:hover, .nav-foot button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

  .top h1, .top.is-sub h1 { font-size: 24px; line-height: 30px; }
  .top-date, .top-ref, .top-facts { font-size: 13px; line-height: 18px; }
  .top-actions .iconbtn { display: none; }
  .btn { height: 36px; font-size: 14px; padding: 0 14px; }
  .btn-icon { width: 36px; padding: 0; }
  .btn-sm { height: 30px; font-size: 13px; padding: 0 10px; }
  .focus .btns .btn { height: 40px; }
  .focus-title { font-size: 22px; line-height: 28px; }
  .focus-time { font-size: 36px; line-height: 42px; }
  .focus-sub { font-size: 18px; line-height: 24px; }
  .focus-meta, .strip { font-size: 14px; line-height: 20px; }
  .strip .st { font-size: 14px; }
  .sec-head h2 { font-size: 14px; }
  .more, .sec-head .n { font-size: 13px; }
  .row { min-height: 48px; padding: 10px 0; }
  .row-title, .kpi-name, .kpi-pts { font-size: 14px; line-height: 20px; }
  .row-sub, .kpi-sub, .row-trail, .caution, .consent, .note, .stage-cap { font-size: 13px; line-height: 19px; }
  .row > .mk { margin-top: 6px; }
  .row > .ic { width: 18px; height: 18px; }
  .kv dt, .kv dd { padding-block: 9px; font-size: 14px; line-height: 20px; }
  .kv dt { min-width: 120px; }
  .tally dt, .tally dd { padding: 8px 0; font-size: 14px; line-height: 20px; }
  .prose, .ticks li, .choice { font-size: 14px; line-height: 21px; }
  .ticks li, .choice { padding: 9px 0; }
  .fig b { font-size: 20px; line-height: 26px; }
  .score-n { font-size: 40px; line-height: 46px; }
  .item { padding-block: 11px; }
  .seg a { height: 30px; font-size: 13px; }
  .pick { height: 32px; font-size: 13px; }
  .field-label { font-size: 13px; line-height: 18px; }
  .input { height: 36px; font-size: 14px; line-height: 20px; border-radius: var(--r-sm); padding-inline: 12px; }
  textarea.input { padding-block: 8px; min-height: 88px; }
  select.input { padding-inline-end: 36px; }
  input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; flex-basis: 16px; }
  .person b { font-size: 15px; }
  .hub .person b { font-size: 18px; line-height: 24px; }
  .cols.wide { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 0 48px; }
  .split { grid-template-columns: minmax(360px, 36%) minmax(0, 1fr); min-height: calc(100dvh - 150px); }
  .d-only { display: inline-flex; }
  .ui-dialog-actions .btn { height: 40px; }
}
@media (min-width: 1500px) { .content, .top, .flashes { max-width: 1360px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .nav, .actionbar, .top-actions, .pwa-banner, .skip { display: none !important; }
  .app { background: none !important; }
}

/* ==========================================================================
   Employee screens
   ========================================================================== */
/* check-in and check-out: the scripts toggle these elements by id and inline display */
.checkin { margin-top: 4px; }
.step-label { margin: 18px 0 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.checkin .btns { margin-top: 0; }
.checkin .btns.sm { margin-top: 0; }
.checkin-media { display: block; width: 100%; max-width: 320px; margin-bottom: 10px; border-radius: var(--r-ctl); background: var(--fill); }
.checkin-media.mirror { transform: scaleX(-1); }
.checkin-chip { display: none; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--green); }
.checkin-chip.show { display: inline-flex; }
.checkin-chip .ic { width: 18px; height: 18px; }
.checkin-error { margin-bottom: 10px; font-size: 14px; line-height: 20px; color: var(--red); }
.checkin-error:empty { display: none; }
.checkin-offline-note { margin-bottom: 10px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--fill); font-size: 14px; line-height: 20px; }
.checkin-late { margin-top: 18px; max-width: 520px; }
.queue { margin-bottom: 18px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--amber-wash); font-size: 14px; line-height: 20px; }
.queue-text { font-weight: 600; }
.queue-result { margin-top: 4px; color: var(--ink-2); }
.queue .btns { margin-top: 10px; }
.focus-meta .st { font-size: 15px; vertical-align: baseline; margin-inline-end: 6px; }
a.day { display: block; }
a.day:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* forms inside a page */
.sec > .form, .sec > form.form { padding-top: 14px; }
.fields { display: grid; gap: 16px; }
.fields > .field { margin-top: 0; }
.fields + .field, .field + .fields, .fields + .fields { margin-top: 16px; }
.form .btns { margin-top: 16px; }
.form .btns.sm { margin-top: 16px; }
input[type="file"].input { height: auto; padding: 10px 14px; font-size: 14px; line-height: 20px; }
input[type="file"].input::file-selector-button { margin-inline-end: 12px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
input[type="date"].input, input[type="time"].input, input[type="month"].input { min-width: 0; }
html[dir="rtl"] input[type="number"].input, html[dir="rtl"] input[type="tel"].input, html[dir="rtl"] input[type="email"].input { text-align: right; }

/* live location sharing (includes/location_share.php): consent text and controls are unchanged */
.loc-share { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--ink); }
.loc-ic { grid-row: 1 / span 3; padding-top: 1px; color: var(--ink-2); }
.loc-ic svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.loc-title { font-size: 15px; line-height: 20px; font-weight: 600; }
.loc-text { margin-top: 4px; font-size: 14px; line-height: 21px; color: var(--ink-2); }
.loc-status-live { color: var(--ink); font-weight: 500; }
.loc-status-err { color: var(--red); }
.loc-dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px; background: var(--blue); }
.loc-actions { grid-column: 2; display: flex; gap: 8px; margin-top: 12px; }
.loc-share .btn-primary { background: var(--paper); border-color: var(--line-2); color: var(--ink); }
.loc-share .btn-primary:hover { background: var(--paper); border-color: var(--ink-3); }

@media (min-width: 700px) {
  .fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols > .col > .loc-share:first-child { margin-top: 0; }
}
@media (min-width: 1100px) {
  .step-label, .checkin-chip, .checkin-error, .checkin-offline-note, .queue, .loc-text { font-size: 13px; line-height: 19px; }
  .loc-title { font-size: 14px; }
  .focus-meta .st { font-size: 14px; }
  input[type="file"].input { padding: 6px 12px; font-size: 13px; }
}
@media (max-width: 699.98px) { .checkin .btns.sm .btn { flex: 1 1 auto; } }

/* Attendance record */
.month-pick { display: inline-flex; align-items: center; gap: 8px; }
.month-pick .input { width: auto; min-width: 150px; height: 40px; padding-block: 0; }
.month-nav .iconbtn.is-off { color: var(--ink-4); opacity: 0.5; }
.legend i.none { background: var(--line); }
.table .is-due { color: var(--red); }
.table tr[id] { scroll-margin-top: 96px; }
.table tr:target td { background: var(--blue-wash); }
.table tr:target td:first-child { box-shadow: inset 3px 0 0 var(--blue); padding-inline-start: 10px; }
html[dir="rtl"] .table tr:target td:first-child { box-shadow: inset -3px 0 0 var(--blue); }
.table td a { color: inherit; text-decoration: none; }
.days.month a.day { text-decoration: none; }
@media (max-width: 699.98px) {
  .toolbar2 .month-pick { flex: 1 1 100%; }
  .toolbar2 .month-pick .input { flex: 1 1 auto; }
}

/* Requests: disclosure forms, history items and their discussion */
.row-over { font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.row-sub .when, .msg-head .when { font-size: 13px; color: var(--ink-3); }
.seg button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.seg button b { font-weight: 500; color: var(--ink-3); }
.seg button.is-current { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(10,19,38,0.06); }
.seg button.is-current b { color: var(--ink-2); }
.sec > .seg { margin-top: 14px; }
.disc { border-bottom: 1px solid var(--line); }
.disc > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; min-height: 56px; padding: 13px 0; list-style: none; cursor: pointer; }
.disc > summary::-webkit-details-marker { display: none; }
.disc > summary:hover .row-title { color: var(--blue); }
.disc-main { display: block; }
.disc-main .row-title, .disc-main .row-sub { display: block; }
.disc-chev { width: 18px; height: 18px; color: var(--ink-3); transform: rotate(90deg); transition: transform 0.15s; }
.disc[open] > summary .disc-chev { transform: rotate(-90deg); }
.disc[open] > summary .row-sub { color: var(--ink); }
.disc-body { padding: 2px 0 22px; }
.disc-body > .form:first-child { padding-top: 6px; }
.sub-head { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; line-height: 20px; font-weight: 600; }
.sub-head + .prose { padding-top: 6px; font-size: 14px; line-height: 21px; color: var(--ink-2); }
.inline-form { display: flex; align-items: flex-end; gap: 10px; padding-top: 14px; }
.inline-form .field { flex: 1 1 auto; min-width: 0; }
.inline-form .btn { flex: 0 0 auto; height: 48px; }
.inline-form + .form { padding-top: 18px; }
.req { border-bottom: 1px solid var(--line); }
.req > .row { border-bottom: 0; }
.req[hidden] { display: none; }
.thread-wrap { margin-inline-start: 20px; padding-bottom: 14px; }
.thread-wrap > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; list-style: none; cursor: pointer; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--blue); }
.thread-wrap > summary::-webkit-details-marker { display: none; }
.thread-wrap > summary .ic { width: 16px; height: 16px; }
.thread-wrap > summary .st { margin-inline-start: 6px; }
.thread { margin-top: 6px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line); }
.msg { padding: 8px 0; }
.msg + .msg { border-top: 1px solid var(--line); }
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 13px; line-height: 19px; }
.msg-head b { font-weight: 600; }
.msg-body { margin-top: 2px; font-size: 15px; line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.msg-change { margin-top: 4px; font-size: 15px; line-height: 22px; }
.msg-change del { color: var(--ink-3); }
.msg.is-proposal { padding-inline-start: 12px; margin-inline-start: -16px; border-inline-start: 2px solid var(--amber); }
.thread-form { margin-top: 12px; }
.thread-form .btns { margin-top: 12px; }
.thread-form.is-inline { display: flex; gap: 8px; align-items: center; }
.thread-form.is-inline .input { flex: 1 1 auto; min-width: 0; height: 40px; font-size: 15px; }
.thread-form.is-inline .btn { flex: 0 0 auto; }
.thread-propose > summary { list-style: none; display: inline-flex; margin-top: 10px; }
.thread-propose > summary::-webkit-details-marker { display: none; }
@media (max-width: 699.98px) {
  .seg button { background: var(--fill); }
  .seg button.is-current { background: var(--ink); color: #fff; box-shadow: none; }
  .seg button.is-current b { color: rgba(255,255,255,0.7); }
  .inline-form { flex-wrap: wrap; }
  .inline-form .btn { flex: 1 1 100%; }
}
@media (min-width: 1100px) {
  .msg-body, .msg-change { font-size: 14px; line-height: 20px; }
  .inline-form .btn { height: 40px; }
  .disc > summary { min-height: 48px; padding: 10px 0; }
}

/* Performance */
.meter { display: block; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover .kpi-name { color: var(--blue); }
.kpi.is-current .kpi-name { font-weight: 600; }
.kpi-sub.is-due { color: var(--red); }
.kpi-sub .vt, .kpi-sub .st { margin-top: 2px; }
.score + .sec { padding-top: 26px; }
.content > .note { margin-bottom: 14px; }
.content > .note + .note { margin-top: -6px; }
.quote { margin-top: 12px; padding-inline-start: 12px; border-inline-start: 2px solid var(--line-2); font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.quote-by { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.row.is-detail { min-height: 0; padding-block: 10px; }
.row.is-detail .row-title { font-size: 15px; font-weight: 400; unicode-bidi: plaintext; }
.month-pick select.input { min-width: 0; width: auto; }
.month-pick .input.year { min-width: 0; width: 88px; }
.toolbar2 > .st { margin-inline-end: auto; margin-inline-start: 6px; }
@media (max-width: 699.98px) {
  .toolbar2 > .st { margin-inline-end: 0; margin-inline-start: auto; }
  .toolbar2 .month-pick select.input { flex: 1 1 auto; }
  .toolbar2 .month-pick .input.year { flex: 0 0 96px; }
}
@media (min-width: 1100px) { .quote { font-size: 14px; line-height: 20px; } }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; line-height: 22px; resize: vertical; }
.kv.steps { grid-template-columns: 36px minmax(0, 1fr); }
.kv.steps dt { min-width: 0; padding-inline-end: 0; font-weight: 600; color: var(--ink); }
.kv.steps dd { font-weight: 400; }
.sec > .stack { margin: 14px 0 6px; height: 10px; }
.bar-state { display: inline-flex; align-items: center; gap: 12px; margin-inline-start: 6px; margin-inline-end: auto; }
.bar-state .n { font-size: 13px; color: var(--ink-2); }
.toolbar2 > .vt { margin-inline-start: 6px; margin-inline-end: auto; }
@media (max-width: 699.98px) { .bar-state, .toolbar2 > .vt { margin-inline-end: 0; margin-inline-start: auto; } }
@media (max-width: 699.98px) {
  .toolbar2 .month-pick { flex-wrap: wrap; }
  .toolbar2 .month-pick select[name="profile"] { flex: 1 1 100%; }
}

/* Payslips */
.score.is-estimate .score-n { color: var(--ink-2); }
.score-n bdi { white-space: nowrap; }
.score .focus-meta .vt { font-size: 13px; }
.row .amt { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.row .amt.is-est { font-weight: 500; color: var(--ink-2); }
.row.is-selected .row-title { font-weight: 600; }
.row.is-selected { box-shadow: inset 3px 0 0 var(--blue); padding-inline-start: 12px; background: var(--blue-wash); }
html[dir="rtl"] .row.is-selected { box-shadow: inset -3px 0 0 var(--blue); }
.content > .cols > .col > .note { margin: 14px 0 0; }
.col > .btns { margin-top: 22px; }
@media (max-width: 699.98px) { .score-n { font-size: 36px; line-height: 44px; } }
@media (max-width: 699.98px) { .col > .btns { flex-wrap: wrap; } .col > .btns > .btn { flex: 1 1 100%; } }

/* Profile, password, notifications */
.photo-edit { display: flex; align-items: flex-start; gap: 16px; padding-top: 14px; }
.photo-pic { flex: 0 0 56px; }
.photo-ctl { flex: 1 1 auto; min-width: 0; }
.tick { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; margin-top: 8px; font-size: 15px; line-height: 20px; cursor: pointer; }
.tick input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--ink); }
.doc-row { align-items: center; }
.doc-row .row-title a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.doc-row .row-title a:hover { color: var(--blue); text-decoration-color: currentColor; }
.doc-row form.row-trail { margin: 0; }
#profile-upload { margin-top: 6px; padding-top: 16px; }
.narrow { max-width: 480px; }
.narrow > .note { margin-top: 14px; }
.narrow > .form { padding-top: 18px; }
form.form > .sec:first-of-type { padding-top: 0; }
.form > .btns { margin-top: 24px; }
.sec-head .top-form { margin: -6px 0; }
.row.notif.is-unread .row-title { font-weight: 600; }
.row.notif:not(.is-unread) .row-title { font-weight: 400; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; }
.pager-n { font-size: 14px; color: var(--ink-2); }
.pager [aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
@media (max-width: 699.98px) { .form > .btns { flex-wrap: wrap; } .form > .btns > .btn { flex: 1 1 100%; } }
.days.month .day:not(.dow):not(.blank) { padding-top: 6px; min-height: 40px; }
.days.month { row-gap: 8px; }
@media (max-width: 359.98px) {
  .figs.four .fig { padding-inline: 6px; }
  .figs.four .fig b { font-size: 18px; }
}
/* four figures in a half-width tablet column sit two by two */
@media (min-width: 700px) and (max-width: 1099.98px) {
  .cols:not(.wide) .figs.four { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .cols:not(.wide) .figs.four .fig:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
}

/* ==========================================================================
   Field Engineer — tasks (stage 3)
   The task list, the task itself (stages, the next step, parts, steps), the
   report view and the report form. Same rules: ruled, not boxed; blue only for
   the one thing to do now; data stays square.
   ========================================================================== */
.wide-only { display: none; }
.kv .is-due, .tk .is-due { color: var(--red); }
.top-facts .st { font-size: inherit; line-height: inherit; }
.sec > .note { margin-top: 14px; }
.prose.pre { overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.sub-head .n { margin-inline-start: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }

#task-visit .kv dd { flex-wrap: wrap; }
#task-visit .kv dd a.tel { white-space: nowrap; }

/* stages: a held stage is red, never blue */
.stages i.held { background: var(--red); }
.stage-names .held { color: var(--red); }

/* the next step: forms that belong to the one permitted action */
#task-next .form { padding-top: 16px; }
#task-next .disc:first-of-type { margin-top: 14px; border-top: 1px solid var(--line); }
#task-next > form[id="task-act"]:not(.form) { display: none; }
.qty-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; column-gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qty-name { font-size: 16px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.qty-name small, .row.part .row-title small { display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--ink-2); }
.input.qty { text-align: center; padding: 0 8px; font-weight: 600; }
.disc-part { margin: 14px 0 0; padding: 12px 0 2px; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.disc-part legend { padding: 0; font-size: 15px; line-height: 22px; font-weight: 500; }
.disc-part legend small { margin-inline-start: 6px; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.disc-part .fields { margin-top: 10px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* parts: a name and a quantity on a line */
.row.part { min-height: 0; padding-block: 11px; align-items: center; }
.row.part .row-trail { gap: 10px; color: var(--ink); }
.qty-n { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row.part.is-prepared .row-title { color: var(--ink-2); }

/* the task's steps: what happened, what is happening, what remains */
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.step > .mk { margin-top: 7px; }
.step-title { font-size: 15px; line-height: 22px; font-weight: 500; }
.step-sub { font-size: 13px; line-height: 19px; color: var(--ink-2); overflow-wrap: anywhere; }
.step.is-todo .step-title { font-weight: 400; color: var(--ink-2); }
.step.is-now .step-sub { color: var(--blue); font-weight: 500; }
.step.is-wait .step-sub { color: var(--amber); }
.step.is-held .step-sub, .step.is-off .step-title { color: var(--red); }

/* report photographs: square-cornered, captioned, never cropped out of reach */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px 12px; padding-top: 14px; }
.shot { margin: 0; min-width: 0; position: relative; }
.shot > a, .shot > .shot-img { display: block; aspect-ratio: 4 / 3; background: var(--fill); overflow: hidden; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--ink-2); overflow-wrap: anywhere; }
.shot.is-flagged > a, .shot.is-flagged > .shot-img { outline: 2px solid var(--red); outline-offset: -2px; }
.shot-flag { margin-top: 6px; font-size: 13px; line-height: 18px; }
.shot-flag span:last-child:not(.st) { display: block; color: var(--ink-2); }
.shot-act { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.shot-act .btn-sm { height: 40px; white-space: normal; text-align: start; line-height: 18px; }
details.shot-act { display: block; font-size: 14px; }
details.shot-act > summary { list-style: none; cursor: pointer; display: inline-flex; min-height: 40px; align-items: center; }
details.shot-act > summary::-webkit-details-marker { display: none; }
details.shot-act form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
details.shot-act .input { flex: 1 1 120px; height: 40px; font-size: 14px; }
.shots-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.more > .ic:first-child { margin-inline-end: 5px; }
.reports .disc-body > .row.part:first-child { border-top: 1px solid var(--line); }

@media (min-width: 700px) {
  .wide-only { display: flex; }
  .cols.task { grid-template-areas: "a b" "d b" "d c"; grid-template-rows: auto auto 1fr; }
  .cols.task > .a { grid-area: a; } .cols.task > .b { grid-area: b; } .cols.task > .c { grid-area: c; } .cols.task > .d { grid-area: d; }
  .cols.task > .c > .sec:first-child, .cols.task > .d > .sec:first-child { padding-top: 28px; }
  .cols.reports { margin-top: 28px; }
  .shots { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
}
@media (min-width: 1100px) {
  .qty-name, .qty-n { font-size: 14px; line-height: 20px; }
  .qty-row { grid-template-columns: minmax(0, 1fr) 88px; padding: 8px 0; }
  .step { padding: 8px 0; }
  .step-title { font-size: 14px; line-height: 20px; }
  .step > .mk { margin-top: 6px; }
  .row.part { padding-block: 9px; }
  .shot-act .btn-sm { height: 34px; }
}

/* the task list: rows on a phone, a ruled table on a desktop; one markup, every row a link */
.tk-tabs { margin-bottom: 12px; }
.tk-search { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 6px; }
.tk-q { position: relative; flex: 1 1 100%; min-width: 0; }
.tk-q > .ic { position: absolute; top: 14px; inset-inline-start: 14px; width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.tk-q > .input { padding-inline-start: 44px; }
.tk-search select.input { flex: 1 1 0; width: auto; min-width: 0; }
.tk-search .btn { flex: 0 0 auto; }
.tk-found { padding: 8px 0 2px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.tk-found .link { margin-inline-start: 6px; }
.tklist { border-top: 1px solid var(--ink); margin-top: 10px; }
.tk { display: grid; grid-template-columns: auto minmax(0, 1fr) fit-content(40%); column-gap: 12px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); color: inherit; }
.tk > .mk { margin-top: 26px; }
.tk-head { display: none; }
.tk-body { display: block; min-width: 0; }
.tk-body > span { display: block; min-width: 0; overflow-wrap: anywhere; }
.tk-main .row-ref { display: flex; flex-wrap: wrap; gap: 0 10px; }
.tk-main .row-title { display: block; }
.tk-site, .tk-when, .tk-state { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.tk-site small { display: none; }
.tk-when small, .tk-state small { display: block; font-size: inherit; }
.tk-when small.is-due { color: var(--red); }
.tk-state { color: var(--ink); }
.tk-state small { color: var(--ink-2); }
.tk-next { display: flex; align-items: center; justify-content: flex-end; gap: 1px; align-self: center; font-size: 15px; line-height: 20px; font-weight: 500; color: var(--ink-2); text-align: end; }
.tk-next .ic { flex: 0 0 18px; width: 18px; height: 18px; color: var(--ink-4); }
.tk-next.act, .tk-next.act .ic { color: var(--blue); }
a.tk:hover .row-title { color: var(--blue); }

@media (min-width: 700px) {
  .tk-q { flex: 1 1 280px; }
  .tk-search select.input { flex: 0 0 190px; }
  .tk { grid-template-columns: auto minmax(0, 1.5fr) minmax(0, 1fr) fit-content(26%); column-gap: 16px; }
  .tk-body { display: contents; }
  .tk > .mk { grid-row: 1 / span 2; }
  .tk-main { grid-column: 2; grid-row: 1; }
  .tk-site { grid-column: 2; grid-row: 2; }
  .tk-when { grid-column: 3; grid-row: 1; padding-top: 18px; }
  .tk-state { grid-column: 3; grid-row: 2; }
  .tk-next { grid-column: 4; grid-row: 1 / span 2; }
}
@media (min-width: 1100px) {
  .tk-search .input, .tk-search .btn { height: 40px; font-size: 14px; }
  .tk-q > .ic { top: 11px; width: 18px; height: 18px; }
  .tk-q > .input { padding-inline-start: 40px; }
  .tklist { border-top: 0; margin-top: 14px; }
  .tk { grid-template-columns: 8px minmax(0, 1.55fr) minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 20px; padding: 11px 0; }
  .tk > .mk { grid-row: auto; margin-top: 24px; }
  .tk-main, .tk-site, .tk-when, .tk-state, .tk-next { grid-column: auto; grid-row: auto; }
  .tk-when { padding-top: 0; }
  .tk-site, .tk-when, .tk-state { padding-top: 18px; font-size: 14px; line-height: 20px; }
  .tk-site small { display: block; font-size: 13px; line-height: 18px; }
  .tk-when small, .tk-state small { font-size: 13px; line-height: 18px; }
  .tk-next { font-size: 14px; padding-top: 0; }
  .tk-head { display: grid; padding: 0 0 9px; border-bottom: 1px solid var(--ink); font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
  .tk-head > span:last-child { text-align: end; padding-inline-end: 19px; }
}

/* the report form: photos first, one outcome box, the declaration, then the two ways to leave */
.tk-report-form .sec:first-child { padding-top: 8px; }
.photo-add { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 16px; }
.photo-add .btn { padding-inline: 10px; white-space: normal; text-align: center; line-height: 20px; cursor: pointer; }
.photo-add + .field { margin-top: 16px; }
.tk-img-chosen { min-height: 20px; padding-top: 6px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.shot-x { position: absolute; top: 6px; inset-inline-end: 6px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--r-ctl); background: rgba(255,255,255,0.94); color: var(--ink); cursor: pointer; box-shadow: 0 0 0 1px var(--line-2); }
.shot-x .ic { width: 20px; height: 20px; }
.shot-x:hover { color: var(--red); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 16px; }
.picks .btn-sm { white-space: normal; text-align: start; height: auto; min-height: 40px; padding-block: 6px; line-height: 20px; }
.tk-report-body .tick { margin-top: 14px; }
.tk-cnc { padding-top: 10px; }
.choices { padding-top: 4px; }
.choice { cursor: pointer; }
.choices + .field-hint.is-error { margin-top: 10px; }
#returns-note-wrap { padding-top: 14px; }
.part-rows { padding-top: 12px; display: grid; gap: 8px; }
.tk-part-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 76px; gap: 8px; }
.tk-part-row .input { padding-inline: 10px; }
.part-head { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.submit-why { margin-top: 20px; }
.tk-form-actions { margin-top: 24px; }
.submit-why + .tk-form-actions { margin-top: 10px; }
.actionbar .btn[disabled] { box-shadow: none; }
@media (max-width: 359.98px) { .tk-part-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 60px; gap: 6px; } .tk-part-row .input { padding-inline: 8px; } }
@media (min-width: 700px) {
  .tk-report-form .cols.rep { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .tk-report-form .sec:first-child { padding-top: 0; }
  .photo-add .btn { height: 44px; }
}
@media (min-width: 1100px) {
  .photo-add { grid-template-columns: repeat(2, minmax(0, 200px)); }
  .photo-add .btn { height: 40px; font-size: 14px; }
  .shot-x { width: 32px; height: 32px; border-radius: 8px; }
  .tk-part-row .input { height: 40px; font-size: 14px; }
}

/* Today for a field engineer: attendance on one line that still opens the check-out, then the next visit */
.shift { margin-bottom: 18px; }
.shift > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.shift > summary::-webkit-details-marker { display: none; }
.shift > summary .btn { flex: 0 0 auto; }
.shift[open] > summary { border-bottom-color: transparent; }
.shift[open] > summary .btn { background: var(--ink); color: #fff; }
.shift-body { padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.shift-body > .focus-meta { margin-top: 0; }
.focus-time.is-date { font-size: 32px; line-height: 40px; flex-wrap: wrap; }
.focus-time small.is-due { color: var(--red); }
.focus-state { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.focus-state .st { margin-inline-end: 0; white-space: normal; }
@media (min-width: 700px) { .shift { margin-bottom: 22px; } }
@media (min-width: 1100px) { .focus-time.is-date { font-size: 28px; line-height: 36px; } }

/* a narrow tablet (700 to 899) keeps the task, its reports and the report form in one column: two would squeeze the facts */
@media (min-width: 700px) and (max-width: 899.98px) {
  .cols.task, .cols.reports, .tk-report-form .cols.rep { display: block; }
  .cols.task > .col + .col > .sec:first-child, .cols.reports > .col + .col > .sec:first-child, .tk-report-form .cols.rep > .col + .col > .sec:first-child { padding-top: 28px; }
  .cols.task > .c:empty { display: none; }
}

/* ---------- Resident Engineer: daily site reports (stage 4) ---------- */
/* a run of daily report bars: today keeps its blue number while the bar shows the report's real state */
.days.rep .day.today.ok i { background: var(--ink); box-shadow: none; }
.days.rep .day.today.wait i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--amber); }
.days.rep .day.today.act i { background: var(--blue); box-shadow: none; }
.days.rep .day.today.off i { background: transparent; box-shadow: none; }
.days.rep a.day { text-decoration: none; }
.legend.counts b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
/* Admin's reason on a returned report: said in full, in the row and in the focus */
.rep-reason { display: block; color: var(--ink); overflow-wrap: anywhere; }
.rep-reason b { display: block; font-weight: 600; }
.rep-reason bdi { display: block; }
#dash-site-report > .note { margin-top: 12px; }
#dash-site-report > .note + .btns { margin-top: 14px; }
/* the month of daily reports: one entry per date, newest first */
.rep-list .rep-day { scroll-margin-top: 84px; }
.rep-list .rep-day:target > .row { background: var(--blue-wash); }
.rep-list .row .row-sub + .row-sub { margin-top: 2px; }
@media (min-width: 1100px) {
  .cols.rep-month { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
}
/* a daily report in the task list: its day is its title, so a phone does not repeat it underneath */
@media (max-width: 699.98px) { .tk.is-daily .tk-when { display: none; } }
.tk.is-daily .tk-state small bdi { display: block; color: var(--ink); }
#tasks-daily-reports { white-space: nowrap; }

/* ---------- Warehouse: the keeper's orders (stage 5) ---------- */
/* the list: one folded line per order that says what is asked of the keeper, or who holds the order */
.wh-list > .group-label:first-child { padding-top: 12px; }
.wh-order { position: relative; }
.wh-order > summary { grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; position: relative; }
.wh-order > summary .disc-chev { margin-top: 2px; }
.wh-order .wh-when { font-size: 13px; line-height: 22px; color: var(--ink-3); white-space: nowrap; }
.wh-holder { margin-top: 2px; }
.wh-holder .st, .wh-say .st, .wh-clear .st { white-space: normal; align-items: flex-start; font-size: 14px; line-height: 20px; }
.wh-holder .st .mk, .wh-say .st .mk, .wh-clear .st .mk { margin-top: 6px; flex: none; }
.wh-order[open] > summary .wh-holder { color: inherit; }
.wh-pick, .wh-pane { display: none; }
.wh-clear { padding: 14px 0; border-bottom: 1px solid var(--line); }
.wh-done > summary { list-style: none; cursor: pointer; align-items: center; }
.wh-done > summary::-webkit-details-marker { display: none; }
.wh-done > summary .n { display: inline-flex; align-items: center; gap: 8px; }
.wh-done[open] > summary .disc-chev { transform: rotate(-90deg); }
/* an order: its parts, the notes that belong to its state, the keeper's actions */
.wh-detail > .top-facts { margin: 0 0 12px; }
.wh-say { padding: 2px 0 14px; }
.wh-say .st { font-size: 15px; line-height: 22px; }
.wh-say .st .mk { margin-top: 7px; }
.wh-parts { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, auto); font-size: 14px; line-height: 20px; }
.wh-pr { display: contents; }
.wh-pr > span { padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.wh-pr > span:not(:first-child) { padding-inline-start: 20px; }
.wh-pr.head > span { padding-block: 0 8px; align-self: stretch; display: flex; align-items: flex-end; justify-content: flex-end; font-size: 13px; line-height: 17px; font-weight: 500; color: var(--ink-2); border-bottom-color: var(--ink); max-width: 106px; }
.wh-pr.head > span:first-child { max-width: none; justify-content: flex-start; }
.wh-pr.head > span:not(:first-child), .wh-q { text-align: end; }
.wh-pn { font-weight: 500; overflow-wrap: anywhere; }
.wh-pn small { display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--ink-2); }
.wh-q { font-weight: 500; font-variant-numeric: tabular-nums; }
.wh-q .wh-none { color: var(--ink-3); font-weight: 400; }
.wh-note { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--ink); }
.wh-note h4, .wh-sub { font-size: 14px; line-height: 20px; font-weight: 600; }
.wh-note p { margin-top: 6px; font-size: 14px; line-height: 21px; overflow-wrap: anywhere; }
.wh-note p small { color: var(--ink-2); }
.wh-note .wh-note-by { color: var(--ink-2); font-size: 13px; line-height: 19px; }
.wh-note .kv { margin-top: 2px; }
.wh-note .kv dt, .wh-note .kv dd { font-size: 14px; line-height: 20px; padding-block: 9px; }
.wh-sub { margin-top: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.wh-detail > .note { margin-top: 16px; }
.wh-doc, .wh-open { margin-top: 16px; font-size: 14px; line-height: 20px; }
.wh-doc .link { display: inline-flex; align-items: center; gap: 8px; }
.wh-doc .ic { width: 18px; height: 18px; }
.wh-act { margin-top: 18px; }
.wh-act .btns { flex-wrap: wrap; }
.wh-revise { margin-top: 12px; border-top: 1px solid var(--line); }
/* a phone: the four quantities sit under each part, each with its name */
@media (max-width: 699.98px) {
  .wh-parts { display: block; border-top: 1px solid var(--ink); }
  .wh-pr.head { display: none; }
  .wh-pr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
  .wh-pr > span, .wh-pr > span:not(:first-child) { padding: 0; border: 0; }
  .wh-pn { grid-column: 1 / -1; font-size: 15px; line-height: 21px; padding-bottom: 4px !important; }
  .wh-q { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 3px 0 !important; text-align: start; }
  .wh-q::before { content: attr(data-l); font-size: 13px; line-height: 18px; font-weight: 400; color: var(--ink-2); }
  .wh-act .btns .btn { width: 100%; }
}
/* a desktop: the list on one side, the chosen order beside it */
@media (min-width: 1100px) {
  .wh-figs { padding-bottom: 14px; }
  .wh-split { display: grid; grid-template-columns: minmax(340px, 38%) minmax(0, 1fr); border-top: 1px solid var(--line); margin-inline: calc(var(--gutter) * -1); min-height: calc(100dvh - 250px); }
  .wh-list { padding-bottom: 24px; border-inline-end: 1px solid var(--line); min-width: 0; }
  .wh-list .group-label, .wh-order > summary, .wh-clear { padding-inline: var(--gutter) 20px; }
  .wh-order > .disc-body, .wh-order > summary .disc-chev { display: none; }
  .wh-order.is-selected > summary { background: var(--blue-wash); box-shadow: inset 3px 0 0 var(--blue); }
  html[dir="rtl"] .wh-order.is-selected > summary { box-shadow: inset -3px 0 0 var(--blue); }
  .wh-pick { display: block; position: absolute; inset: 0; }
  .wh-pane { display: block; position: sticky; top: 0; align-self: start; max-height: 100dvh; overflow-y: auto; padding-block: 24px 40px; padding-inline: 28px var(--gutter); min-width: 0; }
  .wh-pane h2.d-title { margin-top: 2px; font-size: 20px; line-height: 26px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
  .wh-pane > .top-facts { margin: 4px 0 14px; }
  .wh-pane .wh-act .btns .btn { min-width: 220px; }
}

/* ---------- Admin: overview, approvals and request decisions (stage 6) ---------- */
/* a count and a link together at the end of a section head */
.sec-trail { display: inline-flex; align-items: baseline; gap: 14px; }
/* the Approvals queue: one ruled group per kind of decision */
.aq > .aq-kind:first-child > .group-label { padding-top: 6px; }
.aq .row .row-sub:first-of-type { color: var(--ink); }
.aq + .sec-foot { padding-top: 16px; }
.maint-ok { padding: 0 0 14px; }
/* a person who has not checked in, with the same Mark present form */
.row.who { grid-template-columns: auto minmax(0, 1fr) auto; }
.row.who form.row-trail { margin: 0; }
/* a request on its decision page: who and what, the reason, the facts, then the decision forms */
.rq-page > .toolbar2 { padding-bottom: 6px; }
.rq-item { padding: 18px 0 20px; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.rq-item:target { box-shadow: inset 3px 0 0 var(--blue); padding-inline-start: 14px; }
html[dir="rtl"] .rq-item:target { box-shadow: inset -3px 0 0 var(--blue); }
.rq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rq-head .when { font-size: 13px; line-height: 22px; color: var(--ink-3); white-space: nowrap; }
.rq-what { margin-top: 2px; font-size: 15px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.rq-reason { margin-top: 6px; font-size: 15px; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; }
.rq-item > .kv { margin-top: 10px; max-width: 520px; }
.rq-item > .kv dt, .rq-item > .kv dd { padding-block: 8px; font-size: 14px; line-height: 20px; }
.rq-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rq-acts form { margin: 0; }
.rq-item > .thread-wrap { margin: 12px 0 0; padding-bottom: 0; }
.rq-item > .rq-days, .rq-decided > .rq-days { margin-top: 10px; border-top: 1px solid var(--line); }
.rq-decided > .rq-days { margin: 0 0 0 20px; border-top: 0; }
html[dir="rtl"] .rq-decided > .rq-days { margin: 0 20px 0 0; }
.rq-decided > .row { border-bottom: 0; }
.rq-decided { border-bottom: 1px solid var(--line); }
@media (max-width: 699.98px) {
  .rq-acts .btn { flex: 1 1 auto; }
  .rq-acts form { flex: 1 1 0; display: flex; }
}
/* the Admin task list: the engineer's list rows, with who is on the task and who holds it */
.adm-filters { padding-bottom: 2px; }
.adm-filters .tk-search { display: flex; gap: 8px; }
.adm-filters .tk-q { position: relative; flex: 1 1 auto; min-width: 0; }
.adm-more { margin-top: 6px; border-top: 1px solid var(--line); }
.adm-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.adm-filter-grid .field { margin: 0; }
.adm-tasks .tk-eng { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.adm-tasks .tk-type.is-due { color: var(--red); }
.adm-tasks .tk-next { max-width: 220px; white-space: normal; text-align: end; }
.adm-tasks .tk.is-mine .tk-state small { color: var(--ink); }
@media (min-width: 700px) { .adm-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .adm-tasks .tk { grid-template-columns: 8px minmax(0, 1.5fr) minmax(0, 1.05fr) minmax(0, 0.8fr) minmax(0, 1.15fr) minmax(0, 1.25fr); }
  .adm-tasks .tk-next { max-width: none; font-size: 13.5px; line-height: 19px; }
}
@media (max-width: 699.98px) {
  .adm-tasks .tk { grid-template-columns: auto minmax(0, 1fr); }
  .adm-tasks .tk-next { grid-column: 2; justify-content: flex-start; text-align: start; max-width: none; margin-top: 4px; font-size: 14px; }
}

/* ---------- Admin: the task form and the task page (stage 6) ---------- */
.adm-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); column-gap: 24px; padding-top: 0; }
.adm-chips .choice { padding: 10px 0; min-width: 0; }
.adm-chips .choice span { min-width: 0; overflow-wrap: anywhere; }
.adm-upload .input[type="file"] { height: auto; padding: 10px 12px; font-size: 14px; line-height: 20px; }
.adm-task > .cols.reports + .adm-wide { margin-top: 12px; }
.adm-pair { flex-wrap: wrap; }
.adm-pair > form { display: contents; }
#task-decision > .kv { margin-top: 6px; }
#task-decision > .note { margin-top: 16px; }
#task-decision > .form, #task-decision > .disc:first-of-type { margin-top: 14px; }
#task-decision > .disc:first-of-type { border-top: 1px solid var(--line); }
#task-decision .note small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; }
.ord-rows { border-top: 1px solid var(--line); }
.ord-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px 84px; gap: 8px 10px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ord-rows.is-js .ord-extra:not(.is-shown) { display: none; }
.ord-f { display: block; min-width: 0; }
.ord-f .input { width: 100%; }
.ord-l { display: block; margin-bottom: 4px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.ord-desc, .ord-tag { grid-column: 1 / -1; }
.ord-tag { font-size: 13px; line-height: 18px; color: var(--amber); }
.ord-form > .field-hint { display: block; margin-bottom: 10px; }
.ord-side { margin-top: 4px; }
.ord-side .btns.sm { margin-top: 12px; }
.adm-upload { margin-top: 14px; max-width: 520px; }
.row.hist .row-title { font-weight: 500; }
@media (min-width: 700px) {
  .ord-row + .ord-row .ord-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ord-row { padding: 8px 0; }
}
@media (max-width: 699.98px) {
  .ord-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .ord-name { grid-column: 1 / -1; }
  .adm-pair > form > .btn { flex: 1 1 100%; }
}
.adm-form .form > p.field-hint { margin: 6px 0 0; }
.adm-form .form > p.field-hint + .field, .adm-form .form > p.field-hint + .fields { margin-top: 16px; }
#task-holder { min-width: 0; }
#task-holder .st { white-space: normal; }
@media (max-width: 699.98px) {
  .adm-task .form > .btns > .btn, .adm-task .adm-pair > form > .btn { min-width: 0; height: auto; min-height: 48px; padding-block: 10px; line-height: 20px; white-space: normal; text-align: center; }
  .adm-bar .btn { flex: 1 1 0; min-width: 0; padding-inline: 10px; }
}

/* ---------- Admin: people, attendance records and setup (stage 6, part B) ---------- */
/* a person in a list: the round photo, the name, the code */
.adm-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-who > span:not(.avatar) { display: block; min-width: 0; }
.adm-who .t1, .adm-who .t2 { display: block; overflow-wrap: anywhere; }
.adm-who .st { margin-top: 2px; }
.adm-people td { vertical-align: middle; }
.adm-open { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-block: -10px; color: var(--ink-4); }
.adm-open .ic { width: 18px; height: 18px; }
.adm-open:hover { color: var(--blue); }
/* a short form on one line: its fields, then its button; the fields stack on a phone */
.adm-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 0 4px; }
.adm-inline .field { flex: 1 1 140px; min-width: 0; margin: 0; }
.adm-inline .field.adm-grow { flex: 3 1 220px; }
.adm-inline > .btn { flex: 0 0 auto; }
.adm-inline + .sec-foot { padding-top: 8px; }
/* a month of attendance as a flat meter, with its figures */
.adm-rate { display: flex; align-items: center; gap: 12px; }
.adm-rate .meter { flex: 1 1 auto; min-width: 48px; max-width: 220px; }
.adm-rate b { flex: 0 0 44px; font-weight: 500; text-align: end; }
.adm-months .is-late { color: var(--amber); }
/* a note or a document: who and when, the action at the end, then the text */
.adm-entry { padding: 12px 0; border-bottom: 1px solid var(--line); }
.adm-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.adm-entry-head > span { min-width: 0; overflow-wrap: anywhere; }
.adm-entry-head .link { font-size: 15px; line-height: 22px; }
.adm-entry-head form { margin: 0; flex: 0 0 auto; }
.adm-entry-body { margin-top: 4px; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.adm-entry-meta { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.adm-del { height: 32px; padding: 0 10px; color: var(--red); }
.adm-none { color: var(--ink-2); }
.adm-person .form + .adm-none, .adm-person .form + .adm-entry { margin-top: 16px; border-top: 1px solid var(--line); }
.adm-person .form + .adm-none { padding-top: 12px; }
.adm-profile { max-width: 760px; }
.adm-profile .sub-head { margin-bottom: 14px; }
.adm-profile .choice { border-bottom: 0; padding-bottom: 4px; }
.adm-profile .choice + .field { margin-top: 12px; }
.adm-inline + .table-wrap { margin-top: 14px; }
@media (max-width: 699.98px) {
  .adm-inline > .btn { flex: 1 1 100%; }
  .adm-person .figs.four { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .adm-person .figs.four .fig:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
}
/* attendance records: the month bar with the employee, and one ruled disclosure per record */
.adm-pick .month-pick { flex-wrap: wrap; justify-content: flex-end; }
.adm-pick .month-pick .adm-emp { min-width: 0; width: auto; max-width: 240px; }
.adm-rec > summary { grid-template-columns: 112px minmax(0, 1.2fr) 150px minmax(0, 1fr) minmax(0, 0.9fr) auto; min-height: 48px; padding-block: 10px; font-size: 14px; line-height: 20px; }
.adm-recs.is-one .adm-rec > summary { grid-template-columns: 112px 150px minmax(0, 1fr) minmax(0, 1fr) auto; }
.adm-rec-date { font-weight: 500; white-space: nowrap; }
.adm-rec-who { min-width: 0; overflow-wrap: anywhere; }
.adm-rec-times { white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-rec-times i { font-style: normal; color: var(--ink-3); margin-inline: 6px; }
.adm-rec-times em { font-style: normal; font-size: 12.5px; color: var(--amber); margin-inline-start: 6px; }
.adm-rec-st { min-width: 0; }
.adm-rec-st .st { white-space: normal; }
.adm-rec-ded { font-size: 13px; color: var(--ink-2); text-align: end; }
.adm-rec-ded.is-due { color: var(--red); }
.adm-rec > summary:hover .adm-rec-date { color: var(--blue); }
.adm-rec > .disc-body { max-width: 760px; }
.adm-rec-note { padding: 2px 0 8px; font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.adm-rec-kv dd { align-items: flex-start; font-weight: 400; }
.adm-place { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.adm-place > div { min-width: 0; font-size: 14px; line-height: 20px; }
.adm-place .t1 { font-weight: 500; }
.adm-place .t2 { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.adm-thumb { flex: 0 0 44px; display: block; width: 44px; height: 44px; background: var(--fill); }
.adm-thumb img { display: block; width: 44px; height: 44px; object-fit: cover; }
.adm-override .sub-head { margin: 14px 0 12px; }
.adm-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.adm-quick .btn { height: 32px; padding: 0 10px; font-size: 13px; }
.adm-quick .btn.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }
.adm-rec .adm-pair { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.adm-attendance .disc .adm-inline { padding-top: 2px; }
/* attendance review: one exception, its facts and its final decision; the job; the monitor */
.adm-decide { margin-top: 14px; }
.adm-run { margin-top: 16px; }
.adm-steps { display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--red); overflow-wrap: anywhere; }
.adm-review .sec > .disc:first-of-type { margin-top: 12px; border-top: 1px solid var(--line); }
.adm-review .kv dd > span { min-width: 0; }
@media (max-width: 699.98px) {
  .adm-pick .month-pick { justify-content: flex-start; width: 100%; }
  .adm-pick .month-pick .adm-emp { flex: 1 1 100%; max-width: none; }
  .adm-rec > summary, .adm-recs.is-one .adm-rec > summary { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 2px; }
  .adm-rec-date { grid-column: 1; }
  .adm-rec-times { grid-column: 2; text-align: end; }
  .adm-rec > summary .disc-chev { grid-column: 3; grid-row: 1 / span 2; }
  .adm-rec-who { grid-column: 1 / span 2; grid-row: 2; }
  .adm-rec-st { grid-column: 1; }
  .adm-rec-ded { grid-column: 2; }
  .adm-decide .btns .btn { flex: 1 1 auto; }
}
.adm-bad { color: var(--red); font-weight: 500; }
/* the live map: the map and, beside it, the people who are sharing */
.adm-map > .note { margin-bottom: 18px; }
.adm-map-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 32px; align-items: start; }
.adm-map-canvas { height: 52vh; min-height: 320px; background: var(--fill); border: 1px solid var(--line); z-index: 0; }
.adm-map-side .sec { padding-top: 16px; }
.adm-map-side .toolbar2 { padding: 12px 0 4px; }
.adm-map-status { min-height: 18px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.adm-map-status.is-bad { color: var(--red); }
.adm-map-list { list-style: none; margin: 6px 0 0; padding: 0; }
.adm-eng { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.adm-eng-meta { flex: 1 1 auto; min-width: 0; display: block; }
.adm-eng-name { display: block; font-size: 15px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.adm-eng .st { white-space: normal; }
.adm-map-key { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 14px; }
.adm-map .emk { width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; border: 3px solid var(--ink-4); background: var(--paper); box-shadow: 0 1px 4px rgba(10,19,38,0.25); }
.adm-map .emk img { width: 100%; height: 100%; object-fit: cover; }
.adm-map .emk span { font-size: 13px; font-weight: 600; color: var(--ink); }
.adm-map .emk-live { border-color: var(--green); }
.adm-map .emk-stale { border-color: var(--amber); }
.adm-map .emk-offline { opacity: 0.85; }
.adm-map .emk-locating { border-color: var(--blue); border-style: dashed; }
.adm-map .emk-pop { font-family: inherit; font-size: 13px; line-height: 19px; color: var(--ink); }
.adm-map .emk-pop .pp-live { color: var(--green); font-weight: 600; }
.adm-map .emk-pop .pp-stale { color: var(--amber); font-weight: 600; }
.adm-map .emk-pop .pp-offline { color: var(--ink-2); font-weight: 600; }
.adm-map .emk-pop .pp-locating { color: var(--blue); font-weight: 600; }
@media (min-width: 1100px) {
  .adm-map-wrap { grid-template-columns: minmax(0, 1fr) 320px; }
  .adm-map-canvas { height: 68vh; min-height: 420px; }
  .adm-map-side .sec { padding-top: 0; }
  .adm-map-list { max-height: 52vh; overflow-y: auto; }
}
/* setup: the switch between the four pages, lists with their action at the end, short forms */
.adm-setup > .toolbar2 { padding-bottom: 10px; }
.adm-setup > .lead, .adm-log > .lead, .adm-review > .lead, .adm-repair > .lead, #admin-add-person > .lead { max-width: 760px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
#admin-add-person > .lead { padding-bottom: 14px; }
.adm-acts { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.adm-acts form { margin: 0; }
.adm-sites td, .adm-holidays td, .adm-images td { vertical-align: middle; }
.adm-setup .choice { border-bottom: 0; }
.adm-setup .form > p.field-hint { margin: 6px 0 0; }
.adm-setup .form .sub-head { margin-bottom: 14px; }
.adm-week { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.adm-calendar .disc .form { max-width: none; }
.adm-calendar .sec > .note { margin-top: 14px; }
.adm-purge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; }
.adm-purge label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; white-space: nowrap; }
.adm-log-detail { max-width: 420px; font-size: 13px; overflow-wrap: anywhere; word-break: break-word; }
.adm-logt td { font-size: 13.5px; }
.adm-log > .adm-inline { max-width: 520px; padding-top: 12px; }
.adm-setup > .lead + .cols, .adm-setup > .note + .cols { margin-top: 18px; }
.adm-setup > .lead + .note, .adm-setup > .note + .note { margin-top: 14px; }
@media (max-width: 699.98px) {
  .adm-acts { flex-direction: column; align-items: stretch; }
  .adm-acts .btn { width: 100%; }
}
/* phones: every control at least 40 high; the history's paired lists stack below the desktop width */
@media (max-width: 699.98px) {
  .adm-del, .adm-quick .btn { height: 40px; }
  .adm-sites td .btn-sm, .adm-holidays td .btn-sm, .adm-images td .btn-sm { height: 40px; margin-block: 0; }
  .adm-profile .choice, .adm-setup .choice { min-height: 40px; align-items: center; }
}
@media (max-width: 1099.98px) {
  .adm-history .cols { display: block; }
  .adm-history .cols > .col + .col > .sec:first-child { padding-top: 28px; }
}
@media (min-width: 1100px) and (max-width: 1399.98px) {
  .adm-person .figs.four { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .adm-person .figs.four .fig:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
}
.adm-months th, .adm-months th.num { white-space: normal; vertical-align: bottom; }
.adm-months td:first-child { white-space: normal; }
@media (max-width: 699.98px) {
  .adm-rate .meter { min-width: 28px; }
  .adm-rate { gap: 8px; }
  .adm-months th, .adm-months td { padding-inline: 4px; }
  .adm-rate b { flex-basis: 36px; }
  .adm-rate .meter { min-width: 24px; }
}

/* ---------- Admin: KPI screens (stage 7, part A) ---------- */
/* the month's status line, the step actions and the notes under them */
.adm-kpi-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 14px 0 12px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.adm-kpi-status .st { font-size: 15px; line-height: 22px; white-space: normal; }
.adm-kpi-status .st b { font-weight: 600; }
.adm-kpi .sec > .note, .adm-kpi-person > .note { margin-top: 12px; }
.adm-kpi .note ul { margin: 6px 0 0; padding-inline-start: 18px; }
.adm-kpi .note li { padding-block: 1px; }
.adm-kpi .note p { margin-top: 6px; }
.adm-kpi .note .link { margin-inline-start: 0; padding-inline-start: 0; white-space: normal; }
.adm-kpi .sec > .progress { padding-top: 2px; }
.adm-kpi .sec > .disc { margin-top: 12px; border-top: 1px solid var(--line); }
.adm-kpi .disc .adm-entry:last-child { border-bottom: 0; }
.adm-kpi-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding-top: 16px; }
.adm-kpi-actions form { margin: 0; }
.adm-kpi-actions .adm-inline { flex: 1 1 360px; max-width: 560px; padding: 0; }
.adm-kpi-actions .sec-foot { flex: 1 1 280px; align-self: center; padding: 0; }
.adm-kpi-requests { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-inline-start: auto; font-size: 15px; line-height: 22px; }
.adm-kpi-requests .n { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.adm-kpi-requests #review-count-unavailable { font-size: 13px; color: var(--amber); }
/* payroll of the month: five counts on one ruled line */
.adm-kpi-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 14px 0 2px; }
.adm-kpi-counts > span { min-width: 0; padding-inline: 14px; border-inline-start: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-2); }
.adm-kpi-counts > span:first-child { padding-inline-start: 0; border-inline-start: 0; }
.adm-kpi-counts b { display: block; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.adm-kpi-counts .is-due b { color: var(--red); }
/* one component: its facts, its state in words, and the audited exclusion folded under it */
.adm-kpi-comp .kpi-sub { margin-top: 2px; }
.adm-kpi-why { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.adm-kpi-state { display: inline-flex; }
.adm-kpi-legacy { font-weight: 500; color: var(--ink); }
.adm-kpi-na { grid-column: 1 / -1; margin-top: 8px; border-bottom: 0; }
.adm-kpi-na > summary { min-height: 40px; padding: 8px 0; }
.adm-kpi-na .row-title { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.adm-kpi-na .adm-inline { padding: 0 0 6px; }
.adm-kpi-gaps { margin-top: 12px; }
.adm-kpi-gaps > .form { max-width: none; padding-top: 4px; }
.adm-kpi-gaplist { list-style: none; margin: 0; padding: 0; }
.adm-kpi-gaplist .choice { font-size: 15px; line-height: 22px; }
.adm-kpi-gaplist .adm-entry-meta { display: block; }
.adm-kpi-person > .sec:first-child { padding-top: 20px; }
.adm-kpi-total .meter { display: block; margin-top: 14px; }
.adm-kpi-links { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 16px; }
.adm-kpi-manage .col > .sec + .sec { padding-top: 28px; }
/* the rating: four dimensions in two columns */
.adm-kpi-dims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.adm-kpi-dims .field { display: flex; flex-direction: column; }
.adm-kpi-dims .field .input { margin-top: auto; }
.adm-kpi-dims .field + .field { margin-top: 0; }
.adm-kpi-dims + .field, .adm-kpi .field + .adm-kpi-dims, .adm-kpi .form .sec-foot + .field { margin-top: 16px; }
/* recognition points: an award and, for an active one, its audited reversal */
.adm-kpi-award .adm-inline { padding: 8px 0 0; }
.adm-kpi-award.is-reversed .adm-entry-head b { color: var(--ink-2); text-decoration: line-through; }
.adm-kpi-award.is-reversed .adm-entry-body { color: var(--ink-2); }
/* a row's closing figures: the points, and the bonus with how final it is */
.adm-kpi-trail { display: grid; justify-items: end; gap: 1px; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--ink-2); }
.adm-kpi-trail b { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--ink); }
.adm-kpi-trail > span { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px 8px; }
.adm-kpi-board .row-trail b { font-size: 16px; font-weight: 600; color: var(--ink); margin-inline-end: 5px; }
/* averages by component: a name, a flat bar, the figure */
.adm-kpi-avgs { padding-top: 4px; }
.adm-kpi-avg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(72px, 1.4fr) 52px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; }
.adm-kpi-avg .meter { grid-column: auto; margin-top: 0; }
.adm-kpi-avg b { font-weight: 500; text-align: end; font-variant-numeric: tabular-nums; }
/* six months as paired bars: the average in navy, the top beside it; a live month is hatched */
.adm-kpi-trend { display: block; width: 100%; max-width: 640px; height: auto; margin-top: 10px; overflow: visible; }
.adm-kpi-bar.avg:not(.is-est) { fill: var(--ink); }
.adm-kpi-bar.peak:not(.is-est) { fill: var(--ink-3); }
.adm-kpi-bar.avg.is-est { stroke: var(--ink); stroke-width: 1; }
.adm-kpi-bar.peak.is-est { stroke: var(--ink-3); stroke-width: 1; }
.adm-kpi-hatch.avg { stroke: var(--ink); }
.adm-kpi-hatch.peak { stroke: var(--ink-3); }
.adm-kpi-axis { stroke: var(--ink); stroke-width: 1; }
.adm-kpi-guide { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 4; }
.adm-kpi-val { font-size: 11px; font-weight: 500; fill: var(--ink); font-variant-numeric: tabular-nums; }
.adm-kpi-month { font-size: 12px; fill: var(--ink-2); }
.adm-kpi-nil { font-size: 11px; fill: var(--ink-3); }
.adm-kpi-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 8px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.adm-kpi-legend span { display: inline-flex; align-items: center; gap: 7px; }
.adm-kpi-legend i { flex: 0 0 10px; width: 10px; height: 10px; background: var(--ink); }
.adm-kpi-legend i.peak { background: var(--ink-3); }
.adm-kpi-legend i.est { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--ink); }
.adm-kpi-warn { padding-top: 10px; font-size: 13px; line-height: 19px; color: var(--red); }
/* a review request: who, what and which month; the message; the decision */
.adm-kpi-req { padding: 16px 0; }
.adm-kpi-req .adm-entry-head { flex-wrap: wrap; gap: 2px 12px; }
.adm-kpi-req .adm-entry-head b { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); }
.adm-kpi-req .adm-entry-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 4px; }
.adm-kpi-decide { max-width: 900px; align-items: flex-start; }
.adm-kpi-decide .field:not(.adm-grow) { flex: 0 1 210px; }
.adm-kpi-decide .adm-acts { margin-top: 26px; }
.adm-kpi-decision { margin-top: 10px; padding-inline-start: 12px; border-inline-start: 2px solid var(--line-2); font-size: 14px; line-height: 20px; }
.adm-kpi-corr { font-weight: 500; color: var(--green); white-space: nowrap; }
/* the ranking: a dense table on a desktop, one ruled entry per person below it */
.adm-kpi-table td { vertical-align: middle; }
.adm-kpi-rk { width: 36px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.adm-kpi-pts { min-width: 150px; }
.adm-kpi-pts .adm-rate b { font-weight: 600; }
.adm-kpi-pay .vt { white-space: normal; }
.adm-kpi-go { text-align: end; }
@media (max-width: 1279.98px) {
  .adm-kpi-table, .adm-kpi-table tbody { display: block; }
  .adm-kpi-table thead { display: none; }
  .adm-kpi-table tr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .adm-kpi-table td { display: block; padding: 0; border: 0; }
  .adm-kpi-table td.adm-kpi-rk { grid-column: 1; grid-row: 1; width: auto; text-align: start; }
  .adm-kpi-table td.adm-kpi-emp { grid-column: 2; grid-row: 1; font-size: 15px; line-height: 22px; }
  .adm-kpi-table td.adm-kpi-go { grid-column: 3; grid-row: 1; }
  .adm-kpi-table td[data-label] { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px 10px; min-height: 24px; text-align: end; }
  .adm-kpi-table td[data-label]::before { content: attr(data-label); margin-inline-end: auto; font-size: 13px; color: var(--ink-2); }
  .adm-kpi-table td[data-label] > .vt { display: inline-flex; margin-top: 0; }
  .adm-kpi-table td .btn-sm { margin-block: 0; }
  .adm-kpi-pts .adm-rate { flex: 0 1 62%; min-width: 0; justify-content: flex-end; }
  .adm-kpi-pts { min-width: 0; }
}
@media (max-width: 699.98px) {
  .adm-kpi .figs.four { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .adm-kpi .figs.four .fig:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
  .adm-kpi-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .adm-kpi-counts > span:nth-child(4) { padding-inline-start: 0; border-inline-start: 0; }
  .adm-kpi-requests { margin-inline-start: 0; flex: 1 1 100%; }
  .adm-kpi-actions > form:not(.adm-inline), .adm-kpi-actions > form:not(.adm-inline) .btn { width: 100%; }
  .adm-kpi-val { font-size: 18px; }
  .adm-kpi-month, .adm-kpi-nil { font-size: 19px; }
  .adm-kpi-avg { grid-template-columns: minmax(0, 1.2fr) minmax(56px, 1fr) 44px; }
  .adm-kpi-table td .btn-sm, .adm-kpi-na .btn-sm, .adm-kpi-award .btn-sm, .adm-kpi-decide .btn-sm { height: 40px; }
  .adm-kpi-decide .field:not(.adm-grow) { flex: 1 1 100%; }
  .adm-kpi-decide .adm-acts { flex: 1 1 100%; margin-top: 0; }
}
@media (max-width: 479.98px) {
  .adm-kpi-dims { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .adm-kpi-manage > .sec + .cols, .adm-kpi-manage > .cols + .cols, .adm-kpi-person > .sec + .cols, .adm-kpi-person > .note + .cols { margin-top: 28px; }
  .adm-kpi-manage > .cols + .sec { padding-top: 28px; }
}

/* ---------- Admin: payroll screens (stage 7, part B) ---------- */
.adm-pay .t2 { font-size: 13px; line-height: 18px; font-weight: 400; color: var(--ink-2); }
.adm-pay-links { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; }
.adm-pay .sec > .note { margin-top: 12px; }
.adm-pay .sec > .sec-head + .note { margin-top: 14px; }
/* the month's payslips by state: counts on one ruled line */
.adm-pay-counts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 14px 0 2px; }
.adm-pay-counts > span { min-width: 0; padding-inline: 14px; border-inline-start: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-2); overflow-wrap: anywhere; }
.adm-pay-counts > span:first-child { padding-inline-start: 0; border-inline-start: 0; }
.adm-pay-counts b { display: block; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.adm-pay-counts .is-due b { color: var(--red); }
/* a payroll state, a batch status and the flags of a revision: a mark and plain words */
.adm-pay-state, .adm-pay-bs, .adm-pay-flag { display: inline-flex; }
.adm-pay-state .vt, .adm-pay-state .st, .adm-pay-bs .st, .adm-pay-flag .st { white-space: normal; }
.adm-pay-marker { display: inline-block; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.adm-pay-marker::before { content: "("; } .adm-pay-marker::after { content: ")"; }
.adm-pay-warn { display: block; font-size: 13px; line-height: 19px; color: var(--red); }
.adm-pay-warn b { font-weight: 600; }
/* the report: one line per employee on a wide desktop; amounts in tabular figures, the unit in the head */
.adm-pay-table { table-layout: fixed; font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.adm-pay-c1 { width: 15.5%; } .adm-pay-c2 { width: 7.5%; } .adm-pay-c3 { width: 4%; } .adm-pay-c4 { width: 5.5%; } .adm-pay-c5 { width: 4.5%; }
.adm-pay-c6 { width: 8%; } .adm-pay-c7 { width: 7.5%; } .adm-pay-c8 { width: 7.5%; } .adm-pay-c9 { width: 6.5%; } .adm-pay-c10 { width: 7.5%; }
.adm-pay-c11 { width: 9%; } .adm-pay-c12 { width: 9%; } .adm-pay-c13 { width: 8%; }
.adm-pay-table th { padding-inline: 6px; font-size: 12px; line-height: 16px; white-space: normal; vertical-align: bottom; overflow-wrap: anywhere; }
.adm-pay-table th.num { white-space: normal; }
.adm-pay-table th small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.adm-pay-table td { padding: 10px 6px; }
.adm-pay-table th.adm-pay-group { padding-bottom: 4px; text-align: center; border-bottom: 1px solid var(--line); }
.adm-pay-table thead tr + tr th:first-child { padding-inline-start: 6px; }
.adm-pay-table thead tr + tr th:last-child { padding-inline-end: 6px; }
.adm-pay-emp { min-width: 0; }
.adm-pay-emp .t1 { display: block; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.adm-pay-emp a.t1:hover { color: var(--blue); }
.adm-pay-st { display: block; margin-top: 2px; }
.adm-pay-emp .t2 { display: block; margin-top: 2px; }
.adm-pay-kpi small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.adm-pay-kpi .t2 { display: block; white-space: normal; }
.adm-pay-net b { font-size: 14px; line-height: 20px; font-weight: 600; }
.adm-pay-table tr[data-source="estimate"] .adm-pay-net b, .adm-pay-table tr[data-total="estimate"] .adm-pay-net b { font-weight: 500; }
.adm-pay-table td.adm-pay-net > .vt { justify-content: flex-end; }
.adm-pay-neg { display: flex; justify-content: flex-end; margin-top: 2px; }
.adm-pay-batch .t2 { display: block; }
.adm-pay-recon { display: block; }
.adm-pay-go { text-align: end; }
.adm-pay-table td.adm-pay-go .btn-sm { display: flex; height: auto; min-height: 30px; margin-block: 0; padding: 5px 4px; font-size: 12px; line-height: 16px; white-space: normal; }
.adm-pay-table td.adm-pay-go .btn-sm + .btn-sm { margin-top: 4px; }
.adm-pay-table td.adm-pay-unavailable { color: var(--red); }
.adm-pay-table td.adm-pay-none { color: var(--ink-2); font-weight: 400; }
.adm-pay-table tfoot tr:first-child td { border-top: 1px solid var(--ink); }
.adm-pay-table tr.is-total td { border-bottom-color: var(--line); }
.adm-pay-table tr.is-total:last-child td { border-bottom-color: var(--ink); }
/* the month's batches under the report */
.adm-pay .payroll-report-batch { padding: 14px 0; border-bottom: 1px solid var(--line); }
.adm-pay-bhead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 15px; line-height: 22px; }
.adm-pay-bline { margin-top: 4px; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.adm-pay .payroll-report-batch > .adm-pay-warn { margin-top: 6px; }
/* batches: what the screen is for, the actions, the progress */
.adm-pay-intro { max-width: 860px; padding-bottom: 6px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.adm-pay-intro b { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--ink); }
.adm-pay-intro > span { display: block; }
.adm-pay-act { margin: 14px 0 0; }
.adm-pay-acts { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; }
.adm-pay-acts form { margin: 0; }
.adm-pay-close { max-width: 720px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.adm-pay-progress { padding: 16px 0 4px; }
.adm-pay-progress p { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.adm-pay-progress b { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.adm-pay-progress .meter { display: block; margin-top: 8px; }
.adm-pay-strong { font-weight: 600; }
.adm-pay-due { color: var(--red); }
.adm-pay-code, .adm-pay-json { font-size: 12px; line-height: 17px; color: var(--ink-2); overflow-wrap: anywhere; }
.adm-pay-json bdi { unicode-bidi: plaintext; }
.adm-pay .table code { font-family: inherit; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.adm-pay-batches .toolbar2 { padding-top: 12px; }
/* dense record tables: 13px, tabular figures, tighter cells */
.adm-pay-rt { font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.adm-pay-rt th { padding-inline: 8px; white-space: normal; vertical-align: bottom; }
.adm-pay-rt td { padding: 10px 8px; overflow-wrap: break-word; }
.adm-pay-rt td.adm-pay-when { white-space: nowrap; }
.adm-pay-rt .t2 { display: block; }
.adm-pay-rt .adm-pay-rev-no .t2 { display: inline; }
.adm-pay-rt .link { font-weight: 500; }
.adm-pay-rt td a.link { color: var(--blue); }
.adm-pay-totals .adm-pay-strong { font-size: 15px; line-height: 20px; }
.adm-pay-audit { table-layout: fixed; }
.adm-pay-audit th:nth-child(1) { width: 6%; } .adm-pay-audit th:nth-child(2) { width: 17%; } .adm-pay-audit th:nth-child(3) { width: 19%; }
.adm-pay-audit th:nth-child(4) { width: 9%; } .adm-pay-audit th:nth-child(5) { width: 14%; }
.adm-pay-audit td.adm-pay-when { white-space: normal; }
/* history: one ruled section per revision; its facts three pairs to a line on a desktop */
.adm-pay-flags { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 16px; }
.adm-pay-rev > .table-wrap { margin-top: 14px; }
.adm-pay-reason { margin-top: 12px; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.adm-pay-reason .t2 { display: block; }
.adm-pay-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-top: 10px; font-size: 14px; line-height: 20px; }
.adm-pay-line .st { white-space: normal; }
.adm-pay-line.is-due > span:last-child { color: var(--red); }
.adm-pay-drift > .table-wrap { margin-top: 10px; }
.adm-pay-sources { max-width: 760px; }
.adm-pay-sources td { padding-block: 8px; }
.adm-pay .sec > .sec-foot + .table-wrap { margin-top: 12px; }
.adm-pay-lines { margin: 10px 0 0; padding-inline-start: 18px; font-size: 14px; line-height: 20px; }
.adm-pay-lines li { padding-block: 2px; overflow-wrap: anywhere; }
.adm-pay-fold { margin-top: 12px; }
.adm-pay-fold > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; line-height: 20px; font-weight: 500; cursor: pointer; list-style: none; }
.adm-pay-fold > summary::-webkit-details-marker { display: none; }
.adm-pay-fold > summary::before { content: ""; width: 7px; height: 7px; margin-top: -4px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(45deg); }
.adm-pay-fold[open] > summary::before { margin-top: 4px; transform: rotate(-135deg); }
.adm-pay-fold > summary:hover { color: var(--blue); }
.adm-pay-change { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.adm-pay-change > summary { font-size: 15px; line-height: 22px; }
.adm-pay-compare { margin-top: 10px; }
.adm-pay-cmp tr.adm-pay-group th { padding: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.adm-pay-cmp td { padding-block: 8px; }
.adm-pay-cmp td.adm-pay-lead { font-weight: 500; }
.adm-pay-voided s { color: var(--ink-2); }
@media (min-width: 900px) {
  .adm-pay-pairs, .adm-pay-facts { grid-template-columns: repeat(2, fit-content(30%) minmax(0, 1fr)); column-gap: 0; }
  .adm-pay-pairs dd, .adm-pay-facts dd { padding-inline-end: 28px; }
}
@media (min-width: 1280px) {
  .adm-pay-facts { grid-template-columns: repeat(3, fit-content(22%) minmax(0, 1fr)); }
}
@media (max-width: 1439.98px) {
  /* below a wide desktop each employee is a ruled block: name and state, the net beside them, every figure named */
  .adm-pay-table, .adm-pay-table tbody, .adm-pay-table tfoot { display: block; }
  .adm-pay-table thead, .adm-pay-table colgroup { display: none; }
  .adm-pay-table tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .adm-pay-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .adm-pay-table td.num { text-align: start; white-space: normal; }
  .adm-pay-m::after, .adm-pay-net b::after { content: " " attr(data-unit); font-size: 12px; font-weight: 400; color: var(--ink-2); }
  .adm-pay-table td.adm-pay-emp { grid-column: 1 / span 4; }
  .adm-pay-table td.adm-pay-net { grid-column: 5 / span 2; grid-row: 1; text-align: end; }
  .adm-pay-table td.adm-pay-net b { font-size: 16px; line-height: 22px; }
  .adm-pay-table td.adm-pay-unavailable, .adm-pay-table td.adm-pay-none { grid-column: 1 / -1; }
  .adm-pay-table td.adm-pay-batch { grid-column: span 2; }
  .adm-pay-table td.adm-pay-blank { display: none; }
  .adm-pay-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-2); }
  .adm-pay-table td.adm-pay-net > .vt, .adm-pay-neg { justify-content: flex-end; }
  .adm-pay-table td.adm-pay-go { grid-column-end: -1; align-self: end; }
  .adm-pay-table td.adm-pay-go .btn-sm { display: inline-flex; padding: 5px 10px; font-size: 13px; }
  .adm-pay-table td.adm-pay-go .btn-sm + .btn-sm { margin-top: 0; margin-inline-start: 4px; }
  .adm-pay-table tfoot tr:first-child { border-top: 1px solid var(--ink); }
  .adm-pay-table tfoot tr:first-child td, .adm-pay-table tr.is-total td { border: 0; }
  .adm-pay-table tr.is-total:last-child { border-bottom-color: var(--ink); }
}
@media (max-width: 899.98px) {
  .adm-pay-table tr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .adm-pay-table td.adm-pay-emp { grid-column: 1 / span 2; }
  .adm-pay-table td.adm-pay-net { grid-column: 3 / span 2; }
  .adm-pay-table td.adm-pay-go { grid-column: span 2 / -1; }
}
@media (max-width: 699.98px) {
  .adm-pay-counts { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .adm-pay-counts > span:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
  .adm-pay-links .btn { flex: 1 1 auto; }
  /* on a phone: the name, the state and the net first; then one named figure per line; then the payslip and the history */
  .adm-pay-table tr { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .adm-pay-table td.adm-pay-emp { grid-column: 1; }
  .adm-pay-table td.adm-pay-net { grid-column: 2; }
  .adm-pay-table td.adm-pay-net[data-label]::before { display: none; }
  .adm-pay-table td[data-label]:not(.adm-pay-net) { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 2px 10px; text-align: end; }
  .adm-pay-table td[data-label]:not(.adm-pay-net)::before { margin-inline-end: auto; font-size: 13px; line-height: 18px; text-align: start; }
  .adm-pay-kpi small, .adm-pay-batch .t2, .adm-pay-recon { display: inline; }
  .adm-pay-table td.adm-pay-go { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 4px; }
  .adm-pay-table td.adm-pay-go .btn-sm { flex: 1 1 0; min-height: 40px; font-size: 14px; }
  .adm-pay-table td.adm-pay-go .btn-sm + .btn-sm { margin-inline-start: 0; }
}
@media (max-width: 1439.98px) {
  /* a record table below its width: one ruled block per row, every value named */
  .adm-pay-xl, .adm-pay-xl tbody { display: block; }
  .adm-pay-xl thead { display: none; }
  .adm-pay-xl tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .adm-pay-xl td, .adm-pay-xl td.num, .adm-pay-xl td.adm-pay-when { display: block; min-width: 0; padding: 0; border: 0; text-align: start; white-space: normal; }
  .adm-pay-xl td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-2); }
  .adm-pay-xl td.adm-pay-lead, .adm-pay-xl td.adm-pay-full { grid-column: 1 / -1; }
  .adm-pay-xl td.adm-pay-lead { font-size: 15px; line-height: 22px; }
  .adm-pay-xl td.adm-pay-lead .t2 { display: inline; margin-inline-start: 6px; }
  .adm-pay-xl td.adm-pay-wide { grid-column: span 2; }
}
@media (max-width: 1099.98px) {
  .adm-pay-xl tr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .adm-pay-lg, .adm-pay-lg tbody { display: block; }
  .adm-pay-lg thead { display: none; }
  .adm-pay-lg tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .adm-pay-lg td, .adm-pay-lg td.num, .adm-pay-lg td.adm-pay-when { display: block; min-width: 0; padding: 0; border: 0; text-align: start; white-space: normal; }
  .adm-pay-lg td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-2); }
  .adm-pay-lg td.adm-pay-lead, .adm-pay-lg td.adm-pay-full { grid-column: 1 / -1; }
  .adm-pay-lg td.adm-pay-wide { grid-column: span 2; }
  .adm-pay-lg tr.adm-pay-group { padding: 12px 0 0; border-bottom: 0; }
  .adm-pay-lg tr.adm-pay-group th { display: block; grid-column: 1 / -1; padding: 0; border: 0; }
}
@media (max-width: 699.98px) {
  .adm-pay-xl tr, .adm-pay-lg tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-pay-xl td.adm-pay-wide, .adm-pay-lg td.adm-pay-wide { grid-column: 1 / -1; }
  .adm-pay-sm, .adm-pay-sm tbody { display: block; }
  .adm-pay-sm thead { display: none; }
  .adm-pay-sm tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .adm-pay-sm td, .adm-pay-sm td.num { display: block; min-width: 0; padding: 0; border: 0; text-align: start; white-space: normal; }
  .adm-pay-sm td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-2); }
  .adm-pay-acts form, .adm-pay-acts .btn { flex: 1 1 auto; }
  .adm-pay-acts .btn { width: 100%; }
  .adm-pay-act .btn { width: 100%; }
  .adm-pay-close .btn { width: 100%; }
  .adm-pay-rt .btn-sm, .adm-pay-links .btn-sm { height: 40px; }
  .adm-pay-flags { justify-content: flex-start; }
  .adm-pay-rev > .sec-head { flex-wrap: wrap; }
  .adm-pay-cmp th, .adm-pay-cmp td { padding-inline: 6px; }
}

/* ---------- Payslip documents (stage 7, part C) ---------- */
/* A standalone printable page outside the application shell. The tools and the Admin's panels are for the
   screen only. The sheet is the document: it carries its own state and prints on A4, one payslip a page. */
.pay-doc { background: var(--mist); padding: 20px 16px 56px; }
.pay-doc > * { max-width: 794px; margin-inline: auto; }
.pay-doc [lang="ar"] { font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; letter-spacing: 0; }
.pay-doc [lang="en"] { font-family: "IBM Plex Sans", system-ui, sans-serif; }
.pay-doc-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding-bottom: 14px; }
.pay-doc-tools .pay-doc-back, .pay-doc-tools .pay-doc-count { margin-inline-end: auto; }
.pay-doc-tools .pay-doc-count { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.pay-doc-tools .btn .ic { width: 18px; height: 18px; }
.pay-doc-back .ic { transform: scaleX(-1); }
html[dir="rtl"] .pay-doc-back .ic { transform: none; }
.pay-doc-pick, .pay-doc-inline { display: inline-flex; align-items: center; gap: 8px; }
.pay-doc-pick .input { width: auto; min-width: 170px; height: 40px; }
.pay-doc-inline .input { width: 180px; height: 40px; }
.pay-doc-pre { margin-bottom: 14px; }
.pay-doc-neg + .pay-doc-neg { margin-top: 8px; }

/* the Admin's actions and the panel about the payroll record */
.pay-doc-admin { margin-bottom: 18px; }
.pay-doc-ctlhead { font-size: 15px; line-height: 20px; font-weight: 600; padding-bottom: 9px; border-bottom: 1px solid var(--ink); }
.pay-doc-ctlstate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pay-doc-ctlstate .st { white-space: normal; }
.pay-doc-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pay-doc-form .field { flex: 1 1 200px; min-width: 0; margin-top: 0; }
.pay-doc-form .input { height: 40px; }
.pay-doc-form .btn { height: 40px; padding: 0 16px; font-size: 14px; border-radius: var(--r-sm); }
.pay-doc-status.sec { padding-top: 4px; }
.pay-doc-status > .note { margin-top: 12px; }
.pay-doc-sub { font-size: 14px; line-height: 20px; font-weight: 600; margin-top: 20px; padding-bottom: 7px; border-bottom: 1px solid var(--line-2); }
.pay-doc .ps-admin-status .card { padding: 12px 14px; background: var(--fill); border-radius: var(--r-ctl); font-size: 14px; line-height: 20px; }

/* the sheet */
.pay-doc .sheet { background: var(--paper); border: 1px solid var(--line-2); border-radius: 0; box-shadow: none; padding: 44px 46px 36px; margin-bottom: 20px; font-size: 13px; line-height: 19px; color: var(--ink); }
.pay-doc .sheet::before { content: none; }
html[lang="ar"] .pay-doc .sheet { line-height: 21px; }
.pay-doc-bi > .p { font-weight: 500; }
.pay-doc-bi > .p { margin-inline-end: 8px; }
.pay-doc-bi > .s { color: var(--ink-2); font-size: 0.86em; font-weight: 400; }
.pay-doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.pay-doc-co img { display: block; height: 26px; width: auto; margin-bottom: 8px; }
.pay-doc-co .pay-doc-bi > span, .pay-doc-title .pay-doc-bi > span, .pay-doc-fact dt .pay-doc-bi > span, .pay-doc-net .pay-doc-bi > span, .pay-doc-sign .pay-doc-bi > span { display: block; margin-inline-end: 0; }
.pay-doc-co .pay-doc-bi > .p { font-size: 13px; line-height: 18px; font-weight: 600; }
.pay-doc-title { text-align: end; }
.pay-doc-title h1, .pay-doc-title h2 { font-size: 20px; line-height: 26px; font-weight: 600; }
.pay-doc-title h1 .p, .pay-doc-title h2 .p { font-weight: 600; }
.pay-doc-title h1 .s, .pay-doc-title h2 .s { font-size: 13px; line-height: 18px; }
.pay-doc-period { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 10px; margin-top: 6px; font-size: 13px; }
.pay-doc-period .pay-doc-bi > span { display: inline; }
.pay-doc-period .pay-doc-bi > .p { margin-inline-end: 8px; }
.pay-doc-period > bdi { color: var(--ink-2); font-weight: 500; }
.pay-doc-state { margin-top: 14px; padding: 2px 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--ink); font-size: 13px; line-height: 19px; }
.pay-doc-state.is-estimate, .pay-doc-state.is-correction { border-inline-start-color: var(--amber); }
.pay-doc-state > strong { font-weight: 600; }
.pay-doc-state .vt, .pay-doc-state .st { display: inline-flex; font-size: 13px; line-height: 19px; font-weight: 600; white-space: normal; }
.pay-doc-state .vt.final { color: var(--ink); }
.pay-doc-state > span { color: var(--ink-2); }
.pay-doc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; padding: 16px 0 4px; }
.pay-doc-fact dt { font-size: 11.5px; line-height: 16px; color: var(--ink-2); }
.pay-doc-fact dt .pay-doc-bi > .p { font-weight: 400; }
.pay-doc-fact dd { font-size: 14px; line-height: 20px; font-weight: 500; margin-top: 2px; overflow-wrap: anywhere; }
.pay-doc-fact dd small { display: block; font-size: 11px; line-height: 15px; font-weight: 400; color: var(--ink-2); }
.pay-doc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.pay-doc-colhead { margin-top: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); font-size: 13px; line-height: 19px; font-weight: 600; }
.pay-doc-colhead .pay-doc-bi > .p { font-weight: 600; }
.pay-doc-line, .pay-doc-facts2 .pay-doc-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pay-doc-line dt, .pay-doc-facts2 .pay-doc-fact dt { min-width: 0; }
.pay-doc-line dd, .pay-doc-facts2 .pay-doc-fact dd { font-weight: 500; white-space: nowrap; text-align: end; margin-top: 0; }
.pay-doc-line dt small { display: block; font-size: 11px; line-height: 15px; color: var(--ink-2); }
.pay-doc-line.is-total { border-top: 1px solid var(--ink); border-bottom: 0; margin-top: -1px; padding-top: 8px; }
.pay-doc-line.is-total .p, .pay-doc-line.is-total dd { font-weight: 600; }
.pay-doc-facts2 .pay-doc-fact dt { font-size: 13px; line-height: 19px; color: var(--ink); }
.pay-doc-facts2 .pay-doc-fact dd { font-size: 13px; line-height: 19px; }
.pay-doc-facts2 .pay-doc-fact dt .pay-doc-bi > span { display: inline; }
.pay-doc-facts2 .pay-doc-fact dt .pay-doc-bi > .p { margin-inline-end: 8px; }
.pay-doc-computed { margin-top: 16px; border-top: 1px solid var(--line); }
.pay-doc-net { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 12px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.pay-doc-computed + .pay-doc-net { margin-top: 0; border-top-width: 1px; }
.pay-doc-net > div { display: flex; align-items: center; gap: 14px; }
.pay-doc-net .pay-doc-bi > .p { font-size: 14px; line-height: 20px; font-weight: 600; }
.pay-doc-net > strong { font-size: 28px; line-height: 34px; font-weight: 600; white-space: nowrap; }
.pay-doc-flag { margin-top: 14px; padding: 2px 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--amber); font-size: 12.5px; line-height: 18px; color: var(--amber); }
.pay-doc-flag b { font-weight: 600; }
.pay-doc-hint { margin-top: 10px; font-size: 12px; line-height: 17px; color: var(--ink-2); }
.pay-doc-sign { display: flex; gap: 28px; margin-top: 46px; }
.pay-doc-sign > div { flex: 1 1 0; padding-top: 6px; border-top: 1px solid var(--ink-2); text-align: center; font-size: 11.5px; line-height: 16px; }
.pay-doc-sign .pay-doc-bi > .p { font-weight: 400; }
.pay-doc-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; margin-top: 18px; font-size: 10.5px; line-height: 15px; color: var(--ink-3); }
.pay-doc .sheet.payroll-record-unavailable { padding-block: 24px; border-inline-start: 3px solid var(--red); }
.pay-doc-un { font-size: 15px; line-height: 21px; }
.pay-doc-un strong { font-weight: 600; }
.pay-doc-un bdi { color: var(--ink-2); margin-inline-start: 6px; }
.pay-doc-unstate { margin-top: 4px; }
.pay-doc-unmsg { margin-top: 8px; color: var(--red); }
.pay-doc-unwhy { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.pay-doc-unwhy .link { margin-inline-start: 8px; }

/* the Admin's adjustment lines under the sheet */
.pay-doc-edit.sec { padding-top: 12px; }
.pay-doc-adj { margin-top: 8px; }
.pay-doc-adj td .t2 { display: block; }
.pay-doc-adj .pay-doc-inline { justify-content: flex-end; width: 100%; }
.pay-doc-adj td .btn-sm { height: 40px; margin-block: 0; font-size: 14px; padding: 0 14px; }
.pay-doc-fold { margin-top: 12px; }
.pay-doc-fold > summary { cursor: pointer; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); padding: 6px 0; }
.pay-doc-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; }
.pay-doc-add .field { flex: 1 1 170px; min-width: 0; margin-top: 0; }
.pay-doc-add .input { height: 40px; }
.pay-doc-add .btn { height: 40px; padding: 0 16px; font-size: 14px; border-radius: var(--r-sm); }

@media (max-width: 699.98px) {
  .pay-doc { padding: 12px 0 40px; }
  .pay-doc > * { padding-inline: 16px; }
  .pay-doc > .sheet { padding: 22px 16px 24px; border-inline: 0; }
  .pay-doc-tools .btn, .pay-doc-pick { flex: 1 1 auto; }
  .pay-doc-pick .input { flex: 1 1 auto; min-width: 0; }
  .pay-doc-tools .pay-doc-back { flex: 0 0 auto; }
  .pay-doc-head { flex-direction: column; gap: 12px; }
  .pay-doc-title { text-align: start; }
  .pay-doc-period { justify-content: flex-start; }
  .pay-doc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-doc-cols { grid-template-columns: minmax(0, 1fr); }
  .pay-doc-net > strong { font-size: 24px; line-height: 30px; }
  .pay-doc-net > div { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pay-doc-form .btn, .pay-doc-add .btn { width: 100%; }
  .pay-doc-form .field, .pay-doc-add .field { flex-basis: 100%; }
  .pay-doc-adj, .pay-doc-adj tbody, .pay-doc-adj tr, .pay-doc-adj td { display: block; }
  .pay-doc-adj thead { display: none; }
  .pay-doc-adj tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .pay-doc-adj td, .pay-doc-adj td.num { padding: 2px 0; border: 0; text-align: start; }
  .pay-doc-adj .pay-doc-inline { margin-top: 6px; }
  .pay-doc-adj .pay-doc-inline .input { flex: 1 1 auto; width: auto; min-width: 0; }
  .pay-doc-sign { gap: 16px; }
}
@page payslip { size: A4; margin: 12mm; }
@media print {
  .pay-doc { background: none; padding: 0; }
  .pay-doc .no-print { display: none !important; }
  .pay-doc > * { max-width: none; padding-inline: 0; }
  .pay-doc .sheet, .pay-doc > .sheet { page: payslip; border: 0; margin: 0; padding: 0; break-after: page; break-inside: avoid; }
  .pay-doc .sheet.payroll-record-unavailable { padding-inline-start: 12px; border-inline-start: 3px solid var(--red); }
  .pay-doc .sheet:last-of-type { break-after: auto; }
  .pay-doc-pre { margin: 0; }
  /* a little tighter on paper, so the longest payslip (every optional line and note) stays on one page */
  .pay-doc .sheet { font-size: 12px; line-height: 17px; }
  html[lang="ar"] .pay-doc .sheet { line-height: 18px; }
  .pay-doc-facts { gap: 8px 20px; padding: 12px 0 2px; }
  .pay-doc-fact dd { font-size: 13px; line-height: 18px; }
  .pay-doc-colhead { margin-top: 12px; font-size: 12px; line-height: 17px; }
  .pay-doc-line, .pay-doc-facts2 .pay-doc-fact { padding: 3.5px 0; }
  .pay-doc-facts2 .pay-doc-fact dt, .pay-doc-facts2 .pay-doc-fact dd { font-size: 12px; line-height: 17px; }
  .pay-doc-state { margin-top: 10px; font-size: 12px; line-height: 17px; }
  .pay-doc-state .vt, .pay-doc-state .st { font-size: 12px; line-height: 17px; }
  .pay-doc-computed, .pay-doc-net { margin-top: 12px; }
  .pay-doc-net { padding: 8px 0; }
  .pay-doc-net > strong { font-size: 24px; line-height: 30px; }
  .pay-doc-sign { margin-top: 26px; }
  .pay-doc-foot { margin-top: 12px; }
}

/* ---------- Admin: loan accounts (stage 7, part D) ---------- */
/* One screen: the outstanding balance and its month, the active loans as a ruled table (a row of labelled
   figures below 1100 px), and the Add loan form. Every selector starts with .adm-loan. */
.adm-loan-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 24px; padding-top: 6px; }
.adm-loan-top .figs { flex: 1 1 420px; max-width: 600px; }
.adm-loan-top .fig:first-child { padding-inline-start: 0; border-inline-start: 0; }
.adm-loan-top > .btn { margin-bottom: 14px; }
.adm-loan-table { font-variant-numeric: tabular-nums; }
.adm-loan-table td { vertical-align: middle; }
.adm-loan-table small { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.adm-loan-mode .t2 { display: block; }
.adm-loan-bal b { font-weight: 600; }
.adm-loan-pay { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.adm-loan-pay .input { width: 116px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); font-size: 14px; text-align: end; }
.adm-loan-table td .btn-sm { height: 36px; margin-block: 0; }
.adm-loan-add .form { max-width: 560px; }
.adm-loan-add .choice:last-child { border-bottom: 0; }
@media (min-width: 1100px) and (max-width: 1279.98px) {
  .adm-loan-table th, .adm-loan-table td { padding-inline: 7px; }
  .adm-loan-pay { gap: 6px; }
  .adm-loan-pay .input { width: 84px; }
  .adm-loan-table td .btn-sm { padding: 0 10px; font-size: 13px; }
}
@media (max-width: 1099.98px) {
  .adm-loan-table, .adm-loan-table tbody { display: block; }
  .adm-loan-table thead { display: none; }
  .adm-loan-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .adm-loan-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .adm-loan-table td.num { text-align: start; white-space: normal; }
  .adm-loan-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-2); }
  .adm-loan-table td.adm-loan-who { grid-column: 1 / -1; }
  .adm-loan-table td.adm-loan-who::before { content: none; }
  .adm-loan-table td.adm-loan-who .t1 { font-size: 16px; line-height: 22px; }
  .adm-loan-table td.adm-loan-ded { grid-column: 1 / -1; }
  .adm-loan-table tr[data-mode="fixed"] td.adm-loan-ded { grid-column: auto; }
  .adm-loan-table td.adm-loan-act { align-self: end; text-align: end; }
  .adm-loan-table tr[data-mode="fixed"] td.adm-loan-act { grid-column: 1 / -1; }
  .adm-loan-pay { display: flex; justify-content: flex-start; margin-top: 4px; }
  .adm-loan-pay .input { flex: 1 1 auto; width: auto; max-width: 220px; height: 40px; font-size: 16px; text-align: start; }
  .adm-loan-table td .btn-sm { height: 40px; }
}

/* ==========================================================================
   EIS Signature, stage 9: sign-in and the public privacy page.

   This is the block part 9B appends to static/css/eis.css (the accepted stylesheet stays a byte
   prefix). It uses the tokens of the system and adds none. Presentation only.
   ========================================================================== */

/* ---- Sign-in: one form; from 1100 px a flat navy panel beside it (ruling S9-1) ---- */
.signin-body { background: var(--paper); }
.signin { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.signin-brand { display: none; }
.signin-main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
.signin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.signin-logo { display: block; height: 22px; width: auto; }
.signin-lang { display: inline-flex; align-items: center; min-height: 44px; }
.signin-box { width: 100%; max-width: 400px; margin: 40px auto 0; }
.signin-box h1 { font-size: 30px; line-height: 36px; }
.signin-box h1 bdi { white-space: nowrap; }   /* the product name is never split across two lines */
.signin-sub { margin-top: 6px; color: var(--ink-2); font-size: 16px; line-height: 24px; }
.signin-box .note { margin-top: 24px; }
.signin-box form { margin-top: 28px; }
.signin-pw { position: relative; display: block; }
.signin-pw .input { padding-right: 88px; }
/* The code and the password are typed left to right in both languages. In Arabic they sit under their labels,
   on the right, and the show control is on the left: physical sides, because the field's own direction is not the page's. */
html[dir="rtl"] .signin-box .input[dir="ltr"] { text-align: right; }
html[dir="rtl"] .signin-pw .input { padding-right: 14px; padding-left: 88px; }
.signin-pw-toggle { position: absolute; inset-block: 4px; inset-inline-end: 4px; min-width: 64px; padding: 0 12px; border-radius: var(--r-sm); color: var(--blue); font-size: 14px; font-weight: 500; }
.signin-box .input, .signin-box .btn { height: 48px; font-size: 16px; }   /* one comfortable form at every width: the dense desktop sizes are for working screens */
/* The boundary of a sign-in field is the only thing that says "type here" before it is focused, so it is drawn in
   --ink-3: 5.0:1 on white, where the system's quiet field line (--line-2) is 1.5:1. Scoped to this form: no token
   changes and no other screen changes. The states are restated because these selectors outrank the shared ones. */
.signin-box .input { border-color: var(--ink-3); }
.signin-box .input:hover { border-color: var(--ink); }
.signin-box .input:focus { border-color: var(--blue); }
.signin-box .input.is-error, .signin-box form.was-validated .input:invalid { border-color: var(--red); }
.signin-box .field-label { font-size: 14px; line-height: 20px; }
.signin-box .btn { margin-top: 24px; }
.signin-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 400px; margin: auto auto 0; padding-top: 32px; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.signin-foot .link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 400; }
/* The install guide on sign-in is part of the page, not a layer over it: it takes its own place under the form, in
   the form's column, so it can never cover the Sign in button; a short screen scrolls. It is the same component with
   the same controls; only its position and its shadow (a shadow belongs to a layer) differ here. */
.signin-main .pwa-banner { position: relative; inset: auto; z-index: auto; width: 100%; max-width: 400px; margin: 32px auto 0; box-shadow: none; }

@media (min-width: 700px) {
  .signin-main { padding: 20px 32px 16px; }
  .signin-box { margin-top: 96px; }
}
@media (min-width: 1100px) {
  .signin { grid-template-columns: minmax(360px, 42%) minmax(0, 1fr); }
  .signin-brand { display: flex; flex-direction: column; justify-content: space-between; padding: 40px; background: var(--navy); color: #fff; }
  .signin-brand img { display: block; height: 34px; width: auto; align-self: flex-start; }
  .signin-brand p { max-width: 15em; font-size: 22px; line-height: 28px; font-weight: 500; }
  .signin-main { padding: 28px 40px 24px; }
  .signin-logo { visibility: hidden; }          /* the panel carries the logo */
  .signin-sub { display: none; }                /* the panel carries the description */
  .signin-box { margin-top: 120px; }
  .signin-box h1 { font-size: 24px; line-height: 30px; }
}

/* ---- The public privacy page: a document, ruled like the rest of the system (ruling S9-5) ---- */
.public { width: 100%; max-width: 760px; margin-inline: auto; padding: 12px var(--gutter) 48px; }
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.public-top .back { margin-inline-start: -7px; }
.public-logo { display: block; height: 22px; width: auto; margin-top: 28px; }
.public h1 { margin-top: 20px; font-size: 30px; line-height: 36px; }
.public-sub { margin-top: 6px; color: var(--ink-2); font-size: 16px; line-height: 24px; }
.public-meta { margin-top: 2px; color: var(--ink-3); font-size: 14px; line-height: 20px; }
.policy { margin-top: 28px; font-size: 16px; line-height: 26px; }
html[lang="ar"] .policy { line-height: 28px; }
.policy h2 { margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-size: 15px; line-height: 20px; }
.policy p + p { margin-top: 12px; }
.policy ul { margin-top: 8px; padding-inline-start: 20px; list-style: disc; }
.policy li + li { margin-top: 6px; }
.policy a { color: var(--blue); font-weight: 500; }
.policy table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.policy th { padding: 8px 0; padding-inline-end: 16px; border-bottom: 1px solid var(--line-2); text-align: start; font-weight: 500; color: var(--ink-2); }
.policy td { padding: 10px 0; padding-inline-end: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.policy th:last-child, .policy td:last-child { padding-inline-end: 0; }
.public-foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; line-height: 18px; }
@media (min-width: 700px) { .public { padding: 20px 32px 64px; } .public h1 { font-size: 30px; } }

/* ==========================================================================
   Vivid direction, stage V1 (the owner's approval of the Final design boards):
   the shared navigation, the Today screen and the Admin Overview. Earlier rules
   are untouched; everything below either restyles the shell's navigation or is
   scoped to the new .v-* markup and the pages that set $SIG_VIVID.
   ========================================================================== */
:root {
  --v-page: #F3F5F9;
  --v-line: #EAECF0;
  --v-line-2: #D0D5DD;
  --v-t2: #475467;
  --v-t3: #667085;
  --v-indigo: #4F2BD9;
  --v-ok: #12B76A;  --v-ok-t: #067647;  --v-ok-w: #ECFDF3;
  --v-late: #F79009; --v-late-t: #B54708; --v-late-w: #FFFAEB;
  --v-bad: #F04438;  --v-bad-t: #B42318;  --v-bad-w: #FEF3F2;
  --v-exc: #98A2B3;
  --v-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 14px rgba(16, 24, 40, 0.06);
  --v-hero: linear-gradient(150deg, #1261FF 0%, #2F45DF 48%, #0A1326 100%);
  --v-glass: rgba(255, 255, 255, 0.14);
  --v-glass-line: rgba(255, 255, 255, 0.24);
}
html[dir="rtl"] { --v-hero: linear-gradient(210deg, #1261FF 0%, #2F45DF 48%, #0A1326 100%); }

/* ---------- the navigation: a floating navy tab bar on a phone ---------- */
@media (max-width: 699.98px) {
  .nav { bottom: 10px; margin: 0 12px 10px; margin-bottom: max(10px, env(safe-area-inset-bottom)); padding: 6px 4px; border: 0; border-radius: 22px; background: var(--navy); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 10px 28px rgba(10, 19, 38, 0.24); }
  .nav-item { justify-content: flex-start; min-height: 56px; padding-top: 9px; color: #C2C9D6; }
  .nav-item > .ic, .nav-item > span { position: relative; z-index: 1; }
  .nav-item.is-current, .nav-item.is-current-n { color: #FFFFFF; font-weight: 600; }
  .nav-item.is-current::before, .nav-item.is-current-n::before { z-index: 0; top: 6px; left: calc(50% - 24px); width: 48px; height: 30px; border-radius: 15px; background: var(--blue); }
  .nav-item.is-current-n::before { background: rgba(255, 255, 255, 0.16); }
  .nav-count { z-index: 2; top: 2px; inset-inline-start: calc(50% + 8px); background: #FFFFFF; color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
  .nav-item[href$="/me/tasks.php"] .nav-count, .nav-count.nav-badge { background: var(--v-bad); color: #FFFFFF; }
}

/* ---------- the rail and the sidebar: white, the current item solid blue ---------- */
@media (min-width: 700px) {
  .app { background: linear-gradient(to right, var(--paper) var(--nav-w), var(--v-line) var(--nav-w), var(--v-line) calc(var(--nav-w) + 1px), var(--paper) calc(var(--nav-w) + 1px)); }
  html[dir="rtl"] .app { background: linear-gradient(to left, var(--paper) var(--nav-w), var(--v-line) var(--nav-w), var(--v-line) calc(var(--nav-w) + 1px), var(--paper) calc(var(--nav-w) + 1px)); }
  .nav-item { color: #344054; }
  .nav-item .ic { color: var(--v-t3); }
  .nav-item:hover { background: var(--v-page); }
  .nav-item.is-current, .nav-item.is-current:hover { background: var(--blue); box-shadow: none; color: #FFFFFF; }
  .nav-item.is-current .ic { color: #FFFFFF; }
  .nav-item.is-current::before { display: none; }
  .nav-count { background: var(--blue-wash); color: var(--blue-press); }
  .nav-item.is-current .nav-count { background: rgba(255, 255, 255, 0.22); color: #FFFFFF; }
}
@media (min-width: 700px) and (max-width: 1099.98px) {
  .nav-item { border-radius: 14px; }
  .nav-item.is-current-n { background: var(--blue-wash); box-shadow: none; color: var(--blue-press); }
  .nav-item.is-current-n::before { display: none; }
}
@media (min-width: 1100px) {
  .nav, .app.is-detail .nav { padding: 22px 14px 14px; }
  .nav-brand { padding: 4px 12px 24px; }
  .nav-brand img { height: 19px; }
  .nav-items { gap: 2px; }
  .nav-group { margin: 16px 12px 4px; color: var(--v-t3); }
  .nav-item { gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: #344054; }
  .nav-item .ic { width: 20px; height: 20px; }
  .nav-item.is-current { font-weight: 600; }
  .nav-count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
}

/* ---------- a vivid page: a soft grey ground for its cards ---------- */
.app.is-vivid .page { background: var(--v-page); }
.app.is-vivid .flashes { padding: 14px 0 0; }

/* the hero: the one gradient on the screen */
.v-hero { background: var(--v-hero); color: #FFFFFF; padding-bottom: 96px; border-radius: 0 0 32px 32px; }
.v-hero .top { padding-bottom: 0; }
.v-hero .top-lead .mark { height: 18px; }
.v-hero .top h1, .v-hero .top.is-home h1 { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 24px; line-height: 30px; letter-spacing: -0.01em; color: #FFFFFF; }
.v-hero .top-date, .v-hero .top.is-home .top-date { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; color: rgba(255, 255, 255, 0.86); }
.v-hero .top-actions { gap: 10px; margin-inline-end: 0; }
.v-hero .iconbtn { width: 40px; height: 40px; border-radius: 12px; color: #FFFFFF; background: var(--v-glass); box-shadow: inset 0 0 0 1px var(--v-glass-line); }
.v-hero .iconbtn .pip { top: -5px; inset-inline-end: -5px; width: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--v-bad); color: #FFFFFF; box-shadow: none; overflow: visible; font-size: 11px; font-weight: 600; line-height: 20px; text-align: center; font-style: normal; }
.v-hero .top-actions > a.avatar-link { width: 40px; height: 40px; }
.v-hero .avatar { width: 40px; height: 40px; flex-basis: 40px; background: #FFFFFF; color: var(--blue); font-size: 14px; }
.v-hero .notif-dd { color: var(--ink); }
.v-hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px var(--gutter) 0; }
.v-clock b { display: block; font-size: 54px; line-height: 58px; font-weight: 600; letter-spacing: -0.02em; }
.v-clock span { display: block; font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, 0.86); }
.v-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: var(--v-glass); box-shadow: inset 0 0 0 1px var(--v-glass-line); font-size: 13px; line-height: 18px; font-weight: 600; }
.v-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #6CE9A6; }
.v-dot.late, .v-dot.wait { background: #FEC84B; }
.v-dot.done { background: #FFFFFF; }
.v-dot.off { background: #C7D7FE; }

/* cards */
.v-card { display: block; background: #FFFFFF; border-radius: 20px; padding: 18px; box-shadow: var(--v-shadow); color: var(--ink); min-width: 0; }
.v-col > .v-card + .v-card, .v-col > .v-card + .loc-share, .v-col > .loc-share + .v-card, .v-ov-main > * + *, .v-ov-side > * + * { margin-top: 14px; }
.v-card .sec-head.v-hd, .v-wrap .sec-head { display: flex; align-items: center; gap: 10px; padding: 0 0 14px; border: 0; }
.v-card .sec-head h2 { flex: 1; min-width: 0; font-size: 16px; line-height: 22px; font-weight: 600; }
.v-it { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-wash); color: var(--blue); }
.v-it .ic { width: 20px; height: 20px; }
.v-it.green { background: var(--v-ok-w); color: var(--v-ok-t); }
.v-it.red { background: var(--v-bad-w); color: #D92D20; }
.v-it.indigo { background: #F1EEFF; color: var(--v-indigo); }
.v-it.amber { background: var(--v-late-w); color: var(--v-late-t); }
.v-link { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--blue); white-space: nowrap; }
.v-link:hover { color: var(--blue-press); }
.v-aside { font-size: 13px; color: var(--v-t3); white-space: nowrap; }
.v-big { font-size: 18px; line-height: 22px; font-weight: 600; color: var(--blue); }
.v-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; background: #F2F4F7; color: var(--v-t2); }
.v-pill.est { background: var(--v-late-w); color: var(--v-late-t); }
.v-pill.blue { background: var(--blue-wash); color: var(--blue-press); }
.v-pill.green { background: var(--v-ok-w); color: var(--v-ok-t); }
.v-pill.red { background: var(--v-bad-w); color: var(--v-bad-t); }
.v-pill.glass { background: var(--v-glass); box-shadow: inset 0 0 0 1px var(--v-glass-line); color: #FFFFFF; }
.v-pill .v-dot { background: var(--v-ok); }
.v-cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--navy); color: #FFFFFF; font-size: 11px; font-weight: 600; line-height: 20px; }
.v-cnt.red { background: var(--v-bad); }
.v-muted { font-size: 14px; line-height: 20px; color: var(--v-t2); }
.v-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 12px; font-size: 12px; line-height: 17px; color: var(--v-t3); }
.v-foot .v-link { font-size: 14px; }
.v-sec { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 26px 4px 12px; }
.v-sec h2 { font-size: 18px; line-height: 24px; font-weight: 600; }
.v-sec span { font-size: 13px; line-height: 18px; color: var(--v-t3); }
.v-card .btn, .v-shift .btn { border-radius: 14px; }
.v-card .btn-secondary { background: #FFFFFF; border-color: var(--v-line-2); }
.btn.v-all { margin-top: 12px; }

/* rows inside a card: hairlines, and the status mark becomes a short accent bar */
.v-card .row { border-bottom-color: #F2F4F7; }
.v-card .row-title { font-size: 15px; line-height: 21px; font-weight: 600; }
.v-card .row-sub { font-size: 13px; line-height: 19px; color: var(--v-t2); }
.v-card .row-sub.is-due { color: var(--v-bad-t); }
.v-card .row > .mk { width: 4px; flex-basis: 4px; height: auto; min-height: 36px; align-self: stretch; margin-top: 2px; border-radius: 2px; }
.v-card .row > .mk.wait { background: var(--v-late); box-shadow: none; }
.v-card .row > .mk.sched { background: var(--v-line-2); box-shadow: none; }
.v-card .row > .mk.due { background: var(--v-bad); }
.v-card .row-trail { font-size: 13px; font-weight: 600; }
.v-card .sec-foot { color: var(--v-t3); }
.v-wrap > .sec, .v-wrap > section { padding-top: 0; }
.v-wrap > .focus { padding-top: 0; }
.v-wrap > .focus::before { display: none; }
.v-wrap .sec-head { align-items: center; padding-bottom: 8px; }
.v-wrap .sec-head h2 { font-size: 16px; line-height: 22px; }

/* ---------- Today ---------- */
.content.v-today { padding-inline: 16px; padding-bottom: 24px; }
.v-shift { position: relative; margin-top: -76px; }
.v-shift-hd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; }
.v-shift-hd h2 { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; }
.v-shift-hd + .v-muted { margin-top: 4px; }
.v-shift-k { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; line-height: 18px; color: var(--v-t2); }
.v-shift-k b { color: var(--ink); font-weight: 600; }
.v-shift .v-muted + .v-shift-k { margin-top: 12px; }
.v-day { --p: 0%; position: relative; height: 10px; margin-top: 10px; border-radius: 5px; background: var(--v-line); }
.v-day > i { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: var(--p); border-radius: 5px; background: var(--blue); }
.v-day > b { position: absolute; top: -4px; inset-inline-start: calc(var(--p) - 9px); width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; border: 4px solid var(--blue); }
.v-day-k { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--v-t3); }
.v-day-k b { font-weight: 400; }
.v-shift-note { margin-top: 10px; font-size: 13px; line-height: 19px; }
.v-next { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: #F5F8FF; color: var(--ink); }
.v-next .v-it { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; }
.v-next .v-it .ic { width: 18px; height: 18px; }
.v-next-t { flex: 1; min-width: 0; }
.v-next-t small { display: block; font-size: 12px; line-height: 16px; color: var(--v-t2); }
.v-next-t b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-next > .ic { width: 18px; height: 18px; color: var(--v-t3); }
.v-out { margin-top: 12px; }
.v-out > summary { list-style: none; }
.v-out > summary::-webkit-details-marker { display: none; }
.btn.btn-shift { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border: 0; border-radius: 14px; background: var(--navy); color: #FFFFFF; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn.btn-shift .ic { color: #FFFFFF; }
.v-out[open] > summary { background: var(--v-page); color: var(--ink); }
.v-out[open] > summary .ic { color: var(--ink); }
.v-out-body { margin-top: 12px; }
.v-shift .checkin { margin-top: 12px; }
.v-shift #checkin-submit-btn, .v-shift #checkout-submit-btn { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.v-shift #checkin-submit-btn:disabled, .v-shift #checkout-submit-btn:disabled { opacity: 0.45; }
.v-today > .flashes, .v-today > .queue { margin-top: 14px; }

/* the KPI card: indigo, the only place the score lives on Today */
.v-kpi { background: linear-gradient(140deg, #3A2BB8 0%, #2A1F86 100%); color: #FFFFFF; }
.v-kpi:hover { color: #FFFFFF; }
.v-kpi-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.v-kpi-hd h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
.v-kpi-main { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.v-ring-wrap { position: relative; width: 104px; height: 104px; flex: 0 0 104px; }
.v-ring { display: block; width: 104px; height: 104px; }
html[dir="rtl"] .v-ring { transform: scaleX(-1); }
.v-ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 10; }
.v-ring-fg { fill: none; stroke: #FFFFFF; stroke-width: 10; stroke-linecap: round; }
.v-ring-n { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.v-ring-n b { font-size: 28px; line-height: 32px; font-weight: 600; }
.v-ring-n span { font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, 0.85); }
.v-kpi-facts { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.v-kpi-facts b { font-size: 18px; line-height: 24px; font-weight: 600; }
.v-kpi-facts span { font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, 0.86); }
.v-kpi-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.v-kpi-part { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--v-glass); box-shadow: inset 0 0 0 1px var(--v-glass-line); font-size: 13px; line-height: 18px; }
.v-kpi-part span { min-width: 0; font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, 0.86); }
.v-kpi-part b { font-size: 16px; line-height: 22px; font-weight: 600; }
.v-kpi-part.is-provisional, .v-kpi-part.is-pending { background: transparent; box-shadow: none; border: 1.5px dashed rgba(255, 255, 255, 0.6); padding: 6.5px 10.5px; }
.v-kpi-part.is-not_assessable { opacity: 0.72; }
.v-kpi-note { margin-top: 10px; font-size: 12px; line-height: 17px; color: rgba(255, 255, 255, 0.84); }
.v-kpi.is-empty .v-kpi-note { font-size: 14px; line-height: 20px; }
.v-kpi-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }

/* figure tiles */
.v-tiles { display: grid; gap: 6px; }
.v-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.v-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.v-tiles.auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); gap: 10px; }
.v-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: #F2F4F7; }
.v-tile b { font-size: 20px; line-height: 26px; font-weight: 600; overflow-wrap: anywhere; }
.v-tile span { font-size: 12px; line-height: 16px; }
.v-tiles.four .v-tile { padding: 10px 9px; }
.v-tile.green { background: var(--v-ok-w); color: var(--v-ok-t); }
.v-tile.amber { background: var(--v-late-w); color: var(--v-late-t); }
.v-tile.blue { background: var(--blue-wash); color: var(--blue-press); }
.v-tile.indigo { background: #F1EEFF; color: var(--v-indigo); }
.v-tile.red { background: var(--v-bad-w); color: var(--v-bad-t); }
.v-tile.grey span { color: #344054; }
.v-tile.flat { background: #F7F8FA; border-radius: 12px; }
.v-tile.flat span { color: var(--v-t2); }
.v-tile.flat b { font-size: 18px; color: var(--ink); }
.v-tile.t-red b { color: var(--v-bad-t); }
.v-tile.t-green b { color: var(--v-ok-t); }
.v-tile b.v-txt { font-size: 14px; line-height: 26px; }

/* this week's hours: bars on a baseline, the working day as a dashed line */
.v-week { margin-top: 18px; }
.v-week-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; line-height: 20px; font-weight: 600; }
.v-wk { --line: 80; position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; min-height: 160px; margin-top: 8px; }
.v-wk::before { content: ""; position: absolute; inset-inline: 0; bottom: calc(22px + var(--line) * 1.1px); border-top: 1px dashed var(--v-exc); }
.v-wk::after { content: ""; position: absolute; inset-inline: 0; bottom: 22px; border-top: 1px solid var(--v-line); }
.v-wk-col { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; color: inherit; }
.v-wk-v { font-size: 12px; line-height: 16px; font-weight: 600; color: #344054; white-space: nowrap; }
.v-wk-bar { --h: 0; display: block; width: 22px; max-width: 72%; height: calc(var(--h) * 1.1px); border-radius: 6px; background: var(--v-ok); }
.v-wk-bar.late { background: var(--v-late); }
.v-wk-bar.today { background: var(--blue); }
.v-wk-d { height: 18px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--v-t3); }
.v-wk-col.is-today .v-wk-d { color: var(--blue); font-weight: 600; }
a.v-wk-col:hover .v-wk-bar { filter: brightness(0.94); }
.v-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--v-t2); }
.v-legend span { display: inline-flex; align-items: center; gap: 6px; }
.v-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--v-ok); }
.v-legend i.late, .v-legend i.s-late { background: var(--v-late); }
.v-legend i.today { background: var(--blue); }
.v-legend i.line { width: 14px; height: 0; border-radius: 0; background: none; border-top: 1px dashed var(--v-exc); }
.v-legend i.s-absent_with_permission { background: var(--v-exc); }
.v-legend i.s-absent_without_permission { background: var(--v-bad); }
.v-legend i.s-pending { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--blue); }
.v-legend i.dot { border-radius: 50%; }
.v-legend i.dot.stale { background: var(--v-late); }
.v-legend i.dot.off { background: var(--v-exc); }
.v-legend i.site { background: var(--navy); }

/* this month so far: the projected net in a dashed frame until payroll is posted */
.v-net { margin-top: 10px; padding: 14px; border-radius: 16px; border: 2px dashed #B4A6F5; background: #F8F6FF; }
.v-net.is-final { border-style: solid; border-color: #D9D6FE; }
.v-net-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--v-indigo); }
.v-net-n { display: block; margin-top: 2px; font-size: 30px; line-height: 36px; font-weight: 600; color: #2A1F86; }
.v-net-n small { font-size: 15px; font-weight: 500; }
.v-net p { font-size: 12px; line-height: 17px; color: var(--v-t2); }
.v-pay .v-muted { margin-bottom: 4px; }

/* the next visit */
.v-nv-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 32px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.v-nv-time.is-date { font-size: 24px; line-height: 30px; }
.v-nv-time small { font-size: 13px; line-height: 18px; font-weight: 400; letter-spacing: 0; color: var(--v-t2); }
.v-nv-time small.is-due { color: var(--v-bad-t); }
.v-nv-title { margin-top: 4px; font-size: 17px; line-height: 24px; font-weight: 600; }
.v-nv .v-muted { font-size: 13px; line-height: 19px; }
.v-nv-state { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.v-nv-state .st { padding: 4px 10px; border-radius: 999px; background: var(--blue-wash); color: var(--blue-press); font-size: 12px; line-height: 16px; font-weight: 600; }
.v-nv-state .st .mk { display: none; }
.v-nv-state .st.due { background: var(--v-bad-w); color: var(--v-bad-t); }
.v-nv-state .st.ok, .v-nv-state .st.done { background: var(--v-ok-w); color: var(--v-ok-t); }
.v-nv-state .st.wait, .v-nv-state .st.late { background: var(--v-late-w); color: var(--v-late-t); }
.v-nv .btns { margin-top: 14px; }
.v-nv .btns .btn { flex: 1 1 0; height: 48px; }

/* the live location card keeps its consent text and controls; only its frame changes */
.v-today .loc-share { margin-top: 14px; padding: 18px; border-top: 0; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.v-today .loc-share[hidden] { display: none; }
.v-today .loc-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-wash); color: var(--blue); }
.v-today .loc-title { font-size: 16px; line-height: 22px; }
.v-today .loc-share .btn { border-radius: 14px; }

/* quick access */
.v-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v-q { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 14px 12px; font-size: 14px; line-height: 18px; font-weight: 600; }
.v-q:hover { box-shadow: 0 0 0 2px var(--blue-wash), var(--v-shadow); }

/* the allowance form fits two fields on a line from 360 px */
@media (min-width: 360px) { .v-card .fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 359.98px) {
  .v-clock b { font-size: 44px; line-height: 48px; }
  .v-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-kpi-parts { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Admin Overview ---------- */
.v-btn-white { background: #FFFFFF; color: var(--blue); border: 0; font-weight: 600; }
.v-btn-white:hover { background: var(--blue-wash); color: var(--blue-press); }
.v-hero-ov { padding-bottom: 76px; }
.v-ov-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 18px var(--gutter) 0; }
.v-gt { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--v-glass); box-shadow: inset 0 0 0 1px var(--v-glass-line); color: #FFFFFF; }
.v-gt > span { font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, 0.88); }
.v-gt > b { font-size: 30px; line-height: 38px; font-weight: 600; }
.v-gt > b small { font-size: 16px; font-weight: 500; color: rgba(255, 255, 255, 0.75); }
.v-gt > small { font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, 0.82); }
.v-gt > small.is-due { color: #FFD5D1; font-weight: 600; }
.v-gt-bar { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.v-gt-bar > i { display: block; height: 6px; border-radius: 3px; background: #6CE9A6; }
a.v-gt:hover { background: rgba(255, 255, 255, 0.2); }
.v-gt.is-white { background: #FFFFFF; box-shadow: none; color: var(--ink); }
.v-gt.is-white > span, .v-gt.is-white > small { color: var(--v-t2); }
.v-gt.is-white > b { color: var(--blue); }
a.v-gt.is-white:hover { background: var(--blue-wash); }
.content.v-ov { margin-top: -56px; padding-inline: 16px; }
.v-ov > .note { margin-bottom: 14px; padding: 14px 16px; border-radius: 16px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.v-ov > .note.red > .ic { color: #D92D20; }
.v-ov > .maint-ok { margin-bottom: 10px; padding: 10px 14px; border-radius: 12px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.v-qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.v-qa-i { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 18px; font-weight: 600; }
.v-qa-i:hover { box-shadow: 0 0 0 2px var(--blue-wash), var(--v-shadow); }
/* the 14-day chart: stacked columns, gridlines with their counts, the day under each column */
.v-st { position: relative; margin-top: 10px; padding-inline-start: 22px; }
.v-st-g { position: absolute; inset-inline: 22px 0; bottom: calc(38px + var(--y) * 1.3px); border-top: 1px solid #F2F4F7; }
.v-st-g b { position: absolute; inset-inline-start: -22px; top: -9px; width: 16px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--v-t3); text-align: end; }
.v-st-cols { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 6px; height: calc(130px + 38px); }
.v-st-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; height: 100%; }
.v-st-stack { display: flex; flex-direction: column-reverse; gap: 2px; width: 100%; max-width: 26px; height: 130px; justify-content: flex-start; border-bottom: 1px solid var(--v-line-2); }
.v-st-stack > i { display: block; height: calc(var(--h) * 1.3px - 2px); min-height: 3px; border-radius: 4px; background: var(--v-ok); }
.v-st-stack > i.s-late { background: var(--v-late); }
.v-st-stack > i.s-absent_with_permission { background: var(--v-exc); }
.v-st-stack > i.s-absent_without_permission { background: var(--v-bad); }
.v-st-stack > i.s-pending { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--blue); background-image: none; }
.v-st-d { margin-top: 4px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--v-t3); }
.v-st-m { height: 16px; font-size: 11px; line-height: 16px; color: var(--v-t3); white-space: nowrap; }
.v-st-col.is-today .v-st-d { color: var(--blue); font-weight: 600; }
/* the live map card */
.v-map-box { overflow: hidden; border-radius: 12px; border: 1px solid var(--v-line); background: #F1F4F8; }
.v-map-canvas { height: 240px; z-index: 0; }
.v-map-fail { padding: 18px; font-size: 13px; color: var(--v-t2); }
.v-map-who { margin-inline-start: auto; color: var(--v-t2); }
.v-site { display: block; width: 14px; height: 14px; border-radius: 3px; background: var(--navy); box-shadow: 0 0 0 4px rgba(10, 19, 38, 0.12); }
.v-pin { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid #FFFFFF; background: var(--v-ok); color: #FFFFFF; font-size: 10px; font-weight: 600; box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.22); }
.v-pin-stale { background: var(--v-late); box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.22); }
.v-pin-offline { background: var(--v-exc); box-shadow: none; }
/* payroll */
.v-post { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 16px; }
.v-post > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.v-post > div:first-child b { font-size: 20px; line-height: 26px; font-weight: 600; }
.v-post > div:first-child span { font-size: 13px; color: var(--v-t2); }
.v-post-bar { flex: 1 1 180px; display: flex; gap: 3px; height: 12px; min-width: 120px; }
.v-post-bar > i { flex: 1; border-radius: 2px; background: var(--blue); }
.v-post-bar > i.e { background: repeating-linear-gradient(135deg, #FDB022 0 3px, #FFFAEB 3px 6px); }
.v-post-bar > i.u { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--v-exc); }
.v-post-bar > i:first-child { border-start-start-radius: 6px; border-end-start-radius: 6px; }
.v-post-bar > i:last-child { border-start-end-radius: 6px; border-end-end-radius: 6px; }
.v-flag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--v-bad-t); }
.v-flag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--v-bad); }
/* who is in */
.v-who { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid #F2F4F7; }
.v-donut { position: relative; width: 64px; height: 64px; flex: 0 0 64px; }
.v-donut svg { display: block; width: 64px; height: 64px; }
html[dir="rtl"] .v-donut svg { transform: scaleX(-1); }
.v-donut .bg { fill: none; stroke: #F2F4F7; stroke-width: 8; }
.v-donut .fg { fill: none; stroke: var(--v-ok); stroke-width: 8; }
.v-donut > b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.v-who-n { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; line-height: 16px; color: var(--v-t2); }
.v-who-n b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; color: var(--ink); }
.v-who-n b.ok { color: var(--v-ok-t); }
.v-who-n b.late { color: var(--v-late-t); }
.v-person, .v-absent { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-height: 52px; padding: 9px 0; }
.v-time { font-size: 14px; font-weight: 600; color: var(--ink); }
.v-time.is-late { color: var(--v-late-t); }
.v-absent { margin-inline: -10px; padding-inline: 10px; border-radius: 12px; background: var(--v-late-w); border-bottom: 0; }
.v-absent + .v-absent { margin-top: 6px; }
.v-absent .row-sub { color: var(--v-late-t); }
.v-ov .sub-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0 8px; font-size: 13px; font-weight: 600; color: var(--v-t2); }
/* decisions by type */
.v-bars { display: grid; gap: 12px; }
.v-bar { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; line-height: 20px; color: var(--ink); }
.v-bar-t { display: block; height: 10px; border-radius: 5px; background: #F2F4F7; overflow: hidden; }
.v-bar-t > i { display: block; width: var(--w); height: 10px; border-radius: 5px; background: var(--blue); }
.v-bar > b { min-width: 24px; font-weight: 600; text-align: end; }
.v-bar[data-unavailable] > b { font-size: 12px; font-weight: 500; color: var(--v-t3); }
.v-bar:hover > span:first-child { color: var(--blue); }
/* open tasks by holder */
.v-split { display: flex; gap: 3px; height: 12px; }
.v-split > i { min-width: 6px; border-radius: 2px; }
.v-split > i:first-child { border-start-start-radius: 6px; border-end-start-radius: 6px; }
.v-split > i:last-child { border-start-end-radius: 6px; border-end-end-radius: 6px; }
.h-admin { background: var(--navy); }
.h-engineer { background: var(--blue); }
.h-warehouse { background: #9DB8FF; }
.v-split-k { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.v-split-k a { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; line-height: 16px; color: var(--v-t2); }
.v-split-k span { display: inline-flex; align-items: center; gap: 6px; }
.v-split-k i { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 3px; }
.v-split-k b { font-size: 20px; line-height: 26px; font-weight: 600; color: var(--ink); }
.v-overdue { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--v-bad-w); color: var(--ink); }
.v-overdue b { font-size: 20px; line-height: 26px; font-weight: 600; color: var(--v-bad-t); }
.v-overdue span { flex: 1; font-size: 13px; line-height: 18px; }
.v-overdue em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--blue); }
.v-ok-line { margin-top: 14px; }
.v-narrow-act { margin-top: 14px; }

/* ---------- tablet and desktop ---------- */
@media (min-width: 700px) {
  .v-hero { margin: 16px var(--gutter) 0; border-radius: 24px; padding-bottom: 92px; }
  .v-hero .top, .v-hero .top.no-lead { padding: 24px 28px 0; }
  .v-hero-row { padding: 14px 28px 0; }
  .v-hero .top h1 { font-size: 28px; line-height: 34px; }
  .content.v-today, .content.v-ov { padding-inline: calc(var(--gutter) + 16px); }
  .v-shift { margin-top: -72px; max-width: 760px; }
  .v-ov-tiles { padding: 20px 28px 0; }
  .content.v-ov { margin-top: -60px; padding-inline: calc(var(--gutter) + 20px); }
  .v-qa { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v-card { border-radius: 16px; padding: 20px 22px; }
  .v-map-canvas { height: 260px; }
}
@media (min-width: 1100px) {
  .v-clock b { font-size: 48px; line-height: 52px; }
  .v-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "work month" "work quick"; gap: 0 24px; align-items: start; }
  .v-col-work { grid-area: work; }
  .v-col-month { grid-area: month; }
  .v-col-quick { grid-area: quick; }
  .v-grid .v-sec:first-child { margin-top: 22px; }
  .v-qa { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .v-ov-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
  .v-ov-side { min-width: 0; }
  .v-ov-main > * + *, .v-ov-side > * + * { margin-top: 20px; }
  .v-card .row-title { font-size: 14px; line-height: 20px; }
}
@media (min-width: 700px) and (max-width: 1099.98px) {
  .v-ov-side { margin-top: 14px; }
}
@media (min-width: 1500px) { .v-hero { max-width: 1340px; } .content.v-today, .content.v-ov { max-width: 1392px; } }
@media print { .v-hero { background: none; color: var(--ink); } }

/* ==========================================================================
   Vivid direction, stage V2 (the owner's "approved, start building stage 2"):
   the employee's own pages. They keep every Signature component, form and
   script; on a page that sets $SIG_VIVID the components are drawn as white
   cards on the grey ground with the style sheet's status colours. Today and the
   Overview (.v-today, .v-ov) stay exactly as stage V1 drew them.
   ========================================================================== */
.app.is-vivid .page > .top { padding-bottom: 12px; }
.app.is-vivid .page > .top h1 { font-size: 24px; line-height: 30px; letter-spacing: -0.01em; }
.app.is-vivid .page > .top .back { font-size: 15px; font-weight: 600; color: var(--blue); }
.app.is-vivid .page > .top .top-actions { gap: 8px; margin-inline-end: 0; }
.app.is-vivid .page > .top .iconbtn { width: 40px; height: 40px; border-radius: 12px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page > .top .iconbtn .pip { top: -5px; inset-inline-end: -5px; width: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--v-bad); color: #FFFFFF; box-shadow: none; overflow: visible; font-size: 11px; font-weight: 600; line-height: 20px; text-align: center; font-style: normal; }
.app.is-vivid .page > .top .avatar { width: 40px; height: 40px; flex-basis: 40px; background: var(--blue); color: #FFFFFF; font-size: 14px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) { padding-inline: 16px; }

/* cards: every section, score and lead block */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .score,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) > .focus,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) > .empty,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) > div > .empty,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .hub > .person { margin-top: 14px; padding: 18px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) > .focus::before { display: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec-head { align-items: center; padding-bottom: 10px; border-bottom: 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec-head h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec-head .n { padding: 3px 10px; border-radius: 999px; background: #F2F4F7; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--v-t2); white-space: nowrap; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec-head .more { font-size: 13px; font-weight: 600; color: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec-foot { color: var(--v-t3); font-size: 12px; line-height: 17px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec > :last-child.row,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec > :last-child.kpi,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec > :last-child.disc,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec > form:last-child > .row { border-bottom: 0; padding-bottom: 2px; }

/* rows: hairlines, tinted icon squares, the status mark as a short accent bar */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row { align-items: center; border-bottom-color: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row-title { font-size: 15px; line-height: 21px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row-sub { font-size: 13px; line-height: 19px; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row-sub.is-due { color: var(--v-bad-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row-over { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--v-t3); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row > .ic { width: 36px; height: 36px; padding: 8px; box-sizing: border-box; border-radius: 11px; background: var(--blue-wash); color: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row.is-danger > .ic { background: var(--v-bad-w); color: #D92D20; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row.is-danger .row-title { color: var(--v-bad-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row > .mk { width: 4px; flex-basis: 4px; height: auto; min-height: 36px; align-self: stretch; margin-top: 0; border-radius: 2px; background: var(--v-exc); box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row > .mk.ok, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .row > .mk.done { background: var(--v-ok); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row > .mk.wait, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .row > .mk.late { background: var(--v-late); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row > .mk.due { background: var(--v-bad); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row > .mk.now { background: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row-trail { font-size: 14px; font-weight: 600; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row-trail .ic { color: #98A2B3; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row.is-selected { margin-inline: -10px; padding-inline: 10px; border-radius: 12px; background: #F5F8FF; }

/* statuses and how final a value is: labels, fully round */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .st { gap: 6px; padding: 4px 10px; border-radius: 999px; background: #F2F4F7; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .st > .mk { width: 6px; height: 6px; flex-basis: 6px; border-radius: 50%; background: currentColor; box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .st.ok, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .st.done { background: var(--v-ok-w); color: var(--v-ok-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .st.wait, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .st.late { background: var(--v-late-w); color: var(--v-late-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .st.due { background: var(--v-bad-w); color: var(--v-bad-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .st.now { background: var(--blue-wash); color: var(--blue-press); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt { gap: 6px; padding: 4px 10px; border-radius: 999px; background: #F2F4F7; font-weight: 600; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt::before { width: 14px; height: 6px; flex-basis: 14px; border-radius: 3px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt.final { background: var(--v-ok-w); color: var(--v-ok-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt.final::before { background: var(--v-ok); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt.est { background: var(--v-late-w); color: var(--v-late-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt.est::before { background: repeating-linear-gradient(135deg, #FDB022 0 2px, #FFFAEB 2px 4px); box-shadow: inset 0 0 0 1px #FDB022; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt.prov { background: #F4F1FF; color: var(--v-indigo); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt.prov::before { background: transparent; box-shadow: none; border: 1.5px dashed #9B8AFB; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .vt.pending::before { background: transparent; border: 1.5px solid var(--v-line-2); }

/* figures as tinted tiles */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .figs { gap: 8px; padding: 2px 0 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .fig { padding: 10px 12px; border: 0; border-radius: 14px; background: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .fig b { font-size: 20px; line-height: 26px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .fig span { font-size: 12px; line-height: 16px; color: #344054; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .fig b.is-due { color: var(--v-bad-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .fig:has(> b.is-due) { background: var(--v-bad-w); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .figs.four .fig { padding: 10px 9px; }

/* facts and ledgers */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .kv dt, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .kv dd,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tally dt, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .tally dd { border-bottom-color: #F2F4F7; font-size: 14px; line-height: 21px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .kv dt { color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .kv dd { font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .kv > :nth-last-child(-n+2), .app.is-vivid .page .content:not(.v-today):not(.v-ov) .tally > :nth-last-child(-n+2) { border-bottom: 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tally .is-total { border-bottom-color: #F2F4F7; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tally dt.is-total { color: var(--ink); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tally .is-due, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .is-due { color: var(--v-bad-t); }

/* the month as day tiles, coloured by what happened */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .days { gap: 6px; padding-top: 12px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .days.month { row-gap: 6px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .days.month .day.dow { margin-bottom: 0; font-size: 11px; color: var(--v-t3); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day:not(.dow):not(.blank) { display: flex; flex-direction: column; align-items: center; padding: 6px 0 7px; border-radius: 12px; background: #F7F8FA; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day b { font-size: 15px; line-height: 22px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day i { width: 16px; height: 4px; margin-top: 3px; border-radius: 2px; background: transparent; box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.ok { background: var(--v-ok-w); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.ok b { color: var(--v-ok-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.ok i { background: var(--v-ok); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.late { background: var(--v-late-w); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.late b { color: var(--v-late-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.late i { background: var(--v-late); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.absent { background: var(--v-bad-w); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.absent b { color: var(--v-bad-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.absent i { background: var(--v-bad); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.permit { background: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.permit i { background: var(--v-exc); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.wait i { box-shadow: inset 0 0 0 1.5px var(--v-late); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.today { background: #FFFFFF; box-shadow: inset 0 0 0 2px var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.today b { color: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.today.in i, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.act i { background: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.off, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.next { background: transparent; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.off b { color: #98A2B3; font-weight: 500; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.next b { color: #667085; font-weight: 500; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) a.day:hover { box-shadow: inset 0 0 0 1.5px var(--v-line-2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend { gap: 6px 14px; font-size: 12px; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--v-ok); box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i.late { background: var(--v-late); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i.absent { background: var(--v-bad); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i.permit { background: var(--v-exc); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i.none { background: #F7F8FA; box-shadow: inset 0 0 0 1px var(--v-line-2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i.today { background: #FFFFFF; box-shadow: inset 0 0 0 2px var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i.act { background: var(--blue); }

/* KPI lines and meters: rounded bars; solid approved, striped estimate, dashed provisional, empty frame pending */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .kpi { border-bottom-color: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .kpi-name { font-size: 15px; line-height: 21px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .kpi-sub { font-size: 13px; line-height: 19px; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) a.kpi.is-current { margin-inline: -10px; padding-inline: 10px; border-radius: 12px; background: #F5F3FF; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .meter { height: 8px; border-radius: 4px; background: #F2F4F7; overflow: hidden; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .meter i { border-radius: 4px; background: var(--v-indigo); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .meter.est i { background: repeating-linear-gradient(135deg, #FDB022 0 3px, #FEF0C7 3px 6px); box-shadow: inset 0 0 0 1px #FDB022; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .meter.prov i { background: #F4F1FF; box-shadow: inset 0 0 0 1.5px #9B8AFB; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .meter.pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--v-line-2); }

/* the score: a white card with the figure large; on Performance and My standing it is the KPI card */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .score .focus-label { font-size: 14px; font-weight: 600; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .score-n { font-size: 36px; line-height: 44px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .score .focus-meta { font-size: 14px; line-height: 21px; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .score .meter { height: 10px; border-radius: 5px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score, .app.is-vivid .page .content:not(.v-today):not(.v-ov) #standing-rank { background: linear-gradient(140deg, #3A2BB8 0%, #2A1F86 100%); color: #FFFFFF; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score .focus-label, .app.is-vivid .page .content:not(.v-today):not(.v-ov) #standing-rank .focus-label,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score .focus-meta, .app.is-vivid .page .content:not(.v-today):not(.v-ov) #standing-rank .focus-meta,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score .score-n small, .app.is-vivid .page .content:not(.v-today):not(.v-ov) #standing-rank .score-n small { color: rgba(255, 255, 255, 0.86); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score b, .app.is-vivid .page .content:not(.v-today):not(.v-ov) #standing-rank b { color: #FFFFFF; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score .meter { background: rgba(255, 255, 255, 0.2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score .meter i { background: #FFFFFF; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score .meter.est i { background: repeating-linear-gradient(135deg, #FFFFFF 0 3px, rgba(255, 255, 255, 0.35) 3px 6px); box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #perf-score .st { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #payslips-net .score-n { color: var(--ink); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #payslips-net.is-estimate { box-shadow: var(--v-shadow), inset 0 0 0 2px #FEDF89; }

/* notes, empty states, quotes */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .note { border-radius: 14px; background: var(--v-late-w); box-shadow: inset 0 0 0 1px #FEDF89; font-size: 13px; line-height: 19px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .note > .ic { color: var(--v-late); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .note.red { background: var(--v-bad-w); box-shadow: inset 0 0 0 1px #FECDCA; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .note.red > .ic { color: var(--v-bad); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .note.green { background: var(--v-ok-w); box-shadow: inset 0 0 0 1px #ABEFC6; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .note.green > .ic { color: var(--v-ok); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .note.plain { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--v-line); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .note.plain > .ic { color: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) > .note { margin: 14px 0 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec .note { margin-top: 10px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .empty .ic { width: 40px; height: 40px; padding: 9px; box-sizing: border-box; border-radius: 12px; background: var(--blue-wash); color: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .quote { border-radius: 12px; background: #F7F8FA; }

/* tables in a card */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .table th { font-size: 12px; font-weight: 600; color: var(--v-t3); border-bottom-color: var(--v-line); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .table td { border-bottom-color: #F2F4F7; vertical-align: middle; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .table tr:last-child td { border-bottom: 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .table .t1 { font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .table .t2 { margin-top: 3px; }

/* the month bar and filters */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .toolbar2 { gap: 10px; padding: 8px 10px; border-radius: 16px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .month-nav .iconbtn { width: 36px; height: 36px; border-radius: 10px; background: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .month-nav > span { padding-inline: 8px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .month-pick .input { height: 40px; border-radius: 12px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg { gap: 8px; padding: 0 0 4px; background: transparent; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg button, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg a { height: 34px; border-radius: 999px; background: #F2F4F7; font-size: 13px; font-weight: 600; color: #344054; box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg button b, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg a b { font-weight: 600; color: var(--v-t3); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg button.is-current, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg a.is-current { background: var(--blue); color: #FFFFFF; box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg button.is-current b, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg a.is-current b { color: rgba(255, 255, 255, 0.86); }

/* request forms and discussions */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .disc { border-bottom-color: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .disc > summary .row-title { font-size: 15px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .disc[open] { margin-inline: -10px; padding-inline: 10px; border-radius: 14px; background: #F7F8FA; border-bottom-color: transparent; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .disc[open] .input { background: #FFFFFF; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .sub-head { border-top-color: var(--v-line); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .req { border-bottom-color: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .req:last-child { border-bottom: 0; }

/* buttons and fields: the three styles of the style sheet */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .btn { border-radius: 14px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .btn-quiet { background: var(--blue-wash); color: var(--blue-press); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .btn-quiet:hover { background: #E0E9FF; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .btn-secondary { border-color: var(--v-line-2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .input { border-color: var(--v-line-2); border-radius: 12px; }

/* Me: the person as a card of their own */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .hub { max-width: 680px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .hub > .person { gap: 14px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .hub > .person .avatar { background: var(--blue); color: #FFFFFF; }

/* Attendance: each figure in its status colour */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #att-summary .fig:nth-child(1) { background: var(--blue-wash); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #att-summary .fig:nth-child(1) b { color: var(--blue-press); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #att-summary .fig:nth-child(2) { background: var(--v-ok-w); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #att-summary .fig:nth-child(2) b { color: var(--v-ok-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #att-summary .fig:nth-child(3) { background: var(--v-late-w); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #att-summary .fig:nth-child(3) b { color: var(--v-late-t); }

/* a request type opens its form: an icon square, then the words */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #new-request .disc > summary, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-order > summary { display: flex; align-items: center; gap: 12px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #new-request .disc > summary .disc-main, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-order > summary .disc-main { flex: 1 1 auto; min-width: 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .disc-ic { width: 36px; height: 36px; flex: 0 0 36px; padding: 8px; box-sizing: border-box; border-radius: 11px; background: var(--blue-wash); color: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #new-allowance .disc-ic, .app.is-vivid .page .content:not(.v-today):not(.v-ov) #new-loan .disc-ic,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row.v-money > .ic { background: var(--v-ok-w); color: var(--v-ok-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .row.is-selected { box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .quote { padding: 10px 12px; border-inline-start: 0; font-size: 14px; line-height: 21px; }

/* the password form and the weights bar of How rewards work */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #password-form { margin-top: 14px; padding: 18px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #guide-points .stack { gap: 3px; background: transparent; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #guide-points .stack i { border-radius: 4px; background: var(--v-indigo); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #guide-points .stack i.b { background: #9B8AFB; }

/* a status in a table cell may wrap, so the table keeps to the card on the narrowest phones */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .table .st { white-space: normal; border-radius: 10px; }
@media (max-width: 399.98px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table th, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table td { padding-inline: 6px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table th:first-child, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table td:first-child { padding-inline-start: 0; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table th:last-child, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table td:last-child { padding-inline-end: 0; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table { font-size: 13px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table .st { padding: 3px 8px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .table .st > .mk { display: none; }
}
@media (max-width: 359.98px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) { padding-inline: 12px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .score { padding: 16px 14px; }
}

@media (min-width: 700px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) { padding-inline: 32px; }
  .app.is-vivid .page > .top { padding-inline: 32px; }
  .app.is-vivid .page > .top h1 { font-size: 28px; line-height: 34px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .cols { gap: 0 20px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec,
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .score,
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) > .focus,
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .hub > .person { padding: 20px 22px; border-radius: 16px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .cols > .col > :first-child { margin-top: 14px; }
}
@media (min-width: 1100px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .cols.wide { gap: 0 20px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .row-title { font-size: 14px; line-height: 20px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .cols > .col > .sec { margin-top: 20px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .cols > .col > :first-child { margin-top: 14px; }
}
@media (min-width: 1500px) { .app.is-vivid .page .content:not(.v-today):not(.v-ov), .app.is-vivid .page > .top { max-width: 1392px; } }
@media print { .app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec { box-shadow: none; } }

/* ==========================================================================
   Vivid direction, stage V3 (the owner's "Approved, start stage 3"): the field
   work. My tasks, the task page, the report form, the resident's daily reports
   and the warehouse page keep their components, forms and scripts; on a page
   that sets $SIG_VIVID they are drawn as cards on the grey ground.
   ========================================================================== */
/* the task page top: reference, facts and the actions beside the title */
.app.is-vivid .page > .top .top-ref { font-size: 13px; font-weight: 600; color: var(--v-t3); }
.app.is-vivid .page > .top .btn { border-radius: 14px; }

/* the lifecycle stages: a card of rounded segments, green for done, blue for now, red when held */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) > .progress { margin-top: 14px; padding: 16px 18px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .stages { gap: 4px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .stages i { height: 8px; border-radius: 4px; background: var(--v-line); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .stages i.done { background: var(--v-ok); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .stages i.now { background: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .stages i.held { background: var(--v-bad); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .stage-cap { font-size: 13px; line-height: 19px; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .stage-names .done { color: var(--v-ok-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .stage-names .now { color: var(--blue-press); }

/* the one thing to do now stands out */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #task-next[data-mine="1"] { box-shadow: var(--v-shadow), inset 0 0 0 2px var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #task-next[data-mine="1"] .sec-head h2 { color: var(--blue-press); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) #task-next .prose { padding-top: 2px; font-size: 15px; line-height: 22px; }

/* My tasks: one card, each task a row with its status as an accent bar and its next step as a label */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-search .input { background: #FFFFFF; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tklist { margin-top: 12px; padding: 4px 18px; border-top: 0; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk { align-items: center; border-bottom-color: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tklist > .tk:last-child { border-bottom: 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk > .mk { width: 4px; height: auto; min-height: 44px; flex-basis: 4px; align-self: stretch; margin-top: 0; border-radius: 2px; background: var(--v-exc); box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk > .mk.due { background: var(--v-bad); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk > .mk.now { background: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk > .mk.wait, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk > .mk.late { background: var(--v-late); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk > .mk.ok, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk > .mk.done { background: var(--v-ok); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk .row-ref { font-size: 12px; font-weight: 600; color: var(--v-t3); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk .row-title { font-size: 15px; line-height: 21px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-site, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-when, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-state { font-size: 13px; line-height: 19px; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-state { color: var(--ink); font-weight: 500; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-when small.is-due { color: var(--v-bad-t); font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-next { font-size: 13px; font-weight: 600; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-next.act { padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--blue-wash); color: var(--blue-press); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-next.act .ic { color: var(--blue-press); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-found { font-size: 13px; }

/* checklists, timelines, choices */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .ticks li { border-bottom-color: #F2F4F7; font-size: 15px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .ticks li::before { border-radius: 5px; box-shadow: inset 0 0 0 1.5px #98A2B3; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .ticks li:last-child { border-bottom: 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .steps { position: relative; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step { border-bottom: 0; padding-block: 8px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step > .mk { width: 12px; height: 12px; flex-basis: 12px; margin-top: 5px; border-radius: 50%; background: #FFFFFF; box-shadow: inset 0 0 0 2px #98A2B3; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step > .mk.done, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .step > .mk.ok { background: var(--v-ok); box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step > .mk.now { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-wash); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step > .mk.wait, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .step > .mk.late { background: #FFFFFF; box-shadow: inset 0 0 0 3px var(--v-late); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step > .mk.due { background: var(--v-bad); box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step-sub { font-size: 12px; line-height: 17px; color: var(--v-t3); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step.is-now .step-sub { color: var(--blue-press); font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step.is-wait .step-sub { color: var(--v-late-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .step.is-held .step-sub, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .step.is-off .step-title { color: var(--v-bad-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .choice { border-bottom-color: #F2F4F7; font-size: 15px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .tick input, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .choice input { accent-color: var(--blue); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .group-label { border-bottom-color: var(--v-line); font-size: 12px; color: var(--v-t3); }

/* photos and the report form */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .shot > a, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .shot > .shot-img { border-radius: 12px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .shot-x { border-radius: 10px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .picks .btn-sm { border-radius: 999px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .qty-row { border-bottom-color: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .qty-row .input, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .qty .input { border-radius: 12px; }

/* the action bar of a detail screen */
.app.is-vivid .actionbar { border-top: 0; box-shadow: 0 -6px 20px rgba(16, 24, 40, 0.08); }
.app.is-vivid .actionbar .btn { border-radius: 14px; }

/* the warehouse: tinted figures, the list as a card, the chosen order as a card beside it */
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs .fig:nth-child(1) { background: var(--blue-wash); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs .fig:nth-child(1) b { color: var(--blue-press); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs .fig:nth-child(2) { background: var(--v-late-w); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs .fig:nth-child(2) b { color: var(--v-late-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-list { margin-top: 14px; padding: 4px 18px 10px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-list > .group-label:first-child { padding-top: 12px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-order { border-bottom-color: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-order .row-ref { font-size: 12px; font-weight: 600; color: var(--v-t3); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-order .row-title { font-size: 15px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-holder .st { padding: 0; background: transparent; font-size: 13px; font-weight: 600; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-holder .st > .mk { margin-top: 6px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-pr > span { border-bottom-color: #F2F4F7; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-note { border-top-color: var(--v-line); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-sub { border-bottom-color: var(--v-line); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-clear { border-bottom: 0; }
@media (max-width: 1099.98px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-parts { border-top-color: var(--v-line); }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-pr { border-bottom-color: #F2F4F7; }
}
@media (min-width: 1100px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-split { gap: 20px; margin-inline: 0; border-top: 0; min-height: 0; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-list { border-inline-end: 0; padding-bottom: 14px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-list .group-label, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-order > summary, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-clear { padding-inline: 0; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-order.is-selected > summary { margin-inline: -10px; padding-inline: 10px; border-radius: 12px; background: #F5F8FF; box-shadow: none; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-pane { margin-top: 14px; top: 14px; max-height: calc(100dvh - 28px); padding: 22px 24px; border-radius: 16px; background: #FFFFFF; box-shadow: var(--v-shadow); }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk-head { border-bottom-color: var(--v-line); font-size: 12px; font-weight: 600; color: var(--v-t3); }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .tk > .mk { margin-top: 0; }
}
@media (max-width: 699.98px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) > .seg { margin-inline: -16px; padding-inline: 16px; }
}
@media (max-width: 359.98px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) > .seg { margin-inline: -12px; padding-inline: 12px; }
}
/* a strip inside a card (Request history, Admin KPI figures): on a phone it reaches the card's edges, with the card's own
   padding inside it, so the first chip lines up with the card's title and rows (the owner, 20 November 2026) */
@media (max-width: 699.98px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec > .seg { margin-inline: -18px; padding-inline: 18px; }
}
@media (max-width: 359.98px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .sec > .seg { margin-inline: -14px; padding-inline: 14px; }
}
/* the daily reports' month: awaiting review amber, changes requested blue */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i.wait { background: var(--v-late); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.wait { background: var(--v-late-w); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.wait b { color: var(--v-late-t); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.wait i { background: var(--v-late); box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.act { background: var(--blue-wash); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .day.act b { color: var(--blue-press); }
/* the warehouse figures as white tiles on the grey ground */
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs { max-width: 600px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs .fig { background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs .fig:nth-child(1) { background: var(--blue-wash); box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs .fig:nth-child(2) { background: var(--v-late-w); box-shadow: none; }
@media (min-width: 1100px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .wh-order[open] { margin-inline: 0; padding-inline: 0; border-radius: 0; background: transparent; border-bottom-color: #F2F4F7; }
}
.app.is-vivid .page .content:not(.v-today):not(.v-ov).wh .wh-figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ==========================================================================
   Vivid direction, stage V4 (the owner's "Approved, start stage 4"): the Admin's
   pages after the Overview. They keep their components, forms and scripts; on a
   page that sets $SIG_VIVID the blocks that stood on the page are cards too.
   ========================================================================== */
.app.is-vivid .page .content:not(.v-today):not(.v-ov) > .aq { margin-top: 14px; padding: 4px 18px 12px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .aq .group-label { border-bottom-color: var(--v-line); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .aq .aq-kind:last-child .row:last-child { border-bottom: 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .toolbar2:has(> .seg:only-child) { padding: 0; background: transparent; box-shadow: none; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .toolbar2 > .seg { margin-inline: 0; padding-inline: 0; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) > .adm-loan-top { margin-top: 14px; padding: 16px 18px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .adm-map-canvas { border: 0; border-radius: 16px; overflow: hidden; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .adm-map-wrap { margin-top: 14px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .adm-map-side .sec { padding-top: 18px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .adm-pay-intro, .app.is-vivid .page .content:not(.v-today):not(.v-ov) > p.lead { margin-top: 12px; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .pager { margin-top: 12px; }
@media (min-width: 700px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) > .aq { padding: 6px 22px 14px; border-radius: 16px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) > .adm-loan-top { border-radius: 16px; }
}

/* ==========================================================================
   Vivid direction, stage V5 (the owner's "Approved, start stage 5"): the payslip
   pages and the sign-in page. Both stand outside the application shell, so the
   look is given to their own classes, and on screen only. The payslip sheet is
   the printed document: it keeps every rule it had, and nothing here reaches
   print. The sign-in page keeps its markup; its form keeps the field borders of
   ruling 9A and the install guide stays in the page's flow.
   ========================================================================== */
@media screen {
  /* ---- the payslip pages: the employee's payslip, the Admin's payslip, the bulk print ---- */
  .pay-doc { background: var(--v-page); }
  .pay-doc .btn { border-radius: 14px; }
  .pay-doc .btn-secondary { border-color: var(--v-line-2); }
  .pay-doc .input { border-color: var(--v-line-2); border-radius: 12px; }

  /* the Admin's panels, the record of the payslip and the adjustment lines are cards on the grey ground */
  .pay-doc-admin, .pay-doc-status, .pay-doc-edit.sec { padding: 8px 22px 14px; border-radius: 16px; background: #FFFFFF; box-shadow: var(--v-shadow); }
  .pay-doc-ctlhead { padding-top: 8px; font-size: 16px; line-height: 22px; border-bottom-color: var(--v-line); }
  .pay-doc-ctlstate, .pay-doc-form { border-bottom-color: var(--v-line); }
  .pay-doc-admin > :last-child { border-bottom: 0; }
  .pay-doc-status .sec-head, .pay-doc-edit .sec-head { align-items: center; padding-top: 8px; border-bottom-color: var(--v-line); }
  .pay-doc-status .sec-head h2, .pay-doc-edit .sec-head h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
  .pay-doc-sub { border-bottom-color: var(--v-line); }
  .pay-doc-edit .table th { border-bottom-color: var(--v-line); }
  .pay-doc-edit .table td { border-bottom-color: #F2F4F7; }

  /* status words outside the sheet become round labels, as on the vivid pages */
  .pay-doc .no-print .st { gap: 6px; padding: 4px 10px; border-radius: 999px; background: #F2F4F7; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--v-t2); }
  .pay-doc .no-print .st > .mk { width: 6px; height: 6px; flex-basis: 6px; border-radius: 50%; background: currentColor; box-shadow: none; }
  .pay-doc .no-print .st.ok, .pay-doc .no-print .st.done { background: var(--v-ok-w); color: var(--v-ok-t); }
  .pay-doc .no-print .st.wait, .pay-doc .no-print .st.late { background: var(--v-late-w); color: var(--v-late-t); }
  .pay-doc .no-print .st.due { background: var(--v-bad-w); color: var(--v-bad-t); }
  .pay-doc .no-print .st.now { background: var(--blue-wash); color: var(--blue-press); }
  .pay-doc .no-print .vt { gap: 6px; padding: 4px 10px; border-radius: 999px; background: #F2F4F7; font-weight: 600; color: var(--v-t2); }
  .pay-doc .no-print .vt::before { width: 14px; height: 6px; flex-basis: 14px; border-radius: 3px; }
  .pay-doc .no-print .vt.final { background: var(--v-ok-w); color: var(--v-ok-t); }
  .pay-doc .no-print .vt.final::before { background: var(--v-ok); }
  .pay-doc .no-print .vt.est { background: var(--v-late-w); color: var(--v-late-t); }
  .pay-doc .no-print .vt.est::before { background: repeating-linear-gradient(135deg, #FDB022 0 2px, #FFFAEB 2px 4px); box-shadow: inset 0 0 0 1px #FDB022; }
  .pay-doc .no-print .vt.prov { background: #F4F1FF; color: var(--v-indigo); }
  .pay-doc .no-print .vt.prov::before { background: transparent; box-shadow: none; border: 1.5px dashed #9B8AFB; }
  .pay-doc .no-print .vt.pending::before { background: transparent; border: 1.5px solid var(--v-line-2); }
  .pay-doc .no-print .note { border-radius: 14px; background: var(--v-late-w); box-shadow: inset 0 0 0 1px #FEDF89; }
  .pay-doc .no-print .note > .ic { color: var(--v-late); }
  .pay-doc .no-print .note.red { background: var(--v-bad-w); box-shadow: inset 0 0 0 1px #FECDCA; }
  .pay-doc .no-print .note.red > .ic { color: var(--v-bad); }
  .pay-doc .no-print .note.green { background: var(--v-ok-w); box-shadow: inset 0 0 0 1px #ABEFC6; }
  .pay-doc .no-print .note.green > .ic { color: var(--v-ok); }
  .pay-doc .no-print .note.plain { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--v-line); }
  .pay-doc .no-print .note.plain > .ic { color: var(--blue); }

  /* the sheet itself: the same document, framed as a sheet of paper on the grey ground */
  .pay-doc .sheet { border: 0; border-radius: 16px; box-shadow: var(--v-shadow); }

  /* ---- the sign-in page: the hero of the vivid direction above a white card ---- */
  .signin-body { background: var(--v-page); }
  .signin-main { position: relative; }
  .signin-main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 216px; border-radius: 0 0 32px 32px; background: var(--v-hero); }
  .signin-main > * { position: relative; }
  .signin-logo { filter: brightness(0) invert(1); }          /* the all-white mark on the hero */
  .signin-body .signin-lang { color: #FFFFFF; }
  .signin-body .signin-lang:hover { color: #FFFFFF; }
  .signin-body .signin-lang:focus-visible { outline-color: #FFFFFF; }
  .signin-box { max-width: 440px; margin-top: 24px; padding: 24px 20px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
  .signin-box h1 { font-size: 26px; line-height: 32px; }
  .signin-main .pwa-banner, .signin-foot { max-width: 440px; }
  .signin-box .input { border-radius: 12px; }
  .signin-box .btn { border-radius: 14px; }
  .signin-box .note { border-radius: 14px; }
  .signin-box .note.red { background: var(--v-bad-w); box-shadow: inset 0 0 0 1px #FECDCA; }
}
@media screen and (min-width: 700px) {
  .pay-doc-admin, .pay-doc-status, .pay-doc-edit.sec { padding: 10px 26px 16px; }
  .signin-main::before { height: 300px; inset-inline: 16px; inset-block-start: 12px; border-radius: 28px; }
  .signin-box { margin-top: 64px; padding: 32px; }
  .signin-box h1 { font-size: 28px; line-height: 34px; }
}
@media screen and (min-width: 1100px) {
  /* the panel beside the form carries the hero and the white mark; the form's column is the grey ground */
  .signin-brand { background: var(--v-hero); }
  .signin-brand img { filter: brightness(0) invert(1); }
  .signin-main::before { content: none; }
  .signin-body .signin-lang, .signin-body .signin-lang:hover { color: var(--blue); }
  .signin-body .signin-lang:focus-visible { outline-color: var(--blue); }
  .signin-box { margin-top: 96px; }
  .signin-box h1 { font-size: 24px; line-height: 30px; }
}
@media screen and (max-width: 699.98px) {
  /* on a phone the cards keep a small gutter, as on the vivid pages */
  .pay-doc-admin, .pay-doc-edit.sec, .pay-doc > .sheet { margin-inline: 12px; border-radius: 20px; }
  .pay-doc-admin, .pay-doc-edit.sec { padding: 6px 16px 14px; }
  .pay-doc-pre { padding-inline: 12px; }
  .pay-doc-status { padding: 6px 16px 14px; border-radius: 20px; }
  .pay-doc > .sheet { padding: 22px 16px 24px; }
}

/* The sign-in title in the vivid direction (the owner: "EIS FieldOps font in sign in page is not good, try to change
   the font to a better one"). Plus Jakarta Sans, self-hosted like IBM Plex (SIL Open Font License,
   static/fonts/OFL-PlusJakartaSans.txt), Latin only: it sets the title and the panel line of the sign-in page and,
   from stage V6, the title and the product name of the privacy page (the other public page, opened from sign-in), and
   nothing else. Arabic words keep IBM Plex Sans Arabic; the payslip and every other page keep IBM Plex. */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@media screen {
  .signin-box h1, .signin-brand p, .public h1, .public-sub { font-family: "Plus Jakarta Sans", "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; }
  .signin-box h1 { font-weight: 700; letter-spacing: -0.02em; }
  .signin-brand p { font-weight: 600; letter-spacing: -0.01em; }
  html[lang="ar"] .signin-box h1, html[lang="ar"] .signin-brand p { font-weight: 600; letter-spacing: 0; }   /* Arabic: no letter-spacing; the Arabic words keep IBM Plex Sans Arabic 600 */
}

/* ================================================================================================================
   Vivid direction, stage V6 (the owner: "Approved, start stage 6"): the public privacy page, the last page of the
   application outside the vivid look that is not a loan-ledger page. As on sign-in, through the page's own classes
   only: privacy.php, its markup and every sentence of the policy are unchanged (the stage 9 text identity), and every
   rule is for the screen, so printing is unchanged. The page opens from sign-in, so it carries the same hero: the white
   mark, the way back and the language link on the gradient, the title above the policy, and the policy as one white
   card on the grey ground.
   ================================================================================================================ */
@media screen {
  body.sig:has(> .public) { background: var(--v-page); }
  .public { position: relative; padding-inline: 28px; }
  .public::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 272px; border-radius: 0 0 32px 32px; background: var(--v-hero); }
  .public > * { position: relative; }
  .public-top .back, .public-top .back:hover, .public-top .signin-lang, .public-top .signin-lang:hover { color: #FFFFFF; }
  .public-top .back:focus-visible, .public-top .signin-lang:focus-visible { outline-color: #FFFFFF; }
  .public-logo { filter: brightness(0) invert(1); }          /* the all-white mark on the hero */
  .public h1, .public-sub, .public-meta { color: #FFFFFF; }
  .public h1 { font-weight: 700; letter-spacing: -0.02em; }
  .public-sub { font-weight: 600; letter-spacing: -0.01em; }
  html[lang="ar"] .public h1 { font-weight: 600; letter-spacing: 0; }
  .policy { margin-inline: -16px; padding: 4px 16px 24px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
  .policy > :first-child { margin-top: 18px; }
  .policy h2 { border-bottom-color: var(--v-line); }
  .policy th { border-bottom-color: var(--v-line-2); }
  .policy td { border-bottom-color: var(--v-line); }
  .policy tr:last-child td { border-bottom: 0; }
  .public-foot { margin-top: 32px; border-top-color: var(--v-line); }
}
@media screen and (min-width: 700px) {
  .public { padding-inline: 44px; }
  .public::before { inset: 12px 12px auto 12px; height: 276px; border-radius: 28px; }
  .policy { margin-inline: -32px; padding: 8px 32px 32px; }
  .policy > :first-child { margin-top: 24px; }
}

/* ================================================================================================================
   Vivid direction, stage V7 (the owner: "restyle the three pages ... I need the design to become 100% before I
   deploy"): the first-administrator page and the page that refuses to show an unverifiable payroll record. The
   first-administrator page takes the sign-in page's own classes (its hero band, white mark and card come from the
   sign-in rules above); this section adds only what that page has and sign-in has not. Screen only.
   ================================================================================================================ */
@media screen {
  /* the first-administrator page (setup_admin.php): its explanations, the command and the hint */
  .setup-text { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 23px; }
  .setup-text strong { color: var(--ink); font-weight: 600; }
  .setup-code { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--fill); color: var(--ink); font: 500 13px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; }
  .setup-hint { margin-top: 12px; color: var(--ink-3); font-size: 13px; line-height: 19px; }
  .setup-hint code { font: 500 12px/18px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-2); }

  /* the page that refuses to show an unverifiable payroll record (payroll_render_unavailable): one card */
  body.v-fail { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); background: var(--v-page); }
  .v-fail-card { width: 100%; max-width: 480px; padding: 28px 24px 24px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); text-align: center; }
  .v-fail-ic { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--v-bad-w); color: var(--v-bad); }
  .v-fail-ic svg { width: 28px; height: 28px; }
  .v-fail-card h1 { margin-top: 16px; font-size: 20px; line-height: 28px; font-weight: 600; }
  .v-fail-card p { margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 23px; }
  .v-fail-card .v-fail-back { margin-top: 20px; }
  .v-fail-card .btn { min-width: 160px; border-radius: 14px; }
}

/* ================================================================================================================
   Vivid direction, stage V8 (the owner, with a screenshot of the Overview on a tablet in landscape: "the upper block
   text is overlapping"): corrections found by a sweep for text that spills out of its own tile or card, at tablet
   and narrow-desktop widths, in English and Arabic. Layout only: no text, colour or behaviour changes. Screen only.
   ================================================================================================================ */
/* the Overview's six quick actions: one row of six needs about 1366 px; narrower, two rows of three (as from 700 px) */
@media screen and (min-width: 1100px) and (max-width: 1365.98px) {
  .v-qa { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* from 1100 px Today's quick access sits in the narrower right-hand column, and Attendance's daily records table in
   the narrower of two columns: up to 1279 px, quick access takes two tiles a row and Attendance keeps one column */
@media screen and (min-width: 1100px) and (max-width: 1279.98px) {
  .v-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols.wide:has(#att-record) { display: block; }
}
/* on a tablet, the KPI page's "Average by component" and Attendance's record rows: a component's name and a day's
   status keep the width of their longest word */
@media screen and (min-width: 700px) and (max-width: 1099.98px) {
  .adm-kpi-avg { grid-template-columns: minmax(min-content, 1.2fr) minmax(56px, 1fr) 44px; }
  .adm-rec > summary { grid-template-columns: 112px minmax(0, 1.2fr) 150px minmax(min-content, 1fr) minmax(0, 0.9fr) auto; }
  .adm-recs.is-one .adm-rec > summary { grid-template-columns: 112px 150px minmax(min-content, 1fr) minmax(0, 1fr) auto; }
}
/* a value's state label ("Estimate, not posted") in a narrow figure tile wraps instead of running past its edge */
@media screen {
  .fig .vt { white-space: normal; max-width: 100%; }
}

/* ================================================================================================================
   Vivid direction, stage V8, spacing (the owner, with phone screenshots of the admin Tasks page and the Overview:
   "Spacing"): boxes that touched the box above them, found by a sweep of every main page at 320 to 1440 px in
   English and Arabic. Margins only: no text, colour, layout or behaviour changes. Screen only.
   ================================================================================================================ */
/* on a phone the Overview's second column (Who is in today, decisions, tasks) follows the first: the same 14 px as
   between its cards, as on a tablet */
@media screen and (max-width: 699.98px) {
  .v-ov-side { margin-top: 14px; }
}
@media screen {
  /* the admin Tasks page's phone-only "Create task" button and the quick filters under it */
  .content > p.only-narrow { margin-bottom: 14px; }
  /* the month picker card and the links or filters right under it (payroll report, batches, history; KPI leaderboard) */
  .app.is-vivid .page .content .toolbar2:has(> .month-nav) + .adm-pay-links,
  .app.is-vivid .page .content .toolbar2:has(> .month-nav) + .toolbar2 { margin-top: 14px; }
  /* the payroll report's "Negative net" label under a net's state label */
  .adm-pay-neg { margin-top: 6px; }
}

/* ================================================================================================================
   Vivid direction, stage V8, date and time fields (the owner, with iPhone screenshots of Settings, Work sites and
   Attendance: "Needs fixing"): on an iPhone a date, time or month field showed its value centred across the box and
   high in it. iPhone Safari lays these fields out as a row that centres the value from top to bottom; .input made
   them a plain block, so the value sat at the top. On iPhones and iPads the row comes back (only their Safari knows
   -webkit-touch-callout; Chrome and the Android app keep their fields exactly as they are), and the value starts
   where every other field's value starts. No text, colour, size or behaviour changes. Screen only.
   ================================================================================================================ */
@supports (-webkit-touch-callout: none) {
  @media screen {
    .input:is([type="date"], [type="time"], [type="month"], [type="datetime-local"]) { display: flex; align-items: center; }
  }
}
@media screen {
  /* iPhone Safari's own box for the value, which it centres across (other browsers have no such box) */
  .input::-webkit-date-and-time-value { text-align: start; }
}

/* ================================================================================================================
   Test report fixes (the owner, 21 November 2026: "Accepted D1 to D18"; docs/TEST_REPORT_FIXES.md). Added at the end so
   every rule above stays as it was.
   ================================================================================================================ */
/* #65: the payroll report's KPI waiver column; the fourteen columns share the width the thirteen had */
.adm-pay-table.has-waiver .adm-pay-c1 { width: 14%; } .adm-pay-table.has-waiver .adm-pay-c2 { width: 7%; }
.adm-pay-table.has-waiver .adm-pay-c4 { width: 5%; } .adm-pay-table.has-waiver .adm-pay-c6 { width: 7%; }
.adm-pay-table.has-waiver .adm-pay-c7 { width: 7%; } .adm-pay-table.has-waiver .adm-pay-c8 { width: 7%; }
.adm-pay-table.has-waiver .adm-pay-c9 { width: 5.5%; } .adm-pay-table.has-waiver .adm-pay-c10 { width: 7%; }
.adm-pay-table.has-waiver .adm-pay-c14 { width: 6.5%; } .adm-pay-table.has-waiver .adm-pay-c11 { width: 8.5%; }
/* #3: why bonus, waiver and net leave rows out of the total */
.adm-pay-left-out { display: block; margin-top: 2px; color: var(--amber); }
/* #37: the proration under a base salary */
.tally dd small[data-proration], .pay-doc-line small[data-proration] { display: block; font-size: 12px; line-height: 17px; color: var(--ink-2); }
/* #50: the pay card's bonus tile while the waiver decision is missing */
.v-tile b.is-wait { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--amber); }
/* #69 (D17): the reason a rejection can carry, above its button */
.rq-reject { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 220px; }
.rq-reject .rq-reason { margin: 0; width: 100%; }
/* #46 (D10): a field the employee reads but does not change */
.input.is-static { display: flex; align-items: center; background: var(--fill); color: var(--ink-2); }
/* #55: the warnings above a leave decision */
.tr-warn { display: grid; gap: 8px; margin-block: 8px; }
/* #63, #64 (D15): the per-part statement on the report */
.tr-usage-rows { display: grid; gap: 12px; }
.tr-usage-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; padding-block: 8px; border-bottom: 1px solid var(--line); }
.tr-usage-part { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; }
@media (max-width: 699px) { .tr-usage-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tr-usage-part { grid-column: 1 / -1; padding-bottom: 0; } }
/* #72, #21: the expired-form and page-not-found pages */
.tr-expired .content { max-width: 560px; margin-inline: auto; padding-block: 64px; }
.tr-expired-t { font-size: 24px; line-height: 30px; font-weight: 600; color: var(--ink); margin: 0 0 12px; }
/* #28: at tablet width a name and a state never break inside a word */
@media (min-width: 700px) and (max-width: 1099px) {
  .adm-rec-who, .adm-rec-st { min-width: 9em; overflow-wrap: normal; word-break: normal; hyphens: none; }
}
/* #29: at tablet width the activity log uses the stacked rows the phone has (its table was wider than its box) */
@media (min-width: 700px) and (max-width: 1099.98px) {
  .adm-logt .only-wide { display: none !important; }
  .adm-logt .only-narrow { display: block !important; }
}
/* The daily work report of office and warehouse staff (the owner, 21 November 2026, decisions E1 to E10) */
.dwr-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 16px; }
.dwr-text { padding-block: 12px; border-bottom: 1px solid var(--line); }
.dwr-text:last-child { border-bottom: 0; }
.dwr-label { margin: 0 0 4px; font-size: 13px; line-height: 19px; font-weight: 600; color: var(--ink-2); }
.dwr-text .prose { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.dwr-photos { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 0; padding: 0; }
.dwr-photos li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.dwr-photos img { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--fill); }
.dwr-wh { margin-top: 12px; }
.dwr-body { margin-block: 4px 8px; }
#dwr-approve-all { margin-block: 8px 16px; }
/* Allowance withdrawal (the owner, 21 November 2026, decisions AW1 to AW14) */
.aw-state { margin: 0 0 16px; }
.aw-radios { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 4px; }
.aw-radio { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.aw-method, .aw-insta fieldset { border: 0; margin: 0; padding: 0; }
.aw-insta { display: grid; gap: 12px; }
.aw-form:has(input[name="method"][value="cash"]:checked) .aw-insta { display: none; }
.aw-timeline { list-style: none; margin: 0; padding: 0; }
.aw-ev { padding-block: 10px; border-bottom: 1px solid var(--line); }
.aw-ev:last-child { border-bottom: 0; }
.aw-ev-h { font-size: 13px; line-height: 19px; }
.aw-ev-t { font-size: 14px; line-height: 20px; color: var(--ink); }
.aw-ev-b { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.aw-cancel { margin-top: 16px; }
.adm-pay-early { display: block; }

/* ---------- File field in the app's own words (21 November 2026): sig_input(['type' => 'file']) ---------- */
.file-pick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 48px; }
.file-pick .input.file-pick-input[type="file"] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.file-pick-btn { flex: none; pointer-events: none; }
.file-pick-name { min-width: 0; font-size: 14px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }
.file-pick.has-file .file-pick-name { color: var(--ink); }
.file-pick:hover .file-pick-btn { border-color: var(--ink-3); }
.file-pick:focus-within .file-pick-btn { outline: 2px solid var(--blue); outline-offset: 2px; }
.file-pick:has(.is-error) .file-pick-btn { border-color: var(--red); }
/* two fields side by side from tablet width up, one under the other on a phone (the sheet's month was cut to "November 20") */
@media (max-width: 699px) { .fields.two.phone-one { grid-template-columns: minmax(0, 1fr); } }
/* Ask EIS (the owner's decisions G1 to G7, 22 November 2026): the question above its answer, quieter, with its time */
.ask-q { margin: 0 0 8px; color: var(--ink-2); }
.ask-at { color: var(--ink-3); font-size: 13px; margin-inline-start: 8px; white-space: nowrap; }
.ask-text { margin: 0 0 12px; }
.ask-run { display: inline; }
.ask-card { margin-top: 8px; }

/* ================================================================================================================
   Fix list of 22 November 2026 (docs/FIX_LIST_2026-11-22.md). Added at the end so every rule above stays as it was.
   ================================================================================================================ */
/* #3, #74: the payroll report's overtime and "other" columns; the sixteen columns share the width the fourteen had */
.adm-pay-table.has-ot .adm-pay-c1 { width: 11.5%; } .adm-pay-table.has-ot .adm-pay-c2 { width: 6.5%; }
.adm-pay-table.has-ot .adm-pay-c3 { width: 3.5%; } .adm-pay-table.has-ot .adm-pay-c4 { width: 4%; } .adm-pay-table.has-ot .adm-pay-c5 { width: 4%; }
.adm-pay-table.has-ot .adm-pay-c6 { width: 6.5%; } .adm-pay-table.has-ot .adm-pay-c7 { width: 6.5%; }
.adm-pay-table.has-ot .adm-pay-c15 { width: 6.5%; } .adm-pay-table.has-ot .adm-pay-c16 { width: 6.5%; }
.adm-pay-table.has-ot .adm-pay-c8 { width: 6.5%; } .adm-pay-table.has-ot .adm-pay-c9 { width: 4.5%; }
.adm-pay-table.has-ot .adm-pay-c10 { width: 6.5%; } .adm-pay-table.has-ot .adm-pay-c14 { width: 6.5%; }
.adm-pay-table.has-ot .adm-pay-c11 { width: 7.5%; } .adm-pay-table.has-ot .adm-pay-c12 { width: 7%; } .adm-pay-table.has-ot .adm-pay-c13 { width: 6%; }
.adm-pay-table.has-ot td.adm-pay-m { padding-inline: 4px; }
.adm-pay-other small, .adm-pay-ovr { display: block; font-size: 12px; line-height: 16px; }
.adm-pay-table td.adm-pay-net > .adm-pay-st { display: flex; justify-content: flex-end; margin-top: 2px; }
/* #2, #50: a figure under a tile's amount (the deducted days; the estimate waiting for a waiver decision) */
.v-tile small { font-size: 12px; line-height: 16px; color: inherit; }
.v-tile small.is-wait { color: var(--amber); font-weight: 500; }
.tr-wait-amt { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
/* #99: the note under the weekly copy on System health */
#health-copy-encrypted { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; }
/* #28: at tablet width each attendance record is two lines (date, name and times; then status and deduction), so a name
   never runs into the times and "Unpaid: no balance left" keeps its words together */
@media screen and (min-width: 700px) and (max-width: 1099.98px) {
  .adm-rec > summary, .adm-recs.is-one .adm-rec > summary { grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1fr) auto; row-gap: 4px; }
  .adm-rec-date { grid-column: 1; grid-row: 1; }
  .adm-rec-who { grid-column: 2; grid-row: 1; min-width: 0; }
  .adm-rec-times { grid-column: 3; grid-row: 1; text-align: end; }
  .adm-rec > summary .disc-chev { grid-column: 4; grid-row: 1 / span 2; }
  .adm-rec-st { grid-column: 2; grid-row: 2; min-width: 0; }
  .adm-rec-ded { grid-column: 3; grid-row: 2; }
}
/* #16, #26: the activity log shows the action in plain words, in the page's language; the stored key stays in the page's
   data (data-action-key) for support, not on screen */
.adm-log .adm-log-key { display: none; }
/* #21: the Overview's five figures never leave "Waiting for you" alone on its row: five across on a desktop, three and
   two on a tablet, and on a phone two by two with "Waiting for you" across the full width */
@media (min-width: 1100px) { .v-ov-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 1099.98px) { .v-ov-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 699.98px) {
  .v-ov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-ov-tiles > .v-gt.is-white:last-child { grid-column: 1 / -1; }
}
/* #27: in the tablet rail a count sits clear of its icon (the icon is 24 px wide, centred), at the icon's top corner */
@media (min-width: 700px) and (max-width: 1099.98px) { .nav-count { top: 4px; inset-inline-start: calc(50% + 12px); } }
/* #89: on a phone the proration note under a base salary stays in the amount's column, on lines of its own, and never
   widens that column over the label */
.tally dd small[data-proration], .tally dd small[data-overtime-rate] { display: block; max-width: 24ch; margin-inline-start: auto; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
/* #90: below desktop width, "Today's work" (the daily report and tasks) comes right under the check-in card, before the
   month's KPI, attendance and pay cards */
@media (max-width: 1099.98px) {
  .v-grid { display: flex; flex-direction: column; }
  .v-grid > .v-col-work { order: -1; }
}
/* #91: "Before joining" in the calendar legend is a neutral grey, never the green of "On time" */
.legend i.off, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .legend i.off { background: var(--ink-4); box-shadow: none; }
.tk-img-chosen.is-error { color: var(--red); }   /* #92 */
/* #94: on "My daily reports" the three counters stand apart from the month card above them */
#dwr-month .cols > .col > .figs:first-child { margin-top: 14px; }
/* #101: the sign-in title keeps Plus Jakarta Sans (the owner, 23 November 2026: "yes i want the Plus Jakarta Sans") */
.signin-forgot { margin: 4px 0 0; text-align: center; }
/* Phone notifications (N1 to N5, 23 November 2026): the two buttons of "This phone" wrap on a phone instead of overflowing */
#push-phone .btns { flex-wrap: wrap; }

/* ---- the staging QA report of 24 November 2026 (appended: the accepted stylesheet stays a byte prefix) ---- */
.pay-doc-tools .pay-doc-h1 { flex-basis: 100%; margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; }   /* QA BUG-16 */
/* QA BUG-14 (24 November 2026): on a phone the per-part tables (the returns the warehouse confirms, the engineer's
   statement) become one card per part: the part on its own line, each figure under it with its column's name */
@media (max-width: 699.98px) {
  .wh-recv thead, .tr-usage thead { display: none; }
  .wh-recv, .wh-recv tbody, .tr-usage, .tr-usage tbody { display: block; width: 100%; }
  .wh-recv tr, .tr-usage tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; row-gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table.wh-recv td, .table.tr-usage td, .table.wh-recv td:first-child, .table.tr-usage td:first-child, .table.wh-recv td:last-child, .table.tr-usage td:last-child { display: block; padding: 0; border: 0; text-align: start; white-space: normal; min-width: 0; }
  .wh-recv td:first-child, .tr-usage td:first-child { grid-column: 1 / -1; font-size: 15px; line-height: 21px; font-weight: 500; overflow-wrap: anywhere; }
  .wh-recv td[data-l]::before, .tr-usage td[data-l]::before { content: attr(data-l); display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--ink-2); }
  .wh-recv td .input { width: 100%; }
}


/* ---- FABLE-11 (24 November 2026): a link a thumb taps on a phone is at least 40 px tall (the Overview's card links, the
   warehouse's "Open the task", the links of a table); the sidebar's language link too. Nothing else moves. ---- */
@media (max-width: 699px) {
  .v-link, .wh-open .link, .table a.link, .table a.t1 { display: inline-flex; align-items: center; min-height: 40px; }
}
.nav-foot a { min-height: 40px; display: inline-flex; align-items: center; }

/* ---- FABLE-11, retest of d1844e6 (24 November 2026): every shared control a thumb taps on a phone is at least 40 px tall:
   the filter and tab chips, a section's "more" link, the month arrows, a telephone number and a standalone link in a list of
   facts, the discussion's toggle, the Overview's bars. Links inside running text keep the line's height. ---- */
@media (max-width: 699px) {
  .seg a, .seg button,
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg button, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .seg a { height: 40px; }
  .more { min-height: 40px; }
  .kv dd a.tel, .kv dd a.link, .top-facts a.link, .adm-kpi-requests a.link, .adm-entry-meta a.link, .adm-pay-bhead a.link, .note a.link,
  .row-title > a, a.v-flag { display: inline-flex; align-items: center; min-height: 40px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .month-nav .iconbtn { width: 40px; height: 40px; }
  .thread-wrap > summary { min-height: 40px; }
  .v-bars a.v-bar { min-height: 40px; }
  a.v-wk-col { min-height: 40px; }   /* Today's week: a day that opens its attendance */
  /* retest of 2bb7558, L1 and L2: a link that is a table cell's only content, and a download link */
  .table td > a:only-child, a[data-download] { display: inline-flex; align-items: center; min-height: 40px; }
}

/* ---- The owner's decision of 24 November 2026 (retest of 2bb7558): a secondary button is soft-filled, not outlined: the
   brand blue's light wash with the darker brand blue in semibold (6.1:1 contrast; 5.5:1 on hover), no visible border, the
   same height, radius and padding as the filled one. One solid blue button per view stays (FABLE-12). ---- */
.btn-secondary, .btn-outline,
.v-card .btn-secondary,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .btn-secondary { background: var(--blue-wash); border-color: var(--blue-wash); color: var(--blue-press); font-weight: 600; }
.btn-secondary:hover, .btn-outline:hover,
.v-card .btn-secondary:hover,
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .btn-secondary:hover { background: #DDE8FF; border-color: #DDE8FF; color: var(--blue-press); }
@media screen { .pay-doc .btn-secondary { border-color: var(--blue-wash); } }

/* The owner, 25 November 2026: a Reject is soft red (the red's wash, the red, semibold; 5.9:1, hover 5.4:1), the same size as
   the other buttons, so it no longer looks like Approve. Approve and Delete are unchanged */
.btn-reject { background: var(--red-wash); border-color: var(--red-wash); color: var(--red); font-weight: 600; }
.btn-reject:hover { background: #FBE3DF; border-color: #FBE3DF; color: var(--red); }

/* The owner, 25 November 2026 ("delete should be full red"): a Delete is solid red (white on the red, 6.6:1), with its
   confirmation as before; the other destructive actions (cancel a task, close a loan…) are unchanged */
.btn-danger.btn-delete { background: var(--red); border-color: var(--red); color: #FFFFFF; }
.btn-danger.btn-delete:hover { background: #8F1C13; border-color: #8F1C13; color: #FFFFFF; }

/* The owner, 25 November 2026: the floating tab bar on a phone looks and moves like the one in the owner's recording
   (Instagram's): a pill floating above the page, the current tab in a lighter capsule that slides to the tab tapped.
   While the page scrolls the bar shrinks smoothly into a compact icons-only bar; when scrolling stops it springs back,
   a little past its size and back, and shows the words again (the script in includes/sig_footer.php sets .is-compact
   and places .nav-pill). The links, tabs and counts are unchanged; the tablet rail and the desktop sidebar too. */
.nav-pill { display: none; }
@media (max-width: 699.98px) {
  /* The owner, 27 November 2026 ("very heavy on mobile"): the bar sits in the page (sticky), so the old shrink, which
     animated its margins, padding and heights, re-laid-out the whole page on every frame while scrolling and moved the
     end of the page. Now its place in the page never changes: the shrink is a scale and a fade (the compositor's work
     only), calmer (no overshoot), and lighter (a thinner shadow, a little lower). The look and the tabs are the same. */
  .nav { --dock-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
         margin-inline: 14px; padding: 4px; border-radius: 999px;
         box-shadow: 0 6px 18px rgba(10, 19, 38, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
         transform-origin: 50% 100%; will-change: transform; transition: transform 0.24s var(--dock-ease); }
  .nav-items { position: relative; }
  .nav-item { justify-content: center; gap: 2px; min-height: 52px; padding: 5px 2px; border-radius: 999px; -webkit-tap-highlight-color: transparent;
              transition: color 0.2s ease; }
  .nav-item > .ic { transition: transform 0.24s var(--dock-ease); }
  .nav-item:active > .ic { transform: scale(0.88); }
  .nav-item > span { max-height: 16px; overflow: hidden; transition: opacity 0.18s ease 0.06s; }
  .nav-item.is-current::before, .nav-item.is-current-n::before { top: 0; bottom: 0; left: 0; right: 0; width: auto; height: auto; border-radius: 999px;
              background: rgba(255, 255, 255, 0.16); }
  .nav-pill { position: absolute; z-index: 0; top: 0; bottom: 0; inset-inline-start: calc(var(--i) * 100% / var(--n)); width: calc(100% / var(--n));
              border-radius: 999px; background: rgba(255, 255, 255, 0.16); pointer-events: none;
              transition: inset-inline-start 0.3s var(--dock-ease); }
  .nav.has-pill .nav-pill { display: block; }
  .nav.has-pill .nav-item.is-current::before, .nav.has-pill .nav-item.is-current-n::before { display: none; }
  .nav-count { transition: transform 0.24s var(--dock-ease); }
  /* scrolling: the compact bar, smaller, icons only (scaled from its bottom edge; the words fade, the icons settle into
     the middle). Nothing in the page moves. */
  .nav.is-compact { transform: scale(0.86); transition: transform 0.18s var(--dock-ease); }
  .nav.is-compact .nav-item > .ic { transform: translateY(7px); }
  .nav.is-compact .nav-item > span { opacity: 0; transition: opacity 0.1s ease; }
  .nav.is-compact .nav-count { transform: translateY(7px); }
  @media (prefers-reduced-motion: reduce) {
    .nav, .nav-item, .nav-item > .ic, .nav-item > span, .nav-pill, .nav-count { transition: none; }
  }
}

/* The owner's reference, 25 November 2026 (Leave Requests, before and after): the reason for the employee comes first, at
   full width, then Approve (solid blue, a tick), Reject (soft red, a circled cross) and Delete (solid red, a bin) in one row;
   on a computer the field and the three buttons share one row. Every form keeps its fields, address and confirmation:
   display: contents only lets their parts share one grid (includes/sig_admin.php adds .rq-grid, .rq-n2/3, .has-reason) */
.rq-acts.rq-grid { display: grid; gap: 10px; align-items: end; margin-top: 16px; }
.rq-acts.rq-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rq-acts.rq-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rq-acts.rq-grid > form { display: contents; }
.rq-acts.rq-grid .rq-reason { grid-row: 1; grid-column: 1 / -1; width: auto; min-width: 0; margin: 0 0 2px; }
.rq-acts.rq-grid .rq-btn { width: 100%; min-width: 0; padding: 0 12px; gap: 8px; }
.rq-acts.rq-grid .rq-btn .ic { width: 20px; height: 20px; flex: 0 0 20px; }
@media (max-width: 699.98px) {
  .rq-acts.rq-grid .rq-btn { padding: 0 8px; gap: 6px; font-size: 15px; }
  .rq-item > .thread-wrap { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
}
@media (max-width: 374.98px) {
  .rq-acts.rq-grid .rq-btn .ic { display: none; }
}
@media (min-width: 1100px) {
  .rq-acts.rq-grid.has-reason.rq-n3 { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(148px, auto)); }
  .rq-acts.rq-grid.has-reason.rq-n2 { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(148px, auto)); }
  .rq-acts.rq-grid.has-reason .rq-reason { grid-column: 1; }
  .rq-acts.rq-grid:not(.has-reason) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(148px, max-content); justify-content: start; }
  .rq-acts.rq-grid .rq-btn { padding: 0 22px; }
}

/* ---------- Ask Claude, the Admin assistant (Release C, the owner, 27 November 2026) ----------
   A round navy button at the inline end (right in English, left in Arabic), above the phone tab bar; the page ends with
   room for it, so its last row is never under the button. The panel is an overlay: full screen on a phone, a side panel
   from 700 px. Rules, not boxes, inside it; the card (a change to confirm) is the one framed block. */
.ac-spacer { height: 72px; }
.ac-fab { position: fixed; z-index: 50; inset-inline-end: 16px; inset-block-end: calc(84px + env(safe-area-inset-bottom)); width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: var(--navy); color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(10, 19, 38, 0.24); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ac-fab .ic { width: 24px; height: 24px; }
.ac-fab:hover { background: #18233A; }
.ac-fab:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.ac-fab[hidden] { display: none; }
.app.is-detail ~ .ac-fab { inset-block-end: calc(88px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .ac-fab { inset-block-end: 24px; inset-inline-end: 24px; } .app.is-detail ~ .ac-fab { inset-block-end: 24px; } .ac-spacer { height: 64px; } }

html.ac-open, html.ac-open body { overflow: hidden; }
.ac-panel { position: fixed; z-index: 70; inset: 0; display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.ac-panel[hidden] { display: none; }
@media (min-width: 700px) {
  .ac-panel { inset-block: 0; inset-inline-start: auto; inset-inline-end: 0; width: min(440px, 100vw); border-inline-start: 1px solid var(--line);
    box-shadow: 0 0 48px rgba(10, 19, 38, 0.18); }
  html.ac-open { overflow: auto; } html.ac-open body { overflow: auto; }
}
.ac-panel .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ac-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 8px; }
.ac-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.ac-x { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-end: -10px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--ink); cursor: pointer; }
.ac-x:hover { background: var(--fill); }
.ac-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 10px; border-bottom: 1px solid var(--line); }
.ac-tools .btn { gap: 6px; }
.ac-tools .ic { width: 18px; height: 18px; }
.ac-privacy { margin: 0; padding: 8px 20px; font-size: 13px; line-height: 19px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.ac-convs { max-height: 40%; overflow-y: auto; padding: 4px 12px; border-bottom: 1px solid var(--line); background: var(--mist); }
.ac-convs[hidden] { display: none; }
.ac-conv { display: block; width: 100%; min-height: 44px; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: start;
  font: inherit; font-size: 14px; line-height: 20px; color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.ac-conv:last-child { border-bottom: 0; }
.ac-conv.is-current { color: var(--blue); font-weight: 600; }
.ac-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 20px 16px; -webkit-overflow-scrolling: touch; }
.ac-hint { margin: 8px 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.ac-msg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ac-msg:last-child { border-bottom: 0; }
.ac-who { display: block; margin-bottom: 2px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); }
.ac-msg.is-admin .ac-body { padding: 8px 12px; border-radius: var(--r-ctl); background: var(--fill); }
.ac-body { font-size: 15px; line-height: 23px; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.ac-body p { margin: 0 0 6px; } .ac-body p:last-child { margin-bottom: 0; }
.ac-body ul { margin: 4px 0 6px; padding-inline-start: 20px; } .ac-body li { margin: 2px 0; }
.ac-body a { color: var(--blue); }
.ac-msg.is-notice .ac-body { color: var(--amber); }
.ac-src { margin: 6px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.ac-src a { color: var(--blue); }
.ac-wait { margin: 10px 0; font-size: 14px; color: var(--ink-2); }
.ac-card { margin: 10px 0 2px; padding: 12px 14px; border: 1px solid var(--line-2); border-inline-start: 3px solid var(--navy); background: var(--paper); }
.ac-card.is-done { border-inline-start-color: var(--green); }
.ac-card.is-expired, .ac-card.is-cancelled, .ac-card.is-stale { border-inline-start-color: var(--line-2); color: var(--ink-2); }
.ac-card-t { margin: 0 0 6px; font-size: 15px; line-height: 22px; font-weight: 600; }
.ac-item { padding: 8px 0; border-top: 1px solid var(--line); }
.ac-item:first-of-type { border-top: 0; }
.ac-item-who { margin: 0; font-weight: 600; font-size: 14px; line-height: 20px; unicode-bidi: plaintext; }
.ac-item-what { margin: 0 0 4px; font-size: 14px; line-height: 20px; }
.ac-chg { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 4px 0; font-size: 13px; line-height: 19px; }
.ac-chg dt { color: var(--ink-2); } .ac-chg dd { margin: 0; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.ac-chg s { color: var(--ink-3); }
.ac-money { margin: 4px 0; padding: 6px 8px; background: var(--amber-wash); color: var(--amber); font-size: 13px; line-height: 19px; }
.ac-item-link { font-size: 13px; color: var(--blue); }
.ac-result { margin: 6px 0 0; font-size: 13px; line-height: 19px; font-weight: 500; }
.ac-item.is-done .ac-result { color: var(--green); } .ac-item.is-refused .ac-result { color: var(--red); }
.ac-card-st { margin: 8px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.ac-card-btns { margin-top: 8px; }
/* the panel's own question (27 November 2026: no browser dialog, which may not show in the Android app) */
.ac-confirm { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--mist); }
.ac-tools + .ac-confirm, .ac-tools[hidden] + .ac-confirm { margin: 0 20px 10px; }
.ac-confirm-q { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }
.ac-confirm .btns { margin: 0; }
/* the activity log: an action confirmed through Ask Claude, with its conversation (a link when it is the reader's own) */
.adm-log-ac { font-weight: 500; }
a.adm-log-ac { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.ac-ask { display: flex; gap: 8px; align-items: flex-end; padding: 10px 20px 12px; border-top: 1px solid var(--line); background: var(--paper); }
.ac-q { height: auto; min-height: 48px; max-height: 160px; padding: 11px 14px; resize: none; }
.ac-send { flex: 0 0 auto; height: 48px; }
.ac-why { margin: 0; padding: 0 20px 12px; font-size: 13px; line-height: 19px; color: var(--amber); }
.ac-why[hidden] { display: none; }
@media print { .ac-fab, .ac-panel, .ac-spacer { display: none !important; } }
.ac-mem { max-height: 55%; overflow-y: auto; padding: 4px 20px 12px; border-bottom: 1px solid var(--line); background: var(--mist); }
.ac-mem[hidden] { display: none; }
.ac-mem-h { margin: 10px 0 4px; font-size: 14px; line-height: 20px; font-weight: 600; }
.ac-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; unicode-bidi: plaintext; }
.ac-code { margin: 6px 0; padding: 10px 12px; max-height: 320px; overflow: auto; background: var(--fill); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.ac-copy { margin: 0 0 6px; }
.ac-body code { padding: 0 4px; background: var(--fill); font-size: 0.92em; }
.ac-svg { margin: 8px 0; } .ac-svg img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); background: #FFFFFF; }
.ac-svg figcaption { margin-top: 4px; font-size: 13px; } .ac-svg a { color: var(--blue); }
.ac-pic { display: block; max-width: 220px; max-height: 220px; margin: 0 0 6px; border: 1px solid var(--line); }
.ac-att { display: flex; align-items: center; gap: 10px; padding: 8px 20px 0; border-top: 1px solid var(--line); }
.ac-att[hidden] { display: none; } .ac-att img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); }
.ac-pick { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); color: var(--ink-2); cursor: pointer; }
.ac-pick:hover { background: var(--fill); } .ac-pick:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.ac-fix { border-inline-start-color: var(--blue); } .ac-fix.is-fixed { border-inline-start-color: var(--green); } .ac-fix.is-dismissed { border-inline-start-color: var(--line-2); }
.ac-fix .ac-code { max-height: 200px; }
/* Ask Claude: where the page rests with a control under the button, it tucks into the screen edge: 20 px of it stay in the
   gutter, its icon moved into that part. */
.ac-fab { --ac-inset: 16px; transition: transform 0.2s ease; }
.ac-fab .ic { transition: transform 0.2s ease; }
.ac-fab.is-tucked { transform: translateX(calc(var(--ac-inset) + 32px)); }
.ac-fab.is-tucked .ic { transform: translateX(-15px) scale(0.75); }
[dir="rtl"] .ac-fab.is-tucked { transform: translateX(calc(-1 * (var(--ac-inset) + 32px))); }
[dir="rtl"] .ac-fab.is-tucked .ic { transform: translateX(15px) scale(0.75); }
@media (min-width: 700px) { .ac-fab { --ac-inset: 24px; } }
@media (prefers-reduced-motion: reduce) { .ac-fab, .ac-fab .ic { transition: none; } }

/* ---------- Release D (the owner, 27 November 2026): announcements from Admin ----------
   The bar under the page top of every staff page: like a note (a wash and an icon), one row per announcement, urgent
   first. The importance is said by an icon and a word as well as the colour. Nothing has a fixed height: at 200% text
   size the words wrap and "Got it" moves under them. */
.ann-bar { display: flex; flex-direction: column; gap: 8px; margin: 0 var(--gutter) 18px; }
.ann { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 14px; border-radius: var(--r-ctl); background: var(--fill); }
[dir="rtl"] .ann { padding: 10px 14px 10px 12px; }
.ann.is-important { background: var(--amber-wash); }
.ann.is-urgent { background: var(--red-wash); }
.ann-open { flex: 1 1 14em; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 40px; padding-block: 2px; color: var(--ink); text-decoration: none; }
.ann-open > .ic { width: 20px; height: 20px; color: var(--ink-2); }
.ann.is-important .ann-open > .ic, .ann.is-important .ann-k { color: var(--amber); }
.ann.is-urgent .ann-open > .ic, .ann.is-urgent .ann-k { color: var(--red); }
.ann-words { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 2px; min-width: 0; font-size: 15px; line-height: 22px; }
.ann-k { font-weight: 600; color: var(--ink-2); }
.ann-t { font-weight: 500; overflow-wrap: anywhere; }
.ann-hint { flex-basis: 100%; font-size: 13px; line-height: 19px; color: var(--ink-2); }
a.ann-open:hover .ann-t { text-decoration: underline; }
a.ann-open:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.ann-close { display: flex; margin: 0 0 0 auto; }
[dir="rtl"] .ann-close { margin: 0 auto 0 0; }
.ann-close .btn { background: var(--paper); }
.ann-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (min-width: 700px) { .ann-bar { margin-top: 2px; } }

/* the full message (staff) and its preview (Admin) */
.ann-full { max-width: 680px; }
.ann-imp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 14px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-2); }
.ann-imp .ic { width: 20px; height: 20px; }
.ann-full.is-important .ann-imp { color: var(--amber); }
.ann-full.is-urgent .ann-imp { color: var(--red); }
.ann-imp-ack { font-weight: 500; color: var(--ink-2); }
.ann-title { margin: 4px 0 10px; font-size: 22px; line-height: 30px; font-weight: 600; overflow-wrap: anywhere; }
.ann-body { font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
html[lang="ar"] .ann-body, .ann-body[lang="ar"] { line-height: 1.7; }
.ann-body p { margin: 0 0 12px; }
.ann-body a { color: var(--blue); text-decoration: underline; word-break: break-all; }
.ann-full .kv { margin-top: 18px; }
.ann-act { margin-top: 22px; }
.ann-act .field-hint { display: block; margin: 0 0 12px; }
.ann-act .btn + .field-hint { margin: 10px 0 0; }
.ann-row > .ic { width: 20px; height: 20px; color: var(--ink-2); }
.ann-row.is-important > .ic, .ann-row.is-important .row-over { color: var(--amber); }
.ann-row.is-urgent > .ic, .ann-row.is-urgent .row-over { color: var(--red); }
.ann-row .ann-count, .ann-row .ann-state { font-weight: 500; color: var(--ink); }
.ann-row .ann-state.is-due { color: var(--amber); }

/* Admin: the form and the preview */
.ann-admin .ann-set { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.ann-admin .ann-set[hidden], .ann-admin .ann-lang-block[hidden] { display: none; }
.ann-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; }
.ann-choice { display: inline-flex; align-items: flex-start; gap: 8px; min-height: 40px; padding-block: 8px; font-size: 15px; line-height: 22px; cursor: pointer; }
.ann-choice input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--blue); }
.ann-choice small { display: block; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.ann-flags { flex-direction: column; gap: 4px; }
.ann-imp-mark { display: inline-flex; } .ann-imp-mark .ic { width: 20px; height: 20px; color: var(--ink-2); }
.ann-imp-mark.is-important .ic { color: var(--amber); } .ann-imp-mark.is-urgent .ic { color: var(--red); }
.ann-when { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.ann-people-pick { display: flex; flex-direction: column; max-height: 320px; overflow: auto; margin-top: 8px; padding-inline: 2px; border-block: 1px solid var(--line); }
.ann-people-pick .ann-choice[hidden] { display: none; }
.ann-filter { margin-top: 6px; max-width: 360px; }
.ann-previews { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 12px; }
.ann-previews figure { margin: 0; flex: 0 1 390px; min-width: 0; }
.ann-previews figcaption { margin-bottom: 8px; font-size: 13px; line-height: 19px; font-weight: 600; color: var(--ink-2); }
.ann-phone { width: 100%; max-width: 390px; min-height: 560px; padding-bottom: 20px; border: 1px solid var(--line-2); border-radius: var(--r-sheet); background: var(--paper); overflow: hidden; }
.ann-phone .ann-phone-top { padding: 16px 20px 12px; font-size: 22px; line-height: 30px; font-weight: 600; }
.ann-phone .ann-bar { margin: 0 16px 16px; }
.ann-phone .ann-full { padding: 16px 20px 0; border-top: 1px solid var(--line); }
.ann-phone .btn { pointer-events: none; }
.ann-end { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.ann-people td { vertical-align: top; }

/* Multi-day leave (the owner, 27 November 2026): one card for the days of one leave; "Decide per day" lists each waiting
   day with its two choices on one line (they wrap at 200% text size), the days already decided with their state. */
.rq-anchor { display: block; scroll-margin-top: 84px; }
.rq-perday { margin-top: 12px; }
.rq-perday-form { margin-top: 4px; }
.rq-day { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rq-day .rq-day-date { flex: 1 1 9em; min-width: 0; font-weight: 500; }
.rq-day .choice { border-bottom: 0; padding: 8px 0; min-height: 40px; align-items: center; }
.rq-day.is-decided { padding: 12px 0; }
.rq-perday-form .rq-reason { margin-top: 12px; }
.rq-perday-form .btns { margin-top: 12px; }
.rq-day-thread { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.req > .rq-leave-days .kv { margin: 4px 0 8px; }
/* On a phone the three buttons of a leave of several days ("Approve all", "Reject all", "Delete") take the width their
   words need (no icon), on one line at the usual text size and wrapping onto two at 200% */
@media (max-width: 699.98px) {
  .rq-item[data-days] .rq-acts.rq-grid { display: flex; flex-wrap: wrap; }
  .rq-item[data-days] .rq-acts.rq-grid .rq-reason { order: -1; flex: 1 0 100%; }
  .rq-item[data-days] .rq-acts.rq-grid .rq-btn { flex: 1 1 auto; width: auto; }
  .rq-item[data-days] .rq-acts.rq-grid .rq-btn .ic { display: none; }
}
/* Settings (the owner, 27 November 2026: Ask Claude's switch buttons left the card on a phone and in the desktop app's
   window): a switch is its label and its state, then its button on a line of its own. A Settings action button wraps a
   long label inside its card and keeps its height; on a phone it is as wide as the card. */
.row.adm-switch, .app.is-vivid .page .content:not(.v-today):not(.v-ov) .row.adm-switch { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.row.adm-switch > .row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row.adm-switch .row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.row.adm-switch > .adm-run { margin-top: 0; }
.adm-setup .adm-run .btn { max-width: 100%; height: auto; min-height: 40px; padding-block: 8px; line-height: 20px; white-space: normal; text-align: center; }
@media (max-width: 699.98px) { .adm-setup .adm-run .btn { width: 100%; } }
@media (min-width: 700px) { .adm-setup .adm-run .btn-sm { min-height: 34px; padding-block: 6px; } }
@media (min-width: 1100px) { .adm-setup .adm-run .btn-sm { min-height: 30px; padding-block: 5px; line-height: 18px; } }
/* The check-out release (the owner, 28 November 2026). The Overview's seven tiles (Checked out and Still in beside Checked
   in today): four columns on a laptop, one row from 1400 px; the white "Waiting for you" tile ends a short row. The
   Attendance records filter "Left early" wraps under the employee on a phone. */
@media (min-width: 1100px) { .v-ov-tiles.has-out { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .v-ov-tiles.has-out { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 1099.98px) { .v-ov-tiles.has-out > .v-gt.is-white:last-child { grid-column: 1 / -1; } }
.v-person .v-out { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.v-noout .row-trail .btn { white-space: nowrap; }
.adm-pick .month-pick { flex-wrap: wrap; }
@media (max-width: 699.98px) { .adm-pick .month-pick select.adm-left-early { flex: 1 1 100%; } }

/* ---- Package 3 (the 27 November 2026 design review). Display only. ---- */
/* 1. A Delete or Remove on Work sites and on the leave card is quiet: an outline in the red, never a filled block; its
      confirmation is as before. Other deletes keep the owner's solid red of 25 November 2026. */
.btn-danger.btn-delete.btn-delete-quiet { background: var(--paper); border-color: var(--line-2); color: var(--red); font-weight: 600; }
.btn-danger.btn-delete.btn-delete-quiet:hover { background: var(--red-wash); border-color: var(--red); color: var(--red); }
/* 2. On a phone the Approvals filters wrap onto a second line: every tab is visible, none is cut at the edge. */
@media (max-width: 699.98px) {
  .seg.aq-seg { flex-wrap: wrap; overflow: visible; row-gap: 8px; }
}
/* 3. Loans grouped per employee: the name once (spanning the employee's loans), with the count and the balance after. */
.adm-loan-table tbody.adm-loan-emp + tbody.adm-loan-emp > tr:first-child > td { border-top: 1px solid var(--line-2); }
.adm-loan-who .adm-loan-count, .adm-loan-who .adm-loan-total { display: block; }
td.adm-loan-who[rowspan] { vertical-align: top; }
@media (max-width: 699.98px) {
  .adm-loan-table tbody.adm-loan-emp[data-loans]:not([data-loans="1"]) > tr + tr { margin-top: -6px; }
}
/* 4. The allowance withdrawal's four figures two by two on a phone, so a four-digit amount is never cut. */
@media (max-width: 699.98px) {
  .figs.four.aw-figs { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .figs.four.aw-figs .fig:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
}
/* 5. Latin codes in a stored text (a notification) are isolated and stay on one line: "TSK-2026-0039", never "TSK-" / "2026-0039". */
bdi.code { white-space: nowrap; }

/* ---- Package 7, release B (the owner's decisions of 25 and 28 November 2026). Display only. ---- */
/* The Rules page and a rule's four-step change form: the fields of one value side by side where they belong together
   (a late step's minutes and days), the ticks under them, the actions in a row; a future version and a withdrawn one. */
.rb-form { margin-top: 8px; }
.rb-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.rb-days .field-label { display: block; }
.rb-form .check.rb-none, .rb-form .check.rb-unusual { display: flex; align-items: center; gap: 10px; min-height: 40px; margin-top: 8px; }
.rb-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.rb-future .row-title { color: var(--amber); }
.rb-withdrawn .row-title, .rb-withdrawn .row-sub { color: var(--ink-3); text-decoration: line-through; }
.rb-withdraw { display: inline-flex; }
@media (max-width: 699.98px) {
  .rb-pair { grid-template-columns: 1fr; }
  .rb-acts .btn { flex: 1 1 100%; }
}
/* Loans over the limit: the owner's two answers in a row; the "approved above limit" mark under a loan's mode. */
.ll-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.ll-acts > .ll-form:only-child { grid-column: 1 / -1; max-width: 520px; }
.ll-form .btn { margin-top: 8px; }
.ll-wait { color: var(--amber); }
.adm-loan-above { margin-top: 2px; color: var(--amber); font-weight: 500; }
@media (max-width: 699.98px) { .ll-acts { grid-template-columns: 1fr; } .ll-form .btn { width: 100%; } }
/* Penalties (Admin) and Absences and penalties (Me): the reply and the medical note under the absence. */
.pn-form, .pn-reply, .pn-note { margin-top: 14px; max-width: 520px; }
.pn-form .btn, .pn-reply .btn, .pn-note .btn { margin-top: 8px; }
.pn-page .rq-item .pn-form + .pn-form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 699.98px) { .pn-form .btn, .pn-reply .btn, .pn-note .btn { width: 100%; } }
/* The payslip explains each unauthorised absence and the monthly cap, one line each. */
.pay-doc-absences p { margin: 0; }
.pay-doc-absences p + p { margin-top: 2px; }
/* Today: the perfect attendance line under the attendance card (kpi.weight.attendance), in the green of "on time". */
.v-perfect { margin-top: 10px; font-size: 14px; line-height: 20px; color: var(--green); font-weight: 500; }
/* Release B, Penalties: the two decisions of a penalty or a medical note (each with its note) side by side on a computer, one
   under the other on a phone, each note field at full width; the ticks of a rule's form and of a loan over the limit are
   the design system's label.choice. */
.pn-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; margin-top: 14px; }
.pn-acts .pn-form { margin-top: 0; max-width: none; }
.pn-page .pn-acts .pn-form + .pn-form { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 699.98px) {
  .pn-acts { grid-template-columns: minmax(0, 1fr); }
  .pn-page .pn-acts .pn-form + .pn-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
}
.rb-form .choice.rb-none, .rb-form .choice.rb-unusual { margin-top: 4px; }
.pn-acts.pn-one { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
/* package 6(a): a payslip of a month before the application's first month: the notice, no figures */
.pay-doc-before { margin-block: 18px; padding-block: 14px; border-block: 1px solid var(--line); }
.pay-doc-before-title { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); }
/* Package 8 (the owner's mockup of 29 November 2026): Admin, Tasks: List | Board | Calendar, read only. */
.tv-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--v-line-2); border-radius: 12px; background: #FFF; }
.tv-switch a { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--v-t2); white-space: nowrap; }
.tv-switch a.is-current { background: var(--navy); color: #FFF; }
.tv-switch.is-by a.is-current { background: var(--blue-wash); color: var(--blue-press); }
.top-actions .tv-switch { order: -1; }
.tv-switch.is-narrow { display: flex; margin-bottom: 12px; }
.tv-switch.is-narrow a { flex: 1; height: 40px; }
.tv-foot { margin-top: 12px; font-size: 12px; line-height: 17px; color: var(--v-t3); }
.bd { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; align-items: start; margin-top: 10px; padding-bottom: 6px; overflow-x: auto; }
.bd-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border-radius: 16px; background: var(--v-line); }
.bd-head, .bd-top, .bd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.bd-head { padding: 4px 6px 0; }
.bd-head h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 20px; }
.bd-n { padding: 2px 10px; border-radius: 99px; background: #FFF; font-size: 13px; font-weight: 500; color: var(--v-t2); }
.bd-sub { margin: -6px 6px 0; }
.bd-sub, .bd-top, .bd-foot, .bd-none, .bd-of { font-size: 12px; line-height: 17px; color: var(--v-t2); }
.bd-none, .bd-of { padding: 2px 6px; color: var(--v-t3); }
.bd-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--v-ok); }
.bd-dot.is-admin { background: var(--v-indigo); } .bd-dot.is-engineer { background: var(--blue); } .bd-dot.is-warehouse { background: var(--v-late); } .bd-dot.is-cancelled { background: var(--v-exc); }
.bd-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--v-line); border-radius: 12px; background: #FFF; }
.bd-card.is-over { border-color: var(--v-bad); }
.bd-card > .mk { position: absolute; inset-block: 10px; inset-inline-start: -1px; width: 4px; height: auto; margin: 0; border-radius: 2px; background: var(--v-bad); }
.bd-top > bdi, .bd-prio { font-weight: 600; color: var(--v-t3); }
.bd-prio.is-high { color: var(--v-late-t); } .bd-prio.is-urgent { color: var(--v-bad-t); }
.bd-title { font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.bd-site { font-size: 13px; line-height: 18px; color: var(--v-t2); }
.bd-eng { display: flex; align-items: center; gap: 6px; color: #344054; overflow-wrap: anywhere; }
.bd-ini { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-wash); color: var(--blue); font-size: 11px; line-height: 1; font-weight: 600; vertical-align: middle; }
.bd-when { margin-inline-start: auto; font-weight: 500; color: #344054; } .bd-when.is-due { font-weight: 600; color: var(--v-bad-t); }
.bd-card .st, .bd-more { align-self: flex-start; }
.bd-more { padding: 6px; font-size: 13px; font-weight: 600; color: var(--blue); }
.bd-chips { display: flex; gap: 8px; margin: 2px -16px 4px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.bd-chips a { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 40px; padding: 0 14px; border: 1px solid var(--v-line-2); border-radius: 99px; background: #FFF; font-size: 13px; }
.bd-chips a.is-current { border-color: var(--navy); background: var(--navy); color: #FFF; }
@media (max-width: 699.98px) {
  .bd { grid-auto-columns: min(86%, 330px); gap: 12px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .bd-col { scroll-snap-align: start; }
}
@media (max-width: 359.98px) { .bd, .bd-chips { margin-inline: -12px; padding-inline: 12px; scroll-padding-inline: 12px; } }
.cal-bar, .cal-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 6px 0 12px; }
.cal-ctl, .cal-nav, .cal-go { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.cal-range { font-size: 14px; font-weight: 500; color: var(--v-t2); }
.cal-step { width: 40px; padding: 0; justify-content: center; }
.cal-prev .ic { transform: scaleX(-1); } html[dir="rtl"] .cal-prev .ic { transform: none; }
.cal-go .input { width: auto; height: 36px; }
.cal-box { overflow-x: auto; border: 1px solid var(--v-line); border-radius: 16px; background: #FFF; }
.cal { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
.cal th, .cal td { padding: 8px; border-bottom: 1px solid var(--v-line); border-inline-start: 1px solid var(--v-line); text-align: start; vertical-align: top; font-weight: 400; }
.cal tr > :first-child { width: 180px; padding: 12px 16px; border-inline-start: 0; }
.cal tbody tr:last-child > * { border-bottom: 0; }
.cal-corner, .cal-day span, .cal-day small { font-size: 12px; line-height: 16px; color: var(--v-t2); }
.cal-corner { vertical-align: bottom !important; }
.cal-day span, .cal-day b, .cal-day small { display: block; }
.cal-day b { font-size: 18px; line-height: 24px; font-weight: 600; }
.cal-day.is-today { background: var(--blue-wash); } .cal-day.is-today > * { color: var(--blue-press); }
.cal-day.is-off { background: #F2F4F7; } .cal-day.is-off > * { color: var(--v-t3); }
.cal-who { font-size: 14px; line-height: 20px; font-weight: 500 !important; }
.cal-who .bd-ini { width: 30px; height: 30px; margin-inline-end: 8px; font-size: 12px; }
.cal-cell { height: 92px; }
.cal-cell.is-today { background: #FAFCFF; } .cal-cell.is-off { background: #F9FAFB; }
.cal-it { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; padding: 7px 9px; border: 1px solid #DCE6FF; border-radius: 8px; background: #F8FAFF; }
.cal-it-t { font-size: 11px; line-height: 15px; color: var(--v-t2); }
.cal-it-t > bdi, .cal-it-tm { white-space: nowrap; }
.cal-it-s { font-size: 12px; line-height: 16px; font-weight: 500; overflow-wrap: anywhere; }
.cal-it.is-over { border-color: var(--v-bad); border-inline-start-width: 4px; background: var(--v-bad-w); }
.cal-it.is-done { border-color: var(--v-line); background: #F9FAFB; }
.cal-leave { display: block; margin-bottom: 6px; padding: 7px 9px; border-radius: 8px; background: #F2F4F7; font-size: 12px; font-weight: 500; color: var(--v-t2); }
.cal-empty { padding: 20px 16px !important; color: var(--v-t3); }
.calp-days { display: flex; gap: 4px; margin-bottom: 12px; }
.calp-d { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 12px; background: #FFF; font-size: 12px; font-weight: 500; }
.calp-d b { font-size: 16px; line-height: 20px; }
.calp-d.is-off { background: var(--v-line); color: var(--v-t3); }
.calp-d.is-today { box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue-press); }
.calp-d.is-pick { background: var(--blue); color: #FFF; box-shadow: none; }
.calp-t { margin-bottom: 10px; font-size: 13px; color: var(--v-t2); }
.calp-g { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--v-line); border-radius: 14px; background: #FFF; }
.calp-g h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.calp .cal-it { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 9px 10px; }
.calp .cal-it-s { display: flex; flex-direction: column; font-size: 13px; line-height: 18px; }
.calp .cal-it-s small { font-size: 11px; font-weight: 400; color: var(--v-t3); }
.calp .cal-it-t { font-size: 13px; white-space: nowrap; }
.calp .cal-leave { margin: 0; }
/* Package 8, light motion: only when the page set html.motion (never with "reduce motion", on a device that reports 2 GB of
   memory or less, or on an automatic reload), only transform and opacity, 200 ms. The cards of the employee's Today page do
   not fade in: measured, it held their first paint back by 8% (over the 5% budget), so that item was dropped there. */
@keyframes mo-in { from { opacity: 0; transform: translateY(8px); } }
html.motion .flashes > *, html.motion .toast, html.motion .bd-card, html.motion .v-ov .v-card { animation: mo-in .2s ease-out backwards; }
html.motion .bd-card:nth-of-type(2), html.motion .v-ov .v-card:nth-of-type(2) { animation-delay: 30ms; }
html.motion .bd-card:nth-of-type(3), html.motion .v-ov .v-card:nth-of-type(3) { animation-delay: 60ms; }
html.motion .bd-card:nth-of-type(n+4), html.motion .v-ov .v-card:nth-of-type(n+4) { animation-delay: 90ms; }
/* Package 8b: on a phone, the board's own column chips are its one row of tabs; the page's quick filters (All, With Admin,
   ...) stay in the list and the calendar, and on a tablet or a computer. */
@media (max-width: 699.98px) { .content.tv-board > .toolbar2 { display: none; } }
/* Package 9a (the owner, 30 November 2026): the payroll report's wide table (1440 px and wider). A heading wraps only
   between words; an amount stays whole, with its tag under it; the lines of "Other" (housing, adjustments, paid early)
   wrap inside their own cell; the columns keep their shares but never shrink below their content, so nothing reaches into
   the next column (the table's own box scrolls sideways only if a month's figures ever need more room). 3 px each side of
   a cell: with a posted month's figures the sixteen columns fit 1440 px with the Payslip and History buttons in view. */
.adm-pay-table th { overflow-wrap: normal; word-break: normal; }
@media (min-width: 1440px) {
  .adm-pay-table { table-layout: auto; }
  .adm-pay-table th, .adm-pay-table td { padding-inline: 3px; }
  .adm-pay-table td.num { white-space: normal; }
  .adm-pay-table td bdi { white-space: nowrap; }
  .adm-pay-table td.num .vt { display: flex; justify-content: flex-end; margin-top: 2px; }
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .adm-pay-table .vt { padding: 3px 6px; }
}
/* Package 9b (the owner, 30 November 2026): Admin -> Loans as a dashboard of the employees with loans (a table on a
   computer, one card per employee on a phone), and an employee's loan page (one block per loan, ruled, its schedule,
   deductions by hand and history closed below it). */
.adm-loanb .adm-loan-top .figs { flex: 1 1 100%; max-width: none; }
.adm-loanb-tools { align-items: center; }
.adm-loanb-search { display: flex; align-items: center; gap: 8px; margin: 0; }
.adm-loanb-search .tk-q { position: relative; display: block; }
.adm-loanb-search .tk-q .ic { position: absolute; inset-inline-start: 10px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--ink-3); pointer-events: none; }
.adm-loanb-search .input { width: 220px; height: 36px; padding-inline-start: 36px; }
.adm-loanb-table { font-variant-numeric: tabular-nums; }
.adm-loanb-table td { vertical-align: middle; }
.adm-loanb-table small { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.adm-loanb-who .t1 { display: block; font-weight: 500; color: var(--ink); }
.adm-loanb-who .t1:hover { color: var(--blue); }
.adm-loanb-who .t2, .adm-loanb-table td .t2 { display: block; }
.adm-loanb-owed b { font-weight: 600; }
.adm-loan-card { padding: 16px 0 18px; border-top: 1px solid var(--line); }
.adm-loan-card:first-of-type { border-top: 0; }
.adm-loan-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.adm-loan-card-head h3 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; }
.adm-loan-card .adm-loan-st { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 0; }
.adm-loan-card .meter { margin-top: 10px; }
.adm-loan-card .kv dd small { margin-inline-start: 4px; }
.adm-loan-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0 4px; }
.adm-loan-acts form { margin: 0; }
.adm-loan-card .disc { margin-top: 8px; }
.adm-loan-months { margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.adm-loan-months li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.adm-loan-months li:last-child { border-bottom: 0; }
.adm-loan-months li .num { text-align: end; }
.adm-loan-months li small { font-size: 12px; color: var(--ink-2); }
.adm-loan-done .disc-body > .adm-loan-card:first-child { border-top: 0; }
@media (max-width: 699.98px) {
  .adm-loanb-tools { flex-direction: column; align-items: stretch; }
  .adm-loanb-search .tk-q { flex: 1 1 auto; }
  .adm-loanb-search .input { width: 100%; height: 40px; font-size: 16px; }
  .adm-loanb-table, .adm-loanb-table tbody { display: block; }
  .adm-loanb-table thead { display: none; }
  .adm-loanb-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .adm-loanb-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .adm-loanb-table td.num { text-align: start; white-space: normal; }
  .adm-loanb-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-2); }
  .adm-loanb-table td.adm-loanb-who { grid-column: 1 / -1; }
  .adm-loanb-table td.adm-loanb-who .t1 { font-size: 16px; line-height: 22px; }
  .adm-loan-months li { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-loan-months li > :nth-child(3) { grid-column: 1 / -1; }
  .adm-loan-acts form.adm-loan-pay { flex: 1 1 100%; }
}
.adm-loan-months li > .st { justify-self: start; }
/* Package 9b: the employee's month page (a summary of the month, then one tab per subject, a scrollable chip row on a
   phone) and the settings page. */
.em-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 6px; }
.em-head .person { padding: 0; }
.em-net { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 6px 0 12px; }
.em-net b { font-size: 28px; line-height: 34px; font-weight: 600; font-variant-numeric: tabular-nums; }
.em-net b.is-est { color: var(--ink-2); }
.em-net > span:not(.vt) { font-size: 14px; color: var(--ink-2); }
.em-figs dd small, .em-tab .kv dd small { display: inline; margin-inline-start: 8px; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.em-tabs { margin: 18px 0 4px; }
.em-kinds { margin: 4px 0 10px; }
.em-list { margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.em-list li { display: grid; grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1fr); align-items: center; gap: 6px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.em-list li:last-child { border-bottom: 0; }
.em-list li > .st, .em-list li > span > .st { justify-self: start; }
.em-list li .num { text-align: end; }
.em-list li i { font-style: normal; color: var(--ink-3); }
.em-list li small { font-size: 12px; color: var(--ink-2); }
.em-kpi-parts li, #em-kpi-parts li { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.em-sheet { overflow-x: auto; }
.em-go { margin-top: 10px; }
@media (max-width: 699.98px) {
  .em-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .em-list li > :nth-child(n+3) { grid-column: 1 / -1; }
  .em-net b { font-size: 24px; line-height: 30px; }
}
.link-plain { color: inherit; } .link-plain:hover { color: var(--blue); }

/* Package 9b: on a phone the figures at the top of the Loans dashboard and of an employee's loan page sit two by two, so an
   amount is never cut off. */
@media (max-width: 699.98px) {
  .adm-loanb .adm-loan-top .figs, .adm-loanp .adm-loan-top .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
}

/* Package 9c: the company's violations on the rule page: one group per violation, hairlines between them (no boxes); the
   disciplinary penalties on Admin → Penalties and on the employee's page. */
.rb-viol { margin: 4px 0 0; }
.rb-vrow { margin: 0; padding: 12px 0 4px; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rb-vrow:last-child { border-bottom: 0; }
.rb-vrow > legend { padding: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }

/* Package 9b layout fix (the owner, 30 November 2026), wide screens. The Loans board's filters (All, Active, Paid off,
   Find) are part of the card on their own row, 16 px or more above the column headings, with no floating shadow over them.
   A right-aligned figure followed by left-aligned words keeps a real gutter (32 px or more) so the two never read as one
   value: "Of base wage" and "Ends" on the board, the amount and its state on a loan's months, the balance and "Ends" on the
   month page's Loans tab. Logical properties: in Arabic the sides swap and the gutter stays between the two. */
.adm-loanb-tools { margin-block-end: 16px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .adm-loanb-tools { padding: 0; border-radius: 0; background: transparent; box-shadow: none; margin-block-end: 20px; }
@media (min-width: 700px) {
  .adm-loanb-table th.adm-loanb-ends, .adm-loanb-table td.adm-loanb-ends { padding-inline-start: 32px; }
  .adm-loan-months li > .num + * { margin-inline-start: 24px; }
  .em-loans li > .num + span:not(.num) { padding-inline-start: 22px; }
}

/* The employee page (admin/employee_detail.php), the owner's layout of 30 November 2026. The person's card (photo, code,
   name, job title, role, status, and the record's facts), the month's net in its own blue card, attendance, lateness,
   absences and the KPI score as four cards, the money of the month in three groups, the tabs with icons, and a
   structured KPI tab. Display only. Logical properties throughout: in Arabic the card reads from the right. */
.em-month .em-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "photo who edit" "facts facts facts"; align-items: center; gap: 16px 18px; margin-top: 6px; padding: 18px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.em-month .em-head > .person { grid-area: photo; padding: 0; }
.em-month .em-head .avatar.xl { width: 72px; height: 72px; flex-basis: 72px; font-size: 22px; object-fit: cover; }
.em-month .em-head .em-who { grid-area: who; min-width: 0; }
.em-month .em-head #em-edit { grid-area: edit; align-self: start; gap: 6px; }
.em-month .em-head #em-edit .ic { width: 16px; height: 16px; }
.em-month .em-head .em-facts { grid-area: facts; }
.em-code { display: inline-block; margin: 0 0 6px; padding: 2px 8px; border-radius: 6px; background: var(--blue-wash); color: var(--blue); font-size: 12px; line-height: 16px; font-weight: 600; }
.em-name { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.em-role { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 0; font-size: 14px; line-height: 20px; color: var(--v-t2); }
.em-role > span:not(.st) + span:not(.st)::before { content: ""; display: inline-block; width: 1px; height: 14px; margin-inline-end: 12px; background: var(--v-line-2); vertical-align: -2px; }
.em-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 0; padding-top: 14px; border-top: 1px solid var(--v-line); }
.em-facts > div { min-width: 0; }
.em-facts dt { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--v-t3); }
.em-facts dt .ic { width: 18px; height: 18px; flex: 0 0 18px; color: var(--blue); }
.em-facts dd { margin: 4px 0 0; padding-inline-start: 26px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

.app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-sum { margin-top: 16px; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.em-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.em-month .em-net { position: relative; grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 132px; padding: 20px 22px; border-radius: 20px; background: var(--v-hero); color: #FFFFFF; box-shadow: 0 8px 24px rgba(18, 97, 255, 0.24); overflow: hidden; }
.em-month .em-net .em-net-l { font-size: 14px; line-height: 20px; font-weight: 500; color: rgba(255, 255, 255, 0.9); }
.em-month .em-net .em-net-m { font-weight: 400; }
.em-month .em-net b, .em-month .em-net b.is-est { position: relative; z-index: 1; font-size: 32px; line-height: 38px; font-weight: 600; color: #FFFFFF; letter-spacing: -0.01em; }
.em-month .em-net > span[data-waiver-pending] { color: #FFFFFF; font-size: 13px; line-height: 18px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-net .vt { position: relative; z-index: 1; background: #FFFFFF; color: var(--v-t2); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-net .vt.est { background: #FEF0C7; color: #93370D; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-net .vt.final { background: var(--v-ok-w); color: var(--v-ok-t); }
.em-month .em-net .em-net-ic { position: absolute; inset-inline-end: 20px; top: 50%; margin-top: -32px; color: rgba(255, 255, 255, 0.28); pointer-events: none; }
.em-month .em-net .em-net-ic .ic { width: 64px; height: 64px; stroke-width: 1.2; }
.em-stat { min-width: 0; padding: 18px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.em-stat > p { margin: 12px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--v-t2); }
.em-stat > p.em-stat-v { margin-top: 4px; font-size: 28px; line-height: 34px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.em-stat > p.em-stat-v small { display: block; margin: 2px 0 0; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--v-t3); }

.em-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.em-group { min-width: 0; padding: 18px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.em-group > h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--ink); }
.em-group .em-figs { margin: 0; }
.em-group .em-figs > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; padding: 11px 0; border-bottom: 1px solid var(--v-line); }
.em-group .em-figs > div:last-child { border-bottom: 0; padding-bottom: 0; }
.em-group .em-figs dt { font-size: 14px; line-height: 20px; color: var(--v-t2); }
.em-group .em-figs dd { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); text-align: end; font-variant-numeric: tabular-nums; }
.em-group .em-figs dd small { display: block; margin: 2px 0 0; font-weight: 400; }
.em-group .em-figs dd .vt { vertical-align: middle; }

.app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-tabs { gap: 4px; margin: 18px 0 0; padding: 6px; border-radius: 16px; background: #FFFFFF; box-shadow: var(--v-shadow); }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-tabs a { gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-tabs a:not(.is-current) { background: transparent; color: #344054; }
.app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-tabs a:not(.is-current):hover { background: #F2F4F7; }
.em-tabs a .ic { width: 18px; height: 18px; flex: 0 0 18px; }

.em-kpi-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.em-kpi-score { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 18px; border-radius: 16px; background: var(--blue-wash); }
.em-kpi-score > .v-it { grid-row: span 2; width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; background: #FFFFFF; }
.em-kpi-score > .v-it .ic { width: 26px; height: 26px; }
.em-kpi-score > p { margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--v-t2); }
.em-kpi-score > b { font-size: 34px; line-height: 40px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.em-kpi-score > .meter, .em-kpi-score > .vt { grid-column: 1 / -1; justify-self: start; }
.em-kpi-score > .meter { width: 100%; margin-top: 8px; }
.em-kpi-parts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 28px; }
.em-kpi-part .kpi { padding: 12px 0; }

@media (min-width: 700px) {
  .app.is-vivid .page .content:not(.v-today):not(.v-ov) .em-tabs { flex-wrap: wrap; overflow: visible; }
  .em-month .em-net { padding-inline-end: 104px; }
  .em-groups > .em-group[data-group="info"] .em-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .em-groups > .em-group[data-group="info"] .em-figs > div:nth-last-child(2) { border-bottom: 0; padding-bottom: 0; }
  .em-month .em-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .em-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .em-top { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .em-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-groups > .em-group[data-group="info"] { grid-column: 1 / -1; }
  .em-kpi-top { grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr); }
  .em-kpi-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .em-month .em-head { grid-template-columns: auto minmax(220px, 1fr) auto auto; grid-template-areas: "photo who facts edit"; gap: 18px 28px; padding: 22px 26px;
    background: linear-gradient(to left, #EEF3FF 0, #FFFFFF 46%); }
  html[dir="rtl"] .em-month .em-head { background: linear-gradient(to right, #EEF3FF 0, #FFFFFF 46%); }
  .em-month .em-head .avatar.xl { width: 88px; height: 88px; flex-basis: 88px; font-size: 26px; }
  .em-name { font-size: 26px; line-height: 32px; }
  .em-facts { grid-template-columns: repeat(4, auto); gap: 0 28px; padding-top: 0; border-top: 0; }
  .em-top { grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); }
  .em-month .em-net { grid-column: auto; padding-inline-end: 22px; }
  .em-month .em-net .em-net-ic { display: none; }
  .em-month .em-net b, .em-month .em-net b.is-est { white-space: nowrap; font-size: 30px; line-height: 36px; }
  .em-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .em-groups > .em-group[data-group="info"] { grid-column: auto; }
  .em-groups > .em-group[data-group="info"] .em-figs { display: block; }
  .em-groups > .em-group[data-group="info"] .em-figs > div:nth-last-child(2) { border-bottom: 1px solid var(--v-line); padding-bottom: 11px; }
}
@media (max-width: 699.98px) {
  .em-month .em-head { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "photo who" "edit edit" "facts facts"; }
  .em-month .em-head .avatar.xl { width: 60px; height: 60px; flex-basis: 60px; }
  .em-month .em-head #em-edit { justify-self: start; }
  .em-month .em-net b, .em-month .em-net b.is-est { font-size: 28px; line-height: 34px; }
  .em-stat > p.em-stat-v { font-size: 24px; line-height: 30px; }
}
@media (min-width: 1600px) {
  .em-month .em-net { padding-inline-end: 104px; }
  .em-month .em-net .em-net-ic { display: block; }
}

/* The owner's review of 30 November 2026, three pages (display only; page-scoped).
   Payroll report (admin/reports.php), the wide table (1440 px and wider): no column is squeezed below its content any more.
   A heading wraps only between words; an amount, a value tag ("Estimate") and a status ("Waiver decision needed") each stay
   on one line. When the sixteen columns are wider than the card, the table scrolls sideways inside it, and three things stay
   in view while it does: the employee (name and state) at the start, and the net salary and the Payslip and History buttons
   at the end, each set off by a hairline. On a wide screen the report's page may use up to 1680 px (other pages keep 1392),
   so at 1920 px the table fits and nothing moves. Narrower widths keep
   one ruled block per employee: a value tag keeps its own width instead of stretching into a bar, and an amount's unit stays
   beside the amount, with its tag under them. */
@media (min-width: 1440px) {
  #payroll-report-table col { width: auto; }
  #payroll-report-table th, #payroll-report-table td { padding-inline: 8px; }
  #payroll-report-table th { white-space: normal; overflow-wrap: normal; }
  #payroll-report-table td.num, #payroll-report-table .st, #payroll-report-table .vt { white-space: nowrap; }
  #payroll-report-table td.num .vt { width: fit-content; margin-inline-start: auto; }
  #payroll-report-table td.adm-pay-other, #payroll-report-table td.adm-pay-net { white-space: normal; }
  #payroll-report-table td.adm-pay-other { min-width: 104px; }
  #payroll-report-table td.adm-pay-batch { min-width: 96px; }
  #payroll-report-table thead tr:first-child th:first-child, #payroll-report-table td.adm-pay-emp {
    position: sticky; inset-inline-start: 0; z-index: 1; min-width: 172px; background: var(--paper); box-shadow: inset -1px 0 0 var(--line); }
  #payroll-report-table thead tr:first-child th:nth-last-child(3), #payroll-report-table td.adm-pay-net {
    position: sticky; inset-inline-end: 92px; z-index: 1; min-width: 150px; background: var(--paper); box-shadow: inset 1px 0 0 var(--line); }
  #payroll-report-table thead tr:first-child th:last-child, #payroll-report-table td.adm-pay-go {
    position: sticky; inset-inline-end: 0; z-index: 1; box-sizing: border-box; width: 92px; min-width: 92px; max-width: 92px; background: var(--paper); }
  html[dir="rtl"] #payroll-report-table thead tr:first-child th:first-child, html[dir="rtl"] #payroll-report-table td.adm-pay-emp { box-shadow: inset 1px 0 0 var(--line); }
  html[dir="rtl"] #payroll-report-table thead tr:first-child th:nth-last-child(3), html[dir="rtl"] #payroll-report-table td.adm-pay-net { box-shadow: inset -1px 0 0 var(--line); }
  #payroll-report-table td.adm-pay-go .btn-sm { display: flex; white-space: nowrap; padding-inline: 8px; }
}
@media (min-width: 1500px) { .app.is-vivid .page .content.adm-pay-report:not(.v-today):not(.v-ov) { max-width: 1680px; } }
@media (max-width: 1439.98px) {
  #payroll-report-table td .vt { width: fit-content; max-width: 100%; }
  #payroll-report-table td.adm-pay-net > .vt { margin-inline-start: auto; }
}
@media (min-width: 700px) and (max-width: 1439.98px) {
  #payroll-report-table td.adm-pay-m:has(> .vt) { display: grid; grid-template-columns: max-content max-content; justify-content: start; align-items: baseline; }
  #payroll-report-table td.adm-pay-m:has(> .vt)::before { grid-column: 1 / -1; }
  #payroll-report-table td.adm-pay-m:has(> .vt)::after { grid-row: 2; grid-column: 2; }
  #payroll-report-table td.adm-pay-m:has(> .vt) > .vt { grid-row: 3; grid-column: 1 / -1; margin-top: 2px; }
}
@media (max-width: 699.98px) {
  #payroll-report-table td.adm-pay-m:has(> .vt)::after { order: 1; }
  #payroll-report-table td.adm-pay-m:has(> .vt) > .vt { order: 2; }
}

/* Engineer map (admin/map.php): the key tells an engineer's live location (a round marker, its ring coloured by status)
   from a work site (a dark dot inside its check-in area); a note on the map says when no engineer is sharing. */
.adm-map-stage { position: relative; min-width: 0; }
.adm-map-overlay { position: absolute; z-index: 500; inset-block-start: 12px; inset-inline: 56px; width: fit-content; max-width: calc(100% - 112px); margin: 0 auto; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 1px 4px rgba(10, 19, 38, 0.18); font-size: 13px; line-height: 18px; color: var(--ink); text-align: center; pointer-events: none; }
.adm-map-overlay[hidden] { display: none; }
.adm-map .adm-map-key { display: block; padding-top: 14px; }
.adm-map-key-h { margin: 10px 0 6px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }
.adm-map-key-h:first-child { margin-top: 0; }
.adm-map-key-list { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 18px; color: var(--ink); }
.adm-map-key-list li { display: inline-flex; align-items: center; gap: 8px; }
.adm-map .kx { display: inline-block; flex: 0 0 auto; box-sizing: border-box; border-radius: 50%; }
.adm-map .kx-eng { width: 16px; height: 16px; border: 3px solid var(--ink-4); background: var(--paper); box-shadow: 0 1px 2px rgba(10, 19, 38, 0.25); }
.adm-map .kx-live { border-color: var(--green); }
.adm-map .kx-stale { border-color: var(--amber); }
.adm-map .kx-offline { border-color: var(--ink-4); opacity: 0.85; }
.adm-map .kx-site { width: 12px; height: 12px; margin-inline: 3px; background: #0A1326; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 7px rgba(18, 97, 255, 0.16); }
.adm-map-empty-site { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* System health (admin/system_health.php): every section's labels in one column of the same width, each value beside its
   label as one piece of text (not spread across the row), and a long explanation on its own line under the value, at a
   readable width. */
@media (min-width: 700px) {
  section[id^="health-"] .kv { grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); }
  section[id^="health-"] .kv dt { min-width: 0; }
}
#health-backups > .kv dd { display: block; }
#health-backups #health-copy-encrypted { max-width: 68ch; margin-top: 4px; font-weight: 400; color: var(--ink-2); }

/* Package 10 (the owner, 1 December 2026): the Payroll report's wide table (1440 px and wider) keeps KPI %, KPI bonus and
   KPI waiver in view with the net and the buttons: the five stay at the end while the money columns between the employee
   and them scroll sideways inside the card (the empty "Batch and reconciliation" column is left out in a month without a
   batch). Each pinned cell's offset is the width of the pinned cells after it, measured by the page (admin/reports.php);
   the values here hold until then. Package 9's rules placed the net by its position (the 3rd heading from the end), which
   is no longer the net without the batch column: they are reset here, by position, and set again by name. */
@media (min-width: 1440px) {
  #payroll-report-table th, #payroll-report-table td { padding-inline: 6px; }
  #payroll-report-table td.adm-pay-other { min-width: 0; }
  #payroll-report-table thead tr:first-child th:nth-last-child(3) { position: static; min-width: 0; box-shadow: none; background: transparent; }
  html[dir="rtl"] #payroll-report-table thead tr:first-child th:nth-last-child(3) { box-shadow: none; }
  #payroll-report-table thead tr:first-child th.adm-pay-net-h, #payroll-report-table tr > td.adm-pay-net {
    position: sticky; inset-inline-end: var(--pin-net, 92px); z-index: 1; min-width: 0; background: var(--paper); box-shadow: none; }
  #payroll-report-table thead tr:first-child th.adm-pay-waiver-h, #payroll-report-table tr > td.adm-pay-waiver {
    position: sticky; inset-inline-end: var(--pin-waiver, 270px); z-index: 1; background: var(--paper); }
  #payroll-report-table thead tr:first-child th.adm-pay-bonus-h, #payroll-report-table tr > td.adm-pay-bonus {
    position: sticky; inset-inline-end: var(--pin-bonus, 330px); z-index: 1; background: var(--paper); }
  #payroll-report-table thead tr:first-child th.adm-pay-kpi-h, #payroll-report-table tr > td.adm-pay-kpi {
    position: sticky; inset-inline-end: var(--pin-kpi, 425px); z-index: 1; background: var(--paper); box-shadow: inset 1px 0 0 var(--line); }
  html[dir="rtl"] #payroll-report-table tr > td.adm-pay-net, html[dir="rtl"] #payroll-report-table thead tr:first-child th.adm-pay-net-h { box-shadow: none; }
  html[dir="rtl"] #payroll-report-table thead tr:first-child th.adm-pay-kpi-h, html[dir="rtl"] #payroll-report-table tr > td.adm-pay-kpi { box-shadow: inset -1px 0 0 var(--line); }
}

/* Package 12 (the owner, 1 December 2026): Error code lookup (me/scanner_codes.php). The code is the strongest thing on the
   result. The manufacturer's text keeps its language and direction and carries the manual's name; an EIS note sits on the
   quiet ground with its own label, so the two are never read as one. */
.sc-form { display: grid; gap: 16px; max-width: 520px; padding-top: 4px; }
.sc-form .field + .field { margin-top: 0; }
.sc-code { height: 56px; font-size: 22px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-actions { display: flex; gap: 10px; }
.sc-result .sc-model { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.sc-result h2 { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.sc-num { font-size: 44px; line-height: 48px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-title { font-size: 18px; line-height: 26px; font-weight: 500; overflow-wrap: anywhere; }
.sc-title.is-missing { font-weight: 400; color: var(--ink-2); }
html[dir="rtl"] .sc-result h2 > [dir="ltr"] { text-align: right; }
.sc-by { font-size: 13px; line-height: 18px; color: var(--ink-2); margin-top: 12px; }
.sc-text { font-size: 16px; line-height: 24px; margin-top: 4px; overflow-wrap: anywhere; }
.sc-steps { list-style: none; counter-reset: sc; margin: 6px 0 0; padding: 0; }
.sc-steps > li { border-bottom: 1px solid var(--line); }
.sc-step { counter-increment: sc; position: relative; padding-block: 11px; padding-inline-start: 36px; font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.sc-step::before { content: counter(sc); position: absolute; inset-inline-start: 0; top: 11px; min-width: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc-sub { list-style: none; margin: 6px 0 0; padding: 0; }
.sc-sub > .sc-step { counter-increment: none; padding-block: 3px; padding-inline-start: 18px; font-size: 15px; line-height: 22px; }
.sc-sub > .sc-step::before { content: "–"; top: 3px; min-width: 0; font-weight: 400; color: var(--ink-2); }
.sc-note { padding-block: 10px; }
.sc-sub > .sc-note { padding-block: 5px; }
.sc-eis { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--fill); font-size: 14px; line-height: 21px; overflow-wrap: anywhere; }
.sc-eis-l { font-size: 13px; line-height: 18px; font-weight: 600; }
.sec > .sc-eis, .sc-safety { margin-top: 12px; }
.sc-orig { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-2); font-size: 13px; line-height: 19px; color: var(--ink-2); }
.sc-orig > [dir="ltr"] { display: block; color: var(--ink); }
@media (min-width: 700px) {
  .sc-num { font-size: 52px; line-height: 56px; }
  .sc-title { font-size: 20px; line-height: 28px; }
  .sc .sec > .sc-text, .sc .sc-steps, .sc .sec > .sc-eis, .sc .sc-safety { max-width: 760px; }
}
