/* secondary text: one colour, checked for 4.5:1 contrast in light and dark mode (instead of fading with opacity) */
:root { --rk-muted: #4f5869; }
html.dark { --rk-muted: #a9b3c6; }
/* =====================================================================
   App-wide styles (loaded on every admin page via UNFOLD["STYLES"]).
   Dashboard-only styles live in static/css/dashboard.css.

   Performance rules for this file:
   - no infinite animations, no `filter: blur()` on large areas,
     no `backdrop-filter` on many/large elements (each one is re-blurred by the GPU).
   ===================================================================== */

/* =====================================================================
   COLOURS: one theme (light by default, dark on request with the sun / moon button in the top bar).
   - Unfold's colour scales (--color-primary-*, --color-base-*, written "R G B") so every admin page follows it;
   - --pb-hero1/2/3   the dark banner gradient (dark mode);
   - --pb-c1..c8      data colours for KPI accents, bars and charts;
   - --h1..--h9       hues used by the kanban columns and profile card.
   The login / 2FA pages have their own separate look (static/css/login.css).
   ===================================================================== */
html:root {   /* 'html:root' outranks the theme's own :root colours (written in another format) */
  --color-primary-50: 235 245 255; --color-primary-100: 214 234 255; --color-primary-200: 174 213 255;
  --color-primary-300: 122 186 255; --color-primary-400: 64 158 255; --color-primary-500: 17 141 255;
  --color-primary-600: 0 112 224; --color-primary-700: 0 89 181; --color-primary-800: 6 72 145;
  --color-primary-900: 12 60 118; --color-primary-950: 9 38 77;
  --color-base-50: 248 250 252; --color-base-100: 241 245 249; --color-base-200: 226 232 240;
  --color-base-300: 203 213 225; --color-base-400: 148 163 184; --color-base-500: 100 116 139;
  --color-base-600: 71 85 105; --color-base-700: 51 65 85; --color-base-800: 30 41 66;
  --color-base-900: 15 23 45; --color-base-950: 8 13 30;
  --pb-hero1: #0a1633; --pb-hero2: #13307a; --pb-hero3: #2f6cf0;
  --pb-c1: #118dff; --pb-c2: #e66c37; --pb-c3: #12b886; --pb-c4: #744ec2;
  --pb-c5: #e044a7; --pb-c6: #2bb5d8; --pb-c7: #d9b300; --pb-c8: #d64550;
  --h1:210; --h2:20; --h3:160; --h4:262; --h5:320; --h6:192; --h7:50; --h8:355; --h9:230;
}
/* app font: Segoe UI on Windows (the Power BI / Office face), Inter elsewhere */
:root { --pb-font: "Segoe UI", "Segoe UI Variable Text", Inter, system-ui, sans-serif; }

.hue-1 { --h: var(--h1); } .hue-2 { --h: var(--h2); } .hue-3 { --h: var(--h3); }
.hue-4 { --h: var(--h4); } .hue-5 { --h: var(--h5); } .hue-6 { --h: var(--h6); }
.hue-7 { --h: var(--h7); } .hue-8 { --h: var(--h8); } .hue-9 { --h: var(--h9); }

/* ========== app canvas: dark-to-shade gradient (no lines), painted ONCE ==========
   (static: no animation, no blur filter) */
html { background: rgb(var(--color-base-100)); }
html.dark { background: rgb(var(--color-base-950)); }
body { background: transparent !important; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; contain: strict;
  background:
    radial-gradient(60% 55% at 0% 0%, rgb(var(--color-primary-200) / .45), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, rgb(var(--color-primary-100) / .6), transparent 70%),
    linear-gradient(135deg, rgb(var(--color-base-100)), rgb(var(--color-base-50)) 50%, rgb(var(--color-base-200)));
}
html.dark body::before {
  background:
    radial-gradient(60% 55% at 0% 0%, rgb(var(--color-primary-700) / .28), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, rgb(var(--color-primary-900) / .35), transparent 70%),
    linear-gradient(135deg, rgb(var(--color-base-950)), rgb(var(--color-base-900)) 50%, rgb(var(--color-base-950)));
}
#main, main { background: transparent !important; }

/* ========== buttons (dashboard, export, import pages) ========== */
.rk-btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 8px;
  font-size: .85rem; font-weight: 600; line-height: 1.2;
  color: #fff !important; text-decoration: none; border: 0; cursor: pointer;
  background: rgb(var(--color-primary-600));
  box-shadow: 0 6px 16px -10px rgb(var(--color-primary-700));
  transition: filter .15s;
}
.rk-btn:hover { filter: brightness(1.08); }
.rk-btn .material-symbols-outlined { font-size: 18px; }
.rk-btn.ghost { background: transparent; color: inherit !important; border: 1px solid rgba(128,128,128,.45); box-shadow: none; }
.rk-btn.ghost:hover { background: rgba(128,128,128,.1); filter: none; }
.rk-btn.on { background: linear-gradient(135deg, #16a34a, #0d9488); color: #fff !important; border-color: transparent; }

/* ========== candidate profile card (recruitment/admin.py) ========== */
.rk-pcard {
  --h: var(--h2);
  position: relative; overflow: hidden;
  display: flex; gap: 1.4rem; align-items: center; padding: 1.4rem 1.6rem; border-radius: 20px; margin-bottom: .5rem;
  background: linear-gradient(135deg, hsl(var(--h) 100% 97%), hsl(var(--h) 90% 90%));
  border: 1px solid hsl(var(--h) 70% 82%);
  color: hsl(var(--h) 45% 18%);
  box-shadow: 0 8px 20px -10px hsl(var(--h) 60% 50% / .45);
}
.dark .rk-pcard {
  background: linear-gradient(135deg, hsl(var(--h) 68% 24%), hsl(calc(var(--h) + 38) 72% 34%));
  border-color: hsl(var(--h) 85% 58% / .55);
  color: #fff;
  box-shadow: 0 12px 30px -12px hsl(var(--h) 95% 55% / .6);
}
.rk-avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none;
  border: 4px solid rgba(255,255,255,.8); box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.rk-initials { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; color: #fff; background: hsl(var(--h) 70% 45%); }
.rk-pinfo h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 .15rem; }
.rk-pinfo p { margin: 0 0 .6rem; color: var(--rk-muted); }
.rk-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.rk-chip { padding: .2rem .65rem; border-radius: 99px; font-size: .75rem; font-weight: 600; background: hsl(var(--h) 60% 100% / .55); border: 1px solid hsl(var(--h) 60% 70% / .6); }
.dark .rk-chip { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.rk-thumb { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: inline-block; }
.rk-thumb-i { display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: #fff; background: hsl(var(--h2) 62% 36%); }

/* ========== simple pages (export options, document import) ========== */
.rk-form { max-width: 820px; }
.rk-form h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .75rem; }
.rk-form p, .rk-form .rk-hint { margin-bottom: .8rem; }
.rk-hint { padding: .8rem 1rem; border-radius: 12px; font-size: .85rem; background: rgba(128,128,128,.12); line-height: 1.7; }
.rk-form code { padding: .05rem .35rem; border-radius: 6px; background: rgba(128,128,128,.2); font-size: .8rem; }
.rk-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.rk-bad { color: #b91c1c; } .rk-warn { color: #a16207; } .rk-good { color: #15803d; }
html.dark .rk-bad { color: #ff8a93; } html.dark .rk-warn { color: #fbbf24; } html.dark .rk-good { color: #4ade80; }
.rk-form h3 { margin-top: 1rem; font-weight: 700; }
.rk-form ul { margin: .4rem 0 0 1.2rem; list-style: disc; font-size: .85rem; }

/* ========== printing: exactly what is on screen (same theme, same light/dark mode) ==========
   Browsers drop background colours when printing unless told not to; "exact" keeps them,
   so a dark-mode page prints dark with the selected theme. */
@page { size: A4 landscape; margin: 8mm; }
@media print {
  html, body, body *, body::before, body *::before, body *::after {
    -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
  }
  .rk-topbtns { display: none !important; }
  #nav-sidebar, aside, header, #header { display: none !important; }
  .rk-card, .rk-pcard { break-inside: avoid; }
}

/* ========== kanban board ========== */
.kb-wrap { max-width: 100%; }
.kb-filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: .5rem 0 1rem; font-size: .85rem; }
.kb-filters select { padding: .4rem .6rem; border-radius: 8px; border: 1px solid rgba(128,128,128,.4); background: transparent; color: inherit; }
.kb-board { display: flex; gap: .8rem; overflow-x: auto; align-items: flex-start; padding-bottom: 1rem; }
.kb-col { flex: none; width: 262px; border-radius: 14px; background: rgba(128,128,128,.10); border: 1px solid rgba(128,128,128,.22); }
.kb-col-head { display: flex; justify-content: space-between; padding: .65rem .8rem; font-weight: 700; border-top: 4px solid hsl(var(--h) 80% 55%); border-radius: 14px 14px 0 0; }
.kb-count { font-size: .75rem; padding: .05rem .5rem; border-radius: 99px; background: hsl(var(--h) 80% 55% / .3); }
.kb-drop { min-height: 90px; padding: .5rem; display: flex; flex-direction: column; gap: .5rem; border-radius: 0 0 14px 14px; }
.kb-drop.over { outline: 2px dashed hsl(var(--h) 80% 55%); outline-offset: -4px; }
.kb-card { padding: .6rem .7rem; border-radius: 12px; font-size: .82rem; background: #fff; border: 1px solid rgba(128,128,128,.28); box-shadow: 0 2px 6px rgba(0,0,0,.08); cursor: grab; }
.dark .kb-card { background: rgba(255,255,255,.07); box-shadow: none; }
.kb-card.dragging { opacity: .45; }
.kb-top { display: flex; align-items: center; gap: .5rem; }
.kb-name { font-weight: 700; text-decoration: none; color: inherit; } .kb-name:hover { text-decoration: underline; }
.kb-job { margin: .3rem 0; } .kb-job small { color: var(--rk-muted); }
.kb-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.kb-chip { font-size: .7rem; padding: .1rem .5rem; border-radius: 99px; background: rgba(128,128,128,.18); }
.kb-chip.kb-warn { background: #fef3c7; color: #92400e; } .kb-chip.kb-bad { background: #fee2e2; color: #991b1b; }
.dark .kb-chip.kb-warn { background: #78350f; color: #fde68a; } .dark .kb-chip.kb-bad { background: #7f1d1d; color: #fecaca; }
.kb-approve { margin-top: .4rem; width: 100%; padding: .3rem; border: 0; border-radius: 8px; font-weight: 700; cursor: pointer; color: #fff; background: #16a34a; }
.kb-move { margin-top: .4rem; width: 100%; font-size: .72rem; padding: .25rem; border-radius: 8px; border: 1px solid rgba(128,128,128,.35); background: transparent; color: inherit; }
.kb-toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 10000; padding: .7rem 1.2rem; border-radius: 10px; font-weight: 600; max-width: 80vw; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.kb-toast.ok { background: #16a34a; color: #fff; } .kb-toast.err { background: #b91c1c; color: #fff; }


/* =====================================================================
   LEFT NAVIGATION — modern look (styles Unfold's own sidebar markup)
   - soft gradient panel, group titles with a fading rule, gradient separators;
   - items: a thin fading line between options, and on hover a gradient pill,
     an accent bar that grows in, and the icon nudging forward.
   Motion is transform/opacity/background only (cheap), off for "reduce motion".
   ===================================================================== */
#nav-sidebar, #nav-sidebar-inner {
  background: linear-gradient(180deg, rgb(var(--color-base-50)), rgb(var(--color-base-100))) !important;
  border-color: rgb(var(--color-base-900) / .06) !important;
}
html.dark #nav-sidebar, html.dark #nav-sidebar-inner {
  background: linear-gradient(180deg, rgb(var(--color-base-900)), rgb(var(--color-base-950))) !important;
  border-color: rgb(255 255 255 / .05) !important;
}
/* agency copies: "Powered by Arvalyx" pinned to the bottom of the sidebar (template: unfold/helpers/navigation.html).
   Stays in view while the menu scrolls; quiet so the agency's logo at the top remains the brand. */
.rk-powered {
  position: sticky; bottom: 0; z-index: 1; margin-top: auto;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 16px; border-top: 1px solid rgb(var(--color-base-900) / .07);
  background: rgb(var(--color-base-100) / .92);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 11px; font-weight: 500; letter-spacing: .02em; color: rgb(var(--color-base-500));
}
.rk-powered img { height: 14px; width: auto; display: block; opacity: .9; }
.rk-powered .rk-pw-dark { display: none; }
html.dark .rk-powered { background: rgb(var(--color-base-950) / .92); border-top-color: rgb(255 255 255 / .06);
  color: rgb(var(--color-base-400)); }
html.dark .rk-powered .rk-pw-light { display: none; }
html.dark .rk-powered .rk-pw-dark { display: block; }
/* group titles:  RECRUITMENT ───── */
#nav-sidebar-inner h2 {
  display: flex; align-items: center; gap: .6rem;
  font-size: .68rem !important; font-weight: 700 !important; letter-spacing: .12em; text-transform: uppercase;
  color: rgb(var(--color-base-500)) !important;
}
#nav-sidebar-inner h2::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgb(var(--color-primary-500) / .45), transparent);
}
/* separators between groups */
#nav-sidebar-inner hr {
  border: 0 !important; height: 1px; margin-top: .75rem !important; margin-bottom: .75rem !important;
  background: linear-gradient(90deg, transparent, rgb(var(--color-base-400) / .35), transparent);
}
/* a thin fading line between each option */
#nav-sidebar-inner ol > li { position: relative; }
#nav-sidebar-inner ol > li + li::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: -3px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(var(--color-base-400) / .32), transparent);
}
/* the options */
#nav-sidebar-inner ol > li > a {
  position: relative; overflow: hidden;
  transition: background-color .2s ease, color .2s ease, transform .2s cubic-bezier(.2,.8,.2,1);
}
#nav-sidebar-inner ol > li > a::before {        /* accent bar that grows in on hover */
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, rgb(var(--color-primary-400)), rgb(var(--color-primary-600)));
  transform: scaleY(0); transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
#nav-sidebar-inner ol > li > a .material-symbols-outlined { transition: transform .22s cubic-bezier(.2,.8,.2,1), color .2s; }
#nav-sidebar-inner ol > li > a:hover {
  transform: translateX(3px);
  background: linear-gradient(90deg, rgb(var(--color-primary-500) / .13), rgb(var(--color-primary-500) / 0) 85%) !important;
}
#nav-sidebar-inner ol > li > a:hover::before { transform: scaleY(1); }
#nav-sidebar-inner ol > li > a:hover .material-symbols-outlined { transform: translateX(2px) scale(1.12); color: rgb(var(--color-primary-500)); }
/* the page you are on */
#nav-sidebar-inner ol > li > a.font-semibold {
  background: linear-gradient(90deg, rgb(var(--color-primary-500) / .2), rgb(var(--color-primary-500) / .02) 90%) !important;
  box-shadow: inset 0 0 0 1px rgb(var(--color-primary-500) / .12);
}
#nav-sidebar-inner ol > li > a.font-semibold::before { transform: scaleY(1); }
#nav-sidebar-inner ol > li > a.font-semibold .material-symbols-outlined { color: rgb(var(--color-primary-500)); }
@media (prefers-reduced-motion: reduce) {
  #nav-sidebar-inner ol > li > a, #nav-sidebar-inner ol > li > a::before,
  #nav-sidebar-inner ol > li > a .material-symbols-outlined { transition: none; }
  #nav-sidebar-inner ol > li > a:hover, #nav-sidebar-inner ol > li > a:hover .material-symbols-outlined { transform: none; }
}

/* ========== candidate files: list column, View buttons, profile card buttons ========== */
.rk-docs-link {
  display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 6px;
  font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none;
  color: rgb(var(--color-primary-600)); background: rgb(var(--color-primary-500) / .1);
}
.rk-docs-link:hover { background: rgb(var(--color-primary-500) / .2); }
html.dark .rk-docs-link { color: rgb(var(--color-primary-300)); }
.rk-docs-link .material-symbols-outlined { font-size: 17px; }
.rk-docs-none { font-size: .8rem; opacity: .5; }
.rk-view-btn {
  display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 6px;
  font-size: .8rem; font-weight: 600; white-space: nowrap; text-decoration: none;
  color: rgb(var(--color-primary-600)); border: 1px solid rgb(var(--color-primary-500) / .35);
}
.rk-view-btn:hover { background: rgb(var(--color-primary-500) / .1); }
html.dark .rk-view-btn { color: rgb(var(--color-primary-300)); }
.rk-view-btn .material-symbols-outlined { font-size: 17px; }
.rk-pcard-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.rk-pcard .rk-btn.ghost { color: inherit !important; }

/* ========== job orders: requirement priority pills, hiring-process summary ========== */
.rk-req-pill {
  display: inline-block; padding: .05rem .45rem; border-radius: 5px; font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.rk-req-pill.p-mandatory { color: #b42318; background: rgba(214,69,80,.12); }
.rk-req-pill.p-preferred { color: #0b6bcb; background: rgba(17,141,255,.12); }
.rk-req-pill.p-nice      { color: #0f7a55; background: rgba(18,184,134,.12); }
html.dark .rk-req-pill.p-mandatory { color: #ff9aa2; }
html.dark .rk-req-pill.p-preferred { color: #7cc0ff; }
html.dark .rk-req-pill.p-nice      { color: #6ee7b7; }
.rk-skip { font-size: .8rem; font-weight: 600; color: #b45309; }
html.dark .rk-skip { color: #fbbf24; }
.rk-muted { font-size: .8rem; color: var(--rk-muted); }
.rk-req-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.rk-req-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; font-size: .86rem; }
/* job order page: compact layout */
#id_process_steps { flex-direction: row !important; flex-wrap: wrap; gap: .45rem 1.4rem !important; }
.field-requirements textarea { height: 5.5rem; min-height: 0; }
/* the requirements table repeats each row's text as a caption row: hide it
   (hidden inputs in that row are still submitted) */
#requirement_items-group tr:has(> td.original) { display: none; }

/* light/dark switches instantly (rk_widget.js adds this class for a moment) */
html.rk-switching *, html.rk-switching *::before, html.rk-switching *::after { transition: none !important; }
/* form fields always follow dark mode */
html.dark textarea, html.dark select, html.dark input:not([type=checkbox]):not([type=radio]) { color-scheme: dark; }

/* ========== users: access rules summary ========== */
.rk-acc { display: inline-block; padding: .05rem .45rem; border-radius: 5px; font-size: .74rem; font-weight: 600; white-space: nowrap;
  color: rgb(var(--color-primary-700)); background: rgb(var(--color-primary-500) / .12); }
html.dark .rk-acc { color: rgb(var(--color-primary-300)); }
.rk-acc.wait { color: #b45309; background: rgba(245,158,11,.15); }
html.dark .rk-acc.wait { color: #fbbf24; }

/* inactivity warning (rk_widget.js) */
.rk-idle-warn {
  position: fixed; left: 50%; top: 18px; z-index: 10001; transform: translateX(-50%);
  max-width: min(560px, 92vw); padding: .75rem 1.1rem; border-radius: 10px;
  font-size: .9rem; font-weight: 600; line-height: 1.4; color: #fff;
  background: #b45309; box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
/* user page: working days in a row; device rows without the repeated caption */
[id$="access_policy-0-days"] { flex-direction: row !important; flex-wrap: wrap; gap: .45rem 1.3rem !important; }
#devices-group tr:has(> td.original) { display: none; }
#devices-group td.field-status select { min-width: 11.5rem; }
.rk-acc.locked { color: #b42318; background: rgba(214,69,80,.14); }
html.dark .rk-acc.locked { color: #ff9aa2; }

/* ========== profile pictures (top-right menu, users list, my profile page) ========== */
.rk-avatar-btn { display: block; cursor: pointer; border-radius: 50%; line-height: 0; transition: box-shadow .15s; }
.rk-avatar-btn:hover { box-shadow: 0 0 0 3px rgb(var(--color-primary-500) / .35); }
.rk-avatar-img, .rk-avatar-ini { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.rk-avatar-img { object-fit: cover; box-shadow: 0 0 0 2px rgb(var(--color-primary-500) / .5); }
.rk-avatar-ini {
  display: grid; place-items: center; font-size: .75rem; font-weight: 700; letter-spacing: .02em; line-height: 1; color: #fff;
  background: linear-gradient(135deg, rgb(var(--color-primary-500)), rgb(var(--color-primary-700)));
}
.rk-avatar-img.lg, .rk-avatar-ini.lg { width: 40px; height: 40px; font-size: .85rem; }
.rk-avatar-img.xl, .rk-avatar-ini.xl { width: 120px; height: 120px; font-size: 2.2rem; }
.rk-menu-who { display: flex; align-items: center; gap: .65rem; margin: 0 .25rem .25rem; padding: .6rem .7rem .7rem;
  border-bottom: 1px solid rgb(var(--color-base-200)); }
html.dark .rk-menu-who { border-color: rgb(var(--color-base-700)); }
.rk-menu-name { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.rk-menu-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-menu-name small { font-size: .75rem; color: var(--rk-muted); }
.rk-avatar-sm { width: 30px; height: 30px; font-size: .68rem; }
/* file pickers on simple pages: a real button instead of the plain browser control */
.rk-form input[type=file] { font-size: .85rem; }
.rk-form input[type=file]::file-selector-button {
  margin-right: .8rem; padding: .45rem .9rem; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600;
  color: inherit; background: rgb(var(--color-primary-500) / .12); border: 1px solid rgb(var(--color-primary-500) / .4);
}
.rk-form input[type=file]::file-selector-button:hover { background: rgb(var(--color-primary-500) / .22); }

/* ========== online applications (review pages, job order links) ========== */
.rk-links { display: grid; gap: .4rem; max-width: 760px; }
.rk-link-row { display: grid; grid-template-columns: 7rem 1fr auto; align-items: center; gap: .5rem; font-size: .85rem; }
.rk-link-row input { width: 100%; padding: .4rem .6rem; border-radius: 8px; font-family: ui-monospace, Consolas, monospace; font-size: .8rem;
  border: 1px solid rgb(var(--color-base-300)); background: rgb(var(--color-base-50)); color: inherit; }
html.dark .rk-link-row input { border-color: rgb(var(--color-base-700)); background: rgb(var(--color-base-900)); }
.rk-link-row .rk-btn { padding: .35rem .8rem; }
.rk-dups { margin: 0 0 .4rem; padding-left: 1.1rem; }
.rk-dups small { color: var(--rk-muted); }
.rk-choice { display: flex; gap: .7rem; align-items: flex-start; margin: .6rem 0; padding: .85rem 1rem; border-radius: 10px; cursor: pointer;
  border: 1.5px solid rgb(var(--color-base-300) / .7); }
html.dark .rk-choice { border-color: rgb(var(--color-base-700)); }
.rk-choice:has(input:checked) { border-color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500) / .07); }
.rk-choice.off { opacity: .85; cursor: not-allowed; }
.rk-choice input { margin-top: .25rem; }
.rk-choice b { display: block; }
.rk-choice small { display: block; color: var(--rk-muted); margin-top: .15rem; }
.rk-choice ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .85rem; }
.rk-bad-box { border: 1px solid rgba(214,69,80,.4); background: rgba(214,69,80,.08); }
.rk-textarea { width: 100%; margin: .4rem 0 1rem; padding: .6rem .75rem; border-radius: 8px; font: inherit;
  border: 1px solid rgb(var(--color-base-300)); background: transparent; color: inherit; }

/* Duplicate NIC: banner on the candidate page and the override on the approve page */
.rk-dup-banner { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; padding: 12px 16px;
  border-radius: 12px; border-left: 4px solid #d64550; background: rgba(214,69,80,.10); color: #8f1d26; }
.rk-dup-banner .material-symbols-outlined { color: #d64550; font-size: 24px; }
.rk-dup-banner b { margin-right: 4px; }
.rk-dup-banner a { font-weight: 600; text-decoration: underline; }
.rk-dup-banner small { display: block; margin-top: 3px; color: var(--rk-muted); }
html.dark .rk-dup-banner { background: rgba(214,69,80,.16); color: #ffc2c7; }
.rk-dup-ok { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px;
  border-radius: 8px; background: rgba(245,158,11,.12); font-size: 13px; }
.rk-dup-ok input { margin-top: 3px; }
@media print { .rk-dup-banner { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* applicant messages: sent pill + SMS preview bubble */
.rk-acc.ok { color: #067647; background: rgba(23,178,106,.14); }
html.dark .rk-acc.ok { color: #6ce9a6; }
.rk-sms { max-width: 360px; margin-bottom: 4px; padding: 10px 14px; border-radius: 16px 16px 16px 4px;
  background: rgba(127,127,127,.12); font-size: 14px; line-height: 1.45; white-space: pre-wrap; }

/* ========== Fill missing details (candidates) ========== */
.rk-fill h1 { font-size: 1.5rem; font-weight: 800; margin: .3rem 0 .4rem; }
.rk-fill .rk-muted { color: var(--rk-muted); margin-bottom: .9rem; max-width: 900px; }
.rk-fill-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.rk-fill-tabs a { padding: .4rem .8rem; border-radius: 99px; font-size: .85rem; font-weight: 600;
  border: 1px solid rgba(127,127,127,.3); }
.rk-fill-tabs a b { margin-left: .3rem; padding: 0 .4rem; border-radius: 99px; background: rgba(127,127,127,.15); }
.rk-fill-tabs a.on { color: #fff; background: rgb(var(--color-primary-600)); border-color: transparent; }
.rk-fill-tabs a.on b { background: rgba(0,0,0,.25); }
.rk-fill-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(127,127,127,.2); }
.rk-fill-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: .88rem; }
.rk-fill-table th { padding: .6rem .7rem; text-align: left; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(127,127,127,.08); }
.rk-fill-table td { padding: .55rem .7rem; vertical-align: top; border-top: 1px solid rgba(127,127,127,.15); }
.rk-fill-table td small { display: block; color: var(--rk-muted); margin-top: 2px; }
.rk-fill-table td small.rk-bad { opacity: 1; color: #c2353f; font-weight: 600; }
.rk-fill-table tr.bad { background: rgba(214,69,80,.07); }
.rk-fill-table input, .rk-fill-table select { width: 100%; padding: .4rem .55rem; border-radius: 8px; font-size: .88rem;
  border: 1px solid rgba(127,127,127,.35); background: transparent; }
html.dark .rk-fill-table select option, html.dark .rk-fill-table select optgroup { background: #1b2233; }
.rk-fill-table input:focus, .rk-fill-table select:focus { outline: 2px solid rgb(var(--color-primary-500) / .5); border-color: transparent; }
.rk-fill-done { display: inline-block; padding: .3rem 0; font-weight: 600; color: #067647; }
html.dark .rk-fill-done { color: #6ce9a6; }
.rk-fill-actions { position: sticky; bottom: 0; display: flex; align-items: center; gap: 1rem; padding: .8rem 0;
  background: inherit; }
.rk-fill-actions .rk-btn { display: inline-flex; align-items: center; gap: .35rem; }

/* call history on the candidate page; Call center dashboard card */
.rk-call-row { padding: .35rem 0; border-top: 1px solid rgba(127,127,127,.15); font-size: .86rem; }
.rk-call-row small { display: block; color: var(--rk-muted); }
.rk-call-stats b a { font-size: 15px; text-decoration: underline; }
.rk-call-stats { margin-bottom: 10px; }

/* ========== quick filter buttons above lists ========== */
.rk-qf { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1rem; }
.rk-qf-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .7rem; border-radius: 99px; font-size: .82rem; font-weight: 600;
  border: 1px solid rgba(127,127,127,.28); background: rgba(127,127,127,.05); transition: background .12s, border-color .12s; }
.rk-qf-btn:hover { border-color: rgb(var(--color-primary-500) / .6); background: rgb(var(--color-primary-500) / .08); }
.rk-qf-btn .material-symbols-outlined { font-size: 1.05rem; opacity: .8; }
.rk-qf-btn.on { color: #fff; background: rgb(var(--color-primary-600)); border-color: transparent; }
.rk-qf-btn.on .material-symbols-outlined { opacity: 1; }
.rk-qf-btn.zero:not(.on) { color: var(--rk-muted); border-style: dashed; }   /* nothing to show */
.rk-qf-n { min-width: 1.4rem; padding: 0 .4rem; border-radius: 99px; font-size: .74rem; text-align: center; background: rgba(127,127,127,.16); }
.rk-qf-btn.on .rk-qf-n { background: rgba(255,255,255,.25); }
.rk-qf-n.warn { color: #fff; background: #b45309; }
.rk-qf-n.bad { color: #fff; background: #b42330; }
.rk-qf-note { color: var(--rk-muted); font-size: .75rem; }
@media print { .rk-qf { display: none; } }

/* ========== phones: nothing wider than the screen ==========
   Browsers give <fieldset> a minimum width of its widest field (a file picker, a long dropdown), which pushed
   edit pages sideways on phones. */
fieldset.module { min-width: 0; }
.field-line input[type=file], .field-line select, .select2-container { max-width: 100% !important; }
@media (max-width: 600px) {
}

/* document checklist ticks: readable in light and dark mode */
.rk-doc-ok { color: #15803d; } .rk-doc-miss { color: #b91c1c; }
html.dark .rk-doc-ok { color: #6ce9a6; } html.dark .rk-doc-miss { color: #ffa4ab; }
/* phones: a dropdown and its small view / edit / delete buttons wrap instead of pushing the page sideways */
.related-widget-wrapper { flex-wrap: wrap; max-width: 100%; min-width: 0; }
.related-widget-wrapper > select, .related-widget-wrapper > .select2-container { min-width: 0; flex: 1 1 12rem; }

/* light mode: amber "waiting" pills a shade darker so the text stays readable */
html:not(.dark) .rk-acc.wait { color: #92400e; }

/* ========== motion (every admin page) ==========
   Rules: only transform / opacity (cheap for the browser), short, and each one answers something the person did
   or marks one moment. Everything below is switched off for "reduce motion" users at the end of this block. */
:root { --rk-ease: cubic-bezier(.2, .8, .2, 1); --rk-spring: cubic-bezier(.34, 1.4, .64, 1); }

/* messages: slide in, close button, fade away */
.rk-msg { position: relative; padding-right: 2.4rem !important; animation: rk-msg-in .42s var(--rk-ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms); }
.rk-msg-x { position: absolute; top: 50%; right: .6rem; translate: 0 -50%; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  font-size: 1.15rem; line-height: 1; opacity: .65; transition: opacity .15s, background-color .15s; }
.rk-msg-x:hover, .rk-msg-x:focus-visible { opacity: 1; background: rgba(127,127,127,.18); }
li:has(> .rk-msg) { transition: height .32s var(--rk-ease), opacity .25s, transform .32s var(--rk-ease); }
li.rk-msg-out { opacity: 0; transform: translateY(-6px); overflow: hidden; }
@keyframes rk-msg-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* quick filter buttons and the general buttons: a small press, so a click visibly "lands" */
.rk-qf-btn, .rk-btn, .rk-cc-btn { transition: transform .12s var(--rk-ease), background-color .15s, border-color .15s, box-shadow .15s; }
.rk-qf-btn:active, .rk-btn:active, .rk-cc-btn:active { transform: scale(.96); }
.rk-qf-btn.on { animation: rk-pop .32s var(--rk-spring); }
@keyframes rk-pop { from { transform: scale(.9); } }

/* Kanban: a moved card glides to its new column (script), then glows once where it landed */
.kb-card.kb-landed { animation: kb-land 1.1s var(--rk-ease); }
@keyframes kb-land { 0% { box-shadow: 0 0 0 0 hsl(var(--h, 210) 85% 55% / .6); } 100% { box-shadow: 0 0 0 14px hsl(var(--h, 210) 85% 55% / 0); } }
.kb-count.kb-bump { animation: rk-pop .35s var(--rk-spring); }
.kb-card { transition: box-shadow .15s, transform .15s var(--rk-ease); }
.kb-card:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .rk-msg, .rk-qf-btn.on, .kb-card.kb-landed, .kb-count.kb-bump { animation: none !important; }
  .rk-qf-btn, .rk-btn, .rk-cc-btn, li:has(> .rk-msg), .kb-card { transition: none !important; }
  .rk-qf-btn:active, .rk-btn:active, .rk-cc-btn:active, .kb-card:hover { transform: none; }
}


/* ========== Access per tab (user and role pages) ========== */
.rk-ta { max-width: 1000px; }
.rk-ta-help { margin: 0 0 .7rem; font-size: .85rem; color: var(--rk-muted); }
.rk-ta-table { border: 1px solid rgba(127,127,127,.22); border-radius: 12px; overflow: hidden; }
.rk-ta-row { display: grid; grid-template-columns: minmax(0, 1.25fr) 190px minmax(0, 1.6fr); gap: .4rem 1rem; align-items: center;
  padding: .55rem .8rem; border-top: 1px solid rgba(127,127,127,.16); }
.rk-ta-row:first-child { border-top: 0; }
.rk-ta-head { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rk-muted);
  background: rgba(127,127,127,.06); }
.rk-ta-name { display: flex; align-items: flex-start; gap: .55rem; min-width: 0; }
.rk-ta-name > .material-symbols-outlined { margin-top: .1rem; color: rgb(var(--color-primary-600)); }
html.dark .rk-ta-name > .material-symbols-outlined { color: rgb(var(--color-primary-400)); }
.rk-ta-name b { display: block; font-size: .9rem; }
.rk-ta-name small { display: block; font-size: .76rem; color: var(--rk-muted); }
.rk-ta-role { color: #067647 !important; font-weight: 600; }
html.dark .rk-ta-role { color: #6ce9a6 !important; }
.rk-ta-row.off .rk-ta-name b { color: var(--rk-muted); font-weight: 600; }
.rk-ta-level { width: 100%; padding: .45rem .6rem; border-radius: 9px; font-size: .88rem; font-weight: 600; color: inherit;
  border: 1.5px solid rgba(127,127,127,.35); background: rgba(255,255,255,.9); }
html.dark .rk-ta-level { background: rgba(2,6,23,.5); }
html.dark .rk-ta-level option { background: #1b2233; }
.rk-ta-level.lv-view { border-color: rgba(11,107,203,.55); }
.rk-ta-level.lv-edit { border-color: rgba(18,183,106,.6); }
.rk-ta-level.lv-full { border-color: rgba(214,69,80,.55); }
.rk-ta-level:focus-visible { outline: 2px solid rgb(var(--color-primary-500)); outline-offset: 1px; }
.rk-ta-extras { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .84rem; }
.rk-ta-extras[hidden] { display: none; }
.rk-ta-extras label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.rk-ta-extras input { width: 1rem; height: 1rem; accent-color: rgb(var(--color-primary-600)); }
.rk-ta-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .7rem; font-size: .82rem; color: var(--rk-muted); }
.rk-ta-quick button { padding: .3rem .7rem; border-radius: 99px; font-weight: 600; color: inherit; border: 1px solid rgba(127,127,127,.3); }
.rk-ta-quick button:hover { background: rgba(127,127,127,.1); }
@media (max-width: 760px) {
  .rk-ta-row { grid-template-columns: 1fr; }
  .rk-ta-head { display: none; }
}

/* contrast fixes for the admin theme's own parts (found by the accessibility check) */
html:not(.dark) .bg-blue-50 { color: #1d4ed8 !important; }                  /* blue description boxes */
html.dark #submit-row a[href$="/delete/"], html.dark #submit-row a[href$="/delete/"] * { color: #ff9aa2 !important; }
#user_form a[href$="password/"] { color: rgb(var(--color-primary-700)); text-decoration: underline; text-underline-offset: 2px; }
html.dark #user_form a[href$="password/"] { color: rgb(var(--color-primary-300)); }
html:not(.dark) .md\:border-primary-500 { color: rgb(var(--color-primary-700)); }      /* the selected tab */
html:not(.dark) .rk-fill-table th { color: #4b5565; }
html:not(.dark) .inline-deletelink { color: #b3000a !important; }
html.dark .readonly .text-primary-600 { color: rgb(var(--color-primary-400)) !important; }
html.dark .bg-blue-50 { color: #a8c8ff !important; }

/* =====================================================================
   LIGHT DESIGN (the default look)
   Four calm layers, one accent:
     canvas  cool off-white with two faint colour washes (painted once, never animated)
     panels  white, hairline border, soft two-step shadow (cards, forms, tables, sidebar)
     raised  menus and dialogs: a stronger shadow
     accent  the brand blue for the active item, focus rings and primary buttons
   Performance: no backdrop blur, no animated shadows. Hover only moves (transform) or fades (opacity),
   which the graphics card does without repainting the page; all effects stop for "reduce motion".
   ===================================================================== */
html:not(.dark) {
  --rk-canvas: #f3f5fa;
  --rk-line: #e3e8f0;
  --rk-line-strong: #d3dae6;
  --rk-sh-1: 0 1px 2px rgb(16 24 40 / .05);
  --rk-sh-2: 0 1px 2px rgb(16 24 40 / .04), 0 6px 18px -6px rgb(16 24 40 / .10);
  --rk-sh-3: 0 4px 10px -2px rgb(16 24 40 / .08), 0 18px 40px -10px rgb(16 24 40 / .18);
  --rk-ring: 0 0 0 4px rgb(var(--color-primary-500) / .16);
}
html:not(.dark) { background: var(--rk-canvas); }
html:not(.dark) body::before {
  background:
    radial-gradient(46rem 26rem at 8% -8%, rgb(var(--color-primary-200) / .42), transparent 70%),
    radial-gradient(40rem 24rem at 102% -4%, rgb(196 181 253 / .22), transparent 70%),
    linear-gradient(180deg, #f8fafd 0%, var(--rk-canvas) 38%, #eef2f8 100%);
}

/* sidebar: a white panel; the open page gets a tinted pill with a blue edge */
html:not(.dark) #nav-sidebar { background: rgb(255 255 255 / .9); border-right-color: var(--rk-line); box-shadow: var(--rk-sh-1); }
#nav-sidebar a { transition: background-color .15s, color .15s; }
html:not(.dark) #nav-sidebar a:not(.font-semibold):hover { background: rgb(var(--color-base-100)); }
html:not(.dark) #nav-sidebar a.font-semibold {
  color: rgb(var(--color-primary-700));
  background: linear-gradient(90deg, rgb(var(--color-primary-500) / .13), rgb(var(--color-primary-500) / .04));
  box-shadow: inset 3px 0 0 rgb(var(--color-primary-600));
}

/* top bar: white, a hairline, and a thin brand line along the top edge */
html:not(.dark) #main > div.border-b.z-40 {
  background: #fff linear-gradient(90deg, rgb(var(--color-primary-500)), rgb(139 92 246) 55%, rgb(var(--color-primary-300) / 0)) top / 100% 2px no-repeat;
  border-bottom-color: var(--rk-line); box-shadow: var(--rk-sh-1);
}

/* the sun / moon and print buttons in the top bar */
.rk-topbtns { display: flex; align-items: center; gap: .25rem; }
.rk-topbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: inherit; cursor: pointer;
  transition: background-color .15s, color .15s; }
.rk-topbtn:hover { background: rgb(var(--color-base-100)); color: rgb(var(--color-primary-600)); }
html.dark .rk-topbtn:hover { background: rgb(255 255 255 / .08); color: rgb(var(--color-primary-400)); }
.rk-topbtn:focus-visible { outline: 2px solid rgb(var(--color-primary-500)); outline-offset: 2px; }
.rk-topbtn .material-symbols-outlined { font-size: 21px; }
.rk-mode .rk-mode-sun { display: none; }
html.dark .rk-mode .rk-mode-sun { display: inline-block; color: #fbbf24; }
html.dark .rk-mode .rk-mode-moon { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .rk-mode:active .material-symbols-outlined { transform: rotate(-25deg) scale(.9); transition: transform .12s; }
}

/* panels: forms, tables, page cards share one look */
html:not(.dark) fieldset.module > .aligned,
html:not(.dark) .rk-cv-card, html:not(.dark) .rk-cc-card, html:not(.dark) .rk-fill-wrap, html:not(.dark) .rk-ta-table {
  background: #fff; border-color: var(--rk-line); box-shadow: var(--rk-sh-2);
}
html:not(.dark) fieldset.module > .aligned { border-radius: 14px; }
html:not(.dark) #result_list { background: #fff; border-radius: 14px; box-shadow: var(--rk-sh-2); }
html:not(.dark) #result_list thead th { background: #f7f9fc; color: #475467; border-bottom: 1px solid var(--rk-line); }
html:not(.dark) #result_list tbody tr { transition: background-color .12s; }
html:not(.dark) #result_list tbody tr:hover > td { background: rgb(var(--color-primary-50) / .75); }

/* fields: calm border, clear blue focus ring */
html:not(.dark) #content input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
html:not(.dark) #content select, html:not(.dark) #content textarea { border-color: var(--rk-line-strong); }
html:not(.dark) #content input:not([type=checkbox]):not([type=radio]):not([type=file]):focus-visible,
html:not(.dark) #content select:focus-visible, html:not(.dark) #content textarea:focus-visible {
  border-color: rgb(var(--color-primary-500)); box-shadow: var(--rk-ring); outline: 0;
}

/* primary buttons: a soft top light and a small shadow (static) */
html:not(.dark) .bg-primary-600 { background-image: linear-gradient(180deg, rgb(255 255 255 / .14), rgb(255 255 255 / 0)); box-shadow: 0 1px 2px rgb(16 24 40 / .14), inset 0 1px 0 rgb(255 255 255 / .2); }
html:not(.dark) #submit-row { background: rgb(255 255 255 / .92); border-top: 1px solid var(--rk-line); box-shadow: 0 -6px 16px -10px rgb(16 24 40 / .18); }

/* raised layers: dropdowns, menus, dialogs */
html:not(.dark) .shadow-lg, html:not(.dark) dialog, html:not(.dark) .rk-cc-dialog { box-shadow: var(--rk-sh-3) !important; }

/* lift on hover for clickable cards: a ready-made shadow fades in (opacity) while the card moves up
   (transform) - no repaint of the shadow itself */
.rk-lift { position: relative; }
.rk-lift::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 14px 30px -12px rgb(var(--color-primary-700) / .35); transition: opacity .2s; }
@media (prefers-reduced-motion: no-preference) {
  .rk-lift { transition: transform .2s cubic-bezier(.2,.8,.2,1); }
  .rk-lift:hover { transform: translateY(-3px); }
}
.rk-lift:hover::before { opacity: 1; }

/* step-by-step setup guides (Email settings, Applicant messages) */
.rk-guide { max-width: 860px; margin: 0 0 .5rem; border: 1px solid rgba(127,127,127,.22); border-radius: 12px; background: rgba(127,127,127,.04); }
.rk-guide > summary { padding: .65rem .9rem; font-weight: 700; cursor: pointer; }
.rk-guide > summary:focus-visible { outline: 2px solid rgb(var(--color-primary-500)); outline-offset: 2px; border-radius: 12px; }
.rk-guide[open] > summary { border-bottom: 1px solid rgba(127,127,127,.18); }
.rk-guide ol { margin: .6rem 1rem .4rem 2.2rem; list-style: decimal; display: grid; gap: .35rem; font-size: .9rem; line-height: 1.5; }
.rk-guide p { margin: 0 1rem .7rem; font-size: .82rem; }
html:not(.dark) .rk-guide { background: #fff; border-color: var(--rk-line); }

/* sidebar logo: one fixed height for any logo shape (Arvalyx or an agency's), never cut off */
.rk-site-logo { display: flex; align-items: center; min-width: 0; }
.rk-site-logo .rk-logo-img { height: 40px; width: auto; max-width: 200px; object-fit: contain; }
