/* ============================================================
   Candidate Onboarding & Compliance — shadcn/ui design system, hand-ported
   ------------------------------------------------------------
   shadcn/ui is React + Radix + Tailwind and cannot be dropped into a vanilla,
   build-free app. What is portable is the system underneath it, and that is what
   this file is: shadcn's token contract (its HSL channel triplets, consumed as
   hsl(var(--token)), and its --radius scale) plus its component recipes written
   out as plain classes — Button, Input, Select, Textarea, Checkbox, Badge,
   Dialog, Table, Card, Sidebar, Sonner-style toasts.
   Because the tokens carry channels rather than colours, alpha variants work the
   way they do in Tailwind: hsl(var(--primary) / .1).
   Dark mode is a `dark` class on <html>, as shadcn does it.
   The palette is the app's own — neutral greys with the logo's blue #2c52f7 as
   --primary — rather than shadcn's stock zinc/sky.
   ============================================================ */

/* ---------- light theme ---------- */
:root{
  --background: 220 13% 95%;
  --foreground: 224 22% 12%;
  --card: 0 0% 100%;
  --card-foreground: 224 22% 12%;
  --popover: 0 0% 100%;
  --popover-foreground: 224 22% 12%;
  --primary: 229 93% 57%;              /* #2c52f7, the logo's blue */
  --primary-foreground: 0 0% 100%;
  --secondary: 220 13% 91%;
  --secondary-foreground: 224 18% 20%;
  --muted: 220 13% 91%;
  --muted-foreground: 220 9% 43%;
  --accent: 220 13% 89%;
  --accent-foreground: 224 18% 18%;
  --destructive: 0 62% 46%;
  --destructive-foreground: 0 0% 100%;
  --success: 152 44% 32%;
  --success-foreground: 0 0% 100%;
  --warning: 35 78% 33%;
  --border: 220 13% 85%;
  --input: 220 13% 85%;
  --ring: 229 93% 57%;
  --radius: 0.5rem;
  /* the rail gets its own slice of the contract, as shadcn's sidebar does */
  --sidebar: 0 0% 100%;
  --sidebar-foreground: 224 22% 12%;
  --sidebar-border: 220 13% 88%;
  --sidebar-accent: 220 13% 93%;
  --sidebar-accent-foreground: 224 18% 18%;
  /* the app's own two: the logo's fills, which have to invert between themes */
  --logo-ink: 224 45% 13%;             /* #0d1632 */
  --logo-blue: 229 93% 57%;
}

/* ---------- dark theme ---------- */
.dark{
  --background: 240 6% 10%;
  --foreground: 210 17% 93%;
  --card: 240 5% 13%;
  --card-foreground: 210 17% 93%;
  --popover: 240 5% 15%;
  --popover-foreground: 210 17% 93%;
  --primary: 229 93% 60%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 4% 19%;
  --secondary-foreground: 210 17% 93%;
  --muted: 240 4% 19%;
  --muted-foreground: 220 9% 64%;
  --accent: 240 4% 23%;
  --accent-foreground: 210 17% 96%;
  --destructive: 0 55% 52%;
  --destructive-foreground: 0 0% 100%;
  --success: 152 40% 42%;
  --success-foreground: 0 0% 100%;
  --warning: 38 70% 58%;
  --border: 240 4% 24%;
  --input: 240 4% 26%;
  --ring: 229 93% 70%;
  --sidebar: 240 5% 12%;
  --sidebar-foreground: 210 17% 93%;
  --sidebar-border: 240 4% 20%;
  --sidebar-accent: 240 4% 18%;
  --sidebar-accent-foreground: 210 17% 96%;
  --logo-ink: 210 20% 96%;
  --logo-blue: 229 100% 71%;           /* lifted: the brand blue is 2.4:1 on this base */
}

:root{ color-scheme:light }
.dark{ color-scheme:dark }

/* ---------- base ---------- */
*{box-sizing:border-box;border-color:hsl(var(--border))}
html{scroll-behavior:smooth;scrollbar-gutter:stable}
body{
  margin:0;
  background:hsl(var(--background));
  color:hsl(var(--foreground));
  font-size:14px;line-height:1.5;
  font-family:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,"Segoe UI Emoji",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}
::selection{background:hsl(var(--primary) / .22)}
a{color:hsl(var(--primary));text-underline-offset:3px}
a:hover{color:hsl(var(--primary) / .8)}
.hidden{display:none!important}
.muted{color:hsl(var(--muted-foreground))}
h1,h2,h3{letter-spacing:-.02em}

/* focus: shadcn's ring, on everything focusable */
:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}

/* ============================================================
   Button
   ============================================================ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  white-space:nowrap;border-radius:var(--radius);
  font-size:14px;font-weight:500;line-height:1;
  height:2.25rem;padding:0 1rem;border:1px solid transparent;
  cursor:pointer;user-select:none;
  transition:background-color .15s,border-color .15s,color .15s,opacity .15s;
}
.btn:disabled{opacity:.5;pointer-events:none}
.btn .ni{width:1rem;height:1rem;flex:0 0 1rem}
.btn-sm{height:2rem;padding:0 .75rem;font-size:13px;border-radius:calc(var(--radius) - 2px)}
.btn-lg{height:2.5rem;padding:0 2rem}
.btn-primary{background:hsl(var(--primary));color:hsl(var(--primary-foreground));
  box-shadow:0 1px 2px 0 hsl(224 22% 12% / .05)}
.btn-primary:hover{background:hsl(var(--primary) / .9)}
.btn-secondary{background:hsl(var(--secondary));color:hsl(var(--secondary-foreground))}
.btn-secondary:hover{background:hsl(var(--secondary) / .8)}
.btn-outline{background:hsl(var(--background));color:hsl(var(--foreground));border-color:hsl(var(--input))}
.btn-outline:hover{background:hsl(var(--accent));color:hsl(var(--accent-foreground))}
.btn-ghost{background:transparent;color:hsl(var(--foreground))}
.btn-ghost:hover{background:hsl(var(--accent));color:hsl(var(--accent-foreground))}
.btn-destructive{background:hsl(var(--destructive));color:hsl(var(--destructive-foreground))}
.btn-destructive:hover{background:hsl(var(--destructive) / .9)}
.btn-success{background:hsl(var(--success));color:hsl(var(--success-foreground))}
.btn-success:hover{background:hsl(var(--success) / .9)}
a.btn{text-decoration:none}

/* ============================================================
   Input · Select · Textarea · Checkbox
   ============================================================ */
.input,.select,.textarea{
  display:block;width:100%;
  height:2.25rem;padding:0 .75rem;
  font:inherit;font-size:14px;color:hsl(var(--foreground));
  background:hsl(var(--background));
  border:1px solid hsl(var(--input));border-radius:var(--radius);
  box-shadow:0 1px 2px 0 hsl(224 22% 12% / .05);
  transition:border-color .15s,box-shadow .15s;
}
.textarea{height:auto;min-height:5rem;padding:.5rem .75rem;line-height:1.5;resize:vertical}
.input:focus-visible,.select:focus-visible,.textarea:focus-visible{
  outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 3px hsl(var(--ring) / .25);
}
.input::placeholder,.textarea::placeholder{color:hsl(var(--muted-foreground))}
.input:disabled,.select:disabled,.textarea:disabled{opacity:.5;cursor:not-allowed}
/* Select keeps the native popup — the one part of shadcn's Select that needs Radix.
   The chevron is drawn in so it reads as one family with Input. */
.select{
  appearance:none;padding-right:2rem;cursor:pointer;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right .5rem center;background-size:1rem;
}
.dark .select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
.select option{background:hsl(var(--popover));color:hsl(var(--popover-foreground))}
.checkbox{
  appearance:none;flex:0 0 1rem;width:1rem;height:1rem;margin:0;
  border:1px solid hsl(var(--primary));border-radius:4px;
  background:hsl(var(--background));cursor:pointer;
  display:inline-grid;place-content:center;
  transition:background-color .15s,border-color .15s;
}
.checkbox::before{
  content:"";width:.65rem;height:.65rem;transform:scale(0);
  transition:transform .12s;
  background:hsl(var(--primary-foreground));
  clip-path:polygon(14% 44%,0 60%,39% 100%,100% 22%,86% 8%,39% 72%);
}
.checkbox:checked{background:hsl(var(--primary))}
.checkbox:checked::before{transform:scale(1)}
.checkbox:disabled{opacity:.5;cursor:not-allowed}
/* a checkbox with its label beside it */
.chk{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;user-select:none;font-size:14px}
label{font-size:14px}

/* ============================================================
   Badge
   ============================================================ */
.badge{
  display:inline-flex;align-items:center;gap:.25rem;
  border:1px solid transparent;border-radius:9999px;
  padding:.125rem .5rem;font-size:11.5px;font-weight:600;line-height:1.35;
  white-space:nowrap;
}
.badge-secondary{background:hsl(var(--secondary));color:hsl(var(--secondary-foreground))}
.badge-destructive{background:hsl(var(--destructive));color:hsl(var(--destructive-foreground))}
.badge-outline{color:hsl(var(--foreground));border-color:hsl(var(--border))}

/* ============================================================
   Card
   ============================================================ */
.card{
  background:hsl(var(--card));color:hsl(var(--card-foreground));
  border:1px solid hsl(var(--border));
  border-radius:calc(var(--radius) + 4px);
  box-shadow:0 1px 3px 0 hsl(224 22% 12% / .07), 0 1px 2px -1px hsl(224 22% 12% / .07);
  overflow:hidden;
}
.pad{padding:1.25rem 1.5rem}

/* ============================================================
   Dialog — the platform <dialog>, dressed as shadcn's
   ============================================================ */
.dialog{
  padding:0;border:0;background:transparent;
  max-width:min(46rem,calc(100vw - 2rem));width:100%;
  max-height:calc(100vh - 4rem);
  color:hsl(var(--foreground));
}
.dialog::backdrop{background:hsl(224 22% 6% / .6)}
.dialog-content{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:calc(var(--radius) + 4px);
  box-shadow:0 25px 50px -12px hsl(224 22% 6% / .35);
  padding:1.5rem;
  max-height:calc(100vh - 4rem);overflow-y:auto;
  animation:dlg .18s cubic-bezier(.2,.8,.3,1);
}
@keyframes dlg{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}
.dialog h2{margin:0 0 .35rem;font-size:18px;font-weight:600}
.dialog .sub{margin:0 0 1rem;min-height:0;color:hsl(var(--muted-foreground));font-size:14px}
.actions-bar{display:flex;gap:.5rem;justify-content:flex-end;margin-top:1.5rem;flex-wrap:wrap}
.mrow{display:flex;gap:.75rem;flex-wrap:wrap;margin:.75rem 0}
.mrow label{display:flex;flex-direction:column;gap:.375rem;flex:1;min-width:10rem;
  font-size:13px;font-weight:500;color:hsl(var(--foreground))}
.checkrow{display:flex;align-items:center;gap:.625rem;padding:.5rem 0;
  border-bottom:1px solid hsl(var(--border))}
.checkrow:last-child{border-bottom:0}
/* A tick-box row inside .mrow is still a <label>, and .mrow label stacks its children in
   a column so a caption sits above its field. A checkbox and its text are not that shape:
   without this they stack, leaving the box floating above centred text. */
.mrow label.chk{flex-direction:row;align-items:center;justify-content:flex-start;
  gap:.5rem;font-weight:400}
.checkrow .desc{flex:1}
.checkrow .who{color:hsl(var(--muted-foreground));font-size:12px;white-space:nowrap}

/* ============================================================
   Table
   ============================================================ */
table{width:100%;border-collapse:collapse;font-size:14px}
thead th{
  height:2.5rem;padding:0 .625rem;text-align:left;vertical-align:middle;
  font-size:11.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
  color:hsl(var(--muted-foreground));
  border-bottom:1px solid hsl(var(--border));
  background:hsl(var(--card));position:sticky;top:0;z-index:1;
}
tbody td{padding:.625rem;border-bottom:1px solid hsl(var(--border));vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr.click{cursor:pointer;transition:background-color .12s}
tbody tr.click:hover{background:hsl(var(--muted) / .6)}
.name{font-weight:500;color:hsl(var(--foreground))}
.warn{color:hsl(var(--warning));font-weight:600}
.dangertxt{color:hsl(var(--destructive));font-weight:600}
.oktxt{color:hsl(var(--success));font-weight:600}

/* ============================================================
   Shell: sidebar + main
   ============================================================ */
.shell{
  --sidebar-width:15rem;
  --sidebar-width-icon:3.5rem;
  display:grid;
  grid-template-columns:var(--sidebar-width) minmax(0,1fr);
  min-height:100vh;
  /* Deliberately not transitioned. Animating grid-template-columns is expensive, and it
     leaves the track mid-flight wherever transitions do not settle — which reads as the
     rail ignoring the toggle. Snapping is honest and always correct. */
}
.shell[data-collapsed="true"]{grid-template-columns:var(--sidebar-width-icon) minmax(0,1fr)}
.sidebar{
  position:sticky;top:0;align-self:start;height:100vh;
  display:flex;flex-direction:column;gap:1rem;
  padding:1rem .625rem;
  background:hsl(var(--sidebar));color:hsl(var(--sidebar-foreground));
  border-right:1px solid hsl(var(--sidebar-border));
  overflow:hidden;
}
.railtop{display:flex;flex-direction:column;gap:.5rem;padding:.125rem .375rem 0;min-width:0}
/* The full lockup and the icon occupy the same box and cross-fade, so the swap does not
   shift the rows beneath it. Both are laid out absolutely inside a wrapper that owns the
   height; only opacity and scale move, which are cheap to animate.
   The end state is set entirely by these classes, so if transitions do not run the right
   drawing is still the visible one — the animation is polish, never the mechanism. */
/* Centred in the rail: each drawing is pinned to the mid-line and pulled back by half its
   own width, so the pair stays centred whatever their differing widths. The -50% has to
   ride along in every transform below, since a later transform would otherwise replace it. */
/* The logo is the collapse button, so this is a <button> stripped back to a bare box.
   Padding is kept at zero because the drawings are positioned against this box; the hover
   plate is drawn with a spread box-shadow instead, which reaches outside the box without
   taking part in layout and so cannot nudge the logo off centre. */
.brandmark{
  position:relative;height:2.25rem;width:100%;flex:0 0 auto;
  border:0;padding:0;background:transparent;cursor:pointer;
  border-radius:calc(var(--radius) - 2px);
  transition:box-shadow .15s ease;
}
.brandmark:hover{box-shadow:0 0 0 .4rem hsl(var(--sidebar-accent))}
.brandmark:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:.4rem}
.brandmark svg{
  position:absolute;top:0;left:50%;height:100%;width:auto;display:block;
  transform-origin:center;pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
.logo-full{opacity:1;transform:translateX(-50%) scale(1)}
.logo-icon{opacity:0;transform:translateX(-50%) scale(.7)}
.wrap{padding:1.75rem 2rem 4rem;min-width:0}

/* nav items: shadcn's SidebarMenuButton */
nav.tabs{display:flex;flex-direction:column;gap:.125rem;min-width:0}
nav.tabs button{
  display:flex;align-items:center;gap:.625rem;width:100%;
  padding:.5rem .625rem;border:0;border-radius:calc(var(--radius) - 2px);
  background:transparent;color:hsl(var(--sidebar-foreground) / .75);
  font:inherit;font-size:14px;font-weight:500;text-align:left;cursor:pointer;
  transition:background-color .15s,color .15s;
}
nav.tabs button:hover{background:hsl(var(--sidebar-accent));color:hsl(var(--sidebar-accent-foreground))}
nav.tabs button.on{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}
nav.tabs button>span:first-of-type{flex:1 1 auto;min-width:0;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.ni{width:1.05rem;height:1.05rem;flex:0 0 1.05rem;fill:none;stroke:currentColor;
  stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
#wlBadge{margin-left:auto}

/* --- collapsed: an icon strip. Labels go, everything centres. --- */
.shell[data-collapsed="true"] .sidebar{padding:1rem .5rem;align-items:center}
.shell[data-collapsed="true"] .railtop{padding:0;align-items:center}
/* collapsed: the lockup fades out, icon.svg fades in, and the box becomes a centred square */
.shell[data-collapsed="true"] .brandmark{width:1.75rem;height:1.75rem;margin:0 auto}
.shell[data-collapsed="true"] .logo-full{opacity:0;transform:translateX(-50%) scale(.7)}
.shell[data-collapsed="true"] .logo-icon{opacity:1;transform:translateX(-50%) scale(1);width:100%;height:100%}
.shell[data-collapsed="true"] nav.tabs{width:100%;align-items:center}
.shell[data-collapsed="true"] nav.tabs button{justify-content:center;padding:.5rem;width:2.5rem}
.shell[data-collapsed="true"] nav.tabs button>span{display:none}

/* Below this the rail is worse than a strip across the top. */
@media(max-width:1000px){
  .shell,.shell[data-collapsed="true"]{grid-template-columns:minmax(0,1fr)}
  .sidebar{position:static;height:auto;flex-direction:row;align-items:center;gap:.875rem;
    border-right:0;border-bottom:1px solid hsl(var(--sidebar-border));padding:.75rem 1rem}
  .railtop{flex-direction:row;align-items:center;gap:.75rem;padding:0}
  /* the strip across the top always shows just the icon, whatever the rail state is.
     Collapsing does nothing at this width, so the logo stops advertising itself as a
     control — it must NOT be hidden, since it is the same element as the toggle now. */
  .brandmark{width:1.75rem;height:1.75rem;cursor:default}
  .brandmark:hover{box-shadow:none}
  .logo-full{opacity:0}
  .logo-icon{opacity:1;transform:translateX(-50%) scale(1);width:100%;height:100%}
  nav.tabs{flex-direction:row;gap:.25rem;flex:1 1 auto;overflow-x:auto}
  nav.tabs button{width:auto;flex:0 0 auto}
  .wrap{padding:1.25rem 1rem 3rem}
}

/* ---------- header ---------- */
header.top{display:flex;align-items:flex-end;justify-content:space-between;gap:1.5rem;
  flex-wrap:nowrap;margin-bottom:.5rem}
header.top>div:first-child{flex:1 1 auto;min-width:0}
.titleblock{display:flex;align-items:center;gap:1rem}
.titletext{min-width:0;flex:1 1 auto}
h1{font-size:24px;font-weight:600;margin:0;color:hsl(var(--foreground));
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sub{color:hsl(var(--muted-foreground));font-size:14px;margin:.25rem 0 1rem;
  max-width:78ch;min-height:2.6em}
@media(max-width:1000px){header.top{flex-wrap:wrap} h1{white-space:normal;overflow:visible}}
.topright{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap;flex:0 0 auto}
@media(max-width:1000px){.topright{flex-wrap:wrap}}
/* The work list gained two columns with BR-41 and BR-42, which is more than a narrow
   window can hold. A card scrolls its own table sideways rather than letting the page
   scroll: the rail and the header stay where they are, and only the wide thing moves. */
@media(max-width:1000px){
  .card{overflow-x:auto}
  .card>table{min-width:44rem}
}
.screenpop{display:flex;align-items:center;gap:.5rem}
.screenpop .input{width:11rem;height:2rem;font-size:13px}
.userpick{display:flex;align-items:center;gap:.5rem;font-size:13px;
  color:hsl(var(--muted-foreground))}
.userpick .select{width:16rem;height:2rem;font-size:13px}
.signedin{color:hsl(var(--foreground))}

/* ---------- filters ---------- */
.filters{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;margin:.25rem 0 1rem}
.filters .select{width:auto;flex:0 1 13rem;height:2rem;font-size:13px}
.filters .input{flex:1 1 12rem;min-width:10rem;height:2rem;font-size:13px}
.filters .chk{
  border:1px solid hsl(var(--input));border-radius:var(--radius);
  padding:0 .75rem;height:2rem;background:hsl(var(--background));font-size:13px;
}
.filters .chk:hover{border-color:hsl(var(--ring) / .6)}
.count{margin-left:auto;color:hsl(var(--muted-foreground));font-size:13px}
.quickviews{margin-top:-.25rem;display:flex;gap:.375rem;align-items:center;flex-wrap:wrap}
.qv{display:inline-flex;align-items:center;gap:.25rem;cursor:pointer;
  background:hsl(var(--secondary));color:hsl(var(--secondary-foreground));
  border:1px solid transparent;border-radius:9999px;padding:.1875rem .375rem .1875rem .625rem;
  font-size:12.5px;font-weight:500;transition:background-color .15s}
.qv:hover{background:hsl(var(--accent))}
.qv .x,.poolchip .x{border:0;background:hsl(var(--foreground) / .12);color:inherit;
  border-radius:9999px;width:1rem;height:1rem;line-height:1;font-size:11px;padding:0;
  display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
  transition:background-color .15s}
.qv .x:hover,.poolchip .x:hover{background:hsl(var(--destructive));color:hsl(var(--destructive-foreground))}
.selbar{display:flex;align-items:center;gap:.625rem;flex-wrap:wrap;margin:0 0 .875rem;
  background:hsl(var(--card));border:1px solid hsl(var(--border));
  border-radius:var(--radius);padding:.625rem 1rem}
.selbar b{color:hsl(var(--foreground));font-size:15px}
.peek{border:1px solid hsl(var(--input));background:hsl(var(--background));
  color:hsl(var(--muted-foreground));border-radius:calc(var(--radius) - 2px);
  width:1.625rem;height:1.625rem;line-height:1;font-size:14px;padding:0;cursor:pointer}
.peek:hover{color:hsl(var(--foreground));border-color:hsl(var(--ring) / .6)}
/* BR-45: the same control as an <a href="mailto:">. A button centres its own label; an
   anchor does not, so the glyph has to be centred explicitly or it sits low and clipped. */
a.peek{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
a.peek:hover{color:hsl(var(--primary))}
th.tick,td.tick{width:2.25rem;padding-left:.625rem;padding-right:0}
tr.qvrow>td{background:hsl(var(--muted) / .5)}
tr.qvrow:hover>td{background:hsl(var(--muted) / .5)}
.quick{display:grid;grid-template-columns:1fr 1fr 12rem;gap:1.125rem;padding:.25rem 0 .5rem}
@media(max-width:860px){.quick{grid-template-columns:1fr}}
.quick .kv{grid-template-columns:5.75rem 1fr;row-gap:.375rem;font-size:13px}
.qvside{display:flex;flex-direction:column;align-items:flex-start}

/* ---------- status pills ---------- */
.pill{
  display:inline-flex;align-items:center;gap:.375rem;
  padding:.125rem .5rem;border-radius:9999px;
  font-size:11.5px;font-weight:600;white-space:nowrap;
  border:1px solid transparent;
}
.pill::before{content:"";width:.375rem;height:.375rem;border-radius:50%;background:currentColor}
.s-placed{color:hsl(var(--primary));background:hsl(var(--primary) / .12)}
.s-short,.s-ended{color:hsl(var(--muted-foreground));background:hsl(var(--muted-foreground) / .12)}
.s-underway,.s-induction{color:hsl(var(--warning));background:hsl(var(--warning) / .13)}
.s-wfso{color:hsl(var(--muted-foreground));background:hsl(var(--muted-foreground) / .12)}
.s-ended::before,.s-short::before{opacity:.5}
.v-full{color:hsl(var(--success));background:hsl(var(--success) / .13)}
.v-min{color:hsl(var(--warning));background:hsl(var(--warning) / .13)}
.v-no{color:hsl(var(--destructive));background:hsl(var(--destructive) / .12)}
.k-expired,.k-rejected{color:hsl(var(--destructive));background:hsl(var(--destructive) / .12)}
.k-expiring_soon,.k-awaiting_review{color:hsl(var(--warning));background:hsl(var(--warning) / .13)}
.k-destroy_due,.k-uploaded{color:hsl(var(--primary));background:hsl(var(--primary) / .12)}
.k-profile{color:hsl(var(--muted-foreground));background:hsl(var(--muted-foreground) / .12)}
.tierchip{font-size:10.5px;font-weight:600;letter-spacing:.03em;padding:.0625rem .4375rem;
  border-radius:9999px;background:hsl(var(--secondary));color:hsl(var(--secondary-foreground));
  white-space:nowrap}
.tierchip.risk{background:hsl(var(--warning) / .14);color:hsl(var(--warning))}
.tierchip.rs-received{background:hsl(var(--success) / .13);color:hsl(var(--success))}
.tierchip.rs-chased{background:hsl(var(--warning) / .13);color:hsl(var(--warning))}
.tierchip.rs-declined{background:hsl(var(--destructive) / .12);color:hsl(var(--destructive))}
.tierchip.admin{background:hsl(var(--primary) / .13);color:hsl(var(--primary))}
.tierchip.agent{background:hsl(var(--secondary));color:hsl(var(--secondary-foreground))}
/* BR-42: how a document arrived. Deliberately quiet — it is a fact about the row, not
   something the eye should reach before the expiry beside it. */
.tierchip.route{background:hsl(var(--muted));color:hsl(var(--muted-foreground));font-weight:500}

/* ---------- digest banner (shadcn Alert) ---------- */
.digest{
  display:flex;align-items:center;gap:.625rem;flex-wrap:wrap;
  background:hsl(var(--card));border:1px solid hsl(var(--border));
  border-left:3px solid hsl(var(--primary));
  border-radius:var(--radius);padding:.875rem 1.125rem;margin:.25rem 0 1rem;
}
.digest .dtitle{font-weight:600}
.dchip{font-size:12.5px;font-weight:600;padding:.125rem .5rem;border-radius:9999px}
.dchip.amber{color:hsl(var(--warning));background:hsl(var(--warning) / .13)}
.dchip.red{color:hsl(var(--destructive));background:hsl(var(--destructive) / .12)}
.dchip.blue{color:hsl(var(--primary));background:hsl(var(--primary) / .12)}
.digest .dnote{margin-left:auto;color:hsl(var(--muted-foreground));font-size:12px;font-style:italic}

/* ---------- detail layout ---------- */
.back{border:0;background:none;color:hsl(var(--primary));font-weight:500;padding:0;
  margin-bottom:.625rem;cursor:pointer;font-size:14px}
.back:hover{text-decoration:underline}
.grid{display:grid;grid-template-columns:21rem 1fr;gap:1.25rem;align-items:start}
@media(max-width:920px){.grid{grid-template-columns:1fr}}
.kv{display:grid;grid-template-columns:6.25rem 1fr;row-gap:.5rem;font-size:14px}
.kv .k{color:hsl(var(--muted-foreground))}
.kv .val{font-weight:500}
.panel-h{font-weight:600;font-size:15px;margin:0 0 .75rem;display:flex;align-items:center;
  gap:.5rem;flex-wrap:wrap}
.panel-h .right{margin-left:auto}

/* segmented view toggle — shadcn Tabs */
.seg{display:inline-flex;background:hsl(var(--muted));border-radius:var(--radius);
  padding:.1875rem;gap:.125rem}
.seg button{border:0;background:transparent;padding:.375rem .75rem;
  border-radius:calc(var(--radius) - 2px);font:inherit;font-size:13px;font-weight:500;
  color:hsl(var(--muted-foreground));cursor:pointer;transition:background-color .15s,color .15s}
.seg button:hover{color:hsl(var(--foreground))}
.seg button.on{background:hsl(var(--card));color:hsl(var(--foreground));
  box-shadow:0 1px 2px 0 hsl(224 22% 12% / .08)}

/* assignment cards */
.asg{
  background:hsl(var(--card));border:1px solid hsl(var(--border));
  border-radius:calc(var(--radius) + 4px);padding:1.25rem 1.5rem;margin-bottom:1rem;
  transition:border-color .15s;
}
.asg:hover{border-color:hsl(var(--ring) / .35)}
.asg .top{display:flex;justify-content:space-between;align-items:flex-start;gap:.625rem;flex-wrap:wrap}
.asg .role{font-weight:600;font-size:17px}
.asg .client{color:hsl(var(--muted-foreground));font-size:13px;margin-top:.125rem}
.statusrow{display:flex;align-items:center;gap:.625rem;margin:.875rem 0;flex-wrap:wrap}
.statusrow .select{width:auto;min-width:13rem;height:2rem;font-size:13px}

/* requirement lines */
.req{display:flex;align-items:flex-start;gap:.625rem;margin:.5rem 0;font-size:14px}
.req .ic{
  width:1.125rem;height:1.125rem;border-radius:50%;flex:0 0 1.125rem;margin-top:.0625rem;
  display:inline-flex;align-items:center;justify-content:center;
  color:#fff;font-size:11px;font-weight:600;
}
.ic.ok{background:hsl(var(--success))}
.ic.bad{background:hsl(var(--destructive))}
.ic.wait{background:hsl(var(--warning))}
.req .exp{margin-left:auto;color:hsl(var(--muted-foreground));font-size:13px;white-space:nowrap}
.req .exp.bad{color:hsl(var(--destructive));font-weight:600}
.req .doclink{cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.req .doclink:hover{color:hsl(var(--primary))}
.tier{font-weight:600;margin:1rem 0 .25rem;font-size:12px;text-transform:uppercase;
  letter-spacing:.06em;color:hsl(var(--muted-foreground))}
.tier .muted{text-transform:none;letter-spacing:0;font-size:12.5px}

/* banners */
.blocked,.riskbanner{background:hsl(var(--warning) / .1);border:1px solid hsl(var(--warning) / .3);
  border-radius:var(--radius);padding:.625rem .875rem;font-size:13.5px;margin-top:.75rem}
.riskbanner{margin:0 0 .75rem}
.okbanner{background:hsl(var(--success) / .1);border:1px solid hsl(var(--success) / .28);
  border-radius:var(--radius);padding:.625rem .875rem;font-size:13.5px;margin:0 0 .75rem}
.retentionbox{background:hsl(var(--muted) / .6);border:1px solid hsl(var(--border));
  border-radius:var(--radius);padding:.625rem .875rem;font-size:13px;margin-top:.75rem}

/* activity feed */
.act{margin-bottom:.875rem;max-height:27rem;overflow-y:auto;padding-right:.25rem}
.act .row{display:flex;gap:.75rem;padding:.625rem 0;border-bottom:1px solid hsl(var(--border))}
.act .row:last-child{border-bottom:0}
.act .tag{flex:0 0 4rem;font-size:10px;font-weight:600;text-transform:uppercase;
  letter-spacing:.05em;padding:.125rem 0;text-align:center;border-radius:9999px;
  height:fit-content;margin-top:.125rem;
  background:hsl(var(--secondary));color:hsl(var(--secondary-foreground))}
.tag.call{color:hsl(var(--primary));background:hsl(var(--primary) / .12)}
.tag.sms{color:hsl(var(--warning));background:hsl(var(--warning) / .13)}
.act .meta{color:hsl(var(--muted-foreground));font-size:12.5px}
.act .body{font-size:14px}
.addc{display:flex;gap:.5rem;margin-top:.875rem;flex-wrap:wrap}
.addc .input{flex:1 1 8rem;min-width:0}
.addc .select{width:auto;flex:0 0 9rem}
.foot{color:hsl(var(--muted-foreground));font-size:12px;margin-top:1.75rem;
  font-style:italic;opacity:.8}

/* referees / contacts */
.reflist,.contactrow{padding:.625rem .75rem;margin:.5rem 0;border-radius:var(--radius);
  cursor:pointer;background:hsl(var(--card));border:1px solid hsl(var(--border));
  transition:border-color .15s,background-color .15s}
.reflist:hover,.contactrow:hover{border-color:hsl(var(--ring) / .35);background:hsl(var(--accent) / .5)}
.reflist .refname{font-weight:600;display:flex;align-items:center;gap:.5rem}

/* portal rows */
.preq{display:flex;align-items:center;gap:.75rem;padding:.5rem 0;
  border-bottom:1px solid hsl(var(--border))}
.preq:last-child{border-bottom:0}
.preq .pname{flex:1;font-size:14px}
.preq .pstatus{font-size:13px;font-weight:600;min-width:10rem;text-align:right}
.portalnote{color:hsl(var(--muted-foreground));font-size:13px;margin:.625rem 0 .5rem}

/* health questionnaire */
.hq{display:flex;gap:.625rem;align-items:flex-start;padding:.5rem 0;
  border-bottom:1px solid hsl(var(--border));font-size:13.5px}
.hq:last-of-type{border-bottom:0}
.hq .hqa{flex:0 0 2.625rem;text-align:center;font-size:10px;font-weight:600;
  letter-spacing:.05em;border-radius:9999px;padding:.125rem 0;margin-top:.125rem;
  background:hsl(var(--secondary));color:hsl(var(--secondary-foreground))}
.hq.hit .hqa{background:hsl(var(--warning) / .14);color:hsl(var(--warning))}
.hqrow .hqdetail{margin-top:.375rem;width:100%}
.hqbtns button.pass.on{background:hsl(var(--warning));color:#fff}

/* outcome toggle */
.outcome-btns{display:inline-flex;border:1px solid hsl(var(--input));border-radius:var(--radius);
  overflow:hidden;background:hsl(var(--background))}
.outcome-btns button{border:0;background:transparent;padding:.25rem .75rem;font:inherit;
  font-size:12.5px;font-weight:500;color:hsl(var(--muted-foreground));cursor:pointer;
  transition:background-color .15s,color .15s}
.outcome-btns button:hover{color:hsl(var(--foreground))}
.outcome-btns button:first-child{border-right:1px solid hsl(var(--input))}
.outcome-btns button.pass.on{background:hsl(var(--success));color:#fff}
.outcome-btns button.fail.on{background:hsl(var(--destructive));color:#fff}
.vs{font-weight:600}
.vs.verified{color:hsl(var(--success))} .vs.part_verified{color:hsl(var(--warning))}
.vs.unverified{color:hsl(var(--muted-foreground))} .vs.rejected{color:hsl(var(--destructive))}

/* booking */
.bookbar{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.875rem}
.doclink[data-cancel]{cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.doclink[data-cancel]:hover{color:hsl(var(--destructive))}

/* document viewer */
.viewicon{cursor:pointer;margin-right:.4375rem;opacity:.7;display:inline-block;
  transition:opacity .15s,transform .15s}
.viewicon:hover{opacity:1;transform:scale(1.12)}
.viewer{margin-top:.75rem;border:1px solid hsl(var(--border));border-radius:var(--radius);
  background:hsl(var(--muted) / .5);min-height:14rem;max-height:62vh;overflow:auto;
  display:flex;align-items:center;justify-content:center;padding:.75rem}
.viewer img{max-width:100%;max-height:58vh;border-radius:calc(var(--radius) - 2px);display:block}
.viewer iframe{width:100%;height:58vh;border:0;border-radius:calc(var(--radius) - 2px);background:#fff}

/* catalogue */
.matrix{overflow-x:auto}
.matrix td,.matrix th{white-space:nowrap;font-size:13px;padding:.5rem .6875rem}
h3.sect{margin:1.75rem 0 .75rem;font-size:15px;font-weight:600}
details.rp{margin:.5rem 0;border:1px solid hsl(var(--border));background:hsl(var(--card));
  border-radius:var(--radius);padding:.625rem 1rem;transition:border-color .15s}
details.rp:hover{border-color:hsl(var(--ring) / .3)}
details.rp summary{cursor:pointer;font-weight:600}
details.rp summary::marker{color:hsl(var(--primary))}
.reqtags{display:flex;flex-wrap:wrap;gap:.375rem;margin:.625rem 0 .375rem}
.reqtags span{background:hsl(var(--secondary));color:hsl(var(--secondary-foreground));
  border-radius:9999px;padding:.1875rem .625rem;font-size:12.5px}
.reqtags span.t-role{background:hsl(var(--primary) / .12);color:hsl(var(--primary))}
.reqtags span.t-client{background:hsl(var(--warning) / .13);color:hsl(var(--warning))}
.optgrp{display:block;padding:.5rem .25rem .125rem;font-size:11px;font-weight:600;
  text-transform:uppercase;letter-spacing:.05em;color:hsl(var(--muted-foreground))}

/* per-client portal drop-down */
details.pclient>summary{cursor:pointer;display:flex;align-items:center;gap:.625rem;
  flex-wrap:wrap;font-weight:600;list-style:none}
details.pclient>summary::-webkit-details-marker{display:none}
details.pclient>summary::before{content:"▸";color:hsl(var(--primary));font-weight:700;
  transition:transform .15s;display:inline-block}
details.pclient[open]>summary::before{transform:rotate(90deg)}
.pclient .pcname{font-size:15px}
.pclient .pcprog{color:hsl(var(--muted-foreground));font-weight:400;font-size:12.5px;margin-left:auto}

/* talent pools */
.poolchip{display:inline-flex!important;align-items:center;gap:.375rem;cursor:pointer;
  padding-right:.375rem!important}
.poolchip:hover{background:hsl(var(--accent))}

/* clients & jobs */
.clientgrid{display:grid;grid-template-columns:1fr 1.35fr;gap:1.5rem;margin:.375rem 0 .25rem}
@media(max-width:920px){.clientgrid{grid-template-columns:1fr}}
.clientgrid .tier{margin-top:.875rem;display:flex;align-items:center}
table.jobs td,table.jobs th{font-size:13px;padding:.5rem .625rem}
table.jobs .select{width:auto;min-width:8rem;height:1.875rem;font-size:12.5px}

/* permissions */
.permgroup{margin:.625rem 0 .25rem}
.permcat{font-weight:600;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;
  margin:.75rem 0 .25rem;color:hsl(var(--muted-foreground))}
.permrow{display:flex;align-items:flex-start;gap:.5625rem;padding:.375rem 0;font-size:13.5px;
  cursor:pointer;border-bottom:1px solid hsl(var(--border))}
.permrow:last-child{border-bottom:0}
.permrow .checkbox{margin-top:.125rem}
/* BR-48: where each ticked permission comes from — the role, or this person specifically */
.permsrc:empty{display:none}
.permsrc .tierchip{margin-left:.375rem}

/* ============================================================
   BR-43 — drag-and-drop upload
   The zone is a <label> wrapping a hidden file input, so a click opens the picker and
   the keyboard path is unchanged: dropping is an addition, never the only way in.
   ============================================================ */
.dropzone{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;
  border:1.5px dashed hsl(var(--input));border-radius:calc(var(--radius) + 2px);
  background:hsl(var(--muted) / .35);
  padding:1.5rem 1rem;margin:.75rem 0;cursor:pointer;text-align:center;
  transition:border-color .15s,background-color .15s;
}
.dropzone:hover{border-color:hsl(var(--ring) / .6);background:hsl(var(--muted) / .6)}
/* .over is set on dragenter and cleared on both dragleave and drop — never from an
   animation callback, which in a throttled window may never run at all. */
.dropzone.over{border-color:hsl(var(--primary));background:hsl(var(--primary) / .08)}
.dropzone.has{border-style:solid;border-color:hsl(var(--success) / .5);background:hsl(var(--success) / .07)}
.dropzone .dzicon{font-size:20px;line-height:1;color:hsl(var(--muted-foreground))}
.dropzone.over .dzicon,.dropzone.has .dzicon{color:hsl(var(--primary))}
.dropzone .dztitle{font-weight:600;font-size:14px}
.dropzone .dzsub{font-size:12.5px;color:hsl(var(--muted-foreground))}

/* BR-36 — one tab per client above the assignment cards. Drawn only when a candidate
   holds assignments at more than one client. */
.clienttabs{margin-bottom:.875rem;max-width:100%;overflow-x:auto}
.clienttabs button{white-space:nowrap}
.clienttabs button .muted{font-size:11.5px;margin-left:.25rem}
.clienttabs button.on .muted{color:hsl(var(--foreground) / .55)}

/* BR-44 — an expired or superseded row, once the wallet is asked to show them. Dimmed
   rather than coloured: it is history, and history should not compete with the live row
   above it for attention. */
tbody tr.faded>td{opacity:.55}
tbody tr.faded:hover>td{opacity:.8}

/* ============================================================
   Toasts — shadcn's Sonner shape
   ============================================================ */
#toastHost{
  position:fixed;bottom:1rem;right:1rem;z-index:100;
  display:flex;flex-direction:column;gap:.5rem;align-items:flex-end;
  pointer-events:none;
}
.toast{
  background:hsl(var(--card));color:hsl(var(--card-foreground));
  border:1px solid hsl(var(--border));border-radius:var(--radius);
  box-shadow:0 10px 15px -3px hsl(224 22% 6% / .18), 0 4px 6px -4px hsl(224 22% 6% / .18);
  padding:.75rem 1rem;font-size:13.5px;max-width:24rem;
  opacity:0;transform:translateY(.5rem);
  transition:opacity .2s,transform .2s;
  pointer-events:auto;
}
.toast.show{opacity:1;transform:none}

/* ---------- scrollbars ---------- */
::-webkit-scrollbar{width:.625rem;height:.625rem}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:hsl(var(--muted-foreground) / .35);border-radius:9999px;
  border:2px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground) / .55);
  border:2px solid transparent;background-clip:content-box}
