/* ===========================================================================
   TYPEFACES — served by this app, not by Google.

   They were loaded from fonts.googleapis.com for about an hour. Three
   reasons they are not any more: the tool is useless without them and a
   blocked CDN on the Tempest network would have left payroll reading a
   fallback stack; a page behind a payroll login should not tell a third
   party every time somebody opens it; and a font that loads from here
   loads at the same speed whether or not anybody is on the internet
   besides us. 120KB of latin subsets, OFL licensed - see LICENSE.txt.
   =========================================================================== */

@font-face{font-family:'Figtree';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/figtree-latin-400-normal.woff2') format('woff2')}
@font-face{font-family:'Figtree';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/figtree-latin-500-normal.woff2') format('woff2')}
@font-face{font-family:'Figtree';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/figtree-latin-600-normal.woff2') format('woff2')}
@font-face{font-family:'Figtree';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/figtree-latin-700-normal.woff2') format('woff2')}
@font-face{font-family:'Figtree';font-style:normal;font-weight:800;font-display:swap;src:url('/fonts/figtree-latin-800-normal.woff2') format('woff2')}
@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')}
@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')}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:800;font-display:swap;src:url('/fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2')}
@font-face{font-family:'Anton';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/anton-latin-400-normal.woff2') format('woff2')}


/* ===========================================================================
   BULLSEYE DESIGN SYSTEM
   One stylesheet, every page. Tokens first, then the base, then components.

   Two rules for anyone editing a page after this:

   1. NEVER write a hex value in a page. Every colour in the tool comes from
      a token below, so changing the palette is one edit here rather than six
      files and a hunt through 3,000 lines of aftercare.html.
   2. The LEGACY ALIASES block exists because five pages were written against
      the old variable names (--navy, --page, --card, --green...). They now
      point at the new tokens, so those pages inherit this palette without a
      line-by-line rewrite. Don't add new ones. Use the real names.
   =========================================================================== */

:root{
  /* --- the anchors ----------------------------------------------------- */
  --navy:#141C57;              /* dark anchor: nav bar */
  --indigo:#141C57;
  --navy-deep:#0D1240;         /* hover/pressed on the dark anchor */

  /* --- blues ----------------------------------------------------------- */
  --brand-blue:#1E9EE0;        /* primary interactive blue */
  --blue:#1E9EE0;
  --blue-deep:#0E7FC0;         /* deeper blue, gradient end */
  --accent:#0E7FC0;
  --blue-tint:#E7F4FC;         /* the wash behind a selected row or chip */
  --blue-lt:#AEB9EC;           /* light-blue nav labels on the indigo bar */

  /* --- surfaces -------------------------------------------------------- */
  --bg:#EEF1F5;                /* app canvas */
  --panel:#ffffff;             /* cards */
  --panel2:#F1F3F6;            /* inputs, pills, table headers */
  --line:#E5E8EF;              /* hairline borders */

  /* --- text ------------------------------------------------------------ */
  --ink:#0C1420;
  --muted:#69758A;
  --muted-lt:#8E99AC;

  /* --- status ---------------------------------------------------------- */
  --good:#1FA35C;  --good-bg:#E6F5ED;
  --warn:#E0A008;  --warn-bg:#FDF4E0;
  --gold:#E0A008;
  --bad:#E5484D;   --bad-bg:#FDECEC;

  /* --- category accents ------------------------------------------------ */
  --teal:#14B8A6;
  --violet:#4F46E5;
  --orange:#E0862B;

  /* --- type ------------------------------------------------------------ */
  --font-body:"Figtree",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --font-head:"Plus Jakarta Sans","Figtree",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --font-num:"Anton","Figtree",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  /* --- shape ----------------------------------------------------------- */
  --r-card:16px;  --r-tile:14px;  --r-btn:8px;  --r-input:9px;  --r-pill:999px;
  --shadow:0 1px 2px rgba(12,20,32,.04), 0 8px 24px rgba(12,20,32,.05);
  --shadow-lift:0 2px 4px rgba(12,20,32,.06), 0 16px 36px rgba(12,20,32,.10);
  --shadow-pop:0 10px 40px rgba(12,20,32,.16);

  /* Header strip + nav bar. Pages measure their own height against this
     rather than the old hard-coded 54px, so the chrome can change height
     without leaving a gap or a scrollbar behind it. */
  --head-h:54px;
  --nav-h:44px;
  --chrome-h:98px;

  /* --- LEGACY ALIASES — see note at the top. Do not extend. ------------- */
  --page:var(--bg);
  --card:var(--panel);
  --line-lt:var(--panel2);
  --green:var(--good);     --green-bg:var(--good-bg);
  --amber:var(--warn);     --amber-bg:var(--warn-bg);
  --red:var(--bad);        --red-bg:var(--bad-bg);
  --query:var(--violet);   --query-bg:#EEEDFB;
}

/* ===========================================================================
   BASE
   =========================================================================== */

*{box-sizing:border-box}

body{
  margin:0;
  font-family:var(--font-body);
  font-size:14px;
  line-height:1.45;
  background:var(--bg);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

h1,h2,h3,h4,h5{
  font-family:var(--font-head);
  font-weight:800;
  letter-spacing:-.01em;
  color:var(--ink);
}
h2{font-size:17px}

/* THE SIGNATURE. Every figure the eye lands on is set in Anton — the stat
   tiles, the totals row, the counts on the workspace doors. Anywhere a
   number is the point, it gets .num or one of the component classes below. */
.num,.bp-stat-n{
  font-family:var(--font-num);
  font-weight:400;
  line-height:1;
  letter-spacing:.01em;
  font-feature-settings:"tnum" 1;
}

a{color:var(--blue-deep)}

::selection{background:var(--blue-tint);color:var(--ink)}

:focus-visible{outline:2px solid var(--brand-blue);outline-offset:2px}

/* ===========================================================================
   CHROME — the white header strip and the indigo nav bar under it
   =========================================================================== */

header{
  height:var(--head-h);
  background:var(--panel);
  color:var(--ink);
  display:flex;
  align-items:center;
  gap:14px;
  padding:0 20px;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:45;
}

header .logo{
  width:28px;height:28px;border-radius:9px;flex:0 0 auto;
  background:linear-gradient(135deg,var(--brand-blue),var(--blue-deep));
  display:grid;place-items:center;
  font-family:var(--font-head);font-weight:800;font-size:15px;color:#fff;
  letter-spacing:0;
}

header h1{
  font-family:var(--font-head);
  font-size:12.5px;
  font-weight:800;
  margin:0;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--ink);
  white-space:nowrap;
}

header a{color:var(--muted);text-decoration:none;font-size:12.5px}
header a:hover{color:var(--ink)}

/* The sign-out chip session.js appends. Lived in five duplicated
   <style id="bp-session-css"> blocks, which is how one page ended up
   without it at all. One definition now. */
.bp-session{
  margin-left:auto;display:flex;align-items:center;gap:8px;
  font-size:12.5px;color:var(--muted);min-width:0;flex-wrap:wrap;
}
.bp-who{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:40vw;
  font-weight:600;color:var(--ink);
}
.bp-btn{
  font:inherit;font-size:12px;font-weight:600;color:var(--muted);
  background:var(--panel2);border:1px solid var(--line);
  border-radius:var(--r-btn);padding:4px 11px;cursor:pointer;
  text-decoration:none;line-height:1.5;white-space:nowrap;flex:0 0 auto;
}
.bp-btn:hover{background:var(--blue-tint);border-color:var(--brand-blue);color:var(--blue-deep)}

/* The indigo bar. Tabs carry data-section, so session.js hides the ones a
   person may not open and nobody is shown a door that shuts in their face. */
.bp-nav{
  background:var(--indigo);
  height:var(--nav-h);
  display:flex;align-items:stretch;gap:2px;
  padding:0 20px;
  position:sticky;top:var(--head-h);z-index:44;
  overflow-x:auto;
}
.bp-nav a{
  display:flex;align-items:center;
  padding:0 15px;
  font-family:var(--font-head);
  font-size:13px;font-weight:700;letter-spacing:-.005em;
  color:var(--blue-lt);
  text-decoration:none;
  border-bottom:3px solid transparent;
  white-space:nowrap;
  transition:color .12s, border-color .12s;
}
.bp-nav a:hover{color:#fff}
.bp-nav a[aria-current="page"]{color:#fff;border-bottom-color:var(--brand-blue)}
.bp-nav .bp-nav-end{margin-left:auto;display:flex;align-items:stretch}

/* ADMIN-ONLY CHROME IS HIDDEN UNTIL PROVEN OTHERWISE.
   session.js used to HIDE these once /api/me came back, which meant a
   consultant saw the Settings tab for as long as that request took, and
   saw it for ever if the script failed. A persona tester followed it and
   landed on a page offering to copy live placements with real names and
   NI numbers on them. So: shut in the stylesheet, opened by session.js
   for an admin and nobody else. The middleware is still the lock. */
[data-admin]{display:none}
body.bp-admin [data-admin]{display:flex}

@media (max-width:620px){
  header{height:auto;padding:8px 14px;flex-wrap:wrap;row-gap:6px}
  .bp-session{width:100%;margin-left:0;justify-content:flex-end}
  .bp-who{max-width:100%}
  .bp-nav{position:static}
}

/* ===========================================================================
   COMPONENTS
   =========================================================================== */

.bp-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--r-card);
  padding:18px;
  box-shadow:var(--shadow);
}

/* KPI tile. The figure is Anton, the label is small, uppercase and muted,
   and the whole tile lifts a couple of pixels under the cursor. */
.bp-tile{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--r-tile);
  padding:16px 18px;
  box-shadow:var(--shadow);
  transition:transform .12s, box-shadow .12s;
}
.bp-tile:hover{transform:translateY(-3px);box-shadow:var(--shadow-lift)}
.bp-tile .bp-stat-n{font-size:34px;color:var(--ink);display:block}
.bp-tile .bp-stat-l{
  font-size:11px;font-weight:600;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;margin-top:5px;
}
.bp-tile.is-warn .bp-stat-n{color:var(--warn)}
.bp-tile.is-bad  .bp-stat-n{color:var(--bad)}
.bp-tile.is-good .bp-stat-n{color:var(--good)}

/* 38×38 white glyph on a coloured fill. */
.bp-chip-icon{
  width:38px;height:38px;border-radius:11px;flex:0 0 auto;
  display:grid;place-items:center;
  background:linear-gradient(135deg,var(--brand-blue),var(--blue-deep));
  color:#fff;font-size:17px;line-height:1;
}
.bp-chip-icon.is-good{background:linear-gradient(135deg,#34C27B,var(--good))}
.bp-chip-icon.is-warn{background:linear-gradient(135deg,#F0BC3C,var(--warn))}
.bp-chip-icon.is-bad{background:linear-gradient(135deg,#F2696D,var(--bad))}
.bp-chip-icon.is-teal{background:linear-gradient(135deg,#3FD0C0,var(--teal))}
.bp-chip-icon.is-violet{background:linear-gradient(135deg,#7A72EC,var(--violet))}
.bp-chip-icon.is-orange{background:linear-gradient(135deg,#F0A857,var(--orange))}

.bp-pill{
  display:inline-block;border-radius:var(--r-pill);
  font-size:11.5px;font-weight:600;padding:2px 10px;
  background:var(--panel2);color:var(--muted);border:1px solid var(--line);
  white-space:nowrap;
}
.bp-pill.is-good{background:var(--good-bg);color:var(--good);border-color:#C5E7D4}
.bp-pill.is-warn{background:var(--warn-bg);color:#9A6F05;border-color:#F2DFAE}
.bp-pill.is-bad{background:var(--bad-bg);color:var(--bad);border-color:#F6CBCC}

.bp-btn-primary{
  background:var(--brand-blue);color:#fff;border:0;font-weight:700;
  border-radius:var(--r-btn);padding:9px 16px;font-family:var(--font-body);
  font-size:14px;cursor:pointer;transition:background .12s;
}
.bp-btn-primary:hover{background:var(--blue-deep)}
.bp-btn-primary:disabled{background:#BFD4E4;cursor:not-allowed}

.bp-input,input[type=text],input[type=email],input[type=password],
input[type=date],input[type=number],input[type=search],select,textarea{
  background:var(--panel2);
  border:1px solid var(--line);
  border-radius:var(--r-input);
  font-family:var(--font-body);
}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand-blue);
  background:var(--panel);
}

/* Meter. Track in panel2, fill a left-to-right brand gradient. */
.bp-meter{
  background:var(--panel2);border-radius:8px;height:9px;overflow:hidden;
}
.bp-meter > i{
  display:block;height:100%;border-radius:8px;
  background:linear-gradient(90deg,var(--brand-blue),var(--blue-deep));
}

.bp-modal{
  background:var(--panel);border:1px solid var(--line);
  border-radius:12px;padding:18px;box-shadow:var(--shadow-pop);
}
