/* =====================================================================
   HTS UI 2026 — colour per module, clearer navigation, denser layout.

   Loaded LAST from Site.master, after infographic.css, so it wins on equal
   specificity everywhere without !important (a few exceptions are marked
   where an older file already used !important).

   THE IDEA
   Every page belongs to a module (NavMap.Group). Site.master writes that
   module onto <body> as `mod-<name>`, and each module sets ONE colour:
       --mod        the module colour (icons, active states, primary buttons)
       --mod-deep   darker, for text on a tint
       --mod-tint   a pale wash, for headers and hovers
       --mod-soft   between the two, for borders and focus rings
   Everything below is written against --mod, so a page is coloured by the
   module it lives in and nothing per page has to change. The sidebar groups
   carry the same classes, so the colour of a menu is the colour of the
   screens behind it — you always know where you are.

   The organisation's brand accent (--accent, from Branding) still drives the
   logo mark, links outside a module and the login page.
   ===================================================================== */

:root {
    --m-me:          #7C3AED;
    --m-recruitment: #2563EB;
    --m-demands:     #0D9488;
    --m-interviews:  #EA580C;
    --m-clientformat:#DB2777;
    --m-messages:    #0891B2;
    --m-reports:     #4F46E5;
    --m-payroll:     #16A34A;
    --m-finance:     #CA8A04;
    --m-admin:       #475569;
    --m-vendors:     #E11D48;

    --mod: var(--accent, #3B6EF0);

    --ui-radius:    12px;
    --ui-radius-sm: 8px;
    --ui-gap:       16px;
    --ui-shadow:    0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
    --ui-shadow-up: 0 6px 18px rgba(16,24,40,.10);
    --content-max:  1760px;
}

/* ---- the module classes: one line each ------------------------------ */
.mod-me           { --mod: var(--m-me); }
.mod-recruitment  { --mod: var(--m-recruitment); }
.mod-demands      { --mod: var(--m-demands); }
.mod-interviews   { --mod: var(--m-interviews); }
.mod-clientformat { --mod: var(--m-clientformat); }
.mod-messages     { --mod: var(--m-messages); }
.mod-reports      { --mod: var(--m-reports); }
.mod-payroll      { --mod: var(--m-payroll); }
.mod-finance      { --mod: var(--m-finance); }
.mod-admin        { --mod: var(--m-admin); }
.mod-vendors      { --mod: var(--m-vendors); }

/* Derived shades. color-mix is in every browser this app supports (Chrome,
   Edge, Firefox, Safari 16.2+); where it is missing these simply fall back to
   the plain module colour or the neutral surfaces. */
body, .sb-group {
    --mod-deep: color-mix(in srgb, var(--mod) 72%, #000);
    --mod-tint: color-mix(in srgb, var(--mod) 8%, var(--surface, #fff));
    --mod-soft: color-mix(in srgb, var(--mod) 28%, var(--surface, #fff));
    --mod-ring: color-mix(in srgb, var(--mod) 22%, transparent);
}
[data-theme="dark"] body, [data-theme="dark"] .sb-group {
    --mod-deep: color-mix(in srgb, var(--mod) 55%, #fff);
    --mod-tint: color-mix(in srgb, var(--mod) 14%, var(--surface, #171B24));
    --mod-soft: color-mix(in srgb, var(--mod) 40%, var(--surface, #171B24));
}

/* =====================================================================
   1. Canvas and the module stripe
   ===================================================================== */
body { background: var(--canvas); }
/* A 3px band in the module colour across the top of the window: the first
   thing the eye gets on every page is which part of the system this is. */
.main::before {
    content: ""; position: sticky; top: 0; z-index: 1021; display: block;
    height: 3px; background: linear-gradient(90deg, var(--mod), color-mix(in srgb, var(--mod) 45%, #fff));
}

/* =====================================================================
   2. Sidebar — flat, readable, colour-coded, inline (no hover hunting)
   ===================================================================== */
.sb {
    width: 252px; flex-basis: 252px; max-width: 86vw;
    background: #0E1424;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: none; border-right: 1px solid rgba(255,255,255,.06);
}
.sb::before, .sb::after { display: none; }
/* Only on desktop: below 993px theme.css turns the sidebar into a drawer and
   the main column must start at the left edge. */
@media (min-width: 993px) {
    .main { margin-left: 252px; }
    .shell.sb-collapsed .sb { width: 72px; }
    .shell.sb-collapsed .main { margin-left: 72px; }
}

.sb-brand { padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sb-mark { background: var(--accent); box-shadow: none; border-radius: 10px; }
.sb-nav { padding: 10px 10px 28px; overflow-y: auto; }

/* Top-level link (Jobs) */
.sb-nav > .sb-link { color: rgba(226,232,240,.82); padding: 8px 10px; }

/* Group header: an icon chip in the module colour, the name, a count. */
.sb-group { margin-top: 2px; padding-top: 0; border-top: 0; }
.sb-group-label {
    cursor: pointer; min-height: 40px; padding: 6px 8px; border-radius: 10px;
    font-size: .8rem; font-weight: 600; letter-spacing: .01em; text-transform: none;
    color: rgba(226,232,240,.86);
}
.sb-group-label > span { margin: 0 6px 0 10px; }
.sb-group-label .sb-gi {
    flex: 0 0 28px; width: 28px; height: 28px; margin: 0 !important;
    display: inline-grid; place-items: center; border-radius: 8px;
    font-size: .95rem; opacity: 1 !important;
    color: color-mix(in srgb, var(--mod) 55%, #fff);
    background: color-mix(in srgb, var(--mod) 22%, transparent);
}
.sb-group-label:hover,
.sb-group:hover > .sb-group-label { background: rgba(255,255,255,.05); color: #fff; }
.sb-group-label .bi-chevron-down { transform: rotate(0deg); opacity: .5; font-size: .7rem; }
.sb-group.is-open > .sb-group-label { color: #fff; }
.sb-group.is-open > .sb-group-label .bi-chevron-down { transform: rotate(180deg); opacity: .9; }
/* The group you are in gets its colour on the label, open or not. */
.sb-group-label.open { background: color-mix(in srgb, var(--mod) 16%, transparent); color: #fff; }
.sb-group-label.open .sb-gi { background: var(--mod); color: #fff; }

.sb-badge { background: var(--mod); }
.sb-badge-sm { background: color-mix(in srgb, var(--mod) 70%, transparent); }

/* Expanded sidebar (desktop and the mobile drawer): groups open INLINE as an
   accordion. Before, every page sat in a hover-only flyout, so finding a
   screen meant sweeping the mouse over eleven headings. Now the group you are
   in is open, its pages are listed, and one click opens another group. */
.shell:not(.sb-collapsed) .sb-flyout,
.sb.open .sb-flyout {
    position: static; display: none; margin: 2px 0 6px 22px; min-width: 0;
    padding: 2px 0 2px 12px; max-height: none; overflow: visible;
    background: none; border: 0; border-left: 2px solid color-mix(in srgb, var(--mod) 45%, transparent);
    border-radius: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
}
.shell:not(.sb-collapsed) .sb-flyout::before { display: none; }
.shell:not(.sb-collapsed) .sb-group.is-open > .sb-flyout,
.sb.open .sb-group.is-open > .sb-flyout { display: block; }
.shell:not(.sb-collapsed) .sb-flyout.wide { min-width: 0; }
.shell:not(.sb-collapsed) .sb-flyout.wide .sb-inner { column-count: 1; }

.sb-flyout .sb-link {
    padding: 6px 10px; margin: 1px 0; font-size: .82rem; border: 0;
    color: rgba(226,232,240,.74); border-radius: 8px;
}
.sb-flyout .sb-link i { font-size: .9rem; opacity: .7; }
.sb-flyout .sb-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-link.active, .sb-flyout .sb-link.active {
    background: color-mix(in srgb, var(--mod) 30%, transparent);
    color: #fff; font-weight: 600; border: 0; box-shadow: none;
}
.sb-link.active i, .sb-flyout .sb-link.active i { color: #fff; opacity: 1; }
.sb-link.active::before, .sb-flyout .sb-link.active::before {
    content: ""; position: absolute; left: -14px; top: 6px; bottom: 6px; width: 3px;
    border-radius: 3px; background: var(--mod); box-shadow: none;
}
.sb-cap {
    margin: 8px 0 2px; padding: 0 10px; border-top: 0 !important; padding-top: 0 !important;
    color: color-mix(in srgb, var(--mod) 40%, rgba(226,232,240,.5));
    font-size: .6rem; letter-spacing: .1em;
}

/* Collapsed (icon rail): keep the hover flyout — there is no room inline. */
.shell.sb-collapsed .sb-flyout {
    background: #141B2E; border: 1px solid rgba(255,255,255,.08);
    border-top: 3px solid var(--mod); border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0,0,0,.45);
    -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* Sidebar search box (added by ui-2026.js) */
.sb-find { position: relative; margin: 2px 2px 10px; }
.sb-find input {
    width: 100%; height: 34px; padding: 0 10px 0 32px; border-radius: 9px;
    border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05);
    color: #fff; font-size: .8rem; outline: 0;
}
.sb-find input::placeholder { color: rgba(226,232,240,.45); }
.sb-find input:focus { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.sb-find i { position: absolute; left: 11px; top: 9px; color: rgba(226,232,240,.5); font-size: .85rem; }
.shell.sb-collapsed .sb-find { display: none; }
.sb-nav.filtering .sb-group > .sb-flyout { display: block !important; }
.sb-nav.filtering .sb-link.no-match,
.sb-nav.filtering .sb-cap,
.sb-nav.filtering .sb-group.no-match { display: none !important; }

/* =====================================================================
   3. Top bar
   ===================================================================== */
.topbar {
    height: 58px; padding: 0 22px; gap: 12px;
    background: color-mix(in srgb, var(--surface, #fff) 92%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(8px); backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--line);
    top: 3px;
}
.topbar .crumb { font-size: .86rem; gap: 8px; }
.topbar .crumb .crumb-ico {
    width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px;
    background: var(--mod-tint); color: var(--mod); opacity: 1; font-size: 1rem;
    border: 1px solid var(--mod-soft);
}
.topbar .crumb .crumb-grp { color: var(--mod-deep); font-weight: 600; }
.topbar .crumb .crumb-sep { color: var(--muted-2); }
.topbar .crumb strong { font-size: .95rem; }
.gk-search-btn {
    background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; min-width: 240px;
    height: 36px; box-shadow: none; color: var(--muted);
}
.gk-search-btn:hover { border-color: var(--mod-soft); }
.nc-bell { color: var(--muted); }
.nc-bell:hover { background: var(--mod-tint); color: var(--mod-deep); }
.userchip .av { background: var(--mod); color: #fff; }
@media (max-width: 1200px) { .gk-search-btn { min-width: 0; } .gk-search-btn .gk-label, .gk-search-btn kbd { display: none; } }

/* =====================================================================
   4. Page body — wider, tighter, consistent headings
   ===================================================================== */
.page-body, .content { padding: 20px 24px 28px; }
@media (max-width: 768px) { .page-body, .content { padding: 14px 12px 20px; } }

/* The first heading of any page picks up the module: an icon chip and the
   module colour. Works on the existing h3/h4/h5 headers without touching the
   pages, because they almost all lead with a Bootstrap icon. */
.page-body h1 > .bi:first-child, .page-body h2 > .bi:first-child,
.page-body h3 > .bi:first-child, .page-body h4 > .bi:first-child,
.page-body h5 > .bi:first-child {
    display: inline-grid; place-items: center; width: 1.9em; height: 1.9em;
    margin-right: .45em; vertical-align: -.45em; border-radius: .55em;
    background: var(--mod-tint); color: var(--mod) !important; font-size: .82em;
    border: 1px solid var(--mod-soft);
}
.page-body h1, .page-body h2, .page-body h3, .page-body h4 { letter-spacing: -.015em; }
.page-body .text-primary { color: var(--mod) !important; }

/* ---- Page hero: title, one line of context, actions, then KPIs ------ */
/* overflow stays visible (module 186): menus opened from the hero's action
   buttons — e.g. Demands → From Fieldglass — hang below it, and "hidden"
   cut them off at the hero's edge. The gradients are painted inside the
   rounded border box anyway, so nothing else needed the clipping. */
.ui-hero {
    position: relative; overflow: visible;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 20px; margin-bottom: var(--ui-gap); border-radius: var(--ui-radius);
    background:
        radial-gradient(600px 160px at 100% 0%, color-mix(in srgb, var(--mod) 16%, transparent), transparent 70%),
        linear-gradient(135deg, var(--mod-tint), var(--surface) 70%);
    border: 1px solid var(--mod-soft);
}
.ui-hero .ui-hero-ico {
    flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    background: var(--mod); color: #fff; font-size: 1.35rem;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--mod) 35%, transparent);
}
.ui-hero .ui-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ui-hero h1, .ui-hero h3, .ui-hero h4, .ui-hero h5 { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.ui-hero h1 > .bi:first-child, .ui-hero h3 > .bi:first-child,
.ui-hero h4 > .bi:first-child, .ui-hero h5 > .bi:first-child { display: none; }
.ui-hero .ui-hero-sub { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.ui-hero .ui-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- KPI tiles ------------------------------------------------------- */
.ui-kpis {
    display: grid; gap: 12px; margin-bottom: var(--ui-gap);
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.ui-kpi {
    --k: var(--mod);
    position: relative; display: flex; gap: 12px; align-items: center;
    padding: 14px 16px; border-radius: var(--ui-radius);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--ui-shadow);
    color: var(--ink); text-decoration: none; overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.ui-kpi::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--k); opacity: .9;
}
a.ui-kpi:hover { transform: translateY(-2px); box-shadow: var(--ui-shadow-up); border-color: color-mix(in srgb, var(--k) 40%, var(--line)); color: var(--ink); text-decoration: none; }
.ui-kpi .ui-kpi-ico {
    flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    font-size: 1.15rem; color: var(--k);
    background: color-mix(in srgb, var(--k) 13%, var(--surface));
}
.ui-kpi .ui-kpi-v { font-size: 1.55rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.ui-kpi .ui-kpi-l { font-size: .74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ui-kpi .ui-kpi-s { font-size: .72rem; color: var(--muted-2); }
.ui-kpi.k-blue   { --k: #2563EB; } .ui-kpi.k-teal  { --k: #0D9488; }
.ui-kpi.k-green  { --k: #16A34A; } .ui-kpi.k-amber { --k: #D97706; }
.ui-kpi.k-red    { --k: #DC2626; } .ui-kpi.k-violet{ --k: #7C3AED; }
.ui-kpi.k-pink   { --k: #DB2777; } .ui-kpi.k-cyan  { --k: #0891B2; }
.ui-kpi.k-indigo { --k: #4F46E5; } .ui-kpi.k-slate { --k: #475569; }

/* ---- Section title inside a page ------------------------------------ */
.ui-section {
    display: flex; align-items: center; gap: 8px; margin: 4px 0 10px;
    font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--mod-deep);
}
.ui-section .bi { color: var(--mod); }
.ui-section::after { content: ""; flex: 1; height: 1px; background: var(--line); margin-left: 6px; }

/* ---- Two-column work area: filters / form left, results right -------- */
.ui-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--ui-gap); align-items: start; }
.ui-split.wide-left { grid-template-columns: 380px minmax(0, 1fr); }
@media (max-width: 1100px) { .ui-split, .ui-split.wide-left { grid-template-columns: 1fr; } }
.ui-sticky { position: sticky; top: 76px; }
@media (max-width: 1100px) { .ui-sticky { position: static; } }

/* ---- Filter bar ------------------------------------------------------ */
.ui-filter {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
    padding: 12px 14px; margin-bottom: 12px; border-radius: var(--ui-radius);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--ui-shadow);
}
.ui-filter > * { flex: 1 1 160px; min-width: 0; }
.ui-filter > .ui-filter-btns { flex: 0 0 auto; display: flex; gap: 6px; }
.ui-filter label, .ui-filter .form-label { font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }

/* =====================================================================
   5. Components — cards, tables, forms, buttons, badges, tabs, alerts
   ===================================================================== */
.card { border-radius: var(--ui-radius); border-color: var(--line); box-shadow: var(--ui-shadow); }
.card-header {
    background: linear-gradient(180deg, var(--mod-tint), var(--surface));
    border-bottom: 1px solid var(--line); border-radius: var(--ui-radius) var(--ui-radius) 0 0;
    font-weight: 700; color: var(--ink);
}
.card-header > .bi:first-child, .card-header .bi:first-child { color: var(--mod); }
.card.ui-accent { border-top: 3px solid var(--mod); }

/* Tables: tinted sticky header, calm zebra, a clear hover row. */
.table { --bs-table-hover-bg: var(--mod-tint); margin-bottom: 0; }
.table > thead > tr > th, .table > thead th {
    background: color-mix(in srgb, var(--mod) 6%, var(--surface));
    color: var(--mod-deep); font-size: .72rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
    border-bottom: 1px solid var(--mod-soft); padding-top: .6rem; padding-bottom: .6rem;
    position: sticky; top: 0; z-index: 1;
}
.table > tbody > tr > td { vertical-align: middle; border-color: var(--line-soft); }
.table > tbody > tr:hover > td { background: var(--mod-tint); }
.table > tbody > tr:nth-child(even) > td { background-color: color-mix(in srgb, var(--canvas) 55%, var(--surface)); }
.table > tbody > tr:nth-child(even):hover > td { background: var(--mod-tint); }

/* Forms: one focus colour — the module's. */
.form-control, .form-select { border-radius: var(--ui-radius-sm); border-color: var(--line); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--mod); box-shadow: 0 0 0 .2rem var(--mod-ring);
}
.form-check-input:checked { background-color: var(--mod); border-color: var(--mod); }
.form-label { font-weight: 600; font-size: .8rem; color: var(--ink-2); }

/* Buttons: primary takes the module colour; everything else stays neutral. */
.btn { border-radius: 9px; font-weight: 600; }
.btn-primary {
    --bs-btn-bg: var(--mod); --bs-btn-border-color: var(--mod);
    --bs-btn-hover-bg: var(--mod-deep); --bs-btn-hover-border-color: var(--mod-deep);
    --bs-btn-active-bg: var(--mod-deep); --bs-btn-active-border-color: var(--mod-deep);
    --bs-btn-disabled-bg: var(--mod); --bs-btn-disabled-border-color: var(--mod);
    background-color: var(--mod); border-color: var(--mod); color: #fff;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--mod) 30%, transparent);
}
.btn-primary:hover, .btn-primary:focus { background-color: var(--mod-deep); border-color: var(--mod-deep); color: #fff; }
.btn-outline-primary {
    --bs-btn-color: var(--mod); --bs-btn-border-color: var(--mod-soft);
    --bs-btn-hover-bg: var(--mod); --bs-btn-hover-border-color: var(--mod);
    color: var(--mod); border-color: var(--mod-soft);
}
.btn-outline-primary:hover { background: var(--mod); border-color: var(--mod); color: #fff; }
.btn-outline-secondary { border-color: var(--line); color: var(--ink-2); }
.btn-outline-secondary:hover { background: var(--canvas); color: var(--ink); border-color: var(--muted-2); }

/* Badges: soft coloured pills instead of saturated blocks, so a table full of
   statuses reads as colour coding rather than noise. Text stays dark enough
   for AA contrast on its tint. */
.badge { font-weight: 600; border-radius: 999px; padding: .38em .68em; letter-spacing: .01em; }
.badge.bg-success   { background: #DCFCE7 !important; color: #166534 !important; }
.badge.bg-danger    { background: #FEE2E2 !important; color: #991B1B !important; }
.badge.bg-warning   { background: #FEF3C7 !important; color: #92400E !important; }
.badge.bg-info      { background: #CFFAFE !important; color: #155E75 !important; }
.badge.bg-primary   { background: var(--mod-tint) !important; color: var(--mod-deep) !important; box-shadow: inset 0 0 0 1px var(--mod-soft); }
.badge.bg-secondary { background: #E2E8F0 !important; color: #334155 !important; }
.badge.bg-dark      { background: #1E293B !important; color: #fff !important; }
.badge.bg-light     { background: var(--canvas) !important; color: var(--ink-2) !important; }
[data-theme="dark"] .badge.bg-success   { background: rgba(34,197,94,.18) !important;  color: #86EFAC !important; }
[data-theme="dark"] .badge.bg-danger    { background: rgba(239,68,68,.18) !important;  color: #FCA5A5 !important; }
[data-theme="dark"] .badge.bg-warning   { background: rgba(245,158,11,.18) !important; color: #FCD34D !important; }
[data-theme="dark"] .badge.bg-info      { background: rgba(6,182,212,.18) !important;  color: #67E8F9 !important; }
[data-theme="dark"] .badge.bg-secondary { background: rgba(148,163,184,.2) !important; color: #CBD5E1 !important; }

/* Tabs and pills */
.nav-tabs { border-bottom-color: var(--line); }
.nav-tabs .nav-link { color: var(--muted); font-weight: 600; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link:hover { color: var(--mod-deep); border-bottom-color: var(--mod-soft); }
.nav-tabs .nav-link.active { color: var(--mod-deep); background: transparent; border-bottom-color: var(--mod); }
.nav-pills .nav-link.active { background: var(--mod); }

/* Alerts: a coloured edge carries the meaning, the body stays readable. */
.alert { border-radius: 10px; border-width: 0 0 0 4px; }
.alert-success { border-left-color: #16A34A; }
.alert-danger  { border-left-color: #DC2626; }
.alert-warning { border-left-color: #D97706; }
.alert-info    { border-left-color: #0891B2; }

/* Pagination */
.pagination .page-link { color: var(--mod-deep); border-radius: 8px; margin: 0 2px; border-color: var(--line); }
.pagination .page-item.active .page-link { background: var(--mod); border-color: var(--mod); color: #fff; }

/* Older shared KPI cards (infographic.css / theme.css tiles) pick up the
   module colour too, so every report page gets the new look for free. */
.ig-kpi { border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); }
.tile { border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); border-top: 3px solid var(--mod); }
.tile .t-foot { color: var(--mod); }
.hd-ico { background: var(--mod-tint); color: var(--mod); }

/* Empty states */
.ui-empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.ui-empty .bi { font-size: 1.8rem; color: var(--mod); opacity: .6; display: block; margin-bottom: 6px; }

/* Utility: a soft chip for counts next to headings */
.ui-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
    font-size: .72rem; font-weight: 700; background: var(--mod-tint); color: var(--mod-deep);
    border: 1px solid var(--mod-soft);
}

/* Money tables: right-aligned numbers, negative red, positive green. */
.ui-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-neg { color: #DC2626; } .ui-pos { color: #16A34A; }

/* Footer */
.page-foot { text-align: center; }

/* Print: no chrome. */
@media print {
    .sb, .topbar, .main::before, .page-foot { display: none !important; }
    .main { margin-left: 0 !important; }
}

/* Pipeline spine in the module colour (candidate hero, candidate lists). */
.spine-node.done::before, .spine-node.done::after,
.spine-node.here::before { background: var(--mod-soft); }
.spine-node.done .spine-dot { background: var(--mod-soft); border-color: var(--mod-soft); }
.spine-node.here .spine-dot { background: var(--mod); border-color: var(--mod); box-shadow: 0 0 0 4px var(--mod-ring); }
.spine-node.here .spine-label { color: var(--mod-deep); }
.cd-spine { padding-top: 6px; border-top: 1px dashed var(--mod-soft); margin-top: 4px; }

/* =====================================================================
   6. Page-specific cards from older modules, brought into the system.
   These pages keep their own markup; only the skin changes.
   ===================================================================== */
/* Command centre */
.cc-sec { color: var(--mod-deep) !important; font-weight: 700; letter-spacing: .06em; }
.cc-tile, .cc-reg, .cc-card {
    border-radius: var(--ui-radius) !important; box-shadow: var(--ui-shadow);
    border-top: 3px solid var(--mod-soft);
}
.cc-tile.cc-good  { border-top-color: #16A34A; }
.cc-tile.cc-watch { border-top-color: #D97706; }
.cc-tile.cc-bad, .cc-tile.cc-stop { border-top-color: #DC2626; }
.cc-val { color: var(--ink); }
/* Executive dashboard */
.ex-today {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding: 10px 14px; border-radius: var(--ui-radius);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--ui-shadow);
}
.ex-t { padding: 4px 12px; border-radius: 10px; background: var(--mod-tint); }
.ex-t b { color: var(--mod-deep); }
.ex-card {
    border-radius: var(--ui-radius) !important; box-shadow: var(--ui-shadow);
    border-top: 3px solid var(--mod) !important;
}
.ex-card:nth-child(6n+2) { border-top-color: #2563EB !important; }
.ex-card:nth-child(6n+3) { border-top-color: #0D9488 !important; }
.ex-card:nth-child(6n+4) { border-top-color: #CA8A04 !important; }
.ex-card:nth-child(6n+5) { border-top-color: #DB2777 !important; }
.ex-card:nth-child(6n+6) { border-top-color: #0891B2 !important; }
/* Recruitment dashboard pipeline steps */
.pl-step { border-radius: var(--ui-radius) !important; box-shadow: var(--ui-shadow); }
.pl-step:hover { background: var(--mod-tint) !important; }
/* Finance cards and the placement form */
.fin-card, .pl-form { border-radius: var(--ui-radius) !important; box-shadow: var(--ui-shadow); }
.pl-band { color: var(--mod-deep) !important; border-color: var(--mod-soft) !important; }
/* Dashboard section labels used by several pages */
.hd-sec { color: var(--mod-deep); }
/* Sticky first column for very wide money grids (payroll worksheet). */
.pw-wrap .table > tbody > tr > td:first-child,
.pw-wrap .table > thead > tr > th:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.pw-wrap .table > thead > tr > th:first-child { z-index: 3; background: color-mix(in srgb, var(--mod) 6%, var(--surface)); }

/* Controls sitting in a hero keep their natural width. */
.ui-hero-actions .form-select, .ui-hero-actions .form-control { width: auto; min-width: 140px; }
.ui-hero-actions .form-label { font-size: .7rem; color: var(--muted); }

/* Phones: a smaller hero, KPIs two to a row. */
@media (max-width: 640px) {
    .ui-hero { padding: 14px; }
    .ui-hero .ui-hero-ico { width: 40px; height: 40px; flex-basis: 40px; font-size: 1.1rem; border-radius: 12px; }
    .ui-hero h1, .ui-hero h3, .ui-hero h4, .ui-hero h5 { font-size: 1.1rem; }
    .ui-hero .ui-hero-actions { width: 100%; }
    .ui-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ui-kpi { padding: 10px 12px; gap: 8px; }
    .ui-kpi .ui-kpi-ico { width: 34px; height: 34px; flex-basis: 34px; font-size: 1rem; }
    .ui-kpi .ui-kpi-v { font-size: 1.3rem; }
    .ui-kpi .ui-kpi-s { display: none; }
    .topbar { padding: 0 12px; }
}
