/* ============================================================================
   Lucro HRMS — portal stylesheet

   Built on the shared Lucro design system (inventory-2.0/design-system), the
   one the yard app (cc) and the accounts app (scan2zoho) already use: a deep
   teal sidebar, a white working area on a cool grey ground, pill-shaped
   controls, and ONE lime action per screen. A new Lucro screen should sit
   beside those two without a seam.

   Two notes for anyone copying markup between the apps:

   * The design system's class names and this project's differ in two places.
     `.hd` is a CARD HEADER here and the TOP BAR there (the top bar is
     `.topbar` here); `.empty` is a table-cell empty state here and a whole
     card there. The tokens are identical, so colours and spacing travel even
     when the class does not.
   * Colour that carries meaning goes through the chip pairs — ok / warn /
     risk / info / neutral — not through `--green`, which is the LIME of the
     logo and is a fill or a mark only. Lime text on white is 1.9:1.

   LIGHT ONLY, matching the rest of the suite. `color-scheme:light` keeps
   native controls, form widgets and scrollbars light under a dark OS.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&display=swap');

/* ----------------------------------------------------------------------------
   1. TOKENS — verbatim from the design system's tokens.json (v1, synced
      2026-11-26), plus the aliases this project's older rules still name.
   -------------------------------------------------------------------------- */
:root{
  color-scheme:light;

  /* Brand ------------------------------------------------------------------ */
  --teal:#004851;            /* primary action, focus, links, the sidebar     */
  --teal-d:#00343b;          /* hover of teal fills, section titles            */
  --navy:#0a2b30;            /* ink: titles, names, figures                    */
  --night:#06333a;           /* last stop of the teal gradients                */
  --deep:#123047;            /* second stop of the avatar gradient             */
  --green:#a6ce39;           /* LIME. A fill or a mark only — never words      */
  --green-d:#7fa000;
  --green-tint:#eef6d6;
  --lime-ink:#cde878;        /* active nav text on the teal sidebar            */
  --teal-tint:#e4f1f2;
  --teal-50:#eef4f4;
  --mist:#b7cdd0;            /* secondary text on teal                         */
  --mist-2:#cfe0e2;

  /* On the teal sidebar ----------------------------------------------------- */
  --on-teal:rgba(255,255,255,.75);
  --on-teal-dim:rgba(255,255,255,.4);
  --on-teal-line:rgba(255,255,255,.14);
  --on-teal-fill:rgba(255,255,255,.08);
  --on-teal-hover:rgba(255,255,255,.06);
  --active-nav:rgba(166,206,57,.12);

  /* Surfaces ---------------------------------------------------------------- */
  --bg:#f5f7f7;
  --card:#ffffff;
  --line:#e2e7e6;
  --line-2:#eef2f2;
  --line-ctl:#d8d8d8;        /* border of pill-shaped controls                 */
  --sunk:#eef2f7;            /* segmented-control track                        */
  --row-hover:#f7fafa;
  --scrim:rgba(15,23,41,.42);

  /* Text -------------------------------------------------------------------- */
  --slate:#333333;           /* body text                                      */
  --muted:#69727d;           /* dates, counts, sub-lines, field labels         */
  --muted2:#9aa3b2;          /* resting icons and placeholders only            */
  --th-ink:#9aa5a6;          /* table headers                                  */

  /* Marks ------------------------------------------------------------------- */
  --amber:#e29a2b;  --amber-tint:#fbf0dc;
  --red:#db4b4b;    --red-tint:#fbe4e4;
  --blue:#3b77e0;   --blue-tint:#e8f0fe;
  --red-line:#ebb4b4;   --red-wash:#fffafa;
  --amber-line:#f0ddb6; --amber-wash:#fffdf7;

  /* Chip pairs — every one tested at 4.5:1 or better -------------------------- */
  --ok-bg:#e3f2e9;      --ok-ink:#116b3e;        /* done, active, approved     */
  --warn-bg:#fbf1dd;    --warn-ink:#93611a;      /* needs a look, pending      */
  --risk-bg:#fbe7e5;    --risk-ink:#a63527;      /* failed, declined, absent   */
  --info-bg:#e2eff1;    --info-ink:#0e6a73;      /* in progress, with someone  */
  --ai-bg:#ede9fb;      --ai-ink:#5b45b5;        /* only what the AI suggests  */
  --neutral-bg:#edf0f3;  --neutral-ink:#55606d;  /* off, elsewhere, not filed  */

  /* Chart series ------------------------------------------------------------ */
  --c1:#004851; --c2:#a6ce39; --c3:#5b45b5; --c4:#e29a2b; --c5:#db4b4b; --c6:#0e6a73;

  /* Geometry ---------------------------------------------------------------- */
  --pill:999px;
  --r-xl:22px; --r-lg:20px; --r-card:16px; --r-md:12px;
  --r-ctl:10px; --r-input:9px; --r-nav:8px; --r-sm:6px;
  --radius:16px;             /* legacy alias = card radius                     */

  /* Space ------------------------------------------------------------------- */
  --sp-4:4px; --sp-8:8px; --sp-12:12px; --sp-14:14px; --sp-16:16px;
  --sp-18:18px; --sp-20:20px; --sp-28:28px; --sp-32:32px;

  /* Layout ------------------------------------------------------------------ */
  --sidebar-w:224px;
  --topbar-h:60px;

  /* Elevation & focus ------------------------------------------------------- */
  --sh:0 1px 2px rgba(10,43,48,.06),0 8px 24px rgba(10,43,48,.10);
  --sh-lg:0 20px 48px rgba(10,43,48,.16);
  --sh-hover:0 4px 13px rgba(16,24,40,.11);
  --sh-bulk:0 12px 30px rgba(16,24,40,.25);
  --ring:0 0 0 3px rgba(0,72,81,.13);
  --scroll-thumb:#cdd8d8;

  /* Legacy aliases — older rules and ~30 inline template styles name these.
     Kept so nothing has to be hunted down twice; new work uses the names
     above. ---------------------------------------------------------------- */
  --canvas:var(--bg);
  --ink:var(--navy);
  --faint:var(--muted2);
  --surface-2:var(--teal-50);
  --surface-3:var(--sunk);
  --teal-deep:var(--teal-d);
  --teal-hover:var(--teal-d);
  --teal-soft:var(--teal-tint);
  --teal-softer:var(--teal-50);
  --brand:var(--teal);
  --brand-600:var(--teal-d);
  --brand-050:var(--teal-tint);
  --on-brand:#ffffff;
  --lime:var(--green);
  --grad:linear-gradient(135deg,var(--teal),var(--teal-d));
  --grad-hero:linear-gradient(135deg,var(--teal) 0%,var(--teal-d) 55%,var(--navy) 100%);
  --shadow:var(--sh);
  --shadow-pop:var(--sh-lg);
  --shadow-brand:var(--sh-hover);

  /* Type -------------------------------------------------------------------- */
  --font:"Plus Jakarta Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  --font-sans:var(--font);
  --font-mono:ui-monospace,Menlo,Consolas,"Liberation Mono",monospace;
}

/* ----------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
*{scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border-radius:99px;border:3px solid transparent;background-clip:content-box}
::selection{background:rgba(0,72,81,.2)}

html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--slate);
  font-family:var(--font);
  font-size:13.5px;
  line-height:1.5;
  letter-spacing:.005em;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
p{line-height:1.55}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4{margin:0;font-weight:700;letter-spacing:-.015em;color:var(--navy)}
code{font-family:var(--font-mono);background:var(--teal-50);border:1px solid var(--line);
  border-radius:var(--r-sm);padding:1px 5px;font-size:12.5px}
hr{border:0;border-top:1px solid var(--line);margin:16px 0}
img{max-width:100%}

/* Design-system icons: a 24px grid, stroke 1.9, colour from currentColor.
   Everything that draws one relies on this single rule. */
svg.i{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round;flex:none}

/* Figures that line up, line up. */
.num,.mono,.tbl td,.tbl th,.v,.kv dd{font-variant-numeric:tabular-nums}

:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important}
}

/* ----------------------------------------------------------------------------
   3. SHELL — layout / sidebar / main / content

   The design system's `app > side + main > hd + body`, under this project's
   own class names: .layout / .sidebar / .main / .topbar / .content.
   -------------------------------------------------------------------------- */
.layout{display:flex;min-height:100vh;background:var(--bg)}

.sidebar{
  width:var(--sidebar-w);flex:none;
  position:sticky;top:0;height:100vh;overflow:hidden;
  display:flex;flex-direction:column;padding:16px 0;
  background:linear-gradient(180deg,var(--teal-d),var(--teal));
  z-index:20;
}
/* The lime glow in the top corner — the one thing that makes the teal read as
   Lucro's rather than as any dark sidebar. */
.sidebar::before{
  content:"";position:absolute;right:-70px;top:-90px;width:260px;height:260px;
  border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(166,206,57,.16),transparent 70%);
}
.sidebar>*{position:relative}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.content{padding:var(--sp-28) var(--sp-32) 40px;width:100%}
.content>*{animation:fadeUp .3s cubic-bezier(.16,1,.3,1) both}

/* Brand lockup ------------------------------------------------------------- */
.brand{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:0 20px 12px;border-bottom:1px solid rgba(255,255,255,.1);
}
.brand .logo,.logo{
  width:30px;height:30px;border-radius:9px;flex:none;
  display:grid;place-items:center;font-weight:800;font-size:15px;
  color:var(--navy);
  background:linear-gradient(135deg,var(--green),var(--green-d));
}
.brand b{display:block;font-size:14.5px;font-weight:700;letter-spacing:-.015em;color:#fff}
.brand span{
  display:block;font-size:9px;font-weight:800;letter-spacing:.2em;
  text-transform:uppercase;color:var(--mist);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;
}

/* Nav ---------------------------------------------------------------------- */
.nav{display:flex;flex-direction:column;padding:6px 14px 0;flex:1 1 auto;
  min-height:0;overflow-y:auto;scrollbar-width:none}
.nav .label,.label{
  font-size:9.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--on-teal-dim);padding:11px 10px 3px;
}
.nav .label:first-child{padding-top:2px}
.nav a{
  display:flex;align-items:center;gap:11px;
  padding:7px 10px;border-radius:var(--r-nav);
  color:var(--on-teal);font-size:13px;font-weight:600;
  transition:background .18s,color .18s;
}
.nav a .i,.nav a .ic{width:16px;height:16px;color:rgba(255,255,255,.5);flex:none}
.nav a:hover{background:var(--on-teal-hover);color:#fff}
.nav a:hover .i,.nav a:hover .ic{color:#fff}
.nav a.active,.nav a.on{
  background:var(--active-nav);color:var(--lime-ink);font-weight:700;
  box-shadow:inset 2px 0 0 var(--green);
}
.nav a.active .i,.nav a.on .i,.nav a.active .ic,.nav a.on .ic{color:var(--lime-ink)}
.nav a .badge{margin-left:auto;background:var(--green);color:var(--navy);
  font-size:10.5px;font-weight:800;padding:1px 8px}
.nav .spacer,.spacer{flex:1}
.ic,.icon{display:inline-grid;place-items:center}

/* The signed-in person, at the foot of the sidebar ------------------------- */
.sideuser{
  display:flex;align-items:center;gap:10px;margin:8px 14px 0;
  padding:10px 8px 4px;border-top:1px solid rgba(255,255,255,.1);
}
.sideuser .av{
  width:34px;height:34px;border-radius:50%;flex:none;
  display:grid;place-items:center;font-weight:700;font-size:13px;
  color:var(--navy);background:linear-gradient(135deg,var(--green),var(--teal));
  border:1.5px solid rgba(255,255,255,.25);
}
.sideuser .un{font-size:13px;font-weight:600;color:#fff;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sideuser .ur{font-size:11px;color:var(--mist)}
.signout{
  display:flex;align-items:center;gap:9px;margin:10px 14px 0;padding:10px 11px;
  border:1px solid var(--on-teal-line);border-radius:var(--r-ctl);
  background:transparent;color:rgba(255,255,255,.8);
  font:inherit;font-weight:600;font-size:13px;cursor:pointer;
}
.signout:hover{background:var(--on-teal-hover);color:#fff}
.signout .i{width:16px;height:16px}

/* Top bar ------------------------------------------------------------------ */
.topbar{
  min-height:var(--topbar-h);
  background:var(--card);border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:var(--sp-14);flex-wrap:wrap;
  padding:0 var(--sp-32);position:sticky;top:0;z-index:10;
}
.topbar h1{font-size:15px;font-weight:700;letter-spacing:-.015em;
  color:var(--navy);white-space:nowrap}
.topbar .right,.right{margin-left:auto;display:flex;align-items:center;gap:var(--sp-12)}
.wbdate{font-size:12.5px;color:var(--muted);white-space:nowrap}

/* The search is a pill, like every other control. */
.topsearch{position:relative;flex:1;max-width:330px;min-width:190px}
.topsearch .si,.si{position:absolute;left:14px;top:50%;transform:translateY(-50%);
  color:var(--muted);pointer-events:none;display:grid;place-items:center}
.topsearch .si .i{width:13px;height:13px}
.topsearch input{
  width:100%;border:1px solid var(--line-ctl);border-radius:var(--pill);
  padding:7px 15px 7px 36px;background:var(--bg);
  font-family:inherit;font-size:12.5px;color:var(--navy);
}
.topsearch input::placeholder{color:var(--muted)}
.topsearch input:focus{outline:0;border-color:var(--teal);background:var(--card);
  box-shadow:var(--ring)}

/* Company switcher --------------------------------------------------------- */
.company-switch{position:relative}
.company-pill{
  display:flex;align-items:center;gap:8px;
  background:var(--card);color:var(--navy);
  border:1px solid var(--line-ctl);
  padding:6px 13px;border-radius:var(--pill);
  font-family:inherit;font-weight:600;font-size:12.5px;cursor:pointer;
  transition:.13s;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.company-pill:hover{border-color:var(--teal);box-shadow:var(--ring)}
.co-menu{
  display:none;position:absolute;right:0;top:calc(100% + 7px);
  background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-md);box-shadow:var(--sh-lg);
  min-width:220px;padding:6px;z-index:30;max-height:330px;overflow:auto;
}
.co-menu.open{display:block}
.co-menu a{display:block;padding:8px 11px;border-radius:var(--r-nav);font-size:13px;font-weight:500}
.co-menu a:hover{background:var(--bg)}
.co-menu a.current{color:var(--teal);background:var(--teal-50);font-weight:700}

/* User box in the top bar (kept for screens that still render it) ---------- */
.userbox{display:flex;align-items:center;gap:10px}
.userbox b{font-size:13px;font-weight:600;color:var(--navy);display:block;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
.userbox small{color:var(--muted);display:block;font-size:11.5px}
.avatar{
  width:32px;height:32px;border-radius:50%;flex:none;
  display:grid;place-items:center;font-weight:700;font-size:12px;color:#fff;
  background:linear-gradient(135deg,var(--teal),var(--deep));
}

/* The hamburger only exists below the phone breakpoint. */
.navtoggle{
  display:none;place-items:center;width:34px;height:34px;flex:none;
  border:1px solid var(--line);border-radius:var(--r-input);
  background:var(--card);color:var(--navy);cursor:pointer;
}
.scrim{
  display:none;position:fixed;inset:0;z-index:70;background:var(--scrim);
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
}
.scrim.on{display:block}

@media(max-width:760px){
  .sidebar{
    position:fixed;left:0;top:0;z-index:80;width:min(84vw,300px);
    transform:translateX(-106%);transition:transform .28s ease;
    box-shadow:0 0 44px rgba(15,23,41,.22);
  }
  .sidebar.open{transform:none}
  .topbar{min-height:auto;padding:12px 14px}
  .wbdate{display:none}
  .content{padding:14px 13px 34px}
  .navtoggle{display:inline-grid}
}


@keyframes fadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes pulseDot{0%,100%{opacity:.3}50%{opacity:1}}

/* ----------------------------------------------------------------------------
   4. PAGE FURNITURE
   -------------------------------------------------------------------------- */
 /* The design system puts the page's name in the top bar at 15px and says a
   page carries no second, bigger heading. So .page-title is sized as a GROUP
   title — it introduces the first block of the page rather than competing
   with the top bar for the name of the screen. */
.page-title{margin:0 2px 4px;font-size:15px;font-weight:700;
  letter-spacing:-.005em;color:var(--navy)}
.page-sub{color:var(--muted);margin:0 2px 18px;font-size:12.5px}
.muted{color:var(--muted)}
.mono,.ref{font-family:var(--font-mono);font-variant-numeric:tabular-nums;
  letter-spacing:.02em}
.ref{font-weight:700;color:var(--navy)}
.strong{font-weight:600;color:var(--navy)}
.sm{font-size:12.5px}
/* An empty state inside a table cell. The design system's full-card version is
   `.emptycard` below. */
.empty{padding:38px 20px;text-align:center;color:var(--muted);font-size:13px}
.emptycard{text-align:center;padding:54px 20px;color:var(--muted);
  background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-card);box-shadow:var(--sh)}
.toolbar{display:flex;gap:var(--sp-8);flex-wrap:wrap;align-items:center;
  margin-bottom:var(--sp-16)}

/* ----------------------------------------------------------------------------
   5. GRID & CARDS
   -------------------------------------------------------------------------- */
.grid{display:grid;gap:16px}
.stat-grid{grid-template-columns:repeat(4,1fr)}
.two{grid-template-columns:2fr 1fr}
@media(max-width:1040px){.stat-grid{grid-template-columns:repeat(2,1fr)}.two{grid-template-columns:1fr}}
@media(max-width:560px){.stat-grid{grid-template-columns:1fr}}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r-card);
  box-shadow:var(--sh);
  overflow:hidden;
}
.card.pad{padding:var(--sp-18) var(--sp-20)}

/* Card header. `.hd` is this project's name for the design system's `.pane-h`
   — note that `.hd` is the TOP BAR in cc and scan2zoho, where the top bar is
   `.topbar` here. It carries the teal tick either way. */
.hd{display:flex;align-items:center;gap:9px;padding:15px var(--sp-18);
  border-bottom:1px solid var(--line)}
.hd h3,.hd h2{display:flex;align-items:center;gap:9px;font-size:14px;
  font-weight:700;letter-spacing:0;color:var(--navy)}
.hd h3::before,.hd h2::before{
  content:"";width:4px;height:16px;border-radius:3px;
  background:var(--teal);flex:none;
}
.hd .more,.more{margin-left:auto;font-size:12.5px;color:var(--teal);font-weight:700}
.hd .more:hover,.more:hover{text-decoration:underline}
.hd .aside{margin-left:auto;font-size:12.5px;font-weight:500;color:var(--muted)}
.bd{padding:var(--sp-18) var(--sp-20)}

/* A section title inside a card or a form. */
.sec-t{display:flex;align-items:center;gap:8px;margin:18px 4px 8px;
  font-size:13px;font-weight:700;color:var(--teal-d)}

/* ----------------------------------------------------------------------------
   6. STAT TILES
   -------------------------------------------------------------------------- */
/* Big figures are THIN, not bold: 40px at weight 200 in navy. The number is
   the picture — that is the design system's rule and it is what makes a Lucro
   dashboard recognisable. */
.stat{padding:15px 17px}
.stat .k,.k{font-size:10px;color:var(--muted);font-weight:700;
  text-transform:uppercase;letter-spacing:.12em}
.stat .v,.v{font-size:40px;font-weight:200;margin-top:8px;line-height:1;
  letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--navy)}
.stat .sub,.sub{font-size:11.5px;color:var(--muted);margin-top:7px;font-weight:500}
.stat .icon,.icon{width:34px;height:34px;border-radius:var(--r-nav);
  display:grid;place-items:center;font-size:16px;float:right;
  background:var(--teal-50);color:var(--teal)}
.stat .icon .i,.icon .i{width:17px;height:17px}
/* Tints must out-specify `.stat .icon` above (0,2,0), or every KPI icon renders
   neutral grey. Matching specificity + later source order does it. */
.icon.i-green,.i-green{background:var(--ok-bg);color:var(--ok-ink)}
.icon.i-red,.i-red{background:var(--risk-bg);color:var(--risk-ink)}
.icon.i-blue,.i-blue{background:var(--info-bg);color:var(--info-ink)}
.icon.i-amber,.i-amber{background:var(--warn-bg);color:var(--warn-ink)}
.icon.i-slate,.i-slate{background:var(--neutral-bg);color:var(--neutral-ink)}
.icon.i-teal,.i-teal{background:var(--teal-tint);color:var(--teal)}

/* ----------------------------------------------------------------------------
   7. BADGES — class names unchanged, Lucro semantic pairs applied
   -------------------------------------------------------------------------- */
/* Chips are 11px, bold, sentence case, in a pill — and every pair below is
   one of the design system's tested 4.5:1 combinations. */
.badge,.chip{
  display:inline-flex;align-items:center;gap:5px;
  padding:3px 10px;border-radius:var(--pill);
  font-size:11px;font-weight:700;white-space:nowrap;line-height:1.5;
  letter-spacing:.015em;vertical-align:middle;
  background:var(--neutral-bg);color:var(--neutral-ink);
}
.badge .i,.chip .i{width:12px;height:12px}

/* positive — present, active, approved, processed, current */
.b-P,.b-active,.b-approved,.b-processed,.b-current,
.badge.active,.badge.approved,.badge.processed,.badge.current
  {background:var(--ok-bg);color:var(--ok-ink)}

/* negative — absent, separated, rejected */
.b-A,.b-separated,.b-rejected,
.badge.rejected
  {background:var(--risk-bg);color:var(--risk-ink)}

/* attention — half day, on notice, pending, draft, loan on hold */
.b-HD,.b-on_notice,.b-pending,.b-draft,.b-hold,
.badge.pending,.badge.draft,.badge.hold
  {background:var(--warn-bg);color:var(--warn-ink)}

/* informational — on leave, suspended, locked */
.b-L,.b-suspended,.b-locked,
.badge.locked
  {background:var(--info-bg);color:var(--info-ink)}

/* neutral — weekly off, holiday, not marked, cancelled, loan closed */
.b-WO,.b-H,.b-NM,.b-cancelled,.b-closed,
.badge.cancelled,.badge.closed
  {background:var(--neutral-bg);color:var(--neutral-ink)}

/* The same tested pairs under the design system's OWN names, so new work can
   say what a chip means rather than borrowing whichever status happens to use
   that colour. `.badge.b-P` and `.chip.ok` are the same two tokens. */
.chip.ok,.badge.ok          {background:var(--ok-bg);color:var(--ok-ink)}
.chip.warn,.badge.warn      {background:var(--warn-bg);color:var(--warn-ink)}
.chip.risk,.badge.risk      {background:var(--risk-bg);color:var(--risk-ink)}
.chip.info,.badge.info      {background:var(--info-bg);color:var(--info-ink)}
.chip.neutral,.badge.neutral{background:var(--neutral-bg);color:var(--neutral-ink)}

/* A field label above a value, outside a form: uppercase micro type with its
   own tracking, as the design system specifies for labels. */
.field-label{
  font-size:10px;font-weight:700;color:var(--muted);
  text-transform:uppercase;letter-spacing:.07em;
}

/* ----------------------------------------------------------------------------
   7b. PROGRESS METER — loan recovery, and anything else part-complete
   -------------------------------------------------------------------------- */
.meter{
  position:relative;height:6px;border-radius:999px;
  background:var(--neutral-bg);overflow:hidden;min-width:90px;
}
/* Teal to lime, the gradient the design system uses for every progress run. */
.meter>span{
  position:absolute;inset:0 auto 0 0;border-radius:999px;
  background:linear-gradient(90deg,var(--teal),var(--green));
}
.meter.full>span{background:var(--green)}

/* ----------------------------------------------------------------------------
   7c. INPUT GRID — the monthly-input sheet
   A dense, keyboard-first table of number fields. Right-aligned and monospaced
   so columns of rupees line up and a wrong digit is visible at a glance.
   -------------------------------------------------------------------------- */
.grid-in{
  width:112px;padding:5px 8px;text-align:right;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;font-variant-numeric:tabular-nums;
  border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--card);color:var(--ink);
}
.grid-in:focus{
  outline:none;border-color:var(--teal,var(--brand));
  box-shadow:0 0 0 3px var(--brand-050);
}
.grid-in.dirty{border-color:var(--warn-ink);background:var(--warn-bg)}
td.num,th.num{text-align:right}
.sticky-c{position:sticky;left:0;background:var(--card);z-index:1}
tr:hover .sticky-c{background:var(--surface-2)}

/* ----------------------------------------------------------------------------
   8. TABLES
   -------------------------------------------------------------------------- */
table.tbl,.tbl{width:100%;border-collapse:collapse}
/* A card holding a table becomes the scroll container, so wide tables stay
   reachable on narrow screens instead of being clipped by the card's rounding.
   Scrolling the CARD (not the table) keeps the table a real table box, so its
   columns still stretch to the full width when there is room.
   (master.html supplies its own overflow-x wrapper, so it is unaffected.) */
.card:has(table.tbl){overflow-x:auto}
.tbl-wrap{overflow-x:auto;max-width:100%}
.tbl th{
  text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.12em;
  color:var(--th-ink);font-weight:700;padding:11px var(--sp-18);
  border-bottom:1px solid var(--line);white-space:nowrap;
}
.tbl td{padding:11px var(--sp-18);border-bottom:1px solid var(--line-2);
  vertical-align:middle}
.tbl tbody tr:last-child td{border-bottom:0}
.tbl tbody tr:hover td{background:var(--row-hover)}
.tbl tfoot th{border-bottom:0;border-top:1px solid var(--line);
  font-size:11px;letter-spacing:.04em;color:var(--navy)}
.tbl .who,.who{display:flex;align-items:center;gap:10px;min-width:0}
.tbl .who .av,.av{
  width:30px;height:30px;border-radius:50%;flex:none;
  display:grid;place-items:center;font-weight:700;font-size:10.5px;color:#fff;
  background:linear-gradient(135deg,var(--teal),var(--deep));
}

/* ----------------------------------------------------------------------------
   9. BUTTONS
   -------------------------------------------------------------------------- */
/* Every button is a pill. Teal is the primary action; `.grn` is the ONE lime
   call to action a screen is allowed to ask for, always with navy text on it.
   A button lifts 1px under the pointer. */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--teal);color:#fff;
  border:0;border-radius:var(--pill);
  padding:9px 15px;font-family:inherit;font-weight:600;font-size:14px;
  letter-spacing:.01em;cursor:pointer;white-space:nowrap;text-decoration:none;
  transition:transform .12s ease,box-shadow .18s ease,background .15s,border-color .15s;
}
.btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:var(--sh-hover);
  background:var(--teal-d)}
.btn:active:not(:disabled){transform:none;box-shadow:none}
.btn:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}
.btn .i{width:16px;height:16px}
.btn.sm{padding:6px 12px;font-size:13px}
.btn.block{width:100%}

.btn.grn{background:var(--green);color:var(--navy)}
.btn.grn:hover:not(:disabled){background:var(--green-d)}
.btn.ghost{background:var(--card);color:var(--slate);border:1px solid var(--line)}
.btn.ghost:hover:not(:disabled){background:var(--bg);border-color:var(--line)}
.btn.danger{background:var(--card);border:1px solid var(--line);color:var(--red)}
.btn.danger:hover:not(:disabled){background:var(--red-tint);border-color:var(--red-line)}

.iconbtn{width:32px;height:32px;border-radius:var(--r-nav);flex:none;
  border:1px solid var(--line);background:var(--card);color:var(--muted);
  display:grid;place-items:center;cursor:pointer}
.iconbtn:hover{background:var(--bg)}
.iconbtn .i{width:16px;height:16px}
.linkbtn{border:0;background:transparent;padding:0;color:var(--teal);
  font:inherit;font-weight:700;font-size:13px;cursor:pointer}
.linkbtn:hover{text-decoration:underline}

/* Tabs and segmented controls — pills, like everything else. */
.tabs{display:flex;flex-wrap:wrap;gap:var(--sp-8);margin-bottom:var(--sp-16)}
.tab{display:flex;align-items:center;gap:7px;padding:7px 15px;
  border:1px solid var(--line);border-radius:var(--pill);background:var(--card);
  font:inherit;font-size:12.5px;font-weight:600;color:var(--muted);cursor:pointer}
.tab:hover{color:var(--navy);border-color:#cfd8d8}
.tab.on,.tab.active{background:var(--teal);border-color:var(--teal);color:#fff}
.tab .ct{font-size:11px;font-weight:700;border-radius:var(--pill);padding:1px 8px}
.tab.on .ct,.tab.active .ct{background:rgba(255,255,255,.22);color:#fff}
.seg{display:inline-flex;padding:3px;border-radius:var(--r-ctl);background:var(--sunk)}
.sg{border:0;background:transparent;padding:7px 16px;border-radius:var(--r-nav);
  font:inherit;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer}
.sg.on{background:var(--card);color:var(--navy);box-shadow:var(--sh)}

/* ----------------------------------------------------------------------------
   10. FORMS
   -------------------------------------------------------------------------- */
.input,select.input,input.input,textarea.input{
  border:1px solid var(--line);border-radius:var(--r-input);
  padding:8px 12px;font-family:inherit;font-size:13.5px;
  background:var(--card);color:var(--navy);min-width:0;
}
.input:focus,input:not([type=checkbox]):not([type=radio]):focus,
select:focus,textarea:focus{
  outline:0;border-color:var(--teal);box-shadow:var(--ring)}
.input::placeholder{color:var(--muted2)}
/* A search box is a pill, per the design system. */
.input.pill,input.pill{border-radius:var(--pill);border-color:var(--line-ctl);padding-left:16px}

/* Login / simple field */
.field{margin-bottom:14px}
.field label{display:block;font-size:12.5px;font-weight:600;margin-bottom:6px;color:var(--muted)}
.field input,.field select,.field textarea{
  width:100%;border:1px solid var(--line);border-radius:var(--r-ctl);
  padding:11px 12px;font-family:inherit;font-size:14px;
  background:var(--surface-2);color:var(--ink);
}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:0;border-color:var(--teal);background:var(--card);box-shadow:var(--ring)}
.field-err{color:var(--red);font-size:12px;font-weight:500}

/* Form grid */
.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 16px}
@media(max-width:900px){.form-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.form-grid{grid-template-columns:1fr}}

.form-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.form-field.wide,.wide{grid-column:1/-1}
.form-field label{font-size:12.5px;font-weight:600;color:var(--muted)}
.form-field .input,.form-field input,.form-field select,.form-field textarea{
  width:100%;border:1px solid var(--line);border-radius:var(--r-ctl);
  padding:9px 11px;font-size:13.5px;
  background:var(--card);color:var(--ink);font-family:inherit;
}
.form-field input:focus,.form-field select:focus,.form-field textarea:focus{
  outline:0;border-color:var(--teal);box-shadow:var(--ring)}
.form-field textarea{min-height:84px;resize:vertical}
.form-field.check,.check{flex-direction:row;align-items:center;gap:9px}
.form-field.check input,.check input{width:auto}
.form-field.check label,.check label{order:2;font-weight:500;color:var(--ink)}

.checkbox,input[type=checkbox],input[type=radio]{accent-color:var(--teal);
  width:16px;height:16px;cursor:pointer}
.checkbox{display:inline-flex;align-items:center;gap:8px;width:auto;height:auto}

input[type=file]{font-family:inherit;font-size:13px;color:var(--muted)}
input[type=date]{font-family:inherit}
select{cursor:pointer}

/* ----------------------------------------------------------------------------
   11. ALERTS & MESSAGES
   -------------------------------------------------------------------------- */
.alert{
  background:var(--risk-bg);color:var(--red);
  border:1px solid var(--line);border-radius:var(--r-ctl);
  padding:10px 13px;font-size:13px;font-weight:500;margin-bottom:14px;
}
.msg{
  border-radius:var(--r-ctl);border:1px solid var(--line);
  padding:11px 14px;margin-bottom:14px;font-size:13.5px;font-weight:500;
  background:var(--surface-2);color:var(--ink);
}
.msg.success{background:var(--ok-bg);color:var(--ok-ink)}
.msg.error{background:var(--risk-bg);color:var(--red)}
.msg.warning{background:var(--warn-bg);color:var(--warn-ink)}
.msg.info,.msg.debug{background:var(--info-bg);color:var(--info-ink)}
.success{color:var(--ok-ink)}
.error{color:var(--red)}

/* ----------------------------------------------------------------------------
   12. BARS, LISTS, KEY/VALUE
   -------------------------------------------------------------------------- */
/* Charts and bars draw teal to lime, per the design system. */
.bar{height:7px;border-radius:var(--pill);background:var(--sunk);overflow:hidden}
.bar>span{display:block;height:100%;border-radius:var(--pill);
  background:linear-gradient(90deg,var(--teal),var(--green))}

.list-row{display:flex;align-items:center;gap:12px;padding:11px 0;
  border-bottom:1px solid var(--line-2);color:inherit}
.list-row:last-child{border-bottom:0}
a.list-row:hover{background:var(--teal-softer)}
.dot{width:8px;height:8px;border-radius:50%;background:var(--teal);flex:none}

.kv{display:grid;grid-template-columns:150px 1fr;gap:9px 14px}
.kv dt{color:var(--muted);font-size:13px}
.kv dd{margin:0;font-weight:500;min-width:0;word-break:break-word}
@media(max-width:560px){.kv{grid-template-columns:1fr}.kv dd{margin-bottom:6px}}

/* ----------------------------------------------------------------------------
   13. LOGIN — the design system's split sign-in
   -------------------------------------------------------------------------- */
.login{display:flex;min-height:100vh;background:var(--card)}
.login-left{
  flex:1 1 50%;position:relative;overflow:hidden;
  display:flex;flex-direction:column;justify-content:space-between;
  padding:46px 54px;color:#fff;
  background:linear-gradient(135deg,var(--teal) 0%,var(--teal-d) 55%,var(--navy) 100%);
}
.login-left::after{
  content:"";position:absolute;right:-180px;top:50%;transform:translateY(-50%);
  width:640px;height:640px;border-radius:50%;
  border:1px solid rgba(166,206,57,.14);
  box-shadow:inset 0 0 0 70px rgba(255,255,255,.03);
  opacity:.75;pointer-events:none;
}
.login-left>*{position:relative;z-index:1}
/* `.login-left` is a flex COLUMN, so its items stretch across it by default
   and `width:auto` resolved to the full column width — the wordmark came out
   404px wide and squashed to 30px tall. `align-self:flex-start` takes it out
   of the stretch so the intrinsic 257x77 ratio holds. */
.login-logo{height:30px;width:auto;align-self:flex-start;display:block;object-fit:contain}
.login-hero{max-width:470px}
.login-title{margin:0 0 18px;font-size:clamp(2.3rem,4vw,3.5rem);font-weight:700;
  line-height:1.05;letter-spacing:-.02em;color:#fff}
.login-lead{margin:0 0 28px;font-size:1.06rem;line-height:1.6;color:var(--mist)}
.login-feats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:15px}
.login-feats li{position:relative;padding-left:26px;font-size:.98rem;color:#eef4f4}
.login-feats li::before{
  content:"";position:absolute;left:0;top:.42em;width:9px;height:9px;border-radius:50%;
  background:var(--green);box-shadow:0 0 0 4px rgba(166,206,57,.18);
}
.login-foot{font-size:.8rem;color:#7fa0a4}

.login-right{flex:1 1 50%;display:flex;align-items:center;justify-content:center;padding:40px 34px}
.login-card{width:100%;max-width:380px}
.login-card h2{margin:0 0 6px;font-size:2rem;font-weight:700;letter-spacing:-.01em;color:var(--slate)}
.login-card p{margin:0 0 18px;color:var(--muted)}
.login-card label{display:block;margin-bottom:13px;font-size:12px;font-weight:600;color:var(--muted)}
.login-card input{
  width:100%;margin-top:5px;padding:11px 13px;
  border:1px solid var(--line);border-radius:var(--r-ctl);
  background:#f6f9fc;font:inherit;font-size:14px;color:var(--navy);
}
.login-card input:focus{background:var(--card)}
.lerr{margin-bottom:10px;font-size:13px;color:var(--red);font-weight:600}
@media(max-width:860px){
  .login{flex-direction:column}
  .login-left{padding:34px;min-height:38vh}
  .login-right{padding:34px}
}

/* ----------------------------------------------------------------------------
   14. SETTINGS TILES
   -------------------------------------------------------------------------- */
.set-section{margin-bottom:26px}
.set-section-hd{
  display:flex;align-items:center;gap:9px;
  font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;
  color:var(--muted);margin:0 0 12px;padding-bottom:9px;border-bottom:1px solid var(--line);
}
.set-section-hd::before{content:"";width:4px;height:14px;border-radius:3px;background:var(--grad);flex:none}
.set-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media(max-width:1040px){.set-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.set-grid{grid-template-columns:1fr}}
.set-tile{
  display:flex;align-items:center;gap:14px;
  background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-card);padding:15px 16px;box-shadow:var(--shadow);
  transition:.14s;text-decoration:none;color:var(--ink);
}
.set-tile:hover{border-color:var(--teal);box-shadow:var(--shadow-pop);transform:translateY(-1px)}
/* The design system's icon tile: one treatment for every tile, teal on
   teal-tint. It used to carry a per-tile hex colour, which no part of the
   palette ever supplied. */
.set-ic{width:34px;height:34px;border-radius:var(--r-nav);display:grid;
  place-items:center;flex:none;background:var(--teal-tint);color:var(--teal)}
.set-ic .i{width:18px;height:18px}
.set-body{flex:1;min-width:0}
.set-top{display:flex;align-items:center;gap:8px}
.set-top b{font-size:14.5px;font-weight:600}
.set-count{background:var(--surface-3);color:var(--muted);border-radius:var(--pill);
  padding:1px 9px;font-size:11.5px;font-weight:700;font-variant-numeric:tabular-nums}
.set-desc{color:var(--muted);font-size:12.5px;margin-top:2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.set-arrow{color:var(--teal);font-size:16px;opacity:0;transition:.14s;flex:none}
.set-tile:hover .set-arrow{opacity:1}

/* ----------------------------------------------------------------------------
   15. WIZARD / STEPPER
   -------------------------------------------------------------------------- */
.wizard{display:block}
.stepper{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:0 0 18px}
.stepper li{
  display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:500;color:var(--muted);
  background:var(--card);border:1px solid var(--line);border-radius:var(--pill);
  padding:6px 13px;cursor:pointer;transition:.13s;
}
.stepper li:hover{border-color:var(--teal)}
.stepper li.active,.stepper li.on{
  color:var(--on-brand);border-color:transparent;background:var(--grad);
  font-weight:600;box-shadow:var(--shadow-brand);
}
.stepper li.done{color:var(--ok-ink);border-color:var(--ok-bg);background:var(--ok-bg)}
.stepper .sdot,.sdot{
  width:20px;height:20px;border-radius:50%;
  background:var(--surface-3);color:var(--muted);
  display:grid;place-items:center;font-size:11px;font-weight:700;flex:none;
}
.stepper li.active .sdot,.stepper li.on .sdot{background:rgba(255,255,255,.25);color:var(--on-brand)}
.stepper li.done .sdot{background:var(--ok-ink);color:var(--on-brand)}

.wstep{display:none}
.wstep.active{display:block}
.wnav{display:flex;align-items:center;gap:10px;margin-top:4px}

/* ----------------------------------------------------------------------------
   16. PRINT (payslips)
   -------------------------------------------------------------------------- */
@media print{
  .sidebar,.topbar,.toolbar,.btn{display:none !important}
  body{background:#FFFFFF}
  .content{padding:0;max-width:none}
  .card{box-shadow:none;border-color:#DDDDDD;break-inside:avoid}
}

/* ----------------------------------------------------------------------------
   17. GLOBAL SEARCH — topbar type-ahead + full-width overlay panel
       A dark drop-down panel anchored under the topbar, over the page content
       (it deliberately covers the sidebar too). The source product paints this
       surface grey; Lucro paints it --teal-deep, so the panel reads as part of
       the brand rather than a foreign widget. Every colour below is either a
       token or a plain white/black alpha wash over the teal — no new hexes.
   -------------------------------------------------------------------------- */

/* Topbar goes dark while the panel is open, as in the product ---------------- */
.topbar{transition:background-color .18s ease,border-color .18s ease}
body.qsearch-open .topbar{background:var(--teal-deep);border-bottom-color:transparent}
body.qsearch-open .topbar h1{color:var(--on-brand)}
body.qsearch-open .topbar .wbdate{color:rgba(255,255,255,.62)}
body.qsearch-open .navtoggle{background:transparent;border-color:rgba(255,255,255,.25);color:#fff}
body.qsearch-open .topbar .company-pill{
  background:rgba(255,255,255,.13);color:var(--on-brand);border-color:rgba(255,255,255,.20);
}
body.qsearch-open .topbar .company-pill:hover{border-color:rgba(255,255,255,.45);box-shadow:none}
body.qsearch-open .topsearch input{background:var(--card);border-color:transparent}
body.qsearch-open .topsearch input:focus{box-shadow:0 0 0 3px rgba(255,255,255,.20)}
body.qsearch-open .topsearch .si{color:var(--teal)}

/* The panel ---------------------------------------------------------------- */
.qsearch{
  position:fixed;left:0;right:0;top:62px;z-index:60;   /* JS keeps `top` exact  */
  background:var(--teal-deep);
  color:var(--on-brand);
  box-shadow:0 18px 44px rgba(0,32,37,.32);
  overflow:auto;overscroll-behavior:contain;
  padding-bottom:14px;
  animation:qsearch-drop .2s cubic-bezier(.2,.7,.3,1);
}
.qsearch[hidden]{display:none}

/* Reveal top-down, the way the product's panel unrolls. clip-path keeps the
   animation inside the panel's own box so it never flashes over the topbar. */
@keyframes qsearch-drop{
  from{clip-path:inset(0 0 100% 0);opacity:.55}
  to{clip-path:inset(0 0 0 0);opacity:1}
}
@media(prefers-reduced-motion:reduce){
  .qsearch{animation:none}
  .topbar{transition:none}
}

/* Centred header strip ------------------------------------------------------ */
.qsearch-strip{
  margin:0 28px;padding:7px 12px;
  text-align:center;
  font-size:12.5px;font-weight:600;letter-spacing:.02em;
  color:rgba(255,255,255,.80);
  background:rgba(255,255,255,.09);
  border-bottom:1px solid rgba(255,255,255,.10);
  border-radius:0 0 var(--r-sm) var(--r-sm);
}

.qsearch-inner{padding:16px 28px 2px}
.qsearch-status{
  font-size:13px;color:rgba(255,255,255,.68);
  padding:2px 8px 12px;
}
.qsearch-status:empty{display:none}

/* Columns ------------------------------------------------------------------- */
.qsearch-cols{
  display:grid;align-items:start;
  gap:6px 28px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.qsearch-cols[data-cols="1"]{grid-template-columns:minmax(0,1fr)}
.qsearch-cols[data-cols="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.qsearch-cols[data-cols="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.qsearch-cols:empty{display:none}

.qsearch-col{min-width:0;padding-bottom:14px}
.qsearch-h{
  font-size:15.5px;font-weight:700;letter-spacing:-.01em;
  color:var(--on-brand);
  margin:0 0 7px;padding:0 8px;
}

.qsearch-link{
  display:block;padding:6px 8px;margin-bottom:1px;
  border-radius:var(--r-sm);
  color:rgba(255,255,255,.88);
  font-size:13.5px;line-height:1.35;
  transition:background-color .12s ease,color .12s ease;
}
.qsearch-link:hover,.qsearch-link.on{background:var(--teal);color:var(--on-brand)}
.qsearch-link.on{box-shadow:inset 0 0 0 1px rgba(255,255,255,.24)}
.qsearch-link:focus-visible{outline:2px solid var(--lime);outline-offset:1px}
.qsearch-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qsearch-sub{
  display:block;margin-top:1px;
  font-size:11.5px;color:rgba(255,255,255,.55);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.qsearch-link:hover .qsearch-sub,.qsearch-link.on .qsearch-sub{color:rgba(255,255,255,.80)}

.qsearch-more{
  display:inline-block;margin:5px 8px 0;
  font-size:12px;font-weight:600;color:var(--lime);
}
.qsearch-more:hover,.qsearch-more:focus-visible{text-decoration:underline}

@media(max-width:1080px){
  .qsearch-cols,.qsearch-cols[data-cols="3"],.qsearch-cols[data-cols="4"]{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:640px){
  .qsearch-strip{margin:0 16px}
  .qsearch-inner{padding:14px 16px 2px}
  .qsearch-cols,.qsearch-cols[data-cols="2"],.qsearch-cols[data-cols="3"],.qsearch-cols[data-cols="4"]{
    grid-template-columns:minmax(0,1fr);
  }
}

@media print{.qsearch{display:none !important}}

/* ---------------------------------------------------------------------------
   The roster grid: people down the side, dates across the top.

   The grid is wide by nature -- 31 columns -- so the employee column is sticky
   and everything else is as narrow as a shift code allows. Cells are a
   `<details>` so one can be opened and edited without JavaScript and without
   leaving the grid; the popup is absolutely positioned so opening it does not
   push every row below it down the page, which on a 40-row grid would move the
   thing you were looking at out of view.
--------------------------------------------------------------------------- */
.roster-grid th,.roster-grid td{padding:4px 5px;font-size:12px}
.roster-grid th.num,.roster-grid td.rcell{min-width:40px;text-align:center}
.roster-grid .rest-col{background:var(--bg)}
.roster-grid .rchip{padding:1px 5px;font-size:10.5px;letter-spacing:.2px}
.roster-grid tfoot th{border-top:1px solid var(--line);color:var(--muted)}

.cellpop{display:inline-block;position:relative}
.cellpop>summary{list-style:none;cursor:pointer;border-radius:6px}
.cellpop>summary::-webkit-details-marker{display:none}
.cellpop>summary:hover{box-shadow:var(--ring)}
.cellpop>summary:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
.cellpop[open]>summary{box-shadow:var(--ring)}
/* The panel is `fixed`, not `absolute`, and centred on the viewport.

   An absolutely-positioned panel anchored to its cell is what this wants to
   be, and it does not work: the grid scrolls sideways, so its container has
   `overflow-x:auto`, which clips descendants on BOTH axes -- the panel came
   out sliced off at the edge of the card. `fixed` leaves that clipping
   context altogether. Centred rather than anchored because without JavaScript
   there is nothing to measure the cell with, and on a 31-column grid a panel
   in the middle of the screen is easier to hit than one hanging off a 40px
   cell anyway.

   The backdrop is `summary::before`, so a click anywhere outside the panel
   lands on the summary and closes the `<details>` -- the usual dismiss
   behaviour, with no script. */
.cellpop[open]>summary::before{
  content:"";position:fixed;inset:0;z-index:40;background:var(--scrim);
  cursor:default;
}
.cellpop-body{
  position:fixed;z-index:50;top:50%;left:50%;transform:translate(-50%,-50%);
  width:min(330px,calc(100vw - 32px));text-align:left;
  background:var(--card);border:1px solid var(--line);border-radius:var(--r-card);
  box-shadow:var(--sh-lg);padding:16px;
}
.cellpop-body .input{width:100%;margin-bottom:7px}
.cellpop-body .btn{width:100%;justify-content:center}

/* Shift tones -----------------------------------------------------------------
   Six meaning-free chip pairs, for telling one shift from another on the roster
   grid. Deliberately NOT the ok/warn/risk pairs: those say something is good or
   wrong, and a night shift is neither. Assigned in order of the shift's start
   time, so the colour ramp follows the clock and the same shift is the same
   colour on every screen.

   Measured contrast, ink on its own background:
     s1 5.55:1   s2 5.36:1   s3 5.96:1   s4 5.68:1   s5 6.94:1   s6 6.12:1
--------------------------------------------------------------------------- */
:root{
  --s1-bg:#f6efdc; --s1-ink:#7a5a12;
  --s2-bg:#e2eff1; --s2-ink:#0e6a73;
  --s3-bg:#ede9fb; --s3-ink:#5b45b5;
  --s4-bg:#e3f2e9; --s4-ink:#116b3e;
  --s5-bg:#e8f0fe; --s5-ink:#1a4f9c;
  --s6-bg:#fbe7f0; --s6-ink:#9c2a5e;
}
.chip.s1{background:var(--s1-bg);color:var(--s1-ink)}
.chip.s2{background:var(--s2-bg);color:var(--s2-ink)}
.chip.s3{background:var(--s3-bg);color:var(--s3-ink)}
.chip.s4{background:var(--s4-bg);color:var(--s4-ink)}
.chip.s5{background:var(--s5-bg);color:var(--s5-ink)}
.chip.s6{background:var(--s6-bg);color:var(--s6-ink)}

/* A heading between cards, for a screen built out of grouped blocks rather
   than one table. Smaller than `.page-title` so a section never competes with
   the name of the screen it is on. */
.sec-title{margin:0 2px 10px;font-size:12.5px;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase;color:var(--th-ink)}

/* `hidden` has to win. Conditional form fields are hidden with the attribute
   (see conditional-fields.js), and any `display:` rule on the wrapper would
   silently beat the UA stylesheet's `[hidden]{display:none}` — leaving a
   spouse-name box on a single employee's form with no clue why. */
[hidden]{display:none !important}
